Show IP Route OSPF Command on CISCO Router/Switch

Other Cisco Other Cisco Material Original source

Command

Show IP Route OSPF

Use

Allows you to see just the OSPF routes installed in the routing table.

Syntax

Router#show ip route ospf

Example

This example demonstrates the show ip route ospfcommand. First, here’s the full routing table for R2.

Copy

R2(config-if)#do sh ip route

Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP

D – EIGRP, EX – EIGRP external, 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

i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2

ia – IS-IS inter area, * – candidate default, U – per-user static route

o – ODR, P – periodic downloaded static route



Gateway of last resort is not set



1.0.0.0/32 is subnetted, 3 subnets

R 1.1.1.1 [120/1] via 10.1.1.1, 00:00:15, FastEthernet0/0

R 1.3.3.3 [120/1] via 10.1.1.1, 00:00:15, FastEthernet0/0

R 1.2.2.2 [120/1] via 10.1.1.1, 00:00:15, FastEthernet0/0

2.0.0.0/32 is subnetted, 1 subnets

C 2.2.2.2 is directly connected, Loopback0

33.0.0.0/32 is subnetted, 1 subnets

O 33.33.33.33 [110/2] via 10.2.2.3, 00:01:08, FastEthernet1/0

3.0.0.0/32 is subnetted, 1 subnets

O 3.3.3.3 [110/2] via 10.2.2.3, 00:01:08, FastEthernet1/0

113.0.0.0/32 is subnetted, 1 subnets

O 113.113.113.113 [110/2] via 10.2.2.3, 00:01:08, FastEthernet1/0

111.0.0.0/32 is subnetted, 1 subnets

D 111.111.111.111 [90/156160] via 10.1.1.1, 00:01:23, FastEthernet0/0

10.0.0.0/24 is subnetted, 2 subnets

C 10.2.2.0 is directly connected, FastEthernet1/0

C 10.1.1.0 is directly connected, FastEthernet0/0

11.0.0.0/32 is subnetted, 1 subnets

D 11.11.11.11 [90/156160] via 10.1.1.1, 00:01:23, FastEthernet0/0

133.133.0.0/32 is subnetted, 1 subnets

O 133.133.133.133 [110/2] via 10.2.2.3, 00:01:09, FastEthernet1/0

Next, here’s the routing table with just the OSPF routes.

Copy

R2(config)#do show ip route ospf

33.0.0.0/32 is subnetted, 1 subnets

O 33.33.33.33 [110/2] via 10.2.2.3, 00:07:06, FastEthernet1/0

3.0.0.0/32 is subnetted, 1 subnets

O 3.3.3.3 [110/2] via 10.2.2.3, 00:07:06, FastEthernet1/0

113.0.0.0/32 is subnetted, 1 subnets

O 113.113.113.113 [110/2] via 10.2.2.3, 00:07:06, FastEthernet1/0

133.133.0.0/32 is subnetted, 1 subnets

O 133.133.133.133 [110/2] via 10.2.2.3, 00:07:06, FastEthernet1/0
← All Other Cisco articles Home