8.2 OSPF Areas & LSA Types
Key Takeaways
Multi-area OSPF partitions large networks into a two-tier hierarchy consisting of Backbone Area 0 (0.0.0.0) and non-backbone areas, bounding Dijkstra SPF recomputation to local topological changes.
OSPF classifies routers by role: Internal Routers, Area Border Routers (ABRs), Autonomous System Boundary Routers (ASBRs), and Backbone Routers.
Type 1 (Router) and Type 2 (Network) LSAs describe intra-area topology and are strictly contained within their originating area.
Type 3 (Network Summary) and Type 4 (ASBR Summary) LSAs are generated exclusively by ABRs to advertise inter-area subnet reachability and ASBR location across area boundaries.
Type 5 (AS External) and Type 7 (NSSA External) LSAs inject external routes into OSPF, supporting Metric Type 1 (cumulative external + internal cost) and Metric Type 2 (fixed external cost, set explicitly by export policy).
OSPF Areas & LSA Types
In a flat, single-area OSPF deployment, every router must store every link-state advertisement generated across the entire enterprise. As networks scale to hundreds of routers and thousands of subnets, this flat model incurs severe operational penalties: the Link-State Database expands dramatically, consuming significant memory; the Dijkstra SPF algorithm ( complexity) places heavy processing demands on the Routing Engine; and any interface flap anywhere in the network forces an immediate, domain-wide SPF recalculation. To resolve these scalability bottlenecks, OSPF enforces a hierarchical, multi-area architecture.
1. Multi-Area Hierarchy & Scalability Principles
OSPF divides an Autonomous System into logical groups called Areas. An area is identified by a 32-bit number, formatted either as an integer (e.g., 0, 1, 100) or in dotted-decimal format (e.g., 0.0.0.0, 0.0.0.1).
+---------------------------------------------------------------------------------------------------+
| TWO-TIER OSPF HIERARCHICAL TOPOLOGY |
| |
| +-----------------------+ +-----------------------+ |
| | AREA 1 | | AREA 2 | |
| | [Internal Router] | | [Internal Router] | |
| | | | | | | |
| | [ABR 1]---------+ +-------[ABR 2] | |
| +---------|-------------+ +---------|-------------+ |
| | | |
| +==================[AREA 0]==================+ |
| (Backbone Core) |
| | |
| +------------+ |
| | [ASBR] |==== (External BGP / Static Redistribution) |
| +------------+ |
+---------------------------------------------------------------------------------------------------+
The Backbone Area 0 (0.0.0.0)
The core of the OSPF hierarchy is Area 0 (also written as 0.0.0.0), designated as the Backbone Area. All non-backbone areas must directly connect to Area 0. All traffic moving between two different non-backbone areas (e.g., Area 1 to Area 2) must cross the backbone. This strict hub-and-spoke area structure guarantees a loop-free inter-area routing topology, preventing routing loops between disparate areas.
Bounding SPF and Flooding Scope
Within an area, detailed topological links are flooded using Type 1 and Type 2 LSAs. When a link flaps inside Area 1:
- Only routers inside Area 1 run a full Dijkstra SPF calculation.
- The Area Border Router (ABR) connecting Area 1 to Area 0 updates its summary advertisements (Type 3 LSAs).
- Routers in Area 0 and Area 2 merely perform a lightweight partial route calculation (PRC) to update their routing table metrics, shielding the rest of the enterprise from CPU spikes and flooding overhead.
2. Router Classifications in Multi-Area OSPF
In a multi-area design, routers are categorized into distinct architectural roles based on their physical interface placement:
- Internal Router: A router whose active OSPF interfaces all reside within a single area. It maintains exactly one LSDB representing its local area.
- Area Border Router (ABR): A router that attaches to two or more areas, with at least one interface active in Area 0. The ABR maintains a separate, independent LSDB for each connected area. It runs Dijkstra SPF for each area and translates intra-area topology into Type 3 Network Summary LSAs, which it injects into adjacent areas.
- Autonomous System Boundary Router (ASBR): A router that redistributes routes learned from external sources (such as BGP, static routes, or connected interfaces) into OSPF. An ASBR generates Type 5 AS External LSAs (or Type 7 LSAs in an NSSA).
- Backbone Router: Any router that has at least one active interface connected to Backbone Area 0. This category includes all ABRs and any internal routers deployed exclusively in Area 0.
3. Core LSA Types: Detailed Breakdown
OSPF relies on specialized Link-State Advertisement (LSA) types to differentiate local link topology from inter-area summaries and external routes:
Type 1: Router LSA
- Originator: Every OSPF router.
- Flooding Scope: Flooded strictly within the local area (intra-area). Never crosses an ABR.
- Link-State ID: The Router ID of the originating router.
- Content: Describes all active OSPF interfaces belonging to the router in that area, including interface IP addresses, subnet masks, link metrics, and link types (Point-to-Point, Transit multi-access network, Stub network, or Virtual Link).
Type 2: Network LSA
- Originator: The Designated Router (DR) of a broadcast multi-access segment.
- Flooding Scope: Flooded strictly within the local area (intra-area). Never crosses an ABR.
- Link-State ID: The IP address of the DR's interface on that multi-access link.
- Content: Contains the subnet mask of the segment and the complete list of Router IDs of all routers currently adjacent to the DR on that network.
Type 3: Network Summary LSA
- Originator: Area Border Routers (ABRs).
- Flooding Scope: Flooded into adjacent areas (inter-area).
- Link-State ID: The destination network IPv4 address.
- Content: Advertises inter-area subnet reachability. The ABR absorbs detailed Type 1 and Type 2 LSAs from one area and regenerates them as Type 3 summaries into other connected areas, advertising the destination prefix, prefix length, and the ABR's metric to reach that prefix.
Type 4: ASBR Summary LSA
- Originator: Area Border Routers (ABRs).
- Flooding Scope: Flooded across all areas except the area containing the ASBR (and stub areas).
- Link-State ID: The Router ID of the ASBR.
- Content: Advertises reachability to an ASBR. Because Type 5 LSAs retain the ASBR's RID across the entire AS, routers in other areas cannot locate the ASBR within their local Type 1 LSDBs. The ABR solves this by generating a Type 4 LSA advertising its own internal cost to reach that ASBR's RID.
Type 5: AS External LSA
- Originator: Autonomous System Boundary Routers (ASBRs).
- Flooding Scope: Flooded throughout the entire OSPF Autonomous System (all regular areas; blocked from entering stub and NSSA areas).
- Link-State ID: The external network IPv4 address.
- Content: Contains external routes redistributed into OSPF. Supports two metric calculation types:
- Metric Type 1 (E1): The total metric is the external advertised cost plus the internal OSPF cost to reach the ASBR. Used when internal path costs across multiple ASBRs should influence routing decisions.
- Metric Type 2 (E2): The metric remains fixed at the external cost advertised by the ASBR (this guide’s examples specify the exported cost explicitly). If two paths advertise identical E2 costs, the internal cost to reach the ASBR acts as the tiebreaker.
Type 7: NSSA External LSA
- Originator: An ASBR located inside a Not-So-Stubby Area (NSSA).
- Flooding Scope: Flooded strictly within the originating NSSA. Blocked from entering Area 0.
- Link-State ID: The external network IPv4 address.
- Content: Injects external routes into an NSSA while preserving the area's stub-like protection against external Type 5 LSAs. When a Type 7 LSA reaches the NSSA ABR, the ABR (the one with the highest RID if multiple exist) translates the Type 7 LSA into a standard Type 5 LSA and floods it into Area 0.
4. Comprehensive LSA Reference Table
| LSA Type | Name | Originating Router | Flooding Scope | Link-State ID | Core Purpose |
|---|---|---|---|---|---|
| Type 1 | Router LSA | Every OSPF router | Local Area only | Originator's Router ID | Describes router's local links, states, and costs |
| Type 2 | Network LSA | Designated Router (DR) | Local Area only | Interface IP address of DR | Lists all attached routers on a multi-access segment |
| Type 3 | Network Summary LSA | Area Border Router (ABR) | Inter-area (adjacent areas) | Target Network IP address | Advertises inter-area subnet reachability |
| Type 4 | ASBR Summary LSA | Area Border Router (ABR) | Inter-area (domain-wide) | Router ID of the ASBR | Advertises internal metric reachability to an ASBR |
| Type 5 | AS External LSA | ASBR | Domain-wide (all normal areas) | External Network IP address | Injects redistributed external routes into OSPF |
| Type 7 | NSSA External LSA | ASBR in NSSA | Local NSSA only | External Network IP address | Injects external routes into NSSA; translated to Type 5 by ABR |
5. Junos Link-State Database CLI Analysis
The Junos operational command show ospf database provides a structured view of the LSDB categorized by area and LSA type:
user@vSRX> show ospf database
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Sequence Age Opt Cksum Len
Router *10.255.0.1 10.255.0.1 0x80000004 345 0x2 0x7a31 48
Router 10.255.0.2 10.255.0.2 0x80000006 120 0x2 0x4c22 48
Network 192.168.12.1 10.255.0.1 0x80000002 345 0x2 0x89ab 32
Summary 10.10.0.0 10.255.0.2 0x80000001 890 0x2 0x31bf 28
ASBRSum 10.255.0.99 10.255.0.2 0x80000001 412 0x2 0x19a2 28
OSPF AS-external database
Type ID Adv Rtr Sequence Age Opt Cksum Len
Extern 172.16.0.0 10.255.0.99 0x80000003 210 0x2 0x66f4 36
In this output:
- The asterisk (
*) preceding10.255.0.1indicates that this LSA was originated locally by this router. - The
Agecounter increments in seconds from 0 up toMaxAge(3600 seconds / 1 hour). At 1800 seconds (30 minutes), the originating router re-floods the LSA with an incremented sequence number. - The
Adv Rtrfield indicates the Router ID of the router that generated the LSA, which remains unchanged for Type 5 LSAs as they traverse area boundaries.
Output note: Command output shown here is a schematic teaching example, not a captured device session. Field names and feature support depend on platform and Junos release.
Why is a Type 4 ASBR Summary LSA required in a multi-area OSPF network when an ASBR injects external routes via Type 5 LSAs?
Type 5 LSAs are flooded only within Area 0, so Type 4 LSAs must carry external prefix reachability into non-backbone areas
Type 4 LSAs translate Type 7 NSSA external routes into standard Type 5 external routes across the Area Border Router
Type 4 LSAs dynamically reduce the external metric value of Type 5 routes as they traverse consecutive area boundaries
Type 5 LSAs retain the Router ID of the originating ASBR, requiring Type 4 LSAs generated by the ABR to advertise the intra-area cost to reach that ASBR
Which router generates an OSPF Type 2 Network LSA, and what is its flooding scope?
Generated by the Designated Router (DR) on multi-access networks; flooded strictly within the local area
Generated by any router attached to a point-to-point link; flooded across all areas in the OSPF domain
Generated by the Area Border Router (ABR); flooded into adjacent areas across the backbone
Generated by the Autonomous System Boundary Router (ASBR); flooded throughout all regular areas
When an ASBR injects external routes into OSPF, what is the operational distinction between Metric Type 1 (E1) and Metric Type 2 (E2)?
Metric Type 1 carries a default cost of 100 and ignores internal path costs; Metric Type 2 carries a default cost of 20 and floods only within Area 0
Metric Type 1 is only valid inside Stub and NSSA areas, whereas Metric Type 2 is restricted to the backbone Area 0
Metric Type 1 adds the internal OSPF path cost to reach the ASBR to the external cost; Metric Type 2 maintains a fixed external cost regardless of internal transit hops
Metric Type 1 routes have an administrative preference of 10 in Junos, whereas Metric Type 2 routes have an administrative preference of 150
Sections you finish are checked off in the contents.