The display ip routing-table protocol command displays routing information of a specified protocol.
display ip routing-table protocol { direct | static | bgp | isis | ospf | rip | unr } [ inactive | verbose ]
display ip routing-table protocol unr type isp [ inactive | verbose ]
| Parameter | Description | Value |
|---|---|---|
| direct | Displays routing information of direct routes. | - |
| static | Displays routing information of static routes. | - |
| bgp | Displays routing information of BGP routes. | - |
| isis | Displays routing information of IS-ISroutes. | - |
| ospf | Displays routing information of OSPF routes. | - |
| rip | Displays routing information of RIP routes. | - |
| unr | Displays routing information of user network routes. | - |
| inactive | Displays only the summary of inactive routes. | - |
| verbose | Displays detailed information about active and inactive routes. | - |
| isp | Displays the information about user network routes of the isp type. | - |
If neither verbose nor inactive is specified, the summary of all routes of each routing protocol is displayed.
# Display the summary of all direct routes.
<sysname> display ip routing-table protocol direct
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Direct
Destinations : 17 Routes : 17
Direct routing table status : <Active>
Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost Flags NextHop Interface
8.8.8.8/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.11.1.0/24 Direct 0 0 D 10.11.1.2 GigabitEthernet0/0/1
10.11.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
10.11.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1
10.12.0.0/16 Direct 0 0 D 127.0.0.1 LoopBack5
10.12.11.0/32 Direct 0 0 D 127.0.0.1 LoopBack5
10.12.255.255/32 Direct 0 0 D 127.0.0.1 LoopBack5
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
192.168.1.0/24 Direct 0 0 D 192.168.1.122 GigabitEthernet0/0/1
192.168.1.122/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/4
192.168.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
192.168.18.0/24 Direct 0 0 D 192.168.18.1 GigabitEthernet0/0/4
192.168.18.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/4
192.168.18.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/4
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Direct routing table status : <Inactive>
Destinations : 0 Routes : 0
Item |
Description |
|---|---|
Route Flags |
Indicates the route flag:
|
Public routing table |
Indicates the contents of the public routing table:
|
Direct routing table status |
Indicates the status of direct routes:
|
Destinations |
Indicates the total number of destination addresses. |
Routes |
Indicates the total number of routes in the routing table. |
Active |
Indicates active routes in the routing table. |
Inactive |
Indicates inactive routes in the routing table. |
Destination/Mask |
Indicates the destination address or mask length. |
Proto |
Indicates the type of the routing protocol. |
Pre |
Indicates the preference of the routing protocol. |
Cost |
Indicates the cost of the imported route. |
Flags |
Indicates the route flag, that is, Route Flags in the heading of the routing table. |
Nexthop |
Indicates the next hop address. |
Interface |
Indicates the outbound interface. |
# Display the detailed information of all OSPF routes.
<sysname> display ip routing-table protocol ospf verbose
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 3 Routes : 3
Destination: 1.1.1.1/32
Protocol: OSPF Process ID: 1
Preference: 10 Cost: 1
NextHop: 10.11.1.1 Neighbour: 0.0.0.0
State: Active Adv Age: 21h23m44s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0x0
RelayNextHop: 0.0.0.0 Interface: GigabitEthernet0/0/1
TunnelID: 0x0 Flags: D
Destination: 10.1.1.1/32
Protocol: OSPF Process ID: 1
Preference: 10 Cost: 1
NextHop: 10.11.1.1 Neighbour: 0.0.0.0
State: Active Adv Age: 21h23m44s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0x0
RelayNextHop: 0.0.0.0 Interface: GigabitEthernet0/0/1
TunnelID: 0x0 Flags: D
Destination: 10.2.1.1/32
Protocol: OSPF Process ID: 1
Preference: 10 Cost: 1
NextHop: 10.11.1.1 Neighbour: 0.0.0.0
State: Active Adv Age: 21h23m44s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0x0
RelayNextHop: 0.0.0.0 Interface: GigabitEthernet0/0/1
TunnelID: 0x0 Flags: D
Item |
Description |
|---|---|
Routing Tables: Public |
Indicates a public routing table |
Destination |
Indicates the address and mask length of the destination network or host. |
Protocol |
Indicates the routing protocol. |
Process ID |
Indicates the process ID of the routing protocol. |
Preference |
Indicates the preference of the route. |
Cost |
Indicates the route cost. |
NextHop |
Indicates the next hop. |
Neighbour |
Indicates the neighbor. |
State |
Indicates the status of routes:
|
Age |
Indicates the lifetime of the route. |
Tag |
Indicates the administrative tag for routes. The value is an integer ranging from 0 to 4294967295. |
Priority |
Indicates the convergence priority of a route.
|
Label |
Indicates the allocated MPLS label. |
QoSInfo |
Indicates QoS information. The value 0x0 indicates that no QoS information is displayed. The value is a 32-bit octal number. The last three octal bits of this value indicate the value of the QoS local ID, which can be configured by the apply qos-local-id command. The fourth and seventh bits of this value are reserved and set to 0. The fifth and the sixth bits indicate the value of the BGP traffic index, which can be configured by the apply traffic-index command. The eighth number of this value is the flag bit. |
IndirectID |
Indicates the keyword of indirect next hop, which is generated by the system and cannot be configured by users. If the route is not iterated, the value is 0x0. If the route is iterated, the value is not 0x0. |
RelayNextHop |
Indicates the relay next hop. |
Interface |
Indicates the outbound interface through which the next hop is reachable. |
TunnelID |
Indicates the tunnel ID. |
Flags |
Indicates the route flag, that is, Route Flags in the heading of the routing table. |