CCNA online course

OSPF Areas Explained: Backbone, Standard, Stub, and NSSA Areas

Learn how OSPF areas improve scalability, compare normal, stub, totally stubby, NSSA, and totally NSSA areas, and configure and troubleshoot them in Cisco IOS.

OSPF (Open Shortest Path First) is a link-state interior gateway protocol. Instead of learning only individual next hops, OSPF routers build a link-state database (LSDB), which is a collection of link-state advertisements (LSAs) describing the network topology. The SPF algorithm, based on Dijkstra's shortest-path-first calculation, uses that database to choose routes.

An OSPF area is a logical topology boundary. Areas divide a large OSPF domain into smaller sections with separate LSDB scope. This design helps OSPF scale as the number of routers and prefixes increases.

Why OSPF Uses Areas

In a single-area design, every router normally receives topology changes for the entire area and may need to run SPF when the topology changes. In a multi-area design, each router keeps detailed topology information for its own area, while an Area Border Router advertises selected reachability information between areas.

  • Smaller LSDBs: Routers do not need a complete, detailed topology map for every area.
  • Fewer SPF calculations: A change in one area is less likely to trigger topology processing throughout the entire OSPF domain.
  • Reduced flooding scope: Many LSAs are flooded only within an area.
  • Lower resource consumption: CPU, memory, and bandwidth requirements can be reduced.
  • Better summarization: An ABR can advertise an aggregate prefix instead of many more-specific prefixes.

Areas improve scalability, but they also add design requirements. In particular, non-backbone areas normally need logical connectivity to Area 0, and area-type settings must be consistent between neighboring routers.

Area IDs and OSPF Router Roles

An area ID identifies an OSPF area. Cisco IOS accepts an area ID as a decimal value, such as 10, or in dotted-decimal form, such as 0.0.0.10. The two forms identify the same 32-bit area value. Use a consistent notation in documentation to avoid confusion.

Area 0, also called the backbone area, is the central area for normal inter-area routing. A router with at least one OSPF-enabled interface in Area 0 is a backbone router.

RoleArea MembershipPrimary FunctionTypical Responsibilities
Internal routerAll OSPF interfaces are in one areaMaintains topology for one areaForms adjacencies with neighbors in its area and calculates local routes
Backbone routerAt least one OSPF interface is in Area 0Participates in the backboneConveys or calculates routes associated with Area 0
Area Border Router (ABR)Interfaces in Area 0 and at least one other areaConnects areasMaintains separate per-area LSDB information and advertises inter-area reachability
Autonomous System Boundary Router (ASBR)Any OSPF area, subject to area-type rulesIntroduces routes from another sourceRedistributes static, connected, or other routing-protocol routes into OSPF

An ABR can also be an ASBR. The terms describe different functions: ABR refers to area boundaries, while ASBR refers to route redistribution into OSPF.

Area 0 and Backbone Connectivity

Area 0 is the OSPF backbone and normally carries inter-area traffic. Every non-backbone area should connect to Area 0 through an ABR. A router in Area 10 should not depend on a different non-backbone area as the normal path to Area 20; the expected design is Area 10 to Area 0 to Area 20.

This requirement is about logical OSPF connectivity, not merely physical cabling. An area can be physically connected through another area but still fail to provide normal inter-area routing if the OSPF backbone is not logically connected.

A virtual link is an exceptional mechanism that creates a logical OSPF connection to Area 0 through a transit area. It can help during a transition or repair an unavoidable topology constraint, but it is usually better to redesign the physical or logical area layout instead of relying on virtual links permanently.

How Routes Move Between Areas

OSPF route categories describe where a route originated:

  • Intra-area: Learned within the same area. Cisco IOS commonly displays these routes as O.
  • Inter-area: Learned from another OSPF area through an ABR. Cisco IOS commonly displays these routes as O IA.
  • External: Redistributed into OSPF by an ASBR. These routes commonly appear as O E1 or O E2.
  • NSSA external: Originated inside an NSSA. These routes commonly appear as O N1 or O N2.
Routing Table CodeRoute CategoryTypical SourceMetric Consideration
OIntra-areaType 1 or Type 2 topology informationInternal OSPF cost within the area
O IAInter-areaABR advertisement using Type 3 informationCost to the ABR plus the advertised inter-area cost
O E1External, type 1ASBR redistribution and Type 5 LSAExternal cost plus the internal cost to the ASBR
O E2External, type 2ASBR redistribution and Type 5 LSAExternal cost is primary; internal cost is used as a tie-breaker
O N1NSSA external, type 1Type 7 LSA originated inside an NSSAExternal cost plus internal cost to the translating or originating path
O N2NSSA external, type 2Type 7 LSA originated inside an NSSAExternal cost is primary; internal cost is generally a tie-breaker

ABRs maintain topology information separately for each connected area. They use Type 3 summary LSAs to advertise networks from one area into another. Area boundaries also limit LSA flooding. An LSA's scope determines where it can be flooded; area-scoped LSAs stay within an area, while selected information can cross boundaries through ABR or ASBR functions.

LSA Types Relevant to Area Design

LSA TypeNameOriginatorFlooding ScopePurposeArea-Type Behavior
1Router LSAEvery OSPF routerOne areaDescribes router links, costs, and area topologyPresent in each area; it does not cross an area boundary
2Network LSADesignated router on a multiaccess networkOne areaRepresents a multiaccess segment and its attached routersUsed where a DR is elected; area-scoped
3Summary LSAABRBetween areasAdvertises networks and summaries from one area to anotherAllowed in normal and basic stub areas; suppressed in totally stubby and totally NSSA designs except for permitted information
4ASBR Summary LSAABRBetween areasProvides reachability information toward an ASBRRelevant when external routes must reach an ASBR outside the local area
5AS External LSAASBROSPF domain, except areas that block itAdvertises redistributed external routesAllowed in normal areas; blocked from stub and NSSA areas when entering from outside
7NSSA External LSAASBR inside an NSSAOne NSSAAdvertises external routes originated within an NSSATranslated by an NSSA ABR into Type 5 information for other areas when appropriate

These are the LSA types most important for CCNA-level area design. Advanced LSA subtypes exist, but they are not prerequisites for configuring the common area types.

Normal OSPF Areas

A normal area permits standard OSPF information: intra-area topology, inter-area summaries, and external routes. Normal areas can receive Type 3, Type 4, and Type 5 LSAs, in addition to their local Type 1 and, where applicable, Type 2 LSAs.

For example, consider an ABR connecting Area 10 to Area 0. A user subnet inside Area 10 is learned by other Area 10 routers as an O route. A data-center subnet in Area 0 is advertised into Area 10 by the ABR and appears as O IA.

Stub Areas

A stub area blocks Type 5 external LSAs from entering the area. Instead of carrying every external prefix, the ABR injects a default route, commonly 0.0.0.0/0, for destinations not otherwise known.

Type 3 summary LSAs are still allowed in a basic stub area. Therefore, routers can still learn specific inter-area routes while using the default route for external destinations.

  • All OSPF routers in the area must use compatible stub settings.
  • An ASBR cannot reside inside a stub area because the area cannot originate or carry normal Type 5 external information.
  • A stub area is useful for a small branch with one ABR and no local redistribution.

For a branch connected to the rest of the organization through one ABR, a stub area can replace a large collection of external routes with one default route. This reduces LSDB and routing-table size.

Totally Stubby Areas

A totally stubby area is a Cisco-specific extension. It blocks Type 5 external LSAs and suppresses most Type 3 inter-area summary LSAs. The ABR supplies a default route, so internal routers retain local-area routes and use the default for most nonlocal destinations.

This design is appropriate for a single-exit branch that needs its own local routes but has no reason to select among many remote corporate prefixes.

Area DesignABR CommandInternal Router CommandExpected Routing Behavior
NormalNo special area-type commandNo special area-type commandReceives normal intra-area, inter-area, and external information
Stubarea 10 stubarea 10 stubBlocks Type 5 LSAs and receives a default route; Type 3 summaries remain allowed
Totally stubbyarea 10 stub no-summaryarea 10 stubBlocks externals and most summaries; uses an ABR-provided default route
NSSAarea 20 nssaarea 20 nssaBlocks outside Type 5 LSAs but permits local redistribution using Type 7 LSAs
Totally NSSAarea 20 nssa no-summaryarea 20 nssaPermits local Type 7 routes while suppressing most summaries and using a default route

The no-summary option is placed on the ABR command for Cisco IOS totally stubby and totally NSSA designs. Internal routers use the base stub or nssa command.

NSSA and Totally NSSA Areas

An NSSA (Not-So-Stubby Area) is used when an area should block external routes from outside but must contain an ASBR that redistributes local routes into OSPF. A standard stub area cannot support that requirement.

An ASBR inside an NSSA advertises redistributed routes using Type 7 LSAs. The NSSA ABR can translate eligible Type 7 LSAs into Type 5 LSAs before advertising them to the rest of the OSPF domain. Routers outside the NSSA can therefore learn the route as an external OSPF route, commonly O E1 or O E2.

Regular Type 5 external LSAs from other areas are blocked from entering the NSSA. Depending on the design and command options, the ABR can supply a default route toward destinations outside the NSSA.

A totally NSSA is a Cisco-specific variation. It combines NSSA's ability to originate local external routes with suppression of most Type 3 inter-area summaries. Internal routers receive local-area routes, locally originated NSSA external routes, and a default route for destinations outside the area.

The distinction is important:

  • Normal NSSA: Supports Type 7 local external routes and permits normal inter-area summaries.
  • Totally NSSA: Supports Type 7 local external routes but suppresses most inter-area summaries and relies more heavily on the ABR default route.
  • Totally stubby: Suppresses external and most inter-area information, but does not allow a local ASBR to inject external routes.

Area-Type Comparison

Area TypeType 3 Summary LSAsType 5 External LSAsType 7 LSAsDefault Route from ABRASBR AllowedCisco-Specific Extension
NormalAllowedAllowedNot normally usedOptional design choiceYesNo
StubAllowedBlocked from enteringNoYesNoNo
Totally stubbyMost suppressedBlockedNoYesNoYes
NSSAAllowedOutside Type 5 LSAs blocked from enteringAllowed for local redistributionCommonly supplied, depending on configurationYes, inside the NSSANo
Totally NSSAMost suppressedOutside Type 5 LSAs blockedAllowed for local redistributionYesYes, inside the NSSAYes

Planning Areas and Summarization

Summarization works best when the addressing plan reflects the topology. For example, assigning Area 20 a contiguous block such as 10.20.0.0/16 makes it possible for an ABR to advertise one summary instead of many component prefixes.

ABR area summarization summarizes routes learned within an area as they are advertised toward another area. Cisco IOS uses an area range command for this purpose.

ASBR external summarization is a separate function. It summarizes routes being redistributed into OSPF, rather than summarizing an area's internal prefixes. Do not confuse an ABR area range with external-route summarization.

Aggregation reduces routing information, but it hides specific-path details. An overly broad summary can attract traffic for addresses that are not actually reachable or can make troubleshooting less precise. Keep non-backbone areas contiguous where possible, place boundaries intentionally, and verify that component routes support the aggregate.

Cisco IOS Configuration Workflow

Enable OSPF and Assign Interfaces

The OSPF process ID is locally significant. It does not need to match between neighboring routers. Area IDs, however, must match on interfaces that are intended to form an adjacency.

router ospf 1
 router-id 1.1.1.1
 network 10.0.0.0 0.0.0.255 area 0
 network 10.10.0.0 0.0.0.255 area 10

The same assignments can be made directly on interfaces:

interface GigabitEthernet0/0
 ip ospf 1 area 0
interface GigabitEthernet0/1
 ip ospf 1 area 10

Configure Area Types

router ospf 1
 area 10 stub

Apply compatible stub configuration to every OSPF router in Area 10.

router ospf 1
 area 10 stub no-summary

Use area 10 stub no-summary on the ABR for a totally stubby area. Internal routers use only:

router ospf 1
 area 10 stub

Configure an NSSA as follows:

router ospf 1
 area 20 nssa

For a totally NSSA, use area 20 nssa no-summary on the ABR and area 20 nssa on internal NSSA routers.

Configure ABR Summarization

router ospf 1
 area 20 range 10.20.0.0 255.255.0.0

This tells the ABR to advertise the Area 20 component routes toward other areas as the aggregate 10.20.0.0/16, assuming the component routes and platform behavior support the summary.

Verification Commands

What to VerifyCommandUseful Evidence
Process, router ID, area detailsshow ip ospfRouter ID, area count, area types, and SPF information
Interface area membershipshow ip ospf interface briefInterfaces, assigned areas, and neighbor counts
Detailed interface settingsshow ip ospf interfaceArea ID, timers, network type, authentication, passive status, and DR/BDR information
Adjacenciesshow ip ospf neighborNeighbor IDs, states, and the expected Full state
LSDB contentsshow ip ospf databaseRouter, network, summary, external, and NSSA-external LSAs
OSPF routesshow ip route ospfO, O IA, O E1, O E2, O N1, O N2, and default routes
Protocol configurationshow ip protocolsProcess settings, networks, passive interfaces, and redistribution
Running OSPF configurationshow running-config | section router ospfRouter ID, area commands, ranges, and network statements

To check specific LSA categories, use commands such as show ip ospf database summary, show ip ospf database external, and show ip ospf database nssa-external. A missing LSA can indicate filtering, an area-type restriction, a failed adjacency, or an inactive originator.

Troubleshooting OSPF Areas

SymptomLikely CauseVerification CommandCorrective Action
Neighbors do not form an adjacencyDifferent area IDs or incompatible stub/NSSA settingsshow ip ospf interface
show ip ospf neighbor
Match the area ID and area type on both sides
Adjacency fails before FullHello/dead timers, authentication, subnet addressing, network type, passive interface, or duplicate router IDshow ip ospf interface
show ip protocols
Make interface parameters compatible, remove unintended passive status, and ensure router IDs are unique
Stub router lacks a default routeABR adjacency is down, area settings are inconsistent, or no functioning ABR existsshow ip route ospf
show ip ospf database summary
Restore the ABR adjacency and verify compatible stub configuration
ASBR cannot advertise from a stub areaStub areas do not support an ASBR or normal Type 5 originationshow ip ospf database externalUse a normal area or redesign the area as an NSSA
Expected NSSA external route is absentRedistribution, NSSA settings, ABR translation, or reachability is failingshow ip ospf database nssa-external
show ip ospf database external
Validate redistribution, area consistency, ABR operation, and route policy
Inter-area routes are missingNo valid Area 0 path, incorrect ABR participation, or an overly broad range/filtershow ip ospf database summary
show ip route ospf
Restore backbone connectivity, correct ABR assignments, and review summarization
Summary causes unexpected forwardingAggregate is too broad or component routes do not support the designshow ip route
show running-config | include area.*range
Correct the summary boundary and confirm component-route reachability

When diagnosing an adjacency failure, check area IDs first, then area type, interface addressing and masks, hello and dead timers, authentication, network type, passive-interface settings, and duplicate router IDs. A planned clear ip ospf process can restart OSPF after correcting configuration, but it interrupts all OSPF adjacencies and should be used carefully.

Exam-Relevant Notes

  • Area 0 is the backbone and is the normal path for inter-area routing.
  • An ABR has interfaces in Area 0 and at least one other area.
  • An ASBR redistributes routes into OSPF; it is not defined by its area membership.
  • O routes are intra-area, O IA routes are inter-area, and O E or O N routes are external categories.
  • Stub areas block Type 5 LSAs but still allow Type 3 summaries.
  • Totally stubby areas are Cisco-specific and suppress most Type 3 summaries.
  • NSSA areas permit an internal ASBR by using Type 7 LSAs.
  • An NSSA ABR can translate Type 7 LSAs into Type 5 LSAs for the rest of the OSPF domain.
  • All routers in a stub, totally stubby, NSSA, or totally NSSA area need compatible area-type configuration.
  • OSPF process IDs are locally significant; area IDs on neighboring interfaces must match.

Related CCNA Topics

For supporting concepts, review Configure OSPF, Link-State Advertisements, and the computer networking fundamentals.