A BGP session drops at 02:14 and recovers 47 seconds later. It drops again at 03:02. Then 03:41. Each time, an alert fires, an engineer opens a terminal, sees Established, and closes the ticket without a root cause. The session is the last component to notice a failure and the first one to tell you about it — and that inversion is why BGP flap investigation burns so much time for so little yield. The fix is not better BGP debugging. It is refusing to debug at the BGP layer at all.
The session state is the last thing to change, not the first
The protocol defaults stack against you. A BGP speaker sends keepalives every 30 seconds and declares its peer dead only when a 90-second hold timer expires. Minimum Route Advertisement Interval commonly defaults to another 30 seconds. Stack those and the gap between the physical event and the withdrawal reaching the rest of your fabric can exceed two minutes. Your alert is not the beginning of the incident. It is the epilogue.
That has a blunt consequence for tooling: any RCA pipeline that starts at the %BGP-5-ADJCHANGE syslog line has already discarded the most useful evidence, because the window in which the actual fault was observable closed before the first alert rendered.
Five root cause families, and how to tell them apart in one pass
- Layer 1 and transport — degrading optics, CRC errors, contaminated fiber, amplifier drift on a DWDM span, a transceiver that fails above a rack temperature threshold.
- Control-plane resource exhaustion — CPU saturation, TCAM exhaustion, RIB/FIB scale past the platform's headroom.
- Configuration and change — route policy edits, max-prefix limits, ACL changes, unannounced maintenance.
- MTU and PMTUD blackholes — the session establishes cleanly, then dies the first time it carries a full-size update.
- Remote peer failure — their BGP process, their import filter, their blackhole routing, their change window.
Four of those five have nothing to do with BGP as a protocol. That ratio is the entire argument for correlating outward before you correlate inward.
Read the NOTIFICATION code before you read anything else
RFC 4271 defines the error codes, and they collapse the search space fast.
- Error code 4, Hold Timer Expired — the peer stopped hearing keepalives. Either transport broke or the remote control plane could not schedule the timer.
- Error code 6 Cease, subcode 1, Maximum Prefixes Reached — the peer's configured safeguard fired and shut you down deliberately.
- Error code 6 Cease, subcode 2, Administrative Shutdown — a human or a maintenance script issued a shutdown.
- Error code 2, Open Message Error — capability mismatch, usually an asymmetric config change across the two ends.
- Error code 5, FSM Error — a state machine violation, more often a symptom of one of the above than a cause in itself.
Worked example: three flaps in an hour, all code 4, the interface never drops, optical levels nominal, and the peer's IGP adjacency is unchanged. That combination points at the remote control plane. The interface is healthy, so packets are arriving, but keepalives are not being scheduled. You have eliminated layer 1 without leaving your chair.
Join every flap to a counter delta in a ±5-minute window
The classification only works if you bind each event to evidence collected in the same window. At minimum:
- Interface counters: CRC, input errors, runts, carrier transitions
- Optical telemetry: receive power in dBm, transmit bias current, module temperature
- Control plane: 1-minute and 5-minute CPU, memory, per-process scheduling for the BGP and RIB tasks
- Protocol state: BFD session state, IGP adjacency transitions
- Change surface: last commit timestamp and diff
The ranking rule matters more than the collection. An anomaly is a candidate root cause if its onset precedes the flap and its recovery tracks the flap. Precedence alone is not enough. A CPU spike that begins 90 seconds after the session drops is reconvergence, not cause — and mistaking consequence for cause is the single most common failure mode in manual BGP RCA.
Correlate on onset ordering, not on presence. During a flap, everything looks anomalous.
Flap rate tells you which instrument to reach for
The frequency itself is diagnostic, and it splits into three regimes.
- One flap per week — slow degradation. Pull 7-day trend lines on optical receive power, module temperature, and hardware counters. You are looking for drift, not events.
- One flap per hour — oscillation. Look at dampening interaction, MRAI, policy loops, or a route reflector cluster re-advertising the same prefix.
- One flap per minute — hard failure or a genuinely flapping physical layer. Stop analyzing and start replacing.
Then do the dampening arithmetic, because it distorts everything above. Default penalties are 1000 per flap, half-life 15 minutes, suppress threshold 2000, reuse threshold 750, maximum suppress 60 minutes. Two flaps inside a 15-minute window is enough to suppress a route. If dampening is enabled, the flap count in your syslog is systematically lower than the flap count on the wire — the session is not dropping less, it is only being reported less. Any RCA that trusts raw log counts will underestimate flapping sessions specifically, which are the ones that need attention most.
Where this is heading
Today the question is "why did this session drop?" Tomorrow it is "which session is about to drop, and why?" An optical receive level that has drifted 1.5 dB over nine days. A CRC counter that increments four times a day instead of never. A control-plane CPU baseline that crept from 22% to 41% after a policy push and never came back down. Every one of those is observable weeks before the first flap.
The teams that get there first stop treating BGP flap RCA as a debugging skill and start treating it as a data join that happens to have a BGP table in it. The session state is one column. The root cause lives in the others, and it is written down before anyone gets paged.

