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
Key exam rule: All OSPF routers in an area must agree on the area type — if you configure an area as stub, all routers in that area must have the stub configuration. A mismatch prevents adjacency formation.

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 ResponsibilityDetail
Connects areas to backboneAt least one interface in Area 0 + at least one in another area
Maintains separate LSDBsFull LSDB for each area — Area 0 LSDB + Area 1 LSDB (kept completely separate)
Generates Type 3 LSAsSummarises networks from one area into the other areas
Generates Type 4 LSAsTells other areas how to reach an ASBR in a different area
Injects default route into stub areasType 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 ConceptDetail
LSA refresh timerLSAs are re-flooded every 30 minutes (LSRefreshTime = 1800 s) to prevent aging out, even if nothing changed
LSA MaxAge1 hour (3600 s) — if an LSA reaches MaxAge without being refreshed, it is removed from the LSDB
Sequence numbersEach LSA carries a sequence number incremented on every refresh — routers reject LSAs with older or equal sequence numbers to prevent stale data
SPF triggerSPF recalculates whenever a new or changed LSA arrives — areas isolate SPF triggers so a remote failure doesn't cause SPF everywhere
OSPF costCost = 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
Transit area cannot be a stub area — virtual links require full LSA flooding to function. Virtual links are a workaround for exceptional situations, not a preferred design pattern.

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✅ AllowedN/ANo (unless redistributed)
Stub✅ Allowed❌ Blocked❌ BlockedN/A✅ Yes (Type 3 default from ABR)
Totally Stubby❌ Blocked❌ Blocked❌ BlockedN/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
ProblemLikely CauseDiagnostic Command
Routes missing from routing tableLSA type blocked by area config; ABR not advertising; stub area misconfigurationshow ip ospf database — check if expected LSA types are present
Adjacency stuck at EXSTART/EXCHANGEMTU mismatch between neighboursshow ip ospf interface — check MTU; add ip ospf mtu-ignore temporarily to confirm
LSDB mismatch between neighboursArea type mismatch (one stub, one not); authentication mismatchshow ip ospf database on both sides — compare sequence numbers; verify with show running-config
External routes not appearingRedistribution not configured on ASBR; stuck in stub areashow ip ospf database external — if missing, check redistribute command. See OSPF Route Redistribution Lab.
Flapping LSAs / routesUnstable interface or link; duplicate Router IDsdebug 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

TopicKey Facts
OSPF AreasLogical 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 AreaBlocks Type 4 & 5; ABR injects default route; use for branches with one exit path
Totally StubbyBlocks Type 3, 4 & 5; only default route in; Cisco proprietary; minimal LSDB
NSSALike stub but allows local external redistribution via Type 7; ABR converts Type 7→5. See OSPF Route Redistribution Lab.
ABRInterfaces in 2+ areas including Area 0; separate LSDB per area; generates Type 3 & 4 LSAs
ASBRRedistributes external routes (EIGRP, RIP, BGP, static) into OSPF as Type 5 (or Type 7 in NSSA)
LSA Type 1Router LSA — every router, intra-area only
LSA Type 2Network LSA — DR only, broadcast segments, intra-area
LSA Type 3Summary LSA — ABR, inter-area networks
LSA Type 5External LSA — ASBR, domain-wide (blocked by stub/NSSA)
LSA Type 7NSSA External — ASBR inside NSSA; converted to Type 5 by ABR
SPFDijkstra's algorithm runs on LSDB to build shortest path tree → routing table
LSA RefreshEvery 30 min (LSRefreshTime); MaxAge = 60 min; sequence numbers prevent stale data
Route types in tableO = intra-area, O IA = inter-area, O E1/E2 = external. See Route Sources & AD.

OSPF Areas and LSAs Quiz

1. What is the primary purpose of using OSPF areas?

Correct answer is D. Without areas, every topology change causes SPF recalculation on every router and LSAs flood the entire domain — impractical in large networks. Areas confine LSA flooding so a link failure in Area 2 only triggers SPF on Area 2 routers. The backbone (Area 0) and Summary LSAs (Type 3) keep areas connected with minimal inter-area information exchange. See OSPF Single-Area Configuration for the foundational setup.

2. Which area is the mandatory backbone in OSPF, and what is its rule?

Correct answer is C. Area 0 (also written 0.0.0.0) is the mandatory OSPF backbone. Every non-backbone area must have at least one ABR with an interface in Area 0. All routing between areas passes through Area 0 — you cannot route directly from Area 1 to Area 2 without transiting Area 0. If a physical Area 0 connection isn't possible, a virtual link through a transit area can provide the logical connection. Verify area membership with show ip ospf.

3. Which OSPF area type blocks external Type 5 LSAs but still allows inter-area Type 3 Summary LSAs?

Correct answer is B. A Stub Area blocks Type 4 (ASBR Summary) and Type 5 (External) LSAs — reducing the LSDB by eliminating external route information. The ABR still sends Type 3 Summary LSAs so the stub area knows about other OSPF areas' networks. The ABR also injects a default route (Type 3) so stub routers can forward external traffic to the ABR for delivery.

4. What is the role of an Area Border Router (ABR) in OSPF?

Correct answer is A. 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 — it knows the full topology of all areas. It generates Type 3 Summary LSAs to advertise networks between areas, and Type 4 LSAs to tell other areas where ASBRs are located. It can also perform inter-area route summarisation to reduce LSA volume. Verify the ABR role with show ip ospf.

5. Which LSA type is generated by ASBRs to advertise routes from outside the OSPF domain?

Correct answer is D. Type 5 External LSAs are generated by the ASBR when routes from other protocols (EIGRP, RIP, BGP, static routes) are redistributed into OSPF. They flood domain-wide — except into stub and NSSA areas which filter them. There are two subtypes: O E1 (cost accumulates through OSPF) and O E2 (cost is fixed at redistribution — the default). Both appear in the routing table as O E1 or O E2. See OSPF Route Redistribution Lab.

6. What does an NSSA area allow that a regular Stub Area does not?

Correct answer is C. An NSSA is "not so stubby" because it adds one capability that a regular stub area lacks: allowing a local ASBR to inject external routes. Instead of Type 5 LSAs (which are blocked in stub areas), the ASBR generates Type 7 LSAs that flood only within the NSSA. When the Type 7 LSA reaches the ABR at the NSSA boundary, the ABR translates it into a Type 5 LSA and floods it into Area 0 and beyond. See OSPF Route Redistribution Lab.

7. What algorithm does OSPF use to calculate the best paths from its LSDB?

Correct answer is B. OSPF is a link-state protocol — it builds a complete map of the area (the LSDB) then runs Dijkstra's SPF algorithm on that map to calculate the shortest (lowest cost) path tree from the local router to all destinations. SPF is triggered whenever a new or changed LSA arrives. Smaller areas mean fewer SPF triggers and faster SPF computation, which is one key benefit of the multi-area OSPF design. Results appear in the routing table as routes with the O code.

8. Which LSA type is generated by the Designated Router (DR) on a multi-access segment?

Correct answer is A. On every broadcast (Ethernet) or NBMA segment, the elected DR generates a Type 2 Network LSA. This LSA describes the multi-access segment — its IP address and the complete list of all OSPF routers attached to it. Without the DR's Type 2 LSA, every router would have to independently describe its view of the shared segment. This is also why DR/BDR election is important — no DR means no Type 2 LSA generated.

9. How are Type 1 and Type 2 LSAs flooded within OSPF?

Correct answer is D. Type 1 (Router) and Type 2 (Network) LSAs are flooded only within the area where they originate — they never cross an ABR. This is a fundamental OSPF design principle: the detailed internal topology of each area stays private within that area. ABRs summarise this information into Type 3 Summary LSAs before advertising it to other areas. This is what makes areas effective at limiting flooding scope. Compare with EIGRP, which uses a different topology table approach.

10. Which Cisco IOS command displays all LSAs stored in the OSPF Link-State Database?

Correct answer is B. show ip ospf database displays the complete LSDB — all LSA types organised by category (Router LSAs, Network LSAs, Summary Net LSAs, Summary ASBR LSAs, External LSAs). You can filter by type: show ip ospf database router (Type 1), show ip ospf database external (Type 5), show ip ospf database nssa-external (Type 7). This is the primary command for verifying OSPF topology information and diagnosing LSA issues. Also use show ip route ospf to verify which OSPF routes made it into the routing table, and show running-config to verify area type configuration.

← Back to Home