This video details the process of OSPF adjacency establishment. This video includes a discussion about OSPF neighbor states, configuring OSPF between two routers (on EVE-NG), reading OSPF debug output, verifying OSPF neighbors, and investigating OSPF packet capture.
First and foremost, not every two neighboring routers become adjacent. In certain cases, two routers can be neighbors but not be fully adjacent. Note that neighborship and adjacency are two different things - it is VERY important to understand this difference. Two routers are neighbors when they have exchanged Hello messages and seen their own router IDs in the received Hello packets. In other words, the neighbors are aware of each other’s existence. This is called the 2WAY state.
The actual adjacency starts to form in the EXSTART state, when the two routers initiate the database exchange. Once the databases are fully synchronized and the process has completed, the routers are adjacent. This is called the FULL state.
Both of these states, 2WAY and FULL, are stable states. The other states are transitional.
RFC 2328 - Section 10.1. Neighbor states
DOWN - This is the initial state of a neighbor conversation. It indicates that there has been no recent information received from the neighbor.
ATTEMPT - This state is only valid for neighbors attached to NBMA networks. Since this only applies to a specific OSPF network type, which we have not discussed before, we’ll skip over this one for now.
INIT - In this state, a Hello packet has recently been seen from the neighbor. However, bidirectional communication has not yet been established with the neighbor (i.e., the router itself did not appear in the neighbor's Hello packet). All neighbors in this state (or higher) are listed in the Hello packets sent from the associated interface.
2-WAY - In this state, communication between the two routers is bidirectional. This has been assured by the operation of the Hello Protocol. This is the most advanced state short of beginning adjacency establishment.
EXSTART - This is the first step in creating an adjacency between the two neighboring routers. The goal of this step is to decide which router is the master, and to decide upon the initial DD sequence number. Neighbor conversations in this state or greater are called adjacencies.
EXCHANGE - In this state the router is describing its entire link state database by sending Database Description packets to the neighbor. Each Database Description Packet has a DD sequence number, and is explicitly acknowledged. Only one Database Description Packet is allowed outstanding at any one time. In this state, Link State Request Packets may also be sent asking for the neighbor's more recent LSAs. All adjacencies in Exchange state or greater are used by the flooding procedure. In fact, these adjacencies are fully capable of transmitting and receiving all types of OSPF routing protocol packets.
LOADING - In this state, Link State Request packets are sent to the neighbor asking for the more recent LSAs that have been discovered (but not yet received) in the Exchange state.
FULL - In this state, the neighboring routers are fully adjacent. These adjacencies will now appear in router-LSAs and network-LSAs.