Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

BGP Messages & Capabilities Reference

Direct answer

BGP runs over TCP port 179 and uses five messages: OPEN starts a session, KEEPALIVE holds it, UPDATE carries routes, NOTIFICATION ends it with a reason, and ROUTE-REFRESH asks for routes again. Optional features are announced as capabilities in the OPEN.

When to use this

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.

First 30 seconds

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?

Operational verification

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
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard
Key commandshow ip bgp summary
Scope / prerequisiteUse it when a session connects but does not establish, when an address family carries no routes, or to read the per-nei…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

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.

Key checks
  • 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.

TypeMessageWhenContents
1OPENOnce, right after the TCP connection is upVersion, AS number, hold time, router ID, capabilities
2UPDATEWhenever routes changeWithdrawn prefixes, path attributes, announced prefixes
3NOTIFICATIONWhen an error is found or the session is closed deliberatelyError code, subcode, data; the session then ends
4KEEPALIVEEvery 60 seconds by defaultNothing — just the header
5ROUTE-REFRESHOn requestAn 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

TypeMessageDefined inPurpose
1OPENRFC 4271Start the session; negotiate hold time and capabilities
2UPDATERFC 4271Announce or withdraw routes
3NOTIFICATIONRFC 4271Report an error, then close
4KEEPALIVERFC 4271Keep the session up
5ROUTE-REFRESHRFC 2918Ask the peer to resend its routes

Capabilities exchanged in OPEN

CodeCapabilityRFC
1Multiprotocol (AFI/SAFI)4760
2Route refresh2918
64Graceful restart4724
654-byte AS numbers6793
69Add-path7911
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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 4271

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%
Technical changelog & impact

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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

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.

Aliases that resolve here
bgp openbgp updatebgp keepalivebgp notificationbgp capabilitiesbgp messages
Embedded quick reference

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.

Confirmation

Confirm action

Continue?