Lab Objective
Use debug ip ospf adj to observe OSPF neighbor states forming in real time on a healthy link, then introduce a hello/dead timer mismatch on one side and use the same debug output to diagnose exactly why the adjacency fails to progress.
Lab Purpose
The show ip ospf neighbor command, used throughout earlier labs, only shows a snapshot of the current state. When an adjacency is stuck or failing to form at all, debug ip ospf adj reveals the live sequence of events, making it the essential next step when static verification alone does not explain a problem.
Lab Topology
R1 ---- GigabitEthernet0/0 ------ GigabitEthernet0/0 ---- R2
R1: 192.168.8.1/24
R2: 192.168.8.2/24
OSPF process 1 already configured on both,
area 0, currently forming a healthy adjacencyTask 1: Observe Healthy Adjacency Formation
Enable debug ip ospf adj on R1, then shut down and re-enable the interface to trigger a fresh adjacency formation, observing the state progression in the debug output.
Task 2: Disable the Debug
Turn off the debug once the healthy formation has been observed.
Task 3: Introduce a Timer Mismatch
Change R2's OSPF hello interval to a different value than R1's, creating a mismatch.
Task 4: Re-Enable the Debug and Observe the Failure
Re-enable debug ip ospf adj on R1, cycle the interface again, and observe how the debug output reveals the mismatch.
Task 5: Correct the Mismatch
Restore matching timers and confirm the adjacency reaches FULL again.
Solution and Verification
R1# debug ip ospf adj
R1(config)# interface gigabitethernet0/0
R1(config-if)# shutdown
R1(config-if)# no shutdown
*OSPF: 2-Way Communication to 192.168.8.2, state 2WAY
*OSPF: Send DBD to 192.168.8.2 seq 0x1234 opt 0x52 flag 0x7
*OSPF: Rcv DBD from 192.168.8.2 seq 0x1234 opt 0x52 flag 0x2
*OSPF: Exchanging state changed from EXCHANGE to LOADING
*OSPF: Synchronized with 192.168.8.2, state FULL
-- The full state machine progression is
-- visible step by step, confirming healthy
-- formation all the way to FULLR1# undebug allR2(config)# interface gigabitethernet0/0
R2(config-if)# ip ospf hello-interval 5R1# debug ip ospf adj
R1(config)# interface gigabitethernet0/0
R1(config-if)# shutdown
R1(config-if)# no shutdown
*OSPF: Rcv pkt from 192.168.8.2, Mismatch Authentication
Type. Input packet specified type 0, we use type 0
*OSPF: Hello parameters mismatch, Rcv hello interval 5
does not match configured Hello interval 10 for
GigabitEthernet0/0
-- The debug output explicitly names the exact
-- problem: a hello interval mismatch --
-- something show ip ospf neighbor alone
-- would only show as "stuck at INIT" or
-- simply no neighbor entry at all, without
-- explaining the underlying causeR2(config)# interface gigabitethernet0/0
R2(config-if)# ip ospf hello-interval 10
R1# show ip ospf neighbor
Neighbor ID Pri State Address
192.168.8.2 1 FULL/BDR 192.168.8.2Key Takeaway
debug ip ospf adj should be the next tool reached for whenever show ip ospf neighbor shows a neighbor stuck at any state other than FULL, or missing entirely — the debug output explicitly names mismatches like hello/dead timers, area numbers, or authentication settings that the static show command's snapshot view cannot reveal on its own.