OSPF Areas and LSAs – Detailed Explanation
1. Why OSPF Uses Areas
In a single-area OSPF deployment, every router must flood LSAs to every other router in the domain, and every topology change triggers an SPF recalculation on every router. In large networks this creates massive CPU and bandwidth overhead. OSPF areas fix this by confining LSA flooding to within each area — a link failure in Area 2 only triggers SPF on Area 2 routers, leaving all other areas unaffected.
Area 1 Area 0 (Backbone) Area 2
┌───────────┐ ┌────────────────────┐ ┌───────────┐
│ R1 ── R2 │──[ABR]──│ R5 ──── R6 │──[ABR]──│ R9 ──R10 │
│ | │ │ | │ │ │
│ R3 │ │ R7 ──R8 [ASBR] │ │ R11 │
└───────────┘ └──────────┬─────────┘ └───────────┘
│ Type 5 LSAs
External AS / Internet
(redistributed via ASBR R8)
Related pages: OSPF Single-Area Configuration | OSPF DR/BDR | View Routing Table | Route Sources & AD | show ip route | Administrative Distance | EIGRP Configuration | Default Routes | OSPF Single-Area Lab | OSPF Route Redistribution Lab
2. OSPF Area Types
| Area Type | LSA Types Permitted | Purpose / Use Case | Cisco Config Command |
|---|---|---|---|
| Backbone (Area 0) | 1, 2, 3, 4, 5 | Mandatory core — all inter-area traffic must transit Area 0. Every other area must attach directly or via virtual link. | Built-in; cannot be changed |
| Standard / Regular Area | 1, 2, 3, 4, 5 | General-purpose — receives all LSA types including external routes. Default area type for new areas. | Default (no extra command) |
| Stub Area | 1, 2, 3 only | Blocks external Type 5 LSAs. ABR injects a default route (Type 3) for external traffic. Reduces LSDB size at remote branches. | area 1 stub |
| Totally Stubby Area | 1, 2 only (+ default route) | Cisco-proprietary. Blocks Type 3, 4, and 5 LSAs. Only a single default route (Type 3) from ABR. Minimum LSDB size. | area 1 stub no-summary |
| NSSA (Not-So-Stubby Area) | 1, 2, 3, 7 | Like stub but permits a local ASBR to redistribute external routes as Type 7 LSAs. ABR converts Type 7 to Type 5 at the area boundary. | area 1 nssa |
| Totally NSSA | 1, 2, 7 only (+ default route) | Combines Totally Stubby and NSSA. Blocks Type 3/4/5 but allows local Type 7. Most restrictive while still supporting external connectivity. | area 1 nssa no-summary |
3. ABRs and ASBRs
Area Border Router (ABR)
An ABR has interfaces in two or more OSPF areas, always including Area 0. It maintains a completely separate LSDB for each area it connects, runs SPF independently for each area, and generates Type 3 and Type 4 Summary LSAs to advertise routes between areas.
| ABR Responsibility | Detail |
|---|---|
| Connects areas to backbone | At least one interface in Area 0 + at least one in another area |
| Maintains separate LSDBs | Full LSDB for each area — Area 0 LSDB + Area 1 LSDB (kept completely separate) |
| Generates Type 3 LSAs | Summarises networks from one area into the other areas |
| Generates Type 4 LSAs | Tells other areas how to reach an ASBR in a different area |
| Injects default route into stub areas | Type 3 LSA with 0.0.0.0/0 for stub/totally stubby areas |
! ABR configuration — router participates in Area 0 AND Area 1
router ospf 1
network 10.0.0.0 0.0.0.255 area 0 ! connects to Area 0 backbone
network 192.168.1.0 0.0.0.255 area 1 ! connects to Area 1
! Stub area — configure on BOTH the ABR and all internal area routers
router ospf 1
area 1 stub ! on ABR
router ospf 1
area 1 stub ! on all Area 1 internal routers too
Autonomous System Boundary Router (ASBR)
An ASBR redistributes routes from outside the OSPF domain (EIGRP, RIP, BGP, static routes, connected networks) into OSPF as Type 5 External LSAs. The ASBR role is not tied to area boundaries — an ASBR can be anywhere in the OSPF domain. See OSPF Route Redistribution Lab for hands-on configuration.
! ASBR — redistributing RIP routes into OSPF
router ospf 1
redistribute rip subnets metric 20 metric-type 2
! ASBR — redistributing a static default route
router ospf 1
default-information originate always
4. LSA Types — Complete Reference
LSAs (Link-State Advertisements) are the structured messages OSPF routers exchange to share topology information. Every router collects LSAs and stores them in its LSDB (Link-State Database). All routers in the same area must have an identical LSDB.
| Type | Name | Generated By | Describes | Flooding Scope | Blocked By |
|---|---|---|---|---|---|
| 1 | Router LSA | Every OSPF router | Router's own interfaces, their states, and cost within the area | Within originating area only | Nothing — always present |
| 2 | Network LSA | DR (Designated Router) | Multi-access segment + list of all OSPF routers attached to it | Within the area | Nothing — always present |
| 3 | Summary LSA (Network) | ABR | Networks in one area summarised for advertisement into other areas | Between areas (injected by ABR) | Totally Stubby, Totally NSSA |
| 4 | ASBR Summary LSA | ABR | How to reach an ASBR that is in another area | Between areas | Stub, Totally Stubby, NSSA, Totally NSSA |
| 5 | External LSA | ASBR | Routes redistributed from outside OSPF (other protocols, static routes) | Entire OSPF AS (domain-wide) | Stub, Totally Stubby, NSSA, Totally NSSA |
| 7 | NSSA External LSA | ASBR inside NSSA | External routes inside an NSSA — ABR converts to Type 5 at boundary | Within NSSA only | Standard areas (converted to Type 5 at boundary) |
LSA Type Memory Aid
Type 1 → Every Router describes itself (intra-area)
Type 2 → DR describes the broadcast segment (intra-area)
Type 3 → ABR summarises networks across areas (inter-area)
Type 4 → ABR tells others where the ASBR lives (inter-area)
Type 5 → ASBR injects external routes (domain-wide)
Type 7 → ASBR inside NSSA injects external routes (NSSA only → becomes Type 5 at ABR)
5. LSDB and the SPF Algorithm
Each OSPF router stores every LSA it receives in its Link-State Database (LSDB). All routers within the same area must have an identical LSDB — this is the "single source of truth" for the area topology.
When the LSDB is complete, OSPF runs Dijkstra's SPF (Shortest Path First) algorithm to build a tree of all shortest (lowest cost) paths from the local router to every destination. This tree is then used to populate the routing table.
| LSDB Concept | Detail |
|---|---|
| LSA refresh timer | LSAs are re-flooded every 30 minutes (LSRefreshTime = 1800 s) to prevent aging out, even if nothing changed |
| LSA MaxAge | 1 hour (3600 s) — if an LSA reaches MaxAge without being refreshed, it is removed from the LSDB |
| Sequence numbers | Each LSA carries a sequence number incremented on every refresh — routers reject LSAs with older or equal sequence numbers to prevent stale data |
| SPF trigger | SPF recalculates whenever a new or changed LSA arrives — areas isolate SPF triggers so a remote failure doesn't cause SPF everywhere |
| OSPF cost | Cost = Reference Bandwidth / Interface Bandwidth (default reference: 100 Mbps). Lower cost = preferred path. Compare routes using Administrative Distance. |
6. Virtual Links
Every OSPF area must connect directly to Area 0. If an area cannot physically connect to Area 0 — because a merger, network redesign, or expansion created a gap — a virtual link bridges the gap by creating a logical point-to-point link through a transit area.
Area 0 ──[ABR-R5]── Area 1 ──[ABR-R8]── Area 2
↑
Virtual link runs through Area 1
to connect Area 2 → Area 0 logically
! Configure virtual link on BOTH ABRs
! R5 (ABR between Area 0 and Area 1):
router ospf 1
area 1 virtual-link 8.8.8.8 ! 8.8.8.8 = R8's OSPF Router ID
! R8 (ABR between Area 1 and Area 2):
router ospf 1
area 1 virtual-link 5.5.5.5 ! 5.5.5.5 = R5's OSPF Router ID
! Verify:
Router# show ip ospf virtual-links
7. Which LSAs Each Area Type Blocks
| Area Type | Type 3 (Summary) | Type 4 (ASBR Sum.) | Type 5 (External) | Type 7 (NSSA Ext.) | Default Route? |
|---|---|---|---|---|---|
| Standard | ✅ Allowed | ✅ Allowed | ✅ Allowed | N/A | No (unless redistributed) |
| Stub | ✅ Allowed | ❌ Blocked | ❌ Blocked | N/A | ✅ Yes (Type 3 default from ABR) |
| Totally Stubby | ❌ Blocked | ❌ Blocked | ❌ Blocked | N/A | ✅ Yes (only route in) |
| NSSA | ✅ Allowed | ❌ Blocked | ❌ Blocked | ✅ Allowed (local only) | Optional |
| Totally NSSA | ❌ Blocked | ❌ Blocked | ❌ Blocked | ✅ Allowed (local only) | ✅ Yes |
8. Verification and Troubleshooting Commands
! View the full LSDB (all LSA types)
Router# show ip ospf database
! View specific LSA types
Router# show ip ospf database router ! Type 1
Router# show ip ospf database network ! Type 2
Router# show ip ospf database summary ! Type 3
Router# show ip ospf database asbr-summary ! Type 4
Router# show ip ospf database external ! Type 5
Router# show ip ospf database nssa-external ! Type 7
! Check OSPF area membership and router type (ABR, ASBR, etc.)
Router# show ip ospf
! Check neighbour adjacencies
Router# show ip ospf neighbor
! Check OSPF-learned routes in routing table
Router# show ip route ospf
| Problem | Likely Cause | Diagnostic Command |
|---|---|---|
| Routes missing from routing table | LSA type blocked by area config; ABR not advertising; stub area misconfiguration | show ip ospf database — check if expected LSA types are present |
| Adjacency stuck at EXSTART/EXCHANGE | MTU mismatch between neighbours | show ip ospf interface — check MTU; add ip ospf mtu-ignore temporarily to confirm |
| LSDB mismatch between neighbours | Area type mismatch (one stub, one not); authentication mismatch | show ip ospf database on both sides — compare sequence numbers; verify with show running-config |
| External routes not appearing | Redistribution not configured on ASBR; stuck in stub area | show ip ospf database external — if missing, check redistribute command. See OSPF Route Redistribution Lab. |
| Flapping LSAs / routes | Unstable interface or link; duplicate Router IDs | debug ip ospf events (use carefully); check for duplicate RIDs with show ip ospf. Check interface status with show ip interface brief. |
9. Summary: OSPF Areas and LSAs Key Points
| Topic | Key Facts |
|---|---|
| OSPF Areas | Logical segmentation — limits LSA flooding scope, reduces SPF overhead, improves scalability. See OSPF Single-Area Configuration. |
| Backbone (Area 0) | Mandatory — all inter-area traffic must transit it; every area must attach directly or via virtual link |
| Stub Area | Blocks Type 4 & 5; ABR injects default route; use for branches with one exit path |
| Totally Stubby | Blocks Type 3, 4 & 5; only default route in; Cisco proprietary; minimal LSDB |
| NSSA | Like stub but allows local external redistribution via Type 7; ABR converts Type 7→5. See OSPF Route Redistribution Lab. |
| ABR | Interfaces in 2+ areas including Area 0; separate LSDB per area; generates Type 3 & 4 LSAs |
| ASBR | Redistributes external routes (EIGRP, RIP, BGP, static) into OSPF as Type 5 (or Type 7 in NSSA) |
| LSA Type 1 | Router LSA — every router, intra-area only |
| LSA Type 2 | Network LSA — DR only, broadcast segments, intra-area |
| LSA Type 3 | Summary LSA — ABR, inter-area networks |
| LSA Type 5 | External LSA — ASBR, domain-wide (blocked by stub/NSSA) |
| LSA Type 7 | NSSA External — ASBR inside NSSA; converted to Type 5 by ABR |
| SPF | Dijkstra's algorithm runs on LSDB to build shortest path tree → routing table |
| LSA Refresh | Every 30 min (LSRefreshTime); MaxAge = 60 min; sequence numbers prevent stale data |
| Route types in table | O = intra-area, O IA = inter-area, O E1/E2 = external. See Route Sources & AD. |