The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes the Cisco NX-OS Border Gateway Protocol (BGP) show commands.
To display Border Gateway Protocol (BGP) routes, use the show bgp command.
show bgp {all | ipv4 {unicast | multicast} [addr | prefix [longer-prefixes]] [vrf vrf-name | all]}
None
|
|
5.0(3)N1(1) |
This command was introduced. |
Use the show bgp command to display information about BGP.
This command requires the LAN Enterprise Services license.
This example shows how to display an entry in the BGP table:
switch# show bgp ipv4 multicast
BGP routing table information for VRF default, address family IPv4 Multicast
BGP table version is 5, local router ID is 2.2.2.3
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath
Network Next Hop Metric LocPrf Weight Path
l92.168.1.3 0.0.0.0 100 32768 i
switch#
|
|
---|---|
clear bgp |
Clears entries in the BGP table. |
To display Border Gateway Protocol (BGP) routes that match a community, use the show bgp community command.
show bgp {{ip | ipv4} {unicast | multicast}} community [as-number] [no-advertise] [no-export] [no-export-subconfed] [exact-match]} [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the routes that match a community:
switch#
show bgp ip multicast community no-advertise
|
|
---|---|
ip community-list |
Creates a community list. |
To display Border Gateway Protocol (BGP) routes that match a community list, use the show bgp community-list command.
show bgp {{ip | ipv4} {unicast | multicast}} community-list commlist-name [exact-match] [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the routes that match a community list:
switch(
config)#
show bgp ip unicast community-list test1
|
|
---|---|
ip community-list |
Creates a community list. |
To display Border Gateway Protocol (BGP) routes that match an extended community, use the show bgp extcommunity command.
show bgp {{ip | ipv4} {unicast | multicast}} extcommunity 4byteas-generic {non-transitive | transitive} [as4-number] [exact-match] [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the routes that match an extended community:
switch(
config)#
show bgp ip unicast extcommunity 4byteas-generic transitive 1.3:30
|
|
---|---|
ip extcommunity-list |
Creates an extended community list. |
To display Border Gateway Protocol (BGP) routes that match an extended community list, use the show bgp extcommunity-list command.
show bgp {{ip | ipv4} {unicast | multicast}} extcommunity-list commlist-name [exact-match] [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the routes that match a community list:
switch(
config)#
show bgp ipv4 unicast extcommunity-list test1
|
|
---|---|
ip extcommunity-list |
Creates an extended community list. |
To display Border Gateway Protocol (BGP) neighbors, use the show bgp neighbors command.
show bgp {ip | ipv4} {unicast | multicast} neighbors [addr [advertised-routes | flap-statistics | paths | received-routes | routes [advertised | dampened | received]]] [vrf {all | vrf-name}]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP neighbors:
switch(
config)#
show bgp ip unicast neighbors
|
|
---|---|
show ip bgp neighbors |
Displays the IPv4 BGP information. |
To display Border Gateway Protocol (BGP) sessions, use the show bgp sessions command.
show bgp sessions [vrf vrf-name]
vrf vrf-name |
(Optional) Specifies the virtual router context (VRF) name. The name can be any case-sensitive, alphanumeric string up to 32 characters. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP sessions:
switch#
show bgp sessions
Total peers 2, established peers 0
ASN 102
VRF default, local ASN 102
peers 2, established peers 0, local router-id 2.2.2.3
State: I-Idle, A-Active, O-Open, E-Established, C-Closing, S-Shutdown
Neighbor ASN Flaps LastUpDn|LastRead|LastWrit St Port(L/R) Notif(S/R)
10.0.0.100 64497 0 01:31:58|never |never I 0/0 0/0
192.168.1.3 0 0 00:03:25|never |never I 0/0 0/0
switch
#
|
|
---|---|
clear bgp |
Clears BGP sessions. |
To display Border Gateway Protocol (BGP) traffic statistics, use the show bgp statistics command.
show bgp statistics
This command has no argument or keywords.
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP traffic statistics:
switch#
show bgp statistics
Neighbor aggregated statistics (sent/received)
Msgs Bytes Opens Updates
0/0 0/0 0/0 0/0
Keepalives Notifications Route-refresh Capabilities
0/0 0/0 0/0 0/0
BGP I/O Information
Active Open attempts : 0
Passive Open attempts : 0
BGP I/O Open loops : 117
BGP I/O Open calls : 0
BGP I/O Open recv calls : 0
BGP I/O Send calls : 0
BGP I/O Recv calls : 0
BGP I/O Write calls : 0
BGP I/O Write loops : 1
BGP I/O Write loop yields : 0
BGP I/O Read calls : 0
BGP I/O Read loops : 117
BGP I/O Read loop yields : 0
BGP I/O process nlri yields : 0
BGP I/O process withdraw yields : 0
BGP Read time exceeded : 0
BGP Update send pending : 0
BGP Update buffer not available : 0
BGP Update walk suspended : 0
BGP Yielded in updates : 0
BGP Yielded in packing : 0
BGP No sendbuf for peer : 0
BGP No withdraw buf for peer : 0
BGP Yields in update peer loop : 0
No updates pending or no buffers : 1
No data to write : 1
Msg queue recv errors : 0
Sockets create/accept/close : 2/0/0
Sockets create retries/failures : 0/0
switch
#
|
|
---|---|
clear bgp |
Clears BGP sessions. |
To display entries in the Border Gateway Protocol (BGP) table, use the show ip bgp command.
show ip bgp [ip-addr | ip-prefix [longer-prefixes]] [received-paths] [regexp expression] [route-map map-name] [summary] [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP route table:
switch(config-router)# show ip bgp
|
|
---|---|
clear ip bgp |
Clears entries in the BGP route table. |
To display the Border Gateway Protocol (BGP) entries for all address families, use the show ip bgp all command.
show ip bgp all [ip-addr | ip-prefix [longer-prefixes]] [filter-list list-name] [community-list commlist-name [exact-match]] [flap-statistics] [nexthop-database] [received-paths] [regexp expression][route-map map-name] [summary] [vrf {vrf-name | all}]
show ip bgp all community [comm-name] [{{internet | no-advertise | no-export | no-export-subconfed} | exact-match}] [vrf {vrf-name | all}]
show ip bgp all extcommunity 4byteas-generic {non-transitive | transitive} [as4-number] [exact-match] [vrf {vrf-name | all}]
show ip bgp all dampening {dampened-paths [regexp expression] | flap-statistics | history-paths [regexp expression] | parameters} [vrf {vrf-name | all}]
show ip bgp all neighbors [ip-addr [advertised-routes | flap-statistics | paths | received-routes | routes [advertised | dampened | received]]] [vrf {vrf-name | all}]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP entries for all address families:
switch# show ip bgp all
BGP routing table information for VRF default, address family IPv4 Multicast
BGP table version is 5, local router ID is 2.2.2.3
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath
Network Next Hop Metric LocPrf Weight Path
l92.168.1.3/2 0.0.0.0 100 32768 i
switch#
This example shows how to display a summary of the state of the BGP route table:
switch# show ip bgp all summary
BGP summary information for VRF default, address family IPv4 Multicast
BGP router identifier 2.2.2.3, local AS number 102
BGP table version is 5, IPv4 Multicast config peers 2, capable peers 0
1 network entries and 1 paths using 104 bytes of memory
BGP attribute entries [1/124], BGP AS path entries [0/0]
BGP community entries [0/0], BGP clusterlist entries [0/0]
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.100 4 64497 0 0 0 0 0 03:20:10 Idle
192.168.1.3 4 0 0 0 0 0 0 01:51:38 Idle
switch#
|
|
---|---|
clear ip bgp |
Clears entries in the BGP route table. |
To display Border Gateway Protocol (BGP) routes that match a community list, use the show ip bgp community command.
show ip bgp community {community-number] [{internet | no-advertise | no-export | no-export-subconfed}} [vrf {vrf-name | all}]
None
Any command mode
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the routes that are part of the 201 BGP community:
switch# show ip bgp community 201
This example shows how to display the routes that are part of the no-advertise BGP community and all VRF:
switch# show ip bgp community no-advertise
To display routes that matches a specific Border Gateway Protocol (BGP) community, use the show ip bgp community exact-match command.
show ip bgp community community-number exact-match [vrf {all | vrf-name}]
None
Any command mode
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the routes that have exactly the same specified BGP communities:
switch# show ip bgp community 201 exact-match
To display Border Gateway Protocol (BGP) routes that are permitted by the BGP community list, use the show ip bgp community-list command.
show ip bgp [ipv4 {unicast | multicast} | all] community-list commlist-name [exact-match]} [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display routes that match a community list:
switch(
config)#
show ip bgp community-list test1
|
|
---|---|
ip community-list |
Creates a community list. |
To display Border Gateway Protocol (BGP) dampening information, use the show ip bgp dampening command.
show ip bgp [ipv4 {unicast | multicast} | all] dampening {dampened-paths [regexp expression] | flap-statistics | history-paths [regexp expression] | parameters} [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the dampening information:
switch(
config)#
show ip bgp dampening dampened-paths
|
|
---|---|
address-family (BGP router) |
Configures BGP parameters. |
dampening (BGP) |
Configures the route flap dampening. |
To display Border Gateway Protocol (BGP) routes that match an extended community, use the show ip bgp extcommunity command.
show ip bgp extcommunity generic {non-transitive | transitive} [as4-number] [exact-match] [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display routes that match an extended community:
switch(
config)#
show ip bgp extcommunity generic transitive 1.3:30
|
|
---|---|
ip extcommunity-list |
Creates an extended community list. |
To display Border Gateway Protocol (BGP) routes that match an extended community list, use the show ip bgp extcommunity-list command.
show ip bgp extcommunity-list commlist-name [exact-match] [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display routes that match a community list:
switch(
config)#
show ip bgp extcommunity-list test1
|
|
---|---|
ip extcommunity-list |
Creates an extended community list. |
To display Border Gateway Protocol (BGP) routes that match a filter list, use the show ip bgp filter-list command.
show ip bgp filter-list list-name [exact-match] [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display routes that match a filter list:
switch(
config)#
show ip bgp filter-list test1
|
|
---|---|
filter-list |
Assigns an autonomous system (AS) path filter to a BGP peer. |
show ip bgp all |
Displays the BGP entries for all address families. |
To display Border Gateway Protocol (BGP) flap statistics, use the show ip bgp flap-statistics command.
show ip bgp flap-statistics [vrf vrf-name]
vrf vrf-name |
(Optional) Specifies the virtual router context (VRF) name. The name can be any case-sensitive, alphanumeric string up to 32 characters. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the flap statistics:
switch(
config)#
show ip bgp flap-statistics
|
|
---|---|
clear bgp flap-statistics |
Clears BGP route flap statistics. |
To display Border Gateway Protocol (BGP) neighbors, use the show ip bgp neighbors command.
show ip bgp neighbors [addr [advertised-routes | flap-statistics | paths | received-routes | routes [advertised | dampened | received]]] [vrf {all | vrf-name}]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP neighbors:
switch(
config)#
show ip bgp neighbors
|
|
---|---|
neighbor |
Configures BGP neighbors. |
To display Border Gateway Protocol (BGP) next-hop information, use the show ip bgp nexthop command.
show ip bgp nexthop addr [vrf vrf-name]
addr |
IPv4 address. The format is x.x.x.x |
vrf vrf-name |
(Optional) Specifies the virtual router context (VRF) name. The name can be any case-sensitive, alphanumeric string up to 32 characters. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP next-hop information:
switch(
config)#
show ip bgp nexthop 192.0.2.1
|
|
---|---|
show ip bgp neighbors |
Displays BGP neighbor information. |
To display Border Gateway Protocol (BGP) next-hop database, use the show ip bgp nexthop-database command.
show ip bgp nexthop-database [vrf vrf-name]
vrf vrf-name |
(Optional) Specifies the virtual router context (VRF) name. The name can be any case-sensitive, alphanumeric string up to 32 characters. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP next-hop database:
switch(
config)#
show ip bgp nexthop-database
|
|
---|---|
show ip bgp neighbors |
Displays BGP neighbor information. |
To display all the Border Gateway Protocol (BGP) paths in the database, use the show ip bgp paths command.
show ip bgp paths
This command has no arguments or keywords.
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP paths in the database:
switch(
config)#
show ip bgp paths
Address Hash Refcount Metric Path
0x5a5e46bc 2001 1 0 i
switch#
To display Border Gateway Protocol (BGP) peer policy template information, use the show ip bgp peer-policy command.
show ip bgp peer-policy name
name |
Name of a BGP template. The name can be any case-sensitive, alphanumeric string up to 63 characters. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP peer policy:
switch(
config)#
show ip bgp peer-policy test1
|
|
---|---|
inherit peer-policy |
Inherits a peer policy template for a neighbor. |
template peer-policy |
Configures a peer policy template. |
To display Border Gateway Protocol (BGP) peer session template information, use the show ip bgp peer-session command.
show ip bgp peer-session name
name |
Name of a BGP template. The name can be any case-sensitive, alphanumeric string up to 63 characters. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP peer session:
switch(
config)#
show ip bgp peer-session test1
|
|
---|---|
inherit peer-session |
Inherits a peer session template for a neighbor. |
template peer-session |
Configures a peer session template. |
To display Border Gateway Protocol (BGP) peer template information, use the show ip bgp peer-template command.
show ip bgp peer-template name
name |
Name of a BGP template. The name can be any case-sensitive, alphanumeric string up to 63 characters. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP peer template:
switch(
config)#
show ip bgp peer-template peer1
|
|
---|---|
inherit peer-template |
Inherits a peer template for a neighbor. |
template peer |
Configures a peer template. |
To display Border Gateway Protocol (BGP) routes that match a prefix list, use the show ip bgp prefix-list command.
show ip bgp prefix-list list-name [exact-match] [vrf vrf-name]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display routes that match a prefix list:
switch(
config)#
show ip bgp prefix-list test1
|
|
---|---|
maximum-prefix |
Controls the number of prefixes that can be received from a BGP neighbor. |
To display the routes received from a Border Gateway Protocol (BGP) peer, use the show ip bgp received-paths command.
show ip bgp received-paths [vrf vrf-name | all]
vrf vrf-name |
(Optional) Specifies the virtual router context (VRF) name. The name can be any case-sensitive, alphanumeric string up to 32 characters. |
all |
(Optional) Specifies all VRF. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the received routes from a BGP peer:
switch(
config)#
show ip bgp received-paths
|
|
---|---|
show ip bgp neighbors |
Displays BGP neighbor information. |
To display the Border Gateway Protocol (BGP) route maps from the BGP table, use the show ip bgp route-map command.
show ip bgp route-map route-map-name [vrf vrf-name | all]
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the BGP route maps from the BGP table:
switch(
config)#
show ip bgp route-map
|
|
---|---|
route-map |
Creates route maps. |
clear ip bgp |
Clear BGP routes from the BGP table. |
To display the status of all Border Gateway Protocol (BGP) connections, use the show ip bgp summary command.
show ip bgp summary [vrf vrf-name | all]
vrf vrf-name |
(Optional) Specifies the virtual router context (VRF) name. The name can be any case-sensitive, alphanumeric string up to 32 characters. |
all |
(Optional) Specifies all VRF. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise Services license.
This example shows how to display the status of BGP connections:
switch(
config)#
show ip bgp summary
|
|
---|---|
maximum-prefix |
Controls the number of prefixes that can be received from a BGP neighbor. |
router bgp |
Assigns an autonomous system (AS) number to a router. |
To display community lists for the Border Gateway Protocol (BGP), use the show ip community-list command.
show ip community-list [name]
name |
(Optional) Name of the community list. The name can be any case-sensitive, alphanumeric string up to 63 characters. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
To display prefix lists for the Border Gateway Protocol (BGP), use the show ip prefix-list command.
show ip prefix-list [name]
name |
(Optional) Name of community list. The name can be any case-sensitive, alphanumeric string up to 63 characters. |
None
|
|
5.0(3)N1(1) |
This command was introduced. |
This example shows how to display the prefix lists:
switch(config)# show ip prefix-list
|
|
---|---|
ip prefix-list |
Configures a BGP prefix list. |
To display the entries in a MAC list, use the show mac-list command.
show mac-list [name]
name |
(Optional) MAC list name. The name can be any case-sensitive, alphanumeric string up to 32 characters. |
No match values are defined.
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
This command requires the LAN Enterprise license.
This example shows how to display information about the Red MAC list:
switch(config)# show mac-list Red
|
|
---|---|
mac-list |
Creates a MAC list. |
match mac-list |
Matches a MAC address in a MAC list. |
To display the virtual routing and forwarding (VRF) instances, use the show vrf command.
show vrf
This command has no arguments or keywords.
None
EXEC mode
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
This command does not require a license.
This example shows how to display the VRF instances configured on the switch:
switch# show vrf
VRF-Name VRF-ID State Reason
default 1 Up --
management 2 Up --
switch#
|
|
---|---|
vrf |
Configures a VRF instance. |
vrf context |
Creates a VRF instance. |
vrf member |
Adds an interface to a VRF. |
To display the detailed information of virtual routing and forwarding (VRF) instances, use the show vrf detail command.
show vrf detail
This command has no arguments or keywords.
None
EXEC mode
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
By default, this command displays the detailed information of the default VRF and management VRF.
This command does not require a license.
This example shows how to display the detailed information of VRF instances configured on the switch:
switch# show vrf detail
VRF-Name: default, VRF-ID: 1, State: Up
Table-ID: 0x80000001, AF: IPv6, Fwd-ID: 0x80000001, State: Up
Table-ID: 0x00000001, AF: IPv4, Fwd-ID: 0x00000001, State: Up
VRF-Name: management, VRF-ID: 2, State: Up
Table-ID: 0x80000002, AF: IPv6, Fwd-ID: 0x80000002, State: Up
Table-ID: 0x00000002, AF: IPv4, Fwd-ID: 0x00000002, State: Up
switch#
|
|
---|---|
vrf |
Configures a VRF instance. |
vrf context |
Creates a VRF instance. |
vrf member |
Adds an interface to a VRF. |
To display the virtual routing and forwarding (VRF) information for interfaces, use the show vrf interface command.
show vrf interface [mgmt mgmt-number | vlan vlan-ID]
All interfaces
EXEC mode
|
|
---|---|
5.0(3)N1(1) |
This command was introduced. |
This command does not require a license.
This example shows how to display the VRF information for all configured interfaces:
switch# show vrf interface
Interface VRF-Name VRF-ID
Vlan1 default 1
Vlan5 default 1
loopback1 default 1
mgmt0 management 2
switch#
This example shows how to display the VRF information for management interfaces:
switch# show vrf interface mgmt 0
Interface VRF-Name VRF-ID
mgmt0 management 2
switch#
This example shows how to display the VRF information for VLAN interfaces:
switch# show vrf interface vlan 1
Interface VRF-Name VRF-ID
Vlan1 default 1
switch#
|
|
---|---|
vrf member |
Adds an interface to a VRF. |