OSPF Neighborship States in Detail [2023]

In this article, we will discuss various states of OSPF (Open Shortest Path First). OSPF routers go through various phases before they establish a neighborship. Let’s discuss the neighborship parameters in detail!

ospf-neighbor-discovery-states

Quick Overview of OSPF Neighbor Discovery States

Before we begin a detailed discussion, let’s take a quick look at 8 different types of OSPF states. These states are used 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

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

neighbor-discovery-1

OSPF Down State

neighbor-discovery-2

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).

Recommended:  OSPF | Open Shortest Path First | Quick Overview

OSPF Attempt State

neighbor-discovery-3

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

OSPF Init State

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

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 to 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

ospf-exstart-state

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

Recommended:  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

ospf-exchange-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

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 which has the details of the complete database. Again, the Master router (R2) sends an LS-Ack (Link State Acknowledgment) message to Slave Router (R1).

Recommended:  Static Routing : Everything you need to know

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

OSPF Full State

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

Summary

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.

1 Comment

Leave a Reply

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