show ip ospf routes
Syntax
show ip ospf [<INSTANCE-TAG>] routes
[<PREFIX/LENGTH>] [all-vrfs | vrf <VRF-NAME>] [vsx-peer]
Description
Displays OSPF routing table information.
Command context
Operator (>
) or Manager (#
)
Parameters
<INSTANCE-TAG>
Enter an OSPF Process ID to display information on the OSPF routing table for the particular OSPF process. Range: 1-63.
<PREFIX/LENGTH>
Select to display information about a particular network prefix (subnet), specified in IPv4 format (A.B.C.D/M).
all-vrfs
Select to display OSPF routing table information for all VRFs.
vrf <VRF-NAME>
Specify the name of a VRF. Default: default.
[vsx-peer]
Shows the output from the VSX peer switch. If the switches do not have the VSX configuration or the ISL is down, the output from the VSX peer switch is not displayed. This parameter is available on switches that support VSX.
Authority
Operators or Administrators or local user group members with execution rights for this command. Operators can execute this command from the operator context (>) only.
Examples
Showing OSPF routing table information:
switch# show ip ospf routes Codes: i - Intra-area route, I - Inter-area route E1 - External type-1, E2 - External type-2 OSPF Process ID 1 VRF default, Routing Table --------------------------------------------- Total Number of Routes : 2 10.1.1.0/24 (i) area: 0.0.0.0 directly attached to interface 1/1/1, cost 1 distance 110 20.1.1.0/24 (I) via 10.1.1.2 interface 1/1/1, cost 2 distance 110
Showing OSPF routing table information for a specific subnet:
switch# show ip ospf routes 10.1.1.0/2 Codes: i - Intra-area route, I - Inter-area route E1 - External type-1, E2 - External type-2 OSPF Process ID 1 VRF default, Routing Table for prefixes 10.1.1.0/24 ---------------------------------------------------------------------- Total Number of Routes : 1 10.1.1.0/24 (i) area: 0.0.0.0 directly attached to interface 1/1/1, cost 1 distance 110