Distance Vector Routing Protocol (Explain with Diagram)

Distance Vector Routing Protocol (Explain with Diagram)

Verified Sources
Nov 3, 2026

Distance Vector Routing is a dynamic routing approach where each router learns “best routes” by exchanging distance vectors with its directly connected neighbors, rather than knowing the full network topology. The protocol is mathematically grounded in the Bellman–Ford shortest-path update rule: routers update their distance to each destination using the metric advertised by neighbors. As updates propagate, routing tables eventually stabilize to a state called convergence.

Key idea: each router maintains, for every destination, a pair like (distance, next-hop), derived from neighbors’ advertised distances.

Footnotes

  1. Distance-vector routing protocol - Wikipedia - Overview of distance-vector routing, Bellman–Ford basis, neighbor advertisements, and convergence. ↩ ↩2

Distance Vector Routing (conceptual overview)

1) Core Mechanics (What a Distance Vector Router Does)

A distance-vector router operates with three essential components:

  1. Neighbor exchange: periodically (and/or when changes occur) it sends its distance vector to directly connected neighbors.
  2. Metric-based update: for each destination yy, router xx computes a new distance estimate via each neighbor vv, then takes the minimum. This is the Bellman–Ford logic used in distance-vector routing.
  3. Routing table selection: it stores the best next hop based on that computed minimum, and advertises updated distances in future messages.

A common formal form of the update is: Dx(y)=min⁡v∈neighbors(x){c(x,v)+Dv(y)}D_x(y) = \min_{v \in neighbors(x)} \{c(x,v) + D_v(y)\}
where:

  • Dx(y)D_x(y) = router xx’s current estimated distance to destination yy
  • c(x,v)c(x,v) = cost from xx to neighbor vv
  • Dv(y)D_v(y) = distance to yy as advertised by neighbor vv

Distance-vector routing’s defining limitation is that it does not require global topology knowledge—routers “route by rumor” (neighbor information only), which makes it simpler but can lead to slower convergence and loop issues.

Keywords:

  • distance vector
  • next hop
  • convergence

Footnotes

  1. Distance-vector routing protocol - Wikipedia - Overview of distance-vector routing, Bellman–Ford basis, neighbor advertisements, and convergence. ↩ ↩2 ↩3 ↩4

Step-by-step: Distance Vector Update and Table Computation

  1. 1
    Step 1

    Each router knows distances to directly connected destinations, and sets other destinations as unknown/infinite.

  2. 2
    Step 2

    Router xx transmits its current distance vector to each neighbor. Neighbors receive those advertised metrics.

    Footnotes

    1. Distance-vector routing protocol - Wikipedia - Overview of distance-vector routing, Bellman–Ford basis, neighbor advertisements, and convergence. ↩

  3. 3
    Step 3

    For every destination yy, router xx calculates Dx(y)=min⁡v{c(x,v)+Dv(y)}D_x(y)=\min_v\{c(x,v)+D_v(y)\} using the neighbors’ advertised Dv(y)D_v(y).

    Footnotes

    1. Distance-vector routing protocol - Wikipedia - Overview of distance-vector routing, Bellman–Ford basis, neighbor advertisements, and convergence. ↩

  4. 4
    Step 4

    If the computed best distance improves (or changes), update the routing table entry: store the new metric and the corresponding next hop.

  5. 5
    Step 5

    Routers keep exchanging updated vectors until no entry changes—routing tables converge.

    Footnotes

    1. Distance-vector routing protocol - Wikipedia - Overview of distance-vector routing, Bellman–Ford basis, neighbor advertisements, and convergence. ↩

2) Why Loops Happen (Count-to-Infinity)

Because distance-vector routing relies on neighbor-reported information, a router can temporarily believe a destination is reachable via a neighbor when that neighbor also has stale or incorrect information. This can create routing loops where metrics keep increasing until they hit a protocol-defined infinity value.

RIP, for example, defines an “infinity” hop-count limit used to bound the count-to-infinity behavior (maximum metric is 15, and 16 is used as unreachable/infinity).

Keywords:

  • count-to-infinity
  • routing loop
  • infinity

Footnotes

  1. Distance-vector routing protocol - Wikipedia - Overview of distance-vector routing, Bellman–Ford basis, neighbor advertisements, and convergence. ↩

  2. RFC 2453 RIP Version 2 - RIP metric range and router route timers (timeout/garbage collection). ↩

3) Loop Prevention Techniques (Split Horizon, Poison Reverse, Infinity, Timers)

Distance-vector protocols typically add mechanisms to reduce or mitigate loops:

Split Horizon

A router does not advertise to a neighbor routes learned from that same neighbor on that same interface, preventing simple “back-and-forth” advertisement loops.

Poison Reverse (Route Poisoning)

A stronger method: if a route learned via neighbor BB would otherwise be advertised back to BB, the router explicitly advertises it as unreachable using an infinity metric. RIP-style behavior includes “poisoning” failed routes with an infinite metric.

Bounded infinity (e.g., RIP uses maximum hops)

By limiting the hop count, distance-vector protocols prevent metrics from increasing without bound. RIP’s metric range and infinity handling are specified in RFC 2453.

Timers (Timeout and Garbage Collection in RIP)

RIP maintains per-route timers:

  • A route expires after a timeout period, but is kept temporarily to inform neighbors.
  • A garbage-collection timer later removes the route entry.

FRR documentation also summarizes common RIP timers (e.g., update timer 30s, timeout 180s).

Keywords:

  • split horizon
  • poison reverse
  • hold-down timer

Footnotes

  1. RIP Distance Vector Routing Protocol - NetworkLessons - Route poisoning/triggered update and poison reverse behavior. ↩

  2. RFC 2453 RIP Version 2 - RIP metric range and router route timers (timeout/garbage collection). ↩ ↩2

  3. RIP — FRR latest documentation - Summarizes RIP timers such as update timer and timeout timer. ↩

type="tip" title="Diagram mental model" content="Read a distance-vector advertisement as: “If you send traffic to destination yy, I can reach it in Dv(y)D_v(y) hops/cost via my current next hop.” Each router then selects the smallest c(x,v)+Dv(y)c(x,v)+D_v(y)."

type="warning" title="Limitation to remember" content="Distance vector routing can temporarily form loops because routers do not know whether a neighbor’s route is actually valid end-to-end."

4) Neat End-to-End Diagram: Message Exchange & Bellman–Ford Computation

Assume three routers A, B, C where B is between A and C. B receives A’s advertisement and C’s advertisement, then computes its own best distances and next hops.

This diagram corresponds directly to the distributed update described for distance-vector routing: neighbors exchange distance vectors, routers update their own distance vectors, and repeat until convergence.

Footnotes

  1. Distance-vector routing protocol - Wikipedia - Overview of distance-vector routing, Bellman–Ford basis, neighbor advertisements, and convergence. ↩

Convergence Lifecycle in Distance Vector Routing

Initialize known distances

t0 (startup/changes)

Use directly connected neighbors; other destinations start as infinite/unknown."

Exchange distance vectors

t1, t2, ...

Routers periodically (and/or triggered) send updated distance vectors to neighbors. "

Footnotes

  1. Distance-vector routing protocol - Wikipedia - Overview of distance-vector routing, Bellman–Ford basis, neighbor advertisements, and convergence. ↩

Recompute routes

t3...

Apply Dx(y)=min⁡v{c(x,v)+Dv(y)}D_x(y)=\min_v\{c(x,v)+D_v(y)\} and update routing table entries."

Stabilize (convergence)

later

When advertisements stop improving metrics, routing tables become stable. "

Footnotes

  1. Distance-vector routing protocol - Wikipedia - Overview of distance-vector routing, Bellman–Ford basis, neighbor advertisements, and convergence. ↩

Distance Vector vs Topology-Aware Routing (Conceptual Comparison)

How the information each router uses changes computation and update behavior.

Common Exam/Interview Add-ons

Knowledge Check

Question 1 of 4
Q1Single choice

In distance-vector routing, each router primarily computes its route distances using which information source?