In this article, we are going to cover Open Shortest Path First (OSPF) configuration verification and troubleshooting. As a network engineer, you will likely encounter OSPF issues most of the time. OSPF is an open standard Interior Gateway Protocol (IGP) used for exchanging routing table information throughout a single Autonomous System (AS) in an IP network.

OSPF Configuration Verification

If you have access to the privileged mode of OSPF routers, you can use 'show running-config' to verify the configuration.

Router#show running-config  Building configuration...              
router ospf 1  router-id 1.1.1.1  network 1.1.1.0 0.0.0.3 area 0              

If you only have access to user mode, then you can verify by using the 'show ip protocols' command. It will give you information like Router ID, the number of areas, network commands, and admin distance.

Router# sh ip protocols  *** IP Routing is NSF aware ***  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 1.1.1.1   Number of areas in this router is 1. 1 normal 0 stub 0 nssa   Maximum path: 4   Routing for Networks:     1.1.1.0 0.0.0.3 area 0   Routing Information Sources:     Gateway         Distance      Last Update   Distance: (default is 110)              

We can also use 'show ip ospf interface <brief>' to verify interfaces that are actively participating in the OSPF process.

Router#  sh ip ospf interface  GigabitEthernet0/0 is up, line protocol is up    Internet Address 1.1.1.1/30, Area 0, Attached via Network Statement   Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1   Topology-MTID    Cost    Disabled    Shutdown      Topology Name         0           1         no          no            Base   Transmit Delay is 1 sec, State BDR, Priority 1   Designated Router (ID) 2.2.2.2, Interface address 1.1.1.2   Backup Designated router (ID) 1.1.1.1, Interface address 1.1.1.1   Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5     oob-resync timeout 40     Hello due in 00:00:02   Supports Link-local Signaling (LLS)   Cisco NSF helper support enabled   IETF NSF helper support enabled   Index 1/1/1, flood queue length 0   Next 0x0(0)/0x0(0)/0x0(0)   Last flood scan length is 1, maximum is 1   Last flood scan time is 1 msec, maximum is 1 msec   Neighbor Count is 1, Adjacent neighbor count is 1      Adjacent with neighbor 2.2.2.2  (Designated Router)   Suppress hello for 0 neighbor(s)              
Router#  sh ip ospf interface brief Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C Gi0/0        1     0               1.1.1.1/30         1     BDR   1/1              

Troubleshooting OSPF

We can begin our troubleshooting by looking at the output of the 'show ip ospf neighbor' command.

Router#  show ip ospf neighbor    Neighbor ID     Pri   State           Dead Time   Address         Interface 2.2.2.2           1   FULL/DR         00:00:39    1.1.1.2         GigabitEthernet0/0

Here, we can verify if our router is forming an OSPF neighbor, the interface, neighbor's IP address, and ID.
The normal working states are:

OSPF Working State Definition
FULL/ – The "-" instead of letters in the neighbor state indicates that the link does not use a DR/BDR (Designated Router/Backup Designated Router).
FULL/DR The OSPF neighbor state is full, and the neighbor router is the DR.
FULL/BDR The OSPF neighbor state is full, and the neighbor router is the backup DR (BDR).
FULL/DROTHER The OSPF neighbor state is full, and the neighbor router is neither the DR nor the BDR. (Because the status is FULL, it also suggests that the local router is a DR or BDR.)
2WAY/DROTHER The OSPF neighbor state is two-way, and the neighbor is a DROther router who is neither the DR nor the BDR. (It also suggests that the local router is a DROther router, because else the state would be FULL.)

Another helpful command is 'show ip ospf database', which lists all OSPF routers in the same area.

Router# show ip ospf database              OSPF Router with ID (1.1.1.1) (Process ID 1)                  Router Link States (Area 0)  Link ID         ADV Router      Age         Seq#       Checksum Link count 1.1.1.1         1.1.1.1         18          0x80000003 0x00F926 1 2.2.2.2         2.2.2.2         2           0x80000003 0x00BB5B 1                  Net Link States (Area 0)  Link ID         ADV Router      Age         Seq#       Checksum 1.1.1.2         2.2.2.2         2           0x80000002 0x008D95              

The 'show ip ospf' command will show Router ID, reference bandwidth, number of interfaces, and authentication.

Router#show ip ospf  Routing Process "ospf 1" with ID 1.1.1.1              
                Reference bandwidth unit is 100 mbps     Area BACKBONE(0)         Number of interfaces in this area is 1         Area has no authentication              

Listed below are some of the useful debug commands issued at the privilege mode that we can use in troubleshooting and debugging the OSPF implementation in our network:
debug ip ospf packet – shows hello packets that are being sent and received on the router
debug ip ospf – shows the mismatch in hello parameters.
debug ip ospf adj – shows DR and BDR elections on a broadcast or non-broadcast multi-access network


Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It's the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: