How is OSPF (Open Short Path First) Routing Protocol implemented using Dijkstra Algorithm behind the scene?

Hitesh
2 min readSep 7, 2022

ARTH — Task 41

What is Open Shortest Path First ( OSPF ) ?

Routers connect networks using the Internet Protocol (IP), and OSPF (Open Shortest Path First) is a router protocol used to find the best path for packets as they pass through a set of connected networks. OSPF is designated by the Internet Engineering Task Force (IETF) as one of several Interior Gateway Protocols (IGPs) — that is, protocols aimed at traffic moving around within a larger autonomous system network like a single enterprise’s network, which may in turn be made up of many separate local area networks linked through routers.

What is Djikstra Algorithm ?

Dijkstra’s algorithm is also known as the shortest path algorithm. It is an algorithm used to find the shortest path between nodes of the graph. The algorithm creates the tree of the shortest paths from the starting source vertex from all other points in the graph. It differs from the minimum spanning tree as the shortest distance between two vertices may not be included in all the vertices of the graph. The algorithm works by building a set of nodes that have a minimum distance from the source. Here, Dijkstra’s algorithm uses a greedy approach to solve the problem and find the best solution.

Djikstra Algorithm in OSPF

OSPF (Open Shortest Path First) is a Link State Protocol and is a most famous protocol among the Interior Gateway Protocol (IGP) family, working group of IETF. When configured OSPF will listen to neighbours and gather all link state data available to build a topology map of all available paths in its network and then save the information in its topology database, also known as it’s LSDB (Link-State Database). OSPF has capability to calculate the best shortest path to each reachable subnet/network using an algorithm called SFP (Shortest Path First) also known as Dijkstra algorithm.

--

--