OSPF Fundamentals: A Complete Guide to Open Shortest Path First Routing

Written By
CCIE HUB
📅
Published On
12th Aug, 2025
⏱️
Min Reading
3 Min
Table of Contents

Open Shortest Path First (OSPF) Is A Link-State routing protocol that is used to find the best path between the source and the destination router using its own Shortest Path First. OSPF is developed by Internet Engineering Task Force (IETF) as one of the Interior Gateway Routing Protocol (IGP) which aims at moving the packet within a large autonomous system or routing domain. It is a Network Layer protocol which works on protocol number 89 and uses AD value 110. OSPF uses multicast address 224.0.0.5 for normal communication and 224.0.0.6 for update to Designated Router (DR)/ Backup Designated Router (BDR).

Importane Terminology:

Router-Id: OSPF Router ID is a unique 32-bit identifier for a router within an OSPF domain. It is used for Neighbor Discovery, Topology Updates and maintaining the Link State Database (LSDB). If we will not select Router ID manually then by default OSPF selects highest active IP address on the router. For that First it prefers highest Loopback address. If Loopback Interface has not been configured then it prefers highest active IP address on the interface of the router is considered

Router Priority: It is an 8-bit value assigned to a router operating OSPF, used to elect DR and BDR in a Boradcast Network.

Designated Router (DR)- It is elected to minimize the number of adjacencies formed. DR distributes the LSAs to all routers. DR is elected in a Broadcast Network to which all the other routers share their DBD. In a Broadcast Network the router requests for an update to DR, and DR will respond to that request with an update.

Backup Designated Router (BDR)- It is a backup to DR in a Broadcast Network, when DR goes down, BDR becomes DR and perform it functions.

ospf

DR and BDR election- Criteria for the election:

  • The Router having the highest router priority will be declared as DR.
  • If there is a tie in router priority then the highest router-id be considered. First, the highest loopback address is considered. If no loopback is configured then the highest active IP address on the interface of the router is considered.

OSPF is used to find the best path between the source and the destination router using its own Shortest Path First. Dijkstra’s algorithm is widely used in the routing protocol required by the router to update their forwarding table.

It Provides the shortest cost path from the source to other routers in the network. Also, the protocol recalculates routes when network topology changes by using Dijkstra’s algorithm and minimizes the routing protocol traffic that it generates.

  • ABR: it connects different Area to Backbone Area.
  • ASBR: It inserts Different AS information into OSPF Area.
  • DR: It Update Topology Change Notification in Multilink within Area on one IP Subnet.
  • BDR: It is Backup of DR.

OSPF Packets:

  • Hello
  • DBD
  • LSR
  • LSU
  • LSACK

OPSF States:

  • DOWN
  • INIT
  • TWO-WAY
  • EX-START
  • EXCHANGE
  • LOADING
  • FULL

About The Author