This section describes how to check route attributes.
Table 1 lists all the common route attributes that affect route selection and the commands that are used to check them.
Route Attribute |
Command Used to Check the Route Attribute |
---|---|
Origin AS |
display bgp routing-table [ network ] |
PrefVal |
display bgp routing-table [ network ] |
Local_Pref |
display bgp routing-table [ network ] |
Route type |
display bgp routing-table network |
AIGP |
display bgp routing-table network |
AS_Path |
display bgp routing-table [ network ] |
Origin |
display bgp routing-table [ network ] |
MED |
display bgp routing-table [ network ] |
Peer type |
display bgp routing-table network |
IGP Metric |
|
Cluster_List |
display bgp routing-table network |
Originator_ID |
display bgp routing-table network |
Router ID |
display bgp routing-table network |
Peer IP address |
display bgp routing-table network |
The following example describes how to check BGP route attributes in the display bgp routing-table command output.
<HUAWEI> display bgp routing-table BGP Local router ID is 1.1.1.2 Status codes: * - valid, > - best, d - damped, x - best external, a - add path, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete RPKI validation codes: V - valid, I - invalid, N - not-found 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? *> 5.1.1.0/24 1.1.1.1 0 0 100? *> 10.10.1.0/24 1.1.1.1 0 0 100?
Item |
Description |
---|---|
BGP Local router ID is 1.1.1.2 |
Router ID: 1.1.1.2, in the same format as an IPv4 address |
Status codes |
Route status code, displayed in front of each route entry:
BGP dampening measures route stability using a penalty value. The greater the penalty value, the less stable a route. Each time route flapping occurs (a device receives a Withdraw or an Update packet), BGP adds a penalty value to the route carried in the packet. When the penalty value of a route exceeds the Suppress value, BGP suppresses the route by replacing the > sign of the route with the d or h sign. The route is ignored and its Update packets are not advertised to other BGP peers until the penalty value of the route decreases to the Reuse value.
The penalty value is not increased after it reaches the suppression threshold. The penalty value of a suppressed route reduces by half after a half-life period.
|
Origin |
Route origin code:
|
RPKI validation codes |
Route origin AS validation code.
|
Network |
Network address in the BGP routing table |
NextHop |
Next hop address |
MED |
MED value of a BGP route, similar to the cost of IGP routes |
LocPrf |
Local_Pref |
PrefVal |
PrefVal |
Path/Ogn |
AS_Path and Origin attributes |
Information about Next_Hop, MED, Local_Pref, PrefVal, AS_Path, and Origin can be displayed using the display bgp routing-table command. To check information about the route type, AIGP, peer type, IGP cost, Cluster_List, router ID, and peer IP address, run the display bgp routing-table network command.
<HUAWEI> display bgp routing-table 10.1.1.1 BGP local router ID : 192.168.2.2 Local AS number : 100 Paths: 1 available, 1 best, 1 select, 0 best-external, 0 add-path BGP routing table entry information of 10.1.1.1/32: From: 10.1.3.1 (192.168.2.3) Route Duration: 0d00h01m33s Direct Out-interface: GigabitEthernet0/1/0 Relay is delayed as nexthop flapped frequently Original nexthop: 10.1.3.1 Qos information : 0x0 Primary Routing Table: vrf1 AS-path 200, origin incomplete, MED 0, pref-val 0, valid, external, best, select, active, pre 255, IGP cost 20 Advertised to such 1 peers: 10.1.3.1
Item |
Description |
---|---|
BGP local router ID |
Router ID of the local device, in the same format as an IPv4 address. |
Local AS number |
Local AS number. |
Paths |
BGP route information. |
BGP routing table entry information of 10.1.1.1/32 |
Information about the BGP route 10.1.1.1/32: |
From |
IP address of the device that sends the route. 10.1.3.1 is the IP address (Peer IP Address) of the interface used by the peer to set up a BGP connection, and 192.168.2.3 is the router ID of the peer. |
Route Duration |
Duration of a route. |
Direct Out-interface |
Directly connected interface. |
Relay is delayed as nexthop flapped frequently |
Route recursion to a specified next hop is suppressed because the next hop flaps. If only a small number of routes recurse to the next hop, the suppression is very short; therefore, this field may not be displayed in this case. |
Original nexthop |
Original next hop IP address. |
Qos information |
QoS information. |
Primary Routing Table |
The source routing table |
AS-path |
AS_Path attribute. If Nil is displayed, the AS_Path attribute is null. |
origin incomplete |
Origin attribute of the route, which can be any of the following three values:
|
MED |
MED value of a BGP route, similar to the cost of IGP routes. |
pref-val |
PrefVal |
valid |
Valid route with a reachable next hop address. |
external |
Type of the peer from which the route is learned.
|
best |
Optimal route. |
select |
Selected route to be delivered to the IP routing table. NOTE:
According to BGP selection rules, BGP selects only one optimal route, and this route is marked with best. In load balancing or FRR scenarios, more than one route needs to be added to the IP routing table, and each of the route is marked with select. Therefore, the number of the route marked with best is 1, and the number of the routes marked with select is the actual number of routes added to the IP routing table. |
active |
Active route. |
pre 255 |
Protocol priority of the route: 255 |
Advertised to such 1 peers |
The route has been advertised to one peer. |
The display bgp routing-table network [ { mask | mask-length } [ longer-prefixes ] ] command output varies with the route generation mode and transmission mode, and not all BGP attributes are necessarily displayed. In the preceding example, the route type is not displayed because the route 10.1.1.1/32 is an IBGP route. If you run the display bgp routing-table network [ { mask | mask-length } [ longer-prefixes ] ] command, the route type will be displayed. For example:
<HUAWEI> display bgp routing-table 10.0.0.0
BGP local router ID : 192.168.2.4
Local AS number : 200
Paths: 1 available, 1 best, 1 select
BGP routing table entry information of 10.0.0.0/8:
Aggregated route.
Route Duration: 04h50m46s
Direct Out-interface: NULL0
Original nexthop: 127.0.0.1
Qos information : 0x0
AS-path {65001 10 100}, origin incomplete, pref-val 0, valid, local, best, select, active, pre 255
Aggregator: AS 200, Aggregator ID 192.168.2.4, Atomic-aggregate
Advertised to such 3 peers:
10.1.7.2
172.16.1.2
192.168.1.2
In the following example, an RR and a cluster are configured. Therefore, the Cluster_List attribute is displayed in the display bgp routing-table network [ { mask | mask-length } [ longer-prefixes ] ] command output. For example:
<HUAWEI> display bgp routing-table 10.2.1.0
BGP local router ID : 4.4.4.4
Local AS number : 65010
Paths: 1 available, 0 best, 0 select
BGP routing table entry information of 10.2.1.0/24:
From: 10.1.4.1 (2.2.2.2)
Route Duration: 00h00m14s
Relay IP Nexthop: 0.0.0.0
Relay IP Out-Interface:
Original nexthop: 10.1.1.2
Qos information : 0x0
AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, internal, pre 255
Originator: 1.1.1.1
Cluster list: 0.0.0.1
Not advertised to any peer yet