OSPF Neighbor States: Why They Get Stuck and How to Fix Them
OSPF (Open Shortest Path First) is a link-state routing protocol that forms adjacencies with neighboring routers to exchange routing information. Understanding the OSPF neighbor state machine is critical for the CCNA 200-301 exam. This post breaks down each state from Down to Full, explains common failure points, and provides troubleshooting commands.
The OSPF Neighbor States
OSPF routers progress through eight states when forming an adjacency:
- Down – No Hello packets received.
- Attempt (only on NBMA networks) – Router sends Hello but hasn't received a reply.
- Init – Hello received, but bidirectional communication not yet established.
- 2-Way – Both routers see each other in their Hello packets (bidirectional). DR/BDR election occurs on broadcast networks.
- ExStart – Routers negotiate master/slave and initial sequence numbers for Database Description (DBD) packets.
- Exchange – DBD packets are exchanged, describing the LSDB.
- Loading – Link State Request (LSR) and Link State Update (LSU) packets are exchanged for missing LSAs.
- Full – Routers are fully adjacent; LSDBs are synchronized.
On broadcast links (e.g., Ethernet), only DR and BDR reach Full with all routers; DROTHERs stop at 2-Way with each other.
Why Neighbors Get Stuck
Stuck in Init
- Cause: Router receives Hello but its own Router ID is not in the neighbor's Hello packet.
- Troubleshooting: Check for mismatched OSPF network types (e.g., broadcast vs. point-to-point). Use
show ip ospf interfaceto verify.
Stuck in 2-Way
- Normal for DROTHERs on broadcast networks. If a router should be DR/BDR but stays 2-Way, check priority settings (
ip ospf priority).
Stuck in ExStart/Exchange
- Common cause: MTU mismatch. OSPF uses the IP MTU; if mismatched, DBD packets are dropped.
- Fix: Ensure MTU matches on both ends (
ip mtu). - Another cause: Duplicate Router IDs. Verify with
show ip ospf.
Stuck in Loading
- Cause: Missing or corrupted LSAs. Check for mismatched area types (e.g., one router in stub area, other not).
- Troubleshooting: Use
debug ip ospf adjandshow ip ospf database.
Troubleshooting Commands
show ip ospf neighbor– Displays neighbor state and details.show ip ospf interface– Shows network type, timers, and neighbors.show ip ospf database– Inspects LSDB for inconsistencies.debug ip ospf adj– Real-time adjacency events (use cautiously in production).
Example: Stuck in ExStart
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.0.0.2 1 EXSTART/DR 00:00:34 10.0.0.2 GigabitEthernet0/0
Check MTU on both interfaces:
R1# show interfaces g0/0 | include MTU
MTU 1500 bytes
R2# show interfaces g0/0 | include MTU
MTU 1400 bytes
Fix by setting identical MTU:
R2(config)# interface g0/0
R2(config-if)# ip mtu 1500
Then clear OSPF process:
R2# clear ip ospf process
Exam Tips: What to Watch For
- Network type mismatches are a frequent exam trap. For example, one side configured as point-to-point and the other as broadcast will cause stuck in Init.
- Area ID mismatches prevent adjacency (stuck in Init). Verify with
show ip ospf interface. - Authentication mismatches (MD5 or plaintext) cause stuck in Init. Check with
show ip ospf interface. - Passive interfaces block Hello packets; neighbors stay Down.
- Access lists blocking OSPF (protocol 89) will prevent adjacency.
- DR/BDR election is non-preemptive; a router with higher priority will become DR only after reload or clear.
Conclusion
Mastering OSPF neighbor states is essential for the CCNA 200-301 exam. Focus on understanding the state machine and practicing troubleshooting with the commands above. When a neighbor is stuck, systematically verify network type, MTU, area, authentication, and timers. Use debug ip ospf adj to see real-time failures.
Test your knowledge with practice questions that simulate stuck neighbor scenarios—this will solidify your understanding for the exam.