There are several ways you can verify and troubleshoot
OSPF configuration and operation, listed below are the necessary command to do
this:
How to verify OSPF Configuration:
Show IP route command
Show IP ospf command
Show ip ospf database command
Show ip ospf interface command
Show ip ospf neighbour command
Show ip protocols command
Debugging ospf
The Show IP route
command:
R1#sho ip route
10.0.0.0/30 is
subnetted, 3 subnets
C 10.1.1.0 is
directly connected, Serial0/0/1
O 10.10.10.0
[110/128] via 10.20.20.2, 00:05:14, Serial0/0/0
[110/128] via 10.1.1.2, 00:05:14, Serial0/0/1
C 10.20.20.0
is directly connected, Serial0/0/0
172.16.0.0/24
is subnetted, 1 subnets
O 172.16.10.0
[110/65] via 10.1.1.2, 00:05:14, Serial0/0/1
O 192.168.1.0/24
[110/65] via 10.20.20.2, 00:07:38, Serial0/0/0
C 192.168.20.0/24
is directly connected, FastEthernet0/0
R1#
Using the the above command displays all routes on the
network, with the O representing the OSPF internal routes. The Cs are directly
connected networks. It also found the dual route to the 10.10.10.0 network.
The Show ip ospf neighbour command:
R1#show ip ospf neighbor
Neighbor ID
Pri State Dead Time
Address Interface
192.168.1.1
0 FULL/ -
00:00:33 10.20.20.2 Serial0/0/0
172.16.10.1
0 FULL/ -
00:00:32 10.1.1.2 Serial0/0/1
R1#
The above command displays the summary of ospf information
regarding and the adjacency state. This command is very useful on a production
network.
The Show IP protocols command:
This command display the following information
R1#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update
filter list for all interfaces is not set
Incoming update
filter list for all interfaces is not set
Router ID
192.168.20.1
Number of areas
in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for
Networks:
192.168.20.0
0.0.0.255 area 0
10.20.20.0
0.0.0.3 area 0
10.1.1.0 0.0.0.3 area 0
Routing
Information Sources:
Gateway Distance Last Update
172.16.10.1 110 00:14:00
192.168.1.1 110 00:14:40
192.168.20.1 110 00:14:00
Distance:
(default is 110)
R1#
This command is used to verify the type of protocols
running on your router and network. The display above shows the OSPF process ID,
OSPF router ID, type of OSPF area, networks and areas configured for OSPF
neighboring router’s ID etc…etc.
The Debugging OSPF Command:
Among information provided by this command is the :
i. Debug ip ospf packet: this command displays
hello packets being sent and received on your router
ii. Debug ip ospf hello: this command displays hello
packets being sent and received on your router. It also displays more
information than the debug ospf packet
iii. The debug ip ospf adj: shows DR and DBR
elections on a broadcast and non-broadcast multi-access (NBMA) network.