show ip bgp neighbors

Displays configuration information and statistics for BGP4 neighbors of the device.
Syntax
show ip bgp neighbors [ ip-addr ]
show ip bgp neighbors last-packet-with-error
show ip bgp neighbors routes-summary
Parameters
ip-addr
Specifies the IPv4 address of a neighbor in dotted-decimal notation.
last-packet-with-error
Displays the last packet with an error.
routes-summary
Displays routes received, routes accepted, number of routes advertised by peer, and so on.
Modes

User EXEC mode

Usage Guidelines

Output shows all configured parameters for the neighbors. Only the parameters whose values differ from defaults are shown.

If enable password-display is configured on the device, the MD5 password is displayed in clear text in the output for this command. To prevent the MD5 password from being displayed in clear text, the enable password-display’ command should be used with the md5-fmt parameter. Refer to the enable password-display command for more information.

The show ip bgp neighbors command displays the following information:

Output field

Description

Total Number of BGP4 Neighbors

The number of BGP4 neighbors configured.

IP Address

The IP address of the neighbor.

AS

The AS the neighbor is in.

EBGP or IBGP

Whether the neighbor session is an IBGP session, an EBGP session, or a confederation EBGP session:

  • EBGP - The neighbor is in another AS.
  • EBGP_Confed - The neighbor is a member of another sub-AS in the same confederation.
  • IBGP - The neighbor is in the same AS.

RouterID

The neighbor device ID.

Description

The description you gave the neighbor when you configured it on the device.

Local AS

The value (if any) of the Local AS configured.

State

The state of the session with the neighbor. The states are from the device perspective, not the neighbor perspective. The state values are based on the BGP4 state machine values described in RFC 1771 and can be one of the following for each device:

  • IDLE - The BGP4 process is waiting to be started. Usually, enabling BGP4 or establishing a neighbor session starts the BGP4 process. A minus sign (-) indicates that the session has gone down and the software is clearing or removing routes.
  • ADMND - The neighbor has been administratively shut down. A minus sign (-) indicates that the session has gone down and the software is clearing or removing routes.
  • CONNECT - BGP4 is waiting for the connection process for the TCP neighbor session to be completed.
  • ACTIVE - BGP4 is waiting for a TCP connection from the neighbor.
Note: If the state frequently changes between CONNECT and ACTIVE, there may be a problem with the TCP connection.
  • OPEN SENT - BGP4 is waiting for an Open message from the neighbor.
  • OPEN CONFIRM - BGP4 has received an OPEN message from the neighbor and is now waiting for either a KEEPALIVE or NOTIFICATION message. If the device receives a KEEPALIVE message from the neighbor, the state changes to Established. If the message is a NOTIFICATION, the state changes to Idle.
  • ESTABLISHED - BGP4 is ready to exchange UPDATE messages with the neighbor.

If there is more BGP4 data in the TCP receiver queue, a plus sign (+) is also displayed.

Note: If you display information for the neighbor using the show ip bgp neighborip-addr command, the TCP receiver queue value will be greater than 0.

Time

The amount of time this session has been in the current state.

KeepAliveTime

The keep alive time, which specifies how often this device sends keepalive messages to the neighbor.

HoldTime

The hold time, which specifies how many seconds the device will wait for a keepalive or update message from a BGP4 neighbor before deciding that the neighbor is not operational.

PeerGroup

The name of the peer group the neighbor is in, if applicable.

Multihop-EBGP

Whether this option is enabled for the neighbor.

RouteReflectorClient

Whether this option is enabled for the neighbor.

SendCommunity

Whether this option is enabled for the neighbor.

NextHopSelf

Whether this option is enabled for the neighbor.

DefaultOriginate

Whether this option is enabled for the neighbor.

MaximumPrefixLimit

Maximum number of prefixes the device will accept from this neighbor.

RemovePrivateAs

Whether this option is enabled for the neighbor.

RefreshCapability

Whether this device has received confirmation from the neighbor that the neighbor supports the dynamic refresh capability.

CooperativeFilteringCapability

Whether the neighbor is enabled for cooperative route filtering.

Distribute-list

Lists the distribute list parameters, if configured.

Filter-list

Lists the filter list parameters, if configured.

Prefix-list

Lists the prefix list parameters, if configured.

Route-map

Lists the route map parameters, if configured.

Messages Sent

The number of messages this device has sent to the neighbor. The display shows statistics for the following message types:

  • Open
  • Update
  • KeepAlive
  • Notification
  • Refresh-Req

Messages Received

The number of messages this device has received from the neighbor. The message types are the same as for the Message Sent field.

Last Update Time

Lists the last time updates were sent and received for the following:

  • NLRIs
  • Withdraws

Last Connection Reset Reason

The reason the previous session with this neighbor ended. The reason can be one of the following:

Reasons described in the BGP4 specifications:

  • Message Header Error
  • Connection Not Synchronized
  • Bad Message Length
  • Bad Message Type
  • OPEN Message Error
  • Unsupported Version Number
  • Bad Peer AS Number
  • Bad BGP4 Identifier
  • Unsupported Optional Parameter
  • Authentication Failure
  • Unacceptable Hold Time
  • Unsupported Capability
  • UPDATE Message Error
  • Malformed Attribute List
  • Unrecognized Well-known Attribute
  • Missing Well-known Attribute
  • Attribute Flags Error
  • Attribute Length Error
  • Invalid ORIGIN Attribute
  • Invalid NEXT_HOP Attribute
  • Optional Attribute Error
  • Invalid Network Field
  • Malformed AS_PATH
  • Hold Timer Expired
  • Finite State Machine Error
  • Rcv Notification

Last Connection Reset Reason (cont.)

Reasons specific to the RUCKUS implementation:

  • Reset All Peer Sessions
  • User Reset Peer Session
  • Port State Down
  • Peer Removed
  • Peer Shutdown
  • Peer AS Number Change
  • Peer AS Confederation Change
  • TCP Connection KeepAlive Timeout
  • TCP Connection Closed by Remote
  • TCP Data Stream Error Detected

Notification Sent

If the device receives a NOTIFICATION message from the neighbor, the message contains an error code corresponding to one of the following errors. Some errors have subcodes that clarify the reason for the error. Where applicable, the subcode messages are listed underneath the error code messages.

  • Message Header Error:
    • Connection Not Synchronized
    • Bad Message Length
    • Bad Message Type
    • Unspecified
  • Open Message Error:
    • Unsupported Version
    • Bad Peer As
    • Bad BGP4 Identifier
    • Unsupported Optional Parameter
    • Authentication Failure
    • Unacceptable Hold Time
    • Unspecified
  • Update Message Error:
    • Malformed Attribute List
    • Unrecognized Attribute
    • Missing Attribute
    • Attribute Flag Error
    • Attribute Length Error
    • Invalid Origin Attribute
    • Invalid NextHop Attribute
    • Optional Attribute Error
    • Invalid Network Field
    • Malformed AS Path
    • Unspecified
  • Hold Timer Expired
  • Finite State Machine Error
  • Cease
  • Unspecified

Notification Received

Refer to details for the field Notification Sent.

TCP Connection state

The state of the connection with the neighbor. The connection can have one of the following states:

  • LISTEN - Waiting for a connection request.
  • SYN-SENT - Waiting for a matching connection request after having sent a connection request.
  • SYN-RECEIVED - Waiting for a confirming connection request acknowledgment after having both received and sent a connection request.
  • ESTABLISHED - Data can be sent and received over the connection. This is the normal operational state of the connection.
  • FIN-WAIT-1 - Waiting for a connection termination request from the remote TCP, or an acknowledgment of the connection termination request previously sent.
  • FIN-WAIT-2 - Waiting for a connection termination request from the remote TCP.
  • CLOSE-WAIT - Waiting for a connection termination request from the local user.
  • CLOSING - Waiting for a connection termination request acknowledgment from the remote TCP.
  • LAST-ACK - Waiting for an acknowledgment of the connection termination request previously sent to the remote TCP (which includes an acknowledgment of its connection termination request).
  • TIME-WAIT - Waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request.
  • CLOSED - There is no connection state.

Byte Sent

The number of bytes sent.

Byte Received

The number of bytes received.

Local host

The IP address of the device.

Local port

The TCP port the device is using for the BGP4 TCP session with the neighbor.

Remote host

The IP address of the neighbor.

Remote port

The TCP port the neighbor is using for the BGP4 TCP session with the device.

ISentSeq

The initial send sequence number for the session.

SendNext

The next sequence number to be sent.

TotUnAck

The number of sequence numbers sent by the device that have not been acknowledged by the neighbor.

TotSent

The number of sequence numbers sent to the neighbor.

ReTrans

The number of sequence numbers that the device retransmitted because they were not acknowledged.

UnAckSeq

The current acknowledged sequence number.

IRcvSeq

The initial receive sequence number for the session.

RcvNext

The next sequence number expected from the neighbor.

SendWnd

The size of the send window.

TotalRcv

The number of sequence numbers received from the neighbor.

DupliRcv

The number of duplicate sequence numbers received from the neighbor.

RcvWnd

The size of the receive window.

SendQue

The number of sequence numbers in the send queue.

RcvQue

The number of sequence numbers in the receive queue.

CngstWnd

The number of times the window has changed.

Examples

The following example shows sample output from the show ip bgp neighbors command.

device> show ip bgp neighbors
  neighbors              Details on TCP and BGP neighbor connections
    Total number of BGP Neighbors: 1
1   IP Address: 192.168.1.1, AS: 7701000 (IBGP), RouterID: 192.168.1.1, VRF: default-vrf
    State: ESTABLISHED, Time: 0h3m33s, KeepAliveTime: 60, HoldTime: 180
       KeepAliveTimer Expire in 49 seconds, HoldTimer Expire in 177 seconds
    Minimal Route Advertisement Interval: 0 seconds
       RefreshCapability: Received
    Messages:    Open    Update  KeepAlive Notification Refresh-Req
       Sent    : 1       0       5         0            0
       Received: 1       1       5         0            0
    Last Update Time: NLRI       Withdraw          NLRI       Withdraw
                  Tx: ---        ---           Rx: 0h3m33s    ---
    Last Connection Reset Reason:Unknown
    Notification Sent:     Unspecified
    Notification Received: Unspecified
    Neighbor NLRI Negotiation:
      Peer Negotiated IPV4  unicast  capability
      Peer configured for IPV4 unicast  Routes
    Neighbor AS4 Capability Negotiation:
      Peer Negotiated AS4  capability
      Peer configured for AS4  capability
		
 As-path attribute count: 1
    Outbound Policy Group:
       ID: 1, Use Count: 1
    TCP Connection state: ESTABLISHED, flags:00000044 (0,0)
     Maximum segment size: 1460
    TTL check: 0, value: 0, rcvd: 64
       Byte Sent:   148, Received: 203
       Local host:  192.168.1.2, Local  Port: 179
       Remote host: 192.168.1.1, Remote Port: 8041
       ISentSeq:    1656867  SendNext:    1657016  TotUnAck:          0
       TotSent:         149  ReTrans:          19  UnAckSeq:    1657016
       IRcvSeq:     1984547  RcvNext:     1984751  SendWnd:       64981
       TotalRcv:        204  DupliRcv:        313  RcvWnd:        65000
       SendQue:           0  RcvQue:            0  CngstWnd:       5840

The following example shows sample output from the show ip bgp neighbors command, including BFD configuration information.

device> show ip bgp neighbors
  
Total number of BGP Neighbors: 1
1   IP Address: 12.12.12.3, AS: 300 (IBGP), RouterID: 0.0.0.2, VRF: BFD
    State: ESTABLISHED, Time: 0h40m12s, KeepAliveTime: 60, HoldTime: 180
       KeepAliveTimer Expire in 27 seconds, HoldTimer Expire in 168 seconds
    Minimal Route Advertisement Interval: 0 seconds
       RefreshCapability: Received
    Messages:    Open    Update  KeepAlive Notification Refresh-Req
       Sent    : 1       0       46        0            0          
       Received: 1       0       45        0            0          
    Last Update Time: NLRI       Withdraw          NLRI       Withdraw
                  Tx: ---        ---           Rx: ---        ---        
    Last Connection Reset Reason:Peer Removed
    Notification Sent:     Cease/Peer Unconfigured
    Notification Received: Open Message Error/Bad Peer AS Number
    Neighbor NLRI Negotiation:
      Peer Negotiated IPV4  unicast  capability
      Peer configured for IPV4 unicast  Routes
    Neighbor ipv6 MPLS Label Capability Negotiation:
    Neighbor AS4 Capability Negotiation:
    Outbound Policy Group:
       ID: 6, Use Count: 2

    BFD:Enabled, BFDSessionState:Up, Multihop:No  
        LastBGP-BFDEvent:RX:Up, BGP-BFDError:No Error
        HoldOverTime(sec) Configured:0,Current:0,DownCount:0

    TCP Connection state: ESTABLISHED, flags:00000033 (0,0)       
     Maximum segment size: 1460
    TTL check: 0, value: 0, rcvd: 64
       Byte Sent:   919, Received: 900
       Local host:  12.12.12.6, Local  Port: 8221
       Remote host: 12.12.12.3, Remote Port: 179
       ISentSeq: 3743370334  SendNext: 3743371254  TotUnAck:          0
       TotSent:         920  ReTrans:           0  UnAckSeq: 3743371254
       IRcvSeq:  2092913293  RcvNext:  2092914194  SendWnd:       65000
       TotalRcv:        901  DupliRcv:          0  RcvWnd:        65000
       SendQue:           0  RcvQue:            0  CngstWnd:       1460
  

The following example shows sample output from the show ip bgp neighbors command when the enable password-display feature is configured. The MD5 password is displayed in clear text.

device> show ip bgp neighbors

    Total number of BGP Neighbors: 1
1   IP Address: 8.8.8.2, AS: 10001 (IBGP), RouterID: 0.0.0.0, VRF: default-vrf
    State: CONNECT, Time: 0h13m4s, KeepAliveTime: 60, HoldTime: 180
    Minimal Route Advertisement Interval: 0 seconds
       MD5 Password: minerdi  
…

The following example shows sample output from the show ip bgp neighbors command when the enable password-display command is used with the md5-fmt parameter. The password is displayed in MD5 format.

device> show ip bgp neighbors

    Total number of BGP Neighbors: 1
1   IP Address: 8.8.8.2, AS: 10001 (IBGP), RouterID: 0.0.0.0, VRF: default-vrf
    State: CONNECT, Time: 0h9m50s, KeepAliveTime: 60, HoldTime: 180
    Minimal Route Advertisement Interval: 0 seconds
       MD5 Password: $Nj1nblVAPQ==
 
…
History
Release version Command history
08.0.90 This command was modified to display BGP BFD session information for neighbors.
08.0.92a The output for this command was modified so that the MD5 password is not displayed in clear text when enable password-display is configured.