OSPF States

There are seven states of OSPF
1.    Down
2.    Init  (One way state)
3.    Two way state
4.    Exstart
5.    Exchange
6.    Loading
7.    Full


Down State:

Router A sends Hello packet to router B if the fields don’t matches, then the router A will go in down state

After 10 seconds A will send another Hello packet and will be in INIT state and once again packet miss match will occur hence going once again to down state and it’ll be stuck between these two states

Some people say it is in down state when there’s no OSPF configured its wrong













Init State:

Router A sends packet to Router B and its fields are matched and now A is waiting for B to respond this state is called Init State.


Two way state:

Router A’s packet has been matched on B and Acknowledgement is sent to A and B’s Packet is matched on A and acknowledgement is sent to B this state is called two way state, neighbor table is completed in two way state and it is also decided who is DR who is BDR














Dr and BDR elections takes place after two way state before Exstart state and DR and BDR are finalized.

Exstart State

At this stage the Master and slave are declared, this decision is made to start the communication.

Master starts the communication, means it will send its link state database first.












Master and slave election is independent from DR and BDR elections, DR responsibility is to manage the database of network and Master is responsible for initializing the communication.


Master and slave are determined by:
§  Router Priority
§  Router ID (Breaks the Tie)

Exchange State:

DBD and LSR are exchanged in this state.
Master sends DBD’S (Database Description) first, DBD’S are just summary for all the routes
First Master sends the DBD (Database description, summary for all the routes) to slave, Slave compares that DBD with its database and if there’s something missing sends LSR (link state request)
Hey buddy, please send me details about 5.0.0.0 I don’t know about this network 

Loading State

Master in turn sends LSU (Link state update) to the slave with Next hop, Cost, Metric, Master starts loading these details into its memory, and is in loading state.
After that same process is repeated, but this time slave sends DBD and Master Checks.

LSU in-fact contains many LSA’s depending on LSR, let suppose if 10 networks are missing from B’s database so it will send LSR for 10 networks so Router instead of sending 10 LSA’S send’s one LSU containing all 10 LSA’S

LSU is a container for LSA’S

Full State

After all these LSR, LSU, LSAck, comparison of database is completed and all the networks are loaded into memory i.e. Database table this state is called full state.
Now we can run SPF algorithm to get the best path for our routing table.

For any correction, improvement or suggestion please do not hesitate to reach out at usman@cyberswats.com

Post a Comment

0 Comments