show ip ospf neighbor
Lists every OSPF neighbor with its router ID, priority, adjacency state, dead timer, address and interface.
Written by a working field network engineer · CCNA, Security+, CySA+
If OSPF routes are missing, start here. An adjacency has to reach FULL before any routes are exchanged, and this table tells you which neighbors made it and which are stuck.
Example output
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:36 10.0.12.2 GigabitEthernet0/1Reference output: hand-written in standard Cisco IOS format for this example network, not captured from a device.
Useful variants
sh ip ospf neishow ip ospf neighbor detailshow ip ospf neighbor GigabitEthernet0/1
What each column or field means
| Field | Meaning |
|---|---|
Neighbor ID | The neighbor’s OSPF router ID, not its interface address. |
Pri | The neighbor’s interface priority for DR election. 0 means it can never be DR or BDR. |
State | Adjacency state / the neighbor’s role. FULL is the goal; on a broadcast segment DROTHERs stop at 2WAY with each other, which is normal. The role after the slash is DR, BDR, DROTHER or a dash on point-to-point links. |
Dead Time | Countdown to declaring the neighbor down. It resets with every hello (default hello 10 s, dead 40 s on Ethernet). |
Address / Interface | The neighbor’s interface address and the local interface it was seen on. |
When it doesn’t look right
No neighbor appears.
Hellos are not being exchanged or not accepted. Both interfaces must be in the same subnet and area, with matching hello/dead timers, authentication and network type, and neither may be passive.
Stuck in EXSTART or EXCHANGE.
Almost always an MTU mismatch between the two interfaces. Make the MTUs match (or use ip ospf mtu-ignore as a last resort).
Stuck in INIT.
This router hears the neighbor but the neighbor does not hear it back: one-way traffic, often an ACL dropping 224.0.0.5 in one direction.
Both routers show the same Neighbor ID as their own.
Duplicate router IDs. Set unique IDs with router-id and run clear ip ospf process.
Related commands
Try it yourself
- OSPF Single-Area Base (Pro)
- Advertising Three Networks Into OSPF (Pro)
- OSPF Network Statements Across Two Areas (Pro)
- Advertising a Forgotten Network Into OSPF (Pro)
- Or build the example network in the free Sandbox
Learn it in the CCNA path
- OSPF Basics & Neighbor States (3. IP Connectivity)
- OSPF Configuration & Network Command (3. IP Connectivity)
- Enable OSPF with network statements (3. IP Connectivity)
- Separate OSPF adjacency from route advertisement (3. IP Connectivity)
Topic
OSPF — Enable single-area OSPFv2, form neighbor adjacencies, read the neighbor and interface tables and confirm learned routes.