Hands-On Lab: Debugging OSPF Adjacencies

This hands-on lab uses debug ip ospf adj to observe the live OSPF neighbor formation process in real time, and deliberately introduces a hello/dead timer mismatch to show exactly how the debug output reveals the resulting adjacency failure.

OSPF Debug AdjacencyHello Dead Timer MismatchReal-Time Neighbor Formation

~3 دقیقه مطالعه · آخرین به‌روزرسانی ۳۱ شهریور ۱۴۰۵

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 adjacency

Task 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 FULL

R1# undebug all

R2(config)# interface gigabitethernet0/0
R2(config-if)# ip ospf hello-interval 5

R1# 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 cause

R2(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.2

Key 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.

نوشته و پژوهش‌شده توسط دکتر شاهین صیامی

مقالات مرتبط

Hands-On Lab: Final Comprehensive CCNP Troubleshooting Challenge (BGP, DMVPN, and QoS Integration)

This hands-on lab presents a complex multi-layer failure across an integrated BGP-over-DMVPN topology combined with QoS marking, requiring systematic diagnosis of a route reflector misconfiguration, an NHRP registration failure, and an incorrectly applied QoS policy simultaneously affecting the same network.

ادامه

Hands-On Lab: Configuring BGP over DMVPN

This hands-on lab runs iBGP as the routing protocol across the same DMVPN hub-and-spoke topology used in the two previous labs, configuring the hub as a route reflector so spokes learn each other's routes without a full iBGP mesh, combining two previously separate concepts into one integrated design.

ادامه

Hands-On Lab: Configuring OSPF over DMVPN

This hands-on lab runs OSPF as the dynamic routing protocol across the same DMVPN hub-and-spoke topology, configuring the tunnel interface as an OSPF point-to-multipoint network type to correctly handle the hub-and-spoke adjacency pattern without requiring the broadcast network type's DR/BDR election.

ادامه

Hands-On Lab: Configuring EIGRP over DMVPN

This hands-on lab runs EIGRP as the dynamic routing protocol across the DMVPN hub-and-spoke topology built in earlier labs, verifying neighbor relationships form correctly across the multipoint tunnel and routes propagate without requiring per-spoke static configuration on the hub.

ادامه

Hands-On Lab: Configuring HSRP MD5 Authentication

This hands-on lab configures MD5 authentication on an HSRP group, verifying two routers with matching authentication strings form a normal active/standby relationship while a router with a mismatched string is excluded from the group entirely.

ادامه

Hands-On Lab: Configuring Cisco Umbrella-Style DNS Security via DNS Forwarding Redirection

This hands-on lab configures a router to redirect all client DNS queries toward a security-focused DNS resolver using DNS forwarding interception, approximating cloud-delivered DNS security enforcement without requiring per-client configuration changes.

ادامه