OSPF

OSPF Neighbor Formation

Learn how OSPF routers discover one another, confirm two-way communication, maintain neighbor relationships, and reach Full adjacency.

Intermediate10 min read
OSPF lessonNetworkingLearn

Learn how OSPF routers discover one another, confirm two-way communication, maintain neighbor relationships, and reach Full adjacency.

What you will be able to do

  • Describe how Hello packets discover and maintain OSPF neighbors.
  • Identify the meaning of Down, Init, Attempt, and Full neighbor states.
  • Explain how a router confirms bidirectional communication.
  • Explain how missed Hellos and the dead interval affect neighbor status.

01

Why OSPF Forms Neighbors

OSPF routers must first recognize and communicate with one another before they can become fully adjacent. Neighbor formation is the process that turns received Hello messages into a tracked relationship.

Hello packets serve two related jobs: they discover nearby OSPF routers and help maintain existing neighbor relationships. This makes neighbor formation an ongoing exchange rather than a one-time greeting.

02

Every Relationship Starts in Down

A newly created OSPF neighbor begins in the Down state. At this point, the router has not yet received a Hello from that neighbor.

On broadcast and point-to-point networks, OSPF discovers neighbors dynamically through Hello packets sent to AllSPFRouters. The receiving router uses those packets as the first sign of a possible relationship.

03

A Received Hello Creates Init

When a router receives a Hello from a neighbor in Down, it moves that neighbor to Init and starts the inactivity timer. Init therefore records recent reception of a Hello.

For example, imagine Router A has Router B listed as Down. A Hello from B changes A’s view of B to Init, while the timer begins watching for future Hellos.

04

Confirming Two-Way Communication

Receiving a Hello proves that one direction of communication works, but it does not by itself prove that both routers can see each other.

Bidirectional communication requires a router to appear in the neighbor’s Hello packet. Router A therefore looks for its own identity in Router B’s Hello before treating the relationship as two-way.

05

Network Type Changes Discovery

Broadcast and point-to-point networks use dynamic Hello-based discovery. A router that can participate in Designated Router eligibility also sends periodic Hellos to other eligible neighbors.

NBMA networks handle an important case differently. A Down neighbor receives Hellos every PollInterval seconds, giving OSPF a scheduled way to contact neighbors that are not discovered through the same dynamic pattern.

06

The NBMA Attempt State

Attempt is a state associated with an NBMA network. In this state, OSPF sends the neighbor a Hello and starts the inactivity timer.

The useful contrast is simple: Down means the neighbor has just been created without a received Hello, while Attempt identifies an NBMA relationship that OSPF is actively trying to contact.

07

Keeping the Relationship Alive

The inactivity timer gives each neighbor relationship a limit for waiting on further Hellos. RouterDeadInterval is the waiting period after missing Hellos before the router declares its neighbor down.

On Cisco devices, the command `ip ospf dead-interval seconds` sets how long missing Hellos may continue before that down decision occurs. A shorter configured value allows less missed time than a longer one.

08

Reaching Full or Returning Down

After database synchronization finishes, the neighbor reaches Full state. At that point, the routers are fully adjacent, completing the formation process.

The opposite outcome is represented by the KillNbr event. It indicates that communication is impossible and forces the neighbor back to Down, where formation can begin again.

09

Lesson Recap: Ready for Practice and Prove

OSPF uses Hello packets to discover neighbors and maintain their relationships. On broadcast and point-to-point networks, those Hellos are sent to AllSPFRouters.

A new neighbor starts in Down. A received Hello moves it to Init and starts inactivity tracking, while the router’s appearance in the neighbor’s Hello confirms bidirectional communication.

NBMA networks add scheduled handling for Down neighbors through PollInterval. Attempt is an NBMA state in which OSPF sends a Hello and starts the inactivity timer.

RouterDeadInterval determines when missing Hellos lead to a down declaration, and Cisco’s `ip ospf dead-interval seconds` command sets that waiting period.

After database synchronization, the relationship reaches Full and becomes fully adjacent. Use these state changes and timer rules in Practice, then identify them in Prove.

NEXT STEP

Turn reading into recall

Practice the concepts without a timer, with coaching and retry available after every answer.

Open guided practice