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 type | Type 1, 2 | Type 3 | Type 4, 5 | Type 7 | Default route |
|---|---|---|---|---|---|
| Normal | Yes | Yes | Yes | No | Only if originated |
| Stub | Yes | Yes | Blocked | No | Type 3 from the ABR, automatic |
| Totally stubby | Yes | Blocked (except default) | Blocked | No | Type 3 from the ABR, automatic |
| NSSA | Yes | Yes | Blocked | Yes (local ASBR) | Not automatic: configure it (type 7) |
| Totally NSSA | Yes | Blocked (except default) | Blocked | Yes | Type 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.
- 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. NSSA area 2: R5 redistributes the partner's routes as type 7 LSAs, which only exist inside the NSSA.
- 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 stubOn 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-summaryno-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 nssaOn 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-originateGives 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-summaryTotally NSSA: type 3 LSAs are blocked as well, and R4 sends a type 3 default automatically.
router ospf 1
area 1 default-cost 10On the ABR: the cost of the default route it sends into a stub or NSSA (1 if not set).
How to verify it
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
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.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
O E2 route, from the type 5 that R4 created.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
show ip ospf database nssa-externalLists 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-originatetoarea X nssaon the ABR, or use totally NSSA. - Inter-area routes still present in a "totally stubby" area.
no-summarywas put on an internal router instead of the ABR.
Common mistakes
- Configuring the area type on the ABR only.
- Putting
no-summaryon 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
- Stub: no type 4/5, automatic default. Totally stubby: also no type 3 (Cisco,
no-summaryon 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
Area 1 becomes totally stubby. What does R1's OSPF routing table contain?
R5 must keep redistributing the partner's routes, but area 2 should not receive other external routes. Which area type?
You configure area 1 stub on R2 only. What happens to the R1–R2 adjacency?