Hi,
The Open Shortest Path First (OSPF) protocol, developed by the Internet Engineering Task Force (IETF), is a link-state Interior Gateway Protocol (IGP). At present, OSPF Version 2, defined in RFC 2328, is intended for IPv4, and OSPF Version 3, defined in RFC 2740, is intended for IPv6.
Two OSPF-enabled routers connected by a common network and in the same OSPF area that form a relationship are OSPF neighbors. The connection between these routers can be through a common broadcast domain or by a point-to-point connection. This connection is made through the exchange of hello OSPF protocol packets.
The election of the master slave relationship is mainly to determine the DBD sequence number. This sequence number can ensure the orderly and reliable transmission of DBD messages.
OSPF Neighbor States
To exchange
routing information on an OSPF network, neighbor Routers must establish adjacencies. The differences between neighbor relationships
and adjacencies are described as follows:
Neighbor relationship: After the local Router starts, it uses an OSPF interface to send a Hello packet to the
remote Router. After the remote Router receives the packet, it checks whether the parameters carried in
the packet are consistent with its own parameters. If the parameters
carried in the packet are consistent with its own parameters, the
remote Router establishes a neighbor relationship with the local Router.
Adjacency: After the local and remote Routers establish a neighbor relationship, they exchange DD packets and
LSAs to establish an adjacency.
OSPF has eight neighbor states: Down, Attempt, Init, 2-way,
Exstart, Exchange, Loading, and Full. Down, 2-way, and Full are stable
states. Attempt, Init, Exstart, Exchange, and Loading are unstable
states, which last only several minutes. Figure 6-3 shows
the eight neighbor states.

For more information:
https://info.support.huawei.com/network/ptmngsys/Web/tsrev_ar/en/content/ar/17_edesk_ospf_peer_status_abnormal/edesk_ospf_peer_status_abnormal_edesk001.html
https://support.huawei.com/enterprise/en/doc/EDOC1100058422/e2fdfced/ospf-fundamentals