Skip to main content
Lexicon
Lexicon
OSPF

OSPF

Difficulty: Intermediate
4 min read
Updated 2026-08-11

In plain English

Plain definition

OSPF (Open Shortest Path First) is a routing protocol that lets routers inside a single network automatically discover the best paths for sending traffic, without an administrator manually configuring every route.

How OSPF works out its routes

OSPF is a link-state interior gateway protocol (IGP). Routers running OSPF exchange link-state advertisements (LSAs) describing their local links and neighbours, build an identical link-state database, and independently run a shortest-path-first computation to determine the least-cost route to each destination. Each interface carries an administratively assigned cost, and OSPF supports a hierarchical area structure, including a backbone area, to bound the scope of LSA flooding and improve scalability. OSPF is specified through the IETF RFC Series published by the RFC Editor, with separate specifications for IPv4 (commonly called OSPFv2) and IPv6 (commonly called OSPFv3). Check the exact RFC number, version and errata status against the current IETF register before citing one in a design or compliance document, because a later RFC can supersede an earlier one.

Why network teams depend on it

Network teams use OSPF so that internal routing tables reconverge on their own when a link fails or the topology changes, with no routes reconfigured by hand. For platform, network and site-reliability teams running internal networks with several routers, the way OSPF converges decides how quickly and predictably traffic reroutes after a failure, and so bears directly on service availability.

Where OSPF sits in a routed network

OSPF works at the interior gateway layer of a routed network, distinct from exterior gateway protocols such as BGP that manage routing between separate autonomous systems. Within a single OSPF domain, routers are commonly organised into a backbone area and one or more non-backbone areas connected through area border routers (ABRs); routes entering or leaving the OSPF domain via other protocols are typically handled by autonomous system boundary routers (ASBRs). The area hierarchy is a design choice that gives up some routing detail for better scalability and faster convergence; record it as a deliberate assumption, not an automatic default.

Splitting a growing network into areas

A platform team running three data-centre racks might put all routers in the backbone area while the network is small, then split satellite racks into their own non-backbone areas as the topology grows, connecting each new area back to the backbone through an ABR. This keeps link-state flooding local to each area, so a single interface flap in one rack does not force every router on the network to rerun the full path computation. Test a redesign like this in an isolated or non-production lab first, as normal change management expects, before applying it to a live network.

Cost is not always a bandwidth formula

Many people assume OSPF cost comes from a single universal formula tied strictly to interface bandwidth. The protocol allows cost to be an administratively assigned value, and any specific default-cost calculation, such as a bandwidth-referenced default, is a vendor and version-specific implementation choice rather than a protocol requirement. Check any default-cost formula against the current documentation for your platform rather than treating it as a fact about OSPF itself.

Terms you will meet alongside OSPF

  • Interior Gateway Protocol (IGP)
  • Border Gateway Protocol (BGP)
  • IS-IS
  • EIGRP
  • Link-State Advertisement (LSA)
  • Area Border Router (ABR)
  • Autonomous System Boundary Router (ASBR)
  • Shortest Path First (SPF) algorithm

Further Reading

The authoritative OSPF specifications for each version are in the IETF RFC Series, published by the RFC Editor. Confirm which RFC and errata apply to the OSPF version in use before relying on any specific clause for a production design decision.

About this page

Credited to

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.