display bgp routing-table vpnv4

Use display bgp routing-table vpnv4 to display BGP VPNv4 routing information.

Syntax

display bgp [ instance instance-name ] routing-table vpnv4 [ [ route-distinguisher route-distinguisher ] [ ipv4-address [ { mask-length | mask } [ longest-match ] ] | ipv4-address [ mask-length | mask ] advertise-info | as-path-acl as-path-acl-number | community-list { { basic-community-list-number | comm-list-name } [ whole-match ] | adv-community-list-number } ] | [ vpn-instance vpn-instance-name ] peer ipv4-address { advertised-routes | received-routes } [ ipv4-address [ mask-length | mask ] | 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 a BGP instance, this command displays BGP VPNv4 routes in the default BGP instance.

route-distinguisher route-distinguisher: Specifies an RD, a string of 3 to 21 characters in one of the following formats:

ipv4-address: Specifies the destination IPv4 address.

mask-length: Specifies the length of the network mask, in the range of 0 to 32.

mask: Specifies the network mask, in dotted decimal notation.

longest-match: Displays the longest matching BGP VPNv4 route. The longest matching BGP VPNv4 route is selected through the following steps:

  1. ANDs the specified network address with the mask of each route.

  2. Matches a route if the AND result is the same as the network address of the route and the mask of the route is shorter than or equal to the specified mask.

  3. Selects the route with the longest mask among the matching routes.

advertise-info: Displays advertisement information for BGP VPNv4 routes.

as-path-acl as-path-acl-number: Displays BGP VPNv4 routes that match the AS path list specified by its number in the range of 1 to 256.

community-list: Displays BGP VPNv4 routes that match a BGP community list.

basic-community-list-number: Specifies a basic community list by its number in the range of 1 to 99.

comm-list-name: Specifies a community list by its name, a case-sensitive string of 1 to 63 characters.

whole-match: Displays BGP VPNv4 routes exactly matching the specified community list. If you do not specify this keyword, the command displays BGP VPNv4 routes whose COMMUNITY attributes include the specified community list.

adv-community-list-number: Specifies an advanced community list by its number in the range of 100 to 199.

vpn-instance vpn-instance-name: Specifies a VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays BGP VPNv4 routes advertised to or received from the specified peer on the public network.

peer: Displays BGP VPNv4 routing information advertised to or received from a peer.

ipv4-address: Specifies the peer IPv4 address.

advertised-routes: Displays BGP VPNv4 routing information advertised to the specified peer.

received-routes: Displays BGP VPNv4 routing information received from the specified peer.

statistics: Displays BGP VPNv4 routing statistics.

Usage guidelines

If you do not specify any parameters, this command displays brief information about all BGP VPNv4 routes.

If you specify ipv4-address mask or ipv4-address mask-length, this command displays detailed information about the BGP VPNv4 route that exactly matches the specified address and mask.

If you specify only ipv4-address, the system ANDs the network address with the mask of a route. If the result matches the network address of the route, this command displays detailed information about the BGP VPNv4 route.

Examples

# Display brief information about all BGP VPNv4 routes in the default BGP instance.

<Sysname> display bgp routing-table vpnv4

 BGP local router ID is 1.1.1.9
 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

 Total number of routes from all PEs: 8

 Route distinguisher: 100:1(vpn1)
 Total number of routes: 6

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

* >  10.1.1.0/24        10.1.1.2        0                     32768   ?
*  e                    10.1.1.1        0                     0       65410?
* >  10.1.1.2/32        127.0.0.1       0                     32768   ?
* >i 10.3.1.0/24        3.3.3.9         0          100        0       ?
* >e 192.168.1.0        10.1.1.1        0                     0       65410?
*  i                    3.3.3.9         0          100        0       65420?

 Route distinguisher: 200:1
 Total number of routes: 2

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

* >i 10.3.1.0/24        3.3.3.9         0          100        0       ?
* >i 192.168.1.0        3.3.3.9         0          100        0       65420?

# Display brief information about BGP VPNv4 routes with RD 100:1 in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 route-distinguisher 100:1

 BGP local router ID is 1.1.1.9
 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

 Route distinguisher: 100:1(vpn1)
 Total number of routes: 6

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

* >  10.1.1.0/24        10.1.1.2        0                     32768   ?
*  e                    10.1.1.1        0                     0       65410?
* >  10.1.1.2/32        127.0.0.1       0                     32768   ?
* >i 10.3.1.0/24        3.3.3.9         0          100        0       ?
* >e 192.168.1.0        10.1.1.1        0                     0       65410?
*  i                    3.3.3.9         0          100        0       65420?

# Display information about BGP VPNv4 routes matching AS_PATH list 1 in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 as-path-acl 1

 BGP local router ID is 1.1.1.9
 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

 Total number of routes from all PEs: 8

 Route distinguisher: 100:1(vpn1)
 Total number of routes: 6

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

* >  10.1.1.0/24        10.1.1.2        0                     32768   ?
*  e                    10.1.1.1        0                     0       65410?
* >  10.1.1.2/32        127.0.0.1       0                     32768   ?
* >i 10.3.1.0/24        3.3.3.9         0          100        0       ?
* >e 192.168.1.0        10.1.1.1        0                     0       65410?
*  i                    3.3.3.9         0          100        0       65420?

 Route distinguisher: 200:1
 Total number of routes: 2

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

* >i 10.3.1.0/24        3.3.3.9         0          100        0       ?
* >i 192.168.1.0        3.3.3.9         0          100        0       65420?

# Display information about BGP VPNv4 routes matching BGP community list 100 in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 community-list 100

 BGP local router ID is 1.1.1.9
 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

 Total number of routes from all PEs: 8

 Route distinguisher: 100:1(vpn1)
 Total number of routes: 6

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

* >  10.1.1.0/24        10.1.1.2        0                     32768   ?
*  e                    10.1.1.1        0                     0       65410?
* >  10.1.1.2/32        127.0.0.1       0                     32768   ?
* >i 10.3.1.0/24        3.3.3.9         0          100        0       ?
* >e 192.168.1.0        10.1.1.1        0                     0       65410?
*  i                    3.3.3.9         0          100        0       65420?

 Route distinguisher: 200:1
 Total number of routes: 2

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

* >i 10.3.1.0/24        3.3.3.9         0          100        0       ?
* >i 192.168.1.0        3.3.3.9         0          100        0       65420?

# Display information about public BGP VPNv4 routes advertised to peer 3.3.3.9 in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 peer 3.3.3.9 advertised-routes

 Total number of routes: 2

 BGP local router ID is 1.1.1.9
 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

 Route distinguisher: 100:1
 Total number of routes: 2

     Network            NextHop         MED        LocPrf             Path/Ogn

* >  10.1.1.0/24        10.1.1.2        0                             ?
* >e 192.168.1.0        10.1.1.1        0                             65410?

# Display information about public BGP VPNv4 routes received from peer 3.3.3.9 in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 peer 3.3.3.9 received-routes

 Total number of routes: 2

 BGP local router ID is 1.1.1.9
 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

 Route distinguisher: 200:1
 Total number of routes: 2

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

* >i 10.3.1.0/24        3.3.3.9         0          100        0       ?
* >i 192.168.1.0        3.3.3.9         0          100        0       65420?

Table 66: Command output

Field

Description

BGP local router ID

Router ID of the local BGP router.

Status codes

Route status codes:

  • * - valid—Valid route.

  • > - best—Common optimal route.

  • d – damped—Route damped for route flap.

  • h - history—History route.

  • i - internal—Internal route.

  • e - external—External route.

  • s - suppressed—Suppressed route.

  • S - Stale—Stale route.

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

Origin

Route origin:

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

  • e - EGP—Learned through EGP.

  • ? - incomplete—Redistributed from IGP protocols.

Total number of routes from all PEs

Total number of VPNv4 routes from all PEs.

Network

Network address.

NextHop

Next hop address.

MED

MULTI_EXIT_DISC attribute.

LocPrf

Local preference value.

PrefVal

Preferred value.

Path/Ogn

AS_PATH and Origin attributes.

# Display detailed information about BGP VPNv4 routes to 10.3.1.0/24 in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 10.3.1.0 24

 BGP local router ID: 1.1.1.9
 Local AS number: 100


 Route distinguisher: 100:1(vpn1)
 Total number of routes: 1
 Paths:   1 available, 1 best

 BGP routing table information of 10.3.1.0/24:
 From            : 3.3.3.9 (3.3.3.9)
 Rely nexthop    : 172.1.1.2
 Original nexthop: 3.3.3.9
 OutLabel        : 1279
 Ext-Community   : <RT: 111:1>
 RxPathID        : 0x0
 TxPathID        : 0x0
 AS-path         : (null)
 Origin          : incomplete
 Attribute value : MED 0, localpref 100, pref-val 0
 State           : valid, internal, best
 IP precedence   : N/A
 QoS local ID    : N/A
 Traffic index   : N/A

 Route distinguisher: 200:1
 Total number of routes: 1
 Paths:   1 available, 1 best

 BGP routing table information of 10.3.1.0/24:
 From            : 3.3.3.9 (3.3.3.9)
 Rely nexthop    : 172.1.1.2
 Original nexthop: 3.3.3.9
 OutLabel        : 1279
 Ext-Community   : <RT: 111:1>
 RxPathID        : 0x0
 TxPathID        : 0x0
 AS-path         : (null)
 Origin          : incomplete
 Attribute value : MED 0, localpref 100, pref-val 0
 State           : valid, internal, best
 IP precedence   : N/A
 QoS local ID    : N/A
 Traffic index   : N/A

# Display detailed information about the BGP VPNv4 route to 10.3.1.0/24 and with RD 100:1 in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 route-distinguisher 100:1 10.3.1.0 24

 BGP local router ID: 1.1.1.9
 Local AS number: 100


 Route distinguisher: 100:1(vpn1)
 Total number of routes: 1
 Paths:   1 available, 1 best

 BGP routing table information of 10.3.1.0/24:
 From            : 3.3.3.9 (3.3.3.9)
 Rely nexthop    : 172.1.1.2
 Original nexthop: 3.3.3.9
 OutLabel        : 1279
 Ext-Community   : <RT: 111:1>
 RxPathID        : 0x0
 TxPathID        : 0x0
 AS-path         : (null)
 Origin          : incomplete
 Attribute value : MED 0, localpref 100, pref-val 0
 State           : valid, internal, best
 IP precedence   : N/A
 QoS local ID    : N/A
 Traffic index   : N/A

Table 67: Command output

Field

Description

Rely Nexthop

Recursive next hop. If no recursive next hop is found, this field displays not resolved.

Original nexthop

Original next hop. If the route is learned from a BGP update, it is the next hop in the update message.

Ext-Community

Extended community attribute.

RxPathID

Received Add-Path ID of the route.

TxPathID

Advertised Add-Path ID of the route.

Origin

Route origin:

  • igp—Originated in the AS. The origin of routes advertised by the network command is IGP.

  • egp—Learned through EGP.

  • incomplete—Redistributed from IGP protocols.

Attribute value

BGP route attribute information:

  • MED—MED attribute.

  • localpref—Local preference.

  • pref-val—Preferred value.

  • pre—Protocol preference.

State

Route status:

  • valid—Valid route.

  • internal—Internal route.

  • external—External route.

  • local—Locally generated route.

  • synchronize—Synchronized route.

  • best—Optimal route.

IP precedence

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

QoS local ID

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

Traffic index

Index of the traffic, in the range of 1 to 64. N/A indicates that the route does not support this field.

# Display advertisement information for BGP VPNv4 routes to 10.1.1.0/24 in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 10.1.1.0 24 advertise-info

 BGP local router ID: 1.1.1.9
 Local AS number: 100


 Route distinguisher: 100:1
 Total number of routes: 1
 Paths:   1 best

 BGP routing table information of 10.1.1.0/24(TxPathID:0):
 Advertised to VPN peers (1 in total):
    3.3.3.9
 Inlabel         : 1279

Table 68: Command output

Field

Description

Paths

Number of routes to the specified destination network.

BGP routing table information of 10.1.1.0/24(TxPathID:0)

Advertisement information for the BGP route to 10.1.1.0/24.

Advertised to VPN peers (1 in total)

VPNv4 peers to which the route is advertised, and the number of peers.

Inlabel

Incoming label of the route.

# Display statistics about public BGP VPNv4 routes advertised to peer 3.3.3.9 in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 peer 3.3.3.9 advertised-routes statistics

 Advertised routes total: 2

# Display statistics about public BGP VPNv4 routes received from peer 3.3.3.9 in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 peer 3.3.3.9 received-routes statistic

 Received routes total: 2

Table 69: Command output

Field

Description

Advertised routes total

Total number of routes advertised to the specified peer.

Received routes total

Total number of routes received from the specified peer.

# Display statistics about public BGP VPNv4 routes in the default BGP instance.

<Sysname> display bgp routing-table vpnv4 statistics
 Total number of routes from all PEs: 8

 Route distinguisher: 100:1(vpn1)
 Total number of routes: 6

 Route distinguisher: 200:1
 Total number of routes: 2

Table 70: Command output

Field

Description

Total number of routes from all PEs

Total number of VPNv4 routes from all PEs.

Total number of routes

Total number of VPNv4 routes with the specified RD.

Related commands

ip as-path (Layer 3—IP Routing Command Reference)