Link-State Routing Protocols

Graduate Depth 53 in the knowledge graph I know this Set as goal
Unlocks 2 downstream topics
link-state ls-routing dijkstra flooding

Core Idea

Link-state routing protocols have each router flood information about its directly connected links to all other routers, allowing each router to independently compute shortest paths using Dijkstra's algorithm. OSPF is the most deployed link-state protocol; it converges faster than distance-vector approaches and avoids count-to-infinity problems but requires more memory and CPU.

Explainer

You already understand two foundations that link-state routing builds on: routing algorithms in general (the problem of finding best paths through a network) and Dijkstra's shortest-path algorithm (the specific method for computing shortest paths given a complete graph). Link-state routing is the practical protocol framework that puts Dijkstra's algorithm to work in real networks. The core idea is simple: give every router a complete map of the network, then let each router independently compute the best paths using that map.

The protocol operates in two phases. In the flooding phase, each router discovers its directly connected neighbors and the cost (bandwidth, delay, or administrative weight) of each link. It packages this information into a Link-State Advertisement (LSA) and floods it to every other router in the network. Flooding means each router that receives an LSA forwards it out all other interfaces, so information propagates everywhere. Each LSA carries a sequence number to prevent stale data from overwriting fresh updates. Once flooding completes, every router holds an identical copy of the link-state database (LSDB) — a complete topology map showing all routers and all links with their costs.

In the computation phase, each router runs Dijkstra's algorithm on its copy of the LSDB, with itself as the source node. The result is a shortest-path tree rooted at that router, from which it builds its forwarding table. Because every router has the same LSDB, each one computes paths that are globally consistent — they all agree on the topology even though each computes independently. This is fundamentally different from distance-vector protocols, where routers only know the cost to reach each destination via each neighbor and have no visibility into the full network structure.

The advantages over distance-vector routing are significant. Convergence is faster because topology changes are flooded immediately rather than propagated hop-by-hop through iterative exchanges. The count-to-infinity problem — where distance-vector routers slowly increment costs after a link failure, sometimes creating temporary routing loops — simply cannot occur because every router sees the actual topology change. The tradeoff is resource consumption: each router must store the entire LSDB (memory) and run Dijkstra's algorithm whenever the topology changes (CPU). For large networks, OSPF addresses this through area-based hierarchy, dividing the network into areas so that routers only maintain detailed topology for their own area and receive summarized information about others — a practical compromise between complete knowledge and scalability.

Practice Questions 5 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsOperators and ExpressionsArithmetic Operators and Operator PrecedenceComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsCombinational Circuit DesignFlip-Flops and LatchesBinary Counters: Design and AnalysisBinary ArithmeticSubnetting and CIDR NotationIP Routing and ForwardingRouting Algorithms and ProtocolsDijkstra's Shortest Path Algorithm in RoutingLink-State Routing Protocols

Longest path: 54 steps · 217 total prerequisite topics

Prerequisites (2)

Leads To (1)