A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Link-State Routing Protocols

Graduate Depth 84 in the knowledge graph I know this Set as goal
6topics build on this
342prerequisites beneath it
See this on the map →
Dijkstra's Shortest Path Algorithm in RoutingRouting Algorithms and Protocols+1 moreMulticast Routing ProtocolsOSPF: Open Shortest Path First
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

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication 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 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational 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: 85 steps · 342 total prerequisite topics

Prerequisites (3)

Leads To (2)