Use it when a BGP neighbour does not reach Established, keeps resetting, or is up but exchanges no prefixes.
Neighbor Relationship
A BGP neighbor relationship forms in steps: IP reachability to the peer, a TCP session on port 179, then OPEN messages with matching AS numbers and parameters, ending in Established. show bgp summary shows the state or the number of received prefixes.
1. show ip bgp summary — Established peers show a prefix count.
2. Check TCP 179 reachability from the configured update-source.
3. show ip bgp neighbors <ip> — hold time, last reset reason, capabilities.
route to the peer → TCP 179 between the configured addresses → OPEN exchange (AS, hold time, capabilities, authentication) → Established → address family activated → prefixes exchanged
Inspect the exact prefix in the BGP table and relevant policy.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip bgp summaryBGP neighbor: session → prefix → RIB → forwarding
A BGP neighbor session exchanges routing information over TCP port 179. Established proves the BGP control session is up, not that a particular address family has accepted a prefix, chosen a best path, installed it in the RIB, programmed forwarding, or delivered traffic.
Read State/PfxRcd correctly: a state name such as Active means the session has not reached Established. A number, including 0, means the session is Established for the displayed context, but the count does not prove that the intended prefix is present. Confirm the address family, VRF and target prefix before interpreting the result. IPv6 and VPN address families require their corresponding commands. These command examples use IPv4 unicast in the default routing table; use VRF-specific syntax for another routing context.
All six BGP session states
| FSM state | What it means | Next check / proof limit |
|---|---|---|
| Idle | The BGP FSM is waiting for a start/retry event. | Check neighbor configuration, shutdown state and recent reset reason; Idle alone does not isolate a fault. |
| Connect | Attempting to complete the TCP connection. | Confirm peer transport addresses, bidirectional reachability, TCP/179 and ACL/firewall policy. |
| Active | Retrying TCP connection establishment after an unsuccessful attempt. | Inspect TCP reachability and source/update-source, TTL or multihop design. Active is not an established session. |
| OpenSent | TCP is up; the local speaker has sent OPEN and awaits the peer OPEN. | Compare peer ASN, BGP identifier, versions/capabilities and notifications. |
| OpenConfirm | OPEN negotiation succeeded; waiting for KEEPALIVE. | Read negotiation events, timers and notifications rather than assuming routes are accepted. |
| Established | BGP control session is operational; UPDATE messages may be exchanged. | Inspect the correct address family and exact prefix, inbound policy, next hop and RIB/CEF separately. |
Read-only verification · exact peer and prefix
| Cisco command | Shows | Does not prove |
|---|---|---|
show ip bgp summary | Neighbor state and State/PfxRcd for the IPv4 unicast context. | A numeric 0 can mean Established with no accepted prefixes; it is not a session failure. |
show ip bgp neighbors <peer-ip> | TCP/BGP endpoint, capabilities, resets and negotiated family state. | Established does not show that the desired prefix was accepted. |
show ip bgp neighbors <peer-ip> routes | Routes from this peer present after inbound policy for the supported CLI/context. | Does not prove selection, RIB installation or delivery. |
show ip bgp <network> <mask> | BGP paths, validity, best-path indication and next hop for a specific IPv4 prefix. | Best in BGP is not proof of successful RIB installation or forwarding. |
show ip bgp rib-failure | BGP-selected routes that were not installed in the IP routing table. | An empty list does not prove reachability or hardware programming. |
show ip route <destination> | Installed route for this destination and routing source. | A route does not prove resolved adjacency, policy or return path. |
show ip cef <prefix> detail | CEF forwarding entry and resolved next-hop information where supported. | CEF software output alone does not prove hardware forwarding or application delivery. |
Policy and path selection: an Established session is only the first boundary. Check address-family activation, prefix filters/route maps, next-hop reachability and best-path attributes. For Cisco IOS/IOS XE, Weight is local to the router; LOCAL_PREF is higher-is-better within an AS; shorter AS_PATH is normally preferred later in the decision; MED is ordinarily compared between paths from the same neighboring AS. Do not use the attribute list as a universal cross-platform algorithm; actual configuration and release can change comparisons.
Illustrative output — not captured Evidence
R1# show ip bgp summary
Neighbor V AS MsgRcvd MsgSent Up/Down State/PfxRcd
192.0.2.2 4 65002 25 27 00:12:30 0
198.51.100.2 4 65003 0 0 never Active
192.0.2.2: Established, with a displayed prefix count of zero — examine address-family activation, outbound advertisements and inbound policy before assuming a transport failure. 198.51.100.2: Active — begin with transport, addressing and peer configuration. Neither observation proves a working data path. These are synthetic examples, not a verified device capture.
Official sources
- RFC 4271 · BGP-4 finite state machine, section 8
- Cisco IOS · BGP show-command reference
- Cisco · Select BGP Best-path Algorithm
Documentation basis reviewed 12 October 2026. This editorial review is not a technical-verification event and does not change the Topic's stored freshness or ownership.
Verification & 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 First 30 seconds Verify boundary
Immediate answer: Show IP/TCP 179 reachability, neighbor identity/AS, source and FSM state before investigating missing prefixes.
Verification chain: IP route/source → TCP 179 → BGP OPEN compatibility → FSM Established → route exchange → policy → RIB/FIB
Stop condition: Established shows the peer session only, but it does not show a specific route was sent, received, accepted or installed.
Step 2 Operational verification and known-good state Verify boundary
show ip bgp summary
show ip bgp neighbors 192.0.2.2 | include BGP state|Last reset|hold time
show tcp brief | include 179
The summary gives one line per neighbour; the Up/Down column shows how long the session has been in its current state. The neighbour detail shows the state, the negotiated timers and why the session last went down. show tcp brief shows whether a TCP connection on port 179 exists at all.
Known-good: Established, an uptime that keeps growing, a last reset that is old or explained, and the expected number of prefixes received.
Step 3 Verification and output interpretation Verify boundary
Use the neighbor summary for state, uptime and prefix counters, then inspect detailed neighbor output for negotiated capabilities, timers, reset reasons, transport endpoints and policy. Established shows the control session is up. It does not show a specific prefix was received, accepted, selected, installed or forwarded. For route questions, move immediately from neighbor state to the relevant prefix in the BGP table.
Step 4 Step-by-step troubleshooting Narrow the fault
Step 5 Verification & troubleshooting Narrow the fault
1. show ip bgp summary → state or prefix count, and the Up/Down time.
2. Not Established: ping <peer> source <local peering address>.
3. show ip bgp neighbors <ip> | include BGP state|Last reset|Local host|Foreign host → the reason for the last reset and the addresses in use.
4. Compare the configuration on both ends: address, remote-as, update-source, ebgp-multihop, password.
5. Check ACLs and firewalls for TCP 179.
6. Established with 0 prefixes: look at what the neighbour advertises and at inbound policy, not at the session.
Step 6 Failure signatures and troubleshooting branches Narrow the fault
- Stuck in Active or Idle. No route to the peer, wrong source address (loopback peering without
update-source), TCP 179 blocked, or the neighbour is not configured. - Resets with
peer in wrong AS.remote-asmismatch. %TCP-6-BADAUTHin the log. The password differs between the two ends.- Resets every few minutes with "hold time expired". Keepalives or updates are being lost: congestion, or an MTU problem on the path.
- Established, zero prefixes received. The neighbour advertises nothing or a filter removes it; the address family may not be activated.
- OPEN rejected for a bad BGP identifier. Both routers have the same router ID.
Step 7 When the problem is really fixed Narrow the fault
- The neighbour is Established and the uptime keeps increasing.
- The last reset reason is understood and has not recurred.
- The number of prefixes received is what the neighbour should send.
- The session survives the failure it was designed to survive (for loopback peering: one link down).
Evidence · 2 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 session needs, in order: a route to the peer's address, TCP port 179 between exactly the addresses each side has configured for the other, and agreeing AS numbers. The source address you connect from must be the address the peer has in its neighbor statement. Established with 0 prefixes is a healthy session — look at address-family activation, network statements and policy instead.
show ip bgp summary → a number in State/PfxRcd = Established; a word = not. show ip bgp neighbors <ip> | include BGP state|Last reset → state and the reason for the last reset. ping <peer> source <local peering address> → reachability with the right source.
ReferenceWhat it is1 section · depth on demand
What it is
A BGP neighbour relationship — also called a session or peering — is a TCP connection on port 179 between two routers that have each been configured with the other's address and AS. Nothing is discovered automatically. Only when the session is Established do the routers exchange routes.
ReferenceWhy it matters1 section · depth on demand
Why it matters
Everything in BGP depends on the session: no session, no routes. But a session that is up proves less than people tend to assume — only that the two routers can talk. It says nothing about which prefixes are sent, accepted or used. Most BGP troubleshooting begins by deciding which of those two situations you are in.
ReferenceImportant terms & boundaries6 sections · depth on demand
Key points
- Configured by hand on both routers:
neighbor <ip> remote-as <asn>. - TCP port 179. Either side may open the connection, so one direction through an ACL or firewall is enough.
- The connection must come from the address the other side has in its
neighborstatement; peering between loopbacks needsupdate-source. - eBGP packets have TTL 1 by default;
ebgp-multihopis needed when the peer is not directly connected. - Timers: keepalive 60 seconds, hold time 180 seconds; the lower hold time of the two is used.
neighbor <ip> passwordmust match on both ends.- IPv4 unicast is exchanged by default; other address families need
activate. - In
show ip bgp summary, a number in the last column means Established.
In depth
Establishing a BGP neighbour relationship
BGP neighbours are configured explicitly with neighbor <address> remote-as <asn> and connect over TCP port 179, as the Catalyst 9300 BGP guide describes. Once TCP is up, the peers exchange OPEN messages with AS number, router ID, hold time and capabilities, then KEEPALIVEs, and enter Established. The guide gives keepalive 60 s and hold time 180 s as defaults; the lower hold time of the two peers is used.
Session states
| State | Meaning |
|---|---|
| Idle | Not trying, or waiting after an error |
| Connect | Trying to open the TCP connection |
| Active | TCP attempt failed; listening and retrying |
| OpenSent | OPEN sent, waiting for the peer's OPEN |
| OpenConfirm | OPENs exchanged, waiting for KEEPALIVE |
| Established | Exchanging UPDATEs |
R1# show ip bgp summary
BGP router identifier 10.0.0.1, local AS number 64500
BGP table version is 412, main routing table version 412
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.0.2.1 4 64510 48211 41922 412 0 0 4w2d 921343
192.0.2.5 4 64511 12 14 0 0 0 00:01:12 Active
10.0.0.2 4 64500 88121 88019 412 0 0 4w2d 14
R1# show ip bgp neighbors 192.0.2.5 | include state|Last reset|Local host|Foreign host
BGP state = Active
Last reset 00:01:12, due to BGP Notification received of session 1, Bad Peer AS
%BGP-3-NOTIFICATION: received from neighbor 192.0.2.5 active 2/2 (peer in wrong AS) 2 bytes FBEF
A number in State/PfxRcd means Established with that many prefixes received. Active or Idle means the session isn't up.
Common causes
| State or message | Cause |
|---|---|
| Active | No TCP connection: no route to the peer, ACL or firewall blocking TCP 179, wrong peer address |
| Idle (Admin) | neighbor … shutdown |
| Bad Peer AS | remote-as doesn't match the peer's local AS |
| Up, then down after 180 s | Keepalives lost, or MTU issues with large updates |
| Authentication failure | neighbor … password mismatch (TCP MD5) |
| iBGP to loopback stays Active | update-source Loopback0 missing on one side, or loopback not in the IGP |
Timers (from the guide)
neighbor <address> timers <keepalive> <holdtime> changes the timers. The guide notes that the BGP hold time must be higher than the graceful restart hold time, even if graceful restart is disabled. For fast failure detection, BFD is preferred over very short BGP timers.
Documented example, not captured output.
Quick reference
In eBGP, a neighbor relationship needs reachability to the peer address, a TCP session on port 179, and OPEN messages with matching AS numbers and compatible capabilities; it then reaches Established and exchanges routes.
| State stuck at | Usual cause |
|---|---|
| Idle | No route to peer, admin shutdown, max-prefix shutdown |
| Active | TCP not completing (ACL, wrong address, peer not configured) |
| OpenSent/OpenConfirm | AS mismatch, authentication, capability issues |
show bgp ipv4 unicast summary
show bgp ipv4 unicast neighbors 203.0.113.1 | include state|Last reset
Documented example, not captured output.
Mechanics and state ownership
Bringing up a session takes a fixed sequence. The router looks up a route to the neighbour's address and opens a TCP connection to port 179, sourced from the outgoing interface unless update-source says otherwise. The neighbour accepts it only if the source address matches one of its own neighbor statements. Each side then sends an OPEN message with its BGP version, AS number, hold time, router ID and capabilities such as the address families it supports. If both accept, they exchange keepalives and the session is Established.
Right after that, each router sends its full set of best paths; from then on only changes are sent. Keepalives go out every 60 seconds. If nothing at all is heard for the hold time, the session is reset and every route learned from that neighbour is withdrawn at once — which is why a flapping session shows up as routes that come and go.
Two details cause surprises. Router IDs must differ: an OPEN from a neighbour with the same router ID is rejected. And a path with too small an MTU lets the small keepalives through while the large updates are dropped, so the session establishes and then times out.
State model and selection mechanics
BGP peers use TCP port 179 and progress through Idle, Connect, Active, OpenSent, OpenConfirm and Established states. TCP reachability, source/destination addressing, ASN expectations and BGP OPEN capabilities all influence whether the session establishes. For directly connected eBGP, the normal TTL behavior assumes a directly reachable peer unless multihop behavior is intentionally configured. Once Established, UPDATE and KEEPALIVE messages can exchange routing information, but each prefix is still subject to address-family activation, policy, next-hop resolution and best-path processing.
Limits and common misconceptions
BGP Active is a protocol state, not a statement that the peer is “active” or healthy. Repeated transitions between Idle/Active/Established can reflect transport instability, policy changes or resets. A long Established uptime is useful stability evidence but can coexist with stale assumptions about what routes should be present.
ReferenceConfiguration & state1 section · depth on demand
Policy and configuration model
Configure neighbor identity from stable addressing and make the intended source interface, remote AS, address family and authentication/policy explicit. Use update-source or multihop only where the topology requires it, and ensure underlay routing can reach the chosen peer addresses without recursive dependence on the BGP session being established.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Lab addressing; local AS 65000; loopbacks carried in the IGP.
router bgp 65000
neighbor 192.0.2.2 remote-as 65010
address-family ipv4 unicast
neighbor 192.0.2.2 activate
network 198.51.100.0 mask 255.255.255.0Expected output
show ip bgp neighbors 192.0.2.2Expected state: State Established with the negotiated timers.
BGP neighbor is 192.0.2.2, remote AS 65010, external link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 03:12:44
Last read 00:00:21, last write 00:00:08, hold time is 180, keepalive interval is 60 seconds
! Illustrative output, not captured Evidence.`Established` is the only state in which routes are exchanged. `Last read` must stay below the hold time (180 s); if no message arrives within it the session is reset, and `Last reset` further down gives the reason.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 Routing → BGP → eBGP → Neighbor Relationship. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc4271.html · confidence 94%Quick lookup tables
BGP FSM quick reference
Session states and the next useful boundary
| State | Meaning | Next boundary |
|---|---|---|
| Idle | Initial/restart/no active session | config, peer reachability |
| Connect | Waiting on TCP connection | TCP/179 path |
| Active | Retrying transport/session | route, ACL, source, peer IP |
| OpenSent | OPEN sent/received negotiation | ASN/capabilities/auth |
| OpenConfirm | OPEN accepted; keepalive confirmation | stability/timers |
| Established | UPDATE exchange possible | exact prefix/policy/best path |
Neighbor Relationship · routing reference
Compact path-selection and evidence boundaries for fast lookup.
| State | Interpretation |
|---|---|
| Idle | Session not progressing |
| Active | Retrying transport/session establishment |
| OpenConfirm | OPEN accepted, waiting final confirmation |
| Established | BGP control session operational |
Neighbor Relationship operational reference
Topic-specific bounded interpretation: known-good BGP state, suspicious signatures and the next technical proof boundary.
| Boundary | Known-good for Neighbor Relationship | Suspicious signature | Next proof |
|---|---|---|---|
| Session/input | Correct peer, AF and prefix context | Transport, FSM or prefix eligibility disagrees | Peer detail and exact prefix |
| Attribute/policy | the complete BGP neighbor relationship from IP reachability and TCP port 179 through the BGP finite-state machine, OPEN capability negotiation, address-family activation and stable Established state matches intended policy | a peer stuck in Active because transport cannot complete, OpenSent/OpenConfirm failure from ASN or capability mismatch, repeated notification/reset events, an Established session with zero or unexpected prefixes, or address-family state inactive despite the base neighbor being configured | Compare candidate paths and policy |
| Route/forwarding | Expected best path reaches RIB/FIB | BGP state exists but installed path disagrees | RIB/FIB/CEF and next-hop proof |
| Closure | Original test passes for explained reason | Symptom moved, was bypassed or state was forced | Regression/failover test |