Verifying Open Shortest Path First (OSPF) operational health on a Cisco router requires more than checking whether a neighbor appears in a list. Because OSPF is a link-state routing protocol, a healthy deployment depends on four distinct layers working together: an active local OSPF process, properly bound interfaces, synchronized neighbor adjacencies, and a consistent Link-State Database (LSDB) that successfully installs paths into the IP routing table. Whether you are performing a routine network audit, validating a maintenance window, or isolating a routing outage, following a structured command-line workflow ensures you catch subtle configuration mismatches before they cause blackholed traffic.
Table of Contents
Core CLI Commands to Verify OSPF Processes, Interfaces, and Neighbors
To check OSPF status systematically on a Cisco IOS or IOS XE router, start at the local process level and work outward toward your active interfaces and directly connected neighbors. Follow this three-step verification sequence in Privileged EXEC mode (#).
Step 1: Verify the Global OSPF Process and Router ID
Before checking individual links, confirm that the OSPF routing process is running and using the expected Router ID (RID).
Router# show ip ospf
Routing Process "ospf 1" with ID 10.255.255.1
Start time: 00:02:14.112, Time elapsed: 4d12h
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
It is an area border router
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Auto-cost reference bandwidth unit is 100000 Mbps
Area BACKBONE(0)
Number of interfaces in this area is 2 (1 loopback)
Area has no authentication
SPF algorithm last executed 04:11:22.104 ago
SPF algorithm executed 7 times
What to inspect:
* Process ID and Router ID: Appears in the first line (Routing Process "ospf 1" with ID 10.255.255.1). If the Router ID changed recently, OSPF must be cleared or reloaded for the new ID to take effect.
* Router Role: Indicates whether the device is an Area Border Router (ABR) or Autonomous System Boundary Router (ASBR).
* Reference Bandwidth: Verify Auto-cost reference bandwidth matches across all routers in the domain so path costs are calculated consistently.
* SPF Execution Count: A rapidly climbing SPF algorithm executed counter coupled with a very recent timestamp indicates a flapping link inside the area.
(Tip: You can also run show ip protocols to see which network statements, passive interfaces, and route filters are applied to the OSPF process.)
Step 2: Check OSPF-Enabled Interfaces
Next, verify which interfaces are actively participating in OSPF, which area they belong to, and how many neighbors are forming adjacencies on each link.
Router# show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo0 1 0 10.255.255.1/32 1 LOOP 0/0
Gi0/0 1 0 10.1.12.1/30 10 P2P 1/1
Gi0/1 1 0 172.16.10.1/24 10 DR 3/3
What to inspect:
* State: Shows the operational OSPF interface state (LOOP for loopback, P2P for point-to-point, DR, BDR, or DROTHER for broadcast/non-broadcast multi-access links, and WAITING if the router is still in the DR/BDR election timer window).
* Nbrs F/C: Displays the ratio of Full (F) adjacencies to the total Count (C) of discovered neighbors on that interface. For example, 3/3 means three neighbors are discovered and all three are fully adjacent.
If you need to inspect timer intervals, network types, or authentication settings on a specific port, drill down with the full interface command:
Router# show ip ospf interface GigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
Internet Address 10.1.12.1/30, Area 0, Attached via Network Statement
Process ID 1, Router ID 10.255.255.1, Network Type POINT_TO_POINT, Cost: 10
Topology-MTID Cost Disabled Shutdown Topology Name
0 10 no no Base
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Simple password authentication enabled
Step 3: Verify OSPF Neighbor Adjacencies
Finally, check the neighbor table to confirm that adjacent routers have discovered one another and synchronized their databases.
Router# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.255.255.2 0 FULL/ - 00:00:36 10.1.12.2 GigabitEthernet0/0
10.255.255.3 1 FULL/BDR 00:00:33 172.16.10.2 GigabitEthernet0/1
10.255.255.4 1 FULL/DROTHER 00:00:38 172.16.10.3 GigabitEthernet0/1
10.255.255.5 0 2WAY/DROTHER 00:00:35 172.16.10.4 GigabitEthernet0/1
What to inspect:
* Neighbor ID: The OSPF Router ID of the remote neighbor (not necessarily the IP address of the connected interface).
* Pri: The neighbor’s OSPF interface priority (0 to 255). A priority of 0 means the neighbor will never participate as a Designated Router (DR) or Backup Designated Router (BDR).
* Dead Time: Counts down from the configured Dead interval (default 40 seconds on broadcast/point-to-point links) and resets every time a valid Hello packet arrives. If it drops below 00:00:30 on a default link, Hello packets are being dropped or delayed.
Key Takeaway: Always progress from show ip ospf to show ip ospf interface brief and then show ip ospf neighbor so you can immediately tell whether an issue lies with the local router process, an interface binding, or the remote peer.
Understanding OSPF Neighbor States and DR/BDR Roles
When reviewing the State column in show ip ospf neighbor output (as shown in Step 3 above), OSPF reports both the adjacency state machine phase and the neighbor’s Designated Router role separated by a slash (for example, FULL/DR or 2WAY/DROTHER).
OSPF Neighbor Adjacency States Compared
The table below compares all eight OSPF neighbor states in chronological order of adjacency formation, explaining whether each state is normal during steady-state operations and what causes a neighbor to freeze in that phase.
| OSPF State | Protocol Phase / What Is Happening | Normal in Steady State? | Primary Cause if Stuck |
|---|---|---|---|
| Down | No OSPF Hello packets have been received from the neighbor within the Dead interval. | No (Usually removed from table unless statically configured) | Physical link down, OSPF not enabled on remote interface, or IP subnet mismatch. |
| Attempt | Unicast Hellos are being sent to a manually configured neighbor on an NBMA network, waiting for a reply. | No | NBMA Frame-Relay/DMVPN mapping error or wrong neighbor IP address configured. |
| Init | Local router received a Hello packet from the neighbor, but the local router’s own Router ID is not listed inside that Hello packet. | No | Unidirectional link, ACL or firewall blocking multicast 224.0.0.5 in one direction, or Layer 2 loop/filtering. |
| 2-Way | Bidirectional communication is established; both routers see their own Router ID inside the neighbor’s Hello packet. DR/BDR election occurs here. | Yes, but only between two DROTHER routers on a broadcast/NBMA segment | Normal for DROTHER-to-DROTHER peers; if stuck here between all peers on a segment, all routers have OSPF priority set to 0. |
| ExStart | Routers negotiate Master/Slave roles (highest Router ID wins) and initial Database Description (DBD) sequence numbers. | No | Interface MTU mismatch between neighbors or duplicate OSPF Router IDs. |
| Exchange | Routers exchange DBD packets containing LSA headers to compare their Link-State Databases. | No | Interface MTU mismatch (large DBD frames dropped) or corrupted packets in transit. |
| Loading | Routers send Link-State Request (LSR) packets for missing or newer LSAs and respond with Link-State Update (LSU) packets. | No | Corrupted LSA, memory exhaustion, or MTU/fragmentation issues dropping large LSU packets. |
| Full | Both routers have identical Link-State Databases for the shared area and exchange Link-State Acknowledgments (LSAck). | Yes (Target state for all P2P links and all DR/BDR relationships) | N/A — Adjacency is healthy and complete. |
Designated Router (DR/BDR) Role Combinations Explained
The value after the slash in the State column identifies the neighbor’s role on the shared network segment:
| Output String | Network Type | Neighbor Role | Expected Behavior |
|---|---|---|---|
FULL/DR | Broadcast / NBMA | Designated Router | Neighbor is the elected DR for the segment. All routers on the subnet form a FULL adjacency with the DR. |
FULL/BDR | Broadcast / NBMA | Backup Designated Router | Neighbor is the elected BDR. All routers on the subnet also form a FULL adjacency with the BDR. |
FULL/DROTHER | Broadcast / NBMA | Non-DR / Non-BDR Router | Neighbor is neither the DR nor the BDR, and your local router is the DR or BDR (hence the FULL state). |
2WAY/DROTHER | Broadcast / NBMA | Non-DR / Non-BDR Router | Completely normal. Both your local router and the neighbor are DROTHER routers. To reduce LSA flooding overhead, DROTHER peers stay in 2WAY with each other and only exchange LSAs via the DR and BDR. |
FULL/ - | Point-to-Point / Point-to-Multipoint | No DR/BDR Election | The hyphen (-) indicates an OSPF network type where no DR or BDR election takes place; routers form a direct FULL adjacency. |
Key Takeaway: Seeing FULL is always healthy, and seeing 2WAY/DROTHER is completely normal on multi-access Ethernet segments whenever neither router is the elected DR or BDR.
How to Check the OSPF Link-State Database (LSDB) and Routing Table
Even when neighbors reach the FULL state, topological mismatches or route filtering can prevent OSPF routes from entering the Global Routing Information Base (RIB). Follow this progression to verify that Link-State Advertisements (LSAs) are present in the database and installed as active IP routes.
Step 1: Inspect the Link-State Database Summary
Run show ip ospf database to view a summary of all LSAs stored in the router’s LSDB, grouped by Area and LSA Type.
Router# show ip ospf database
OSPF Router with ID (10.255.255.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.255.255.1 10.255.255.1 412 0x80000014 0x004A12 3
10.255.255.2 10.255.255.2 398 0x80000011 0x009B31 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
172.16.10.2 10.255.255.3 405 0x80000009 0x00C210
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.20.0 10.255.255.2 1120 0x80000005 0x007E44
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
10.100.0.0 10.255.255.4 85 0x80000002 0x001F88 0
How to read the database categories:
* Router Link States (Type 1 LSA): Generated by every router inside an area; lists connected links and costs (Link ID = originating Router ID).
* Net Link States (Type 2 LSA): Generated by the DR on broadcast/NBMA segments (Link ID = IP address of the DR’s interface).
* Summary Net Link States (Type 3 LSA): Generated by ABRs to advertise inter-area prefixes (Link ID = destination subnet).
* Summary ASB Link States (Type 4 LSA): Generated by ABRs to advertise the reachability of an ASBR (Link ID = ASBR Router ID).
* Type-5 AS External Link States (Type 5 LSA): Generated by ASBRs for redistributed external routes across the OSPF domain.
* NSSA External Link States (Type 7 LSA): Generated by ASBRs inside a Not-So-Stubby Area (NSSA).
Step 2: Drill Down into Specific LSAs
If a specific prefix is missing from the routing table, inspect the detailed LSA payload to verify its advertising router, subnet mask, metric, and forwarding address:
! Inspect all Type 1 Router LSAs or filter by a specific originating Router ID
Router# show ip ospf database router 10.255.255.2
! Inspect a specific Type 3 Inter-Area Summary LSA
Router# show ip ospf database summary 192.168.20.0
! Inspect all LSAs originated locally by this router
Router# show ip ospf database self-originate
Checking Age is also critical during verification: normal LSA age increments from 0 up to 1800 seconds (30 minutes) before refreshing. If an LSA’s age is stuck at 3600 (MAXAGE), the originating router is purging that route from the OSPF domain.
Step 3: Verify OSPF Routes in the Cisco Routing Table
Once you confirm the LSAs exist in the database, verify that the Shortest Path First (SPF) algorithm calculated valid paths and installed them into the IP routing table:
Router# show ip route ospf
Codes: L - local, 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
* - candidate default, U - per-user static route, o - ODR
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O 10.255.255.2/32 [110/11] via 10.1.12.2, 04:11:20, GigabitEthernet0/0
O E2 10.100.0.0/16 [110/20] via 172.16.10.3, 00:01:25, GigabitEthernet0/1
O IA 192.168.20.0/24 [110/20] via 10.1.12.2, 04:11:20, GigabitEthernet0/0
How to interpret the output:
* Route Code (O, O IA, O E1/E2, O N1/N2): Shows whether the prefix was learned via intra-area (O), inter-area (O IA), standard external redistribution (O E1/O E2), or NSSA redistribution (O N1/O N2).
* Bracketed Values [110/11]: The first number (110) is OSPF’s default Administrative Distance (AD). The second number (11) is the cumulative OSPF cost to reach the destination (O E2 routes display only the external seed metric by default, without adding internal cost).
* Detailed Route Inspection: Run show ip route 192.168.20.0 to view the exact originating Router ID, distance, metric, and last update timestamp for an individual prefix.
Key Takeaway: An LSA appearing in show ip ospf database only proves the advertisement was flooded; you must confirm it appears in show ip route ospf to guarantee the router is actually forwarding traffic over OSPF.
Troubleshooting Missing or Stuck OSPF Neighbors (FAQ)
When your verification checks reveal missing peers, stuck adjacency states, or missing routes despite FULL neighbors, use these targeted diagnostic steps to isolate and fix the root cause.
Why is my OSPF neighbor completely missing from show ip ospf neighbor?
If no neighbor entry appears at all, the router is either not receiving OSPF Hello packets on the interface or rejecting them immediately upon receipt. Check these common culprits in order:
1. Interface is Passive or Not in OSPF: Run show ip protocols and show ip ospf interface brief. If the interface is missing, the network statement wildcard mask does not match the interface IP, or passive-interface is suppressing Hellos.
2. Mismatched Hello/Dead Timers or Area ID: Both peers must have identical Hello intervals, Dead intervals, Area IDs, and stub/NSSA area flags. Run show ip ospf interface <interface> on both routers to compare.
3. Subnet Mask or Primary/Secondary IP Mismatch: On broadcast and point-to-point links, neighbors must be on the same primary IP subnet.
4. Authentication Mismatch: Check show ip ospf interface <interface> to verify whether plain-text, MD5, or HMAC-SHA authentication keys and key-IDs match on both ends.
5. Multicast 224.0.0.5 Blocked: Ensure no ingress Access Control List (ACL), Control Plane Policing (CoPP) policy, or Layer 2 switch port filter is dropping OSPF multicast packets destined to 224.0.0.5.
Why is an OSPF neighbor stuck in the INIT state?
As noted in the state comparison table above, INIT means the local router hears Hellos from the neighbor, but the neighbor does not list the local router’s RID in its outgoing Hellos (one-way communication).
* How to fix it: Check the remote neighbor first—if the remote neighbor shows nothing in its show ip ospf neighbor table, an ACL, firewall, or broken transmit fiber is blocking packets traveling from the local router to the remote neighbor. Verify bidirectional Layer 2/Layer 3 multicast forwarding with ping 224.0.0.5 from both routers.
Why is an OSPF neighbor stuck in EXSTART or EXCHANGE?
Getting stuck in EXSTART or EXCHANGE is almost always caused by an IP MTU mismatch between the two connected interfaces (for example, 1500 bytes on one router and 9000 jumbo frames or a reduced GRE/IPsec tunnel MTU on the other). Because OSPF includes the interface IP MTU inside Database Description (DBD) packets, a neighbor rejects the DBD if the remote MTU is larger than its own.
* How to verify and fix it:
1. Run show ip interface <interface> | include MTU on both routers to compare exact IP MTU values.
2. Set matching MTU values on both physical/logical interfaces (recommended best practice).
3. If you cannot modify the interface MTU immediately, apply ip ospf mtu-ignore under the interface configuration to bypass the DBD MTU check (ensure underlying Layer 2 links can still pass full-sized packets).
4. If MTUs already match, verify that the two routers do not share a duplicate OSPF Router ID elsewhere in the network.
Why do neighbors reach FULL state, but OSPF routes are missing from show ip route ospf?
If neighbors show FULL and LSAs exist in show ip ospf database, but routes fail to install in show ip route ospf, check the following:
* OSPF Network Type Mismatch: If one router is configured as ip ospf network point-to-point and the other is left at the default ip ospf network broadcast, both routers use the same 10/40 timers and will form a FULL adjacency! However, the broadcast router expects a Type 2 Network LSA while the point-to-point router only uses Type 1 Router LSAs, causing the SPF tree calculation to fail. Verify with show ip ospf interface <interface> | include Network Type.
* Distribute-List or Lower Administrative Distance: A local distribute-list in under router ospf may be filtering the route from entering the RIB, or a static route (AD 1) / internal EIGRP route (AD 90) for the same exact prefix/mask is winning over OSPF (AD 110).
How do I safely run debug ip ospf commands on a production router?
When show commands aren’t enough, debug ip ospf adj and debug ip ospf events reveal real-time Hello mismatches, authentication failures, and DBD errors. To run them safely without overloading the router console:
! 1. Verify CPU utilization is low before starting
Router# show processes cpu sorted | exclude 0.00%
! 2. Ensure debug output goes to internal memory buffer (or SSH session), not slow serial console
Router# configure terminal
Router(config)# no logging console
Router(config)# logging buffered 65536 debugging
Router(config)# end
! 3. Enable specific OSPF event or adjacency debugging
Router# debug ip ospf events
Router# debug ip ospf adj
! 4. View captured logs in the buffer (or run 'terminal monitor' to stream to SSH)
Router# show logging | include OSPF
! 5. Immediately disable all debugging once captured
Router# undebug all
Key Takeaway: Match the symptom to the protocol phase—missing neighbors point to Hello/timer/ACL issues, EXSTART points to MTU mismatches, and FULL adjacencies with missing routes point to OSPF network-type mismatches.
Cisco Router OSPF Verification and Audit CLI Cheat Sheet Template
Copy and paste the command block below into a text file or terminal session during change windows and troubleshooting audits. Replace the bracketed placeholders (<PROCESS_ID>, <INTERFACE>, <VRF_NAME>) where filtering is needed, or run the standard commands directly.
! =========================================================================
! CISCO IOS / IOS XE OSPF VERIFICATION & AUDIT CHEAT SHEET
! =========================================================================
! Prepare terminal for full, uninterrupted output capture
terminal length 0
! --- 1. GLOBAL PROCESS & PROTOCOL AUDIT ---
show ip ospf
show ip protocols | section ospf
show running-config | section router ospf
show ip ospf border-routers
show ip ospf statistics detail
! --- 2. INTERFACE STATUS & TIMERS ---
show ip ospf interface brief
show ip ospf interface <INTERFACE>
show ip ospf interface | include line protocol|Internet Address|Network Type|Timer intervals|authentication
! --- 3. NEIGHBOR ADJACENCY CHECKS ---
show ip ospf neighbor
show ip ospf neighbor detail
show ip ospf neighbor | exclude FULL|2WAY/DROTHER
! --- 4. LINK-STATE DATABASE (LSDB) INSPECTION ---
show ip ospf database
show ip ospf database database-summary
show ip ospf database self-originate
show ip ospf database max-age
show ip ospf database adv-router <NEIGHBOR_ROUTER_ID>
! --- 5. ROUTING TABLE (RIB) & CEF FORWARDING ---
show ip route ospf
show ip route <DESTINATION_IP> <SUBNET_MASK>
show ip cef <DESTINATION_IP> <SUBNET_MASK> detail
! --- 6. VRF-AWARE OSPF VERIFICATION (IF USING MULTI-VRF) ---
show ip ospf vrf <VRF_NAME>
show ip ospf vrf <VRF_NAME> interface brief
show ip ospf vrf <VRF_NAME> neighbor
show ip route vrf <VRF_NAME> ospf
! --- 7. TARGETED DIAGNOSTIC DEBUGS (USE WITH CAUTION) ---
show ip ospf events
debug ip ospf hello
debug ip ospf events
debug ip ospf adj
undebug all
! Restore default terminal pagination
terminal length 24
Key Takeaway: Keeping a standardized pre- and post-change CLI verification template allows you to capture baseline SPF statistics, neighbor counts, and route tables in seconds.
Cisco IOS OSPF Command Reference and Documentation Specifications
This section provides the formal command syntax definitions, privilege mode requirements, software compatibility specifications, and official Cisco documentation pathways for OSPF verification commands.
Formal Command Syntax and Modes
All primary OSPF show verification commands operate in User EXEC (>) or Privileged EXEC (#) mode, while configuration inspection (show running-config) and debug commands strictly require Privileged EXEC (#) mode.
- Process Verification Syntax:
show ip ospf [process-id] - Interface Verification Syntax:
show ip ospf [process-id [area-id]] interface [type number] [brief] - Neighbor Verification Syntax:
show ip ospf [process-id] [area-id] neighbor [type number] [neighbor-id] [detail] - Database Verification Syntax:
show ip ospf [process-id [area-id]] database [router | network | summary | asbr-summary | external | nssa-external | opaque-link | opaque-area | opaque-as] [link-state-id] [adv-router ip-address | self-originate] [max-age] - Routing Table Verification Syntax:
show ip route [vrf vrf-name] ospf [process-id]
OS Version and Platform Compatibility Matrix
| Operating System / Train | Process & Neighbor Syntax | VRF-Aware OSPF Verification | OSPFv3 (IPv6 / Address Families) |
|---|---|---|---|
| Cisco IOS (12.4T / 15.x) | show ip ospf ... | Derived via show ip ospf <process-id> (where process is tied to VRF) or show ip route vrf <name> ospf | show ipv6 ospf neighbor, show ipv6 ospf interface brief |
| Cisco IOS XE (16.x / 17.x) | show ip ospf ... | Supports both show ip ospf <process-id> and show ip ospf vrf <vrf-name> ... | show ospfv3 neighbor, show ospfv3 vrf <name> interface brief |
| Cisco IOS XR (Reference Comparison) | show ospf ... (Omits ip keyword) | show ospf vrf <vrf-name> neighbor | show ospfv3 neighbor |
| Cisco NX-OS (Reference Comparison) | show ip ospf ... | show ip ospf neighbor vrf <vrf-name> | show ipv6 ospf neighbor |
Official Cisco Documentation Portal References
For exhaustive field-by-field output descriptions, SNMP trap correlations, and release-specific command history tables on cisco.com, consult these official reference manuals:
1. Command Syntax and Output Field Descriptions:
Document Title: Cisco IOS IP Routing: OSPF Command Reference
Navigation Path: Cisco Support > Products > Cisco IOS and NX-OS Software > Cisco IOS Software > Command References > IP Routing: OSPF Command Reference (Chapters: OSPF Commands: show ip ospf through T and debug ip ospf).
2. Configuration and Verification Guides by IOS XE Release:
Document Title: IP Routing: OSPF Configuration Guide, Cisco IOS XE [Release 17.x]
Navigation Path: Cisco Support > Switches / Routers > [Platform Series, e.g., Catalyst 8000 or ISR 4000] > Configuration Guides > IP Routing: OSPF Configuration Guide > Configuring OSPF > Verifying OSPF Configuration.
3. Troubleshooting TechNotes:
Document Title: Troubleshoot OSPF Neighbor Problems and Understand Open Shortest Path First (OSPF) – Design Guide
Navigation Path: Cisco Support > Technology Support > IP > IP Routing > OSPF > Troubleshooting TechNotes.
Key Takeaway: Always verify whether your platform runs classic Cisco IOS/IOS XE (show ip ospf) or OSPFv3 (show ospfv3 / show ipv6 ospf) when consulting Cisco’s official command reference manuals.
Conclusion
Checking OSPF status on a Cisco router is fastest and most reliable when you follow the protocol’s natural hierarchy. Start by verifying the local process and active interfaces with show ip ospf and show ip ospf interface brief, confirm that adjacent routers reach FULL (or expected 2WAY/DROTHER) states in show ip ospf neighbor, and validate that LSAs in show ip ospf database translate into active forwarding paths in show ip route ospf. By pairing these core verification commands with targeted MTU, timer, and network-type checks, you can quickly validate healthy routing domains and resolve adjacency issues with confidence.











Comments