Communication Networks · Visualized
Link-State Routing (Dijkstra)
Routing
How routers choose paths — flooding everything, computing shortest-path trees, or exchanging distance tables.
3 interactive subtopics — each one animated, step-through and explained.
Link-State Routing (Dijkstra)
RoutingIn link-state routing every router floods a tiny description of its own links (an LSA). Once all LSAs arrive, each router holds an identical map of the network and independently runs Dijkstra’s algorithm to build a shortest-path tree rooted at itself. OSPF works exactly this way inside an area.
How Link-State Routing (Dijkstra) Works
- Each router announces its links and costs to everyone (flooding the LSA).
- All routers assemble the same topology database — a complete map.
- Dijkstra starts at the router itself: settled set = {self}.
- Repeatedly settle the closest unsettled neighbour, relaxing distances through it.
- The resulting tree gives the next hop for every destination; tables update whenever an LSA changes.
Link-State Routing (Dijkstra) Worked Example
Try it: Play — LSAs flash first, then watch nodes settle into the shortest-path tree one by one with running distances.
B settles at cost 1, then C improves from 5 to 3 through B — the classic relaxation moment. The final table lists each destination with its total cost and next hop.
Link-State Routing (Dijkstra): Key Facts to Remember
Recommended resourcesAffiliate links · may earn us a commission
Recommended for learners
See how packets really travel
Networks are built on the structures and algorithms you can watch step by step — queues, trees, and routing algorithms.