OcNOS-SP : Layer 3 Guide : Border Gateway Protocol Command Reference : BGP Show Commands : show bgp neighbors
show bgp neighbors
Use this command to display information about BGP neighbor connections.
Command Syntax
show bgp neighbors
show bgp ipv6 neighbors
show ip bgp ipv4 (unicast|multicast) neighbors
show ip bgp neighbors
show ip bgp neighbors (A.B.C.D|X:X::X:X)(advertise-routes|)
show ip bgp ipv4 (unicast|multicast) neighbors (A.B.C.D|X:X::X:X)
show ip bgp neighbors (A.B.C.D|X:X::X:X) (hold-time|keepalive-interval|connection-retrytime)
show ip bgp neighbors (A.B.C.D|X:X::X:X) (sent-msgs|rcvd-msgs|notification|update|open|keepalive
Parameters
ipv4
IPv4 neighbors
ipv6
IPv6 neighbors
unicast
Unicast prefixes
multicast
Multicast prefixes
A.B.C.D
IPv4 neighbor
X:X::X:X
IPv6 neighbor
advertised-routes
Routes advertised to a BGP neighbor
hold-time
Hold time
keepalive-interval
 
Keepalive interval
connection-retrytime
 
Connection retry time
sent-msgs
Sent packets
rcvd-msgs
Received packets
notification
Notification messages
update
Update messages
open
Open messages
keepalive
Keepalive messages
Command Mode
Privileged Exec and Exec modes
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#show bgp neighbors
BGP neighbor is 2.2.2.2, remote AS 200, local AS 200, internal link
Member of peer-group myPeer for session parameters
BGP version 4, remote router ID 10.12.7.155
BGP state = Established, up for 00:04:55
Last read 00:04:55, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 11 messages, 0 notifications, 0 in queue
Sent 11 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 IPv4
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
myPeer peer-group member
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 2.2.2.1, Local port: 33865
Foreign host: 2.2.2.2, Foreign port: 179
Nexthop: 2.2.2.1
Nexthop global: 1111::1
Nexthop local: fe80::a00:27ff:fecc:47a6
BGP connection: non shared network
Last Reset: 00:32:48, due to BGP Notification sent
Notification Error Message: (OPEN Message Error/Bad Peer AS.)
BGP Neighbor Fields
 
Table 7-18 explains the output fields.
 
Table 7-18: show bgp neighbor output details
Field
Description
BGP neighbor
BGP session information for the neighbor with the ip-address argument.
remote AS
Remote Autonomous system used to exchange exterior routing information between neighboring ASs.
local AS
Local Autonomous system used to exchange internal routing information within AS.
internal link
external link
Internal link is used to forward route advertisements received from an external BGP router through the internal network (in the same AS).
External link is used for exchanging routing information between Autonomous Systems (AS) and routing traffic across the Internet (eBGP neighbor).
member of peer-group
Peer group information for the peer group specified with the peer-group argument.
BGP version
Negotiated BGP version for this session.
remote router ID
IP address of the neighbor. BGP uses the highest loopback address as the Router ID. If no loopback interface is configured, BGP uses the highest configured IP address on a system.
BGP state
Session state as explained in Table 7-23. The exchange of routing information begins between peers only after the neighbor session is in an Established state.
up for
Time that the underlying TCP connection has been up.
last read
Time since BGP last received a message from this neighbor.
hold time
Time, in seconds, that BGP will maintain the session with this neighbor without receiving messages.
The maximum time that can elapse between successive messages from this neighbor is 180 seconds. If no message is received for 180 seconds, this neighbor will be declared dead.
last write
Time since BGP last sent a message to this neighbor.
keepalive interval
Time interval, in seconds, at which keepalive messages are transmitted to this neighbor.
The time interval between successive keepalive messages is 60 seconds. Typically, the hold time value is set to three times the keepalive interval.
neighbor capabilities
BGP capabilities advertised and received from this neighbor. “Advertised and received” is displayed when a capability is successfully exchanged between two routers.
received
Total number of received messages.
notifications: Number of notification (error) messages received.
in queue: Number of messages in the input queue
sent
Total number of sent messages.
notifications: Number of notification (error) messages sent.
in queue: Number of messages in the output queue
route refresh request
Number of route refresh request messages sent and received.
minimum time between advertisement runs.
The minimum time gap, in seconds, between successive route updates sent to the neighbor.
Generally, a jitter (of 25%) is applied to this time interval, which means that if the time between advertisements is configured as 30, successive advertisements can have a time gap of as low as 22.5 (after applying a 25% jitter to the 30 seconds, which is 7.5 seconds).
for address family
The peers have exchanged address family capability.
BGP table version
For each of the address families agreed upon, BGP maintains a separate table.
neighbor version
Tracks prefixes that have been sent and those that need to be sent.
connections established
The number of times the router has established a TCP connection and the two peers have agreed to speak BGP with each other.
“Dropped” means the number of time the connection has failed or gone down.
local host
foreign host
Local host is the IP address and the port number of the local system used for the peering session.
Foreign host is the IP address and the port of the neighbor.
BGP always uses the TCP port number 179 for the peer originating the session.
nexthop
The IP address of the next hop used to reach the neighbor.
eBGP or iBGP peers do not need to be directly connected. Peering sessions can be set up across multiple hops. If the neighbors are directly connected, the IP address of the local system is listed as the next hop.
nexthop global
The global IPv6 address of the next hop
nexthop local
The link-local IPv6 address of the next hop
non shared network
The peering session is running on a non shared network.
last reset
Time since this peering session was last reset. The reason for the reset is displayed on this line.
notification error message
Last error message sent.
Last modified date: 08/28/2023