Sub topic 16
Troubleshooting Stuck Adjacencies
This chapter assumes you know the neighbor state machine (Down, Init, 2-Way, ExStart, Exchange, Loading, Full), the Hello protocol, and the DR/BDR election. It also assumes you can read show ip ospf neighbor and show ip ospf interface output. The commands use Cisco IOS syntax.
An adjacency problem has one useful property. The state where a neighbor stalls tells you which class of fault to check first.
Read the State First
OSPF checks different things at different stages. Hello packets are checked first. Database exchange happens later. A neighbor stuck at a given state has passed every check before it and failed the next one.
| Stuck state | What it means | Most likely causes |
|---|---|---|
| Missing from the table | No valid Hello has been accepted | Passive interface, ACL or firewall, Layer 2 fault, area or subnet mismatch, Hello/Dead timer mismatch, authentication mismatch, stub flag mismatch |
| Init | You hear them, but they do not hear you | One-way filtering, ACL on one direction, wrong multicast handling, authentication on one side only |
| 2-Way | Two-way communication is confirmed, but no adjacency is formed | Normal between two DROthers. Abnormal if all routers have priority 0, or if the election did not complete |
| ExStart or Exchange | The master/slave negotiation or the database description (DBD) exchange keeps failing | MTU mismatch, duplicate router ID, unicast packets larger than the path allows |
| Loading | Link-state requests are not being satisfied | Lost or corrupt LSAs, MTU problems on large updates, overloaded neighbor |
2-Way is not always a fault. On a broadcast segment, DROther routers stay in 2-Way with each other and form Full adjacencies only with the DR and BDR. Check the roles before you treat 2-Way as a problem.
A Diagnostic Flow
Hello Parameter Mismatches
Two routers will not become neighbors unless these Hello fields agree:
- Area ID. The interface must be in the same area on both ends.
- Subnet and mask. The two interface addresses must be in the same subnet. Point-to-point links are the exception, because the check is skipped there.
- Hello and Dead intervals. The defaults are 10 and 40 seconds for broadcast and point-to-point links, and 30 and 120 seconds for NBMA.
- Authentication type and key.
- The stub area flag (the E-bit in the options field).
The network type is not carried in the Hello. A network type mismatch shows up indirectly. If one side is broadcast and the other is point-to-point, the timers usually match on the defaults, so the neighbors may come up. The DR election then behaves differently on each side, and routes can be missing. Configure the same network type on both ends.
Compare the two ends with this command:
show ip ospf interface GigabitEthernet0/0Look at the area, the network type, the timer line (Hello 10, Dead 40), the neighbor count, and the authentication line. Run it on both routers and compare the values by eye.
Using Debugs Safely
Debugs show the exact reason a Hello was rejected. Turn them on for one problem at a time and turn them off afterward, because they can flood a busy router.
debug ip ospf hello
debug ip ospf adj
undebug allRejection messages name the failed check, for example mismatched hello parameters, a mismatched area ID, or an authentication failure. In an adjacency debug, repeated DBD retransmissions followed by a return to ExStart point to an MTU problem or a duplicate router ID. On production devices, prefer show commands first and use debugs only on the affected interface.
MTU Mismatch
An MTU mismatch is the classic cause of a neighbor stuck in ExStart or Exchange. Hello packets are small, so they pass. DBD packets advertise the sender's interface MTU. A router that receives a DBD advertising an MTU larger than its own interface MTU rejects it. The neighbors then retry and fall back to ExStart.
Test the path with a ping that sets the don't-fragment bit:
ping 10.0.12.2 size 1500 df-bit
show interfaces GigabitEthernet0/0 | include MTUThe proper fix is to make both interface MTUs equal. The command ip ospf mtu-ignore disables the check on an interface. It gets the adjacency up, but large packets may still be dropped later on that link. Use it as a temporary workaround.
Duplicate Router IDs
Router IDs must be unique across the OSPF domain, not only on one link. Two routers with the same ID may stall in ExStart, flap, or form adjacencies that disturb the database, because each router sees LSAs it believes it originated. IOS may log a duplicate router ID message. Check each router with show ip ospf | include ID. Set the ID explicitly with router-id, then clear the process with clear ip ospf process, because a new ID takes effect only after a restart.
Filtering and Passive Interfaces
OSPF runs directly over IP as protocol 89. It uses the multicast addresses 224.0.0.5 (all OSPF routers) and 224.0.0.6 (all DRs). An access list that blocks protocol 89, or a switch that drops multicast, can break adjacency. A one-way block produces the Init state. A passive interface sends and accepts no Hellos, so a neighbor will never form there. That is correct on a LAN with no routers, and a mistake on a transit link. Use show ip protocols to list passive interfaces.
Authentication adds one more mismatch case. If one router has authentication configured and the other does not, or the keys differ, packets are dropped and the debug output names the cause.
A Worked Case
R1 shows this:
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 EXSTART/DR 00:00:36 10.0.12.2 GigabitEthernet0/0The neighbor passed the Hello checks, so the timers, area, subnet, and authentication are fine. It is stuck in ExStart, which points to MTU or router ID. A ping 10.0.12.2 size 1500 df-bit fails, and show interfaces shows an MTU of 1500 on R1 and 1400 on R2. Setting ip mtu 1500 on R2, or matching both sides to 1400, brings the adjacency to Full within one dead interval.
Working Method
- Read the neighbor state and pick the matching row in the table above.
- Compare
show ip ospf interfaceon both ends. - Confirm Layer 3 reachability with a ping to the neighbor address.
- Check for ACLs, passive interfaces, and authentication.
- Use targeted debugs only if the show output does not explain the fault.
Exercise
Router A shows router B in the Init state, and router B shows no entry for router A. Which direction of traffic is probably failing, and what would you check first?
Show answer
Router A receives B's Hellos, but B is not receiving A's Hellos, or is rejecting them. Traffic from A to B is failing. Check for an ACL or firewall rule that blocks protocol 89 or the 224.0.0.5 multicast in the A-to-B direction, and check that authentication is configured the same way on both ends.
Exercise
Two routers on the same Ethernet segment reach ExStart and keep returning to it. Their Hello and Dead timers, area IDs, and subnets match. Name two likely causes and one command that tests the first.
Show answer
An MTU mismatch between the two interfaces, or a duplicate router ID. A ping with the don't-fragment bit set, such as ping 10.0.12.2 size 1500 df-bit, tests the MTU, and show interfaces shows each side's configured MTU.