Open Shortest Path First (OSPF) is a link-state interior gateway protocol (IGP) that uses the cost metric to find the best route to reach a subnet. It uses wildcard masks to identify the subnet, instead of a subnet mask. It supports variable length subnet mask (VLSM) and also lets the network to converge very fast. Forming neighbour relationships is essential in the working of OSPF and it has to be a full relation for routing to work as intended. It sends routing updates to the multicast IP address to share information among the neighbours. Using OSPF, a router floods link state advertisements (LSAs) over the network to share every detail with every other router on the network to form link state databases (LSDBs) on each router and to eventually become OSPF neighbours. The default administrative distance for OSPF is 110, and we can even change it to make it a case of floating routing.
To set up OSPF routing, on a router, we need to configure the OSPF process ID and the router ID. A router can also choose the numerically highest IP address of its physical interface or the loopback interface as the router ID. When choosing the router ID, the highest loopback interface address takes precedence over the physical interface address and the manually configured router ID takes precedence over all. Just be sure that the router ID for all the routers in the network is unique. We also have to divide the network into smaller areas to efficiently carry out the OSPF implementation. The areas must be contagious. Using multiple areas in an OSPF configuration improves the scalability of the network and helps contain the problems of a particular area within the area. It also results in smaller routing table entries hence reducing the overhead for the devices. For neighbour relations, the interfaces of both the routers must be in the same subnet and must belong to the same area. Another very important thing in the OSPF process is the matching hello and dead timers. If they don’t match, the routers will not be able to form neighbour relationships and, the routing information will not be shared efficiently, and hence, the routing will not work as intended. Once the neighbour relations have formed and all the routing information has been shared with every neighbour, then every router applies Dijkstra Shortest Path First algorithm on the LSDBs to find the best path from its perspective to a particular subnet, and adds an entry on its routing table.
Click here for CCNA Certification