Skip to content
doubtly

1 answer

In link state routing each router learns the complete topology by flooding link-state packets, then runs Dijkstra's shortest-path algorithm to build its own routing table.

Steps performed by every router

  1. Discover neighbours by sending HELLO packets and learn their addresses.
  2. Measure the cost (delay, bandwidth-based metric) to each neighbour, e.g. using ECHO packets.
  3. Build a link-state packet (LSP) containing its ID, sequence number, age, and the list of neighbours with costs.
  4. Flood the LSP to all routers. Sequence numbers and age prevent old or duplicate LSPs from circulating.
  5. Compute shortest paths with Dijkstra's algorithm on the full topology map and fill the routing table.

Example. Links: A–B 2, A–C 5, B–C 1, B–D 4, C–D 1. Router A runs Dijkstra:

StepConfirmed setBCD
0{A}2 (A)5 (A)∞
1{A, B}2min(5, 2+1) = 3 (B)2+4 = 6 (B)
2{A, B, C}3min(6, 3+1) = 4 (C)
3{A, B, C, D}4

Routing table at A:

DestinationCostNext hop
B2B
C3B
D4B

(Path to D: A → B → C → D.)

Advantages over distance vector: faster convergence, no count-to-infinity problem, each router has a full view of the network. Disadvantages: more memory and CPU (storing the map and running Dijkstra) and flooding overhead. Protocols: OSPF and IS-IS.

Doubtly AI · 24 Oct 2026 AI-verified · Oct 2026 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.