Sub topic 7
Convergence and why it matters
This chapter assumes you know how a routing table and longest-prefix match work, and that you have seen the Bellman-Ford update from the previous chapters. Here you will learn what convergence means, how to measure it, and why a slow or broken convergence hurts traffic.
What convergence means
A network has converged when every router has a routing table that matches the real topology, and no router has any new information to send. Until that point, routers disagree about the network. Some of them may forward packets along paths that no longer exist.
Convergence matters after any change: a link fails, a router reboots, or a cost is edited. The time from the change until all tables are consistent again is the convergence time.
A worked example with distance-vector
Take three routers in a line: A - B - C, each link with cost 1. C also owns the network N. Each router sends its vector to its neighbors once per round.
| Round | A's route to N | B's route to N | C's route to N |
|---|---|---|---|
| 0 | none | none | 0 (connected) |
| 1 | none | 1 via C | 0 |
| 2 | 2 via B | 1 via C | 0 |
After round 2 no table changes any more, so the network has converged. News about N moved one hop per round. This gives a rule of thumb: in a plain distance-vector protocol, good news travels one hop per update interval. With RIP's 30-second timer, a path across 10 routers can take minutes to learn.
Why it matters
While routers disagree, three things can go wrong:
- Black holes. A router sends packets toward a next hop that has no route, so the packets are dropped.
- Routing loops. Two routers each point at the other as the next hop. Packets circle until the TTL (time to live) reaches zero.
- Suboptimal paths. Traffic uses a worse route while the better one is still unknown.
Real-time traffic such as voice and video notices outages of a second or two. A TCP connection usually survives a few seconds of loss but slows down.
What controls convergence time
- Detection time. How long the router takes to notice the failure. A link going down is noticed quickly. A silent neighbor is noticed only when a timer expires, such as RIP's 180-second timeout or OSPF's dead interval (40 seconds by default on broadcast links).
- Propagation time. Distance-vector protocols pass news hop by hop. Link-state protocols flood it to all routers at once.
- Computation time. Link-state routers rerun Dijkstra's algorithm. This is usually quick for networks of normal size.
- Hold-down and damping timers. Deliberate delays that trade speed for stability.
Common errors
- Assuming a protocol is converged because the local table looks right. Check the routers farthest from the change.
- Forgetting that detection time is often the largest part of the delay.
- Tuning timers on one router only. Mismatched timers cause neighbors to drop adjacencies.
Exercise
A RIP network has a path of 6 routers between A and a new network N. Updates go out every 30 seconds, and each router sends its update at an unrelated time. Roughly what is the worst-case time for A to learn N, and why?
Show answer
About 5 hops times 30 seconds, roughly 150 seconds, in the worst case. Good news moves one hop per update interval, and in the worst case each router has just missed its update when the news arrives, so it waits a full interval before passing it on. (The six routers have five links between them, so five relays.)