display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface interface-type interface-number ] [ nexthop nexthop-address ]
display ospf [ process-id ] routing router-id [ router-id ]
| Parameter | Description | Value |
|---|---|---|
| process-id | Specifies the ID of an OSPF process. | The value is an integer ranging from 1 to 65535. |
| ip-address | Specifies the IP address. | In dotted decimal notation. |
| mask | Specifies the subnet mask. | In dotted decimal notation. |
| mask-length | Specifies the mask length. | The value is an integer ranging from 0 to 32. |
| interface-type | Specifies the type of the interface. | - |
| interface-number | Specifies the number of the interface. | - |
| nexthop nexthop-address | Displays the route with the specified next hop IP address. | - |
| router-id router-id | Specifies the router ID of a destination router. | In dotted decimal notation. |
By using this command with different parameters, you can view the routes of a specified interface or next hop.
The command output can help you troubleshoot OSPF faults.
# Display the OSPF routing table.
<sysname> display ospf routing
OSPF Process 1 with Router ID 4.4.4.4
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
172.16.1.0/24 4 Inter-area 192.168.2.1 2.2.2.2 0.0.0.2
172.17.1.0/24 1 Transit 172.17.1.1 4.4.4.4 0.0.0.2
192.168.0.0/24 2 Inter-area 192.168.2.1 2.2.2.2 0.0.0.2
192.168.1.0/24 3 Inter-area 192.168.2.1 2.2.2.2 0.0.0.2
192.168.2.0/24 1 Stub 192.168.2.2 4.4.4.4 0.0.0.2
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
10.0.0.0/8 1 Type2 1 192.168.2.1 1.1.1.1
Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0
Item |
Description |
|---|---|
Destination |
Destination network |
Cost |
Cost of the route to the destination address |
Type |
Type of the destination network:
|
NextHop |
Next hop address to the destination address |
AdvRouter |
Advertising router |
Area |
Area ID |
Tag |
Tag of the external route |
Total Nets |
Total number of networks in an area, between areas, in ASE areas, and in NSSAs. |
Intra Area |
Total number of intra-area networks (that is, stub networks and transit networks) |
Inter Area |
Total number of inter-area networks |
ASE |
Total number of networks in the ASE area |
NSSA |
Total number of networks in the NSSA |
# Display information about the OSPF routes to the device with the specified IP address.
<sysname> display ospf routing 10.5.6.0
OSPF Process 1 with Router ID 3.3.3.3
Destination : 10.5.6.0/24
AdverRouter : 5.5.5.5 Area : 0.0.0.1
Cost : 20 Type : Transit
NextHop : 10.11.11.5 Interface : GigabitEthernet0/0/1
Priority : Low Age : 00h00m10s
Backup NextHop : 10.2.6.6 Backup Interface : GigabitEthernet0/0/3
Backup Type : LFA LINK-NODE
Item |
Description |
|---|---|
Interface |
Outbound interface of the next hop |
Priority |
OSPF convergence priority:
|
Age |
Lifetime of a route |
Backup NextHop |
Address of the backup next hop |
Backup Interface |
Outbound interface of the backup next hop |
Backup Type |
Type of the backup next hop:
|
# Display the routes to an OSPF device.
<sysname> display ospf routing router-id
OSPF Process 1 with Router ID 1.1.1.1
Router Type URT Routing Tables
RtType Destination Area Cost Nexthop Type
Intra-area 5.5.5.5 0.0.0.0 4 10.0.0.2 Normal
Intra-area 4.4.4.4 0.0.0.0 3 10.0.0.2 Normal
Intra-area 3.3.3.3 0.0.0.0 2 10.0.0.2 Normal
Intra-area 2.2.2.2 0.0.0.0 1 10.0.0.2 Normal
Item |
Description |
|---|---|
RtType |
Type of the destination network:
|
Type |
Router type:
|
# Display routes to the OSPF device with the router ID being 4.4.4.4.
<sysname> display ospf routing router-id 4.4.4.4
OSPF Process 1 with Router ID 5.5.5.5
Destination : 4.4.4.4 Route Type : Intra-area
Area : 0.0.0.10 AdvRouter : 4.4.4.4
Type : ASBR Age : 0x411c41
URT Cost : 1
NextHop : 10.1.14.4 Interface : GigabitEthernet0/0/1
Backup Nexthop : 10.2.13.3 Backup Interface : GigabitEthernet0/0/3
Backup Type : LFA LINK
Item |
Description |
|---|---|
Route Type |
Type of the destination network:
|
URT Cost |
Cost of the unicast routing table |