Distance Vector Routing Example
Distance Vector Routing Example
Distance Vector Routing Example
Part A: Algorithms
CSC 450/550
Summary
1) The Problem
2) The Dijkstra’s Shortest Path Algorithm
3) Distance Vector Routing
4) Link State Routing
5) Hierarchical Routing
6) Routing in Ad Hoc Networks
CSC 450/550
1. The Problem (1)
• Store-and-Forward Packet Switching
• Services Provided to the Transport Layer
• Connectionless Service
• Connection-Oriented Service
CSC 450/550
1. The Problem (2): Packet Switching
fig 5-1
CSC 450/550
1. The Problem (3): Connectionless Service
CSC 450/550
2 Shortest Path Algorithm
CSC 450/550
3 Distance Vector Routing (2)
CSC 450/550
3 Distance Vector Routing (3): Loop- Breaking
Heuristics
Set infinity to a limited number, e.g. 16.
Split horizon
Split horizon with poison reverse
CSC 450/550
A
3 Example: B
C
A 0
B D0
C D E
A 1 A
D 2 B
E C
2
10 E D
2 E 0
A B C A
B 0
B
C C 0 Initialization
D D
E
E
CSC 450/550
A1
A 0 B
B 10 C 2
C D0
D 1 E 2
A 1 D A
E 2 B
C 2
2
10 E D 2
2 E 0
A 10 B C A
B 0
B
C C 0 Direct
D D 2 Neighbours
E
E2
CSC 450/550
A1
A 0 B 11
B 10 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B
C 2
2
10 E D 2
2 E 0
A 10 B C A 3
B 0 Neighbours
B
C C 0 of neighbours
D 11 D 2
E
E2
CSC 450/550
A1
A 0 B 11
B 10 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B 13
C 2
2
10 E D 2
2 E 0
A 10 B C A 3 Neighbours
B 0
B 13 of neighbours
C 13 C 0
D 11 of neighbours
D 2
E 13
E2
CSC 450/550
A1
A 0 B 11
B 10 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B 13
C 2
2
10 E D 2
2 E 0
A 10 B C A 3
B 0 Stable
B 13
C 13 C 0 convergence
D 11 D 2
E 13
E2
CSC 450/550
A1
A 0 B 11
B 10 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B 13
C 2
2
10 E D 2
2 E 0
B 1
A 10 C A 3
B 0 Good news:
B 13
C 13 C 0
A new link!
D 11 D 2
E 13
E2
CSC 450/550
A1
A 0 B 11
B 10 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B 13
C 2
2
10 E D 2
2 E 0
A 10 B 1 C A 3
B 0 Direct
B1
C 1 C 0 endpoints
D 11 D 2 know
E 13
E2
CSC 450/550
A1
A 0 B3
B 10 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B3
C 2
2
10 E D 2
2 E 0
A4 B 1 C A 3
B 0 Neighbours
B1
C 1 C 0 know
D3 D 2
E3
E2
CSC 450/550
A1
A 0 B3
B4 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B3
C 2
2
10 E D 2
2 E 0
A4 B 1 C A 3
B 0 Neighbours
B1
C 1 C 0
of neighbours
D3 D 2
know
E3
E2
CSC 450/550
A1
A 0 B3
B4 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B3
C 2
2
10 E D 2
2 E 0
A4 B 1 C A 3
B 0
B1
A happy and
C 1 C 0 stable network
D3 D 2
E3
E2
CSC 450/550
A1
A 0 B3
B4 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B3
C 2
2
10 E D 2
2 E 0
A4 B C A 3 Bad news:
B 0
B1 Link crash!!
C 1 C 0
D3 D 2
E3
E2
CSC 450/550
A1
A 0 B3
B4 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B3
C 2
2
10 E D 2
2 E 0
A B C A 3
B 0 Direct
B
C C 0
endpoints
D D 2
know
E
E2
CSC 450/550
A1
A 0 B3
B4 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B3
C 2
2
10 E D 2
2 E 0
A 10 B C A 3
B 0
B
C C 0
D D 2
E
E2
CSC 450/550
A1
A 0 B3
B4 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B3
C 2
2
10 E D 2
2 E 0
A 10 B C A 3 Get help
B 0
B5 from
C 13 C 0
D 11 neighbours
D 2
E 13
E2
CSC 450/550
A1
A 0 B7
B4 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B7
C 2
2
10 E D 2
2 E 0
A 10 B C A 3 Routing loop
B 0
B5 (due to
C 13 C 0
D 11 inconsistent
D 2
E 13 state info)
E2
CSC 450/550
A1
A 0 B7
B8 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B7
C 2
2
10 E D 2
2 E 0
A 10 B C A 3
B 0
B9
C 13 C 0
D 11 D 2
E 13
E2
CSC 450/550
A1
A 0 B 11
B8 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B 11
C 2
2
10 E D 2
2 E 0
A 10 B C A 3
B 0 Counting
B9
C 13 C 0 to infinity…
D 11 D 2
E 13
E2
CSC 450/550
A1
A 0 B 11
B 10 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B 11
C 2
2
10 E D 2
2 E 0
A 10 B C A 3
B 0
B 13
C 13 C 0
D 11 D 2
E 13
E2
CSC 450/550
A1
A 0 B 11
B 10 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B 13
C 2
2
10 E D 2
2 E 0
A 10 B C A 3
B 0
B 13
C 13 C 0
D 11 D 2
E 13
E2
CSC 450/550
A1
A 0 B 11
B 10 C 2
C 3 D0
D 1 E 2
A 1 D A3
E 3 2 B 13
C 2
2
10 E D 2
2 E 0
A 10 B C A 3
B 0 Stability
B 13
C 13 C 0 again
D 11 D 2
E 13
E2
CSC 450/550
4 Link State Routing (1)
Each router must do the following:
• Discover its neighbors, learn their network address.
• Measure the delay or cost to each of its neighbors.
• Construct a packet telling all it has just learned.
• Send this packet to all other routers.
• Compute the shortest path to every other router.
CSC 450/550
4 Link State Routing (2): Learning about
the Neighbors
CSC 450/550
4 Link State Routing (3): Measuring Line
Cost
A subnet in which the East and West parts are connected by two
lines.
CSC 450/550
4 Link State Routing (4): Building Link
State Packets
(a) A subnet. (b) The link state packets for this subnet.
CSC 450/550
4 Link State Routing (5): Distributing the
Link State Packets
The packet buffer for router B in the previous slide (Fig. 5-13).
CSC 450/550
5 Hierarchical Routing
Hierarchical routing.
CSC 450/550
6. Routing in Ad Hoc Networks (1)
Possibilities when the routers are mobile:
Military vehicles on battlefield.
• No infrastructure.
CSC 450/550
6. Routing in Ad Hoc Networks (2): Route
Discovery
CSC 450/550
6. Routing in Ad Hoc Networks (4): Route
Discovery
CSC 450/550
6. Routing in Ad Hoc Networks (5): Route
Maintenance
(a) D's routing table before G goes down.
(b) The graph after G has gone down.
CSC 450/550