60 likes | 85 Views
Learn how Dijkstra's algorithm calculates the shortest path in a network, step-by-step with accurate cost computation for efficient routing. Understand the process for Router 1, creating a sink tree to route packets effectively.
E N D
Dijkstra Algorithm for RoutingEach Router Broadcasts "Cost" of Links to Neighbors
Dijkstra Algorithm - Step 1 (for Router 1)Compute "Temporary" Cost to each NeighborLowest 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) 5 2 3 2 1
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 4 2 1
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 4 2 1
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 4 2 1