Octet

BGP is slow to converge. What makes it slow, and how do you speed it up?

Show the answer

Say this first

Four things. Detecting the failure (a 180 second hold timer). Recomputing, including path hunting through alternatives that are also failing. Propagating (the advertisement interval, 30 seconds for eBGP on Cisco, plus the time to send many prefixes). And reprogramming the forwarding table prefix by prefix. Fixes map onto each: BFD and fast external fallover for detection, next hop tracking so IGP changes trigger BGP at once, add-path or best-external so backup paths are already known, and BGP PIC so the FIB switches all affected prefixes to a precomputed backup next hop in one step.

Go deeper

Detection

  • bgp fast-external-fallover (on by default in IOS) for directly connected eBGP.
  • BFD with neighbor x fall-over bfd for everything else.

Reacting to IGP changes

Next hop tracking watches the routes to BGP next hops and recalculates when they change, instead of waiting for a periodic scan. On IOS it is on by default, with a short trigger delay (5 seconds).

Knowing the backup in advance

A route reflector advertises one best path, so after a failure its clients wait for the RR to compute and send a new one. Add-path sends extra paths; best-external makes a router advertise its own external path even when an internal one is best.

Programming the FIB

Without PIC, a router with 900,000 prefixes behind a failed next hop rewrites 900,000 entries. With BGP PIC (prefix independent convergence), prefixes share next hop objects with a precomputed backup, so one change moves them all.

Planned work

Graceful shutdown: before maintenance, tag routes with GRACEFUL_SHUTDOWN (65535:0) or lower their local preference and wait for traffic to move, then shut the session. Graceful restart and NSR keep forwarding while a control plane restarts.

Traps

  • Focusing only on timers. Big tables converge slowly because of the FIB, which is why PIC exists.
How did you do?Book 4.1 Global Internet