distance vector protocols
play

Distance vector protocols Distance Vector routing principles - PDF document

Distance vector protocols Distance Vector routing principles Routing loops and countermeasures to loops Bellman-Ford algorithm RIP, RIP-2 DV-1 S-38.121 / Fall-04 / RKa, NB Distance Vector Routing Principles DV-2 S-38.121 / Fall-04 / RKa, NB


  1. Distance vector protocols Distance Vector routing principles Routing loops and countermeasures to loops Bellman-Ford algorithm RIP, RIP-2 DV-1 S-38.121 / Fall-04 / RKa, NB Distance Vector Routing Principles DV-2 S-38.121 / Fall-04 / RKa, NB

  2. RIP – Routing Information Protocol is a basic protocol for interior routing • RIP is a distance vector protocol – Based on the Bellman-Ford algorithm • The routing table contains information E to Link Distance E - 0 about other known nodes B 4 1 – link (interface) identifier A 4 2 D 6 1 – distance (cost) in hops C 5 1 • The nodes periodically send distance vectors based on the routing tables on all their links • The nodes update their routing table with received distance vectors DV-3 S-38.121 / Fall-04 / RKa, NB Let us study the principles of DV protocols 1 2 Example network with nodes A, B, C, D, E A B C and links 1, 2, 3, 4, 5, 6. 3 4 5 D E Initial state: Nodes know their own addresses 6 and interfaces, nothing more. Node A creates its routing table: From node A to … Link Distance A - (local) 0 The corresponding distance vector (DV) is: A=0 DV-4 S-38.121 / Fall-04 / RKa, NB

  3. Generation of routing tables starts when all routers send their DVs on all interfaces Let’s look at reception in Node B. First the table of B is: 1 2 From node B to … Link Distance A B C B - 0 A=0 A=0 3 4 5 1. B receives the distance vector A=0 B increments the DV with +1 ÿ A=1 2. 3. B looks for the result in its routing table, no match D E 6 4. B adds the result to its RT, the result is From node B to … Link Distance B - 0 A 1 1 5. B generates its distance vector B=0, A=1 DV-5 S-38.121 / Fall-04 / RKa, NB B creates its own DV and sends it to all neighbors C to Link Distance C - 0 B=0, A=1 A to Link Distance B 2 1 1 2 A - 0 A B C A 2 2 B 1 1 4 3 5 E to Link Distance D E A=2 > A=0 E - 0 6 B 4 1 A 4 2 DV-6 S-38.121 / Fall-04 / RKa, NB

  4. D sends its distance vector to all neighbors C to Link Distance C - 0 A to Link Distance B 2 1 1 2 A B C A - 0 A 2 2 B 1 1 3 4 5 D 3 1 E to Link Distance D E E - 0 6 B 4 1 D=0, A=1 A 4 2 D 6 1 A=2 == A=2 ÿ no change DV-7 S-38.121 / Fall-04 / RKa, NB The nodes whose RT changed create DVs and send them to neighbors 1 2 A=0, B=1, D=1 A B C B to Link Distance 3 4 5 B - 0 D E 6 A 1 1 C=0, B=1, A=2 A B C D 1 2 1 2 C 2 1 3 4 5 E 4 1 D E 6 E to Link Distance D to Link Distance 1 2 E - 0 A B C D - 0 B 4 1 A 3 1 3 4 5 A 4 2 B 3 2 D E D 6 1 6 E 6 1 E=0, B=1, A=2, D=1 C 5 1 DV-8 S-38.121 / Fall-04 / RKa, NB

  5. Again the changes are sent ... B=0, A=1, D=2, C=1, E=1 1 2 C to Link Distance A B C A to Link Distance C - 0 A - 0 3 4 5 B 2 1 B 1 1 D E A 2 2 6 D 3 1 1 2 E 5 1 A B C C 1 2 D 5 2 3 4 5 E 1 2 D E D=0,A=1,B=2,E=1 6 D to Link Distance 1 2 A B C D - 0 3 4 5 A 3 1 A, D, and C create new B 3 2 D E DVs, send them, but 6 E=0,B=1,A=2, D=1,C=1 E 6 1 they have no impact. C 6 2 DV-9 S-38.121 / Fall-04 / RKa, NB Processing of received distance vectors D = destination Legend: D = destination Legend: RT Routing Table d = distance + 1 RT Routing Table d = distance + 1 RT(dest) RT-entry RT(dest) RT-entry L = link of reception L = link of reception RT(dest, x) Field x of the entry RT(dest, x) Field x of the entry Yes D ⊂ RT D ⊂ RT No No L==RT(D, l ) L==RT(D, l ) Add (D,L,d) to RT Add (D,L,d) to RT Yes d < RT(D, d ) d < RT(D, d ) Accept d as RT(D, d ) Accept d as RT(D, d ) Yes Update (D,L,d) to RT(D, l , d ) Update (D,L,d) to RT(D, l , d ) Note: this is simplified, shows only the principle! DV-10 S-38.121 / Fall-04 / RKa, NB

  6. A link breaks... DV-11 S-38.121 / Fall-04 / RKa, NB A round of updates starts on link failure A gives an infinite A to Link Distance B to Link Distance distance to the nodes A - 0 B - 0 reached through link 1 B 1 Inf. A 1 Inf. D 3 1 D 1 Inf. C 1 Inf. C 2 1 E 1 Inf. E 4 1 B=0,A=inf,D=inf,C=1,E=1 1 2 A B C A=0,B=inf,D=1,C=inf,E=inf 3 4 5 D E 6 DV-12 S-38.121 / Fall-04 / RKa, NB

  7. D, E and C update their routing tables B=0,A=inf,D=inf,C=1,E=1 A=0,B=inf,D=1,C=inf,E=inf C to Link Distance 1 2 A B C C - 0 B 2 1 +1 3 4 5 A 2 Inf. D E E 5 1 6 A=1,B=inf,D=2,C=inf,E=inf D 5 2 D to Link Distance E to Link Distance D - 0 E - 0 A 3 1 B 4 1 B 3 Inf. A 4 Inf. E 6 1 D 6 1 C 6 2 C 5 1 DV-13 S-38.121 / Fall-04 / RKa, NB D, C, E generate their distance vectors... B to Link Distance B - 0 A to Link Distance A 1 Inf. A - 0 D 4 2 B 1 Inf. C 2 1 D 3 1 E 4 1 C 3 3 1 2 A B C C=0,B=1,A=inf,E=1,D=2 E 3 2 3 4 5 D E D=0,A=1,B=inf,E=1,C=2 E=0,B=1,A=inf,D=1,C=1 6 D to Link Distance E to Link Distance D - 0 E - 0 A 3 1 B 4 1 B 6 2 A 6 2 E 6 1 D 6 1 C 6 2 C 5 1 DV-14 S-38.121 / Fall-04 / RKa, NB

  8. A, B, D, E generate their distance vectors A to Link Distance B to Link Distance C to Link Distance A - 0 B - 0 C - 0 B 3 3 A 4 3 B 2 1 D 3 1 D 4 2 A 5 3 C 3 3 C 2 1 E 5 1 E 3 2 E 4 1 D 5 2 B=0,A=inf,D=2,C=1,E=1 A=0,B=inf,D=1,C=3,E=2 A B C 2 1 3 4 5 D=0,A=1,B=2,E=1,C=2 D E E=0,B=1,A=2,D=1,C=1 6 The result is that all nodes are able to communicate with all other nodes again . DV-15 S-38.121 / Fall-04 / RKa, NB Routing loops A C B DV-16 S-38.121 / Fall-04 / RKa, NB

  9. The DV-protocol may create a transient routing loop 1 2 Let’s assume that cost of link 5 is 8. A B C A stable initial state for routes to C 3 4 5 would be: x to C Link Distance D E from x 6 A → C 1 2 B → C 2 1 C → C - 0 D → C 3 3 Let’s just look at the first E → C link of each route. 4 2 transient - hetkellinen, ohimenevä, väliaikainen DV-17 S-38.121 / Fall-04 / RKa, NB Link 2 fails x to C Link Distance from x Intermediate A → C DV from A to B arrives first 1 2 state B → C 2 Inf. C → C B=0,A=1,D=2,C=3,E=1 - 0 D → C 1 2 3 3 A B C A=0,B=1,D=1,C=2,E=2 E → C 4 2 3 4 5 x to C Link Distance D E 6 from x A → C 1 4 B → C 1 3 All packets to C are sent to B. C → C - 0 B sends them to A. A sends them D → C 3 3 back to B… until TTL=0. E → C (Bouncing effect) 4 4 DV-18 S-38.121 / Fall-04 / RKa, NB

  10. A and E send their distance vectors x to C Link Distance from x A → C 1 4 1 B → C 1 5 C → C - 0 1 2 A=0,B=1,D=1,C=4,E=2 A B C D → C 3 5 E → C 3 4 5 4 4 2 D E 6 B generates a new DV: B=0,A=1,D=2,C=5,E=1 ÿ Distance seen by A to C grows to 6 Distance vectors sent by C do not change anything because of high link cost DV-19 S-38.121 / Fall-04 / RKa, NB A sends a new distance vector x to C Link Distance from x A → C 1 6 1 B → C 1 7 C → C - 0 A=0,B=1,D=1,C=6,E=2 1 2 A B C D → C 3 7 E → C 3 4 5 4 6 2 D E 6 B generates a new DV B=0,A=1,D=2,C=7,E=1 ÿ Distance seen by A to C grows to 8 DV-20 S-38.121 / Fall-04 / RKa, NB

  11. A sends a new distance vector x to C Link Distance from x A → C 1 8 1 B → C 1 9 C → C - 0 1 2 A=0,B=1,D=1,C=8,E=2 A B C D → C 3 9 E → C 3 4 5 4 8 2 D E 6 B generates a new DV B=0,A=1,D=2,C=9,E=1 ÿ Distance seen by A to C grows to 10 DV-21 S-38.121 / Fall-04 / RKa, NB A sends a new distance vector x to C Link Distance from x A → C 1 10 1 B → C 1 11 C → C - 0 A=0,B=1,D=1,C=10,E=2 1 2 A B C D → C 3 11 E → C 3 4 5 5 8 2 D E 6 B generates a new DV B=0,A=1,D=2,C=11,E=1 E generates a new DV E=0,B=1,A=2,D=1,C=8 DV-22 S-38.121 / Fall-04 / RKa, NB

  12. E sends a new distance vector x to C Link Distance 2 from x 1 A B C A → C 1 10 B → C 3 4 5 4 9 C → C - 0 D E D → C 6 6 9 E → C 5 8 E=0,B=1,A=2,D=1,C=8 DV-23 S-38.121 / Fall-04 / RKa, NB B send its DV but the tables are already OK x to C Link Distance B=0,A=1,D=2,C=9,E=1 from x 1 2 A B C A → C 1 10 B → C 3 4 5 4 9 C → C - 0 D E D → C 6 6 9 E → C 5 8 • Each update round increased the costs by 2 • The process progresses in a random order, because it is genuinely parallel in nature. • During the process, the state of the network is bad. DV-packets may be lost due to the overload created by bouncing user messages DV-24 S-38.121 / Fall-04 / RKa, NB

  13. Counting to infinity occurs when failures break the network to isolated islands (1) • Link 1 is broken, A to Link Distance 1 2 A B C and the network D 3 1 has recovered. A - 0 3 4 5 B 3 3 D E E 3 2 6 • All link costs = 1 C 3 3 D to Link Distance D - 0 A 3 1 B 6 2 E 6 1 C 6 2 DV-25 S-38.121 / Fall-04 / RKa, NB Counting to infinity occurs when failures break the network to isolated islands (2) • Also link 6 breaks. A to Link Distance 1 2 A B C D 3 1 A - 0 3 4 5 • D updates its B 3 3 routing table but D E E 3 2 6 has not yet sent its C 3 3 distance vector. D to Link Distance D - 0 A 3 1 B 6 Inf. E 6 Inf. C 6 Inf. DV-26 S-38.121 / Fall-04 / RKa, NB

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend