display ip routing-table
Syntax
display ip routing-table [ verbose ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
verbose: Displays detailed routing table information, including that for inactive routes. With this keyword absent, the command displays only brief information about active routes.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters.
Description
Use the display ip routing-table command to display brief information about active routes in the routing table.
This command displays brief information about a routing table, with a routing entry contained in one line. The information displayed includes destination IP address/mask length, protocol, priority, cost, next hop and outbound interface. This command displays only the optimal routes in use.
Use the display ip routing-table verbose command to display detailed information about all routes in the routing table.
This command displays detailed information about all active and inactive routes, including the statistics of the entire routing table and information for each route.
Examples
# Display brief information about active routes in the routing table.
<Sysname> display ip routing-table Routing Tables: Public Destinations : 7 Routes : 7 Destination/Mask Proto Pre Cost NextHop Interface 1.1.2.0/24 Direct 0 0 1.1.2.1 Vlan1 1.1.2.1/32 Direct 0 0 127.0.0.1 InLoop0 2.2.2.0/24 static 60 2 1.1.2.2 Vlan2 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 192.168.0.0/24 Direct 0 0 192.168.0.1 Vlan10 192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0
Table 1: Output description
Field | Description |
---|---|
Destinations | Number of destination addresses |
Routes | Number of routes |
Destination/Mask | Destination address/mask length |
Proto | Protocol that presents the route |
Pre | Priority of the route |
Cost | Cost of the route |
NextHop | Address of the next hop on the route |
Interface | Outbound interface for packets to be forwarded along the route |
# Display detailed information about all routes in the routing table.
<Sysname> display ip routing-table verbose Routing Tables: Public Destinations : 6 Routes : 6 Destination: 1.1.2.0/24 Protocol: Direct Process ID: 0 Preference: 0 Cost: 0 NextHop: 1.1.2.1 Interface: Vlan-interface11 BkNextHop: 0.0.0.0 BkInterface: RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0 Tunnel ID: 0x0 Label: NULL State: Active Adv Age: 06h46m22s Tag: 0 Destination: 1.1.2.1/32 Protocol: Direct Process ID: 0 Preference: 0 Cost: 0 NextHop: 127.0.0.1 Interface: InLoopBack0 BkNextHop: 0.0.0.0 BkInterface: RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0 Tunnel ID: 0x0 Label: NULL State: Active NoAdv Age: 06h46m22s Tag: 0 Destination: 127.0.0.0/8 Protocol: Direct Process ID: 0 Preference: 0 Cost: 0 NextHop: 127.0.0.1 Interface: InLoopBack0 BkNextHop: 0.0.0.0 BkInterface: RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0 Tunnel ID: 0x0 Label: NULL State: Active NoAdv Age: 06h46m36s Tag: 0 Destination: 127.0.0.1/32 Protocol: Direct Process ID: 0 Preference: 0 Cost: 0 NextHop: 127.0.0.1 Interface: InLoopBack0 BkNextHop: 0.0.0.0 BkInterface: RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0 Tunnel ID: 0x0 Label: NULL State: Active NoAdv Age: 06h46m37s Tag: 0 Destination: 192.168.0.0/24 Protocol: Direct Process ID: 0 Preference: 0 Cost: 0 NextHop: 192.168.0.1 Interface: Virtual-Template1 BkNextHop: 0.0.0.0 BkInterface: RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0 Tunnel ID: 0x0 Label: NULL State: Active Adv Age: 06h46m35s Tag: 0 Destination: 192.168.0.1/32 Protocol: Direct Process ID: 0 Preference: 0 Cost: 0 NextHop: 127.0.0.1 Interface: InLoopBack0 BkNextHop: 0.0.0.0 BkInterface: RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0 Tunnel ID: 0x0 Label: NULL State: Active NoAdv Age: 06h46m35s Tag: 0
Displayed first are statistics for the whole routing table, followed by detailed description of each route (in sequence).
Table 2: Output description
Field | Description | |
---|---|---|
Destination | Destination address/mask length | |
Protocol | Protocol that presents the route | |
Process ID | Process ID | |
Preference | Priority of the route | |
Cost | Cost of the route | |
NextHop | Address of the next hop on the route | |
Interface | Outbound interface for packets to be forwarded along the route | |
BkNextHop | Backup next hop | |
BkInterface | Backup outbound interface | |
RelyNextHop | The next hop address obtained through routing recursion | |
Neighbour | Neighboring address determined by Routing Protocol | |
Tunnel ID | Tunnel ID | |
Label | Label | |
State | Route status: | |
Active | This is an active unicast route. | |
Adv | This route can be advertised. | |
Delete | This route is deleted. | |
Gateway | This is an indirect route. | |
Holddown | Number of holddown routes. | |
Int | The route was discovered by an Interior Gateway Protocol (IGP). | |
NoAdv | The route is not advertised when the router advertises routes based on policies. | |
NotInstall | Among routes to a destination, the route with the highest priority is installed into the core routing table and advertised. A NotInstall route cannot be installed into the core routing table but can be advertised. | |
Reject | The packets matching a Reject route will be dropped. Besides, the router sends ICMP unreachable messages to the sources of the dropped packets. The Reject routes are usually used for network testing. | |
Static | A static route is not lost when you perform the save operation and then restart the router. Routes configured manually are marked as static. | |
Unicast | Unicast routes | |
Inactive | Inactive routes | |
Invalid | Invalid routes | |
WaitQ | The route is the WaitQ during route recursion. | |
TunE | Tunnel | |
GotQ | The route is in the GotQ during route recursion. | |
Age | Time for which the route has been in the routing table, in the sequence of hour, minute, and second from left to right. | |
Tag | Route tag |