Sub topic 6
Convergence: how networks react to failures
This chapter assumes you can read CIDR prefixes, know what a routing table is, and understand longest-prefix match and the difference between static and dynamic routes from the earlier chapters.
What convergence means
Convergence is the state in which every router in a network has a routing table that matches the current topology. A network is converged when no router has stale information and no further updates are pending.
A network stops being converged when something changes: a link fails, a router reboots, or a new subnet appears. Convergence time is how long the network takes to become consistent again. During that time, packets can be dropped or sent in loops.
Static routes do not react
A static route has no mechanism for noticing a failure beyond the router's own interfaces. Two cases show the problem:
- If the outgoing interface goes down, the router removes the route. Traffic stops, or falls back to another route if one exists.
- If the next hop dies but the local interface stays up, the route stays in the table. The router keeps forwarding packets into a dead path, which is called a black hole.
Recovery from a static route failure therefore depends on a person, a script, or a backup route prepared in advance. Later chapters cover floating static routes.
The four phases of dynamic convergence
Dynamic routing protocols repair the network automatically. Convergence follows the same four phases in every protocol:
- Detect. A router notices that a link or neighbor is gone. A loss of link signal is detected in milliseconds. Silence from a neighbor takes longer, because the router waits for a timer to expire.
- Propagate. The router tells its neighbors about the change.
- Recompute. Each router updates its view and chooses new best paths.
- Install. The new routes replace the old ones in the routing table and the forwarding table.
Where the time goes
Detection is usually the longest phase. A protocol that relies on hello packets must wait until a neighbor has been silent for a full dead interval. OSPF defaults to a 10-second hello and a 40-second dead interval on common link types. RIP sends updates every 30 seconds and marks a route invalid after 180 seconds without one.
You can shorten detection in three ways: tune the protocol timers, use Bidirectional Forwarding Detection (BFD, a lightweight hello protocol that detects failures in well under a second), or rely on fast link-down signaling on the physical interface.
Protocol families converge differently
Distance-vector protocols such as RIP learn routes only from neighbors, so news of a failure travels one hop at a time. Without safeguards, two routers can keep telling each other that the other has a path, and the metric climbs a step at a time. This is the count-to-infinity problem. Split horizon, route poisoning and hold-down timers limit it, at the cost of slower convergence.
Link-state protocols such as OSPF flood the change to every router in the area. Each router then runs the shortest path first (SPF) algorithm on an identical map of the topology. This is usually faster and less prone to loops, but it uses more memory and CPU.
Transient problems
Routers do not all update at the same instant. During convergence you may see:
- Black holes, where a router still sends traffic toward a failed path.
- Micro-loops, where two routers briefly point at each other for a destination.
- Route flapping, where an unstable link keeps triggering new convergence cycles.
Summary of the differences
| Aspect | Static routing | Dynamic routing |
|---|---|---|
| Detects a dead next hop | No, unless the interface goes down | Yes, through hellos, updates or BFD |
| Reroutes automatically | No | Yes |
| Convergence time | Manual or never | Milliseconds to minutes, depending on tuning |
| Control traffic | None | Hellos, updates, floods |
Exercise
A router has a static route to 10.2.0.0/16 through next hop 192.168.1.2. The switch between them fails, but the router's own interface stays up. What happens to the route and to the traffic, and what would a dynamic protocol have done differently?
Show answer
The route stays in the routing table because the interface is still up, so the router keeps sending packets into a black hole. A dynamic protocol would stop hearing hellos from the neighbor, declare it down after the dead interval (or sooner with BFD), withdraw the route, and switch to another path if one exists.