Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Examples: Configuring OSPF Route Summarization

Understanding OSPF Route Summarization

Area border routers (ABRs) send summary link advertisements to describe the routes to other areas. Depending on the number of destinations, an area can get flooded with a large number of link-state records, which can utilize routing device resources. To minimize the number of advertisements that are flooded into an area, you can configure the ABR to coalesce, or summarize, a range of IP addresses and send reachability information about these addresses in a single link-state advertisement (LSA). You can summarize one or more ranges of IP addresses, where all routes that match the specified area range are filtered at the area boundary, and the summary is advertised in their place.

For an OSPF area, you can summarize and filter intra-area prefixes. All routes that match the specified area range are filtered at the area boundary, and the summary is advertised in their place. For an OSPF not-so-stubby area (NSSA), you can only coalesce or filter NSSA external (Type 7) LSAs before they are translated into AS external (Type 5) LSAs and enter the backbone area. All external routes learned within the area that do not fall into the range of one of the prefixes are advertised individually to other areas.

In addition, you can also limit the number of prefixes (routes) that are exported into OSPF. By setting a user-defined maximum number of prefixes, you prevent the routing device from flooding an excessive number of routes into an area.

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:

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

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:

  1. 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
  2. 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
  3. 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/4
    user@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
  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
  5. 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
  6. 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:

user@R5# show interfaces
fe-0/0/0 {unit 0 {family inet {address 10.0.2.3/32;}}}
fe-0/0/1 {unit 0 {family inet {address 10.0.8.3/32;}}}
fe-0/0/2 {unit 0 {family inet {address 10.0.8.4/32;}}}
fe-0/0/4 {unit 0 {family inet {address 10.0.2.5/32;}}}
user@R5# show protocols ospf
area 0.0.0.0 {interface fe-0/0/0.0;interface fe-0/0/4.0;}area 0.0.0.4 {stub;area-range 10.0.8.0/28;interface fe-0/0/1.0;interface fe-0/0/2.0;}

Configuration on ABR R3:

user@R3# show interfaces
fe-0/0/0 {unit 0 {family inet {address 10.0.2.1/32;}}}
fe-0/0/1 {unit 0 {family inet {address 10.0.4.10/32;}}}
fe-0/0/2 {unit 0 {family inet {address 10.0.4.1/32;}}}
fe-0/0/4 {unit 0 {family inet {address 10.0.2.7/32;}}}
user@R3t# show protocols ospf
area 0.0.0.0 {interface fe-0/0/0.0;interface fe-0/0/4.0;}
area 0.0.0.3 {nssa {area-range 3.0.0.0/8 restrict;}area-range 10.0.4.0/28;interface fe-0/0/1.0;interface fe-0/0/2.0;}

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.

Example: Limiting the Number of Prefixes Exported to OSPF

This example shows how to limit the number of prefixes exported to OSPF.

Requirements

Before you begin:

Overview

By default, there is no limit to the number of prefixes (routes) that can be exported into OSPF. By allowing any number of routes to be exported into OSPF, the routing device can become overwhelmed and potentially flood an excessive number of routes into an area.

You can limit the number of routes exported into OSPF to minimize the load on the routing device and prevent this potential problem. If the routing device exceeds the configured prefix export value, the routing device purges the external prefixes and enters into an overload state. This state ensures that the routing device is not overwhelmed as it attempts to process routing information. The prefix export limit number can be a value from 0 through 4,294,967,295.

In this example, you configure a prefix export limit of 100,000 by including the prefix-export-limit statement.

Configuration

CLI Quick Configuration

To quickly limit the number of prefixes exported to OSPF, copy the following command and paste it into the CLI.

[edit] set protocols ospf prefix-export-limit 100000

Step-by-Step Procedure

To limit the number of prefixes exported to OSPF:

  1. Configure the prefix export limit value.

    Note: For OSPFv3, include the ospf3 statement at the [edit protocols] hierarchy level.

    [edit]user@host# set protocols ospf prefix-export-limit 100000
  2. 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.

user@host# show protocols ospf
prefix-export-limit 100000;

To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.

Verification

Confirm that the configuration is working properly.

Verifying the Prefix Export Limit

Purpose

Verify the prefix export counter that displays the number or routes exported into OSPF.

Action

From operational mode, enter the show ospf overview command for OSPFv2, and enter the show ospf3 overview command for OSPFv3.

Configuring OSPF Refresh and Flooding Reduction in Stable Topologies

The OSPF standard requires that every link-state advertisement (LSA) be refreshed every 30 minutes. The Juniper Networks implementation refreshes LSAs every 50 minutes. By default, any LSA that is not refreshed expires after 60 minutes. This requirement can result in traffic overhead that makes it difficult to scale OSPF networks. You can override the default behavior by specifying that the DoNotAge bit be set in self-originated LSAs when they are initially sent by the router or switch. Any LSA with the DoNotAge bit set is reflooded only when a change occurs in the LSA. This feature thus reduces protocol traffic overhead while permitting any changed LSAs to be flooded immediately. Routers or switches enabled for flood reduction continue to send hello packets to their neighbors and to age self-originated LSAs in their databases.

The Juniper implementation of OSPF refresh and flooding reduction is based on RFC 4136, OSPF Refresh and Flooding Reduction in Stable Topologies. However, the Juniper implementation does not include the forced-flooding interval defined in the RFC. Not implementing the forced-flooding interval ensures that LSAs with the DoNotAge bit set are reflooded only when a change occurs.

This feature is supported for the following:

  • OSPFv2 and OSPFv3 interfaces
  • OSPFv3 realms
  • OSPFv2 and OSPFv3 virtual links
  • OSPFv2 sham links
  • OSPFv2 peer interfaces
  • All routing instances supported by OSPF
  • Logical systems

To configure flooding reduction for an OSPF interface, include the flood-reduction statement at the [edit protocols (ospf | ospf3) area area-id interface interface-id] hierarchy level.

Note: If you configure flooding reduction for an interface configured as a demand circuit, the LSAs are not initially flooded, but sent only when their content has changed. Hello packets and LSAs are sent and received on a demand-circuit interface only when a change occurs in the network topology.

In the following example, the OSPF interface so-0/0/1.0 is configured for flooding reduction. As a result, all the LSAs generated by the routes that traverse the specified interface have the DoNotAge bit set when they are initially flooded, and LSAs are refreshed only when a change occurs.

[edit]
protocols ospf {area 0.0.0.0 {interface so-0/0/1.0 {flood-reduction;}interface lo0.0;interface so-0/0/0.0;}}

Note: Beginning with Junos OS Release 12.2, you can configure a global default link-state advertisement (LSA) flooding interval in OSPF for self-generated LSAs by including the lsa-refresh-interval minutes statement at the [edit protocols (ospf | ospf3)] hierarchy level. The Juniper Networks implementation refreshes LSAs every 50 minutes. The range is 25 through 50 minutes. By default, any LSA that is not refreshed expires after 60 minutes.

If you have both the global LSA refresh interval configured for OSPF and OSPF flooding reduction configured for a specific interface in an OSPF area, the OSPF flood reduction configuration takes precedence for that specific interface.

Published: 2013-07-09