OSPF area types: stub, totally stubby, NSSA

A branch area with one way out does not need every route in the domain. A stub area blocks external routes, LSA types 4 and 5, and the ABR sends a default route instead; a totally stubby area also blocks type 3s. An NSSA is a stub with an ASBR of its own: its externals travel as type 7 LSAs, which the ABR translates into type 5s.

In Daveth Pro (Network)7 min video · lab: EIGRP beside OSPF

By , founder of Daveth · Updated

Opening frame of the video walkthrough of OSPF area types: stub, totally stubby, NSSA

Watch this lesson

7 min · Video walkthrough

In Daveth Pro (Network)

The full 7 min walkthrough is in Daveth Pro (Network). See what the plan opens

Upcoming practical lab

Lab E5: EIGRP beside OSPF

What the lab covers

What this page answers

How do you configure an OSPF stub area?

area area-id stub on every router in the area, because they all have to agree it is a stub. The ABR then advertises a default route, 0.0.0.0/0, into the area as a type 3 LSA. Read it in “4.1 Why an area might want to know less”

How do you configure a totally stubby area?

As a stub, with no-summary added on the ABR only, as in area 1 stub no-summary, because it is the ABR that stops sending the type 3 summaries. Read it in “4.1 Why an area might want to know less”

What is an OSPF NSSA (not-so-stubby area)?

A stub area that may have an ASBR. The ASBR imports external routes as type 7 LSAs, flooded only within the NSSA; the NSSA's ABR translates them into type 5s for the rest of the domain. area area-id nssa default-information-originate sends a type 7 default into it. Read it in “4.1 Why an area might want to know less”

What are the limits of an OSPF stub area?

No virtual links through it, no ASBR inside it, and the backbone itself cannot be one. Read it in “4.1 Why an area might want to know less”

4.1 Why an area might want to know less

In 02-4, every ABR handed each area type 3 notes for every network elsewhere, type 4 notes about routers that redistribute, and let type 5 external routes flood everywhere. For a branch area with one way out, most of that is wasted: whatever the destination, the answer is "towards the ABR". If you scaled that down to a cul-de-sac, it's every house keeping a printed map of the whole country when the only road out goes one way.

OSPF's answer is a handful of special area types, which trade detail for a default route. The guide mentions them only in passing: type 7, "NSSA external", in its list of LSA types, the N1/N2 codes in its routing-table legends, and "area type flags must match" among the adjacency requirements, with the note that they aren't discussed in the book.

A whole family of area types, and the youngest one's only appearance in the guide's routing tables is a pair of codes, N1 and N2, in the legend. Blink and you'd take them for seat numbers.

So this lesson is built from RFC 2328, RFC 3101 and Cisco's own documents. Think about the last time you packed for a weekend away: you didn't take the whole wardrobe, just what the trip needed and a card with the hotel's number for anything else. Every area type below is a different packing list.

A stub area keeps out type 5 LSAs, the external routes redistributed from outside OSPF. Its routers reach every external destination through a default instead, which shrinks their LSDB and their memory needs. The ABR provides that default: it advertises 0.0.0.0/0 into the area as a type 3 summary LSA, flooded in that area and no further, with a cost you can set (the stub default cost). Consider it your street's one signpost at the corner: "everywhere else: this way".

When does that make sense? When the area has one exit, or when it doesn't matter which exit an external destination uses. Type 4 LSAs go too: they only help find a redistributing router, and a stub area never needs to, so Cisco's summary is that a stub blocks types 4 and 5.

Every router in the area has to agree it's a stub. The hello carries a flag (the E-bit) saying whether the area takes external routes, and if two neighbours disagree the hello is dropped and no neighbour forms: that's the "area type flags" item on 02-2's checklist. Have you ever noticed how a door intercom only lets you in when both sides agree who you are? One router set to stub and its neighbour not, and the door simply never opens. A stub area also has three hard limits: no virtual links through it, no ASBR inside it, and the backbone itself can't be one.

A stub area is the only neighbourhood where telling the residents less about the outside world still gets them there, just not always by the shortest road.

A totally stubby area goes a step further: no type 3, 4 or 5 LSAs at all, except the default summary route. The area's own type 1 and type 2 LSAs still flood inside it as in any area (02-4), so its routers know their own area in full and nothing else, just "everything that isn't here: that way". It's basically like a holiday cottage with one sign at the end of the lane: no road atlas, no street names for the next village, just "Town →". RFC 2328 allows exactly this: an ABR may send a stub area only a subset of the summaries, which makes the LSDB smaller at the risk of less-than-optimal inter-area routing. With a single exit, that risk is zero, since every path leaves by the same door anyway.

Beyond its own area, a totally stubby router's view of the world is one line long. Most of us have been on that holiday.

Cisco's configuration shows who does the work. area area-id stub goes on every router in the area; the keyword no-summary, as in area 1 stub no-summary, goes on the ABR only, because it's the ABR that stops sending the summaries. Think about the last time you forwarded only the one email that mattered from a long thread: the colleague still gets the point, without the forty replies. The default's cost is area area-id default-cost cost on the ABR, 1 unless you change it.

Before D1, predict: in a totally stubby area, how many routes to Area 0's networks does the branch router hold?

D1

Network drawing: R1, R2, R3, Area 1, Area 0, 10.1.12.0/24, 10.0.23.0/24, 10.1.1.0/24, 10.0.3.0/24, 203.0.113.0/24 (ISP), R2 sends: type 3s, a type 4, and R3’s type 5 floods through
A normal area: R1 holds every type 3 for Area 0’s networks, a type 4 to find R3, and R3’s type 5 external route. It needs none of that to leave by R2, its only exit.

Now the awkward case. The branch is a stub in every way, except it has its own connection to the outside, say a local Internet link or a partner's network, redistributed into OSPF by a router inside the area. A stub can't do that: no ASBR allowed. A not-so-stubby area (NSSA) can. Its ASBR imports the external routes as type 7 LSAs, and type 7s are flooded only within the NSSA. At the border, the NSSA's ABR translates them into type 5 LSAs for the rest of the domain; with several NSSA ABRs, one translates, the one with the highest router ID. It works behind the scenes just like a post room for a gated estate: parcels a resident sends out get a local "estate post" sticker inside the gates and are re-labelled for the national service at the gatehouse.

Membership is agreed the same way as a stub's, with its own hello flag (the N-bit): disagree and the hello is dropped. Type 5 LSAs still stay out, type 4s aren't sent in either, and like a stub, an NSSA can't be a transit area or the backbone. Inside the area, those routes show with the NSSA codes, N1 or N2; everywhere else, after translation, they're ordinary externals, E1 or E2.

Here's the trap. RFC 3101 recommends that an NSSA's ABR originate a default into the area, but IOS doesn't do it unless you ask. You ask with area area-id nssa default-information-originate, which sends a type 7 default into the area. On the ABR that works with or without a default route of its own; on an ASBR inside the NSSA it needs one in its own routing table first. And the ABR's type 7 default is never translated into a type 5. If you've ever moved into a flat where the landlord says "post goes to the office" but never tells you where the office is, you know the result: the NSSA's routers reach every other area, and nothing beyond.

Before D2, predict: the NSSA's ASBR redistributes 192.168.50.0/24. What does R3, in Area 0, see it as?

D2

  1. Network drawing: R1, R2, R3, Area 1, Area 0, 203.0.113.0/24 (ISP), 192.168.50.0/24 (partner)

    Step 1 of 5 Area 1 is NSSA. R1 redistributes its partner's 192.168.50.0/24. A stub would forbid that; an NSSA allows it.

  2. Network drawing: R1, R2, R3, Area 1, Area 0, 203.0.113.0/24 (ISP), 192.168.50.0/24 (partner), type 7 · 192.168.50.0/24

    Step 2 of 5 R1 originates a type 7 LSA. It floods only inside the NSSA, so it reaches R2 and stops at the area’s edge.

  3. Network drawing: R1, R2, R3, Area 1, Area 0, 203.0.113.0/24 (ISP), 192.168.50.0/24 (partner), type 7 · 192.168.50.0/24, type 5 · 192.168.50.0/24

    Step 3 of 5 R2, the NSSA ABR (the highest RID, if there were several), translates it into a type 5 and floods it into Area 0. Same route, new label.

  4. Network drawing: R1, R2, R3, Area 1, Area 0, 203.0.113.0/24 (ISP), 192.168.50.0/24 (partner), type 7 · 192.168.50.0/24, type 5 · 192.168.50.0/24, R2 → Area 1: no default

    Step 4 of 5 And the other direction: a plain NSSA gets no default. R1 reaches Area 0’s networks through their type 3s, but the ISP route is out of reach.

  5. Network drawing: R1, R2, R3, Area 1, Area 0, 203.0.113.0/24 (ISP), 192.168.50.0/24 (partner), type 7 · 192.168.50.0/24, type 5 · 192.168.50.0/24, R2 → Area 1: no default

    Step 5 of 5 The result. Inside the NSSA the partner route is N2 (from a type 7); in Area 0 it’s E2 (from the type 5 R2 made).

"Not-so-stubby" is the rare protocol name that tells you exactly how committed it is.

Add no-summary to an NSSA and you get a totally NSSA (Cisco's "NSSA totally stub"): no type 3 (except the default), 4 or 5 LSAs, but its own type 7s still come and go through the translator. And the default comes for free this time: the ABR injects it as a type 3 summary, and a type 3 default is preferred over any type 7 default an internal ASBR might send, which keeps traffic for the rest of OSPF heading to the ABR. That's roughly equivalent to a letterbox that stops taking the neighbourhood newsletter and gets one card instead: "for anything else, ask at reception".

You can think of it as the holiday cottage again, but with a little shop in the front room that orders its stock direct: the lane's one sign still says "Town →", and the shop's own deliveries still come and go through the gate.

A totally NSSA knows nothing about the network except its own area, one way out, and its private back door. Very self-contained, like a cat.

Here's all four side by side, and where each command goes:

Area typeKeeps outDefault into the areaOn every router in the areaExtra, on the ABR only
Stubtypes 4, 5type 3, automaticarea 1 stub-
Totally stubbytypes 3 (except default), 4, 5type 3, automaticarea 1 stubarea 1 stub no-summary
NSSAtypes 4, 5 (type 7 allowed)none, unless area 1 nssa default-information-originate (type 7)area 1 nssadefault-information-originate if needed
Totally NSSAtypes 3 (except default), 4, 5 (type 7 allowed)type 3, automaticarea 1 nssaarea 1 nssa no-summary

The NSSA command has to go on every single router in the area, just as area stub does. Its full form carries the options this lesson uses and two more: area area-id nssa [no-redistribution] [default-information-originate [metric] [metric-type]] [no-summary] [nssa-only], as the command reference lists it (metric and metric-type take values; their exact form is unconfirmed). no-redistribution is for an ABR that is also an ASBR and should put its redistributed routes into the normal areas only. Notice the split in the table: the area type goes everywhere, the no-summary goes on the ABR, just like when you tell only the office manager to stop forwarding the weekly newsletter: everyone still agrees which office they're in, but only the person who forwards things needs the instruction.

A mismatch is easy to spot: the neighbour simply isn't there, because the hello's E-bit or N-bit disagrees and it's dropped. That's roughly equivalent to two drivers arguing about whether the street is one-way: until they agree, nobody moves. Check the LSDB with show ip ospf database (02-4) for the types that should be gone, and show ip route for the default. The stub default shows as an interarea route with the default marker, O*IA 0.0.0.0/0, and an NSSA's type 7 default as O*N2 (unconfirmed).