Lab fixes / Routing
OSPF neighbor stuck in INIT, EXSTART or not showing
Packet Tracer · GNS3 · Cisco IOS · Last checked
network command really covers the interface. EXSTART or EXCHANGE that never ends is almost always an MTU mismatch.On this page
Start with what the state tells you
Run show ip ospf neighbor on both routers. The state is your best clue:
- Nothing listed: the routers don't hear each other's hellos, or they hear them and throw them away because something doesn't match.
- INIT: this router hears the other one, but the other one does not hear this router back. Traffic only works in one direction.
- 2WAY: on an Ethernet link with three or more routers, this is normal between two routers that are not the DR or BDR. Don't try to fix it.
- EXSTART or EXCHANGE that never ends: the routers agree on the hello, but the database exchange fails. Nine times out of ten it is an MTU mismatch.
- FULL, but routes are missing: the adjacency is fine. Look at what you advertise (
networkcommands, passive interfaces, area types).
The things that must match
show ip ospf interface g0/0 on both routers shows almost everything at once:
- Area: both ends of a link must be in the same area.
- Subnet and mask: both interfaces must be in the same subnet with the same mask.
- Hello and dead timers: default is 10 and 40 on Ethernet. One router with
ip ospf hello-interval 5breaks it. - Authentication: same type and same key on both sides.
- Network type: a point-to-point on one side and broadcast on the other can form but behave strangely.
- Stub flags: if one router says the area is a stub, the other must say so too.
debug ip ospf adj prints the reason directly, for example "Mismatched hello parameters". Turn it off afterwards with undebug all.
Fix: the interface is not in OSPF at all
The wildcard in the network command is a common trap. 10.0.12.0 0.0.0.3 covers 10.0.12.1 and .2, but 10.0.12.0 0.0.0.0 covers nothing useful.
router ospf 1
network 10.0.12.0 0.0.0.3 area 0
network 192.168.1.0 0.0.0.255 area 0
Check with show ip ospf interface brief. If the interface is not in the list, OSPF is not running on it.
Fix: passive interface on the link between routers
passive-interface is good on LAN ports, but on the link to another router it stops hellos completely.
router ospf 1
no passive-interface g0/1
If you used passive-interface default, every interface is passive until you un-passive the router links.
Fix: timers or MTU
Make the timers match on both ends (or remove the custom ones):
interface g0/0
ip ospf hello-interval 10
ip ospf dead-interval 40
For EXSTART or EXCHANGE, set the same MTU on both sides. ip ospf mtu-ignore also works, but fixing the MTU is cleaner.
interface g0/0
ip mtu 1500
Fix: duplicate router ID
If you copied a config from one router to another, both may have the same router ID. You'll see %OSPF-4-DUP_RTRID in the log. Give each router its own ID and restart the process:
router ospf 1
router-id 2.2.2.2
end
clear ip ospf process
Still not working?
- An ACL on the interface can block OSPF hellos (protocol 89, address 224.0.0.5). See ACL blocking traffic.
- The link itself may be down. See interface down.