Related Documentation
- ACX, J, M, MX, SRX, T Series
- OSPF Configuration Overview
- Understanding OSPF Stub Areas, Totally Stubby Areas, and Not-So-Stubby Areas
- Example: Configuring OSPF Stub and Totally Stubby Areas
Example: Configuring OSPF Not-So-Stubby Areas
This example shows how to configure an OSPF not-so-stubby area (NSSA) to control the advertisement of external routes into an area.
Requirements
Before you begin:
- Configure the device interfaces. See the Junos OS Network Interfaces Library for Routing Devices or the Junos OS Interfaces Configuration Guide for Security Devices.
- 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 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 ABRs that have interfaces in more than one area.
An OSPF stub area has no external routes, so you cannot redistribute routes from another protocol into a stub area. OSPF NSSAs allow external routes to be flooded within the area.
In addition, you might have a situation when exporting Type 7 LSAs into the NSSA is unnecessary. When an AS boundary router is also an ABR with an NSSA attached, Type 7 LSAs are exported into the NSSA by default. If the ABR is attached to multiple NSSAs, a separate Type 7 LSA is exported into each NSSA by default. During route redistribution, this routing device generates both Type 5 LSAs and Type 7 LSAs. You can disable exporting Type 7 LSAs into the NSSA.
![]() | Note: The following restriction applies to NSSAs: You cannot configure an area as both a stub area and an NSSA. |
You configure each routing device in area 9 (area ID 0.0.0.9) with the following setting:
- nssa—Specifies an OSPF NSSA. You must include the nssa statement on all routing devices in area 9 because this area only has external connections to static routes.
You also configure the ABR in area 9 with the following additional settings:
- no-summaries—Prevents the ABR from advertising summary routes into the NSSA. If configured in combination with the default-metric statement, the NSSA only allows routes internal to the area and advertises the default route into the area. External routes and destinations to other areas are no longer summarized or allowed into the NSSA. Only the ABR requires this additional configuration because it is the only routing device within the NSSA that creates Type 3 LSAs used to receive and send traffic from outside the area.
- default-lsa—Configures the ABR to generate
a default route into the NSSA. In this example, you configure the
following:
- default-metric—Specifies that the ABR generate a default route with a specified metric into the NSSA. This default route enables packet forwarding from the NSSA to external destinations. You configure this option only on the ABR. The ABR does not automatically generate a default route when attached to an NSSA. You must explicitly configure this option for the ABR to generate a default route.
- metric-type—(Optional) Specifies the external metric type for the default LSA, which can be either Type 1 or Type 2. When OSPF exports route information from external ASs, it includes a cost, or external metric, in the route. The difference between the two metrics is how OSPF calculates the cost of the route. Type 1 external metrics are equivalent to the link-state metric, where the cost is equal to the sum of the internal costs plus the external cost. Type 2 external metrics use only the external cost assigned by the AS boundary router. By default, OSPF uses the Type 2 external metric.
- type-7—(Optional) Floods Type 7 default LSAs into the NSSA if the no-summaries statement is configured. By default, when the no-summaries statement is configured, a Type 3 LSA is injected into NSSAs for Junos OS release 5.0 and later. To support backward compatibility with earlier Junos OS releases, include the type-7 statement.
The second example also shows the optional configuration required to disable exporting Type 7 LSAs into the NSSA by including the no-nssa-abr statement on the routing device that performs the functions of both an ABR and an AS boundary router.
Figure 1: OSPF Network Topology with Stub Areas and NSSAs

Configuration
- Configuring Routing Devices to Participate in a Not-So-Stubby-Area
- Disabling the Export of Type 7 Link State Advertisements into Not-So-Stubby Areas
Configuring Routing Devices to Participate in a Not-So-Stubby-Area
CLI Quick Configuration
To quickly configure an OSPF NSSA, copy the following command and paste it into the CLI. You must configure all routing devices that are part of the NSSA.
To quickly configure an ABR that participates in an OSPF NSSA, copy the following commands and paste them into the CLI.
Step-by-Step Procedure
To configure OSPF NSSAs:
- On all routing devices in the area, configure an OSPF
NSSA.
Note: To specify an OSPFv3 NSSA area, include the ospf3 statement at the [edit protocols] hierarchy level.
[edit]user@host# set protocols ospf area 0.0.0.9 nssa - On the ABR, enter OSPF configuration mode and specify
the NSSA area 0.0.0.9 that you already created.[edit ]user@host# edit protocols ospf area 0.0.0.9 nssa
- On the ABR, inject a default route into the area.[edit protocols ospf area 0.0.0.9 nssa]user@host# set default-lsa default-metric 10
- (Optional) On the ABR, specify the external metric type
for the default route.[edit protocols ospf area 0.0.0.9 nssa]user@host# set default-lsa metric-type 1
- (Optional) On the ABR, specify the flooding of Type 7
LSAs.[edit protocols ospf area 0.0.0.9 nssa]user@host# set default-lsa type-7
- On the ABR, restrict summary LSAs from entering the area.[edit protocols ospf area 0.0.0.9 nssa]user@host# set no-summaries
- If you are done configuring the devices, commit the configuration.[edit protocols ospf area 0.0.0.9 nssa]user@host# commit
Results
Confirm your configuration by entering the show protocols ospf command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
Configuration on all routing devices in the area:
Configuration on the ABR. The output also includes the optional metric-type and type-7 statements.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Disabling the Export of Type 7 Link State Advertisements into Not-So-Stubby Areas
CLI Quick Configuration
To quickly disable exporting Type 7 LSAs into the NSSA, copy the following command and paste it into the CLI. You configure this setting on an AS boundary router that is also an ABR with an NSSA area attached.
Step-by-Step Procedure
You can configure this setting if you have an AS boundary router that is also an ABR with an NSSA area attached.
- Disable exporting Type 7 LSAs into the NSSA.
Note: To specify OSPFv3, include the ospf3 statement at the [edit protocols] hierarchy level.
[edit]user@host# set protocols ospf no-nssa-abr - If you are done configuring the device, commit the configuration.[edit]user@host# commit
Results
Confirm your configuration by entering the show protocols ospf command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.
Verification
Confirm that the configuration is working properly.
Verifying the Interfaces in the Area
Purpose
Verify that the interface for OSPF has been configured for the appropriate area. Confirm that the output includes Stub NSSA as the type of OSPF area.
Action
From operational mode, enter the show ospf interface detail command for OSPFv2, and enter the show ospf3 interface detail command for OSPFv3.
Verifying the Type of OSPF Area
Purpose
Verify that the OSPF area is a stub area. Confirm that the output displays Not so Stubby Stub as the Stub type.
Action
From operational mode, enter the show ospf overview command for OSPFv2, and enter the show ospf3 overview command for OSPFv3.
Verifying the Type of LSAs
Purpose
Verify the type of LSAs that are in the area. If you disabled exporting Type 7 LSAs into an NSSA, confirm that the Type field does not include NSSA as a type of LSA.
Action
From operational mode, enter the show ospf database command for OSPFv2, and enter the show ospf3 database command for OSPFv3.
Related Documentation
- ACX, J, M, MX, SRX, T Series
- OSPF Configuration Overview
- Understanding OSPF Stub Areas, Totally Stubby Areas, and Not-So-Stubby Areas
- Example: Configuring OSPF Stub and Totally Stubby Areas
Published: 2014-07-23
Related Documentation
- ACX, J, M, MX, SRX, T Series
- OSPF Configuration Overview
- Understanding OSPF Stub Areas, Totally Stubby Areas, and Not-So-Stubby Areas
- Example: Configuring OSPF Stub and Totally Stubby Areas