In this lesson, I’ll explore the different types of stub areas in OSPF and their configurations on Juniper routers. Stub areas help simplify routing tables by reducing the number of routes that a router in a specific area must maintain. This is particularly useful in OSPF multi-area configurations where certain areas do not need full routing information.
Types of Stub Areas
There are four types of stub areas in OSPF:
1. Stub Area
Definition: A standard stub area blocks Type 5 LSAs, preventing external routes from entering the area. The routers in the stub area receive a default route from the Area Border Router (ABR) to reach external networks.
R1# set protocols ospf area 1 stub
R1# commit
R2# set protocols ospf area 1 stub
R2# commit
Key Points:
- External routes (Type 5 LSAs) are blocked.
- A default route is injected by the ABR for external connectivity.
2. Totally Stubby Area
Definition: A Totally Stubby Area blocks both Type 5 LSAs and inter-area routes (Type 3 LSAs). Routers in this area only receive a default route from the ABR for all external and inter-area destinations.
R1# set protocols ospf area 1 stub no-summary
R1# commit
R2# set protocols ospf area 1 stub no-summary
R2# commit
Key Points:
- Blocks both Type 5 (external) and Type 3 (inter-area) LSAs.
- Only a default route is injected for all destinations.
3. Not-So-Stubby Area (NSSA)
Definition: An NSSA allows for the injection of external routes (Type 7 LSAs) within the area, but these LSAs are not propagated beyond the NSSA. Instead, they are translated into Type 5 LSAs by the ABR when leaving the NSSA.
R1# set protocols ospf area 1 nssa
R1# commit
R2# set protocols ospf area 1 nssa
R2# commit
Key Points:
- Allows external routes within the NSSA (Type 7 LSAs).
- Type 7 LSAs are translated into Type 5 LSAs by the ABR.
4. Totally NSSA
Definition: A Totally NSSA blocks both Type 5 and Type 3 LSAs, similar to a Totally Stubby Area. However, it allows Type 7 LSAs within the NSSA.
R1# set protocols ospf area 1 nssa no-summary
R1# commit
R2# set protocols ospf area 1 nssa no-summary
R2# commit
Key Points:
- Blocks Type 5 LSAs and Type 3 LSAs (inter-area routes).
- Allows Type 7 LSAs for external routes within the NSSA.
Configuration Notes
To configure a stub area in Juniper routers:
- Configure the stub settings on all routers in the area, including the ABR.
- Ensure that Area 0 is never configured as a stub area.
- Use the appropriate keywords like
stub
,no-summary
, ornssa
depending on the type of stub area.
Lab Scenario
I have now to apply the theory that we have learned about the stub areas. I will apply it in a lab and show you the four different stub areas to see what would be the result once we configure an area as a stub or any of the other types of stub areas. As you can see here, we have a lab of four points. Before I start doing those points, as usual, I’ll go back to the scenario to show you what we need to do and then come back to the points to start working on them.
This is my scenario. I’m still on the same lab so OSPF is running, everything is fine here, and the virtual link is configured. Everything we’ve done so far in this course is still in place. What I want to do now is make Area 2 a stub area. I’ll configure it as a stub, totally stubby, NSSA, and totally NSSA. For this, I must configure the routers (R3 and R4) that connect Area 2. Once the area type is set, I’ll check the routing table on R4 to verify the results.
Configuration Steps
Point 1: Make Area 2 a Stub Area and Check the Routes
First, remember that when an area is a stub area:
- Type 5 (external LSAs) will not be present.
- No ASBR (Autonomous System Boundary Router) is allowed in the area.
Since Area 2 does not have an ASBR, it meets the stub area requirements. Let’s configure Area 2 as a stub area and verify the changes.
R4# show ospf database
OSPF Database, Area 0.0.0.2
Router Link States (Area 0.0.0.2)
Link ID ADV Router Age Seq# Checksum Link count
4.4.4.4 4.4.4.4 300 0x80000001 0x00F12D 2
3.3.3.3 3.3.3.3 280 0x80000015 0x00A932 3
Network Link States (Area 0.0.0.2)
Link ID ADV Router Age Seq# Checksum
192.168.34.0 4.4.4.4 200 0x8000002A 0x00BB21
Type-5 External Link States
Link ID ADV Router Age Seq# Checksum
0.0.0.0 10.10.10.1 150 0x80000003 0x006F3A
As seen in the output above, the external LSA (Type 5) and the default route are visible in R4’s OSPF database. Once Area 2 is configured as a stub area, these external LSAs should disappear.
Step 1: Configure Stub Area
R3# edit protocols ospf
[edit protocols ospf]
R3# set area 2 stub
R3# commit
R4# edit protocols ospf
[edit protocols ospf]
R4# set area 2 stub
R4# commit
Now that Area 2 is configured as a stub, let’s check R4’s OSPF database again to verify the absence of Type 5 LSAs.
R4# show ospf database
OSPF Database, Area 0.0.0.2
Router Link States (Area 0.0.0.2)
Link ID ADV Router Age Seq# Checksum Link count
4.4.4.4 4.4.4.4 300 0x80000001 0x00F12D 2
3.3.3.3 3.3.3.3 280 0x80000015 0x00A932 3
Network Link States (Area 0.0.0.2)
Link ID ADV Router Age Seq# Checksum
192.168.34.0 4.4.4.4 200 0x8000002A 0x00BB21
The output shows that Type 5 LSAs are no longer present in the OSPF database. This confirms that Area 2 is now a stub area.
Point 2: Make Area 2 a Totally Stubby Area
In a Totally Stubby Area, not only are Type 5 LSAs excluded, but also inter-area routes (Type 3 LSAs) are replaced with a default route.
R3# edit protocols ospf
[edit protocols ospf]
R3# set area 2 stub no-summaries
R3# commit
R4# edit protocols ospf
[edit protocols ospf]
R4# set area 2 stub no-summaries
R4# commit
Let’s verify the routing table on R4:
R4# show route
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
0.0.0.0/0 [OSPF/110] 00:00:04, metric 3, tag 0
> to 192.168.34.3 via fe-0/0/3
The routing table now shows only a default route (0.0.0.0/0) and no inter-area routes. This confirms that Area 2 is now a Totally Stubby Area.
Point 3: Configure Area 2 as NSSA
In an NSSA (Not So Stubby Area), Type 5 LSAs are replaced with Type 7 LSAs to allow for external routes.
R3# edit protocols ospf
[edit protocols ospf]
R3# set area 2 nssa
R3# commit
R4# edit protocols ospf
[edit protocols ospf]
R4# set area 2 nssa
R4# commit
Check R4’s OSPF database for Type 7 LSAs:
R4# show ospf database
Type-7 NSSA External Link States
Link ID ADV Router Age Seq# Checksum
0.0.0.0 4.4.4.4 150 0x80000003 0x0072FA
The output confirms the presence of Type 7 LSAs in Area 2.
Point 4: Configure Area 2 as Totally NSSA
In a Totally NSSA, Type 5 LSAs are replaced with Type 7 LSAs, and inter-area routes (Type 3 LSAs) are replaced with a default route.
R3# edit protocols ospf
[edit protocols ospf]
R3# set area 2 nssa no-summaries
R3# commit
R4# edit protocols ospf
[edit protocols ospf]
R4# set area 2 nssa no-summaries
R4# commit
Verify the routing table on R4:
R4# show route
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
0.0.0.0/0 [OSPF/110] 00:00:04, metric 3, tag 0
> to 192.168.34.3 via fe-0/0/3
Type-7 NSSA External Link States
Link ID ADV Router Age Seq# Checksum
0.0.0.0 4.4.4.4 150 0x80000003 0x0072FA
The routing table now includes a default route and Type 7 LSAs. This confirms that Area 2 is configured as a Totally NSSA.
Conclusion
In this lab, we have successfully configured the four types of stub areas (Stub, Totally Stubby, NSSA, Totally NSSA) and verified the resulting OSPF databases and routing tables. Understanding these configurations helps in optimizing OSPF networks by controlling the flow of LSAs.
0 Comments