display bgp routing-table [ verbose | network [ { mask | mask-length } [ longer-prefixes ] ] ]
display bgp routing-table { as-path-filter { as-path-filter-number | as-path-filter-name } | cidr | different-origin-as }
display bgp routing-table regular-expression as-regular-expression
display bgp routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }
display bgp routing-table community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ]
display bgp routing-table peer ipv4-address [ advertised-routes [ network [ { mask | mask-length } [ longer-prefixes ] ] ] | received-routes [ active ] ]
display bgp routing-table peer ipv4-address received-routes network [ { mask | mask-length } [ longer-prefixes | original-attributes ] ]
display bgp routing-table peer ipv4-address accepted-routes
display bgp routing-table time-range start-time end-time
| Parameter | Description | Value |
|---|---|---|
verbose |
Displays detailed information about BGP public network routes. |
- |
network |
Specifies the IPv4 network address. |
- |
mask | mask-length |
Specifies a mask in dotted decimal notation or the mask length. |
- |
longer-prefixes |
Matches any route whose prefix mask is longer than the specified length. |
- |
as-path-filter |
Displays the public network routes that match the specified filter. |
- |
as-path-filter-number |
Specifies the number of an AS_Path filter. |
The value is an integer ranging from 1 to 256. |
as-path-filter-name |
Specifies the name of an AS_Path filter. |
The value is a string of 1 to 51 case-sensitive characters, spaces not supported. |
cidr |
Displays the public routing information about the Classless Inter-Domain Routing (CIDR). |
- |
different-origin-as |
Displays BGP public network routes with the same destination address but different source ASs. |
- |
regular-expression as-regular-expression |
Specifies the matched AS regular expression. |
The value is a string of 1 to 80 characters. |
community-filter |
Displays the public network routes that match the specified BGP community filter. |
- |
community-filter-name |
Specifies the name of a community filter. |
The value is a string of 1 to 51 characters. The string cannot be all numbers. |
basic-community-filter-number |
Specifies the number of a basic community filter. |
The value is an integer ranging from 1 to 99. |
whole-match |
Indicates the exact matching. |
- |
advanced-community-filter-number |
Specifies the number of an advanced community filter. |
The value is an integer ranging from 100 to 199. |
community |
Displays the public routing information of the specified BGP community attribute. |
- |
community-number |
Specifies the community number. |
The value is an integer ranging from 0 to 4294967295. |
aa:nn |
Specifies the community attribute number. You can set a maximum of 29 community numbers. |
Both aa and nn are integers ranging from 0 to 65535. |
internet |
Displays the BGP public network routes with the Internet community attribute. |
- |
no-advertise |
Displays the BGP public network routes with the No-Advertise community attribute. |
- |
no-export |
Displays the BGP public network routes with the No-Export community attribute. |
- |
no-export-subconfed |
Displays the BGP public network routes with the No-Export-Subconfed community attribute. |
- |
peer ipv4-address |
Displays the public routing information for the specified BGP peer. |
- |
advertised-routes |
Displays the public network routes advertised to the specified peer. |
- |
received-routes |
Displays the public network routes received from the specified peer. |
- |
active |
Displays the active routes received from the specified peer. |
- |
original-attributes |
Displays the original attributes of a public network route from a specified BGP peer before the route is filtered using the local import policy. To display such attributes, the peer keep-all-routes command must have been run. |
- |
accepted-routes |
Displays the public network routes that are received from the peer and accepted by the local device. |
- |
time-range start-time end-time |
Displays BGP public network routes that flap within the specified period. For example, the value 0d0h5m0s of start-time indicates five minutes before the current time. The value 0d0h10m0s of end-time indicates 10 minutes before the current time. All BGP public network routes with the Keepalive time in the range of 5 to 10 minutes are displayed. |
The formats of start-time and end-time both are xxdxxhxxmxxs.
NOTE:
If the value of the d is 10000, the values of the h, m, and s can be only 0. |
When the BGP routing table is displayed, if the length of the destination address mask of an IPv4 route is the same as that of its natural mask, the mask length is not displayed.
You can run the display bgp routing-table time-range start-time end-time command to view BGP routes that flap within the specified period. For example, if service traffic is abnormal or CPU usage of the device remains high within a period, you can run this command to check whether route flapping occurs within the period. The faulty route can be viewed in the command output, facilitating fault location.
# Display information about all BGP routes.
<sysname> display bgp routing-table
BGP Local router ID is 1.1.1.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 4
Network NextHop MED LocPrf PrefVal Path/Ogn
* 1.1.1.0/24 1.1.1.1 0 0 100?
* 1.1.1.2/32 1.1.1.1 0 0 100?
*> 10.1.1.0/24 1.1.1.1 0 0 100?
*> 10.10.1.0/24 1.1.1.1 0 0 100?
# Display the routing information with the community attribute.
<sysname> display bgp routing-table community
BGP Local router ID is 1.1.1.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 4
Network NextHop MED LocPrf PrefVal Community
* 1.1.1.0/24 1.1.1.1 0 0 no-export
* 1.1.1.2/32 1.1.1.1 0 0 no-export
*> 10.1.1.0/24 1.1.1.1 0 0 no-export
*> 10.10.1.0/24 1.1.1.1 0 0 no-export
# Display the routes that match the AS regular expression ^1.
<sysname> display bgp routing-table regular-expression ^1
BGP Local router ID is 1.1.1.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* 1.1.1.0/24 1.1.1.1 0 0 100?
* 1.1.1.2/32 1.1.1.1 0 0 100?
*> 10.1.1.0/24 1.1.1.1 0 0 100?
*> 10.10.1.0/24 1.1.1.1 0 0 100?
# Display BGP routes that flap within the specified period.
<sysname> display bgp routing-table time-range 0d0h5m3s 1d1h1m1s
Network NextHop Peer Duration Path/Ogn *>i 1.1.1.2/32 10.1.1.2 10.1.1.2 01h42m09s ? * i 10.2.1.2 10.2.1.2 01h42m09s ? *>i 1.1.1.3/32 10.1.1.2 10.1.1.2 01h42m09s ? * i 10.2.1.2 10.2.1.2 01h42m09s ? *>i 1.1.1.4/32 10.1.1.2 10.1.1.2 01h42m09s ? * i 10.2.1.2 10.2.1.2 01h42m09s ? *> 1.2.3.4/32 0.0.0.0 0.0.0.0 01h42m39s ? *>i 10.10.10.10/32 10.1.1.2 10.1.1.2 01h42m09s ? * i 10.2.1.2 10.2.1.2 01h42m09s ?
Item |
Description |
|---|---|
Network |
Network address in the BGP routing table |
Next Hop |
Next hop address through which the packet has to be sent |
MED |
Multi-Exit discriminator |
LocPrf |
Local_Pref |
PrefVal |
PrefVal of a route |
Peer |
Peer IP address |
Duration |
Route duration |
Path/Ogn |
AS_Path number and the Origin attribute |
Community |
Community attributes |
# Display the detailed information of the specified routes.
<sysname> display bgp routing-table 10.1.1.0
BGP local router ID : 10.1.2.2 Local AS number : 65002 Paths: 2 available, 1 best, 1 select BGP routing table entry information of 10.1.1.0/24: From: 10.1.2.1 (10.1.1.1) Route Duration: 00h04m37s Direct Out-interface: GigabitEthernet0/0/0 Original nexthop: 10.1.2.1 Qos information : 0x0 AS-path 65001, origin incomplete, MED 0, pref-val 0, valid, external, best, select, active, pre 255 Advertised to such 2 peers: 10.1.2.1 10.1.3.1 BGP routing table entry information of 10.1.1.0/24: From: 10.1.3.1 (10.1.1.2) Route Duration: 00h04m10s Direct Out-interface: GigabitEthernet0/0/1 Original nexthop: 10.1.3.1 Qos information : 0x0 AS-path 65001, origin incomplete, MED 0, pref-val 0, valid, external, backup, pre 255, not preferred for router ID Not advertised to any peer yet
Item |
Description |
|---|---|
BGP local router ID |
ID of the local BGP device. The format is the same as the IPv4 address. |
Local AS number |
Local AS number. |
Paths |
BGP routes. |
BGP routing table entry information of 10.1.1.0/24 |
The following information is about 10.1.1.0/24 routing entries. |
From |
IP address of the router that sends the route. 10.1.2.1 is the source interface IP address of the peer with which the BGP connection is established, and 10.1.1.1 is the router ID of the peer. |
Route Duration |
Duration of routes. |
Direct Out-interface |
Direct outbound interface. |
Original nexthop |
Original next hop.
NOTE:
If no routes to the BGP original next hop are available in the IP routing table, BGP routes cannot be advertised. In this case, find out why there is no route to the original next hop (this fault is generally associated with IGP or static routes). |
Qos information |
QoS information. |
AS-path 65001 |
AS_Path attribute. 65001 indicates the number of the AS that the route from the local to the destination passes through. |
origin incomplete |
Well-known mandatory attribute. This attribute defines the origin of a path and records how a route turns to a BGP route. The attribute has the following three values:
|
valid |
The BGP route is a valid route. |
internal |
The BGP route is an internal route. |
best |
The BGP route is an optimal route. |
select |
The BGP route is a preferred route. |
external |
The BGP route is an external route. |
backup |
The BGP route is a backup route. It will be displayed only after the FRR function is enabled. |
active |
The BGP route is an active route. |
pre 255 |
The priority of the BGP route is 255. |
route-select delaying |
The route is in the delayed route selection state. This field is displayed if the route-select delay command has been run, and there are routes delayed to be selected. |
Not advertised to any peer yet |
The BGP route has not been advertised to any peer yet. |
not preferred for router ID |
The route is not selected as the optimal route because of the router ID of the advertiser. The following rules are used when selecting an optimal route:
|
# Display routes with prefix 10.11.1.0 and mask greater than 24 sent by 2.2.2.2.
<sysname> display bgp routing-table peer 2.2.2.2 received-routes 10.11.1.0 24 longer-prefixes
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 10.11.1.0/24 2.2.2.2 0 100 0 ?
*>i 10.11.1.0/25 2.2.2.2 0 100 0 ?
# Display the original attributes of the route to 10.11.1.0/24 sent by 2.2.2.2.
<sysname> display bgp routing-table peer 2.2.2.2 received-routes 10.11.1.0 24 original-attributes
BGP local router ID : 1.1.1.1 Local AS number : 100 BGP routing table entry information of 10.11.1.0/24: From: 2.2.2.2 (2.2.2.2) Route Duration: 00h00m11s Relay IP Nexthop: 192.168.1.2 Relay IP Out-Interface: GigabitEthernet0/0/1 Original nexthop: 2.2.2.2 Qos information : 0x0 AS-path Nil, origin incomplete, MED 0, localpref 100, pref-val 0, valid, internal, best, select, active, pre 255, IGP cost 1, AIGP 1 Not advertised to any peer yet
Item |
Description |
|---|---|
Relay IP Nexthop |
IP iterated next hop. |
Relay IP Out-Interface |
IP iterated outbound interface. |
AIGP |
Accumulated interior gateway protocol metric attribute. |