OSPF Neighborship States

Like this article! Share via

In this article, we will discuss various states of OSPF (Open Shortest Path First). OSPF routers go through various phases before they establish neighborship.


Quick Overview of OSPF Neighbor Discovery States

Before we begin a detailed discussion, let’s take a quick look of 8 different types of OSPF states. These states are used in order to establish a neighborship between routers.

  • Down State
  • Attempt State
  • Init State
  • Two Way State
  • Ex-Start State
  • Ex-Change State
  • Load State
  • Done State

In order to understand all these states, we will use two different routers. Their IP address and Router-ID is configured as shown below:


OSPF Down State


It is the first state of the OSPF membership process. In this state, the Router (R1) starts sending Hello messages to a neighbor router (R2) but, not receiving Hello messages from that router (R2).

OSPF Attempt State


This state same as Down State (Explained above). But, the attempt state comes into action when the OSPF neighbor is statically defined, and Network type is Non-Broadcast Multi-Access (NBMA) like (Frame Relay, ATM).

OSPF Init State


In this process, Both routers (R1 & R2), start sending and receiving Hello messages from each other. So, we can assume that OSPF is running on both routers.

OSPF Two-way State


As you know router sends Hello messages using Router-ID. So, in this state, the Router (R1) sends a Hello message along with Router-ID to the neighbor router (R2). Now, the router (R2), replies a Hello message with the router-ID of both routers (R1 & R2).

If the network between routers is Mulitacess (i.e. Ethernet), then the election of DR/BDR router is also done in this state.

OSPF Ex-Start State


In this state, routers exchange their Empty DBD (Database Description). Both routers, start an election. A router which has a higher Router-ID wins that election and first send their DBD’s to another router and then receive.

Must Read :  Dynamic Routing : A Complete Guide for Beginner and Expert

In this process, routers also exchange their Sequence Number of DBD’s and negotiate MTU Size.

OSPF Ex-Change State


Like Exstart state, in this state, Master Router (R2) initiates sending the LSA’s (Link State Advertisements) header to the slave router (R1) with the sequence number. After this, the Master Router (R2) receives the LSA’s header from the slave router (R1).

Keep in mind, these are only LSAs Header, not detailed information.

OSPF Loading State


In the previous state (i.e. Exchange state), both routers exchange LSA’s headers. Now, in the Loading state, Master Router (R2) sends an LSR (Link State Request) message to Slave Router (R1). In the response to this message, Slave Router (R1) sends an LSU (Link State Update) message in which have the details of the complete database. Again, the Master router (R2) sends an LS-Ack (Link State Acknowledgment) message to Slave Router (R1).

In the same way, the Master Router (R2) shares their complete Database details to Slave Router (R1).

OSPF Full State

This is the last state of the OSPF neighborship process. After completing Loading state, routers become neighbors of each other.


In this article, we discussed 8 Different states of the OSPF neighborship formation process. After completing seven different states of OSPF neighborship formation, finally in the last state (i.e. Full State), routers become neighbors of each other.

Did you find this article helpful? Please leave a comment in the comment box.

Like this article! Share via

Leave a Reply

Your email address will not be published. Required fields are marked *