The idea

A router does not need a full map to learn a direction. In distance vector (DV), neighbors exchange information about destinations and their costs. A router adds the cost of reaching a neighbor to the neighbor’s advertised cost, then chooses the best available next hop. The vector is a list of destination–cost pairs, not a physical map.

Think of asking neighboring towns how far they are from a destination. You add your distance to each neighbor’s answer. This is useful only if the reports and their underlying routes are valid; a neighbor may unknowingly be relying on you.

A worked trace

Assume undirected links A—B cost 1 and B—C cost 2, and C has destination network N at cost 0. Initially C knows N. C advertises cost 0 to B. B calculates 2 + 0 = 2 and uses C. B advertises cost 2 to A. A calculates 1 + 2 = 3 and uses B. With another neighbor, A compares the totals and selects the lower one. Updates may arrive at different times, so the network does not change in one step.

In general, cost through neighbor V is cost to V + V’s advertised cost to the destination. This is the core Bellman–Ford idea. Timers and update behavior depend on the particular protocol. Triggered updates send changes promptly instead of waiting only for a periodic advertisement, but do not make propagation instantaneous.

Count to infinity

Suppose A—B—C each costs 1 and A directly reaches N. After A loses N, B can temporarily advertise a stale route learned through A. If A believes B has an independent route, A may send to B while B sends to A. Each new report may increase the claimed cost, slowly counting upward until the protocol’s infinity threshold is reached. Packets can loop during this transient. A finite infinity bounds the count but also limits the range of representable costs.

Reducing the problem

  • Split horizon: do not advertise a route back out the interface from which it was learned.
  • Poisoned reverse: advertise that route back on that interface with an unreachable metric. It explicitly warns that neighbor.
  • Route poisoning: advertise a failed route as unreachable to inform neighbors; it is related to, but distinct from, poisoned reverse.
  • Hold-down: temporarily restrict acceptance of some updates after a route worsens to reduce acceptance of stale information. The precise rules and tradeoff between stability and recovery time depend on the protocol.

Split horizon can prevent a simple two-router feedback loop but cannot eliminate every loop in a larger mesh. Fast triggered updates also do not guarantee instant consistency.

Extensions and tradeoffs

DV can be conceptually simple and avoids distributing a complete topology map, but stale neighbor information can slow recovery and cause loops. DUAL, used in EIGRP, adds feasibility conditions and coordinated queries when needed to find loop-free alternatives; it is more than the basic distance-vector rule. A path vector includes path information, allowing a receiver to reject a route containing itself. BGP uses AS paths and policy; it is not merely a shortest-hop DV protocol.

Exact message formats, timers and guarantees belong to individual protocols. The simplified example explains the family of ideas rather than specifying every implementation.

Lecture 04 - Forwarding and Routing Algorithms · Link State Routing and Dijkstra · Routing Forwarding and Convergence