Download presentation
Presentation is loading. Please wait.
1
Communication Networks
Recitation 6 Routing Comnet 2010
2
Routing Problem: find an Optimal Path
5 A R1 R2 R4 R3 R6 R7 R8 B 40 10 20 4 6 15 40 The example network shown on the picture indicates a set of internal connections and the metric value of each connection. Each router selects a first hop for a path to B, based on the total metric of each potential path to B.R1 for example, selects a first hop to R2, on the basis that a path of cost 39 passes through R2 and is the minimum cost from A to B. Comnet 2010
3
Distance Vector (RIP) Each node maintains a table:
(Destination, Cost, NextHop) Each 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) Comnet 2010
4
DV Updates Each update is a list of pairs:
(Destination, Cost) Update local table if receive a “better” route smaller cost came from next-hop Refresh existing routes; delete if they time out Convergence rate Comnet 2010
5
RIP Table Processing RIP routing tables managed by application-level process called routed (daemon) Advertisements sent in UDP packets, periodically repeated Comnet 2010
6
Example - initial distances
1 Distance to node B C Info at node A B C D E 7 A 7 ~ ~ 1 A 8 2 B 7 1 ~ 8 C ~ 1 2 ~ 1 2 D ~ ~ 2 2 D E E 1 8 ~ 2 Comnet 2010
7
E receives D’s routes 1 Distance to node B C Info at node A B C D E 7
7 ~ ~ 1 A 8 2 B 7 1 ~ 8 C ~ 1 2 ~ 1 2 D ~ ~ 2 2 D E E 1 8 ~ 2 Comnet 2010
8
E updates cost to C 1 Distance to node B C Info at node A B C D E 7 A
7 ~ ~ 1 A 8 2 B 7 1 ~ 8 C ~ 1 2 ~ 1 2 D ~ ~ 2 2 D E E 1 8 4 2 Comnet 2010
9
A receives B’s routes 1 Distance to node B C Info at node A B C D E 7
7 ~ ~ 1 A 8 2 B 7 1 ~ 8 C ~ 1 2 ~ 1 2 D ~ ~ 2 2 D E E 1 8 4 2 Comnet 2010
10
A updates cost to C 1 Distance to node B C Info at node A B C D E 7 A
7 8 ~ 1 A 8 2 B 7 1 ~ 8 C ~ 1 2 ~ 1 2 D ~ ~ 2 2 D E E 1 8 4 2 Comnet 2010
11
A receives E’s routes 1 Distance to node B C Info at node A B C D E 7
7 8 ~ 1 A 8 2 B 7 1 ~ 8 C ~ 1 2 ~ 1 2 D ~ ~ 2 2 D E E 1 8 4 2 Comnet 2010
12
A updates cost to C and D 1 Distance to node B C Info at node A B C D
7 A 7 5 3 1 A 8 2 B 7 1 ~ 8 C ~ 1 2 ~ 1 2 D ~ ~ 2 2 D E E 1 8 4 2 Comnet 2010
13
Final distances 1 Distance to node B C Info at node A B C D E 7 A 6 5
6 5 3 1 A 8 2 B 6 1 3 5 C 5 1 2 4 1 2 D 3 3 2 2 D E E 1 5 4 2 Comnet 2010
14
Final distances after link failure
1 Distance to node B C Info at node A B C D E 7 A 7 8 10 1 A 8 2 B 7 1 3 8 C 8 1 2 9 1 2 D 10 3 2 11 D E E 1 8 9 11 Comnet 2010
15
View from a node E’s routing table 1 Next hop B C dest A B D 7 A 1 14
5 B A 8 2 7 8 5 C 6 9 4 D 4 11 2 1 2 D E Comnet 2010
16
The bouncing effect dest cost dest cost 1 A 1 B A B 1 C 1 C 2 25 1 C
Comnet 2010
17
C sends routes to B dest cost dest cost A ~ B A B 1 C 1 C 2 25 1 C
Comnet 2010
18
B updates distance to A dest cost dest cost A 3 B A B 1 C 1 C 2 25 1 C
Comnet 2010
19
B sends routes to C dest cost dest cost A 3 B A B 1 C 1 C 2 25 1 C
4 B 1 Comnet 2010
20
How are these loops caused?
Observation 1: B’s metric increases Observation 2: C picks B as next hop to A But, the implicit path from C to A includes itself! Comnet 2010
21
Solutions Split horizon/Poisoned reverse Works for two node loops
B does not advertise route to C or advertises it with infinite distance (16) Works for two node loops does not work for loops with more nodes Comnet 2010
22
Example where Split Horizon fails
When 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. 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. etc... 1 A B C D Comnet 2010
23
Link State (OSPF) Link State Protocol
OSPF routing table has detailed information about each link : cost, reliability, etc. This allows OSPF routers to optimize routing Link Comnet 2010
24
Link State Updates Routers send to all nodes (not just neighbors) information about directly connected links. 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. Finds spanning tree routed on source router. Comnet 2010
25
Djikstra’s algorithm - step 1
10 3 2 9 6 4 5 7 2 Comnet 2010
26
Djikstra’s algorithm - step 2
1 10 10 3 2 9 6 4 5 7 5 2 Comnet 2010
27
Djikstra’s algorithm - step 3
1 14 8 10 3 2 9 6 4 5 7 5 2 7 Comnet 2010
28
Djikstra’s algorithm - step 4
1 13 8 10 3 2 9 6 4 5 7 5 2 7 Comnet 2010
29
Djikstra’s algorithm - step 5
1 9 8 10 3 2 9 6 4 5 7 5 2 7 Comnet 2010
30
Djikstra’s algorithm - final
1 9 8 10 3 2 9 6 4 5 7 5 2 7 Comnet 2010
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.