CCNA online course

OSPF Route Summarization for CCNA

Learn how to configure and verify OSPF route summarization on Cisco IOS using ABR area range and ASBR summary-address commands.

OSPF route summarization is the process of advertising one aggregate prefix instead of several more-specific prefixes. For example, four consecutive /24 networks can be represented by one /22 route. This reduces routing information while preserving reachability when the summary is designed correctly.

This lesson covers inter-area summarization on an Area Border Router (ABR), external summarization on an Autonomous System Boundary Router (ASBR), prefix calculation, verification, and common design problems.

Prerequisites

  • IPv4 addressing, subnet masks, and CIDR notation
  • Longest-prefix-match route selection
  • Basic Cisco IOS configuration modes
  • Basic OSPF neighbors, areas, and router roles
  • Basic route redistribution

What Is OSPF Route Summarization?

Route summarization, also called aggregation, combines contiguous address blocks into a less-specific route. A summary route covers the address space of several component routes.

For example, these networks are adjacent:

  • 10.10.0.0/24
  • 10.10.1.0/24
  • 10.10.2.0/24
  • 10.10.3.0/24

They fit exactly inside 10.10.0.0/22, with mask 255.255.252.0. A router can advertise the /22 instead of all four /24 routes.

Benefits

  • Smaller routing tables: receiving routers store fewer entries.
  • Fewer advertised LSAs: other areas or routing domains receive fewer prefixes.
  • Less SPF processing: changes to individual component routes are less likely to trigger processing throughout the network.
  • Less routing-update processing: routers handle fewer route entries and advertisements.
  • Better scalability: hierarchical addressing and summarization help large OSPF designs grow.

Trade-offs

A summary hides detail. Remote routers may no longer learn which individual component network failed. If the aggregate is too broad or incorrectly placed, traffic can be sent toward a destination that does not exist or uses a different path. A Cisco IOS discard route associated with an aggregate can then drop the traffic rather than allowing a routing loop.

Where OSPF Summarization Happens

OSPF does not perform automatic route summarization. Unlike EIGRP, which supports automatic and manual summarization at interfaces, OSPF requires explicit configuration at defined boundaries. RIP's historical classful behavior is also different from OSPF summarization.

Internal OSPF routes can be summarized only at an ABR, which connects two or more OSPF areas. Redistributed routes can be summarized only at an ASBR, which introduces routes from another source into OSPF.

Routers do not summarize intra-area routes inside the same area through normal OSPF area summarization. All routers in an area generally need the detailed intra-area topology and prefixes.

Route categorySummarizing router roleCisco IOS commandOSPFv2 LSA effectScope
Internal routes from one areaABRarea rangeType 3 Summary LSAAdvertised between areas
Redistributed external routesASBRsummary-addressType 5 AS-External LSA in normal areasAdvertised as external OSPF routes
Intra-area routesNo normal OSPF summarization boundaryNot summarized with area rangeDetailed intra-area LSAs remainWithin the same area

Inter-Area Summarization at an ABR

An ABR connects areas and can combine routes learned from one attached area before advertising them into another area. The area whose routes are being summarized is called the source area in the configuration.

In OSPFv2, an ABR advertises an inter-area summary using a Type 3 Summary LSA. Cisco routing-table output commonly identifies the resulting route with O IA.

ABR Configuration

Suppose an ABR connects Area 10 to Area 0. Area 10 contains 10.10.0.0/24 through 10.10.3.0/24. Configure the summary under the OSPF routing process:

router ospf 1
 area 10 range 10.10.0.0 255.255.252.0

The area number, 10, identifies the area containing the component routes. The command belongs on the ABR, not on a router that is internal only to Area 10.

When the range matches routes from Area 10, the ABR can advertise 10.10.0.0/22 to Area 0 and other connected areas instead of advertising each component prefix separately.

Setting a Summary Cost

A summary has an OSPF cost. IOS can derive a cost based on the component routes, but a design may require a predictable manually assigned metric:

router ospf 1
 area 10 range 10.10.0.0 255.255.252.0 cost 50

A manual cost can make path selection consistent or prevent a summary's metric from changing when individual component costs change. Choose the value according to the intended path and compare it with competing routes.

Suppressing a Matching Range

The not-advertise option suppresses a matching range rather than advertising a reachable aggregate:

router ospf 1
 area 10 range 10.10.0.0 255.255.252.0 not-advertise

Use this only when suppression is the goal. It does not create a summary route that remote routers can use for reachability.

External Summarization at an ASBR

An ASBR redistributes routes from another source, such as static, connected, or another routing protocol, into OSPF. These redistributed routes are external to the OSPF domain.

An ASBR can aggregate matching redistributed routes with summary-address. In normal OSPFv2 areas, the resulting external advertisement is represented through Type 5 AS-External LSAs. Cisco routers commonly display the resulting route as O E1 or O E2.

router ospf 1
 summary-address 172.16.0.0 255.255.252.0

For example, the ASBR might redistribute several static networks and summarize them:

router ospf 1
 redistribute static subnets
 summary-address 172.16.0.0 255.255.252.0

The summary applies to routes that are actually redistributed into OSPF and covered by the configured aggregate. It does not summarize ordinary internal OSPF routes learned from an area.

External metrics can be E1 or E2. An E1 metric includes the internal OSPF cost to reach the ASBR plus the external metric. An E2 metric primarily uses the external metric, with internal cost used as a tiebreaking consideration. Redistribution policy can also set the metric and metric type.

On IOS platforms that support it, not-advertise can suppress matching external advertisements. Confirm the exact behavior and available syntax for the platform and release before using it in production.

Featurearea rangesummary-addressConfiguration locationRoutes affectedTypical route-code result
PurposeSummarizes internal routes between areasSummarizes redistributed routesUnder the OSPF routing processRoutes originating in the specified areaO IA
OSPF roleABRASBRABR or ASBR as appropriateInternal area routes versus external routesO IA versus O E1 or O E2
Suppress optionnot-advertisenot-advertise where supportedOSPF process configurationMatching advertisementsNo corresponding remote advertisement

Calculating a Summary Prefix

Step 1: Confirm Contiguity and Alignment

Candidate networks must be adjacent and aligned on a valid CIDR boundary. Four /24 networks require a /22 summary when their third-octet values are 0 through 3, 4 through 7, 8 through 11, and so on. A block of four /24 networks cannot start at an arbitrary third-octet value.

Step 2: Compare Common Network Bits

Compare the candidate prefixes in binary from left to right. The bits that remain identical are the summary's network bits. The first differing bit marks the end of the common prefix.

For 10.10.0.0/24 through 10.10.3.0/24, the first two octets provide 16 common bits. In the third octet, values 0, 1, 2, and 3 share the first 6 bits. Therefore, the common prefix length is 22 bits, or /22.

Step 3: Convert the Prefix to a Mask and Range

Component networksCommon prefix lengthSummary networkSubnet maskAddress range covered
10.10.0.0/24, 10.10.1.0/24, 10.10.2.0/24, 10.10.3.0/24/2210.10.0.0/22255.255.252.010.10.0.0 through 10.10.3.255

The /22 mask has a block size of 4 in the third octet because 256 minus 252 equals 4. The summary therefore covers third-octet values 0, 1, 2, and 3.

Step 4: Check the Design

  • Make sure every intended subnet is inside the aggregate.
  • Make sure unrelated, unallocated, remote, or differently routed networks are not included accidentally.
  • Confirm that the summarizing router has an appropriate forwarding path to all covered destinations.
  • Use hierarchical, contiguous addressing so future subnets can also fit cleanly into the design.

Unsafe Summary Example

Summarizing 10.10.0.0/24 through 10.10.3.0/24 as 10.10.0.0/21 is too broad. A /21 has a block size of 8 in the third octet and covers 10.10.0.0 through 10.10.7.255. It therefore includes the additional /24 ranges 10.10.4.0/24 through 10.10.7.0/24.

If those additional ranges do not exist or use another path, traffic toward them may be attracted to the summarizing router. A Null0 or discard route can drop that traffic, creating an apparent black hole.

Topology Behavior and Route Selection

How a Receiving Router Uses a Summary

A remote router installs the aggregate in its routing table when the OSPF advertisement is accepted and selected. It forwards traffic matching the aggregate toward the advertising ABR or ASBR.

When a summary and a more-specific route both exist, longest-prefix match selects the route with the most network bits:

  • 10.10.0.0/22 matches the entire summarized range.
  • 10.10.2.0/24 is more specific and wins for traffic to 10.10.2.x.
  • Traffic to another address within the /22 uses the /22 if no more-specific route exists.

Summarization can hide route withdrawals and failures. A remote area may continue to see the aggregate even after one component prefix disappears. This is useful for stability, but it also means remote routers cannot make decisions based on the missing component's detailed state.

Discard Routes and Blackholing

Cisco IOS may install a Null0 or other discard route for a summary. This prevents packets matching the aggregate but not matching an available more-specific route from being forwarded through an incorrect path or loop.

The same protection can cause intentional packet loss when the summary covers nonexistent or failed component networks. A discard route is not proof that every address inside the aggregate is reachable; it only confirms that unmatched traffic is being discarded locally.

Summary Costs

The OSPF cost of a summary influences which path remote routers prefer when multiple advertisements are available. An explicitly configured area-range cost overrides automatic cost selection for that summary. For external summaries, the external metric and E1 or E2 type affect route comparison.

Area Range Versus Stub-Area Default Routes

An area range summarizes selected prefixes from an area. It is not the same as stub-area behavior. Stub, totally stubby, NSSA, and totally NSSA designs may use a default route to reduce the number of external or inter-area routes presented to an area. A default route represents destinations not otherwise known; an area range represents a specific aggregate of matching prefixes.

Verification and Operational Validation

Always compare the routing table and LSDB before and after applying summarization.

CommandWhat to inspectExpected result after summarization
show ip route ospfOSPF route codes and prefixesRemote routers show an aggregate, such as O IA or O E1/O E2, instead of the individual routes where summarization applies
show ip route 10.10.0.0Selected route, next hop, metric, and administrative distanceThe expected summary and forwarding path are displayed
show ip ospf database summaryType 3 Summary LSAsThe ABR advertises the expected inter-area aggregate
show ip ospf database externalType 5 external LSAsThe ASBR advertises the expected external aggregate
show ip ospfOSPF process, area participation, and ABR-related informationThe router is attached to the expected areas
show running-config | section router ospfArea range, summary address, redistribution, and metricsThe intended commands are present under the correct OSPF process
show ip route | include Null0Generated discard routesAny aggregate discard route is identified and its effect is understood
ping 10.10.1.1 and traceroute 10.10.1.1Reachability and forwarding pathValid component destinations remain reachable through the intended path

From a remote area, confirm that the routing table contains one aggregate and that individual component prefixes are absent when the design calls for their suppression. Then test at least one valid address from each important component range.

Troubleshooting OSPF Summarization

Individual Routes Still Appear Remotely

  • Confirm that the area range command is configured on an ABR.
  • Verify that the area number is the area where the component routes originate.
  • Check that the range and mask cover the actual prefixes.
  • Confirm that the router is attached to multiple OSPF areas and is operating as an ABR.
  • Inspect Type 3 LSAs and the remote routing table.

An External Summary Is Not Advertised

  • Verify that the component routes exist on the ASBR.
  • Confirm that redistribution into OSPF is configured.
  • Ensure that summary-address covers the redistributed prefixes.
  • Check redistribution filters, route maps, and the external LSDB.
  • Look for O E1 or O E2 routes on a remote router.

Traffic Inside the Aggregate Is Dropped

  • Compare the full aggregate range with the actual intended prefixes.
  • Check whether a component route failed while the aggregate remained active.
  • Inspect more-specific routes and any Null0 or discard route.
  • Use ping and traceroute from both sides of the summarization boundary.

The Metric Is Unexpected

  • Review any explicit cost configured on the area range.
  • Check whether a more-specific route wins through longest-prefix match.
  • Compare administrative distance with competing routing protocols.
  • For external routes, review the E1 or E2 type and redistribution metric.

Design Guidance and Limitations

  • Summarize at logical area and redistribution boundaries, not on arbitrary internal routers.
  • Use contiguous, hierarchical address allocation whenever possible.
  • Do not include unallocated, remote, or differently routed networks unless the resulting behavior is intentional.
  • Ensure the summarizing router has a valid path to all destinations represented by the aggregate.
  • Use explicit summary costs when predictable path selection is important.
  • Test failure behavior, including removal of one component route and traffic to unused addresses inside the aggregate.

OSPFv3 provides analogous summarization concepts for IPv6, but the command syntax and platform behavior can vary by Cisco IOS family and release. Apply the same principles: summarize at area or redistribution boundaries, validate prefix alignment, and test the resulting forwarding behavior.

Key Terms

  • ABR: Area Border Router; an OSPF router connected to more than one area.
  • ASBR: Autonomous System Boundary Router; a router that redistributes external routes into OSPF.
  • Area range: The Cisco IOS OSPF configuration used by an ABR to summarize routes from a specified area.
  • Summary address: The Cisco IOS OSPF configuration used by an ASBR to summarize redistributed routes.
  • Inter-area route: A route learned from another OSPF area, commonly shown as O IA.
  • External route: A route introduced through redistribution, commonly shown as O E1 or O E2.
  • Type 3 Summary LSA: An OSPFv2 LSA used by ABRs to advertise inter-area networks.
  • Type 5 AS-External LSA: An OSPFv2 LSA used to advertise external routes in normal areas.
  • Longest-prefix match: The forwarding rule that chooses the most-specific matching route.

Exam-Ready Summary

  1. OSPF does not summarize automatically.
  2. An ABR uses area range to summarize internal routes from one area into other areas.
  3. ABR summaries are represented by Type 3 Summary LSAs in OSPFv2 and commonly appear as O IA routes.
  4. An ASBR uses summary-address to summarize routes redistributed into OSPF.
  5. External summaries use Type 5 AS-External LSAs in normal OSPFv2 areas and commonly appear as O E1 or O E2 routes.
  6. Intra-area routes are not summarized through normal OSPF area summarization.
  7. A valid summary must be contiguous, correctly aligned, and limited to destinations reachable through the summarizing router.
  8. A more-specific route wins over a summary through longest-prefix match.
  9. Always verify the routing table, LSDB, configuration, reachability, and any generated discard route.

For related fundamentals, review Configure OSPF and Link State Advertisement (LSA).