Introduction to the Different OSPF States and Process

When an OSPF router is initially connected to a network it completes the following generic link-state routing OSPF process and gets the state of convergence through changing different states. Before discussing OSPF states, I am going to discuss OSPF Process.

Create adjacencies with neighbours

OSPF configured router form adjacencies with their neighbours before share information with that neighbour. It sends Hello packets out all OSPF-enabled interfaces to resolve connected OSPF neighbours on those interfaces. If a neighbour is found, it attempts to establish neighbour adjacency with that neighbour.

Exchange routing information Using LSAs

When adjacencies are established between neighbours, then they exchange link-state advertisements (LSAs) with each other’s containing the state and cost of each directly connected link. Routers flood their LSAs to adjacent neighbours and adjacent neighbours receive the LSAs and flood it immediately to other directly connected neighbours until all routers in the area have all LSAs.

Build the topology table

After receiving the LSAs, OSPF-enabled routers build the topology table based on the received LSAs. It holds all the information about the topology of the network. All routers in the area must have the same information in the topology table.

Execute the SPF algorithm

Routers then execute the SPF algorithm. The SPF algorithm creates the SPF tree.

Calculate the best routes

After creating the SPF tree the router inserts the best path into the routing table. Routing decisions are made based on the entries in the routing table.

Reach convergence

This is the real OSPF state of the router which is required for the actual operation of the routing. The OSPF progresses through different OSPF states while attempt to reach convergence. The figure below illustrates the different OSPF states progress:

OSPF States

Downstate.

  • This is the OSPF state when the router is down.
  • When it is Power Up it sends Hello Packet
  • If the router is exciting to init state.

Init state

  • The state is another OSPF state when the router has just received the hello packet from the neighbours containing the sending router ID.
  • Transition to Two-Way State

Two-Way state

  • In the OSPF state, the route elect a DR or BDR on Ethernet links
  • Transition to ExStart State

ExStart state

  • Negotiate master / Slave relationship, also DBD packet sequence number
  • The master initiates the DBD packet exchange

Exchange state

  • In this state Routers Exchange DBD Packets.
  • In case of additional requirement of information router transit to loading state, otherwise, the transition to the full state.

Loading state

  • To gain more information router uses LSRs and LSUs.
  • The route is processed using the SPF algorithm
  • Transition to full state

Full state

  • This is the actual state which is required also know as a converged state.

[qsm quiz=14]