show ip ospf routes

Syntax

show ip ospf [] routes [/] [all-vrfs | vrf] [vsx-peer]

描述

Displays OSPF routing table information.

Command context

Operator (>) or Manager (#)

Parameters

Enter an OSPF process ID to display information on the OSPF routing table for the particular OSPF process. Range: 1 to 63.

Specify an IP address in IPv4 format (x.x.x.x), wherexis a decimal number from 0 to 255. .

指定数量的广告位dress mask in CIDR format (x), wherexis a decimal number from 0 to 32.

all-vrfs

Select to display OSPF routing table information for all VRFs.

vrf

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 routesCodes: 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/2Codes: 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