OSPFPrivileged EXEC

show ip ospf neighbor

Displays OSPF neighbor information to verify adjacency formation and troubleshoot OSPF neighbor relationships.

Syntax·Privileged EXEC
show ip ospf neighbor

When to Use This Command

  • Verify that OSPF neighbors have formed a full adjacency after configuration.
  • Troubleshoot why an OSPF neighbor is stuck in a state like INIT or EXSTART.
  • Check the designated router (DR) and backup designated router (BDR) on a multi-access network.
  • Monitor OSPF neighbor stability over time.

Command Examples

Basic OSPF Neighbor Display

show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.2      1   FULL/DR         00:00:35    10.0.0.2        GigabitEthernet0/0
192.168.1.3      1   FULL/BDR        00:00:38    10.0.0.3        GigabitEthernet0/0
10.0.1.2         1   FULL/ -         00:00:32    10.0.1.2        Serial0/0/0

Neighbor ID: Router ID of the neighbor. Pri: OSPF priority (default 1). State: OSPF state (FULL means adjacency complete) and role (DR/BDR or - for point-to-point). Dead Time: Time until neighbor is declared dead. Address: Neighbor's interface IP. Interface: Local interface.

Neighbor Stuck in INIT State

show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.4      1   INIT/ -         00:00:30    10.0.0.4        GigabitEthernet0/1

The neighbor is in INIT state, meaning the local router has received a hello packet but the neighbor does not see its own router ID in the hello. This indicates a one-way communication issue, often due to mismatched OSPF parameters (area ID, authentication, subnet mask) or ACL blocking.

Understanding the Output

The 'show ip ospf neighbor' command displays each OSPF neighbor on a separate line. The 'Neighbor ID' is the router ID of the neighbor. 'Pri' shows the OSPF priority (used in DR/BDR election). 'State' shows the OSPF adjacency state (DOWN, ATTEMPT, INIT, 2WAY, EXSTART, EXCHANGE, LOADING, FULL) and the neighbor's role (DR, BDR, or DROTHER). 'Dead Time' is the countdown timer for the dead interval; if it reaches 0, the neighbor is declared dead. 'Address' is the IP address of the neighbor's interface. 'Interface' is the local interface through which the neighbor is reachable. A healthy OSPF network should show neighbors in FULL state (or 2WAY for non-DR/BDR on multi-access). Stuck states like INIT or EXSTART indicate misconfiguration or connectivity issues.

CCNA Exam Tips

1.

CCNA exam tip: Know that FULL state indicates a complete adjacency; 2WAY is normal for DROTHER routers on multi-access networks.

2.

CCNA exam tip: The 'Dead Time' counts down from the dead interval (default 40 seconds on broadcast networks). If it reaches 0, the neighbor is removed.

3.

CCNA exam tip: In point-to-point links, the neighbor state will show FULL/ - (no DR/BDR).

4.

CCNA exam tip: A neighbor stuck in INIT means the local router is not receiving its own router ID in the neighbor's hello packets.

Common Mistakes

Mistake 1: Assuming FULL state is required for all neighbors; on multi-access networks, DROTHER routers stay in 2WAY.

Mistake 2: Forgetting that OSPF neighbor requirements include matching area ID, subnet mask, hello/dead intervals, and authentication.

Mistake 3: Misinterpreting the 'Dead Time' as time since last hello; it is the remaining time before the neighbor is considered dead.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions