Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests - Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests -

OSPF (Open Shortest Path First)

The OSPF is an abbreviation for Open Shortest Path First. It belongs to the family of IP routing protocols. It’s an IGP – generally used to distribute the information of IP routing throughout a single AS (Autonomous System) in an IP network.

In this article, we will look more into the OSPF (Open Shortest Path First) according to the GATE Syllabus for (Computer Science Engineering) CSE. We will read ahead to find out more about it.

Table of Contents

What is OSPF (Open Shortest Path First)?

OSPF refers to a link-state routing protocol used to locate the best path present between a destination router and its source using its SPF (shortest path first) algorithm. A link-state routing protocol is exchanged at a time. It is basically a protocol that utilises the concept of triggered updates. So it means that in case there’s a change that we observe in the learned routing table, then all the updates would only be triggered. It is unlike the distance-vector protocol in which the routing tables are triggered.

The IETF or Internet Engineering Task Force developed the OSPF in the form of an IGP (Interior Gateway Protocol). It is a protocol that primarily moves the packet within a routing domain or a large autonomous system. It is nothing but a network layer protocol, and it works on protocol number 89. It uses the AD value 110. The multicast address 224.0.0.5 is used by OSPF for normal communication, while 224.0.0.6 is used in the case of an update to DR (Designated Router) or BDR (Backup Designated Router).

Criteria

The criteria that exist for both the routers for the formation of neighbourship in OSPF are:

  1. It must be present in the very same area.
  2. There should be a similar subnet mask.
  3. There should be a unique router ID.
  4. Authentication has to match.
  5. The stub flag has to match.
  6. The hello and the dead timer must be the same.

OSPF supports plain text, NULL, and MD5 authentication.

Important note – Both the neighbours (routers) must have some authentication type enabled. For example, in case MD5 authentication has been enabled in one neighbour, then the MD5 authentication must also be enabled for all the others.

OSPF Messages

There are certain messages that the OSPF uses to establish communication between all the routers that operate the OSPF. They are:

Hello Message

It is a type of keep-alive message that the OSPF uses for neighbour discovery or recovery. This message is exchanged every 10 secs. It includes the information regarding the router ID, area ID, hello/dead interval, router priority, authentication data, BDR and DR IP address.

Database Description (DBD)

The DBD refers to the OSPF route of a given router. It consists of the topology of the routing domain (an area or an Autonomous System).

Link State Request (LSR)

When a DBD is received by a router, it compares that DBD with its own DBD. Thus, in case the DBD that it has received consists of more updates than the DBD of its own, then its neighbour receives the LSR.

Link State Update (LSU)

A router responds with this message whenever it receives LSR. It consists of all the requested details.

Link State Acknowledgement

This message provides the link-state exchange process with reliability. This message is like the acknowledgement of the LSU message.

Link State Advertisement (LSA)

An LSA is a data packet of OSPF that consists of all the information on link-state routing. It is only shared with those routers that have formed an adjacency.

Important note – LSA is only an abbreviation for Link State Advertisement. It is different from Link State Acknowledgement. Both of these are very different types of messages.

Timers

Hello Timer

The hello timer refers to the time interval in which an OSPF router sends a hello message on any interface. By default, it is 10 seconds.

Dead Timer

The dead timer refers to the time interval in which the router’s neighbour gets declared dead whenever it is incapable of sending a hello packet. By default, the dead timer is 40 seconds. Thus, it’s actually four times the hello interval/timer. But we can also manually configure it per the system needs.

OSPF Pros

  • Classless protocol
  • Unlimited hop counts
  • It has both IPv6 and IPv4 routed protocols
  • It provides trigger updates in order to implement faster convergence
  • It can be run on most routers
  • Balances the load with routes that cost equal for the very same destination
  • Uses the SPF algorithm for a loop-free topology
  • VLSM and route summarisation

OSPF Cons

OSPF also comes with some disadvantages. For starters, it needs an extra CPU process when running the SPF algorithm. It needs more RAM for the storage of adjacent topology. Also, it is much more complex to set up while difficult to troubleshoot.

Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Syllabus, GATE Previous Year Question Paper, and more.

Also Explore,