Pcornel
Networking · Network & Protocols › BGP Protocol Reference

BGP NOTIFICATION Code & Subcode Reference

Cheat sheet · https://pcornel.dk/topic.php?topic=295

Back to the Topic

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 error
  • show 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 boundaryKnown-good for BGP NOTIFICATION Code & Subcode ReferenceSuspicious signatureNext proof
Message identityCorrect peer/direction/type and coherent lengthsWrong sender, type, length or packet phasePacket sequence + peer state
Field semanticsError Code, Error Subcode and optional Data interpreted together with sender direction, previous BGP message, FSM state and reset timestamp match intended protocol stateoperators 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 instabilityDecode exact fields on both sides
State consequencePacket produces expected protocol/route transitionWire looks healthy but local state disagreesFSM/LSDB/BGP table → RIB/FIB
ClosureOriginal workload succeeds for the explained reasonSession/adjacency recovered only transientlyRepeat 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

Confirmation

Confirm action

Continue?