BGP Routing Table

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.

Table 1 Commands used to check route attributes

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?
Table 2 Description of the display bgp routing-table command output

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:
  • *: indicates a valid route with a reachable next hop address.
  • >: indicates an optimal route selected by BGP.
  • d: indicates a dampened route.
  • x: indicates a Best-external route.
  • a: indicates an ADD-PATH route.
  • h: indicates a History route.
  • i: indicates a route learned from an IBGP peer.
  • s: indicates a suppressed route. If specific routes for route summarization are suppressed, s is displayed in front of each specific route.
  • S: indicates a route in Stale status, and the route is being deleted. Such routes may occur during a BGP GR process.

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.
  • If d is displayed in front of a route, the route is carried in an Update packet.
  • If h is displayed in front of a route, the route is carried in a Withdraw packet.
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.
  • When the penalty value of a route with the d sign decreases to the Reuse value, the route becomes reusable, and BGP removes the d sign, adds the route to the IP routing table, and advertises an Update packet carrying the route to BGP peers.
  • When the penalty value of a route with the h sign decreases to 0, BGP deletes this route from the BGP routing table.

Origin

Route origin code:
  • IGP: indicates that routes are added to the BGP routing table using the network (BGP) command.

  • EGP: indicates that routes are learned through the EGP protocol.

  • Incomplete: indicates that routes are added to the BGP routing table using the import-route (BGP) command.

RPKI validation codes

Route origin AS validation code.
  • V: indicates a valid route.

  • I: indicates an invalid route.

  • N: indicates a not-found route.

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
Table 3 Description of the display bgp routing-table command output

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:
  • IGP: indicates that routes are added to the BGP routing table using the network (BGP) command.
  • EGP: indicates that routes are learned through the EGP protocol.
  • Incomplete: indicates that routes are imported using the import-route (BGP) command.

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.
  • external: indicates that the route is learned from an EBGP peer.
  • internal: indicates that the route is learned from an IBGP peer.

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
The route 10.0.0.0/8 was manually summarized using the aggregate command. Therefore, Aggregated route is displayed in the command output. The route type varies as follows:
  • If the route is automatically summarized using the summary automatic command, Summary automatic route will be displayed.
  • If the route is imported using the network command, Network route will be displayed.
  • If the route is imported using the import-route command, Imported route will be displayed.

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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >