OSPF area types
Every special OSPF area type answers one question: what would this router be willing to not know? Each refuses a kind of information in exchange for a smaller database and a default route toward whoever still holds the details. Ordinary areas already hide topology. A stub area refuses external routes; an NSSA lets an ASBR inside it redistribute, as Type 7 LSAs its ABR translates to Type 5.
By Arif, founder of Daveth · Updated
The full 5 min walkthrough is in Daveth Pro (Network). See what the plan opens
What this page answers
What is the difference between a stub area and an NSSA?
A stub area allows no external routes, so a router inside it cannot redistribute. An NSSA allows no Type 5 LSAs either, but external routes imported inside it travel as Type 7 LSAs, which the NSSA ABR translates to Type 5 for the rest of the domain. Read it in “A branch router that has to redistribute”
Why do OSPF areas reduce database size?
A router keeps a full topological database only for its own area and has no detailed topology outside it, so even ordinary areas hide information before any special type. Read it in “Why an area shrinks anything, before any special type”
What would you be willing to not know?
It is a strange thing to ask a router, and every special area type is an answer to it. Not a feature you switch on for performance: a decision to refuse information, in exchange for a smaller database and a default route pointing at whoever is still willing to hold the details.
Get that framing and the four types stop being a memorisation exercise.
State 1 One OSPF domain, and four different kinds of thing to refuse
Where does each kind of information in this picture come from?

Every LSA type the four restrictions name has a source in that picture, which is the only reason four types get named rather than one. CORE is a boundary router in the backbone, so it originates an external. ASBR1 is a boundary router inside area 1, which is the awkward case the whole second half of this page is about. And there are two borders out of area 1, which is where the price comes from.
Three different things are called "stub", and two of them are in this protocol. An EIGRP stub router (1.3.e.iii) is a device that announces it is non-transit so neighbours do not query it. An OSPF stub area is this page: an area that refuses certain LSAs. An OSPF stub router (1.4.f.iii) is a router advertising itself as unsuitable for transit. When a question says "stub", find out which noun it is attached to before you answer.
Why an area shrinks anything, before any special type
An area is a logical collection of OSPF networks, routers, and links that have the same area identification. A router within an area must maintain a topological database for the area to which it belongs. The router does not have detailed information about network topology outside of its area, which thereby reduces the size of its database.
Read the last clause. Reduces the size of its database: that is ordinary areas, before any special type. Areas are already an information-hiding mechanism.
And the database matters because of what is done with it: Each device in an OSPF area maintains an identical LSDB, and it is Used by each OSPF device to calculate the best path to each destination based on cost, using the information in the LSDB.
Identical on every device in the area, and every device runs the calculation over it. So database size is not a storage concern. It is the input to a computation that every router in the area repeats, and shrinking it shrinks work everywhere at once.
Two roles to name, and note whose definition this is. "An OSPF-enabled device is classified as an Area Border Router (ABR) if it has interfaces in more than one OSPF area and at least one interface in Area 0." and "A device is classified as an Autonomous System Boundary Router (ASBR) if it has one interface connected to an OSPF network and at least one interface connected to a non-OSPF network."
Look carefully at the first one: and at least one interface in Area 0. Not merely interfaces in two areas. That is the definition and it is stricter than the loose version most people carry, which is exactly the sort of difference an exam question is built on.
Rung one, and rung two
What does R1 hold while area 1 is ordinary? A router entry for each of the area's four routers, the other area's networks from both borders, where the remote boundary router is (again from both borders), and that router's external:
Computed by this course, not captured from R1: the scenario's state, in the layout of show ip ospf database.
R1# show ip ospf database
OSPF Router with ID (10.255.0.1) (Process ID 1)
router (Area 1)
Link ID ADV Router
10.255.0.1 10.255.0.1
10.255.0.2 10.255.0.2
10.255.0.3 10.255.0.3
10.255.0.4 10.255.0.4
summary: Type 3 (Area 1)
Link ID ADV Router
10.0.1.0 10.255.0.3
10.0.1.0 10.255.0.4
10.0.2.0 10.255.0.3
10.0.2.0 10.255.0.4
asbr-summary: Type 4 (Area 1)
! where the boundary router outside this area lives
Link ID ADV Router
10.255.0.5 10.255.0.3
10.255.0.5 10.255.0.4
external: Type 5 ! and the external it advertised
Link ID ADV Router
203.0.113.0 10.255.0.5"No Type 4 or 5 AS-external LSAs allowed."
The line goes on every router in area 1, not just one: R1, ASBR1 and both borders. Here it is on ABR1:
ABR1# configure terminal ABR1(config)# router ospf 1 ABR1(config-router)# area 1 stub ! the same line on R1, ASBR1 and ABR2 ABR1(config-router)# end
So what did R1 stop receiving? Read the headings that are missing, and the last two lines:
Computed by this course, not captured from R1: the scenario's state, in the layout of show ip ospf database.
R1# show ip ospf database
OSPF Router with ID (10.255.0.1) (Process ID 1)
router (Area 1)
Link ID ADV Router
10.255.0.1 10.255.0.1
10.255.0.2 10.255.0.2
10.255.0.3 10.255.0.3
10.255.0.4 10.255.0.4
summary: Type 3 (Area 1)
Link ID ADV Router
10.0.1.0 10.255.0.3
10.0.1.0 10.255.0.4
10.0.2.0 10.255.0.3
10.0.2.0 10.255.0.4
0.0.0.0 10.255.0.3
! and these arrived in their place, one from each border
0.0.0.0 10.255.0.4The external is gone, and so are both entries saying where the router that injected it lives. In their place, a default route from each border. That is the trade, and it is the trade in all four types: you give up specific knowledge and receive a pointer to somebody who still has it.
Predict the next rung before you read it. If stub refuses external LSAs, what does the rung above it refuse?
"No Type 3, 4 or 5 LSAs allowed except the default summary route." Type 3 as well: the summaries describing other areas.
This keyword goes on the two borders only. R1 and ASBR1 keep area 1 stub, because the borders are the routers that write the summaries:
ABR1# configure terminal ABR1(config)# router ospf 1 ABR1(config-router)# area 1 stub no-summary ! the same on ABR2 ABR1(config-router)# end
What is left in R1's database now? Look under the summary heading:
Computed by this course, not captured from R1: the scenario's state, in the layout of show ip ospf database.
R1# show ip ospf database
OSPF Router with ID (10.255.0.1) (Process ID 1)
router (Area 1)
Link ID ADV Router
10.255.0.1 10.255.0.1
10.255.0.2 10.255.0.2
10.255.0.3 10.255.0.3
10.255.0.4 10.255.0.4
summary: Type 3 (Area 1)
! two entries left under this heading, a default from each border
Link ID ADV Router
0.0.0.0 10.255.0.3
0.0.0.0 10.255.0.4Its own area's routers and a default from each border. Nothing else. And no-summary is the giveaway: no Type 3 summaries. Which makes the naming learnable rather than arbitrary: stub refuses externals, stub no-summary refuses externals and summaries.
A branch router that has to redistribute
Now the situation that produces the need. A branch area, small routers, small databases: a textbook stub area. Except ASBR1, inside it, has one non-OSPF network that has to be redistributed into OSPF. That makes it a boundary router, sitting inside an area whose whole purpose is not having external routes in it.
Turn the redistribution on. Did 172.16.5.0/24 reach R1's database? Ask for the externals by name:
Computed by this course, not captured from R1: the scenario's state, in the layout of show ip ospf database external.
R1# show ip ospf database external
OSPF Router with ID (10.255.0.1) (Process ID 1)
external: Type 5
Link ID ADV Router
(nothing) ! nothing: the external has not entered the areaStub cannot express it. It is one switch controlling two things: refusing to receive externals, and refusing to originate them, and those are different requirements.
"No Type 5 AS-external LSAs allowed, but Type 7 LSAs that convert to Type 5 at the NSSA ABR can traverse."
Every router in the area changes again. The stub line comes out in its no form and the NSSA line goes in:
ABR1# configure terminal ABR1(config)# router ospf 1 ABR1(config-router)# no area 1 stub ABR1(config-router)# area 1 nssa ! the same two lines on R1, ASBR1 and ABR2 ABR1(config-router)# end
"External routing information is imported into an NSSA in Type-7 LSAs." Type 7 is an external route that is allowed to exist inside an NSSA. It travels to the area border, and then: "In order to further propagate the NSSA external information, the Type-7 LSA must be translated to a Type-5 AS-external-LSA by the NSSA ABR."
State 2 The same prefix, on both sides of the border
Which LSA type carries 172.16.5.0/24 inside the area, and which carries it outside?

Computed by this course, not captured from R1: the scenario's state, in the layout of show ip ospf database nssa-external.
R1# show ip ospf database nssa-external
OSPF Router with ID (10.255.0.1) (Process ID 1)
nssa-external: Type 7
Link ID ADV Router
172.16.5.0 10.255.0.2 ! inside the area, a Type 7Computed by this course, not captured from CORE: the scenario's state, in the layout of show ip ospf database external.
CORE# show ip ospf database external
OSPF Router with ID (10.255.0.5) (Process ID 1)
external: Type 5
Link ID ADV Router
203.0.113.0 10.255.0.5
172.16.5.0 10.255.0.4
! outside it, an ordinary Type 5, and read who advertised itTranslated at the border. The rest of the OSPF domain never sees a Type 7. It sees an ordinary Type 5, and the advertising router is ABR2 (10.255.0.4) rather than ASBR1: the border originated it. Type 7 exists only inside the NSSA, which is precisely why the area can carry it while still refusing Type 5.
Why ABR2, when both borders are NSSA borders? Only one of them translates. RFC 3101 elects the NSSA border with the highest router ID, unless one is configured to translate always, and neither is here: 10.255.0.4 beats 10.255.0.3.
And yes: "not so stubby" is what a design committee produces when it has to name an exception to a thing already called "stub". The name is silly and it tells you exactly what the feature is, which is more than most acronyms manage.
The fourth type is the obvious combination, with the obvious command: "No Type 3, 4 or 5 LSAs except the default summary route, but Type 7 LSAs that convert to Type 5 at the NSSA ABR are allowed."
Like stub no-summary, it goes on the borders; R1 and ASBR1 keep area 1 nssa:
ABR1# configure terminal ABR1(config)# router ospf 1 ABR1(config-router)# area 1 nssa no-summary ! the same on ABR2 ABR1(config-router)# end
Continue the lesson
The whole lesson, with its drawings and its questions. 6 more sections after the ones above.



