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 126.96.36.199 & 188.8.131.52.
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
- Manually we can set
- Highest Loopback interface address
- Highest Physical interface address
Note* Router ID used to represent a router in a Domain.
By this Enable OSPF on Routers:
- Start sending hello for dynamic discovery.
- Add links to its Database in neighbor state
The OSPF States are:
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.
Hello received but not with router ID.
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:
Start the exchange process negotiate – MTU and Sequence number (For Reliability).
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.
Actually, the database will exchange in this 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.