Supported Platforms
Related Documentation
- ACX, J, M, MX, SRX, T Series
- OSPF Configuration Overview
- ACX, M, MX, T Series
- Understanding OSPF Route Summarization
- ACX, M, MX, PTX, T Series, QFabric System, QFX Series standalone switches
- Example: Limiting the Number of Prefixes Exported to OSPF
Example: Summarizing Ranges of Routes in OSPF Link-State Advertisements
This example shows how to summarize routes sent into the backbone area.
Requirements
Before you begin:
- 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 static route. See Examples: Configuring Static Routes in the Junos OS Routing Protocols Library for Routing Devices.
Overview
You can summarize a range of IP addresses to minimize the size of the backbone router’s link-state database. All routes that match the specified area range are filtered at the area boundary, and the summary is advertised in their place.
Figure 1 shows the topology used in this example. R5 is the ABR between area 0.0.0.4 and the backbone. The networks in area 0.0.0.4 are 10.0.8.4/30, 10.0.8.0/30, and 10.0.8.8/30, which can be summarized as 10.0.8.0/28. R3 is the ABR between NSSA area 0.0.0.3 and the backbone. The networks in area 0.0.0.3 are 10.0.4.4/30, 10.0.4.0/30, and 10.0.4.12/30, which can be summarized as 10.0.4.0/28. Area 0.0.0.3 also contains external static route 3.0.0.8 that you will prevent from flooding throughout the network.
Figure 1: Summarizing Ranges of Routes in OSPF

In this example, you configure the ABRs for route summarization by including the following settings:
- area-range—For an area, summarizes a range of IP addresses when sending summary intra-area link advertisements. For an NSSA, summarizes a range of IP addresses when sending NSSA link-state advertisements (Type 7 LSAs). The specified prefixes are used to aggregate external routes learned within the area when the routes are advertised to other areas.
- network/mask-length—Indicates the summarized IP address range and the number of significant bits in the network mask.
- restrict—On the NSSA ABR, prevents the configured summary from being advertised. In this example, we do not want to flood the external route outside of area 0.0.0.3.
Configuration
CLI Quick Configuration
- To quickly configure route summarization for an OSPF area,
copy the following commands and paste them into the CLI. The following
is the configuration on ABR R5:[edit] set interfaces fe-0/0/1 unit 0 family inet address 10.0.8.3set interfaces fe-0/0/2 unit 0 family inet address 10.0.8.4set interfaces fe-0/0/0 unit 0 family inet address 10.0.2.3set interfaces fe-0/0/4 unit 0 family inet address 10.0.2.5set protocols ospf area 0.0.0.4 stubset protocols ospf area 0.0.0.4 interface fe-0/0/1set protocols ospf area 0.0.0.4 interface fe-0/0/2set protocols ospf area 0.0.0.0 interface fe-0/0/0set protocols ospf area 0.0.0.0 interface fe-0/0/4set protocols ospf area 0.0.0.4 area-range 10.0.8.0/28
- To quickly configure route summarization for an OSPF NSSA,
copy the following commands and paste them into the CLI. The following
is the configuration on ABR R3:[edit] set interfaces fe-0/0/1 unit 0 family inet address 10.0.4.10set interfaces fe-0/0/2 unit 0 family inet address 10.0.4.1set interfaces fe-0/0/0 unit 0 family inet address 10.0.2.1set interfaces fe-0/0/4 unit 0 family inet address 10.0.2.7set protocols ospf area 0.0.0.3 interface fe-0/0/1set protocols ospf area 0.0.0.3 interface fe-0/0/2set protocols ospf area 0.0.0.0 interface fe-0/0/0set protocols ospf area 0.0.0.0 interface fe-0/0/4set protocols ospf area 0.0.0.3 area-range 10.0.4.0/28set protocols ospf area 0.0.0.3 nssaset protocols ospf area 0.0.0.3 nssa area-range 3.0.0.0/8 restrict
Step-by-Step Procedure
To summarize routes sent to the backbone area:
- Configure the interfaces.
Note: For OSPFv3, include IPv6 addresses.
[edit]user@R5# set interfaces fe-0/0/1 unit 0 family inet address 10.0.8.3user@R5# set interfaces fe-0/0/2 unit 0 family inet address 10.0.8.4user@R5# set interfaces fe-0/0/0 unit 0 family inet address 10.0.2.3user@R5# set interfaces fe-0/0/4 unit 0 family inet address 10.0.2.5[edit]user@R3# set interfaces fe-0/0/1 unit 0 family inet address 10.0.4.10user@R3# set interfaces fe-0/0/2 unit 0 family inet address 10.0.4.1user@R3# set interfaces fe-0/0/0 unit 0 family inet address 10.0.2.1user@R3# set interfaces fe-0/0/4 unit 0 family inet address 10.0.2.7 - Configure the type of OSPF area.
Note: For OSPFv3, include the ospf3 statement at the [edit protocols] hierarchy level.
[edit]user@R5# set protocols ospf area 0.0.0.4 stub[edit]user@R3# set protocols ospf area 0.0.0.3 nssa - Assign the interfaces to the OSPF areas.user@R5# set protocols ospf area 0.0.0.4 interface fe-0/0/1user@R5# set protocols ospf area 0.0.0.4 interface fe-0/0/2user@R5# set protocols ospf area 0.0.0.0 interface fe-0/0/0user@R5# set protocols ospf area 0.0.0.0 interface fe-0/0/4user@R3# set protocols ospf area 0.0.0.3 interface fe-0/0/1user@R3# set protocols ospf area 0.0.0.3 interface fe-0/0/2user@R3# set protocols ospf area 0.0.0.0 interface fe-0/0/0user@R3# set protocols ospf area 0.0.0.0 interface fe-0/0/4
- Summarize the routes that are flooded into the backbone.[edit]user@R5# set protocols ospf area 0.0.0.4 area-range 10.0.8.0/28[edit]user@R3# set protocols ospf area 0.0.0.3 area-range 10.0.4.0/28
- On ABR R3, restrict the external static route from leaving
area 0.0.0.3. [edit]user@R3# set protocols ospf area 0.0.0.3 nssa area-range 3.0.0.0/8 restrict
- If you are done configuring the devices, commit the configuration.[edit]user@host# commit
Results
Confirm your configuration by entering the show interfaces and the show protocols ospf commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
Configuration on ABR R5:
Configuration on ABR R3:
To confirm your OSPFv3 configuration, enter the show interfaces and show protocols ospf3 commands.
Verification
Confirm that the configuration is working properly.
Verifying the Summarized Route
Purpose
Verify that the routes you configured for route summarization are being aggregated by the ABRs before the routes enter the backbone area. Confirm route summarization by checking the entries of the OSPF link-state database for the routing devices in the backbone.
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
- ACX, M, MX, T Series
- Understanding OSPF Route Summarization
- ACX, M, MX, PTX, T Series, QFabric System, QFX Series standalone switches
- Example: Limiting the Number of Prefixes Exported to OSPF
Published: 2014-07-23
Supported Platforms
Related Documentation
- ACX, J, M, MX, SRX, T Series
- OSPF Configuration Overview
- ACX, M, MX, T Series
- Understanding OSPF Route Summarization
- ACX, M, MX, PTX, T Series, QFabric System, QFX Series standalone switches
- Example: Limiting the Number of Prefixes Exported to OSPF