BGP NOTIFICATION Code & Subcode Reference
Cheat sheet · https://pcornel.dk/topic.php?topic=295
Answer
A BGP NOTIFICATION message is sent just before a peer closes the session and gives the reason as an error code and subcode — for example 2/2 bad peer AS, 4/0 hold timer expired, 6/x cease (admin shutdown, max-prefix). show bgp neighbor shows the last one.
First checks
show ip bgp neighbors <peer> | include Last reset|Notification— last errorshow logging | include BGP-3-NOTIFICATION— logged errors
Verify in this order
error detected → NOTIFICATION (code/subcode) → session closed → logged
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
BGP NOTIFICATION Code & Subcode Reference packet-level operational reference
| Wire boundary | Known-good for BGP NOTIFICATION Code & Subcode Reference | Suspicious signature | Next proof |
|---|---|---|---|
| Message identity | Correct peer/direction/type and coherent lengths | Wrong sender, type, length or packet phase | Packet sequence + peer state |
| Field semantics | Error Code, Error Subcode and optional Data interpreted together with sender direction, previous BGP message, FSM state and reset timestamp match intended protocol state | operators only see Idle/Active after the useful notification is lost, sender direction is confused, code is read without subcode, OPEN errors are blamed on IP reachability despite working TCP, UPDATE errors trigger broad policy removal, or repeated Cease/maximum-prefix behavior is treated as random transport instability | Decode exact fields on both sides |
| State consequence | Packet produces expected protocol/route transition | Wire looks healthy but local state disagrees | FSM/LSDB/BGP table → RIB/FIB |
| Closure | Original workload succeeds for the explained reason | Session/adjacency recovered only transiently | Repeat capture + regression/failover test |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=295