In OSPF, what do stub, totally stubby and not-so-stubby (NSSA) areas each block, and what default route does each receive?
answer
- shrinking the database at the edge
- externals out, a default in
- a label no RFC uses
- a new LSA type for local externals
- the ImportSummaries switch
basics
~20 sStub areas block type 5 and 4 LSAs and get a type 3 default; totally stubby, an implementation option, also blocks other type 3s. An NSSA blocks 5 and 4, carries local externals as type 7, and gets a type 7 or 3 default.
solid answer
~50 sAll three exist to shrink the database of an edge area. A **stub area** (RFC 2328) admits no type 5 AS-external-LSAs and no type 4 ASBR summaries; its ABRs originate a **type 3 default summary** with cost `StubDefaultCost`, no ASBR may sit inside it and no virtual link may cross it. RFC 2328 also lets the ABR originate only a subset of type 3 summaries into a stub area; implementations call the variant that sends only the default **totally stubby**, a term no RFC uses. An **NSSA** (RFC 3101) blocks type 5 and type 4 too, but an ASBR inside it may import external routes as **type 7** LSAs, which the NSSA ABR translates to type 5 for the rest of the domain. Its ABRs must originate a default: a **type 7** default when summaries are imported (`ImportSummaries` enabled, the default), a **type 3** default when they are not.
go deeper
Recall that stub-type areas keep external routes out and give internal routers a default route toward the ABR instead.
Say exactly which LSA types each variant blocks, which default it receives, and that totally stubby is an implementation term rather than an RFC one.
Pick a variant for a given area from its exits and ASBRs, and explain the path-precision cost of suppressing summaries behind several ABRs.
Weigh database size and churn at the edge against exit choice and against the restrictions each variant puts on future designs.
## The problem these area types solve In many OSPF networks most of the database is **AS-external-LSAs** (type 5): routes redistributed from static configuration, another protocol or another AS. Type 5 LSAs flood through the whole AS, so a small edge area with one exit still stores every one of them. RFC 2328 and RFC 3101 define area types that keep them out and replace them with a **default route**. Take a 300-router network with area 0 and areas 1, 2 and 3. Area 3 is a branch region with two ABRs toward area 0 and no external connections of its own; area 1 hosts a router that redistributes a partner's static routes. ## Stub area (RFC 2328) - **Blocked:** type 5 LSAs are not flooded into or through the area, and type 4 summaries are never originated into it, since there is no external route whose ASBR would need finding. - **Kept:** types 1 and 2 inside, and the type 3 summaries for other areas' networks. - **Default:** one or more ABRs must originate a **default summary-LSA** (a type 3 for `0.0.0.0`) with cost `StubDefaultCost`, which may differ between ABRs. It floods through the stub area and no further. - **Restrictions:** no ASBR may sit inside a stub area, and virtual links cannot be configured through one. - **Agreement:** every router in the area must agree it is a stub; the Hello's E-bit carries that, and a mismatch stops neighbours from forming an adjacency. RFC 2328 suggests a stub area when there is a single exit, or when the exit need not be chosen per external destination. ## "Totally stubby" (an implementation term) RFC 2328 section 12.4.3.1 makes summary origination into a stub area **optional**: the ABR may originate all type 3 summaries, or only a subset, "possibly under configuration control". Implementations offer an option that suppresses every type 3 except the default and call the result a **totally stubby** area; no RFC uses that phrase. Routers inside then hold only their own area's topology and one default. The cost is precision: with two ABRs, an internal router no longer sees which ABR is closer to each destination in other areas, so inter-area traffic may take a longer path, though RFC 2328 notes that routing still works. ## Not-so-stubby area (RFC 3101) RFC 3101 (obsoleting RFC 1587) answers a case stub areas forbid: an edge area that must keep type 5 out but also has its **own** external connection. - **Blocked:** type 5 LSAs and type 4 summaries, as in a stub area. - **Added:** an ASBR inside the NSSA originates **type 7** LSAs, with the same layout as type 5, flooded only inside that NSSA. - **Leaving the area:** a translating NSSA ABR originates a type 5 for each type 7 that has the **P-bit** set and a non-zero forwarding address. Address ranges on the translator can aggregate several type 7s into one type 5. - **Agreement:** the Hello's N-bit must match on both neighbours, alongside the E-bit. - **Restriction:** an NSSA cannot be a transit area for a virtual link. ## The default route each one receives | Area type | Type 3 inside | Type 4 | Type 5 | Type 7 | ASBR allowed inside | Default originated by the ABR | |---|---|---|---|---|---|---| | Normal | All | Yes | Yes | No | Yes | None automatically | | Stub | All | No | No | No | No | Type 3 default | | "Totally stubby" (implementation term) | Default only | No | No | No | No | Type 3 default | | NSSA, `ImportSummaries` enabled | All | No | No | Yes | Yes | Type 7 default, P-bit clear | | NSSA, `ImportSummaries` disabled | Default only | No | No | Yes | Yes | Type 3 default | The two NSSA rows differ for a reason RFC 3101 spells out: 1. With summaries imported, the ABR's default must **not** be a type 3, or it would beat the type 7 defaults that internal ASBRs might originate. 2. With summaries suppressed, the ABR's default **should** be a type 3, because an inter-area default is preferred over an external one; that keeps traffic for other areas inside the AS rather than leaving through an internal router's type 7 default. ## Choosing between them 1. Area 3, two ABRs and no externals: a stub area, or the totally stubby variant if the smaller database matters more than the best ABR per destination. 2. Area 1, which hosts a redistributing router: a stub area is impossible because of the ASBR, so an NSSA keeps the AS-wide type 5s out while letting that router's routes reach the rest of the network. 3. Area 0: always a normal area; the backbone carries type 5 LSAs.
- Why does an OSPF NSSA with summaries suppressed get a type 3 default instead of a type 7 default?RFC 3101 wants the default from the ABR to win over any type 7 default that an internal ASBR might originate. OSPF prefers inter-area paths to external ones, so a type 3 default keeps traffic for the rest of the AS inside it. When summaries are imported, the ABR's default must be a type 7 instead, so it does not override the internal ASBRs' defaults.
- When is an OSPF stub area the wrong choice even though it shrinks the database?When routers inside need to pick the exit per external destination: with several ABRs leading toward different external connections, a single default hides which ABR is better for which prefix. It is also impossible when the area must host an ASBR or carry a virtual link; an ASBR inside points to an NSSA instead.
saying these in an interview costs you the question
- A plain OSPF stub area blocks type 3 summary-LSAs.
- Totally stubby areas are defined in the OSPF RFCs.
- An NSSA blocks every external route, so no ASBR may sit inside it.
- A stub area may host an ASBR if it redistributes only a default.
- Routers in a stub area need no default because they know every prefix.
- Type 7 LSAs flood into area 0 so the backbone learns NSSA externals.