OSPF

OSPF Subnet Mask Mismatch: How to Troubleshoot and Fix

On broadcast networks, mismatched subnet masks leave OSPF stuck in Init or 2-Way. Here is the fast diagnosis with show ip ospf neighbor and the one-line fix.
OSPF Subnet Mask Mismatch: How to Troubleshoot and Fix
In: OSPF

Detection

Check Subnet Masks

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

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

Neighbor State

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

INIT = One-way communication (likely subnet mismatch)

Fix

Match subnet masks:

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

Verify:

R1# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address
2.2.2.2         1     FULL/DR         00:00:38    10.1.1.2

FULL state = Fixed!

Summary

Broadcast networks require matching masks
Symptom — Stuck at Init/2-Way
Fix — Match subnet masks

Next: SPF Algorithm (Article 27)

Internal Links:

Written by
More from Ping Labz
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Ping Labz.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.