ospf states of open shortest first path

It is a Link State Protocol which protocol working on links call link-state protocol & Router add link information in Database. In Distance Vector Protocol we know about only neighbors but in Link State behavior everyone makes their own database and shares with all Router. OSPF states of the open shortest path first with a basic guide are below.

For example, if we have Six Router then six databases will be shared with each other and through this database, we can create topology or tree for the same.

OSPF is a layer three protocol with 89 numbers. It is a classless protocol.

It is uses multicast address &

OSPF uses the concept of AREAs do not compare it with AS with basic of EIGRP (Autonomous System), basically, both are designed for different uses. EIGRP for enterprise and OSPF for the internet or wide area

Note* An interface is a member of an AREA, not Router.

In a Router for enabling OSPF, we are using Command: #Router OSPF < process ID>

A router first elect Router ID. There are three ways to elect a Router ID

  1. Manually we can set
  2. Highest Loopback interfaceaddress
  3. Highest Physical interfaceaddress

Note* Router ID used to represent a router in a Domain.

By this Enable OSPF on Routers:

  1. Start sending hello for dynamic discovery.
  2. Add links to its Database in neighbor state

The OSPF States are:


Down State:

No hello has been received from a neighbor as the interface is down.

Active neighbor Field: Add R2 router ID if R2 exists neighbor. In new neighboring  R1 does not know R2 router ID.

For example: if I call my friend I will call him with his name and if I call a stranger then I call with a hello and tell me your name, I want to friendship with you.

Init State:

Hello received but not with router ID.

2-Way State:

After that hello send then Active field with R2 router ID this state is a 2-way state. (DR BDR election in this state and we will discuss this topic in the next blog). Establish 2-way communication now router know about each other.

Hello packet Parameter:

Ex-start State:

Start the exchange process negotiate – MTU and Sequence number (For Reliability).

Ex-Change State:

DBD exchange (Database Descriptors) Master and slave election here for exchange DBD

R1 sends its own DBD with sequence number which router ID is Highest that sequence number used for exchange DBD.

Loading State:

Actually, the database will exchange in this state.

Full State:

Fully adjacency Occurred.

Here these are commands

  • #Show IP OSPF: use for show OSPF configuration.
  • #Show IP OSPF interface: show the interface detail which is enabled with OSPF.
  • #Show IP OSPF Neighbor: Detail of neighbors
  • #Show IP OSPF Database: Detail of all router network link within Area.

This all about Basic OSPF with P2P or serial link and how it configures on the router. This will help you with OSPF knowledge and in the next OSPF blog, I will discuss BR DBR and areas role in a broadcast network.