← 🧭 Routing & Congestion Control
Subtopic 1 of 4

6.1Distance vector routing

The idea

In distance vector routing each router tells its neighbours its whole table (destination and distance). A router picks the neighbour that gives the smallest total: the Bellman-Ford update.

Think of it like this: Asking friends for directions: each friend tells you only how far they are from town, and you add the distance to that friend.

Why it exists

GATE compares DV with link state and asks about count-to-infinity.

How it works

  1. Start: each router knows only its direct links.
  2. Each round: cost(x to y) = min over neighbours k of [cost(x, k) + cost(k to y)].
  3. Repeat until no table changes (at most n − 1 rounds).
  4. Problem: when a link fails, two routers can feed each other stale routes and count up to infinity. Split horizon (do not advertise a route back to its source) breaks the two-router loop.

Worked example: A - B - C, B-C fails.

Without split horizon A still tells B "I reach C in 2", B believes it and sets 3, then A sets 4, and so on to infinity. With split horizon A never advertises C to B.

Now play with it

  • →Pick router A and step through rounds to see the table fill in.
  • →Switch split horizon on and off in the second table.

Link costs: A-B = 2, A-C = 5, B-C = 1, B-D = 4, C-D = 1, D-E = 3. Each round, every router recomputes its table from its neighbours' tables.

round 0 of 4
destinationcostnext hop
A0A
B2B
C5C
D∞-
E∞-

After round 0 a router only knows its direct neighbours. After at most n − 1 rounds all tables are final (Bellman-Ford).


Count to infinity. Line A - B - C, all links cost 1. The B-C link fails. Infinity is 16 (as in RIP).

stepB to CA to Cwhat happened
012Before the failure: B-C costs 1, A reaches C through B at cost 2.
1inf2B-C fails. B has no route to C yet.
232B hears A's old advertisement (A to C = 2) and sets B to C = 2 + 1 = 3.
234A hears B's new value (3) and sets A to C = 3 + 1 = 4.
354B hears A's old advertisement (A to C = 4) and sets B to C = 4 + 1 = 5.
356A hears B's new value (5) and sets A to C = 5 + 1 = 6.
476B hears A's old advertisement (A to C = 6) and sets B to C = 6 + 1 = 7.
478A hears B's new value (7) and sets A to C = 7 + 1 = 8.
598B hears A's old advertisement (A to C = 8) and sets B to C = 8 + 1 = 9.
5910A hears B's new value (9) and sets A to C = 9 + 1 = 10.
61110B hears A's old advertisement (A to C = 10) and sets B to C = 10 + 1 = 11.
61112A hears B's new value (11) and sets A to C = 11 + 1 = 12.
71312B hears A's old advertisement (A to C = 12) and sets B to C = 12 + 1 = 13.
71314A hears B's new value (13) and sets A to C = 13 + 1 = 14.
81514B hears A's old advertisement (A to C = 14) and sets B to C = 14 + 1 = 15.
81516 (∞)A hears B's new value (15) and sets A to C = 15 + 1 = 16.

Check yourself

Distance vector routing uses

Remember: DV: Bellman-Ford, neighbours only, slow convergence, count to infinity, split horizon helps.
Exam notes (the dense version)

Each router keeps a table of (destination, cost, next hop) and periodically sends its whole table to its neighbours. On receiving a neighbour's vector it applies Bellman-Ford: cost(via k) = cost(to k) + k's cost to destination. It needs only local knowledge but converges slowly ("bad news travels slowly"): after a link failure two routers can keep increasing a cost until infinity (count to infinity). Fixes: split horizon (do not advertise a route back to where you learned it), poison reverse, and a small infinity (RIP uses 16).

Previous year questions: Routing & Congestion Control (3)

PYQs are grouped by topic, so this is the full set for Routing & Congestion Control; try the ones that match this subtopic. Open all 3 on the topic page.