OSPF (Open Shortest Path First) Protocol
OSPF (Open Shortest Path First) Protocol is an open standard routing protocol. It allows routers to exchange routing information. This tutorial provides a brief introduction to OSPF (Open Shortest Path First) and explains the differences between different OSPF versions.
What is OSPF?
Routers connect different IP subnets in the network. To connect subnets, they learn all network paths, select the best route for every subnet from all available paths, and save the chosen path in the routing table.
A routing protocol automates this process. There are many routing protocols. Based on how they calculate the best path, you can categorize them into three types: distance vector, link state, and hybrid.
The metric used by routing protocols to calculate the best and shortest path is known as the metric. Distance vector routing protocols use the number of routers in the path as the metric. RIPv1 and RIPv2 are distance vector routing protocols. A hybrid routing protocol uses bandwidth and delay as the metric. EIGRP is a hybrid routing protocol. Link State routing protocols use path cost as the metric. OSPF is a link-state routing protocol.
OSPF Overview
OSPF stands for Open Shortest Path First. RFC 2328 describes it. It is an open standard routing protocol. It dynamically learns all network paths, selects the best route for every subnet, and adds that to the routing table. It uses path cost to choose the shortest path from all available paths.
OSPF Standards
Open standards allow you to run OSPF on all routers. If you use OSPF as the routing protocol, you can use routers from different vendors in the same network. For example, you can use routers from Cisco and Juniper in the same network.
OSPF Versions
OSPF has three versions: OSPFv1, OSPFv2, and OSPFv3. OSPFv1 was developed in the mid-1980s to overcome limitations, deficiencies, and scalability problems of the routing protocols of that time. In 1998, OSPFv1 was updated by OSPFv2 to support modern infrastructure and networks.
OSPFv2 includes all the features and characteristics that modern networks need. It is one of the most popular and widely used routing protocols. It was developed when IPv6 was not in use. Because of this, support for IPv6 was not added to OSPFv2.
To support IPv6, instead of updating OSPFv2, a new version of OSPF was developed. It was OSPFv3. It was released in 2008. The following table compares the features of OSPFv2 and OSPFv3.
| OSPFv2 | OSPFv3 |
| It supports IPv4. | It supports IPv6. |
| It is specified in RFC2328. | It is defined in RFC 5340. |
| The header size is 24 bytes. | The header size is 16 bytes. |
| It uses seven link-state advertisements. | It uses nine link-state advertisements. Two new included LSAs are link-LSA and intra-area-prefix-LSA. |
| You can run only one instance per link. | You can run many instances per link. |
| It needs a network mask to form an adjacency. | It does not need a network mask to form an adjacency. |
| It uses MD5 hashing for authentication. | It uses IPSec for authentication. |
| It uses networks. | It uses links. |
| It can configure its RID automatically. | It can't configure its own RID. You have to configure RID manually. |
Since OSPFv1 has been updated and replaced by OSPFv2, network administrators commonly use the term OSPF to refer to OSPFv2. Because of this, unless the version of OSPF is explicitly mentioned, you can consider all references to OSPF to be OSPFv2.
This tutorial is part of the tutorial "OSPF Configuration and Concepts Explained.". Other parts of this tutorial are as follows:
Chapter 01 OSPF (Open Shortest Path First) Protocol
Chapter 02 RIP V/s OSPF | Differences between RIP and OSPF
Chapter 03 IGP, EGP, and Autonomous System Explained
Chapter 04 OSPF Features, Advantages, Disadvantages
Chapter 05 OSPF Fundamental Terminology Explained
Chapter 06 OSPF LSA Types and LSA Flooding Explained
Chapter 07 OSPF Area Types and Concept Explained
Chapter 08 OSPF Hello Protocol and Packets Explained
Chapter 09 OSPF RID (Router ID) Explained
Chapter 10 OSPF Neighborship Condition and Requirement
Chapter 11 OSPF DR BDR Selection Process Explained
Chapter 12 How OSPF Routers Build Adjacency Explained
Chapter 13 Shortest Path First (SPF) Algorithm Explained
Chapter 14 OSPF Single-Area Configuration Explained
Chapter 15 OSPF Stub area, Totally Stub area, NSSA, and Totally NSSA
Chapter 16 OSPF Virtual Links Explained
Chapter 17 OSPF Authentication Password and MD5 Explained
Chapter 18 OSPF Multi-Area Configuration Explained
Conclusion
This tutorial is the first part of the tutorial series on OSPF. It introduced OSPF and explained the differences between different OSPF versions. Learning these differences helps you choose the correct OSPF version for your network and understand the configuration steps explained in the following parts.
Author Laxmi Goswami Updated on 2026-04-24