Documentation
Name
bgp router show peers - show the peers of one BGP router
Synopsis
peers
Description
This command shows the list of peers of one router as well as their status. For each peer, the command shows its ASN as well as the state of the BGP session with this peer. In addition, the command also shows the options specific to each peer.
The session with the peer can be in one of the following states:
Session State | Description |
---|---|
IDLE | administratively down. |
ACTIVE | administratively up, but not established. |
ESTABLISHED | established and BGP routes can be exchanged. |
OPENWAIT | OPEN message sent, but no answer received yet. |
When the session is in IDLE state, that means that the session is administratively down. The administrative state of the session can be changed using the bgp router peer up command. The session can also be in the ACTIVE state. This state indicates that the session is administratively up but due to the current routing state, it is not established. This can occur if there is no route towards the peer. The session can also be in ESTABLISHED state. This state indicates that the session could be established and that BGP routes can be exchanged with the peer. Finally, the OPENWAIT state indicates that the session has been partially opened. An OPEN message has been sent to the peer but no answer has been received yet. This can be due to the OPEN message still being in the simulator's queue (if sim run has not been called). This can also occur in case of reachability problems between the local router and the peer.
Output format:
<peer> <as-num> <status> <router-id> [<options>]
The following example shows the state of two BGP sessions. The sessions are initially in the OPENWAIT state because the BGP OPEN messages have been sent but are still in the simulator's queue. Then, command sim run is used to process these messages. Finally, the status of the BGP session is shown again. Both sessions are now in the ESTABLISHED state.
cbgp> bgp router 1.0.0.2 show peers
1.0.0.1 AS1 OPENWAIT 0.0.0.0 snd-seq:1 rcv-seq:0
1.0.0.3 AS1 OPENWAIT 0.0.0.0 snd-seq:1 rcv-seq:0
cbgp> sim run
cbgp> bgp router 1.0.0.2 show peers
1.0.0.1 AS1 ESTABLISHED 10.0.0.1 snd-seq:2 rcv-seq:2
1.0.0.3 AS1 ESTABLISHED 10.0.0.3 snd-seq:2 rcv-seq:3