1 the network layer chapter 5. 2 network layer design isues store-and-forward packet switching...

44
1 The Network Layer Chapter 5

Upload: mariela-greenley

Post on 14-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

1

The Network Layer

Chapter 5

Page 2: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

2

Network Layer Design Isues

• Store-and-Forward Packet Switching• Services Provided to the Transport Layer• Implementation of Connectionless Service• Implementation of Connection-Oriented Service• Comparison of Virtual-Circuit and Datagram Subnets

Page 3: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

3

Store-and-Forward Packet Switching

The environment of the network layer protocols.

fig 5-1

Page 4: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

4

Implementation of Connectionless Service

Routing within a diagram subnet.

Page 5: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

5

Implementation of Connection-Oriented Service

Routing within a virtual-circuit subnet.

Page 6: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

6

Comparison of Virtual-Circuit and Datagram Subnets

5-4

Page 7: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

7

Routing Algorithms

• The Optimality Principle• Shortest Path Routing• Flooding• Distance Vector Routing• Link State Routing

Page 8: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

8

Optimality principleBellman concept

1 2i

If node i is on the minimal path (1,2) then: path(1,i) is minimal and path(i,2) is minimal.

Page 9: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

9

A sink tree for router B

A subnet A sink tree for router B

Page 10: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

10

Dijkstra: shortest path A to D

1. Mark A permanent and calculate distance to the neighbors (B and G).2. Mark the smallest node (B) permanent and calculate neighbor distance

from it. If you hit a conflict choose smaller distance.3. Do step 2 until all network is covered.

Page 11: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

11

Dijkstra's algorithm

5-8 top

Page 12: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

12

Dijkstra's algorithm (2)

5-8 bottom

Page 13: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

13

Dijkstra5

A

B(2,A) D(5,A)

C(1,A)

E

F

1

2

2

3

21

3

5

1

5

A

E(2,C)

F

1

2

2

3

21

3

5

1

C(1,A)

B(2,A) D(4,C)

5

A

F(4,E)1

2

2

3

21

3

5

1

E(2,C)

B(2,A)

C(1,A)

D(3,E)5

A

F(4,E)1

2

2

3

21

3

5

1

E(2,C)

B(2,A)

C(1,A)

D(3,E)

F(8,D)

5

A

F(4,E)1

2

2

3

21

3

5

1

E(2,C)

B(2,A)

C(1,A)

D(3,E)

F(8,D)

Page 14: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

14

3

Bellman-Ford = Distant vector = RIP(example)

5

1

2 3

4 5

6

1

2

2

3

2

1

3

5

(-1,0)

(-1,)

(-1,) (-1,)

(-1,)

(-1,)

(predecessor , dmin , no of hops)

Number of hops

h=11

2

4 5

6

1

2

2

3

2

1

3

5

(-1,0,0)

(1,2,1)

(1,1,1) (-1, , )

(1,5,1)

(-1, , )

5

1

1initial

Page 15: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

15

Bellman-Ford example (2)

h=2

1

2 3

4 5

6

1

2

2

3

2

1

3

5

(-1,0,0)

(1,2,1)

(1,1,1) (4,2,2)

(1,5,1)(4,3,2)

(3,8,2)(2,5,2) (4,4,2)

(3,8,2)(2,4,2) (3,6,2)

(3,10,2)

h<=2

1

2 3

4 5

6

1

2

2

3

2

1

3

5

(-1,0,0)

(1,2,1)

(1,1,1) (4,2,2)

(4,4,2)

(3,10,2)

5

5

1

1

Page 16: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

16

Bellman-Ford example (3)

h=3

1

2 3

4 5

6

1

2

2

3

2

1

3

5

(-1,0,0)

(1,2,1)

(1,1,1) (4,2,2)

(5,3,3)(3,7,3) (4,4,2)

(5,3,3)

(3,10,2)(3,9,3)

(6,12,3)(3,5,3)

(5,4,3)

h<=3

1

2 3

4 5

6

1

2

2

3

2

1

3

5

(-1,0,0)

(1,2,1)

(1,1,1) (4,2,2)

(5,3,3)

(5,4,3)

5

5

1

1

Page 17: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

17

Bellman-Ford example (4)

h<=4

1

2 3

4 5

6

1

2

2

3

2

1

3

5

(-1,0,0)

(1,2,1)

(1,1,1) (4,2,2)

(5,3,3)

(5,4,3)

5

h=4

1

2 3

4 5

6

1

2

2

3

2

1

3

5

(-1,0,0)

(1,2,1)

(1,1,1) (4,2,2)

(5,4,3)

(5,3,3)

(6,6,4)

(3,8,4)

(3,4,4)

(6,9,4)

1

1

Page 18: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

18

Bellman-Ford example (5)

final

1

2 3

4 5

6

1

2

2

3

2

1

3

5

(-1,0)

(1,2)

(1,1) (4,2)

(5,3)

(5,4)

1

5

Page 19: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

19

Distance Vector Routing

0 2 5 1 x x

2 0 3 2 x x

5 3 0 3 1 5

1 2 3 0 1 x

x x 1 1 0 2

x x 5 x 2 0

0 2 5 1 x x

2 0 3 2 x x

5 3 0 3 1 5

1 2 3 0 1 x

x x 1 1 0 2

x x 5 x 2 0

one hop matrix h=1

0 21 44 11 24 103

21 0 32 22 34 83

44 32 0 25 13 35

11 22 25 0 14 35

24 34 13 14 0 25

103 83 35 35 25 0

two hops matrix h=2

* =

Algorithm: 1. N1(i,k) * N1(k,j) = mink (m(i,k)+n(k,j)) = N2(i,j)

2. N<2(i,j) = min(N1(i,j), N2(i,j))

3. Proceed steps 1. and 2. up to the M = dept of the network.

Page 20: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

20

Distance Vector Routing in practice

(a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.

Page 21: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

21

Distance Vector Routing (2)

The count-to-infinity problem.

Page 22: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

22

Link State Routing

Each router must do the following:

1. Discover its neighbors, learn their network address.

2. Measure the delay or cost to each of its neighbors.

3. Construct a packet telling all it has just learned.

4. Send this packet to all other routers.

5. Compute the shortest path to every other router.

Page 23: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

23

Learning about the Neighbors

(a) Nine routers and a LAN. (b) A graph model of (a).

Page 24: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

24

Measuring Line Cost

A subnet in which the East and West parts are connected by two lines.

Page 25: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

25

Building Link State Packets

(a) A subnet. (b) The link state packets for this subnet.

Page 26: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

26

Distributing the Link State Packets

The packet buffer for router B in the previous slide (Fig. 5-13).

Page 27: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

27

Hierarchical Routing

Hierarchical routing.

Page 28: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

28

Broadcast Routing

Reverse path forwarding. (a) A subnet. (b) a Sink tree. (c) The tree built by reverse path forwarding.

Page 29: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

29

Multicast Routing

(a) A network. (b) A spanning tree for the leftmost router. (c) A multicast tree for group 1. (d) A multicast tree for group 2.

Page 30: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

30

Routing for Mobile Hosts

A WAN to which LANs, MANs, and wireless cells are attached.

Page 31: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

31

Routing for Mobile Hosts (2)

Packet routing for mobile users.

Page 32: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

32

Routing in Ad Hoc Networks

Possibilities when the routers are mobile:

1. Military vehicles on battlefield.– No infrastructure.

2. A fleet of ships at sea.– All moving all the time

3. Emergency works at earthquake .– The infrastructure destroyed.

4. A gathering of people with notebook computers.– In an area lacking 802.11.

Page 33: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

33

Route Discovery

a) (a) Range of A's broadcast.

b) (b) After B and D have received A's broadcast.

c) (c) After C, F, and G have received A's broadcast.

d) (d) After E, H, and I have received A's broadcast.

Shaded nodes are new recipients. Arrows show possible reverse routes.

Page 34: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

34

Route Discovery (2)

Format of a ROUTE REQUEST packet.

Page 35: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

35

Route Discovery (3)

Format of a ROUTE REPLY packet.

Page 36: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

36

Route Maintenance

(a) D's routing table before G goes down.(b) The graph after G has gone down.

Page 37: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

37

Node Lookup in Peer-to-Peer Networks

(a) A set of 32 node identifiers arranged in a circle. The shaded ones correspond to actual machines. The arcs show the fingers from nodes 1, 4, and 12. The labels on the arcs are the table indices.

(b) Examples of the finger tables.

Page 38: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

38

Congestion Control Algorithms

• General Principles of Congestion Control

• Congestion Prevention Policies

• Congestion Control in Virtual-Circuit Subnets

• Congestion Control in Datagram Subnets

• Load Shedding

• Jitter Control

Page 39: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

39

Congestion

When too much traffic is offered, congestion sets in and performance degrades sharply.

Page 40: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

40

General Principles of Congestion Control

1. Monitor the system .

– detect when and where congestion occurs.

2. Pass information to where action can be taken.

3. Adjust system operation to correct the problem.

Page 41: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

41

Congestion Prevention Policies

Policies that affect congestion.

5-26

Page 42: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

42

Congestion Control in Virtual-Circuit Subnets

(a) A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B.

Page 43: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

43

Hop-by-Hop Choke Packets

(a) A choke packet that affects only the source.

(b) A choke packet that affects each hop it passes through.

Page 44: 1 The Network Layer Chapter 5. 2 Network Layer Design Isues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation

44

Jitter Control

(a) High jitter. (b) Low jitter.