Show ip bgp neighbors
To display information about the TCP and BGP connections to neighbors, use the show ip bgp neighbors command in EXEC mode.
show ip bgp neighbors [address] [received-routes | routes | advertised-routes | {paths regular-expression} | dampened-routes]
Syntax Description address (Optional) Address of the neighbor whose routes you have learned from. If you omit this argument, all neighbors are displayed.
received-routes (Optional) Displays all received routes (both accepted and rejected)
from the specified neighbor.
routes (Optional) Displays all routes that are received and accepted. This is a subset of the output from the received-routes keyword.
advertised-routes (Optional) Displays all the routes the router has advertised to the neighbor.
paths (Optional) Regular expression that is used to match the paths received.
regular-expression dampened-routes (Optional) Displays the dampened routes to the neighbor at the IP address specified.
Command Modes EXEC
|
10.0 |
This command was introduced. |
|
11.2 |
The received-routes keyword was |
|
added. |
show ip bgp neighbors H
Examples The following is sample output from the show ip bgp neighbors command:
Router# show ip bgp neighbors 172.16.232.178
BGP neighbor is 172.16.232.178, remote AS 10, external link Index 1, Offset 0, Mask 0x2 Inbound soft reconfiguration allowed BGP version 4, remote router ID 172.16.232.178 BGP state = Established, table version = 27, up for 00:06:12 Last read 00:00:12, hold time is 180, keepalive interval is 60 seconds Minimum time between advertisement runs is 30 seconds Received 19 messages, 0 notifications, 0 in queue Sent 17 messages, 0 notifications, 0 in queue Inbound path policy configured
Route map for incoming advertisements is testing Connections established 2; dropped 1 Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Local host: 172.16.232.181, Local port: 11002 Foreign host: 172.16.232.178, Foreign port: 179
Enqueued packets for retransmit: 0, input: 0, saved: 0
|
Timer |
Starts |
Wakeups |
Next |
|
Retrans |
12 |
0 |
0x0 |
|
0 |
0 |
0x0 |
|
|
AckHold |
12 |
10 |
0x0 |
|
SendWnd |
0 |
0 |
0x0 |
|
KeepAlive |
0 |
0 |
0x0 |
|
GiveUp |
0 |
0 |
0x0 |
|
PmtuAger |
0 |
0 |
0x0 |
iss: 133981889 snduna: 133982166 sndnxt: 133982166 sndwnd: 16108
irs: 3317025518 rcvnxt: 3317025810 rcvwnd: 16093 delrcvwnd: 291
SRTT: 441 ms, RTTO: 2784 ms, RTV: 951 ms, KRTT: 0 ms minRTT: 0 ms, maxRTT: 3 00 ms, ACK hold: 3 00 ms Flags: higher precedence, nagle
Datagrams (max data segment is 1460 bytes):
Rcvd: 15 (out of order: 0), with data: 12, total data bytes: 291 Sent: 23 (retransmit: 0), with data: 11, total data bytes: 276
Table 46 describes the fields shown in the display.
|
Field |
Description |
|
BGP neighbor |
IP address of the BGP neighbor and its autonomous system number. If the neighbor is in the same autonomous system as the router, then the link between them is internal; otherwise, it is considered external. |
|
BGP version |
BGP version being used to communicate with the remote router; the neighbor's router ID (an IP address) is also specified. |
|
BGP state |
Internal state of this BGP connection. |
|
table version |
Indicates that the neighbor has been updated with this version of the primary BGP routing table. |
|
up for |
Amount of time that the underlying TCP connection has been in existence. |
_BGP Commands |
I show ip bgp neighbors
|
Field |
Description |
|
Last read |
Time that BGP last read a message from this neighbor. |
|
hold time |
Maximum amount of time that can elapse between messages from the peer. |
|
keepalive interval |
Time period between sending keepalive packets, which help ensure that the TCP connection is up. |
|
Received |
Number of total BGP messages received from this peer, including keepalives. |
|
notifications |
Number of error messages received from the peer. |
|
Sent |
Total number of BGP messages that have been sent to this peer, including keepalives. |
|
notifications |
Number of error messages the router has sent to this peer. |
|
Connections established |
Number of times the router has established a TCP connection and the two peers have agreed speak BGP with each other. |
|
dropped |
Number of times that a good connection has failed or been taken down. |
|
Connection state |
State of BGP peer. |
|
unread input bytes |
Number of bytes of packets still to be processed. |
|
Local host, Local port |
Peering address of local router, plus port. |
|
Foreign host, Foreign port |
Neighbor's peering address. |
|
Event Timers |
Table displays the number of starts and wakeups for each timer. |
|
iss |
Initial send sequence number. |
|
snduna |
Last send sequence number the local host sent but has not received an acknowledgment for. |
|
sndnxt |
Sequence number the local host will send next. |
|
sndwnd |
TCP window size of the remote host. |
|
irs |
Initial receive sequence number. |
|
rcvnxt |
Last receive sequence number the local host has acknowledged. |
|
rcvwnd |
Local host's TCP window size. |
|
delrecvwnd |
Delayed receive window—data the local host has read from the connection, but has not yet subtracted from the receive window the host has advertised to the remote host. The value in this field gradually increases until it is larger than a full-sized packet, at which point it is applied to the rcvwnd field. |
|
SRTT |
A calculated smoothed round-trip timeout. |
|
RTTO |
Round-trip timeout. |
|
RTV |
Variance of the round-trip time. |
|
KRTT |
New round-trip timeout (using the Karn algorithm). This field separately tracks the round-trip time of packets that have been retransmitted. |
show ip bgp neighbors H
|
Field |
Description |
|
minRTT |
Smallest recorded round-trip timeout (hard wire value used for calculation). |
|
maxRTT |
Largest recorded round-trip timeout. |
|
ACK hold |
Time the local host will delay an acknowledgment in order to piggyback data on it. |
|
Flags |
IP precedence of the BGP packets. |
|
Datagrams: Rcvd |
Number of update packets received from neighbor. |
|
with data |
Number of update packets received with data. |
|
total data bytes |
Total bytes of data. |
|
Sent |
Number of update packets sent. |
|
with data |
Number of update packets with data sent. |
|
total data bytes |
Total number of data bytes. |
The following is sample output from the show ip bgp neighbors command with advertised-routes:
Router# show ip bgp neighbors 172.16.232.178 advertised-routes
BGP table version is 27, local router ID is 172.16.232.181
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Network Next Hop Metric LocPrf Weight Path
*>i110.0.0.0 172.16.232.179 0 100 0 ?
The following is sample output from the show ip bgp neighbors command with routes:
Router# show ip bgp neighbors 172.16.232.178 routes
BGP table version is 27, local router ID is 172.16.232.181
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0 172.16.232.178 40 0 10 ?
*> 10.2.0.0 172.16.232.178 40 0 10 ?
Table 47 describes the fields shown in the display.
|
Field |
Description |
|
BGP table version |
Internal version number of the table. This number is incremented whenever the table changes. |
|
local router ID |
IP address of the router. |
I show ip bgp neighbors
|
Field |
Description |
|
Status codes |
s—The table entry is suppressed. *—The table entry is valid. >—The table entry is the best entry to use for that network. i—The table entry was learned via an internal BGP session. |
|
Indicates the origin of the entry. The origin code is placed at the end of each line in the table. It can be one of the following values: i—Entry originated from IGP and was advertised with a network router configuration command. e—Entry originated from EGP. ?—Origin of the path is not clear Usually, this is a router that is redistributed into BGP from an IGP. |
|
|
Network |
IP address of a network entity. |
|
Next Hop |
IP address of the next system that is used when forwarding a packet to the destination network. An entry of 0.0.0.0 indicates that the router has some non-BGP routes to this network. |
|
Metric |
If shown, this is the value of the interautonomous system metric. This field is frequently not used. |
|
LocPrf |
Local preference value as set with the set local-preference route-map configuration command. The default value is 100. |
|
Weight |
Weight of the route as set via autonomous system filters. |
|
Path |
Autonomous system paths to the destination network. There can be one entry in this field for each autonomous system in the path. |
The following is sample output from the show ip bgp neighbors command with paths:
Router# show ip bgp neighbors 172.16.232.178 paths ^10
Address Refcount Metric Path 0x60E577B0 2 40 10 ?
| BGP Commands_
show ip bgp paths I
Continue reading here: Show ip bgp summary
Was this article helpful?