From point A to point B
Point A: you know the theory of LSAs and stub areas, but you haven't seen it work in a network with several areas. Point B: by the end of this chapter you'll reconnect an isolated area with a virtual link, shrink a routing table with two commands and follow an external route from the ASBR to the last router in the domain.
- Why area 40 sees nothing and how a virtual link rescues it
- The type 5 and 4 LSAs born when you redistribute EIGRP
- Stub and totally stubby in area 40, and their bits in Wireshark
- NSSA and totally NSSA in the R2–R3 area
- The LSA 7 to LSA 5 translation and a default route that never shows up
Area 40 lives in isolation
The Day 2 topology has four areas. Area 0 joins R1 and R2. Area 32 joins R1, R7 and R8. Behind R8 sits area 40: R9, R10 and R11 on a switch, 10.10.10.0/24. Behind R2 sits R3, in the area the diagram calls 50 and the configuration calls area 10. R3 is the ASBR toward EIGRP.
Area 40 hangs off area 32, not area 0: it needs a virtual link between R8 and R1. Diagram: The House of Routing.
R8 has the full LSDB of area 32 and the type 3 LSAs from the other areas. But on R11, show ip route only shows its loopback and show ip ospf database only shows area 40. R9 and R10 see the same: every router in an area shares the LSDB. The problem is the design: every area must touch area 0, and area 40 only touches area 32.
A virtual link through area 32
The fix is a virtual link: a logical link that extends area 0 to R8 through a transit area. You need two pieces of data: the transit area, 32, and the router ID of the other ABR, R1. You don't point to an IP address. You can read the router ID with show ip ospf database, although, as Jesús says, it should already be in your documentation.
R8# show ip ospf database
! find the router ID of the other ABR (R1) and the transit area (32)
R8# configure terminal
R8(config)# router ospf 1
R8(config-router)# area 32 virtual-link 0.0.0.1
! the other end points back to R8's router ID
R1(config-router)# area 32 virtual-link 0.0.0.8
R8(config-router)# do show ip ospf virtual-links
R8(config-router)# do show ip ospf neighbor
! R1 appears with priority 0 and no DR
R1 already had its end configured, so the virtual link came up right away. show ip ospf virtual-links shows it up and FULL. In show ip ospf neighbor, R8 sees R1 with priority 0 and no DR: RFC 2328 treats a virtual link as an unnumbered point-to-point link that belongs to area 0.
The ones who needed it were R9, R10 and R11: their LSDBs grow and O IA routes appear. A participant, Peter, asked whether R1 couldn't see area 40 either. Exactly: the virtual link gives visibility in both directions.
External routes: LSA 5 and LSA 4
Before filtering, you need external routes. On R3, Jesús brings up the interface toward R4 and EIGRP comes back: 150.150.150.0/24, 160.160.160.0/24 and 170.170.170.0/24 show up as D routes. R3 was already redistributing them into OSPF; to see them as normal external routes, he removes area 10 nssa on R3 and R2. Now show ip route | include O E2 shows them on R2 and R8. The rule:
- The type 5 LSA comes from the ASBR. It carries the external prefix and travels through the whole domain, except stub areas.
- The type 4 LSA comes from the ABR. It tells its area how to reach the ASBR, because the ASBR's type 1 LSA never leaves its own area.
In R8's LSDB, the type 5 LSAs say the ASBR is R3, and the Summary ASBR, type 4, explains how to get there: it's a helper for type 5. R9, in area 40, now sees O E2 routes.
Area 40 becomes a stub
Do R9, R10 and R11 need all those routes if their only exit is R8? A default route is enough: that's a stub area, an area with a single exit. Jesús configures area 40 stub on R8 and the adjacency drops: the stub flag in the Hello no longer matches. You have to repeat the command on every router in the area.
! Stub: the same command on every router in area 40
R8(config)# router ospf 1
R8(config-router)# area 40 stub
R9(config-router)# area 40 stub
R10(config-router)# area 40 stub
R11(config-router)# area 40 stub
R11# show ip route
! O*IA 0.0.0.0/0 via 10.10.10.8, no more O E1 / O E2
! Totally stubby: add no-summary only on the ABR
R8(config-router)# area 40 stub no-summary
R11# show ip route
R11# ping 150.150.150.150
The result on R11:
- The O E1 and O E2 routes are gone: the ABR filters type 4, 5 and 7 LSAs.
- Type 1 and 2 LSAs from other areas still arrive, translated into type 3, as O IA.
- An O*IA default route via 10.10.10.8 appears, injected by R8 as type 3. The ping to 150.150.150.150 works.
What if the core has 10,000 or 20,000 O IA routes? You can filter them too: that's totally stubby. Only the ABR changes, with area 40 stub no-summary. R11's table becomes tiny: its own area and the default route. The ping still works and the router answers faster. A lot of LSA theory to end up with two commands, says Jesús, but that theory tells you when to use them.
The E-bit and the N-bit in Wireshark
Where is that stub flag? In the Options field of the Hello.
The E and N bits in the Hello must match between neighbors; in a type 7 LSA, the same position is called the P-bit. Diagram: The House of Routing.
- Regular area: E-bit set to 1. That's the capture from R7, in area 32: it accepts external routes.
- Stub and totally stubby: E-bit set to 0. That's the capture from R11: no external routes and no ASBR.
- NSSA: E-bit set to 0, because it's still a stub area, and N-bit set to 1.
Jesús warned that Wireshark may label that bit N or P depending on the version. RFC 3101 clears it up: it's a single position, N/P. In the Hello it's the N-bit and marks an NSSA router. In the header of a type 7 LSA it's the P-bit and asks the ABR to translate the LSA into type 5.
NSSA: more than one exit, no static routes
What if the area needs more than one exit? That's what the not-so-stubby area is for: it's still a stub, but it accepts an ASBR. Jesús sees this often in the field: OSPF networks full of static or floating routes, route-maps and IP SLA, because nobody dared to use NSSA. If OSPF solves it natively, why add other tools?
In an NSSA, whatever the ASBR redistributes travels as type 7: N1 or N2 routes. N1 adds the internal cost up to the ASBR; N2 doesn't. An NSSA allows LSAs 1, 2, 3 and 7, filters 4 and 5 and doesn't inject a default route on its own. That's its strength: in an area of 300 routers, you decide where the default exits.
! NSSA: the same command on every router in the area
! (area 50 in the diagram, area 10 in the configuration)
R2(config)# router ospf 1
R2(config-router)# area 10 nssa
R3(config)# router ospf 1
R3(config-router)# area 10 nssa
! Totally NSSA: add no-summary only on the ABR
R2(config-router)# area 10 nssa no-summary
R3# show ip route
! back to a plain NSSA: the default route disappears
R2(config-router)# no area 10 nssa no-summary
R2(config-router)# do show run | section router
With no-summary on the ABR, R2, the area becomes totally NSSA. One detail: R3 had a static default route, administrative distance 1, which beats any OSPF route. Once it's removed, the default injected by R2 appears on R3. According to Cisco and RFC 3101, with no-summary the ABR injects it as a type 3 LSA: you'll see it as O*IA.
When no-summary is removed, the default disappears from R3. That's where traffic engineering begins: you choose which ABR or ASBR each flow leaves through.
From LSA 7 to LSA 5
Without redistribution, R8 can't reach 150.150.150.150. R11 has its default route, but the ping fails: the default takes it to R8, and nobody in the domain knows that destination. On R3, the EIGRP networks are in the routing table but not in the LSDB. Jesús checks the process number with show run | section router eigrp and redistributes:
R3# show run | section router eigrp
R3# configure terminal
R3(config)# router ospf 1
R3(config-router)# redistribute eigrp 100 subnets
R3(config-router)# do show ip ospf database
R2# show ip ospf database nssa-external
R2# show ip route | include N2
R1# show ip route
! R2 (inside the NSSA): O N2 · R1 and R7 (outside): O E2
R11# ping 150.150.150.150
Why subnets? According to Cisco, without that keyword OSPF only redistributes major networks that aren't subnetted. With it, every subnet gets in.
The type 7 LSA never leaves the NSSA: the ABR translates it into type 5 and each router names the route after its area. Diagram: The House of Routing.
Now follow the route through the domain:
- R3 originates type 7 LSAs, as N2. In its own table they're still EIGRP routes.
- R2, inside the NSSA, sees them as O N2. Its LSDB holds the type 7 LSAs and the type 5 LSAs it originates when it translates.
- R1 and R7 see O E2: outside the NSSA, E2 is the right code, not N2.
- R11 sees none of those LSAs, but its ping now works: R8 already knows the destination.
The default route in the NSSA
Last experiment: have the ASBR, R3, advertise a default route into the NSSA. Jesús tries default-information originate, with and without always, with a static default route on R3; then redistribute connected, redistribute static subnets and area 10 nssa no-summary once more. The default never shows up on R2, and the video ends in the middle of troubleshooting. Along the way, a warning: always advertises the default even if it doesn't exist, a danger unless it's your only exit.
We won't make up the ending, but Cisco and RFC 3101 point to possible causes:
- An NSSA uses a different command.
default-information originategenerates an external default, and an NSSA has no type 5 LSAs. For a type 7 default, Cisco documentsarea 10 nssa default-information-originate; on an ASBR it requires a default route in the routing table learned from another protocol, such as a static route. no-summaryonly makes sense on the ABR. On R3 it changes nothing, and RFC 3101 makes it mutually exclusive with type 7 defaults from internal routers.- The ABR doesn't always install a type 7 default. According to RFC 3101, R2 ignores it if it arrives with the P-bit clear or if R2 itself suppresses summaries into the NSSA.
! What the class tested on R3, the ASBR inside the NSSA
R3(config)# router ospf 1
R3(config-router)# default-information originate always
R3(config-router)# no default-information originate always
R3(config-router)# default-information originate
R3(config-router)# redistribute connected
R3(config-router)# redistribute static subnets
R2# show ip route
! no default route on R2: the video ends here
! Documented by Cisco for a Type 7 default (not tested in the video)
R3(config-router)# area 10 nssa default-information-originate
Chapter 8 opens by admitting this exercise was left pending. Close it yourself in your lab.
Class videos
These are the two videos from the 2nd OSPF Marathon that this chapter covers. They were recorded live on February 13, 2021, with Cisco IOSv routers in GNS3, debug and Wireshark; the audio is in Spanish, with subtitles in Spanish, English, French and Portuguese.
- Day 2 · Part 4Virtual link, LSA types 4 and 5, stub, totally stubby and NSSA areasWatch video
- Day 2 · Part 5NSSA and totally NSSA: LSA 7 to 5 translation, redistribution and the default routeWatch video
Recorded live; Spanish audio with Spanish, English, French and Portuguese subtitles. When you play it, the video loads from YouTube. Day 2 playlist on YouTube
Test what you learned
1. Area 40 only touches area 32. What do you need to configure the virtual link on R8?
Answer. The transit area, 32, and the router ID of the other ABR, R1: area 32 virtual-link 0.0.0.1. It's not an IP address. The other end needs the matching command.
2. You configure area 40 stub on the ABR and every neighbor drops. What happened?
Answer. The Hello carries the E-bit, which is 0 in a stub area. The neighbors still send it as 1, so the adjacency doesn't form. Every router in the area needs area 40 stub.
3. R11 has a default route, but the ping to 150.150.150.150 fails. Why?
Answer. The default only takes the packet to R8. If the EIGRP networks aren't redistributed into OSPF, nobody in the domain knows how to reach the destination. Once R3 redistributes them, the ping works.
4. R2 sees a route as O N2 and R1 sees the same route as O E2. Is something wrong?
Answer. No. Type 7 LSAs live only in the NSSA. R2, as the ABR, translates them into type 5 toward area 0, and outside the NSSA the route shows as E2.
5. You add no-summary on the ABR of an NSSA. Which LSA type carries the default route it injects?
Answer. A type 3 LSA, according to Cisco and RFC 3101; that's why you see O*IA. Without no-summary, the NSSA gets no default unless you ask for one with area 10 nssa default-information-originate, which generates a type 7.
What you take away
- Every area must touch area 0. If it can't, a virtual link through a transit area, never a stub, reconnects it.
- A virtual link points to the other ABR's router ID, not to an IP. It shows priority 0 and no DR.
- The ASBR creates the type 5 LSA; the ABR creates the type 4 to say where the ASBR is.
- Stub goes on every router in the area; totally stubby only adds
no-summaryon the ABR. The E-bit set to 0 gives it away in the Hello. - An NSSA accepts an ASBR: its routes travel as type 7 (N1/N2) and the ABR translates them into type 5 (E1/E2).
- Use
subnetswhen you redistribute into OSPF, and plan two-way redistribution before you turn it on. - In an NSSA, the default route doesn't arrive on its own: decide who generates it and with which command.
Official resources
- Cisco · Understand OSPF Areas and Virtual Linkscisco.com
- Cisco · Understand OSPF Not-So-Stubby Area (NSSA)cisco.com
- Cisco · How Does OSPF Generate Default Routes?cisco.com
- Cisco · Configure Routing Protocol Redistributioncisco.com
- Cisco IOS IP Routing: OSPF Command Reference · area nssa, area stub, area virtual-link, default-information originatecisco.com
- RFC 2328 · OSPF Version 2rfc-editor.org
- RFC 3101 · The OSPF Not-So-Stubby Area (NSSA) Optionrfc-editor.org
Source and credits. Chapter written from the OSPF Masterclass that Jesús Espinoza recorded live in 2021. Text drafted with AI assistance and reviewed; original diagrams by The House of Routing. Technical details and configuration were checked against official Cisco documentation and IETF RFCs.