Use it whenever a BGP session has dropped or will not come up: the code tells whether the cause is a configuration mismatch, a malformed route, silence on the path, or a deliberate action.
BGP Notification Error Reference
When a BGP router ends a session it first sends a NOTIFICATION with an error code and subcode saying why. Both routers log it, and the last one is kept per neighbour.
1. show logging | include BGP-3-NOTIFICATION — direction, code/subcode.
2. 2/2 → remote-as wrong on one side.
3. 4/0 → keepalives lost: path, MTU or CPU.
4. 6/1 → prefix limit exceeded; 6/2, 6/3 → shut down or removed on the other side.
5. No notification at all → the TCP connection was lost.
session drops → NOTIFICATION logged with direction, code and subcode → code names the phase (open, update, hold timer, cease) → cause corrected on the side it points to → session re-established and stable
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip bgp neighbors 192.0.2.2 | include Last reset|reset reason|NotifVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational verification Verify boundary
show ip bgp neighbors 192.0.2.2 | include Last reset|reset reason|Notif
show logging | include BGP-3-NOTIFICATION|BGP-5-ADJCHANGE|BGP_SESSION
show ip bgp summary
The neighbour output states how long ago the last reset was and why, and counts notifications sent and received. The log holds the full lines with code, subcode and data bytes, and the adjacency changes around them. The summary shows the current state and how long the session has been up or down.
Record the notification before doing anything else. Clearing the session to "see if it helps" produces a new reset reason and overwrites the one that mattered.
Known-good: the session is Established, the last reset has a known cause, and the notification counters are not rising.
Step 2 Failure isolation workflow Narrow the fault
- The session never comes up; 2/2 in the log. Correct
remote-as— the data bytes show the AS number the neighbour actually presented. - It comes up and drops with 4/0 at intervals. Look for packet loss or an MTU problem on the path, or high CPU; the session may also depend on a route it learns over itself.
- It drops with 6/1 and stays down. The prefix limit was exceeded; find out why the neighbour sent more, then clear the session.
- 6/2 or 6/3 received. Nothing is wrong locally; the other side shut down or removed the neighbour.
- 3/x keeps recurring after each re-establishment. One specific route triggers it; identify it with the sender.
- The last reset reads "User reset" or "Admin. reset". Someone cleared the session; the original cause was overwritten.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
"Sent to" means this router found the problem; "received from" means the neighbour did. Code 2 is a mismatch at session start, 3 a bad UPDATE, 4 hold timer expired, 6 a deliberate close. Read it before clearing the session — a clear overwrites the reason.
show ip bgp neighbors <ip> | include Last reset|Notif— reason, time and counters.show logging | include BGP-3-NOTIFICATION|BGP-5-ADJCHANGE— the full lines with code, subcode and data.show ip bgp summary— current state and time in it.
ReferenceWhat it is1 section · depth on demand
Mechanics & mental model
When a BGP router ends a session, it first sends a NOTIFICATION message that says why. The reason is given as two numbers — an error code and a subcode — and both routers record it. This topic is a guide to what each one means and what to check next.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
A dropped BGP session leaves little else behind. The notification tells which side ended it and in which phase the problem lay — at session start, while processing routes, through silence, or on purpose — and each of those calls for a different next step.
ReferenceHow it works1 section · depth on demand
How it works
Cisco IOS logs each notification with its direction and the two numbers:
%BGP-3-NOTIFICATION: received from neighbor 192.0.2.2 6/2 (Administrative Shutdown) 0 bytes
"Sent to" means this router found the problem; "received from" means the neighbour did, and the cause is to be looked for there.
| Code/subcode | Meaning | Where to look |
|---|---|---|
| 1/x | Message header error | Corrupted messages; rare — a software or path problem |
| 2/2 | Bad peer AS | The remote-as configured on one side does not match the other's AS |
| 2/3 | Bad BGP identifier | Both routers use the same router ID |
| 2/6 | Unacceptable hold time | One side's timers are below what the other accepts |
| 2/7 | Unsupported capability | A required capability is not supported by the neighbour |
| 3/x | UPDATE message error | A malformed route advertisement; note the subcode and involve the sender |
| 4/0 | Hold timer expired | No keepalives arrived: link, path, CPU or MTU problem between the routers |
| 5/x | State machine error | An unexpected message for the session's state; usually software |
| 6/1 | Maximum number of prefixes reached | The neighbour sent more prefixes than the configured limit |
| 6/2 | Administrative shutdown | The neighbour was shut down on the sending side |
| 6/3 | Peer de-configured | The neighbour statement was removed on the sending side |
| 6/4 | Administrative reset | Someone cleared the session on the sending side |
| 6/6 | Other configuration change | A change on the sending side required a reset |
The codes fall into four situations:
- Code 2 — the two configurations disagree. Found at session start, so the session never comes up.
- Code 3 — a route advertisement could not be processed. The session was up and may come up again, only to fail on the same route.
- Code 4 — silence. Not a BGP problem as such; something stopped the packets.
- Code 6 — deliberate. A person or a configured limit ended the session.
A session that drops with no notification at all lost its TCP connection, typically because an interface or the route to the neighbour went down.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Reading BGP NOTIFICATION errors
A NOTIFICATION is BGP's last word before it closes a session, and its codes say who decided to end it and why. RFC 4271 defines six error codes:
1. Message Header Error
2. OPEN Message Error
3. UPDATE Message Error
4. Hold Timer Expired
5. Finite State Machine Error
6. Cease
Each has subcodes, for example Bad Peer AS (2/2), Unacceptable Hold Time (2/6) or Malformed AS_PATH (3/11). In the log, the direction of the message matters as much as the code. "Sent to" means the local router closed the session. "Received from" means the neighbour did.
Common messages and their usual causes
| Code/subcode | Meaning | Usual cause |
|---|---|---|
| 2/2 Bad Peer AS | The OPEN carries an unexpected AS | remote-as typo, or local-as or 4-byte AS mismatch |
| 2/3 Bad BGP Identifier | Invalid or duplicate router ID | Two routers with the same router ID |
| 2/6 Unacceptable Hold Time | Proposed hold time is 1 or 2 s | A misconfigured timer |
| 3/x UPDATE errors | A malformed or unexpected attribute | A software bug, or an unusual attribute from far away |
| 4/0 Hold Timer Expired | No KEEPALIVE or UPDATE within the hold time | Link problems, CPU starvation, MTU black holes |
| 6/x Cease | Deliberate closure | Shutdown, reset, max-prefix, configuration change |
Hold timer expiry: the most common case
| Check | Why |
|---|---|
| Interface errors and drops on the path | KEEPALIVEs lost |
| CPU and CoPP drops on both routers | BGP packets delayed or dropped |
| TCP MSS and MTU | Large UPDATEs lost after the session came up |
| The pattern of the drop | Up for exactly the hold time after each reset points to an MTU problem |
%BGP-5-NBR_RESET: Neighbor 203.0.113.2 reset (BGP Notification received)
%BGP-3-NOTIFICATION: received from neighbor 203.0.113.2 6/2 (Administrative Shutdown) 0 bytes
%BGP-3-NOTIFICATION: sent to neighbor 198.51.100.9 4/0 (hold time expired) 0 bytes
R1# show bgp ipv4 unicast neighbors 198.51.100.9 | include Last reset|Notification|hold time
Last reset 00:04:12, due to BGP Notification sent, hold time expired
R1# show ip bgp neighbors 198.51.100.9 | include MSS|Datagrams
R1# show policy-map control-plane | include bgp|exceeded
Decision path
| Log says | Look at |
|---|---|
| Notification sent | The local configuration or local conditions |
| Notification received | The neighbour's configuration; ask the peer operator |
| No notification, just "peer closed the session" | TCP-level failures: resets, firewalls, interface down |
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → BGP Notification Error Reference. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4271.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Operational notes
Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.
BGP NOTIFICATION — Fast Check
Preserve the rejecting peer evidence
1. Capture type 3.
2. Who sent it?
3. Record code/subcode.
4. Inspect immediately preceding OPEN/UPDATE.
5. Compare neighbor last-reset reason.
6. Fix rejected boundary.
7. Prove stable Established.