display ip routing-table protocol (All views)

Function

The display ip routing-table protocol command displays routing information about the specified routing protocol.

Format

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

Parameters

Parameter Description Value
vpn-instance vpn-instance-name

Displays information about the routing table of an IPv4 address family-enabled 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.

protocol

Displays routes of a specified protocol.

-

bgp

Displays BGP routes.

-

direct

Displays direct routes.

-

isis

Displays IS-IS routes.

-

ospf

Displays OSPF routes.

-

rip

Displays RIP routes.

-

static

Displays static routes.

-

unr

Displays UNRs.

-

Views

All views

Default Level

1: Monitoring level

Task Name and Operations

Task Name Operations
route-base read

Usage Guidelines

Usage Scenario

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

Precautions

After learning the ARP entry of a peer end, VLANIF interfaces, QinQ interfaces, or QinQ VLAN tag termination sub-interfaces generate a 32-bit ARP Vlink direct route, and the route is displayed in the command output. Regular physical interfaces do not generate a 32-bit ARP Vlink direct route in this case.

Example

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

# Display brief information about all direct routes.
<HUAWEI> display ip routing-table protocol direct
------------------------------------------------------------------------------
_public_ Routing Table : Direct
Destinations : 6           Routes : 6
Direct Routing Table Status : < Active>
Destinations : 5           Routes : 5
Destination/Mask  Proto  Pre  Cost  Flags  Nexthop    Interface
10.1.1.1/32    DIRECT  0    0     D     127.0.0.1  GigabitEthernet0/1/0
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
127.255.255.255/32   DIRECT  0    0     D     127.0.0.1  InLoopBack0
255.255.255.255/32   DIRECT  0    0     D     127.0.0.1  InLoopBack0
Direct Routing Table Status : < Inactive>
Destinations : 1           Routes : 1
Destination/Mask  Proto  Pre  Cost  Flags  Nexthop    Interface
192.168.0.1/32/32   DIRECT  0    0     D     127.0.0.1  GigabitEthernet0/1/1
# Display all the direct routes of VPN instance named vpn1.
<HUAWEI> display ip routing-table vpn-instance vpn1 protocol direct
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
vpn1 routing table : Direct
         Destinations : 4           Routes : 4

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

Destination/Mask    Proto  Pre  Cost     Flags NextHop         Interface

        1.1.1.0/24  Direct 0    0           D  1.1.1.1         GigabitEthernet0/1/8
        1.1.1.1/32  Direct 0    0           D  127.0.0.1       GigabitEthernet0/1/8
      1.1.1.255/32  Direct 0    0           D  127.0.0.1       GigabitEthernet0/1/8
255.255.255.255/32  Direct 0    0           D  127.0.0.1       InLoopBack0
Direct routing table status : <Inactive>
         Destinations : 0           Routes : 0
Table 1 Description of the display ip routing-table protocol (All views) command output
Item Description
_public_ Routing Table

Contents of the public routing table:

  • direct: displays direct routes.
  • static: displays static routes.
  • bgp: displays BGP routes.
  • isis: displays IS-IS routes.
  • ospf: displays OSPF routes.
  • rip: displays RIP routes.
  • opr: displays OP-routes.
Direct Routing Table Status

Status of direct routes:

  • Inactive.
  • Active.
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

Priority.

Cost

Route cost.

Flags

Route flags in the header of the routing table.

Interface

Outbound interface through which the next hop is reachable.

Route Flags

Route flag:

  • R: indicates an iterated route.
  • D: indicates a route that is downloaded to the FIB.
  • T: indicates a route whose next hop belongs to a VPN instance.
  • B: indicates a black-hole rout.
NextHop

Next hop.

vpn1 routing table

vpn1 routing table.

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