This command shows details about BGP neighbor configuration and status. If the neighbor is configured to inherit configuration parameters from a peer template, the output shows the inherited values.
| Format | show ip bgp [vrf vrf-name] neighbors [neighbor-address] |
| Mode | Privileged EXEC |
| Parameter | Description |
|---|---|
| vrf-name | (Optional) Displays the neighbors belonging to the communities within the VRF instance. |
| neighbor-address | (Optional) The IP address of a neighbor. Used to limit the output to show a single neighbor. |
The command output displays the following information.
| Parameter | Description |
|---|---|
| Description | Text string assigned using the neighbor filter-list (BGP Router Config) command. This text string only appears if a description is configured. |
| Remote Address | The neighbor's IP address |
| Remote AS | The neighbor's autonomous system number |
| BFD Enabled to Detect Fast Fallover | Specifies if BFD has been enabled for BGP neighbors. |
| Peer ID | The neighbor's BGP router ID |
| Peer Admin Status | START or STOP |
| Peer State | The adjacency state of this neighbor |
| Peer Type | If a neighbor was created with the BGP dynamic neighbors feature, Dynamic is shown. |
| Listen Range | If the neighbor was created with the BGP dynamic neighbors feature, the field shows the listen range to which the neighbor belongs. |
| Local Interface Address | The IPv4 address used as the source IP address in packets sent to this neighbor. |
| Local Port | TCP port number on the local end of the connection |
| Remote Port | TCP port number on the remote end of the connection |
| Connection Retry Interval | How long BGP waits between connection retries |
| Neighbor Capabilities |
Optional capabilities reported by the neighbor, recognized and accepted by this router. Codes listed in the show output are
as follows:
|
| IPv4 Unicast Support | Indicates whether IPv4 unicast routes can be exchanged with this peer. Both indicates that IPv4 is active locally and the neighbor indicated support for IPv4 unicast in its OPEN message. Sent indicates that IPv4 unicast is active locally, but the neighbor did not include this AFI/SAFI pair in its OPEN message. IPv4 unicast is always enabled locally and cannot be disabled. |
| IPv6 Unicast Support | Indicates whether IPv6 unicast routes can be exchanged with this peer. Both and Sent have the same meaning as for IPv4. None indicates that neither the local router nor the peer has IPv6 enabled for this adjacency. Received indicates that the peer advertised the IPv6 unicast capability, but it is not enabled locally. IPv6 unicast is enabled locally using the neighbor activate command in address-family IPv6 configuration mode. |
| L2VPN EVPN Support | Indicates whether EVPN routes can be exchanged with this peer. This capability is enabled locally using the neighbor activate command in address-family l2vpn evpn configuration mode. |
| Graceful Restart Support | Indicates whether the neighbor supports the Graceful Restart behavior. |
| Graceful Restart Helper Support | Indicates whether the neighbor can help us to gracefully restart. |
| Update Source | The configured value for the source IP address of packets sent to this peer. This field is only included in the output if the update source is configured. |
| Configured Hold Time | The time, in seconds, that this router proposes to this neighbor as the hold time |
| Configured Keep Alive Time | The configured KEEPALIVE interval for this neighbor. |
| Negotiated Hold Time | The minimum of the configured hold time and the hold time in the OPEN message received from this neighbor. If the local router does not receive a KEEPALIVE or UPDATE message from this neighbor within this interval of time, the local router drops the adjacency. This field is only shown if the adjacency state is OPEN CONFIRM or greater. |
| Keep Alive Time | The number of seconds between KEEPALIVE messages sent to this neighbor. This field is only shown if the adjacency state is OPEN CONFIRM or greater. |
| MD5 Password | The TCP MD5 password, if one is configured, in plain text |
| Last Error (Sent) | The last error that occurred on the connection to this neighbor |
| Last SubError | The suberror reported with the last error. |
| Established Transitions | The number of times the adjacency has transitioned into the Established state |
| Established Time | How long since the connection last transitioned to or from the Established state |
| Time Since Last Update | How long since an UPDATE message has been received from this neighbor |
| IPv4 Outbound Update Group | The outbound update group ID. |
| L2VPN Outbound Update Group | The outbound update group ID. |
| IPv6 Outbound Update Group | The outbound update group ID. |
| Message Table | The number of BGP messages sent to and received from this neighbor |
| Received UPDATE Queue Size | Received UPDATE messages are queued for processing. This section shows the current length of the neighbor's UPDATE queue in bytes, the high water mark, the limit, and the number of UPDATEs that have been dropped because the queue reached the limit. |
| The following fields are displayed for IPv4, L2VPN EVPN, and IPv6 (If active) | |
| Prefixes Advertised | A running count of the number of prefixes advertised to or received from this neighbor. |
| Prefixes Withdrawn | A running count of the number of prefixes included in the Withdrawn Routes portion of UPDATE messages, to and from this neighbor. |
| Prefixes Current | The number of prefixes currently advertised to or received from this neighbor. For inbound prefixes, this count only includes prefixes that passed inbound policy. |
| Prefixes Accepted | The number of prefixes from this neighbor that are eligible to become active in the local RIB. Received prefixes are ineligible if their BGP Next Hop is not resolvable or if the AS Path contains a loop. A prefix is only considered accepted if it passes inbound policy. |
| Prefixes Rejected | The number of prefixes currently received from this neighbor that fail inbound policy. |
| Max NLRI per Update | The maximum number of prefixes included in a single UPDATE message, to and from this neighbor. |
| Min NLRI per Update | The minimum number of prefixes included in a single UPDATE message, to and from this neighbor. |
Example: The following shows example CLI display output for the command.
(R1) # show ip bgp neighbors 172.20.1.100
Description: spine 1 router 1
Remote Address ................................ 172.20.1.100
Remote AS ..................................... 100
BFD Enabled to Detect Fast Fallover............ Yes
Peer ID ....................................... 14.3.0.1
Peer Admin Status ............................. START
Peer State .................................... ESTABLISHED
Peer Type ..................................... DYNAMIC
Listen Range .................................. 172.20.0.0/16
Local Interface Address ....................... 172.20.1.2
Local Port .................................... 179
Remote Port ................................... 58265
Connection Retry Interval ..................... 120 sec
Neighbor Capabilities ......................... None
IPv4 Unicast Support .......................... Both
IPv6 Unicast Support .......................... Sent
L2VPN EVPN Support .......................... Advertised and Received
Graceful Restart Support....................... Enabled
Graceful Restart Helper Support................ Enabled
Update Source..................................
Configured Hold Time .......................... 90 sec
Configured Keep Alive Time..................... 30 sec
Negotiated Hold Time .......................... 30 sec
Keep Alive Time ............................... 10 sec
MD5 Password................................... password
Last Error (Sent).............................. Hold Timer Expired
Last SubError.................................. None
Time Since Last Error.......................... 0 day 0 hr 4 min 27 sec
Established Transitions ....................... 1
Established Time .............................. 0 day 0 hr 4 min 25 sec
Time Elapsed Since Last Update ................ 0 day 0 hr 4 min 245 sec
IPv4 Outbound Update Group..................... 3
L2VPN Outbound Update Group ................... 0
IPv6 Outbound Update Group..................... 7
Open Update Keepalive Notification Refresh Total
Msgs Sent 1 0 10 0 0 11
Msgs Rcvd 1 1 11 0 0 12
Received UPDATE Queue Size: 0 bytes. High: 355. Limit 196096. Drops 0.
IPv4 Prefix Statistics:
Inbound Outbound
Prefixes Advertised 1 0
Prefixes Withdrawn 0 0
Prefixes Current 1 0
Prefixes Accepted 1 N/A
Prefixes Rejected 1 N/A
Max NLRI per Update 1 0
Min NLRI per Update 1 0
L2VPN Prefix Statistics:
Inbound Outbound
Prefixes Advertised 3 3
Prefixes Withdrawn 0 0
Prefixes Current 3 3
Prefixes Accepted 3 N/A
Prefixes Rejected 0 N/A
Max NLRI per Update 1 2
Min NLRI per Update 0 1
IPv6 Prefix Statistics:
Inbound Outbound
Prefixes Advertised 1 0
Prefixes Withdrawn 0 0
Prefixes Current 1 0
Prefixes Accepted 1 N/A
Prefixes Rejected 1 N/A
Max NLRI per Update 1 0
Min NLRI per Update 1 0
If the router receives an UPDATE message with an invalid path attribute, the router will in most cases send a NOTIFICATION message and reset the adjacency. BGP maintains a per-neighbor counter for each type of path attribute error. This show command lists each non-zero counter, just after the LastSubError. The counters that may be listed are as follows:
| Parameter | Description |
|---|---|
| Path with duplicate attribute | The peer sent an UPDATE message containing the same path attribute more than once. |
| Path with well-known/optional conflict | A received path attribute was flagged as both well-known and optional or neither well-known nor optional. |
| Transitive flag not set on transitive attr | A received path attribute is known to be transitive, but the transitive flag is not set. |
| Mandatory attribute non- transitive or partial | A mandatory path attribute was received with either the transitive or partial flag set. |
| Optional attribute non-transitive and partial | An optional path attribute has the transitive flag clear and the partial flag set. |
| Path attribute too long | A received path attribute was longer than the expected length. |
| Path attribute length error | A received path attribute has a length value that exceeds the remaining length of the path attributes field. |
| Invalid ORIGIN code | A received UPDATE message included an invalid ORIGIN code. |
| Unexpected first ASN in AS path | The AS Path attribute from an external peer did not include the peer's AS number as the first AS. |
| Invalid AS path segment type | The AS Path includes a segment with an invalid segment type. |
| Invalid BGP NEXT HOP | The BGP NEXT HOP is not a valid unicast address. |
| Bad BGP NEXT HOP | The BGP NEXT HOP was either the receiver's IP address or an IP address outside the subnet to the peer. |
| Invalid AGGREGATOR attribute | The AGGREGATOR attribute was invalid. |
| Unrecognized well-known path attribute | An UPDATE message contained a path attribute with the Optional flag clear, but this router does not recognize the attribute. |
| Missing mandatory path attribute | An UPDATE message was received without a mandatory path attribute. |
| Missing LOCAL PREF attribute | An UPDATE message was received from an internal peer without the LOCAL PREF attribute. |
| Invalid prefix in UPDATE NLRI | An UPDATE message received from this peer contained a syntactically incorrect prefix. |
Example: In this example, BGP has received an UPDATE message from an external peer 172.20.101.100 with something other than the peer's ASN as the first ASN in the AS Path. The additional counter shows that this occurred one time.
(Routing) #show ip bgp neighbors 172.20.101.100 Remote Address ................................ 172.20.101.100 Remote AS ..................................... 101 ... Last Error .................................... UPDATE Message Error Last SubError ................................. Malformed AS_PATH Unexpected first ASN in AS path ............... 1 Established Transitions ....................... 1 Established Time .............................. 0 days 00 hrs 00 mins 10 secs