OSPF Neighbors on Different Subnets — No Adjacency
Presenting Symptom
OSPF neighbors show in INIT state or never reach FULL state, and the adjacency is stuck in EXSTART/EXCHANGE or 2WAY.
Network Context
Two Cisco routers (R1 and R2) are directly connected via GigabitEthernet interfaces in a small branch office. Both run IOS 15.x and OSPF process 1. R1's interface is configured with IP 192.168.1.1/24, while R2's interface is configured with IP 192.168.2.1/24. The routers are connected back-to-back without a switch, and OSPF is enabled on both interfaces in area 0.
Diagnostic Steps
Check OSPF neighbor state
show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface 192.168.2.1 1 INIT/DROTHER 00:00:32 192.168.2.1 GigabitEthernet0/0
The neighbor is stuck in INIT state, indicating that the router has received a Hello from the neighbor but the neighbor's Hello does not contain the router's Router ID, or there is a mismatch in OSPF parameters. A normal output would show FULL state.
Verify OSPF interface configuration and subnet
show ip ospf interface gigabitEthernet 0/0GigabitEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.1/24, Area 0
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 1.1.1.1, Interface address 192.168.1.1
Backup Designated router (ID) 0.0.0.0, Interface address 0.0.0.0
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)The interface IP is 192.168.1.1/24. Note the subnet mask /24. The neighbor count is 0, meaning no Hellos are being accepted from the neighbor. This suggests a subnet mismatch because the neighbor is on a different subnet.
Check the neighbor's interface configuration
show running-config interface gigabitEthernet 0/0interface GigabitEthernet0/0 ip address 192.168.2.1 255.255.255.0 duplex auto speed auto media-type rj45
The neighbor's interface has IP 192.168.2.1/24, which is on a different subnet (192.168.2.0/24) than R1's subnet (192.168.1.0/24). OSPF requires that neighbors be on the same subnet to form adjacency.
Confirm OSPF Hello packet contents with debug
debug ip ospf helloOSPF: Rcv hello from 2.2.2.2 on GigabitEthernet0/0 from 192.168.2.1 OSPF: Mismatched hello parameters from 192.168.2.1 Dead R 40 C 40, Hello R 10 C 10, Mask R 255.255.255.0 C 255.255.255.0 OSPF: Hello from 192.168.2.1 with mismatched subnet mask
The debug output clearly shows 'Mismatched hello parameters' and specifically 'mismatched subnet mask'. This confirms that the subnet masks (or network addresses) do not match, preventing adjacency.
Root Cause
The two routers are configured with IP addresses on different subnets (192.168.1.0/24 and 192.168.2.0/24) on the same link. OSPF requires that neighbors share a common subnet; otherwise, Hello packets are ignored and adjacency cannot form.
Resolution
Verification
Run 'show ip ospf neighbor' on either router. Expected output: Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/DR 00:00:35 192.168.1.2 GigabitEthernet0/0 The state should be FULL, indicating a fully established adjacency.
Prevention
1. Use a consistent IP addressing plan and ensure point-to-point links use the same subnet. 2. Verify interface IP and subnet mask configuration before enabling OSPF. 3. Use 'show ip ospf interface' to confirm OSPF parameters match on both ends.
CCNA Exam Relevance
On the CCNA 200-301 exam, this scenario tests understanding of OSPF neighbor requirements. Questions may present a troubleshooting scenario where OSPF neighbors are stuck in INIT or EXSTART, and you must identify the subnet mismatch as the cause. The exam expects you to know that OSPF neighbors must be on the same subnet and that mismatched masks prevent adjacency.
Exam Tips
Memorize that OSPF requires matching subnet masks (or at least the network portion) for adjacency; a /24 vs /25 mismatch will break adjacency.
In exam simulations, use 'show ip ospf neighbor' to see the state; INIT or DOWN often indicates a Layer 3 mismatch.
Remember that 'debug ip ospf hello' can show 'mismatched subnet mask' — this is a key output to identify the issue quickly.
Commands Used in This Scenario
Test Your CCNA Knowledge
Practice with scenario-based questions to prepare for the CCNA 200-301 exam.
Practice CCNA Questions