IPAM glossary

What is OSPF (Open Shortest Path First)?

Abstract isometric UI showing network ranges, usage bars, region names (EMEA/APAC), and a purple "Deploy" button
Key takeawaysKey takeaways are generated with AI assistance. Because automated summaries can occasionally contain errors or miss important context, always refer to the full blog post for complete information.

OSPF (Open Shortest Path First) is a link state routing protocol that enables routers within a single autonomous system to discover network topology, build a shared link state database, and calculate the shortest path to IP destinations using Dijkstra's algorithm. The protocol organizes large networks into areas with a backbone (area 0) connecting all other areas, allowing scalability beyond what a single flat database could handle while improving convergence speed after failures. When OSPF is misconfigured—such as mismatched timers, area IDs, authentication settings, or poor address planning—it causes immediate and broad operational effects including neighbor formation failures, routing disruption, and increased CPU load on routers.

  • OSPF uses multicast addresses 224.0.0.5 and 224.0.0.6 for OSPFv2 (or FF02::5 and FF02::6 for OSPFv3) to send Hello packets and designated router updates, running directly over IP protocol number 89 without TCP or UDP.
  • Common OSPF operational issues include MTU mismatches causing ExStart adjacency stalls, Hello parameter mismatches preventing 2-Way neighbor state formation, and flapping links triggering repeated SPF calculations that raise router CPU consumption.
  • OSPF differs from BGP in that it operates as a link state protocol within a single autonomous system using lowest cumulative cost routing, whereas BGP functions as a path vector protocol exchanging routes between autonomous systems using policy-based selection.

OSPF at a glance

AttributeValue
Full nameOpen Shortest Path First
CategoryNetwork protocol (interior gateway routing protocol)
Defined inRFC 2328 for OSPF version 2 and RFC 5340 for OSPF version 3
Protocol and portRuns directly over IP using protocol number 89; it does not use TCP or UDP ports
OSI layerLayer 3 (network layer)
Primary useDynamic routing of IP traffic inside a single autonomous system
Related termsInterior gateway protocol, Autonomous system, BGP, Link state routing, IPv6

How OSPF works

OSPF routers discover neighbors, exchange descriptions of their links, and each independently computes a loop-free shortest path tree from an identical database. Routers send protocol packets on multicast addresses on most network types.

  1. Discover neighbors: Routers send Hello packets on their OSPF interfaces. Version 2 uses the multicast address 224.0.0.5 for these packets. Routers that agree on parameters such as area and timers become neighbors.
  2. Form adjacencies: On multi-access networks, routers elect a designated router and a backup designated router. Routers then synchronize their databases with the designated router and become fully adjacent.
  3. Flood link state advertisements: Each router describes its links and their costs in link state advertisements and floods them through the area, so every router in the area holds the same link state database.
  4. Run the shortest path first algorithm: Each router runs Dijkstra's algorithm on its database, with itself as the root, to produce a shortest path tree based on interface cost.
  5. Install routes: The router places the best routes from the tree into its routing table and repeats the calculation whenever a topology change is flooded.

OSPF divides large networks into areas, with area 0 as the backbone that connects all other areas. Area border routers summarize routing information between areas, which limits flooding and calculation scope. OSPF version 3 applies the same design to IPv6.

Why OSPF matters in enterprise networks

OSPF is widely used as the interior routing protocol in enterprise campus, data center and service provider networks because it converges quickly after a link or router failure and supports equal-cost multipath. Its area design lets a network grow beyond what a single flat link state database could handle, since topology detail stays inside each area.

When OSPF is managed badly, the effects are immediate and broad. Mismatched Hello or dead timers, area IDs or authentication settings prevent neighbors from forming. Unstable links cause repeated flooding and recalculation, which raises router CPU load. Poorly planned areas or missing route summarization enlarge databases and slow convergence. Inconsistent IP address planning also makes summarization hard, which ties routing health to address management.

OSPF has security implications because a router that accepts forged advertisements can have its routes redirected or traffic blackholed. RFC 2328 defines authentication for OSPF version 2, and RFC 7166 defines an authentication trailer for OSPF version 3. Enabling authentication and restricting which interfaces run OSPF are standard protections.

OSPF vs BGP (Border Gateway Protocol)

OSPF is an interior gateway protocol that calculates shortest paths inside one autonomous system, while BGP is a path vector protocol that exchanges routes between autonomous systems using policy. What is BGP?

AttributeOSPFBGP (Border Gateway Protocol)
Protocol typeLink statePath vector
Typical scopeWithin one autonomous systemBetween autonomous systems, and sometimes within one
Route selectionLowest cumulative cost from the shortest path first calculationPolicy and path attributes such as AS path length
TransportRuns directly over IPRuns over TCP

OSPF vs Enhanced Interior Gateway Routing Protocol (EIGRP)

OSPF is an open standard link state protocol that uses areas and a shared database, while EIGRP is an advanced distance vector protocol that computes routes using the Diffusing Update Algorithm. What is EIGRP?

AttributeOSPFEnhanced Interior Gateway Routing Protocol (EIGRP)
Protocol typeLink stateAdvanced distance vector
AlgorithmShortest path firstDiffusing Update Algorithm
HierarchyAreas with a backbone areaNo area concept; uses summarization and stub features
MetricCost, commonly derived from interface bandwidthComposite metric, by default based on bandwidth and delay

Common OSPF issues

Adjacency stalls in ExStart or Exchange when the interface MTU differs between neighbors, because database description packets are dropped or rejected. Matching the MTU on both ends resolves it more reliably than disabling the MTU check.

Neighbors never reach the 2-Way state when Hello interval, dead interval, area ID, subnet or authentication settings differ. Logs usually show Hello packets received with mismatched parameters.

On a broadcast segment, a router with a higher priority or router ID joining late does not preempt the current designated router, but a reboot of the elected one forces re-election and a brief disturbance. Setting priorities deliberately avoids unexpected roles.

Areas that lose their connection to area 0 stop exchanging inter-area routes correctly, leaving some destinations unreachable. A virtual link can be a temporary fix, but redesigning the area layout is the lasting one.

See how unified DDI simplifies network operations

Manage DNS, DHCP and IP addresses from one platform with automation, visibility and control built in.

OSPF FAQ

Related terms

Article

BGP (Border Gateway Protocol)

A standardized exterior gateway protocol to exchange routing and reachability information among autonomous systems on the internet.

Learn more
Article

Enhanced Interior Gateway Routing Protocol (EIGRP)

An advanced distance-vector routing protocol that is used on a computer network for automating routing decisions and configuration.

Learn more
Article

Routing Information Protocol

A dynamic routing protocol that uses hop count as a routing metric to find the best path between the source and the destination network.

Learn more
Article

Multicast

Group communication where data transmission is addressed to a group of destination computers simultaneously.

Learn more
Article

Unicast (routing)

One-to-one transmission from one point in the network to another point with one sender and one receiver, each identified by a network address.

Learn more
Article

IPv4 (Internet Protocol version 4)

The fourth version of Internet Protocol that uses 32-bit addresses to route most of today’s internet traffic; the global supply of IPv4 addresses is exhausted. Learn More

Learn more
Article

IPv6 (Internet Protocol version 6)

The most recent version of Internet Protocol, which uses 128-bit address space; there are 340 undecillion IPv6 addresses.

Learn more
Article

CIDR (Classless Inter-Domain Routing)

A method for allocating IP addresses and IP routing introduced by the ITEF 1993 to replace classful networks.

Learn more