Open Shortest Path First (OSPF) routing protocol is a highly scalable link-state protocol. One of the benefits of OSPF is that it is an open standard protocol, meaning it can be run in a network with devices from different vendors. OSPF minimizes updates between neighbours and works using the concept of Areas. Compared to the hop count limits of EIGRP’s 255 and RIP’s 15, OSPF does not have a hop count limit.
OSPF brings with it advantages such as a faster convergence tie, less routing overhead and the ability to limit network instabilities to an area, however, this comes with the disadvantage of being more complex to plan and configure.
OSPF works on a hierarchical setup, with area 0 being the primary area which all other areas must connect to by having a router that is connected to both areas. At the border of area 0, there are routers who are part of area 0 and also part of other areas too, these are Area Border Routers (ABRs). Routers that connect areas that two non-area 0 routers together are known as Autonomous System Boundary Routers (ASBRs). All routers in an area share the same area ID.
Similarly to EIGRP, OSPF sends hello packets to discover neighbours and establish relationships. These Hello packets are sent to the multicast address 22.214.171.124. Once a router’s neighbours have been discovered, it will need to know the network type which they are working on. Depending on what network type is being used, OSPF will then either elect a Designated Router (DR)/ Backup Designated Router (BDR) or exchange routing updates automatically. Of the 4 network types, Broadcast, Non-Broadcast Multi-Access (NBMA), Point-to-Point and Point-to-Multipoint, DRs and BDRs are only used for Broadcast and NBMA network types.
To select DRs and BDRs from among all the routers present in the network, routers will compare each of their priorities received through hello packets and select the highest priority as the DR, and the second-highest priority as the BDR. If router priorities are equal to each other, the router ID will be compared instead and the highest router ID will be selected as DR, along with the second-highest as BDR. It is the duty of the DR to share routing updates with all other routers in the network. If the DR happens to go down, the BDR will take its place as DR.
For routers to be in the same network, they need to have matching values for area ID, Hello and Dead intervals and optionally, authentication passwords. Only neighbours with the same area ID can form neighbour relationships. The Hello and Dead interval specifies the time duration after which a router will be declared dead if no hello packets are received from it. The default Hello and Dead interval is 10 and 40.
OSPF is a complex but efficient method in which large networks can be split into smaller networks so that routing updates can be smaller while still allowing the network to find the fastest possible paths for packets to travel to their destination. It differs greatly from RIP and EIGRP in that there is no hop-count limit.