The display ip routing-table time-range command displays routes that are generated within a specified period.
display ip routing-table vpn-instance vpn-instance-name [ table-name { localmt | msr } ] [ time-range min-age max-age ] verbose
display ip routing-table table-name localmt protocol { bgp | direct | isis | rip | static | ospf | unr } [ time-range min-age max-age ]
display ip routing-table vpn-instance vpn-instance-name table-name localmt protocol { bgp | direct | isis | rip | static | ospf | unr } [ time-range min-age max-age ]
display ip routing-table [ [ vpn-instance vpn-instance-name ] | [ protocol { bgp | direct | isis | rip | static | ospf | unr } ] ] time-range min-age max-age
display ip routing-table vpn-instance vpn-instance-name [ table-name localmt ] protocol { bgp | direct | isis | rip | static | ospf | unr } time-range min-age max-age [ verbose | inactive ]
Parameter | Description | Value |
---|---|---|
table-name |
Specifies a table of a producer. |
- |
localmt |
Displays information about the routing table of the local multi-topology routing table. |
- |
time-range |
Displays routes that are generated within a specified period. |
- |
min-age |
Specifies the start generation time. |
The value is a string of characters, in the format of XXdXXhXXmXXs. |
max-age |
Specifies the end generation time. |
The value is a string of characters, in the format of XXdXXhXXmXXs. |
verbose |
Displays detailed information about active and inactive routes. |
- |
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. |
msr |
Displays information about the routing table of the multicast static routing table. |
- |
protocol |
Displays routes of a specified protocol. |
- |
bgp |
Displays BGP routes. |
- |
direct |
Displays direct routes. |
- |
isis |
Displays IS-IS routes. |
- |
rip |
Displays RIP routes. |
- |
static |
Displays static routes. |
- |
ospf |
Displays OSPF routes. |
- |
unr |
Displays UNRs. |
- |
inactive |
Displays the summary of inactive routes only. |
- |
Usage Scenario
If neither verbose nor inactive is specified, only the summary of active routes of each routing protocol is displayed. To learn the detailed information about the active and inactive routes, specify verbose.
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. This command without verbose specified displays the preferred routes only.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.
The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display ip routing-table vpn-instance a time-range 1d1h1m1s 2d2h2m2s
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : a
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Static 60 0 DT 0.0.0.0 _public_
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Item | Description |
---|---|
Route Flags | Route flag:
|
Routing Table | Routing Table. |
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. |
NextHop | Next hop. |
Interface | Outbound interface through which the next hop is reachable. |