Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 455/555 Intro to Networks and Communications

Similar presentations


Presentation on theme: "CS 455/555 Intro to Networks and Communications"— Presentation transcript:

1 CS 455/555 Intro to Networks and Communications
The Network Layer: Routing Algorithms Animations Dr. Michele Weigle Department of Computer Science Old Dominion University Printed on Saturday, February 23, 2019 at 10:00 PM.

2 Link State Routing Dijkstra's algorithm: example
Step 1 2 3 4 5 start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E 2 1 3 5 A B D C F E N is the set of nodes to which we have computed the minimum cost path D(x) is the current minimum cost path to x p(x) is the predecessor of x on the current minimum cost path to x

3 Link State Flooding Algorithm Example
2 1 3 5 A B D C F E X Step 1: Link C-D fails Step 2: C sends C->D= to A,B,E,F D sends D->C= to A,B,E Step 3: A sends C->D= to B,D D->C= to B,C B sends C->D= to A,D D->C= to A,C E sends C->D= to D,F D->C= to C,F F sends C->D= to E Step 4: C sends D->C= to B,E,F (received from A) D sends C->D= to B,E F sends D->C= to C (received from E)

4 Link State Flooding Algorithm Example
C->D =  D->C =  rcvr Step 2 Step 3 Step 4 A C B D --- A, B, E F E Notation: Letter in cell indicates the sender of the message. Circle around letter indicates the receipt of this message triggered a broadcast.

5 Decentralized Routing Algorithms Distance Vector Routing
2 1 3 5 A B D C F E Bellman-Ford equation Let's calculate this for source A and destination F. A has 3 neighbors (B, C, D) c(A,B)=2 c(A,C)=5 c(A,D)=1 dA(F) = min {2+5, 5+3, 1+3} = 4 dX(Y) = cost of least-cost path from X to Y = minv{c(X,v) + dv(Y)} c(x,y) = cost of link x to y v = {neighbors of X} dB(F)=5 dC(F)=3 dD(F)=3

6 Distance Vector Algorithm Example
Y node x table cost to x y z 2 x y 1 from X z node y table cost to x y z 7 x Z y from z node z table cost to x y z x ∞ ∞ ∞ from y z 7 1

7 Distance Vector Algorithm Example
Y node x table cost to x y z 2 x y 1 from X z node y table cost to x y z 7 x Z y from z node z table cost to x y z x ∞ ∞ ∞ from y z 7 1

8 Distance Vector Algorithm Example
Y node x table cost to cost to x y z x y z 2 x 2 3 x y y from 1 from z z X node y table cost to x y z 7 x Z y from z Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0, 7+1} = 2 node z table cost to x y z x ∞ ∞ ∞ Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1, 7+0} = 3 from y z 7 1

9 Distance Vector Algorithm Example
Y node x table cost to cost to x y z x y z x y z from cost to x y z 2 x 2 3 x y from y 1 from z X z node y table cost to cost to x y z from cost to x y z x y z x y z 7 x x Z y y from from z z node z table cost to cost to x y z x y z from cost to Done sending? x y z x y z x ∞ ∞ ∞ x from y from y z 7 1 z

10 Distance Vector Algorithm Link cost changes
4 1 50 Z Y X 1 When a node detects a local link cost change: The nodes updates its distance table If the least cost path (i.e., distance vector) changes, the node notifies its neighbors t0 : Y detects link-cost change, updates its DV, informs its neighbors. t1 : Z receives update from Y, updates its table, computes new least cost to X, sends its neighbors its DV. t2 : Y receives Z's update, updates its distance table. Y's least costs do not change, so Y does not send a message to Z.

11 Distance Vector Algorithm Link cost changes
4 1 50 Z Y X 1 t0 x y z x y z from cost to t1 x y z x y z from cost to t2 cost to node x x y z x y from z cost to node y x y z x y from z cost to node z x y z x y from z

12 Distance Vector Algorithm Link cost changes
Routing Loop! Does it Terminate? 60 t0 4 1 50 Z Y X cost to node x x y z x y from z Why does Y to X change from 4 to 6 (and not 60?) cost to node y x y z x y from Dy(x) = min{c(y,x) + Dx(x), c(y,z) + Dz(x)} = min{60+0, 1+5} = 6 z cost to node z x y z x y from z

13 Distance Vector Algorithm Link cost changes
Routing Loop! Does it Terminate? 60 t0 from x y z x y z cost to t1 4 1 50 Z Y X cost to node x x y z x y from z Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{60+0, 50+1} = 51 Dx(z) = min{c(x,z) + Dz(z), c(x,y) + Dy(z)} = min{50+0, 60+1} = 50 x y z x y z from cost to cost to node y x y z x y from z Dz(x) = min{c(z,x) + Dx(x), c(z,y) + Dy(x)} = min{50+0, 1+6} = 7 Dz(y) = min{c(z,y) + Dy(y), c(z,x) + Dx(y)} = min{1+0, 50+4} = 1 cost to x y z x y z from cost to node z x y z x y from z

14 Distance Vector Algorithm Link cost changes
Dy(x) = min{c(y,x) + Dx(x), c(y,z) + Dz(x)} = min{60+0, 1+7} = 8 t0 t1 t2 4 1 50 Z Y X 60 cost to cost to x y z cost to node x x y z x y z x x x y from y y from from z z z cost to cost to x y z cost to node y x y z x y z x x x y y from from y from z z z What happens next? How long to stabilize? cost to cost to cost to node z x y z x y z x y z x x x y from from y y from z z z

15 The Count to Infinity Problem The "poisoned reverse" technique
4 1 50 Z Y X If Z routes through Y to get to X: Then Z tells Y that Z's distance to X is infinite t-3 x y z x y z cost to from t-2 x y z x y z cost to from 0 4 ∞ ∞ 1 0 t-1 cost to node x x y z x y from z cost to node y x y z x y from z cost to node z x y z x y from z

16 The Count to Infinity Problem The "poisoned reverse" technique
4 1 50 Z Y X 60 Will this completely solve the problem? x y z x y z cost to from 0 4 ∞ ∞ 1 0 t0 Dy(x) = min{c(y,x) + Dx(x), c(y,z) + Dz(x)} = min{60+0, 1+∞} = 60

17 The Count to Infinity Problem The "poisoned reverse" technique
4 1 50 Z Y X 60 Will this completely solve the problem? t0 x y z x y z cost to from 0 4 ∞ ∞ 1 0 t1 x y z x y z cost to from 0 ∞ 50 t2 cost to x x y z x y from z from x y z x y z cost to 0 ∞ 50 ∞ 0 1 t3 y cost to x y z x 0 4 ∞ y from z ∞ 1 0 z cost to x y z x y from z


Download ppt "CS 455/555 Intro to Networks and Communications"

Similar presentations


Ads by Google