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 |
---|---|
PrefVal |
display bgp routing-table [ network ] |
Local_Pref |
display bgp routing-table [ network ] |
Route type |
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 cost |
|
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 192.168.2.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: 9 Network NextHop MED LocPrf PrefVal Path/Ogn *> 1.1.1.9/32 0.0.0.0 0 0 i *>i 2.2.2.7/32 10.1.1.2 0 100 0 (65001)i * i 10.1.3.1 0 100 0 (65011 65001)i *>i 2.2.2.8/32 10.1.2.2 0 100 0 (65011)i * i 10.1.3.2 0 100 0 (65001 65011)i *>i 2.2.2.9/32 10.1.4.2 0 100 0 (65001 65101)i * i 10.1.5.2 0 100 0 (65011 65101)i i 3.3.3.9/32 10.1.6.2 0 100 0 (65001 65101) 300i i 10.1.6.2 0 100 0 (65011 65001 65101) 300i
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, displayed in front of each route entry:
|
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, 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 : 65001 Paths: 1 available, 1 best, 1 select BGP routing table entry information of 10.1.1.1/32: From: 10.1.3.1 (192.168.2.3) Route Duration: 05h35m04s Relay IP Nexthop: 0.0.0.0 Relay IP Out-Interface: GigabitEthernet1/0/4 Original nexthop: 10.1.3.1 Qos information : 0x0 AS-path Nil, origin incomplete, MED 1234, localpref 100, pref-val 0, valid, internal, best, select, active, pre 255, IGP cost 1 Not advertised to any peer yet
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 advertised the route. In this example, 10.1.3.1 is the IP address of the interface used by the peer to establish the BGP peer relationship (peer IP address), and 192.168.2.3 is the router ID of the peer. |
Route Duration |
Duration of a route. |
Relay IP Nexthop |
IP address of the route to which the BGP route is iterated. |
Relay IP Out-Interface |
Outbound interface of the route to which the BGP route is iterated. |
Original nexthop |
Original next hop IP address. |
Qos information |
QoS information. |
AS-path |
AS_Path attribute. If Nil is displayed, the AS_Path attribute is null. |
origin incomplete |
Origin attribute:
|
MED |
MED value of a BGP route, similar to the cost of IGP routes. |
localpref |
Local_Pref |
pref-val |
PrefVal |
valid |
Valid route with a reachable next hop address. |
internal |
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 |
Not advertised to any peer yet |
The route has not advertised to any peer yet. |
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. 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.
<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