Distance-Vector Routing: How Routers Learn the Way
Distance-vector routing lets a router learn where to send traffic by listening to neighboring routers. Each neighbor reports destinations it can reach and the cost of getting there, giving the router enough information to choose a next step.
A router forwards packets, the small units that carry network data, between networks. Its routing table records destinations and where traffic should go next.
In this routing approach, “distance” means a route's cost, called its metric. The direction is the next hop: the neighboring router that receives the packet next, as Cisco's routing overview explains.
How Routers Learn the Way on Their Own
Add your cost to your neighbor's estimate
Suppose Router A wants a route to a particular destination network. Its neighbors, B and C, both advertise a route, meaning they send A information about reaching that destination.
For this simplified example, A adds the cost of reaching each neighbor to that neighbor's reported cost:
| Possible next hop | Cost from A to neighbor | Neighbor's reported cost | Total cost from A |
|---|---|---|---|
| B | 1 | 2 | 3 |
| C | 1 | 5 | 6 |
A chooses B because the total cost is lower. It doesn't need a description of every connection beyond B to make that choice.
The numbers are example costs, not miles or seconds. When other routers exchange their own information, knowledge of reachable destinations spreads through the network.
Fewer hops don't always mean faster delivery
RIP, the Routing Information Protocol, is a familiar distance-vector protocol, a set of rules for exchanging routing information. It normally uses hop count, measuring steps through routers, to compare routes.
RIP's usable metrics run from 1 through 15; 16 means unreachable. Juniper's RIP overview explains how this limit constrains the networks RIP can support.
A route through fewer routers can still have a slow or crowded connection. Hop count alone doesn't measure how quickly your download will arrive.
Other distance-vector protocols use different metrics. EIGRP, the Enhanced Interior Gateway Routing Protocol, normally combines bandwidth and delay values: the link's configured carrying capacity and a time cost, rather than just a count of routers.
The EIGRP specification describes that combined metric and its own route-selection machinery. Distance-vector routing is a family of approaches, not another name for RIP's particular rules.
- Get five gigabit ports and a fast ARM processor for the price of a basic home router.
- Practice real routing at your desk on gear that network pros also deploy.
- Tuck it beside your modem: it takes up almost no room.
Old information can send traffic in circles
Suppose A reaches a destination through B, but B's onward connection fails. If B mistakenly treats A's old advertisement as a separate route, B can send traffic to A while A sends it straight back.
That's a routing loop. In basic distance-vector routing, mistaken updates can also make a failed route's cost rise repeatedly before routers finally declare it unreachable, a problem called counting to infinity.
RIP includes safeguards described in its version 2 specification. Split horizon leaves a learned route out of updates sent back toward its source; poison reverse instead advertises that route as unreachable in those updates.
These checks address the two-router mistake, but poisoned reverse doesn't prevent every loop involving three or more routers. Change-triggered updates help spread revised information sooner.
The route needs time to settle
Convergence is the process of routers settling on routing information that reflects the changed network. While updates are spreading, different routers can temporarily disagree about where traffic should go.
Link-state routing takes a different approach: routers share information about connections and calculate routes from a broader map. It still uses costs; the distinction isn't simply that one approach counts hops and the other measures speed.
When a route looks surprising, check the protocol, its metric and the neighbor supplying the route.
RIP: Routers Count Hops, Not Seconds

Split Horizon: Why Routers Don’t Echo Every Route

Poison Reverse: How Routers Reject a False Backup Route

QUOTE:
"Amateurs hack systems, professionals hack people."
