Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Comnet 2010 Communication Networks Recitation 6 Routing.

Similar presentations


Presentation on theme: "1 Comnet 2010 Communication Networks Recitation 6 Routing."— Presentation transcript:

1 1 Comnet 2010 Communication Networks Recitation 6 Routing

2 2 Comnet 2010 Routing Problem: find an Optimal Path R5 5 A R1 R2 R4 R3 R6 R7 R8 B 5 40 10 20 10 4 5 5 6 15 40

3 3 Comnet 2010 Distance Vector (RIP) Each node maintains a table:Each node maintains a table: (Destination, Cost, NextHop)(Destination, Cost, NextHop) Each node sends updates to (and receives updates from) its directly connected neighborsEach node sends updates to (and receives updates from) its directly connected neighbors –periodically (on the order of several seconds) –whenever its table changes (called triggered update)

4 4 Comnet 2010 DV Updates Each update is a list of pairs:Each update is a list of pairs: (Destination, Cost)(Destination, Cost) Update local table if receive a “better” routeUpdate local table if receive a “better” route –smaller cost –came from next-hop Refresh existing routes; delete if they time outRefresh existing routes; delete if they time out Convergence rateConvergence rate

5 5 Comnet 2010 RIP Table Processing RIP routing tables managed by application- level process called routed (daemon)RIP routing tables managed by application- level process called routed (daemon) Advertisements sent in UDP packets, periodically repeatedAdvertisements sent in UDP packets, periodically repeated

6 6 Comnet 2010 Example - initial distances A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~2 7 1 1 2 28 Distance to node D ~ ~ 2 0 E18~2 1 8 ~ 2 0 E

7 7 Comnet 2010 E receives D’s routes A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~2 7 1 1 2 28 Distance to node D ~ ~ 2 0 E18~2 1 8 ~ 2 0 E

8 8 Comnet 2010 E updates cost to C A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~2 7 1 1 2 28 Distance to node D ~ ~ 2 0 E1842 1 8 ~ 2 0 E

9 9 Comnet 2010 A receives B’s routes A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~2 7 1 1 2 28 Distance to node D ~ ~ 2 0 E1842 1 8 ~ 2 0 E

10 10 Comnet 2010 A updates cost to C A B E C D Info at node A B C D ABC 078 701 ~10 ~~2 7 1 1 2 28 Distance to node D ~ ~ 2 0 E1842 1 8 ~ 2 0 E

11 11 Comnet 2010 A receives E’s routes A B E C D Info at node A B C D ABC 078 701 ~10 ~~2 7 1 1 2 28 Distance to node D ~ ~ 2 0 E1842 1 8 ~ 2 0 E

12 12 Comnet 2010 A updates cost to C and D A B E C D Info at node A B C D ABC 075 701 ~10 ~~2 7 1 1 2 28 Distance to node D 3 ~ 2 0 E1842 1 8 ~ 2 0 E

13 13 Comnet 2010 Final distances A BC D Info at node A B C D ABC 065 601 510 332 7 1 1 2 28 Distance to node D 3 3 2 0 E1542 1 5 4 2 0 E E

14 14 Comnet 2010 Final distances after link failure A BC D Info at node A B C D ABC 078 701 810 1032 7 1 1 2 28 Distance to node D 10 3 2 0 E18911 1 8 9 0 E E

15 15 Comnet 2010 View from a node A B E C D dest A B C D ABD 1145 785 694 4112 7 1 1 2 28 Next hop E’s routing table

16 16 Comnet 2010 The bouncing effect A 25 1 1 B C B C2 1 destcost A C1 1 destcost A B1 2 destcost

17 17 Comnet 2010 C sends routes to B A 25 1 B C B C2 1 destcost A C1 ~ destcost A B1 2 destcost

18 18 Comnet 2010 B updates distance to A A 25 1 B C B C2 1 destcost A C1 3 destcost A B1 2 destcost

19 19 Comnet 2010 B sends routes to C A 25 1 B C B C2 1 destcost A C1 3 destcost A B1 4 destcost

20 20 Comnet 2010 How are these loops caused? Observation 1:Observation 1: –B’s metric increases Observation 2:Observation 2: –C picks B as next hop to A –But, the implicit path from C to A includes itself!

21 21 Comnet 2010 Solutions Split horizon/Poisoned reverseSplit horizon/Poisoned reverse –B does not advertise route to C or advertises it with infinite distance (16) Works for two node loopsWorks for two node loops –does not work for loops with more nodes

22 22 Comnet 2010 Example where Split Horizon fails 1 1 1 1 AB C D When link breaks, C marks D as unreachable and reports that to A and BWhen link breaks, C marks D as unreachable and reports that to A and B Suppose A learns it first. A now thinks best path to D is through B. A reports a route of cost=3 to C.Suppose A learns it first. A now thinks best path to D is through B. A reports a route of cost=3 to C. C thinks D is reachable through A at cost 4 and reports that to B.C thinks D is reachable through A at cost 4 and reports that to B. B reports a cost 5 to A who reports new cost to C.B reports a cost 5 to A who reports new cost to C. etc...etc...

23 23 Comnet 2010 Link State (OSPF) Link State ProtocolLink State Protocol –OSPF routing table has detailed information about each link : cost, reliability, etc. –This allows OSPF routers to optimize routing Link

24 24 Comnet 2010 Link State Updates Link State Updates Routers send to all nodes (not just neighbors) information about directly connected links. Routers send to all nodes (not just neighbors) information about directly connected links. Each router calculates shortest cost path to all others (Dijkstra). Each router calculates shortest cost path to all others (Dijkstra). At each step of the algorithm, router adds the next shortest (i.e. lowest-cost) path to the tree. At each step of the algorithm, router adds the next shortest (i.e. lowest-cost) path to the tree. Finds spanning tree routed on source router. Finds spanning tree routed on source router.

25 25 Comnet 2010 Djikstra’s algorithm - step 1 0 10 5 2 3 1 9 7 2 4 6

26 26 Comnet 2010 Djikstra’s algorithm - step 2 0 10 5 5 2 3 1 9 7 2 4 6

27 27 Comnet 2010 Djikstra’s algorithm - step 3 0 8 5 14 7 10 5 2 3 1 9 7 2 4 6

28 28 Comnet 2010 Djikstra’s algorithm - step 4 0 8 5 13 7 10 5 2 3 1 9 7 2 4 6

29 29 Comnet 2010 Djikstra’s algorithm - step 5 0 8 5 9 7 10 5 2 3 1 9 7 2 4 6

30 30 Comnet 2010 Djikstra’s algorithm - final 0 8 5 9 7 10 5 2 3 1 9 7 2 4 6


Download ppt "1 Comnet 2010 Communication Networks Recitation 6 Routing."

Similar presentations


Ads by Google