< Home

display ip routing-table

Function

The display ip routing-table command displays information about an IPv4 routing table.

Format

display ip routing-table [ vpn-instance vpn-instance-name ] [ 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 nexthop-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 ] acl { acl-number | acl-name } [ verbose ]

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

Parameters

Parameter Description Value
vpn-instance vpn-instance-name Specifies the name of an VPN instance of an enabled IPv4 address family. The value must be an existing VPN instance name.
verbose Displays detailed information about active routes and inactive routes. If this keyword is not specified, only brief information about active routes is displayed. -
ip-address Displays the routes with the specified destination address. The value is in dotted decimal notation.
nexthop nexthop-address Displays the routes with the specified next-hop address. The value is in dotted decimal notation.
longer-match Displays the routes with the specified destination address and mask. -
mask Specifies the mask of the destination IP address. The value is in dotted decimal notation.
mask-length Specifies the mask length of the destination IP address. The value is an integer that ranges from 0 to 32.
ip-address1 Specifies the start IP address in an IP address range. ip-address1 and ip-address2 determine an IP address range. Only the routes in the IP address range are displayed. The value is in dotted decimal notation.
ip-address2 Specifies the end IP address in an IP address range. ip-address1 and ip-address2 determine an IP address range. Only the routes in the IP address range are displayed. The value is in dotted decimal notation.
mask1 Specifies the subnet mask of the start IP address. The value is in dotted decimal notation.
mask-length1 Specifies the mask length of the start IP address. The value is an integer that ranges from 0 to 32.
mask2 Specifies the subnet mask of the end IP address. The value is in dotted decimal notation.
mask-length2 Specifies the mask length of the end IP address. The value is an integer that ranges from 0 to 32.
acl acl-number Displays the routes that match the ACL with the specified ACL number. If the specified ACL does not exist, information about all active routes is displayed. The value is an integer that ranges from 2000 to 2999.
acl acl-name Displays the routes that match the ACL with the specified ACL name. If the specified ACL does not exist, information about all active routes is displayed. The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter.
ip-prefix ip-prefix-name Displays the routes that match the specified IP prefix list. If the specified IP prefix list does not exist, information about all active routes is displayed. 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.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

If the verbose keyword is not specified in the display ip routing-table command, each line in the command output indicates a route, including the destination address, mask length, protocol, preference, cost, flag, next hop, and outbound interface of the route.

An iterated route is counted as one route regardless of how many outbound interfaces and next hops the route finds.

Matching rules vary with parameters in the command:

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

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

  • If the display ip routing-table 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 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 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.

Example

# Display brief information about the current IPv4 routing table. The command output shows that there are two static routes with the same destination address 10.1.1.1/32 but different next hops.

<HUAWEI> display ip routing-table
Route Flags: R - relay, D - download to fib, T - to vpn-instance
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 5        Routes : 5        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      10.1.1.1/32   Static  60   0           D   0.0.0.0         NULL0
                    Static  60   0           D   192.168.0.2     Vlanif100
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
  192.168.150.0/24  Direct  0    0           D   192.168.150.22  Vlanif4094
 192.168.150.22/32  Direct  0    0           D   127.0.0.1       Vlanif4094
Table 1 Description of the display ip routing-table command output

Item

Description

Route Flags

Flag of a route:
  • R: indicates that the route is an iterated route.

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

  • T: indicates a route whose next hop belongs to a VPN instance.

Routing Table: Public

The routing table is a public routing table. If the routing table is a private routing table, a private network name is displayed, for example, Routing Tables: ABC.

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

Routing protocol that learns a route.

Pre

Preference of a route.

Cost

Cost of a route.

Flags

Route flags in the heading of the routing table.

NextHop

Next-hop address of a route.

Interface

Outbound interface through which the next hop of a route is reachable.

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

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

Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface

       10.1.1.0/24  Direct 0    0           D  10.1.1.1        Vlanif10
       10.1.1.1/32  Direct 0    0           D  127.0.0.1       Vlanif10
       10.5.5.0/24  Static 60   0          RD  10.1.1.2        Vlanif10
Table 2 Description of the display ip routing-table vpn-instance command output

Item

Description

Route Flags

Route flag:
  • R: indicates an iterated route.

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

  • T: indicates a route whose next hop belongs to a VPN instance.

Routing Tables: vpn1

VPN routing table named vpn1.

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

Routing protocol.

Pre

Preference.

Cost

Route cost.

Flags

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

NextHop

Next hop.

Interface

Outbound interface through which the next hop is reachable.

# Display brief information about the current routing table. Route 10.2.2.2/32 is a static route with next hop 10.1.1.1. This route is an iterated route and has two outbound interfaces because 10.1.1.1 has two outbound interfaces.

<HUAWEI> display ip routing-table
Route Flags: R - relay, D - download to fib, T - to vpn-instance
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 6        Routes : 7

   Destination/Mask  Proto   Pre  Cost Flags  NextHop    Interface

       10.1.1.1/32   Static  60   0      D    0.0.0.0    NULL0
                     Static  60   0      D    10.10.0.2  Vlanif100
       10.2.2.2/32   Static  60   0     RD   10.1.1.1    NULL0
                     Static  60   0     RD   10.1.1.1    Vlanif100
      10.10.0.0/24   Direct   0   0      D    10.10.0.1  Vlanif100
      10.10.0.1/32   Direct   0   0      D    127.0.0.1  Vlanif100
      127.0.0.0/8    Direct   0   0      D    127.0.0.1  InLoopBack0
      127.0.0.1/32   Direct   0   0      D    127.0.0.1  InLoopBack0

# Display detailed information about the IPv4 routing table.

<HUAWEI> display ip routing-table verbose
Route Flags: R - relay, D - download to fib, T - to vpn-instance
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 5        Routes : 5


Destination: 10.0.0.36/32
     Protocol: Direct           Process ID: 0
   Preference: 0                      Cost: 0
      NextHop: 127.0.0.1         Neighbour: 0.0.0.0
        State: Active Adv              Age: 01h03m56s
          Tag: 0                  Priority: high
        Label: NULL                QoSInfo: 0x0
   IndirectID: 0x0
 RelayNextHop: 0.0.0.0           Interface: InLoopBack0
     TunnelID: 0x0                   Flags:  D

Destination: 10.10.36.0/24
     Protocol: Direct           Process ID: 0
   Preference: 0                      Cost: 0
      NextHop: 10.10.36.2        Neighbour: 0.0.0.0
        State: Active Adv              Age: 00h26m36s
          Tag: 0                  Priority: high
        Label: NULL                QoSInfo: 0x0
   IndirectID: 0x0
 RelayNextHop: 0.0.0.0           Interface: Vlanif10
     TunnelID: 0x0                   Flags:  D

Destination: 10.10.36.2/32
     Protocol: Direct           Process ID: 0
   Preference: 0                      Cost: 0
      NextHop: 127.0.0.1         Neighbour: 0.0.0.0
        State: Active Adv              Age: 00h26m46s
          Tag: 0                  Priority: high
        Label: NULL                QoSInfo: 0x0
   IndirectID: 0x0
 RelayNextHop: 0.0.0.0           Interface: Vlanif10
     TunnelID: 0x0                   Flags:  D

Destination: 127.0.0.0/8                                                        
     Protocol: Direct           Process ID: 0                                   
   Preference: 0                      Cost: 0                                   
      NextHop: 127.0.0.1         Neighbour: 0.0.0.0                             
        State: Active NoAdv            Age: 3d01h20m39s                         
          Tag: 0                  Priority: high                                
        Label: NULL                QoSInfo: 0x0                                 
   IndirectID: 0x0                                                              
 RelayNextHop: 0.0.0.0           Interface: InLoopBack0                         
     TunnelID: 0x0                   Flags:  D                                  
                                                                                
Destination: 127.0.0.1/32                                                       
     Protocol: Direct           Process ID: 0                                   
   Preference: 0                      Cost: 0                                   
      NextHop: 127.0.0.1         Neighbour: 0.0.0.0                             
        State: Active NoAdv            Age: 3d01h20m39s                         
          Tag: 0                  Priority: high                                
        Label: NULL                QoSInfo: 0x0                                 
   IndirectID: 0x0                                                              
 RelayNextHop: 0.0.0.0           Interface: InLoopBack0                         
     TunnelID: 0x0                   Flags:  D                                  
Table 3 Description of the display ip routing-table verbose command output

Item

Description

Route Flags

Flag of a route:
  • R: indicates that the route is an iterated route.

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

  • T: indicates a route whose next hop belongs to a VPN instance.

Destinations

Total number of destination networks or hosts.

Routes

Total number of active routes and inactive routes.

Destination

Address and mask length of the destination network or host.

Protocol

Routing protocol of a route.

Process ID

Routing protocol process ID of a route.

Preference

Preference of a route.

Cost

Cost of a route.

NextHop

Next-hop address of a route.

Neighbour

Neighbor address of a route.

State

Status of a route:
  • Active: active route

  • Invalid: invalid route

  • Inactive: inactive route

  • NoAdv: route that cannot be advertised

  • Adv: route that can be advertised

  • Del: route to be deleted

  • Relied: route iterated to an outbound interface and a next hop or route iterated to a tunnel

  • Stale: route that is marked Stale and used in GR

Age

Lifetime of a route.

Tag

Routing management tag. The value is an integer that ranges from 0 to 4294967295.

Priority

Convergence priority of route:

  • low

  • medium

  • high

  • critical

Label

Label allocated by MPLS.

QoSInfo

QoS information. The value 0x0 indicates that QoS information is empty.

IndirectID

ID of indirect next hop.

RelayNextHop

Iterated next-hop address.

Interface

Outbound interface.

TunnelID

Tunnel ID.

Flags

Route flags in the heading of the routing table.

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