The idea

Instead of asking neighbors for their estimated distance to every destination, a link-state router describes its own links and their costs. Routers reliably distribute these descriptions within the routing domain. Each router builds a link-state database—a map of the domain—and independently calculates its own shortest paths.

The map is shared, but the shortest-path tree differs by starting router. A consistent map alone does not mean that every router uses the same next hop.

  1. Discover neighbors: hello messages help routers detect and maintain adjacencies.
  2. Describe local links: each router originates information about its own neighbors and link costs.
  3. Flood the information: routers propagate new link-state information through the domain, using protocol mechanisms to manage duplicates, freshness and reliability.
  4. Build the database: routers assemble the current descriptions into a topology.
  5. Calculate: each router runs a shortest-path calculation such as Dijkstra’s algorithm and installs appropriate routes.

When a link changes, the affected router generates updated information. Until it propagates and all routers recalculate, temporary inconsistencies and loops remain possible. Link-state routing is not automatically instantaneous or loop-free during change.

Dijkstra with numbers

Assume A—B costs 1, A—C costs 4 and B—C costs 2. A is the starting router. Begin with A at cost 0; B is tentatively 1 and C is tentatively 4. Settle B, the lowest tentative cost. Reaching C through B costs 1 + 2 = 3, better than 4, so update C to 3 through B. Settle C next. A therefore sends traffic to C first to B. If the direct A—C cost later falls to 2, the direct path becomes preferable after updated information and recalculation.

Dijkstra’s standard version assumes nonnegative link costs. A shortest-path tree minimizes the cost from the chosen root to each reachable node; it is not necessarily a minimum spanning tree that minimizes the sum of all selected edges.

Shared networks and scaling

On a shared LAN, many routers forming a full mesh of adjacencies can create overhead. Protocols can model the shared network with a designated representative or pseudonode to reduce the number of relationships and flooding work. This is a control-plane representation: packets do not necessarily travel through that representative on the data path.

Link state stores topology and runs calculations; DV relies on neighbors’ route advertisements. Their overhead and convergence depend on network size, configuration and protocol, so neither is universally faster or smaller. With compatible topology, metrics and policy, both can produce the same shortest paths; different policies or metrics can produce different results.

Lecture 04 - Forwarding and Routing Algorithms · Distance Vector Routing and Failure Recovery · Hierarchical Routing and Route Redistribution

For the protocol mechanisms that implement this idea, continue to Lecture 05 - OSPF.