display bgp link-state

Use display bgp link-state to display BGP LS information.

Syntax

display bgp [ instance instance-name ] link-state [ ls-prefix | peer { ipv4-address | ipv6-address } { advertised | received } [ statistics ] | statistics ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command displays BGP LS information for the default BGP instance.

ls-prefix: Specifies an LS prefix. If you do not specify this argument, the command displays all BGP LS information.

ipv4-address: Specifies a peer by its IPv4 address.

ipv6-address: Specifies a peer by its IPv6 address.

advertised: Displays advertised LS information.

received: Displays received LS information.

statistics: Displays statistics about LS messages.

Usage guidelines

If you do not specify any parameters, this command displays brief BGP LS information.

Examples

# Display brief BGP LS information for the public network.

<Sysname> display bgp link-state

 Total number of routes: 2

 BGP local router ID is 1.1.2.1
 Status codes: * - valid, > - best, d – dampened, h – history,
               s – suppressed, S – stale, i - internal, e - external
               a - additional-path
               Origin: i - IGP, e - EGP, ? - incomplete
 Prefix codes: E link, V node, T IP reachable route, u/U unknown,
               I Identifier, N local node, R remote node, L link, P prefix,
               L1/L2 ISIS level-1/level-2, O OSPF, D direct, S static,
               a area-ID, , l link-ID, t topology-ID, s ISO-ID,
               c confed-ID/ASN, b bgp-identifier, r router-ID,
               i if-address, n nbr-address, o OSPF Route-type, p IP-prefix
               d designated router address
* >e Network : [V][O][I0x0][N[c20][b1.1.1.2][a0.0.0.0][r1.1.1.2]]/376
     NextHop : 1.1.1.2                                  LocPrf    :
     PrefVal : 0                                        OutLabel  : NULL
     MED     :
     Path/Ogn: 20i

* >e Network : [T][O][I0x0][N[c20][b1.1.1.2][a0.0.0.0][r1.1.1.2]][P[o0x1][p1.1.1.0/24]]/480
     NextHop : 1.1.1.2                                  LocPrf    :
     PrefVal : 0                                        OutLabel  : NULL
     MED     :
     Path/Ogn: 20i

Table 87: Command output

Field

Description

Status codes

Status codes:

  • * – valid—Valid route.

  • > – best—Optimal route.

  • d - dampened—Dampened route.

  • h – history—History route.

  • s – suppressed—Suppressed route.

  • S – stale—Stale route.

  • i – internal—Internal route.

  • e – external—External route.

  • a - additional-path—Add-Path optimal route.

Prefix codes

Route status codes:

  • E – link.

  • V – node.

  • T – IP reachable route.

  • u/U – unknown.

  • I – Identifier.

  • N – local node.

  • R – remote node.

  • L – link.

  • P – prefix.

  • L1/L2 – ISIS level-1/level-2.

  • O – OSPF.

  • D – direct.

  • S – static.

  • a – area-ID.

  • l – link-ID.

  • t – topology-ID.

  • s – ISO-ID.

  • c – confed-ID/ASN.

  • b – bgp-identifier.

  • r – router-ID.

  • i – if-address.

  • n – peer-address.

  • o – OSPF Route-type.

  • p – IP-prefix.

  • d – designated router address.

  • a - additional-path.

Origin

Origin of the route:

  • i – IGP—Originated in the AS. The origin of routes advertised with the network command is IGP.

  • e – EGP—Learned through EGP.

  • ? – incomplete—Unknown origin. The origin of routes redistributed from IGP protocols is INCOMPLETE.

Network

NLRI for the LS.

NextHop

Next hop IP address.

LocPrf

Local preference.

OutLabel

This field is not supported in the current software version.

Outgoing label of the route.

MED

MED attribute.

Path/Ogn

AS_PATH and ORIGIN attributes of the route:

  • AS_PATH—Records the ASs the route has passed, which avoids routing loops.

  • ORIGIN—Identifies the origin of the route.

# Display detailed BGP LS information with the specified LS prefix.

<Sysname> display bgp link-state [V][O][I0x0][N[c20][b1.1.1.2][a0.0.0.0][r1.1.1.2]]/376

 BGP local router ID: 1.1.1.2
 Local AS number: 20

 Paths:   1 available, 1 best

 BGP LS information of [V][O][I0x0][N[c20][b1.1.1.2][a0.0.0.0][r1.1.1.2]]/376:
 Imported route.
 Original nexthop: 0.0.0.0
 OutLabel        : NULL
 RxPathID        : 0x0
 TxPathID        : 0xffffffff
 LS              : Node flag bits: 30[EA]
 AS-path         : (null)
 Origin          : igp
 Attribute value : pref-val 32768
 State           : valid, local, best
 IP precedence   : N/A
 QoS local ID    : N/A
 Traffic index   : N/A

Table 88: Command output

Field

Description

Paths

Number of routes:

  • available—Number of valid routes.

  • best—Number of optimal routes.

BGP LS information of

NLRI prefix.

Original nexthop

Original next hop of the route. If the route was obtained from a BGP update message, the original next hop is the next hop IP address in the message.

LS

LS attribute:

  • Node flag bits—Node attribute in hexadecimal format:

    • 10[A]—OSPF ABR bit.

    • 30[E]—OSPF External bit.

  • Metric—Link or prefix cost.

RxPathID

Add-path ID of received routes.

TxPathID

Add-path ID of advertised routes.

AS-path

AS_PATH attribute of the route, which records the ASs the route has passed and avoids routing loops.

Attribute value

BGP path attributes:

  • MED—MED value.

  • localpref—Local preference value.

  • pref-val—Preferred value.

  • pre—Route preference.

State

Current state of the route:

  • valid.

  • internal.

  • external.

  • local.

  • synchronize.

  • best.

IP precedence

IP precedence in the range of 0 to 7. N/A indicates that the route does not support this field.

QoS local ID

QoS local ID in the range of 1 to 4095. N/A indicates that the route does not support this field.

Traffic index

Traffic index in the range of 1 to 64. N/A indicates that the route does not support this field.