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

Routing Algorithms and Protocols

Graduate Depth 82 in the knowledge graph I know this Set as goal
41topics build on this
339prerequisites beneath it
See this on the map →
IP Routing and ForwardingNetwork Topologies and ArchitecturesAnycast NetworkingBellman-Ford Algorithm and Distance-Vector Routing+10 more
routing-algorithms protocols distance-vector link-state

Core Idea

Routing algorithms compute paths through a network to reach destination addresses. Distance-vector algorithms (e.g., RIP) share distances to known destinations with neighbors; link-state algorithms (e.g., OSPF) flood the entire network topology to all routers. Each approach has tradeoffs in convergence time, overhead, and scalability.

How It's Best Learned

Simulate both distance-vector and link-state protocols in a network simulator; observe how each converges after topology changes.

Common Misconceptions

Explainer

From your study of IP routing basics, you know that routers forward packets hop-by-hop toward a destination by consulting their routing tables. Routing algorithms are the mechanisms by which routers populate those tables — determining the best path to every known destination in the network. Two fundamentally different approaches exist: distance-vector and link-state.

In a distance-vector protocol, each router maintains a table of distances to every known destination and periodically shares this table with its direct neighbors. When a neighbor advertises a distance, the receiving router adds 1 (or some cost) for the link to that neighbor and updates its own table if it found a shorter route. Over many rounds of exchange, routing information propagates hop by hop until all routers converge on consistent paths. RIP (Routing Information Protocol) is the classic example. The weakness of this approach is slow convergence: if a link fails, the misinformation can bounce between neighbors in a phenomenon called "count to infinity" — routers keep advertising increasingly large (but nonexistent) distances until the protocol stabilizes.

Link-state protocols take a different approach: each router builds a complete map of the entire network. Every router floods a short advertisement describing only its directly connected links and their costs — not its full routing table. Once a router has received link-state advertisements from every other router, it runs Dijkstra's shortest-path algorithm on the complete topology to compute the optimal path to every destination. OSPF (Open Shortest Path First) is the dominant real-world example. Because every router works from the same complete map, link-state protocols converge much faster and avoid count-to-infinity problems, at the cost of more flooding overhead and more memory.

The tradeoff between the two approaches comes down to what information is shared and where computation happens. Distance-vector is simple and low-overhead but slow to react to failures. Link-state is more complex and chatty but produces faster, more accurate convergence. Modern enterprise and ISP networks almost universally prefer link-state protocols (OSPF, IS-IS) for their superior convergence properties, while distance-vector protocols (RIP) survive mainly in simpler or legacy environments.

Practice Questions 3 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 Protocols

Longest path: 83 steps · 339 total prerequisite topics

Prerequisites (2)

Leads To (12)