OSPF Workflow with Dijkstra’s Algorithm..!!

Shrishti Kapoor
3 min readAug 5, 2021

Open Shortest Path First (OSPF) is a standard routing protocol that’s been used the world over for many years. Supported by practically every routing vendor, as well as the open source community, OSPF is one of the few protocols in the IT industry needed anywhere.

The main advantage of a link state routing protocol like OSPF is that the complete knowledge of topology allows routers to calculate routes that satisfy particular criteria. OSPF belongs to the Application Layer.

OSPF uses the shortest path first (SPF) algorithm to determine routes that should be added to the routing table. OSPF routers maintain a map of the internetwork called the link state database and Dijkstra algorithm is used for finding the shortest paths between nodes in the graph. For the case of directed positive weighted graphs we conclude the minimum path by using this particular algorithm.

Benefits of OSPF

  • The OSPF protocol is a link-state routing protocol, which means that the routers exchange topology information with their nearest neighbors. …
  • The main advantage of a link state routing protocol like OSPF is that the complete knowledge of topology allows routers to calculate routes that satisfy particular criteria.

Workflow:

Within OSPF there can be Point-to-Point networks or Multi-Access networks. The Multi-Access networks could be one of the following:

  • Broadcast Network: A single message can be sent to all routers
  • Non-Broadcast Multi-Access (NBMA) Network: Has no broadcast ability, ISDN, ATM, Frame Relay and X.25 are examples of NBMA networks.
  • Point to Multipoint Network: Used in group mode Frame Relay networks.

Each OSPF router distributes information about its local state (usable interfaces and reachable neighbors, and the cost of using each interface) to other routers using a Link State Advertisement (LSA) message. Each router uses the received messages to build up an identical database that describes the topology of the AS.

From this database, each router calculates its own routing table using a Shortest Path First (SPF) or Dijkstra algorithm. This routing table contains all the destinations the routing protocol knows about, associated with a next hop IP address and outgoing interface.

  • The protocol recalculates routes when network topology changes, using the Dijkstra algorithm, and minimises the routing protocol traffic that it generates.
  • It provides support for multiple paths of equal cost.
  • It provides a multi-level hierarchy (two-level for OSPF) called area routing, so that information about the topology within a defined area of the AS is hidden from routers outside this area. This enables an additional level of routing protection and a reduction in routing protocol traffic.
  • All protocol exchanges can be authenticated so that only trusted routers can join in the routing exchanges for the AS.

OSPF works great in different WAN environments like point to point, non broad cost multi-access, point to multipoint, frame-relay and in LAN environment. OSPF is also a great routing protocol for dialup scenarios and in heterogeneous organization which use to own different companies or business having with different vendors’ devices. In such environments OSPF is better choice because of it flexibility and following great features.

So through this there is a clear picture of OSPF Workflow with Dijkstra’s Algorithm..!!

--

--

Shrishti Kapoor

Spread Knowledge because it’s all about Right Education..!!