Skip to content
  • There are no suggestions because the search field is empty.

Introduction to OSPF

Open Shortest Path First (OSPF) is an open standard routing protocol widely supported by networking vendors today. The initial OSPF development started in 1987, and in RFC 1247 in 1991, it was released as OSPFv2. In 1998, the OSPFv2 (utilized for IPv4) specification was updated in RFC 2328, which remains the current RFC for OSPF. 

OSPF was created as a replacement for the distance vector protocols such as RIP and IGRP, and as a standard routing protocol, OSPF has become the most popular choice in networks ever since. 

OSPF is often used in larger networks such as campuses or ISPs due to its ability to scale to accommodate complex network topologies. It also provides a fast convergence time, allowing for rapid network adaptation in case of a network topology change.

OSPF, as a link-state routing protocol, identifies two parameters, the “link” representing the interface and the “state” representing the relationship of the interface to the neighboring router. Compared to the traditional distance vector routing protocols, OSPF offers the following advantages:

  • More scalable approach.
  • Efficient use of updates by sending trigger updates.
  • Each router has a full map of the topology.
  • Responds quickly to topology changes.

Also, OSPF relies on independent transport (IP protocol number 89), supports Variable Length Subnet Mask (VLSM) and authentication, and uses a simple approach to calculate the metric required for always selecting the best routes to each destination network.

Hierarchical Structure of OSPF

OSPF uses a two-layer network hierarchy, consisting of an AS representing a collection of networks under a common administration that usually shares a common routing strategy. In addition, inside the AS, an area (or areas) exist, representing multiple grouped networks.

When implementing OSPF, Area 0 or the backbone area (also known as the transit area) must always be present, and it is usually enough for normal operations in a typical network. In a single-area design, all routers are part of the same area, and it is the most suitable option for small networks.

However, using just a single area in large enterprise networks does not scale well. In such scenarios, a multi-area design is a better option. This multi-area approach segments the network into smaller domains (areas), each functioning independently. 

An area usually represents a location, building, department, or anything that has meaning to the OSPF design plan. Even though the number of routers used per single area usually depends on many factors.

Note: The general recommendation is to have no more than 50 routers per area.

In multi-area design, all additional areas must be directly connected to the backbone area. Although simple, this approach heavily limits the flexibility of OSPF, so proper planning and design are essential steps in the implementation process. Skipping these usually results in extra difficulties and the impossibility of finishing the OSPF implementation in the later stages.

Remember that multi-area design provides several benefits over single-area OSPF, such as maintaining smaller routing tables on the routers and fewer OSPF calculations after topology changes. This is accomplished by limiting the propagation of OSPF routes throughout the areas by applying summarization on the routers connecting multiple areas, called area border routers (ABR).

OSPF Autonomous System diagram showing Area 0 (backbone), 1, and 2, and routers 1 through 6, where router 6 connects to external AS

The image above shows an example of an OSPF AS with several areas. Besides the backbone area, two additional areas are defined, Area 1 and Area 2. Depending on the location within the AS, the OSPF-enabled routers have corresponding names and perform different roles. Routers can have one of the following roles:

  • Backbone router: Router in which all interfaces belong in the backbone area (Area 0).
  • Internal router: Router in which all interfaces belong in an area different than Area 0.
  • Area Border Router (ABR): Router that has interfaces connecting to different areas such as Area 0 and Area 1. It is not recommended for an ABR to connect to more than three areas.
  • Autonomous System Boundary Router (ASBR): Router in the OSPF AS that connects to an external AS.

Our example shows that R3 is a backbone router, while R1 and R5 are internal routers because they belong to Area 1 and 2, respectively. R2 and R4 are ABRs, where R2 connects to Area 0 and 1, and R4 connects to Area 0 and 2. Lastly, R6 is an ASBR because it connects to an external AS running EIGRP.