OSPF · · 5 min read

OSPF Neighbors Not Forming: Complete Troubleshooting Guide

OSPF Neighbors Not Forming: Complete Troubleshooting Guide

1. Verify IP Connectivity

First rule: If routers can't ping each other, they can't become OSPF neighbors.

Test:

R1# ping 10.1.1.2
.....
Success rate is 0 percent (0/5)

No connectivity = no neighbors

Common causes:

Fix:

R1(config)# interface gi0/0
R1(config-if)# no shutdown

Verify:

R1# ping 10.1.1.2
!!!!!
Success rate is 100 percent (5/5)

2. Check OSPF is Enabled on Interfaces

Check which interfaces have OSPF:

R1# show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               1.1.1.1/32         1     LOOP  0/0
Gi0/0        1     0               10.1.1.1/30        1     P2P   0/0

If interface is missing from this output, OSPF isn't enabled on it.

Common causes:

Fix (add network statement):

R1(config)# router ospf 1
R1(config-router)# network 10.1.1.0 0.0.0.3 area 0

Or use interface-based config:

R1(config)# interface gi0/0
R1(config-if)# ip ospf 1 area 0

3. Verify Area IDs Match

OSPF rule: Neighbors must be in the same area.

Check Area ID:

R1# show ip ospf interface gi0/0 | include Area
  Internet Address 10.1.1.1/30, Area 0

R2# show ip ospf interface gi0/0 | include Area
  Internet Address 10.1.1.2/30, Area 10  ← MISMATCH!

Area 0 ≠ Area 10 = No adjacency

Fix:

R2(config)# router ospf 1
R2(config-router)# no network 10.1.1.0 0.0.0.3 area 10
R2(config-router)# network 10.1.1.0 0.0.0.3 area 0

Learn more: Fixing OSPF Area Mismatch (Article 19)


4. Check Subnet Masks Match

OSPF rule (broadcast/NBMA): Routers must be in the same subnet.

Symptom:

R1# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2         1     INIT/DROTHER    00:00:35    10.1.1.2        Gi0/0

State: INIT = One-way communication (mismatch issue)

Check subnet masks:

R1# show ip interface gi0/0 | include Internet address
  Internet address is 10.1.1.1/30

R2# show ip interface gi0/0 | include Internet address
  Internet address is 10.1.1.2/24  ← MISMATCH!

/30 ≠ /24

Fix:

R2(config)# interface gi0/0
R2(config-if)# ip address 10.1.1.2 255.255.255.252

Learn more: OSPF Subnet Mask Mismatch (Article 25)


5. Verify Hello/Dead Timers Match

OSPF rule: Hello and Dead timers must match.

Check timers:

R1# show ip ospf interface gi0/0 | include Timer
  Timer intervals configured, Hello 10, Dead 40

R2# show ip ospf interface gi0/0 | include Timer
  Timer intervals configured, Hello 5, Dead 20  ← MISMATCH!

Timers don't match = No adjacency

Fix (match to default):

R2(config)# interface gi0/0
R2(config-if)# no ip ospf hello-interval
R2(config-if)# no ip ospf dead-interval

Or explicitly set:

R2(config-if)# ip ospf hello-interval 10
R2(config-if)# ip ospf dead-interval 40

Learn more: OSPF Timers Explained (Article 16)


6. Check for Passive Interface Misconfiguration

OSPF rule: Passive interfaces don't send Hellos.

Check passive interfaces:

R1# show ip protocols | include Passive
  Passive Interface(s):
    GigabitEthernet0/0  ← Interface to neighbor is passive!

Uplink is passive = No Hellos = No neighbor

Fix:

R1(config)# router ospf 1
R1(config-router)# no passive-interface gi0/0

Learn more: Common Passive Interface Mistakes (Article 24)


7. Verify Authentication Settings

OSPF rule: Authentication type and keys must match.

Check authentication:

R1# show ip ospf interface gi0/0 | include auth
  Simple password authentication enabled

R2# show ip ospf interface gi0/0 | include auth
  Message digest authentication enabled  ← MISMATCH!

Plain text ≠ MD5

Also check keys match:

R1# show run interface gi0/0
 ip ospf authentication-key cisco123

R2# show run interface gi0/0
 ip ospf authentication-key cisco456  ← WRONG KEY!

Fix:

R2(config)# interface gi0/0
R2(config-if)# ip ospf authentication-key cisco123

Learn more: OSPF Authentication Mismatch (Article 21)


8. Check MTU Settings

OSPF rule: MTU mismatch prevents adjacency from reaching FULL state.

Symptom:

R1# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2         1     EXSTART/DR      00:00:35    10.1.1.2        Gi0/0

Stuck in EXSTART or EXCHANGE = MTU mismatch

Check MTU:

R1# show interface gi0/0 | include MTU
  MTU 1500 bytes

R2# show interface gi0/0 | include MTU
  MTU 1400 bytes  ← MISMATCH!

Fix (match MTU):

R2(config)# interface gi0/0
R2(config-if)# ip mtu 1500

Or tell OSPF to ignore MTU:

R2(config-if)# ip ospf mtu-ignore

Learn more: OSPF MTU Mismatch (Article 20)


9. Look for Duplicate Router IDs

OSPF rule: Router IDs must be unique.

Check for duplicates:

R1# show ip ospf
%OSPF-4-DUP_RTRID1: Detected router with duplicate router ID 1.1.1.1 in area 0

Fix:

R2(config)# router ospf 1
R2(config-router)# router-id 2.2.2.2
R2(config-router)# end
R2# clear ip ospf process

Learn more: Duplicate Router ID Troubleshooting (Article 22)


10. Check for ACLs Blocking OSPF

OSPF uses IP protocol 89

Check for ACLs:

R1# show ip interface gi0/0 | include access list
  Outgoing access list is 100

Check ACL:

R1# show access-list 100
Extended IP access list 100
    10 deny ip any any  ← Blocks everything including OSPF!

Fix (permit OSPF):

R1(config)# ip access-list extended 100
R1(config-ext-nacl)# 5 permit ospf any any

Debug Commands

Enable OSPF adjacency debugging:

R1# debug ip ospf adj

Example output:

*Mar 17 12:34:56.789: OSPF-1 ADJ Gi0/0: Rcv hello from 2.2.2.2 area 0
*Mar 17 12:34:56.791: OSPF-1 ADJ Gi0/0: Mismatched hello parameters from 10.1.1.2
*Mar 17 12:34:56.792: OSPF-1 ADJ Gi0/0: Dead R 40 C 20, Hello R 10 C 5

Key line: "Mismatched hello parameters" → Timer mismatch

Turn off debug:

R1# undebug all

⚠️ Warning: Debug can overwhelm CPU. Use in lab or low-traffic production windows.


Quick Reference Checklist

Issue Check Command Look For
Connectivity ping [neighbor-ip] 100% success
OSPF enabled show ip ospf interface brief Interface listed
Area ID show ip ospf interface | inc Area Same area
Subnet mask show ip interface | inc address Same subnet
Timers show ip ospf interface | inc Timer Same Hello/Dead
Passive show ip protocols | inc Passive Not on uplink
Authentication show ip ospf interface | inc auth Type and key match
MTU show interface | inc MTU Same value
Router ID show ip ospf Unique IDs, no dup message
ACLs show ip interface | inc access Permits OSPF (89)

Summary

Now you can troubleshoot:

IP connectivity issues
OSPF not enabled on interfaces
Area ID mismatches
Subnet mask mismatches
Timer mismatches
Passive interface mistakes
Authentication problems
MTU issues
Duplicate Router IDs
ACLs blocking OSPF

Next Steps:
Dive deeper into specific issues:


Screenshot Suggestions:

  1. Troubleshooting flowchart
  2. debug ip ospf adj output showing mismatch
  3. show ip ospf neighbor in various stuck states
  4. Side-by-side config comparison showing mismatch

Internal Links:

Read next

© 2025 Ping Labz. All rights reserved.