- Syntax
- show ip bgp [vrf
vrf-name] neighbors [ip-address | interface
interface-type] [advertised-routes | dampened-routes | flap-statistics | denied-routes | routes]
- Parameters
-
- vrf
vrf-name — Enter
vrf and then the name of the VRF to view information that is exchanged between BGP neighbors corresponding to that VRF.
- ip-address — Enter the IPv4 of IPv6 address of a specific neighbor.
- interface
interface-type — Displays BGP information that is learned through an unnumbered neighbor.
- denied-routes — Displays the list of routes that are denied by policy.
- advertised-routes—Displays the routes that are advertised to a neighbor.
- dampened-routes—Displays the suppressed routes that are received from a neighbor.
-
flap-statistics—Displays the flap statistics of routes that are received from a neighbor.
-
received-routes—Displays the routes that are received from a neighbor.
-
routes—Displays routes learned from a neighbor.
- Default
- Not configured
- Command Mode
- EXEC
- Usage Information
-
- BGP neighbor — Displays the BGP neighbor address and its AS number. The last phrase in the line indicates whether the link between the BGP router and its neighbor is an external or internal one. If they are located in the same AS, the link is internal; otherwise the link is external.
- BGP version — Displays the BGP version, always version 4, and the remote router ID.
- BGP state — Displays the BGP state of the neighbor and the amount of time in hours:minutes: seconds it has been in that state.
- Last read — Displays the information in the last read:
- Last read is the time in hours:minutes:seconds that the router read a message from its neighbor.
- Hold time is the number of seconds configured between messages from its neighbor.
- Keepalive interval is the number of seconds between keepalive messages to help ensure that the TCP session is still alive.
- Received messages — Displays the number of BGP messages received, the number of notifications or error messages, and the number of messages waiting in a queue for processing.
- Sent messages — Displays the number of BGP messages sent, the number of notifications or error messages, and the number of messages waiting in a queue for processing.
- Description — Displays the descriptive name that is configured for the BGP neighbor. This field is displayed only when the description is configured.
- Local host — Displays the peering address of the local router and the TCP port number.
- Foreign host — Displays the peering address of the neighbor and the TCP port number.
Although the status codes for routes that are received from a BGP neighbor may not display in the
show ip bgp neighbors
ip-address received-routes output, they display correctly in the
show ip bgp output.
This command displays the route-maps for incoming and outgoing traffic.
When you enable link-local-only-nexthop globally at the router BGP level or enabled at the neighbor or template level, the link-local address as both Next Hops enabled for unnumbered neighbors, the logs display along with the other configuration data for the unnumbered peer.
This log does not display for numbered peers even if you enable the feature globally. The system administrator (sysdmin role) is allowed to view this configuration.
- Example
-
MAA-S4048T-X01-7445(config-router-bgp-neighbor-af)# do show ip bgp neighbors 1.1
.1.2
BGP neighbor is 1.1.1.2, remote AS 65536, local AS 100 external link
Member of peer-group max for session parameters
BGP version 4, remote router ID 109.187.0.1
BGP state ESTABLISHED, in this state for 00:00:13
Last read 00:23:06 seconds
Hold time is 90, keepalive interval is 30 seconds
Configured hold time is 180, keepalive interval is 60 seconds
Fall-over disabled
Received 9 messages
2 opens, 0 notifications, 2 updates
5 keepalives, 0 route refresh requests
Sent 7 messages
2 opens, 1 notifications, 0 updates
4 keepalives, 0 route refresh requests
Minimum time between advertisement runs is 30 seconds
Minimum time before advertisements start is 0 seconds
Capabilities received from neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
4_OCTET_AS(65)
Capabilities received from neighbor for IPv6 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
4_OCTET_AS(65)
Capabilities advertised to neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
ADD_PATH(69)
Capabilities advertised to neighbor for IPv6 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
ADD_PATH(69)
Prefixes accepted 1, Prefixes advertised 0
Connections established 2; dropped 16
Closed by neighbor sent 00:00:14 ago
For address family: IPv4 Unicast
Max prefix set to 1 with threshold 1 warning only
Next hop set to self
Soft-reconfiguration inbound configured
Allow local AS number 0 times in AS-PATH attribute
Prefixes ignored due to:
Martian address 0, Our own AS in AS-PATH 0
Invalid Nexthop 0, Invalid AS-PATH length 0
Wellknown community 0, Locally originated 0
For address family: IPv6 Unicast
Max prefix set to 20 with threshold 10 warning only
Next hop set to self
Soft-reconfiguration inbound configured
Allow local AS number 0 times in AS-PATH attribute
Local host: 1.1.1.1, Local port: 49872
Foreign host: 1.1.1.2, Foreign port: 179
OS10#show ip bgp neighbors interface ethernet 1/1/1
BGP neighbor is fe80::250:56ff:fe80:7f39 via ethernet1/1/1, remote AS 100, local AS 200 external link
BGP version 4, remote router ID 2.2.2.1
BGP state ESTABLISHED, in this state for 00:50:19
Last read 00:31:31 seconds
Hold time is 180, keepalive interval is 60 seconds
Configured hold time is 180, keepalive interval is 60 seconds
Fall-over disabled
Received 77 messages
1 opens, 0 notifications, 0 updates
58 keepalives, 18 route refresh requests
Sent 71 messages
1 opens, 3 notifications, 0 updates
58 keepalives, 9 route refresh requests
Minimum time between advertisement runs is 30 seconds
Minimum time before advertisements start is 0 seconds
Capabilities received from neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
MP_L2VPN_EVPN(1) EXTENDED_NEXTHOP_ENCODING(5)
Capabilities received from neighbor for IPv6 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
MP_L2VPN_EVPN(1) EXTENDED_NEXTHOP_ENCODING(5)
Capabilities advertised to neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
MP_L2VPN_EVPN(1) EXTENDED_NEXTHOP_ENCODING(5)
Capabilities advertised to neighbor for IPv6 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
MP_L2VPN_EVPN(1) EXTENDED_NEXTHOP_ENCODING(5)
Prefixes accepted 0, Prefixes advertised 0
Connections established 1; dropped 0
Last reset never
For address family: IPv4 Unicast
Next hop set to self
Allow local AS number 0 times in AS-PATH attribute
Route map for incoming advertisements is filter_ipv4_intf_in
Route map for outgoing advertisements is filter_ipv4_intf_out
Prefixes ignored due to:
Martian address 0, Our own AS in AS-PATH 0
Invalid Nexthop 0, Invalid AS-PATH length 0
Wellknown community 0, Locally originated 0
For address family: IPv6 Unicast
Next hop set to self
Allow local AS number 0 times in AS-PATH attribute
Route map for incoming advertisements is filter_ipv6_intf_in
Route map for outgoing advertisements is filter_ipv6_intf_out
Prefixes ignored due to:
Martian address 0, Our own AS in AS-PATH 0
Invalid Nexthop 0, Invalid AS-PATH length 0
Wellknown community 0, Locally originated 0
Local host: fe80::250:56ff:fe80:8d56, Local port: 39054
Foreign host: fe80::250:56ff:fe80:7f39, Foreign port: 179
- Example advertised-routes
-
OS10# show ip bgp ipv6 unicast neighbors 192:168:1::2 advertised-routes
BGP local router ID is 100.1.1.1
Status codes: s suppressed, S stale, d dampened, h history, * valid, > best
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>55::/64 192:168:1::1 0 0 0 100i
*>55:0:0:1::/64 192:168:1::1 0 0 0 100i
*>55:0:0:2::/64 192:168:1::1 0 0 0 100i
*>55:0:0:3::/64 192:168:1::1 0 0 0 100i
*>55:0:0:4::/64 192:168:1::1 0 0 0 100i
*>55:0:0:5::/64 192:168:1::1 0 0 0 100i
*>55:0:0:6::/64 192:168:1::1 0 0 0 100i
*>55:0:0:7::/64 192:168:1::1 0 0 0 100i
*>55:0:0:8::/64 192:168:1::1 0 0 0 100i
*>55:0:0:9::/64 192:168:1::1 0 0 0 100i
*>172:16:1::/64 192:168:1::1 0 0 0 100?
Total number of prefixes: 11
OS10#
- Example received-routes
-
OS10# show ip bgp ipv6 unicast neighbors 172:16:1::2 received-routes
BGP local router ID is 100.1.1.1
Status codes: D denied
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Path
D 55::/64 172:16:1::2 0 0 i
55:0:0:1::/64 172:16:1::2 0 0 i
55:0:0:2::/64 172:16:1::2 0 0 i
D 55:0:0:3::/64 172:16:1::2 0 0 i
D 55:0:0:4::/64 172:16:1::2 0 0 i
D 55:0:0:5::/64 172:16:1::2 0 0 i
D 55:0:0:6::/64 172:16:1::2 0 0 i
55:0:0:7::/64 172:16:1::2 0 0 i
D 55:0:0:8::/64 172:16:1::2 0 0 i
D 55:0:0:9::/64 172:16:1::2 0 0 i
Total number of prefixes: 10
OS10#
- Example denied-routes
-
OS10# show ip bgp ipv6 unicast neighbors 172:16:1::2 denied-routes
BGP local router ID is 100.1.1.1
Status codes: D denied
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Path
D 55::/64 172:16:1::2 0 0 100 200 300 400i
D 55:0:0:1::/64 172:16:1::2 0 0 100 200 300 400i
D 55:0:0:2::/64 172:16:1::2 0 0 100 200 300 400i
Total number of prefixes: 3
OS10#
- Example routes
-
OS10# show ip bgp ipv6 unicast neighbors 172:16:1::2 routes
BGP local router ID is 100.1.1.1
Status codes: s suppressed, S stale, d dampened, h history, * valid, > best
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>55::/64 172:16:1::2 44 55 0 i
*>55:0:0:1::/64 172:16:1::2 44 55 0 i
*>55:0:0:2::/64 172:16:1::2 44 55 0 i
*>55:0:0:3::/64 172:16:1::2 44 55 0 i
*>55:0:0:4::/64 172:16:1::2 44 55 0 i
*>55:0:0:5::/64 172:16:1::2 44 55 0 i
*>55:0:0:6::/64 172:16:1::2 44 55 0 i
*>55:0:0:7::/64 172:16:1::2 44 55 0 i
*>55:0:0:8::/64 172:16:1::2 44 55 0 i
*>55:0:0:9::/64 172:16:1::2 44 55 0 i
Total number of prefixes: 10
OS10#
- Example unnumbered neighbors
-
OS10# show ip bgp neighbors interface ethernet1/1/1
BGP neighbor is fe80::76e6:e2ff:fef6:b81 via ethernet1/1/1, remote AS 100, local AS 200 external link
BGP version 4, remote router ID 125.12.57.117
BGP state ESTABLISHED, in this state for 00:15:52
Last read 00:21:08 seconds
Hold time is 180, keepalive interval is 60 seconds
Configured hold time is 180, keepalive interval is 60 seconds
Fall-over disabled
Received 20 messages
1 opens, 0 notifications, 0 updates
19 keepalives, 0 route refresh requests
Sent 20 messages
1 opens, 1 notifications, 0 updates
18 keepalives, 0 route refresh requests
Minimum time between advertisement runs is 30 seconds
Minimum time before advertisements start is 0 seconds
Capabilities received from neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
Extended Next Hop Encoding (5)
Capabilities advertised to neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
Extended Next Hop Encoding (5)
Prefixes accepted 0, Prefixes advertised 0
Connections established 1; dropped 0
Last reset never
Prefixes ignored due to:
Martian address 0, Our own AS in AS-PATH 0
Invalid Nexthop 0, Invalid AS-PATH length 0
Wellknown community 0, Locally originated 0
Local host: fe80::76e6:e2ff:fef5:b281, Local port: 45926
Foreign host: fe80::76e6:e2ff:fef6:b81, Foreign port: 179
- Example advertised-routes from unnumbered neighbors
-
OS10# show ip bgp neighbors interface ethernet 1/1/1 advertised-routes
BGP local router ID is 40.1.1.2
Status codes: s suppressed, S stale, d dampened, h history, * valid, > best
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 41.1.1.0/24 fe80::3617:ebff:fef1:dc5e 0 0 0 10
- Example received-routes from unnumbered neighbors
-
OS10# show ip bgp neighbors interface ethernet 1/1/1 received-routes
BGP local router ID is 40.1.1.2
Status codes: D denied
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 41.1.1.0/24 fe80::3617:ebff:fef1:dc5e 0 0 0 10
- Example routes from unnumbered neighbors
-
OS10# show ip bgp neighbors interface ethernet 1/1/1 routes
BGP local router ID is 40.1.1.2
Status codes: s suppressed, S stale, d dampened, h history, * valid, > best
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 31.1.1.0/24 fe80::3617:ebff:fefd:dc5e 0 100 0 10
- Example denied-routes from unnumbered neighbors
-
OS10# show ip bgp neighbors interface ethernet 1/1/1 denied-routes
BGP local router ID is 40.1.1.2
Status codes: D denied
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
D 51.1.1.0/24 fe80::3617:ebff:fef1:dc5e 0 0 0 10
- Example Global AS
-
OS10# show ip bgp neighbors 30.1.1.1
BGP neighbor is 30.1.1.1, remote AS 500, local AS 200 no-prepend replace-as external link
BGP version 4, remote router ID 20.20.20.20
BGP state ESTABLISHED, in this state for 00:10:19
OS10#
- Example (BGP unnumbered interop with FRR vendor)
-
Default VRF:
OS10# show ip bgp neighbors
BGP neighbor is fe80::1618:77ff:fe09:f785 via ethernet1/1/5, remote AS 100, local AS 200 external link
BGP version 4, remote router ID 1.1.1.1
BGP state ESTABLISHED, in this state for 00:13:33
Last read 00:00:06 seconds
Hold time is 9, keepalive interval is 3 seconds
Configured hold time is 180, keepalive interval is 60 seconds
Fall-over disabled
Link-local address as both nexthops enabled for unnumbered neighbors
Received 282 messages
2 opens, 0 notifications, 5 updates
275 keepalives, 0 route refresh requests
Sent 324 messages
2 opens, 4 notifications, 0 updates
318 keepalives, 0 route refresh requests
Minimum time between advertisement runs is 30 seconds
Minimum time before advertisements start is 0 seconds
Capabilities received from neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
GRACEFUL_RESTART(64)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
ADD_PATH(69)
EXTENDED_NEXTHOP_ENCODING(5)
Capabilities received from neighbor for IPv6 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
GRACEFUL_RESTART(64)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
ADD_PATH(69)
EXTENDED_NEXTHOP_ENCODING(5)
Capabilities advertised to neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
EXTENDED_NEXTHOP_ENCODING(5)
Capabilities advertised to neighbor for IPv6 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
EXTENDED_NEXTHOP_ENCODING(5)
Prefixes accepted 3, Prefixes advertised 0
Connections established 2; dropped 1
Closed by neighbor sent 00:13:33 ago
For address family: IPv4 Unicast
Next hop set to self
Allow local AS number 0 times in AS-PATH attribute
Prefixes ignored due to:
Martian address 0, Our own AS in AS-PATH 0
Invalid Nexthop 0, Invalid AS-PATH length 0
Wellknown community 0, Locally originated 0
Local host: fe80::1618:77ff:fe09:f385, Local port: 45332
Foreign host: fe80::1618:77ff:fe09:f785, Foreign port: 179
BGP neighbor is 120.1.1.1, remote AS 100, local AS 200 external link
BGP version 4, remote router ID 1.1.1.1
BGP state ESTABLISHED, in this state for 00:04:44
Last read 00:03:30 seconds
Hold time is 9, keepalive interval is 3 seconds
Configured hold time is 180, keepalive interval is 60 seconds
Fall-over disabled
Received 98 messages
1 opens, 0 notifications, 2 updates
95 keepalives, 0 route refresh requests
Sent 115 messages
1 opens, 3 notifications, 0 updates
111 keepalives, 0 route refresh requests
Minimum time between advertisement runs is 30 seconds
Minimum time before advertisements start is 0 seconds
Capabilities received from neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
GRACEFUL_RESTART(64)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
ADD_PATH(69)
Capabilities advertised to neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
Prefixes accepted 2, Prefixes advertised 0
Connections established 1; dropped 0
Last reset never
For address family: IPv4 Unicast
Allow local AS number 0 times in AS-PATH attribute
Prefixes ignored due to:
Martian address 0, Our own AS in AS-PATH 0
Invalid Nexthop 0, Invalid AS-PATH length 0
Wellknown community 0, Locally originated 0
Local host: 120.1.1.2, Local port: 56904
Foreign host: 120.1.1.1, Foreign port: 179
OS10#
Non-default VRF:
OS10# show ip bgp vrf red neighbors interface ethernet 1/1/7
BGP neighbor is fe80::1618:77ff:fe09:f787 via ethernet1/1/7, remote AS 100, local AS 200 external link
BGP version 4, remote router ID 1.1.1.1
BGP state ESTABLISHED, in this state for 00:03:36
Last read 00:00:15 seconds
Hold time is 9, keepalive interval is 3 seconds
Configured hold time is 180, keepalive interval is 60 seconds
Fall-over disabled
Link-local address as both nexthops enabled for unnumbered neighbors
Received 76 messages
1 opens, 0 notifications, 2 updates
73 keepalives, 0 route refresh requests
Sent 86 messages
2 opens, 0 notifications, 0 updates
84 keepalives, 0 route refresh requests
Minimum time between advertisement runs is 30 seconds
Minimum time before advertisements start is 0 seconds
Capabilities received from neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
GRACEFUL_RESTART(64)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
ADD_PATH(69)
EXTENDED_NEXTHOP_ENCODING(5)
Capabilities advertised to neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)
ROUTE_REFRESH(2)
CISCO_ROUTE_REFRESH(128)
4_OCTET_AS(65)
EXTENDED_NEXTHOP_ENCODING(5)
Prefixes accepted 2, Prefixes advertised 0
Connections established 1; dropped 0
Last reset never
For address family: IPv4 Unicast
Next hop set to self
Allow local AS number 0 times in AS-PATH attribute
Prefixes ignored due to:
Martian address 0, Our own AS in AS-PATH 0
Invalid Nexthop 0, Invalid AS-PATH length 0
Wellknown community 0, Locally originated 0
For address family: IPv6 Unicast
Next hop set to self
Allow local AS number 0 times in AS-PATH attribute
Local host: fe80::1618:77ff:fe09:f44c, Local port: 179
Foreign host: fe80::1618:77ff:fe09:f787, Foreign port: 51216
OS10#
- Supported Releases
- 10.3.0E or later