display ospf routing
Use display ospf routing to display OSPF routing information.
Syntax
display ospf [ process-id ] routing [ ip-address { mask-length | mask } ] [ interface interface-type interface-number ] [ nexthop nexthop-address ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
process-id: Specifies an OSPF process by its ID in the range of 1 to 65535. If you do not specify this argument, the command displays the routing information for all OSPF processes.
ip-address: Specifies a destination IP address.
mask-length: Specifies mask length in the range of 0 to 32.
mask: Specifies the mask in dotted decimal notation.
interface interface-type interface-number: Displays routes passing the specified output interface. If you do not specify this option, the command displays OSPF routing information for all interfaces.
nexthop nexthop-address: Displays routes passing the specified next hop. If you do not specify this option, the command displays all OSPF routing information.
verbose: Displays detailed OSPF routing information. If you do not specify this keyword, the command displays brief OSPF routing information.
Examples
# Display OSPF routing information.
<Sysname> display ospf routing OSPF Process 1 with Router ID 192.168.1.2 Routing Table Topology base (MTID 0) Routing for network Destination Cost Type NextHop AdvRouter Area 192.168.1.0/24 1562 Stub 192.168.1.2 192.168.1.2 0.0.0.0 172.16.0.0/16 1563 Inter 192.168.1.1 192.168.1.1 0.0.0.0 Total nets: 2 Intra area: 1 Inter area: 1 ASE: 0 NSSA: 0 Topology red (MTID 41) Routing for network Destination Cost Type NextHop AdvRouter Area 36.1.1.0/24 1 Transit 0.0.0.0 192.168.1.3 0.0.0.1 Total nets: 1 Intra area: 1 Inter area: 0 ASE: 0 NSSA: 0
Table 48: Command output
Field | Description |
---|---|
Topology | This field is not supported in the current software version. Topology name. The topology name for base topology is base. |
MTID | This field is not supported in the current software version. Topology ID. The value of 0 indicates the base topology. |
Destination | Destination network. |
Cost | Cost to destination. |
Type | Route type: intra-area, transit, stub, inter-area, Type-1 external, and Type-2 external. |
NextHop | Next hop address. |
AdvRouter | Advertising router. |
Area | Area ID. |
Total nets | Total networks. |
Intra area | Total intra-area routes. |
Inter area | Total inter-area routes. |
ASE | Total ASE routes. |
NSSA | Total NSSA routes. |
# Display detailed OSPF routing information.
<Sysname> display ospf routing verbose OSPF Process 2 with Router ID 192.168.1.112 Routing Table Topology base (MTID 0) Routing for network Destination: 192.168.1.0/24 Priority: Low Type: Stub AdvRouter: 192.168.1.2 Area: 0.0.0.0 SubProtoID: 0x1 Preference: 10 NextHop: 192.168.1.2 BkNextHop: N/A IfType: Broadcast BkIfType: N/A Interface: Vlan100 BkInterface: N/A NibID: 0x1300000c Status: Normal Cost: 1562 Destination: 172.16.0.0/16 Priority: Low Type: Inter AdvRouter: 192.168.1.1 Area: 0.0.0.0 SubProtoID: 0x1 Preference: 10 NextHop: 192.168.1.1 BkNextHop: N/A IfType: Broadcast BkIfType: N/A Interface: Vlan101 BkInterface: N/A NibID: 0x1300000c Status: Normal Cost: 1563 SpfCost: 65535 Total nets: 2 Intra area: 2 Inter area: 0 ASE: 0 NSSA: 0 Topology red (MTID 41) Routing for network Destination: 36.1.1.0/24 Priority: Low Type: Transit AdvRouter: 192.168.1.3 Area: 0.0.0.1 SubProtoID: 0x1 Preference: 10 NextHop: 0.0.0.0 BkNextHop: N/A IfType: Broadcast BkIfType: N/A Interface: Vlan102 BkInterface: N/A NibID: 0x13000001 Status: Direct Cost: 1 Total nets: 1 Intra area: 1 Inter area: 0 ASE: 0 NSSA: 0
Table 49: Command output
Field | Description |
---|---|
Topology | This field is not supported in the current software version. Topology name. The topology name for base topology is base. |
MTID | This field is not supported in the current software version. Topology ID. The value of 0 indicates the base topology. |
Priority | Prefix priority: critical, high, medium, and low. |
Type | Route type: intra-area, transit, stub, inter-area, Type-1 external, and Type-2 external. |
AdvRouter | Advertising router. |
Area | Area ID. |
SubProtoID | Sub protocol ID. |
Preference | OSPF route preference. |
NextHop | Primary next hop IP address. |
BkNextHop | Backup next hop IP address. |
IfType | Type of the network to which the primary next hop belongs. |
BkIfType | Type of the network to which the backup next hop belongs. |
Interface | Output interface. |
BkInterface | Backup output interface. |
NibID | Next hop ID. |
Status | Route status:
|
Cost | Cost to destination. |
SpfCost | SPF cost. |