Example: Configuring OSPF Stub and Not-So-Stubby Areas
This example shows how to configure OSPF stub and not-so-stubby areas to control the advertisement of external routes into an area.
Requirements
Before you begin:
- Configure network interfaces. See the Junos OS Interfaces Configuration Guide for Security Devices.
- Configure security filters. See the Junos OS Security Configuration Guide.
- Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
- Control OSPF designated router election. See Example: Controlling OSPF Designated Router Election.
- Configure a single-area OSPF network. See Example: Configuring a Single-Area OSPF Network.
- Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
Overview
The backbone area, which is 0 in Figure 1, has a special function and is always assigned the area ID 0.0.0.0. Area IDs are unique numeric identifiers, in dotted decimal notation. Area IDs need only be unique within an AS. All other networks or areas (such as 3, 7, and 9) in the AS must be directly connected to the backbone area by area border routers that have interfaces in more than one area.
In this example, you configure each device in area 7 (area ID 0.0.0.7) as a stub router because this area had no external connections. You configure each device in area 9 (area ID 0.0.0.9) as an NSSA router because this area only has external connections to static routes. See Figure 1.
Figure 20: OSPF Network Topology with Stub Areas and NSSAs

Configuration
Configuring OSPF Stub Areas
Step-by-Step Procedure
To configure OSPF stub areas:
- Configure an OSPF stub area.[edit]user@host# set protocols ospf area 0.0.0.7 stub
- If you are done configuring the device,
commit the configuration.[edit]user@host# commit

Note: Repeat Step 1 for every device in the stub area.
Configuring OSPF Not-So-Stubby Areas
Step-by-Step Procedure
To configure OSPF not-so-stubby areas:
- Configure an OSPF not-so-stubby area.[edit]user@host# set protocols ospf area 0.0.0.9 nssa
- If you are done configuring the device,
commit the configuration.[edit]user@host# commit

Note: Repeat Step 1 for every device in the NSSA.
Verification
To verify the configuration is working properly, enter the show protocols ospf command.
Related Topics
- Junos OS Feature Support Reference for SRX Series and J Series Devices
Hide Navigation Pane
Show Navigation Pane
Download
SHA1