Got it

OSPF state machine in detail

Latest reply: Dec 29, 2018 08:53:41 2005 4 8 0 0

The following describes the state machine in detail:

In the Down state, the OSPF interface still tries to discover neighbors. Therefore, the OSPF interface continuously sends multicast hello packets.
If the neighbor of a router is in this state, it indicates that the router does not receive any information from the neighbor but attempts to contact the neighbor.
This router exists only on the NBMA network. When the interface that has the DR selection qualification on the NBMA network and its neighbor router becomes valid (Activ/e), or when the router becomes the DR or BDR, the router with the DR selection will switch the status of the neighbor router to the Attempt state. In the Attempt state, the router uses the hellointerval time instead of the pollinterval time as the interval for sending Hello packets to the neighbor.
When an OSPF interface receives the first Hello packet from a neighbor on the link, it sets the neighbor to the init state on the interface. Note that the Hello packet may not contain any neighbor information. However, this proves that the OSPF interface has at least one active neighbor on the link. The following is a Hello packet without any active neighbor:

When an OSPF router detects a neighbor on a link, it adds the active neighbor field to the hello packet sent by itself. The field is used to store the OSPF neighbor discovered on the link. When a OSPF router detects that its (RouterID) is in the Hello packet sent by the neighbor, it sets the neighbor to Two-way. This state is the most basic relationship between OSPF neighbors and is also the first stable state. However, the two states cannot share routing information. The following is a Hello message that has discovered neighbor on the link:
OSPF Neighbor Relationship Establishment Process

After an OSPF router sets a neighbor to the 2way state, it sends an empty DBD packet to negotiate the master/slave. This is the ex-start state. The two routers use empty BDB groups to determine the master and slave relationships (not the DR or BDR),
In the DBD packet, three flags are used to manage the establishment of the adjacency relation.
The ·I bit or initial bit is used to negotiate the initial negotiation of the ex-start negotiation master/slave relationship. This bit is set to 1.
·M bit or called back bit (More bit) If this bit is not the last DBD sent by the OSPFrouter, this bit is set to 1.)
·MS bit or master/slave bit (Master/slave bit) If the originating router is a master router, this bit is set to 1.
If a OSPF router receives a DBD from its neighbor and the I bit is 0, it indicates that the ex-start is terminated and the MS/slave is selected. Then, the router sets the neighbor to the exchange state and starts to exchange its LSBD with the DBD that contains the LSA header.
The following is a DBD message used for initialization negotiation:
OSPF Neighbor Relationship Establishment Process
6.Exchange status
In this process, the two parties exchange DBD packets that contain their own LSA headers, and store the LSAs (or LSAs that they are interested in) in the queue of the local OSPF interface, in this way, the detailed information of the LSA can be requested in the next phase. When an OSPF interface receives a DBD message from a neighbor and the value of M is 0, it indicates that the peer has sent the DBD message. In addition, if the OSPF interface of the router has an LSA to be requested, the OSPF interface sets the neighbor to the loading state.
The following is an DBD message that carries the LSA header:

7.loading status
The OSPF router uses the LSR to request the detailed information about the LSA, and the peer uses the LSU to update the LSA. Therefore, only the LSU has complete information about the LSA. After receiving the LSU, the local end uses the LSAack for confirmation and loads the LSAs contained in the LSU into its own LSDB.
The following is an LSR message, which is very simple:
OSPF Neighbor Relationship Establishment Process

Then, an LSU message, which contains the complete LSA information, is not described in detail in this document.
OSPF Neighbor Relationship Establishment Process
8.Full Adjacency status
After the Loading state ends, that is, no LSA queue to be updated exists on the local OSPF interface, the neighbor is set to Full.

  • x
  • convention:

Created Dec 29, 2018 03:13:30

OSPF supports complex networks with multiple routers, including backup routers, to balance traffic load on multiple links to other subnets. Neighboring routers in the same broadcast domain or at each end of a point-to-point link communicate with each other via the OSPF protocol. Routers form adjacencies when they have detected each other. This detection is initiated when a router identifies itself in a Hello protocol packet. Upon acknowledgment, this establishes a two-way state and the most basic relationship. The routers in an Ethernet or Frame Relay network select a Designated Router (DR) and a Backup Designated Router (BDR) which act as a hub to reduce traffic between routers. OSPF uses both unicast and multicast transmission modes to send "Hello" packets and link state updates.
View more
  • x
  • convention:

Created Dec 29, 2018 03:25:16

After reading this document, you can understand the OSPF status mechanism.
View more
  • x
  • convention:

Created Dec 29, 2018 07:11:20

if the state always on 2-way, what it is mean?
View more
  • x
  • convention:

Created Dec 29, 2018 08:53:41

Is the router sets the neighbor to the exchange state and starts to exchange its LSBD with the DBD that contains the LSA header?
View more
  • x
  • convention:


You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits


Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Please bind your phone number to obtain invitation bonus.