show ip bgp neighbors
Displays detailed information about BGP neighbor sessions, including state, timers, and advertised/received prefixes, used to verify BGP peering and troubleshoot neighbor relationships.
show ip bgp neighborsWhen to Use This Command
- Verify that a BGP neighbor is in the Established state after configuration.
- Check the number of prefixes received from a neighbor to ensure route exchange is working.
- Troubleshoot BGP session flapping by examining hold time and keepalive counters.
- Inspect BGP version and capabilities negotiated with a neighbor.
Command Examples
Basic BGP neighbor summary
show ip bgp neighborsBGP neighbor is 10.1.1.2, remote AS 65002, external link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 1w2d
Last read 00:00:15, last write 00:00:10, hold time is 180, keepalive interval is 60 seconds
Neighbor sessions:
1 active, is the multisession capable
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Received 1500 messages, 0 notifications, 0 in queue
Sent 1200 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
Session: 10.1.1.2
BGP table version 100, neighbor version 100/0
Output queue size: 0
Index 0, Advertised bit 0
1 update-group member
Slow-peer detection is disabled
Slow-peer split-update-group dynamic is disabled
Sent Received
Prefix activity: --- ---
Prefixes Current: 5 8
Prefixes Total: 5 8
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath/nonbestpath: 5/0 8/0
Number of NLRIs in the update sent: max 0, min 0
Last End-of-RIB received: yes
Last End-of-RIB sent: yes
Last notification sent: OPEN Message/Unsupported Capability (0x02/0x06)
Last notification received: none
The output shows the neighbor IP (10.1.1.2) and remote AS (65002). 'BGP state = Established' confirms the session is up. 'up for 1w2d' indicates uptime. 'hold time is 180, keepalive interval is 60' are timer values. 'Prefixes Current: 5 sent, 8 received' shows the number of prefixes exchanged. 'Last notification sent' indicates a past error (unsupported capability) but session is now up.
BGP neighbor not established
show ip bgp neighbors 10.1.1.2BGP neighbor is 10.1.1.2, remote AS 65002, external link
BGP version 4, remote router ID 0.0.0.0
BGP state = Active
Last read 00:00:45, last write 00:00:40, hold time is 180, keepalive interval is 60 seconds
Neighbor sessions:
1 active, is the multisession capable
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Received 0 messages, 0 notifications, 0 in queue
Sent 10 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
Session: 10.1.1.2
BGP table version 1, neighbor version 0
Output queue size: 0
Index 0, Advertised bit 0
0 update-group member
Slow-peer detection is disabled
Slow-peer split-update-group dynamic is disabled
Sent Received
Prefix activity: --- ---
Prefixes Current: 0 0
Prefixes Total: 0 0
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath/nonbestpath: 0/0 0/0
Number of NLRIs in the update sent: max 0, min 0
Last End-of-RIB received: no
Last End-of-RIB sent: no
Last notification sent: none
Last notification received: none
The state is 'Active', meaning the router is trying to establish a TCP connection. 'remote router ID 0.0.0.0' indicates no router ID received. 'Received 0 messages' confirms no updates. This suggests a connectivity issue or misconfiguration (e.g., wrong neighbor IP or AS).
Understanding the Output
The 'show ip bgp neighbors' output provides a wealth of information about each BGP peer. The first line shows the neighbor IP and remote AS, and whether it's an eBGP (external) or iBGP (internal) link. The 'BGP state' field is critical: 'Idle' means no connection attempt, 'Connect' means TCP connection in progress, 'Active' means TCP connection failed or waiting, 'OpenSent'/'OpenConfirm' means BGP messages exchanged, and 'Established' means the session is fully up. The 'up for' duration indicates stability. Timer values (hold time, keepalive) should match between peers; mismatches cause session drops. The 'Prefix activity' section shows how many prefixes are currently sent and received; a sudden drop may indicate a route withdrawal or filter issue. 'Last notification' fields record any errors; common ones include 'OPEN Message/Unsupported Capability' or 'UPDATE Message/Malformed Attribute'. The 'BGP table version' and 'neighbor version' track synchronization; if they diverge, updates are pending. The 'Output queue size' should be 0; non-zero indicates backpressure. In a healthy network, all neighbors should be 'Established' with consistent prefix counts and no recent notifications.
CCNA Exam Tips
CCNA exam may ask you to identify the BGP state from output; know the six states (Idle, Connect, Active, OpenSent, OpenConfirm, Established).
Be able to determine if a BGP session is up by looking for 'Established' and the uptime field.
The 'hold time' and 'keepalive' timers are often tested; default hold time is 180 seconds, keepalive 60 seconds.
If the state is 'Active', common causes are incorrect neighbor IP, wrong AS number, or ACL blocking TCP port 179.
Common Mistakes
Mistake 1: Confusing 'Active' state with 'Established' — Active means the session is down, not up.
Mistake 2: Ignoring the 'Last notification' field; it often contains the reason for a previous session reset.
Mistake 3: Assuming all neighbors should have the same prefix counts; differences are normal if filters or policies are applied.
Related Commands
clear ip bgp *
Resets all BGP sessions and clears the BGP routing table, forcing a complete re-advertisement and re-learning of all BGP routes from all neighbors.
show ip bgp
Displays the BGP routing table, showing learned BGP routes and their attributes, used for troubleshooting BGP path selection and verifying route advertisement.
show ip bgp summary
Displays a summary of the BGP neighbor status and prefix counts, used to quickly verify BGP peering and routing table health.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions