show ip ospf route
Use this command to display the OSPF routing table.
Command Syntax
show ip ospf (<0-65535>|) route ( A.B.C.D |A.B.C.D/M |summary |)
show ip ospf (<0-65535>|) route ( A.B.C.D |A.B.C.D/M |summary | fast-reroute |)
Parameters
<0-65535>
Router process identifier.
A.B.C.D
Single route.
A.B.C.D/M
Single exact match route.
summary
Route counts.
fast-reroute
Fast-reroute routes.
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show ip ospf route
OSPF process 10:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
C 50.0.0.0/24 [10] is directly connected, eth1, Area 0.0.0.10
C 60.0.0.0/24 [10] is directly connected, eth3, Area 0.0.0.10
OSPF process 15:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
C 80.0.0.0/24 [1] is directly connected, eth4, Area 0.0.0.15
Header
Each entry in this table has a code preceding it indicating the source of the routing entry.
Table 1-21 explains the fields of route codes.
Table 1-21: route codes
Code | Meaning | Description |
---|
C | connected | Routes directly connected to the local device that were not distributed via IGP. The device inherently knows of these networks, so there is no need to learn about these from another device. Connected routes are preferred over routes for the same network learned from routing protocols. |
O | OSPF | Modifiers: IA - OSPF inter area N1 - OSPF NSSA external type 1 N2 - OSPF NSSA external type 2 E1 - OSPF external type 1 E2 - OSPF external type 2 |
D | discard | An ABR or ASBR performing summarization installs a discard route in its routing table for the summarized network range to prevent routing loops where portions of the summarized network range do not have a more specific route in the RIB. External and internal discard route entries are installed by default. During route summarization, routing loops can happen if data sent to a nonexisting network appears to be a part of the summary, and the router doing the summarization has a less specific route that points back to the sending router for the network. |
Route Entry Fields
Table 1-22 shows the route entry fields.
Table 1-22: route entry output details
Field | Description |
---|
Codes | As explained in Table 1-21. |
IP address | IP address of the remote network. |
Metric | For OSPF the metric is cost, which indicates the best quality path to use to forward packets. |
Next hop router IP address | This route is available through the next hop router located at this IP address. This identifies exactly where packets go when they match this route. |
Outgoing interface name | Interface used to get to the next-hop address for this route. |
Area | OSPF area identifier |
Example: Process Identifier
The following is a sample output with the process identifier parameter.
#show ip ospf 10 route
OSPF process 10:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
C 50.0.0.0/24 [10] is directly connected, eth1, Area 0.0.0.10
C 60.0.0.0/24 [10] is directly connected, eth3, Area 0.0.0.10
Last modified date: 07-13-2023