OSPF Configuration Guide: Areas, LSAs, Neighbors, and Troubleshooting

Open Shortest Path First (OSPF) is a link-state routing protocol used heavily in enterprise networks. This refreshed guide explains how OSPF forms neighbors, floods LSAs, builds areas, calculates cost, and reveals common routing failures.

OSPF Link-State Area 0 ENARSI
OSPF Configuration Guide: Areas, LSAs, Neighbors, and Troubleshooting cheat sheet: use this quick map before reading the detailed sections.
Lesson overview

In This Lesson

Configure and troubleshoot OSPF by connecting areas, neighbor states, LSAs, SPF decisions, and installed routes. Verification follows the same order as the protocol.

  1. What OSPF Does
  2. Areas and Backbone Design
  3. Neighbor States and DR/BDR
  4. Basic OSPF Configuration
  5. 5. Troubleshooting Workflow
  6. Change safety and verification
From concept to practice

Quick Learning Map

Keep this three-step view in mind as you work through the detailed lesson.

1

Form neighbors

Match area, timers, network type, authentication, MTU, and interface state.

2

Build the LSDB

Confirm LSA scope, area design, DR/BDR behavior, and database consistency.

3

Verify routing

Check SPF results, route installation, forwarding, and controlled change impact.

Fast orientation

OSPF Configuration Guide: Areas, LSAs, Neighbors, and Troubleshooting at a Glance

Use this summary before moving into the detailed explanations, examples, commands, and checks.

Core focus

Configure and troubleshoot OSPF by connecting areas, neighbor states, LSAs, SPF decisions, and installed routes.

Key connection

Form neighbors → Build the LSDB → Verify routing

Practical outcome

Verification follows the same order as the protocol.

1. What OSPF Does

OSPF routers exchange LSAs, build a link-state database, and run SPF to calculate loop-free routes from their own point of view.

Hello packets discover neighbors. Eligible neighbors synchronize LSAs so routers in the same area have a consistent view of that area's topology. Each router runs the shortest path first algorithm with itself as the root and installs the resulting routes when their next hops are reachable and OSPF is preferred over competing sources.

Send hellos.Form adjacency.Flood LSAs.Run SPF.Install best routes.

2. Areas and Backbone Design

Area 0 is the backbone. Non-backbone areas normally connect to Area 0 so inter-area routing remains predictable.

  • Backbone area: core transit area.
  • Normal area: accepts internal and external routes.
  • Stub area: uses a default route for external destinations.
  • NSSA: allows limited external injection.

Routers with interfaces in multiple areas act as area border routers and exchange summarized information between areas. Clean address allocation makes summarization possible and limits topology detail. Virtual links can repair certain backbone-connectivity problems, but they add operational complexity and should not replace a sound physical and logical design.

3. Neighbor States and DR/BDR

Neighbor states tell you where adjacency formation is failing. Broadcast networks elect a DR and BDR to reduce adjacency overhead.

  • Down or Init: check hellos and reachability.
  • 2-Way: normal between DROTHER routers.
  • ExStart or Exchange: check MTU and router ID.
  • Full: adjacency is complete.

Neighbors need compatible area IDs, hello and dead timers, authentication, network type, and stub flags. An MTU mismatch commonly leaves the relationship in ExStart or Exchange. On a broadcast network, DROTHER routers normally remain 2-Way with one another while becoming Full with the DR and BDR.

4. Basic OSPF Configuration

Set a stable router ID, activate the correct interfaces, and keep user-facing interfaces passive unless they should form neighbors.

  • router ospf 10
  • router-id 1.1.1.1
  • network 10.10.12.0 0.0.0.3 area 0
  • passive-interface default

The process ID is locally significant; the area ID must match across the link. A passive interface still advertises its connected prefix when matched by OSPF but does not send hellos or form a neighbor. Verify activation with show ip ospf interface brief rather than assuming a broad network statement selected the intended links.

OSPF Configuration Guide: Areas, LSAs, Neighbors,: 5. Troubleshooting Workflow

Verify interface activation, area, timers, MTU, authentication, LSDB contents, and finally route installation.

  • show ip ospf neighbor
  • show ip ospf interface brief
  • show ip ospf database
  • show ip route ospf

Work in sequence: interface and IP reachability, neighbor state, database contents, SPF result, routing-table installation, and data-plane forwarding. Capture both ends before clearing the process. A Full neighbor with a missing route points to advertisement, area type, filtering, summarization, or route preference—not hello timers.

OSPF Configuration Guide: Areas, LSAs, Neighbors,: Frequently Asked Questions

What is OSPF used for?

OSPF is used for dynamic routing inside an organization.

What is Area 0?

Area 0 is the OSPF backbone area.

What is OSPF administrative distance?

Cisco routers use 110 for OSPF by default.

Change safety and verification

Changing router IDs, authentication, area types, or network types can rebuild adjacencies. Record the LSDB and routing table, confirm a rollback path, and test the change in a lab or maintenance window. Afterward, verify stable neighbor uptime, the expected route types and costs, forward and return traffic, and clean logs.