display ospf [ process-id ] routing router-id [ router-id ]
display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface interface-type interface-number ] [ nexthop nexthop-address ]
| Parameter | Description | Value |
|---|---|---|
| process-id | Specifies the ID of an OSPF process. | The value is an integer ranging from 1 to 65535. |
| router-id router-id | Specifies the router ID of a destination router. | The value is in dotted decimal notation. |
| ip-address | Specifies an IP address. | The value is in dotted decimal notation. |
| mask | Specifies a subnet mask. | The value is in dotted decimal notation. |
| mask-length | Specifies the mask length. | The value is an integer ranging from 0 to 32. |
| interface interface-type interface-number | Specifies the type and number of an interface. | - |
| nexthop nexthop-address | Displays the route with a specified next hop IP address. | The value is 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 helps you troubleshoot OSPF faults.
# Display the OSPF routing table.
<HUAWEI> display ospf routing
OSPF Process 1 with Router ID 10.2.2.9
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.12.12.0/24 1 Transit 10.12.12.10 10.2.2.9 0.0.0.1
10.13.13.0/24 1 Stub 10.13.13.1 10.2.2.9 0.0.0.0
10.11.11.0/24 2 Transit 10.12.12.11 10.0.0.1 0.0.0.1
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
10.0.0.0/8 1 Type2 1 10.12.12.11 10.0.0.1
Total Nets: 4
Intra Area: 3 Inter Area: 0 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 |
Device that advertises LSAs. |
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. |