You are on page 1of 6

Dijkstra Algorithm for Routing

Each Router Broadcasts "Cost" of Links to


Neighbors
Dijkstra Algorithm - Step 1 (for Router 1)
Compute "Temporary" Cost to each Neighbor
Lowest Value Becomes "Permanent"

5
2

1
Dijkstra Algorithm - Step 2 (for Router 1)
Compute "Temporary" Cost to each Node which has a link
to a "Permanent" cost from Step 1 (If two tie, keep both)

2
3

1 2
Dijkstra Algorithm - Step 3 (for Router 1)
Compute "Temporary" Cost to each Node which has a link to a "Permanent" cost
from Step 2 (If two tie for same node, keep either)

5
5
2
4 3

1 2
Dijkstra Algorithm - Step 4 (for Router 1)
Compute "Temporary" Cost to each Node which has a link to a "Permanent" cost
from Step 3 (If two tie for same node, keep either)

5
5
2
4 3

1 2
Dijkstra Algorithm - Step 5 (for Router 1)
Compute "Temporary" Cost to each Node which has a link to a "Permanent" cost
from Step 4 (If two tie for same node, keep either)
The red vectors form the “sink tree” for node 1. All packets will be routed along the
“sink tree,” until network conditions change.

2 8
3

1 2

You might also like