display ip routing-table

Function

The display ip routing-table command displays the summary of an IPv4 routing table.

Format

display ip routing-table [ table-name { localmt | mbgp | msr } ] prefix { mask | masklength } prefix { mask | masklength } [ verbose ]

display mrt routing-table [ vpn-instance vpn-instance-name ] [ prefix [ [ mask ] | [ masklength ] ] [ longer-match ] ] [ verbose ]

Parameters

Parameter Description Value
table-name

Specifies a table of a producer.

-

mbgp

Indicates a multicast BGP routing table. (When topology topology-name is specified, the MBGP routing table cannot be displayed.).

-

msr

Indicates a multicast static routing table. (When topology topology-name is specified, the multicast static routing table cannot be displayed.).

-

prefix

Displays information about a route to a specified IP destination address.

The value is in dotted decimal notation.

mask

Specifies the mask in dotted decimal notation.

The value is in dotted decimal notation.

masklength

Specifies the mask length. A 32-bit mask is represented by consecutive 1s, and the mask in dotted decimal notation can be replaced by the mask length.

The value is an integer ranging from 0 to 32.

verbose

Displays detailed information about all the routes in the routing table, including active and inactive routes. If this parameter is not specified, only brief information about active routes is displayed.

-

localmt

Indicates a local multi-topology routing table.

-

mrt

Indicates a MRT routing table.

-

vpn-instance 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. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.

longer-match

Displays the routes matching the specified network or mask.

-

Views

All views

Default Level

1: Monitoring level

Task Name and Operations

Task Name Operations
route-base read

Usage Guidelines

Usage Scenario

When the verbose parameter is not specified, information about only one route is displayed in each line. The contents include the destination address, mask length, protocol, priority, route cost, route flag, next hop, and outbound interface. This command displays only the preferred routes.

Example

The actual command output varies according to the device. The command output here is only an example.

# Display information about routes that recurse to SRv6 TE Policies.
<HUAWEI> display ip routing-table vpn-instance vrf 10.2.1.1 verbose
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : vrf
Summary Count : 1

Destination: 10.2.1.1/32         
     Protocol: IBGP               Process ID: 0              
   Preference: 255                      Cost: 0              
      NextHop: 2001:DB8:100::1     Neighbour: 2001:DB8:100::2
        State: Active Adv Relied         Age: 00h22m27s           
          Tag: 0                    Priority: low            
        Label: 3                     QoSInfo: 0x0           
   IndirectID: 0x1000143            Instance:                                 
 RelayNextHop: ::                  Interface: a
     TunnelID: 0x000000003400000001    Flags: RD
   RouteColor: 0
# Display information about routes that recurse to SRv6 BE tunnels and information about the actual outbound interfaces by using the value of the RelayNextHop field in the display ip routing-table vpn-instance vpn-instance-name verbose command output as the destination address.
[~HUAWEI] display ip routing-table vpn-instance vpn1 1.1.1.0 verbose
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : vpn1
Summary Count : 1

Destination: 1.1.1.0/24          
     Protocol: IBGP               Process ID: 0              
   Preference: 255                      Cost: 0              
      NextHop: 2001:DB8:100::1:0:20 Neighbour: 2001:DB8:1::1
        State: Active Adv Relied         Age: 00h47m57s           
          Tag: 0                    Priority: low            
        Label: NULL                  QoSInfo: 0x0           
   IndirectID: 0x1000186            Instance:                                 
 RelayNextHop: 2001:DB8:100::1:0:20 Interface: SRv6 BE
     TunnelID: 0x0                     Flags: RD
   RouteColor: 0

[~HUAWEI] display ipv6 routing-table 2001:DB8:100::1:0:20 verbose
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 1

Destination  : 2001:DB8:100::                          PrefixLength : 64
NextHop      : 2001:DB8:10::1                          Preference   : 15
Neighbour    : ::                                      ProcessID    : 1
Label        : NULL                                    Protocol     : ISIS-L1
State        : Active Adv                              Cost         : 10
Entry ID     : 0                                       EntryFlags   : 0x00000000
Reference Cnt: 0                                       Tag          : 0
Priority     : medium                                  Age          : 1355sec
IndirectID   : 0x1000033                               Instance     : 
RelayNextHop : ::                                      TunnelID     : 0x0
Interface    : Ethernet0/1/16                           Flags        : D
RouteColor   : 0
# Display the routes with the destination address in the range of 1.0.0.0/8 to 4.0.0.0/24.
<HUAWEI> display ip routing-table 1.0.0.0 8 4.0.0.0 24
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
         Destinations : 5       Routes : 5 

Destination/Mask  Proto  Pre  Cost  Flags  NextHop  Interface

   1.0.0.0/8     Static  60    0     D    10.0.0.1  GigabitEthernet0/1/0
   1.1.1.0/24    Static  60    0     D    2.1.1.1   GigabitEthernet0/1/0
   1.2.0.0/16    Static  60    0     D    10.0.0.1  GigabitEthernet0/1/0
   2.1.1.0/24    Static  40    0     D    10.0.0.1  GigabitEthernet0/1/0
   3.1.1.0/24    Static  60    0     D    4.1.1.1   GigabitEthernet0/1/0
Table 1 Description of the display ip routing-table command output
Item Description
Route Flags

Route flags.

  • R: indicates that the route is a recursive route.
  • D: indicates that the route is delivered to the FIB table.
Routing Table

Routing Table.

Summary Count

Number of summary routes.

Process ID

Process ID of the routing protocol.

Destination

Address of the destination network or host.

PrefixLength

Length of the prefix.

NextHop

Next hop.

Preference

Preference of the route.

Neighbour

Neighbor.

ProcessID

Process ID of the routing protocol.

Label

Allocated MPLS label.

Protocol

Routing protocol.

State

Status of routes. The status of routes is as follows:

  • Active: indicates routes in the Active state.
  • Invalid: indicates invalid routes.
  • Inactive: indicates routes in the Inactive state.
  • NoAdv: indicates routes that cannot be advertised.
  • Adv: indicates routes that can be advertised.
  • Del: indicates routes to be deleted.
  • GotQ: indicates routes that are relayed successfully.
  • WaitQ: indicates routes that are not relayed successfully yet.
  • Stale: indicates routes with the Stale flag. The routes are used in GR.
Cost

Route cost.

Entry ID

Keyword of the retrieval index of routes in the routing table.

EntryFlags

Information about route flags.

Reference Cnt

Number of times that the route is referenced.

Tag

Administrative tag for routes.

Priority

Priority.

Age

Lifetime of the route.

IndirectID

Keyword of the indirect next hop, which is generated by the system. If route recursion is not performed, the value is 0x0.

Instance

Instance.

RelayNextHop

Relay next hop.

TunnelID

Tunnel ID.

The value 0x0 indicates that no tunnel is used or no tunnel has been set up.

Interface

Outbound interface through which the next hop is reachable.

Flags

Route flag in the heading of the routing table.

RouteColor

Route color value.

Destinations

Total number of destination networks or hosts.

Routes

Total number of routes.

Destination/Mask

Address and mask length of the destination network or host.

Proto

Protocol through which routes are learned.

Pre

Priority.

QoSInfo

QoS information.

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