Inter-Domain Routing & BGP

route flapping

A flapping shutter on a windy house bangs open, shut, open, shut — annoying everyone nearby. Route flapping is the network version: a BGP route that repeatedly appears and disappears — advertised, withdrawn, re-advertised, withdrawn again — usually because an unstable link or a flaky router keeps going up and down. Each flip is itself harmless, but the rapid repetition is the problem.

Here is why it hurts. Every time the route changes, BGP must send an update (an advertisement or a withdrawal) to every neighbour, who must re-run their decision process, possibly change their best path, and pass the news on to THEIR neighbours. A single unstable link deep in one network can therefore radiate a storm of updates across large parts of the Internet, burning router CPU everywhere as they churn through recomputations. In the worst case a flap can cascade, destabilising routing far beyond the original fault.

The classic defence is route flap damping: a router watches how often a particular route changes, gives it a rising penalty for each flip, and once the penalty crosses a threshold it suppresses the route — refusing to use or propagate it for a while even if it currently looks up — until it has stayed stable long enough for the penalty to decay. Damping must be tuned carefully, though: set too aggressively, it can keep a genuinely-recovered route suppressed for far too long, so modern guidance is to damp gently or rely on more stable hardware and software instead.

A fibre with a loose connector flickers up and down every few seconds. Each time it comes up, the attached router re-advertises its prefix; each time it drops, it withdraws it. Neighbours see advertise/withdraw/advertise/withdraw and propagate each change outward, spiking CPU on routers far away. Flap damping suppresses the prefix after a few cycles until the fibre is fixed and stays up.

An unstable link's repeated advertise/withdraw cycle can radiate update storms across the Internet; damping suppresses it.

Flapping is a stability problem, not a security attack — but aggressive flap damping is a known footgun: it can keep a fully-recovered route suppressed far longer than the actual outage, hurting reachability.

Also called
flapping路由抖動路由振盪