4.3.15 · D5Computer Networks

Question bank — Distance vector routing — RIP, Bellman-Ford, count-to-infinity

1,947 words9 min readBack to topic

The three topologies these traps keep returning to are drawn once below — refer back to them as you answer.

Figure — Distance vector routing — RIP, Bellman-Ford, count-to-infinity

True or false — justify

Each line is a claim. Decide True or False, and — this is the point — say why.

TF1. A router running distance vector routing knows the full network topology.
False. It only knows the direct-link cost to its neighbours plus whatever estimates those neighbours advertise; it never sees the whole map — that is link-state's job.
TF2. In DV, a router sends its distance vector to every other router in the network.
False. It sends its vector to directly connected neighbours in only; information ripples outward one hop per exchange, it is not flooded everywhere.
TF3. The Bellman-Ford update needs node to compute each itself.
False. Node does not compute its neighbours' costs; each neighbour tells its current estimate inside the advertised vector. That messaging is exactly the "distributed" part.
TF4. RIP measures link cost by bandwidth.
False. RIP's metric is hop count — every link costs exactly 1, so regardless of speed. That simplicity is deliberate: no bandwidth probing is needed.
TF5. In RIP a route with cost 15 is treated as unreachable.
False. 15 is the maximum valid cost; 16 is defined as (unreachable). A path of 15 hops is fine.
TF6. Split horizon completely eliminates count-to-infinity.
False. It only kills the two-node loop (A↔B). In a loop of three or more routers, stale bad news can still travel the long way around, so RIP still needs the 16-cap and triggered updates.
TF7. Good news and bad news both propagate at the same speed in DV.
False. Good news (a shorter route) is adopted the instant one advertisement arrives, because the immediately picks the smaller number. Bad news (a lost route) is different: a router that lost its path can still see a neighbour's stale small estimate and adopt it, so instead of jumping to the estimate only crawls up one link-cost per exchange — "good news travels fast, bad news travels slowly."
TF8. Bellman-Ford and Dijkstra can be swapped freely for routing.
False. Dijkstra needs the whole graph and non-negative weights (link-state); Bellman-Ford works from local neighbour info and converges asynchronously — which is exactly why only DV suffers count-to-infinity.
TF9. RIP runs directly over IP with its own transport reliability.
False. RIP is an application-layer protocol running over UDP port 520 — no reliability; a lost update is simply corrected by the next 30-second broadcast.
TF10. Because links are physical wires, always equals in every DV network.
False. Costs can be asymmetric (directed): the direction may be configured cheaper than (see figure, red arrows). DV handles this fine — each direction is a separate advertised number — but asymmetry can lengthen convergence and change which way a loop forms.

Spot the error

Each statement contains one flaw. Name it and correct it.

SE1. "After a link breaks, node correctly reroutes to via because advertised cost 2."
The error: 's cost-2 route to went through itself. Believing it creates the loop ; the "2" is a stale , not a real alternative path.
SE2. "The Bellman-Ford equation minimises over all destinations."
It minimises over all neighbours for a fixed destination , not over destinations. Each destination gets its own independent minimisation.
SE3. "Poison reverse silently drops the route toward the neighbour it was learned from."
Silent dropping is plain split horizon. Poison reverse actively advertises that route back as cost 16 (), removing the ambiguity of a missing entry.
SE4. "With nodes, DV needs exchanges to converge in the worst case."
It needs at most exchanges — after exchanges all nodes within hops of a destination know the truth, and the longest loop-free path has edges.
SE5. "In the update until hears from a neighbour."
The base case is (zero cost to reach yourself). Only unknown destinations start at .
SE6. "Split horizon is applied per-router: hides all its routes from ."
It is applied per-route: hides from only the routes it learned via . Routes learned elsewhere are still advertised to normally.

Why questions

WQ1. Why does DV share with neighbours only, never with distant routers directly?
A router can physically measure only its direct link costs ; everything farther must be learned second-hand. So facts must ripple, one hop per exchange, from source outward.
WQ2. Why is the Bellman-Ford update guaranteed to find the true shortest path?
By the Principle of Optimality, which says: if the shortest route from to passes through , then the portion from to must itself be 's own shortest route to — otherwise you could swap in a cheaper tail and beat your supposed shortest path (a contradiction). That is precisely why the update may safely reuse the neighbour's estimate instead of re-deriving the whole tail.
WQ3. Why does RIP define 16 to mean infinity instead of allowing unlimited costs?
Without a ceiling the count-to-infinity loop increments forever. Capping at 16 bounds the worst-case looping to ~16 steps — a deliberate band-aid, at the cost of limiting network diameter to 15 hops.
WQ4. Why does count-to-infinity increment slowly, step by step, instead of jumping to at once?
Each router only nudges its estimate up by one link cost per exchange as it "trusts" a neighbour's slightly-too-high number. No single router ever sees the whole loop, so nobody can jump straight to .
WQ5. Why is DV called "distributed asynchronous Bellman-Ford"?
The same equation is solved, but no central node runs it — each router computes its own whenever a neighbour's advertisement arrives, on its own schedule, not in lockstep.
WQ6. Why does RIP tolerate lost updates despite using unreliable UDP?
Because the full vector is rebroadcast every 30 seconds; a dropped packet is simply overwritten by the next periodic update, so reliability is unnecessary.
WQ7. Why does the route timeout (180 s) equal six update periods rather than one?
A single missed 30-second update could be mere packet loss. Waiting six periods avoids declaring a live route dead over one unlucky drop, while still detecting genuinely failed neighbours.

Edge cases

EC1. What is when has never heard of ?
It is (in RIP, encoded as 16). The minimisation has no finite candidate yet, so the estimate stays at the "unknown/unreachable" sentinel.
EC2. What does the update give for , the cost to reach yourself?
Exactly — the fixed base case. You are already there, so no path cost applies.
EC3. In A—B—C, if the B–C link cost were instead of , could count-to-infinity still occur if the link breaks?
Yes. The bug is triggered by the link failing (cost jumping to ), not by its original value. A stale advertisement bounced back still climbs step by step.
EC4. If a network has exactly 2 routers, can count-to-infinity happen with split horizon on?
No. Split horizon perfectly stops the two-node loop, and two routers cannot form a longer loop — so the two-node case is fully cured.
EC5. What happens in a three-router triangle under split horizon when one link dies?
Bad news can still circulate the long way around the triangle, so count-to-infinity can still occur. Only the 16-cap plus triggered updates/hold-down bound it.
EC6. If two neighbours advertise the same cost to a destination, which does pick?
The ties; may pick either (implementation-defined, often first-seen or lowest next-hop). Correctness of the cost is unaffected — only the chosen next-hop differs.
EC7. What is the effect of a negative link cost on Bellman-Ford routing?
Bellman-Ford's math permits negatives, but a negative cycle makes costs decrease without bound, so no shortest path exists. Real routing metrics (RIP hop counts) are kept non-negative to avoid this.
EC8. When a better (shorter) route appears, how many exchanges before all affected routers adopt it?
It spreads at one hop per exchange, so a node hops away adopts it after exchanges — this is the "good news travels fast" direction, monotonically decreasing costs.
EC9. If the link costs 1 but costs 5 (asymmetric), does DV still converge?
Yes — DV treats each direction as its own advertised number, so and each converge to their own true costs. But the asymmetry can make one direction's loop count-to-infinity through more steps than the other, and it can change which route each router prefers, so the two directions need not use the same physical path.

Recall Quick self-test

Root cause of count-to-infinity in one phrase? ::: A router advertises a route back to the very neighbour it learned that route from. Difference between split horizon and poison reverse in one phrase? ::: Split horizon stays silent about such routes; poison reverse actively advertises them as cost 16. Why can't Dijkstra-based OSPF count to infinity? ::: It uses global topology, so no router is ever fooled by a stale second-hand estimate that loops back through itself.