During the process of OSPF forming adjacency with neighbors, the connection goes through a number of states until the routers are fully adjacent with each other. This section provides a detailed description of each state. Following is a list of the OSPF states that we will be investigating:
- Down state
- Attempt state
- Init state
- 2-Way state
- Exstart state
- Exchange state
- Loading state
- Full state
When OSPF routers find their OSPF peers, they will go through the following states, as shown in the diagram below:
Figure 1. OSPF Neighbor States & OSPF Neighbor Forming Process
Down State
The initial state that an OSPF neighbor can be in is called the Down State, and it indicates that no Hello packets have been received from a neighbor. An OSPF state will change from a FULL or 2-Way State to the Down State when the router Dead Interval Timer expires (4 x Hello Interval timer). This indicates that OSPF has lost contact with its neighbor and is now deemed to be non-reachable or dead. This occurs in an adjacency that has already been formed.
This is a unique state that is only used for manually configured neighbors in a Non-Broadcast MultiAccess (NBMA) network. It indicates that the router is sending Hello packets to its neighbor in a Non-Broadcast MultiAccess (NBMA) environment via unicast, but it is not receiving a reply within the Dead Interval, which is equal to four times the Hello Interval.
A Frame Relay network is an example of an NBMA network because it does not have capacities for broadcasting and multicasting that are intrinsic to the network.
2-Way State
This state means that a Hello packet from a neighbor router was received, but the Hello packet did not include the receiving router’s ID. When a neighbor sends a Hello packet to a router, the router should list the sender’s Router ID to show that it got a valid Hello packet.
This state describes the Bi-Directional communication state. Bi-Directional means that both routers have gotten the other’s Hello packet and can see their own Router ID in the neighbor field of the Hello packet.
On NBMA networks (like Frame Relay, ATM) and broadcast media (like LAN), a router can only reach full state (look at below) with the Designated Router (DR) and the Backup Designated Router (BDR). But it will stay in the two-way state with all of its neighbors.
The DR and DBR routers are chosen based on whether they are on a broadcast or NBMA network once the 2-Way state is full.
Exstart State
In this condition, the master-slave relationship is defined and DR and BDR have been elected. Adjacency formation also begins with the selection of a beginning sequence number. Upon reaching a certain router ID limit, that router takes over as master and starts exchanging Link State data. The Master router is the only one with the authority to increase the sequence number.