Distance Vector Routing: Explaining the Example Step-by-Step

Distance Vector Routing: Explaining the Example Step-by-Step

Verified Sources
Nov 3, 2026

Distance Vector Routing (tutorial/overview)

Distance vector routing is a distributed routing method where each router maintains, for every destination, a distance (metric) and a next hop. Routers periodically exchange their distance vectors with neighbors, and update their own tables using the neighbors’ advertised distances. This process is closely related to the Bellman–Ford shortest-path principle. 2

In a typical distance vector algorithm, if router XX has neighbor YY, then for destination dd:

DX(d)=min⁡Y∈neighbors(X){c(X,Y)+DY(d)}D_X(d) = \min_{Y \in \text{neighbors}(X)} \left\{ c(X,Y) + D_Y(d) \right\}

where:

  • DX(d)D_X(d) is router XX’s current best distance to destination dd,
  • c(X,Y)c(X,Y) is the link cost from XX to YY,
  • DY(d)D_Y(d) is router YY’s advertised distance to destination dd. 2

Below, I walk through how you explain (and compute) distance vector routing on the given diagram by identifying the nodes, listing initial distances, then iterating table exchanges until values stabilize.

Key learning terms:

  • Distance vector
  • Next hop
  • Bellman–Ford
  • Count-to-infinity
  • Split horizon

Note on the example image: The exact numeric costs and topology specifics must be read from the diagram. In the steps below, I show the general computation procedure and the table update logic you apply to the nodes shown (the method is identical regardless of whether costs are 1, weights, etc.). You can plug in the link costs and destination labels exactly as in your figure.

Footnotes

  1. Routing Information Protocol (RIP) — Wikipedia - Describes distance vector basics and how RIP uses distance vectors and periodic exchanges. ↩ ↩2

  2. Bellman–Ford algorithm — Wikipedia - Provides the iterative relaxation principle underlying shortest paths used in distance-vector contexts. ↩ ↩2

Distance Vector Convergence (Conceptual Lifecycle)

Local table setup

Step 1: Initialize

For each neighbor, set distance = link cost; for unknown destinations set ∞; next hop is the neighbor."

Neighbors send vectors

Step 2: Exchange

Each router advertises its current distances to all destinations to its immediate neighbors."

Compute improved paths

Step 3: Relax

For each destination, compute min over neighbors: link cost + neighbor’s advertised distance."

Repeat until stable

Step 4: Iterate

Continue exchanging and relaxing until distance vectors stop changing."

Handle failures/metric changes

Step 5: React to changes

If a link cost changes, routers repeat the relaxation process; loop-prevention rules may apply."

1) Interpret the topology in the diagram

Start by labeling routers (nodes) as they appear in your figure (for example, commonly letters like A, B, C, …). Identify:

  1. Which nodes are directly connected (edges).
  2. The cost of each directly connected link c(X,Y)c(X,Y) (often shown as numbers on the links).

Then, for distance vector routing, each router XX maintains a table:

  • Destination: every node in the network (including itself).
  • Distance: current best estimate.
  • Next hop: neighbor used to achieve that estimate.

A compact table representation for a router XX looks like:

DestinationDistance DX(⋅)D_X(\cdot)Next hop
X0–
neighbor 1c(X,neighbor1)c(X,neighbor1)neighbor1
other nodes∞ (initially)–

Distance vector routing computes shortest paths by repeated updates that use neighbor information. 2

Footnotes

  1. Routing Information Protocol (RIP) — Wikipedia - Describes distance vector basics and how RIP uses distance vectors and periodic exchanges. ↩

  2. Bellman–Ford algorithm — Wikipedia - Provides the iterative relaxation principle underlying shortest paths used in distance-vector contexts. ↩

Step-by-step computation using the diagram (initialize → exchange → update → converge)

  1. 1
    Step 1

    Set DX(X)=0D_X(X)=0. For every directly connected neighbor YY, set DX(Y)=c(X,Y)D_X(Y)=c(X,Y) and next hop = YY. For all other destinations dd, set DX(d)=∞D_X(d)=\infty.

  2. 2
    Step 2

    Each neighbor YY advertises its current distances DY(d)D_Y(d) to router XX.

  3. 3
    Step 3

    For each destination dd, compute candidate costs via each neighbor: c(X,Y)+DY(d)c(X,Y)+D_Y(d). Choose the minimum to update DX(d)D_X(d) and record the corresponding next hop.

  4. 4
    Step 4

    Perform another iteration using updated neighbor vectors. Distances propagate outward hop by hop until no entries improve.

  5. 5
    Step 5

    Once values stop changing, the next hop in each destination row tells you where router XX forwards packets.

  6. 6
    Step 6

    Pick a single router (e.g., the one at the left of the diagram). Compute its table after Round 1, Round 2, etc., and explain how each update corresponds to a path that grows by one hop each iteration.

2) The core update rule you must explain

For any router XX and destination dd, distance vector routing uses:

DX(d)=min⁡Y∈N(X){c(X,Y)+DY(d)}D_X(d) = \min_{Y \in N(X)} \{ c(X,Y) + D_Y(d) \}

and the next hop is the neighbor YY that attains the minimum.

This is the essential “explain the algorithm” part: show that the router’s best distance to dd is computed by trying each neighbor as the first step, then using what that neighbor already knows about reaching dd. 2

A helpful mini-visual (conceptual) of the exchange is:

Footnotes

  1. Routing Information Protocol (RIP) — Wikipedia - Describes distance vector basics and how RIP uses distance vectors and periodic exchanges. ↩

  2. Bellman–Ford algorithm — Wikipedia - Provides the iterative relaxation principle underlying shortest paths used in distance-vector contexts. ↩

3) How to narrate the iteration using the example diagram

A strong exam-style explanation is to do the following for each round:

  1. State the round: “In Round 1, routers exchange their initial vectors.”

  2. Identify which destinations can improve: Only destinations within one additional hop from known neighbors can become finite.

  3. Compute one or two representative destination updates:
    Example phrasing:

    • “Router XX receives neighbor YY’s estimate for destination dd.”
    • “It computes c(X,Y)+DY(d)c(X,Y)+D_Y(d).”
    • “If that is smaller than its current DX(d)D_X(d), it updates both distance and next hop.”
  4. Repeat until convergence: After enough rounds equal to the network’s effective diameter (in hops), no better routes appear.

Distance vector routing is known to converge when there are no negative cycles (for the classic Bellman–Ford framing). In standard routing contexts with nonnegative link costs, it converges to shortest paths; failures and loops can still cause transient incorrectness. 2

Footnotes

  1. Routing Information Protocol (RIP) — Wikipedia - Describes distance vector basics and how RIP uses distance vectors and periodic exchanges. ↩

  2. Bellman–Ford algorithm — Wikipedia - Provides the iterative relaxation principle underlying shortest paths used in distance-vector contexts. ↩

type="tip" title="Pro Tip: present one router’s tables across rounds" content="To explain the figure clearly, choose one router (say, the one labeled “A”) and show how its row for each destination changes from Round 0 (initial) → Round 1 → Round 2… This makes the neighbor-to-neighbor propagation visible."

type="warning" title="Warning: explain loop behavior (count-to-infinity) in 1–2 sentences" content="If link costs change or routes become inconsistent, distance-vector updates can temporarily form loops, causing the metric to increase gradually ("count-to-infinity"). Mechanisms like split horizon and poison reverse help mitigate this, but transient issues can still happen."

4) Split horizon / poison reverse (often required in “explain DV” questions)

Many curricula require mentioning loop-prevention techniques:

  • Split horizon
  • Poison reverse
  • Loop-free convergence

These techniques aim to prevent a router from telling a neighbor about a route that the neighbor might have used to reach the router in the first place—reducing the likelihood of loops and count-to-infinity behavior.

Footnotes

  1. Split horizon — Wikipedia - Explains split horizon (and related loop prevention concepts) used in distance vector routing to mitigate routing loops. ↩

5) (Optional) Visualize “hop-by-hop” distance propagation

Even without plugging exact numeric costs from the image, you can explain propagation qualitatively:

Each iteration allows routers to learn paths that are longer by one hop, because routers base their computations on neighbors’ current estimates. 2

Footnotes

  1. Routing Information Protocol (RIP) — Wikipedia - Describes distance vector basics and how RIP uses distance vectors and periodic exchanges. ↩

  2. Bellman–Ford algorithm — Wikipedia - Provides the iterative relaxation principle underlying shortest paths used in distance-vector contexts. ↩

Distance propagation intuition (example)

Illustrative: distance to a destination becomes finite as information propagates hop-by-hop.

Common questions when explaining the example

Knowledge Check

Question 1 of 4
Q1Single choice

In distance vector routing, the update at router X for destination d is computed by combining what information?