< Home

display ip routing-table vpn-instance

Function

The display ip routing-table vpn-instance command displays the routing table of the VPN instance.

Format

display ip routing-table vpn-instance vpn-instance-name [ verbose ]

display ip routing-table vpn-instance vpn-instance-name acl acl-number [ verbose ]

display ip routing-table vpn-instance vpn-instance-name ip-address [ mask | mask-length ] [ longer-match ] [ verbose ]

display ip routing-table vpn-instance vpn-instance-name ip-address { mask | mask-length } nexthop ip-address [ verbose ]

display ip routing-table vpn-instance vpn-instance-name ip-address1 { mask1 | mask-length1 } ip-address2 { mask2 | mask-length2 } [ verbose ]

display ip routing-table vpn-instance vpn-instance-name ip-prefix ip-prefix-name [ verbose ]

display ip routing-table vpn-instance vpn-instance-name protocol { direct | static | bgp | isis | ospf | rip | unr } [ inactive | verbose ]

display ip routing-table vpn-instance vpn-instance-name protocol unr type isp [ inactive | verbose ]

display ip routing-table vpn-instance vpn-instance-name statistics

Parameters

Parameter Description Value
vpn-instance-name Specifies the name of a VPN instance. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
verbose Displays detailed information about active and inactive routes. If this parameter is not specified, only the summary of active routes is displayed. -
acl Uses access control lists (ACLs) to filter the command output. If the specified ACL does not exist, information about all active routes is displayed. -
acl-number Specifies the number of a basic ACL. It is an integer ranging from 2000 to 2999
ip-address Specifies the destination IP address. It is in dotted decimal notation.
nexthop ip-address Specifies the IP address of the next hop. It is in dotted decimal notation.
longer-match Displays only the routes that match the specified network or mask. -
mask Specifies the mask. It is in dotted decimal notation.
mask-length Specifies the length of the mask. It is an integer ranging from 0 to 32.
ip-address1/ip-address2 Specifies the destination. ip-address1 and ip-address2 together determine an address range. Only the routes in this address range are displayed. Both ip-address1 and ip-address2 are in dotted decimal notation.
mask1 | mask-length1 Specifies the mask or mask length of ip-address1. -
mask2 | mask-length2 Specifies the mask or mask length of ip-address2. -
ip-prefix ip-prefix-name Specifies the name of the IP address prefix. The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
direct Displays direct routes. -
static Displays static routes. -
bgp Displays BGP4 routes. -
isis Displays IS-IS routes. -
ospf Displays OSPF routes. -
rip Displays RIP routes. -
unr Displays user network routes. -
inactive Displays the summary of inactive routes only. -
type isp Displays the information about user network routes of the isp type. -
statistics Displays route statistics. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

In the command output, each line indicates a route. The contents include the destination address, mask length, protocol, preference, route cost, route flag, next hop, and outbound interface.

This command without the parameter verbose displays the currently preferred routes only.

Matching rules vary with parameters in the command:

  • If the display ip routing-table vpn-instance vpn-instance-name ip-address command is used, the routes that longest match the destination address are displayed.

  • If the display ip routing-table vpn-instance vpn-instance-name ip-address mask command is used, the routes that accurately match the destination address and mask are displayed.

  • If the display ip routing-table vpn-instance vpn-instance-name ip-address longer-match command is used, all the routes that match the IP address specified by the destination address and the natural mask are displayed.

  • If the display ip routing-table vpn-instance vpn-instance-name ip-address mask longer-match command is used, all the routes that match the IP address specified by the destination address and the input mask are displayed.

  • If the display ip routing-table vpn-instance vpn-instance-name ip-address1 mask1 ip-address2 mask2 command is used, the routes whose destination address ranges from ip-address1 mask1 to ip-address2 mask2 are displayed.

Precautions

If the specified ip-prefix ip-prefix-name does not exist, the command displays all of the currently preferred routes.

Example

# Display the summary of the routing table of the IPv4 VPN instance named vpn1.

<sysname> display ip routing-table vpn-instance vpn1
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: vpn1
         Destinations : 3        Routes : 3

Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface

        1.1.1.0/24  Direct 0    0           D  1.1.1.1         GigabitEthernet0/0/2
        1.1.1.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet0/0/2
        5.5.5.0/24  Static 60   0          RD  1.1.1.2         GigabitEthernet0/0/2
Table 1 Description of the display ip routing-table vpn-instance command output

Item

Description

Route Flags

Indicates the route flag:
  • R: indicates an iterated route.

  • D: indicates that the route is downloaded to the Forwarding Information Base (FIB) table.

Routing Tables: vpn1

Indicates a VPN routing table named vpn1.

Destinations

Indicates the total number of destination networks or hosts.

Routes

Indicates the total number of routes.

Destination/Mask

Indicates the address and mask length of the destination network or host.

Proto

Indicates the routing protocol.

Pre

Indicates the preference.

Cost

Indicates the route cost.

Flags

Indicates the route flag, that is, Route Flags in the heading of the routing table.

NextHop

Indicates the next hop.

Interface

Indicates the outbound interface through which the next hop is reachable.

# Display detailed information about the routing table of the IPv4 VPN instance named vpn1.

<sysname> display ip routing-table vpn-instance vpn1 verbose
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : vpn1
         Destinations : 2        Routes : 2


Destination: 1.1.1.1/32
     Protocol: Static          Process ID: 0
   Preference: 60                    Cost: 0
      NextHop: 2.2.2.2          Neighbour: 0.0.0.0
        State: Active Adv Relied      Age: 22h51m56s
          Tag: 0                 Priority: low
        Label: NULL               QoSInfo: 0x0
   IndirectID: 0x80000001
 RelayNextHop: 0.0.0.0          Interface: NULL0
     TunnelID: 0x0                  Flags: RD

Destination: 2.2.2.2/32
     Protocol: Static          Process ID: 0
   Preference: 60                    Cost: 0
      NextHop: 0.0.0.0          Neighbour: 0.0.0.0
        State: Active Adv             Age: 22h51m56s
          Tag: 0                 Priority: low
        Label: NULL               QoSInfo: 0x0
   IndirectID: 0x0
 RelayNextHop: 0.0.0.0          Interface: NULL0
     TunnelID: 0x0                  Flags:  D

# Display detailed information about the routes with the destination address 34.34.34.3 in the routing table of the IPv4 VPN instance named vpna.

<sysname> display ip routing-table vpn-instance vpna 34.34.34.3 verbose
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : vpna
Summary Count : 1

Destination: 34.34.34.3/32
     Protocol: Direct          Process ID: 0
   Preference: 0                     Cost: 0
      NextHop: 127.0.0.1        Neighbour: 0.0.0.0
        State: Active NoAdv           Age: 18d08h24m42s
          Tag: 0                 Priority: low
        Label: NULL               QoSInfo: 0x0
   IndirectID: 0x0
 RelayNextHop: 0.0.0.0          Interface: GigabitEthernet0/0/2
     TunnelID: 0x0                  Flags:  D    
Table 2 Description of the display ip routing-table vpn-instance verbose command output

Item

Description

Route Flags

Indicates the route flag:
  • R: indicates an iterated route.

  • D: indicates that the route is downloaded to the FIB table.

Protocol

Indicates the routing protocol.

Process ID

Indicates the process ID of the routing protocol.

Preference

Indicates the preference of the routing protocol.

Neighbor

Indicates the IP address of the neighboring interface.

State

Indicates the route status:
  • Active: indicates active routes.

  • Invalid: indicates invalid routes.

  • Inactive: indicates inactive routes.

  • NoAdv: indicates the routes that cannot be advertised.

  • Adv: indicates the routes that can be advertised.

  • Del: indicates the routes to be deleted.

  • Relied: indicates the route that finds the next hop and outbound interface or the route that finds the tunnel during packet forwarding.

  • Stale: indicates the routes with the stale flag. The routes are used in GR.

Age

Indicates the time since the route is generated.

Tag

Indicates the tag for importing routes. The value is an integer ranging from 0 to 4294967295.

Priority

Indicates the priority.

Label

Indicates the allocated MPLS label.

IndirectID

Indicates the keyword of indirect next hop, which is generated by the system and cannot be configured by users. If the route is not iterated, the value is 0x0. If the route is iterated, the value is not 0x0.

QoSInfo

Indicates QoS information. The value 0x0 indicates that no QoS information is displayed. The value is a 32-bit octal number. The last three octal bits of this value indicate the value of the QoS local ID, which can be configured by the apply qos-local-id command. The fourth and seventh bits of this value are reserved and set to 0. The fifth and the sixth bits indicate the value of the BGP traffic index, which can be configured by the apply traffic-index command. The eighth number of this value is the flag bit.

RelayNextHop

Indicates the iterated next hop.

TunnelID

Indicates the tunnel ID. The value 0x0 indicates that no tunnel is used or no tunnel is set up.

Flags

Indicates the route flag, that is, Route Flags in the heading of the routing table.

# Display the summary of the active routes that match ACL 2000.

<sysname> display ip routing-table vpn-instance vpn1 acl 2000
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routes Matched by Access list 2000:
        Destinations : 1           Routes : 1
Destination/Mask    Proto    Pre  Cost     Flags NextHop         Interface

        1.1.1.1/32    Direct 0     0          D     127.0.0.1       GigabitEthernet0/0/2

# Display the summary of the routes that match the IP-prefix.

<sysname> display ip routing-table vpn-instance vpn1 ip-prefix 1
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routes Matched by Prefix-list 1:
         Destinations : 2           Routes : 2

Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface

        1.1.1.0/24  Direct 0    0           D  1.1.1.1         GigabitEthernet0/0/2
        1.1.1.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet0/0/2

# Display the routes with the destination address 1.1.1.1/32 based on the next hop.

<sysname> display ip routing-table vpn-instance vpn1 1.1.1.1 32 nexthop 2.2.2.2
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : vpn1
Summary Count : 1

Destination/Mask    Proto  Pre  Cost        Flags NextHop         Interface

        1.1.1.1/32  Static 60   0            RD  2.2.2.2         GigabitEthernet0/0/2

# Display the statistics of the routing table of the IPv4 VPN instance named vpn1.

<sysname> display ip routing-table vpn-instance vpn1 statistics
Summary Prefixes: 3
Proto     total      active      added        deleted      freed
          routes     routes      routes       routes       routes
DIRECT    2          2           2            0            0
STATIC    1          1           1            0            0
RIP       0          0           0            0            0
OSPF      0          0           0            0            0
IS-IS     0          0           0            0            0
BGP       0          0           0            0            0
UNR       0          0           0            0            0
Total     3          3           3            0            0
Table 3 Description of the display ip routing-table vpn-instance statistics command output

Item

Description

Summary Prefixes

Indicates the total number of prefixes in the current routing table.

Proto

Indicates the routing protocol.

  • DIRECT

  • STATIC

  • RIP

  • OSPF

  • IS-IS

  • BGP

  • User Network Route (UNR)

total routes

Indicates the total number of active and inactive routes in the current routing table.

active routes

Indicates the number of active routes in the routing table.

added routes

Indicates the number of active and inactive routes added in the routing table.

deleted routes

Indicates the number of routes deleted from the routing table.

freed routes

Indicates the number of released routes that are permanently deleted from the routing table.

# Display all the direct routes of the VPN instance named vpn1.

<sysname> display ip routing-table vpn-instance vpn1 protocol direct
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
vpn4 routing table : Direct
         Destinations : 2           Routes : 2

Direct routing table status : <Active>
         Destinations : 2           Routes : 2

Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface

        1.1.1.0/24  Direct 0    0           D  1.1.1.1         GigabitEthernet0/0/2
        1.1.1.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet0/0/2

Direct routing table status : <Inactive>
         Destinations : 0           Routes : 0
Table 4 Description of the display ip routing-table vpn-instance protocol command output

Item

Description

Active

Displays active routes.

Inactive

Displays inactive routes.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >