Use it when a session connects but does not establish, when an address family carries no routes, or to read the per-neighbour message counters.
BGP Messages & Capabilities Reference
1. show ip bgp summary — a number in the last column means Established.
2. Not established → show ip bgp neighbors <ip>: last reset reason and notification counters.
3. Established but no routes for a family → is it listed as advertised and received under capabilities?
4. Keepalive counters rising on both sides?
TCP 179 connects → OPEN exchanged, AS and router ID accepted → capabilities common to both sides in use → KEEPALIVE confirms, Established → UPDATEs exchanged once, then changes → KEEPALIVEs within the hold time
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip bgp summaryVerification & 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 summary
show ip bgp neighbors 192.0.2.2
show ip bgp neighbors 192.0.2.2 | section Message statistics
show tcp brief | include 179
The summary shows total messages received and sent per neighbour, the up time and the number of prefixes received. The neighbour detail shows the negotiated hold time and keepalive interval, the capabilities advertised and received, and under "Message statistics" a count per message type in each direction: Opens, Notifications, Updates, Keepalives, Route Refresh. show tcp brief confirms the TCP connection itself.
Known-good: one Open in each direction, keepalive counters that rise steadily, no new notifications, and update counters that change only when the network does.
Step 2 Failure isolation workflow Narrow the fault
- No TCP connection on port 179. Reachability, an access list, or a wrong neighbour or source address — before any BGP message is sent.
- Opens are counted but the session does not establish. The OPEN was rejected; the notification counter and the log give the reason, usually a wrong AS number.
- The session drops with "hold time expired". Keepalives stopped arriving for the full hold time: a path problem or an overloaded router.
- Established, updates are zero. The session is fine; nothing is being advertised, or the address family is not active.
- A needed capability is shown as advertised but not received. The other side does not support or has not enabled it.
- The notification counter increases repeatedly. The session is being torn down over and over; read the last reset reason.
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.
A TCP connection is only the first step. A feature such as IPv6 or route refresh is used only if both sides listed it in their OPEN — and since capabilities are exchanged only there, changing them needs a session reset.
show ip bgp summary— state, up time and prefixes per neighbour.show ip bgp neighbors <ip>— negotiated timers and capabilities, advertised and received.show ip bgp neighbors <ip> | section Message statistics— Opens, Notifications, Updates, Keepalives.show tcp brief | include 179— the TCP connection itself.
ReferenceWhat it is1 section · depth on demand
Mechanics & mental model
BGP runs over a TCP connection and uses five kinds of message on it: OPEN to start a session, KEEPALIVE to hold it, UPDATE to exchange routes, NOTIFICATION to end it with a reason, and ROUTE-REFRESH to ask for routes again.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
A TCP connection to port 179 is only the first step. Whether a session becomes usable, which address families it carries, and why it ended are all decided by the messages on top. The per-neighbour message counters on a router show directly which of them are flowing.
ReferenceHow it works1 section · depth on demand
How it works
Every message begins with the same 19-byte header: a 16-byte marker (all ones), a 2-byte length and a 1-byte type.
| Type | Message | When | Contents |
|---|---|---|---|
| 1 | OPEN | Once, right after the TCP connection is up | Version, AS number, hold time, router ID, capabilities |
| 2 | UPDATE | Whenever routes change | Withdrawn prefixes, path attributes, announced prefixes |
| 3 | NOTIFICATION | When an error is found or the session is closed deliberately | Error code, subcode, data; the session then ends |
| 4 | KEEPALIVE | Every 60 seconds by default | Nothing — just the header |
| 5 | ROUTE-REFRESH | On request | An address family: "send me all your routes for it again" |
Life of a session.
1. TCP connects to port 179. Either side may initiate.
2. Both send OPEN. Each checks the other's AS number and router ID, and they settle on the lower of the two proposed hold times.
3. Both confirm with a KEEPALIVE. The session is now Established.
4. Each sends its routes in UPDATE messages — once. Afterwards only changes are sent.
5. KEEPALIVEs maintain the session while nothing else is sent. If neither a KEEPALIVE nor an UPDATE arrives within the hold time (180 seconds by default), the session is dropped.
6. On any error, or when an administrator resets the session, a NOTIFICATION is sent and the TCP connection closed. All routes learned over the session are removed.
Capabilities are listed in the OPEN: support for additional address families such as IPv6, for route refresh, for four-byte AS numbers, for graceful restart. A feature is used only if both sides listed it. Since capabilities are exchanged only in the OPEN, changing them requires the session to be reset.
A message is at most 4096 bytes; a large routing table is sent as many UPDATEs.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
BGP messages on the wire
BGP runs over TCP port 179 and uses a small set of message types. RFC 4271 gives every message a 19-byte header: a 16-byte marker set to all ones, a length of 19 to 4096 bytes, and a type. The base types are OPEN (1), UPDATE (2), NOTIFICATION (3) and KEEPALIVE (4). OPEN carries the version (4), the sender's AS, the proposed hold time (zero or at least 3 seconds), the BGP identifier and optional parameters. A KEEPALIVE is just the 19-byte header. A reasonable interval is one third of the hold time, and none are sent if the hold time is zero.
Message types
| Type | Message | Defined in | Purpose |
|---|---|---|---|
| 1 | OPEN | RFC 4271 | Start the session; negotiate hold time and capabilities |
| 2 | UPDATE | RFC 4271 | Announce or withdraw routes |
| 3 | NOTIFICATION | RFC 4271 | Report an error, then close |
| 4 | KEEPALIVE | RFC 4271 | Keep the session up |
| 5 | ROUTE-REFRESH | RFC 2918 | Ask the peer to resend its routes |
Capabilities exchanged in OPEN
| Code | Capability | RFC |
|---|---|---|
| 1 | Multiprotocol (AFI/SAFI) | 4760 |
| 2 | Route refresh | 2918 |
| 64 | Graceful restart | 4724 |
| 65 | 4-byte AS numbers | 6793 |
| 69 | Add-path | 7911 |
R1# show bgp ipv4 unicast neighbors 203.0.113.2 | include BGP state|hold time|Neighbor capabilities|Route refresh|Address family|Graceful|four-octet
BGP state = Established, up for 3d04h
Last read 00:00:12, last write 00:00:21, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Graceful Restart Capability: advertised
R1# show bgp ipv4 unicast neighbors 203.0.113.2 | begin Message statistics
host$ tshark -r bgp.pcap -Y bgp -T fields -e frame.time_relative -e bgp.type | head
Hold time negotiation
Each side proposes a hold time, and the session uses the lower value. With the IOS default of 180 seconds the keepalive interval is 60 seconds. The Graceful Restart Capability: advertised line, without "received", shows a capability that only one side supports. That side's feature won't be used on this session.
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 Messages & Capabilities 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 Messages — Fast Check
TCP → OPEN → Established → UPDATE
1. TCP 179 handshake.
2. OPEN both directions.
3. Compare ASN/hold/capabilities.
4. Any NOTIFICATION?
5. KEEPALIVE flow.
6. UPDATE flow.
7. Then inspect route policy/RIB.