ESET 315 Lecture LinkStateRouting
ESET 315 Lecture LinkStateRouting
Metropolitan Area
Networks
C B D C B D
(a) (b)
X A X A
C B D C B D
(c) (d)
Electronics & 6 IP Routing
Telecommunications
OSPF Hello Packets
3
1 2 3 2
1 1
1 6
4 4 4
Assume 1 5
this is our
source node
Each node i is labeled with an estimate Di of the shortest path length to node 1
How to calculate Shortest Path
• Dijkstra Algorithm – Main Steps
Go to Step 1.
How to calculate Shortest Path
• Dijkstra Algorithm
D2 = 1 D3 = ∞
2 3
D6 = ∞
1
6
4 5
P = {1}
D4 = 4 D5 = ∞
When the estimate becomes certain, we regard the node as being “permanently
Labeled” and keep track of this with a set of P of permanently labeled nodes.
How to calculate Shortest Path
• Dijkstra Algorithm
D2 = 1
2 3
1
6
4 5
P = {1, 2}
How to calculate Shortest Path
• Dijkstra Algorithm
D2 = 1 D3 = 4
2 3
D6 = ∞
1
6
4 5
P = {1, 2} D4 = 4 D5 = 2
D2 = 1 D3 = 4
2 3
D6 = ∞
1
6
4 5
P = {1, 2} D4 = 4 D5 = 2
D2 = 1
2 3
1
6
4 5
P = {1, 2, 5}
D5 = 2
D3 = 3
D2 = 1
2 3
1
6
4 D6 = 6
5
P = {1, 2, 5} D4 = 3 D5 = 2
D3 = 3
D2 = 1
2 3
1
6
4 5
D4 = 3 D5 = 2
P = {1, 2, 3, 4, 5}
Step 2: update labels
How to calculate Shortest Path
• Dijkstra Algorithm
D3 = 3
D2 = 1
2 3
D6 = 5
1
6
4 5
D4 = 3 D5 = 2
P = {1, 2, 3, 4, 5}
Step 1: find closest node
How to calculate Shortest Path
• Dijkstra Algorithm - Example
D3 = 3
D2 = 1
2 3
D6 = 5
1
6
4 5
D4 = 3 D5 = 2
P = {1, 2, 3, 4, 5, 6}
Node 3 Node 2 3
Node 4 Node 2 3
Node 5 Node 2 2
Node 6 Node 2 5
Questions
• Readings for next class
– Section on Routing Protocols (Section 3.3)