ENGINEERING GUIDE · ROUTING

OSPF Engineering Guide

Understand OSPF areas, neighbours, LSAs, DR/BDR election, cost and SPF calculation with a practical troubleshooting workflow.

RoutingLink stateOSPFv2 · OSPFv3
The important bit: OSPF routers build a link-state database from LSAs and run a shortest-path calculation. An adjacency problem, LSDB problem and routing problem are different failure domains.

How OSPF works

OSPF is a link-state interior gateway protocol. Routers discover neighbours with Hello packets, establish adjacencies where required, exchange link-state information, build an LSDB and run Shortest Path First (SPF) to derive routes.

Areas and roles

Area 0 is the backbone area in a conventional multi-area design. An ABR connects OSPF areas. An ASBR injects routes from another routing domain. Area design can reduce the amount of topology information that must be maintained and can support summarisation.

Neighbour states

StateMeaning
DownNo usable Hello relationship is established.
InitHello received, but bidirectional communication is not confirmed.
2-WayBidirectional Hellos are established; on broadcast networks, this can be normal for non-DR/BDR peers.
ExStartDatabase exchange roles and sequencing are established.
ExchangeDatabase Description packets are exchanged.
LoadingMissing LSAs are being requested.
FullAdjacency database synchronisation is complete.

LSAs

LSAs describe topology and reachability information used to construct the LSDB. The exact LSA types and scope depend on OSPF version and area design. Router-LSAs and Network-LSAs are central to the normal IPv4 OSPFv2 model; summary and external information supports inter-area and redistributed reachability.

DR and BDR

On broadcast multi-access networks, OSPF elects a Designated Router and Backup Designated Router to reduce the number of full adjacencies required. Point-to-point networks do not use DR/BDR election in the same way.

Cost and SPF

OSPF path selection uses interface costs. A common calculation is reference bandwidth divided by interface bandwidth, with the resulting value handled according to the implementation. Modern links often require an explicitly configured reference bandwidth so that 1G, 10G and faster interfaces do not collapse into the same cost unintentionally.

The OSPF Path Analyzer can calculate interface cost and run a simple Dijkstra SPF calculation over a supplied topology.

Troubleshooting

  1. Confirm interfaces are up and IP addressing is correct.
  2. Check Hello, dead interval, area, network type, authentication and MTU parameters.
  3. Identify the neighbour state and determine where the adjacency process stops.
  4. Compare LSDB/LSA contents between neighbours.
  5. Check route calculation, summarisation and redistribution.
  6. Verify the selected next hop and forwarding table.
Common trap: an interface being up does not mean the OSPF adjacency is healthy. The control-plane parameters must also agree.

Standards and references

  • RFC 2328 — OSPF Version 2.
  • RFC 5340 — OSPF for IPv6.
  • Vendor documentation for implementation-specific defaults, extensions and OSPFv3 address-family behaviour.