Course menu

Course 9: OSPFLesson 6.4 (20 of 20 in this course)89 of 118 in the CCNA series

Beyond CCNA (optional). This topic is not on the CCNA 200-301 exam. It is useful at work and in later study; skip it if you are preparing for the exam. (Stub and NSSA areas are not in the single-area OSPFv2 objective (3.4).)

OSPF area types: stub, totally stubby and NSSA

Which LSAs each special area blocks, where the default route comes from, type 7 LSAs and the commands for each.

Advanced · 12 min read

What you will learn

After this lesson, you can choose an area type for a branch, predict which routes its routers keep, and configure stub, totally stubby and NSSA areas correctly.

  • Stub
  • Totally stubby
  • NSSA
  • Type 7

A special OSPF area type tells the ABR to keep some LSA types out of an area and replace them with a default route. Stub areas block external (type 5) routes; totally stubby areas also block inter-area (type 3) routes; NSSAs block outside externals but allow a local ASBR through type 7 LSAs.

In simple terms: A branch with one way out doesn't need to know every route in the company. It only needs "send everything else to the ABR", so the ABR hands it a default route instead of the full list.

A real-life situation

Area 1 is a branch: R1 and its LANs, with one link to the ABR. R1 holds every inter-area route in the company and every external route from the partner, and it can only ever send that traffic one way, to R2. All those entries cost memory and CPU on a small branch router for no benefit. A special area type lets R2 replace them with a single default route.

What the area types are

Area typeType 1, 2Type 3Type 4, 5Type 7Default route
NormalYesYesYesNoOnly if originated
StubYesYesBlockedNoType 3 from the ABR, automatic
Totally stubbyYesBlocked (except default)BlockedNoType 3 from the ABR, automatic
NSSAYesYesBlockedYes (local ASBR)Not automatic: configure it (type 7)
Totally NSSAYesBlocked (except default)BlockedYesType 3 from the ABR, automatic

Rules that apply to all of them:

  • Area 0 can't be any of these types.
  • Every router in the area must be configured with the same type, or they don't become neighbours.
  • Stub and totally stubby areas can't contain an ASBR. NSSAs exist to allow one.
  • Virtual links can't cross any of these areas.
area 1area 0area 0area 2LAN 1172.16.1.0/24R1RID 1.1.1.1R2 (ABR)RID 2.2.2.2R3RID 3.3.3.3R4 (ABR)RID 4.4.4.4R5 (ASBR)RID 5.5.5.5Partner (EIGRP)10.50.0.0/16
  1. 1. Stub area 1: R2 stops type 4 and 5 LSAs at the area border and sends R1 a default route instead. Totally stubby also stops type 3.
  2. 2. NSSA area 2: R5 redistributes the partner's routes as type 7 LSAs, which only exist inside the NSSA.
  3. 3. R4 translates: At the border, R4 turns each type 7 into a type 5 (advertised by R4) and floods it to the normal areas.

Why it works this way

A router in a branch with one exit makes the same forwarding decision for every outside destination, so the detailed routes add nothing. Removing them shrinks the LSDB and the routing table, and changes elsewhere (a partner route flapping, a new subnet in another area) no longer reach the branch at all. NSSA was added later for branches that do have something external of their own, such as a local internet link or a partner, which a plain stub area would forbid.

How to configure it on Cisco IOS

Stub

! R1 and R2 router ospf 1 area 1 stub

On every router in area 1, including the ABR. R2 then sends a default route into area 1 and stops type 4 and 5 LSAs.

Totally stubby

! R2 (ABR) only router ospf 1 area 1 stub no-summary

no-summary is only needed on the ABR; R1 keeps area 1 stub. Type 3 LSAs are now blocked too, except the default.

NSSA and totally NSSA

! R4 and R5 router ospf 1 area 2 nssa

On every router in area 2. R5 can keep redistributing the partner's routes; they become type 7 LSAs, and R4 translates them to type 5.

! R4 (ABR) router ospf 1 area 2 nssa default-information-originate

Gives area 2 a default route (as a type 7) towards R4. Without it, R5 has no route to external destinations reached through other areas.

! R4 (ABR) router ospf 1 area 2 nssa no-summary

Totally NSSA: type 3 LSAs are blocked as well, and R4 sends a type 3 default automatically.

router ospf 1 area 1 default-cost 10

On the ABR: the cost of the default route it sends into a stub or NSSA (1 if not set).

How to verify it

Example output · based on Cisco documentation; exact format varies by platform and software version
R1#show ip route ospf
Gateway of last resort is 10.1.12.2 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 10.1.12.2, 00:02:10, GigabitEthernet0/1
      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O IA     10.0.23.0/30 [110/2] via 10.1.12.2, 00:02:10, GigabitEthernet0/1
O IA     10.0.34.0/30 [110/3] via 10.1.12.2, 00:02:10, GigabitEthernet0/1
O IA     10.2.45.0/30 [110/4] via 10.1.12.2, 00:02:10, GigabitEthernet0/1
Area 1 as a stub: inter-area routes remain, the partner's O E2 10.50.0.0/16 is gone, and O*IA 0.0.0.0/0 replaces it (default cost 1 from R2 plus R1's link cost 1). As totally stubby, only the default route would remain.
Example output · based on Cisco documentation; exact format varies by platform and software version
R4#show ip route ospf | include 10.50
O N2     10.50.0.0/16 [110/20] via 10.2.45.2, 00:04:41, GigabitEthernet0/1
Inside the NSSA the partner route is N2 (NSSA external type 2, from a type 7 LSA). On R3 and R1 it appears as a normal O E2 route, from the type 5 that R4 created.
Example output · based on Cisco documentation; exact format varies by platform and software version
R4#show ip ospf | include Area|stub|NSSA|translate
    Area BACKBONE(0)
    Area 2
        It is a NSSA area
        Perform type-7/type-5 LSA translation
R4 confirms area 2 is an NSSA and that it is the translator.
show ip ospf database nssa-external

Lists the type 7 LSAs inside the NSSA, created by R5.

What goes wrong and how to troubleshoot it

  • Adjacency lost after configuring a stub. Only one router in the area was changed. The stub flag in the hellos no longer matches.
  • Redistribution stopped working after the area became a stub: stub areas can't contain an ASBR. Use an NSSA.
  • The NSSA has no default route. NSSAs don't get one automatically; add default-information-originate to area X nssa on the ABR, or use totally NSSA.
  • Inter-area routes still present in a "totally stubby" area. no-summary was put on an internal router instead of the ABR.

Common mistakes

  • Configuring the area type on the ABR only.
  • Putting no-summary on every router; it only has an effect on the ABR.
  • Expecting type 7 LSAs outside the NSSA. The ABR translates them to type 5.
  • Trying to make area 0 a stub.

Key takeaways

✅ Key takeaways
  • Stub: no type 4/5, automatic default. Totally stubby: also no type 3 (Cisco, no-summary on the ABR).
  • NSSA: no outside externals, but a local ASBR uses type 7, translated to type 5 by the ABR.
  • NSSA default route is not automatic; totally NSSA's is.
  • Every router in the area must agree on its type; area 0 can't be special.

Check yourself

Predict · scenario 1

Area 1 becomes totally stubby. What does R1's OSPF routing table contain?

Predict · scenario 2

R5 must keep redistributing the partner's routes, but area 2 should not receive other external routes. Which area type?

Predict · scenario 3

You configure area 1 stub on R2 only. What happens to the R1–R2 adjacency?

FAQ

Why must every router in a stub area be configured?
The stub setting is carried in every hello (the E-bit in the options field). Routers that disagree on whether an area is a stub don't become neighbours.
Can area 0 be a stub area?
No. The backbone must carry every type of LSA, because all inter-area traffic crosses it.
Why doesn't an NSSA get a default route automatically?
An NSSA may have its own exit (the local ASBR), so IOS doesn't assume the ABR is the way out. You add one with area X nssa default-information-originate. Totally NSSA areas do get one automatically, because their inter-area routes are removed and they need a way out.