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

Distance-Vector Routing Protocols

Graduate Depth 98 in the knowledge graph ☐ I know this ☆ Set as goal
6topics build on this
606prerequisites beneath it
See this on the map →
Bellman-Ford Algorithm and Distance-Vector RoutingRouting Algorithms and Protocols+1 more→→BGP: Border Gateway ProtocolEIGRP: Enhanced Interior Gateway Routing Protocol+1 more
distance-vector dv-routing bellman-ford rip

Core Idea

Distance-vector routing protocols compute shortest paths based on a simple metric by having each router advertise its distances to all destinations and update based on neighbors' advertisements. RIP is a classic distance-vector protocol that uses hop count as its metric. Distance-vector protocols converge slowly and suffer from count-to-infinity problems, but remain simple to implement.

Explainer

From your study of routing algorithms and Bellman-Ford, you know the mathematical foundation: the shortest distance from node X to destination D equals the minimum over all neighbors N of (cost to N + N's distance to D). Distance-vector routing protocols are the direct implementation of this equation in real networks. Each router maintains a routing table (the "distance vector") that lists, for every known destination, the best distance and the next-hop router to use. Periodically, each router sends its entire distance vector to its directly connected neighbors.

Here is how convergence works in practice. Initially, each router only knows about its directly connected networks (distance = 0 or the link cost). Router A tells neighbor B: "I can reach network 10.0.1.0 with cost 1." Router B, which has cost 1 to reach A, now knows it can reach 10.0.1.0 with cost 2 via A. B adds this to its table and shares its updated vector with its own neighbors. Through repeated exchanges, knowledge of all destinations propagates outward like ripples in a pond. After enough rounds of updates (bounded by the network diameter), every router has a consistent shortest-path entry for every destination. This is the Bellman-Ford algorithm running in a distributed, asynchronous fashion.

RIP (Routing Information Protocol) is the textbook distance-vector protocol. It uses hop count as its metric (each link costs 1), sends updates every 30 seconds, and caps the maximum distance at 15 hops (16 = infinity/unreachable). RIP's simplicity makes it easy to configure but limits it to small networks. Larger or more complex networks use protocols with richer metrics.

The critical weakness of distance-vector routing is slow convergence after failures — the count-to-infinity problem. Suppose router A reaches network X through B with cost 2, and the link from B to X fails. B removes its route, but then receives A's next update saying "I can reach X with cost 2." B mistakenly concludes it can reach X through A with cost 3. A then updates to cost 4 via B, B updates to 5, and so on — the distance "counts to infinity" (15 in RIP) before the routers agree the network is unreachable. Mitigations include split horizon (don't advertise a route back to the neighbor you learned it from), poison reverse (advertise it back with infinite cost), and triggered updates (send changes immediately instead of waiting for the periodic timer). These techniques reduce but do not fully eliminate slow convergence, which is why larger networks often prefer link-state protocols that have a complete topology view.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Conditional Statements → Defining and Calling Functions → Functions: Decomposing Problems → Function Parameters and Argument Passing → Return Values → Variable Scope → Introduction to Classes → Objects and Instances → Methods and Attributes → Algorithm Design Basics → Tree Structure and Node Properties → Binary Trees → Tree Traversals → Depth-First Search (DFS) → Depth-First Search: Implementation and Applications → Topological Sort → Dynamic Programming → Longest Common Subsequence (LCS) Problem → Edit Distance: Levenshtein Distance and DP → 0/1 Knapsack Problem: Bounded Capacity DP → Greedy Algorithms → Activity Selection Problem Using Greedy Algorithms → Dijkstra's Algorithm → Floyd-Warshall Algorithm for All-Pairs Shortest Paths → Bellman-Ford Algorithm → Bellman-Ford Algorithm and Distance-Vector Routing → Distance-Vector Routing Protocols

Longest path: 99 steps · 606 total prerequisite topics

Prerequisites (3)

Leads To (3)