skip to content

In IPv4 CIDR, what is route aggregation (also called supernetting or summarisation), and why do networks do it?

level: juniorimportance: should knowfreq 36%

answer

  1. fewer routes upstream
  2. one shorter prefix covers several
  3. contiguous, power of two, aligned
  4. the CIDR spec that obsoletes RFC 1519

basics

~10 s

Route aggregation replaces several contiguous, bit-aligned IPv4 prefixes with one shorter prefix covering exactly them, such as two /24s becoming one /23, so upstream routers carry and update one route instead of many.

solid answer

~40 s

Aggregation (supernetting, summarisation) advertises one shorter prefix in place of the longer prefixes it covers: `192.168.4.0/24` and `192.168.5.0/24` become `192.168.4.0/23`. It is the point of CIDR, specified today by RFC 4632 (which obsoletes RFC 1519): addresses are assigned along the topology so a provider announces one route for its whole block. The payoff is smaller routing and forwarding tables, fewer updates, and stability, because a flapping subnet inside the summary is invisible upstream. It works only when the blocks are contiguous, total a power of two and start on that size's boundary. And because routers forward on the longest matching prefix, a more-specific route still overrides the summary wherever it is installed.

go deeper

for a junior

Recall the definition with one worked pair, two adjacent /24s becoming a /23, and the reason: fewer routes upstream. Say that CIDR made it possible and RFC 4632 defines it.

for a middle

Explain why only contiguous, power-of-two, aligned sets give one exact summary, and show the boundary check on the third octet without reaching for a calculator.

for a senior

Talk about what a summary hides: failures inside it, traffic for unused space, and the discard route the summarising router needs so nothing loops along its default route.

for a principal

Frame aggregation as a trade between table size and visibility, and explain why the address plan, not the router, decides how much aggregation is possible later.

## What route aggregation is **Route aggregation** (also called **supernetting** or **route summarisation**) means advertising one shorter IPv4 prefix in place of several longer prefixes that it covers. Instead of telling a neighbour about `192.168.4.0/24` and `192.168.5.0/24` separately, a router announces `192.168.4.0/23`: a single route whose first 23 bits match both blocks. Every destination reachable through the two specific routes is still reachable through the summary, so the neighbour loses nothing it needs to forward traffic and gains a smaller table. A **prefix** is an address plus a length. `/23` says the first 23 of the 32 bits identify the block and the remaining 9 bits number the addresses inside it, 2^9 = 512 addresses. Shortening the length by one bit doubles the block, which is why aggregation always combines blocks in powers of two. ## Why CIDR was built around it Under classful addressing, routers inferred a network's size from the leading bits of its address, so 256 legacy "Class C" networks were 256 separate routes however neatly they were laid out. **Classless Inter-Domain Routing** removed that inference: the prefix length is carried explicitly in routing protocols and stored in forwarding tables. Its current specification is **RFC 4632** (2006, Best Current Practice 122), which obsoletes RFC 1519 (1993). The word "supernetting" is the name RFC 1338 (1992) gave the idea before CIDR was specified. RFC 4632 calls aggregation "the only commonly understood method for reducing routing state" and ties it to how addresses are handed out: registry to provider to customer, along the topology. A customer numbered from its provider's block needs no route of its own on the wider Internet, because the provider's single aggregate already reaches it. ## What it buys - **Smaller tables.** Routers upstream store one entry instead of many, in both the routing table and the forwarding table, where fast lookup memory is the scarce resource. - **Fewer updates.** When a subnet inside the summary goes down and comes back, nothing changes upstream; the summary stays advertised. - **Stability.** Hiding internal churn means a flapping link at one site does not make routers across the network recompute their tables. ## The three conditions A set of IPv4 blocks can be replaced by **exactly one** prefix only when: 1. **They are contiguous**: no gap between them. 2. **Their total size is a power of two**: 2, 4, 8, 16 ... /24s, or any mix of sizes that adds up to one. 3. **The first block starts on that size's boundary**: a /23 starts on an even third octet, a /22 on a multiple of four, and so on. The blocks do not need to be the same size: `10.1.4.0/23`, `10.1.6.0/24` and `10.1.7.0/24` together make `10.1.4.0/22`. | Blocks | Contiguous | Count | Aligned | One exact summary | |---|---|---|---|---| | 192.168.4.0/24 + 192.168.5.0/24 | yes | 2 | 4 is even | `192.168.4.0/23` | | 192.168.5.0/24 + 192.168.6.0/24 | yes | 2 | 5 is odd | none | | 192.168.4.0/24 to 192.168.6.0/24 | yes | 3 | n/a | none | | 192.168.4.0/24 + 192.168.6.0/24 | gap at .5 | 2 | n/a | none | When the conditions fail you can still announce a covering prefix, but it then claims addresses you do not route: an **over-summary**. ## What it costs - **Lost detail.** Upstream routers can no longer tell which parts of the summary are up; traffic for a failed subnet still arrives and has to be dropped by the summarising router. - **The summariser must discard.** RFC 4632 requires the router that generates an aggregate to discard packets that match the aggregate but none of its more-specific routes, usually through a "null" or discard route, so they do not loop back along a default route. - **More-specifics still win.** Routers must forward on the **longest matching prefix** (RFC 1812), so a more-specific route inside a summary overrides it wherever it is installed: useful for traffic engineering, dangerous when someone else announces it. - **Multihoming defeats it.** A site reachable through two providers must be announced explicitly by each of them, so it costs a route of its own whatever block it was numbered from. ## Beyond IPv4 The arithmetic is the same for IPv6's 128-bit addresses: `2001:db8::/48` and `2001:db8:1::/48` differ only in the last of their first 48 bits, so they aggregate into `2001:db8::/47`. Where a router generates the summary, and with which routing protocol's mechanism, is a question for that protocol; the bit arithmetic and the validity conditions are the same everywhere.

  • Does a summary change how a router forwards a packet that also matches a more-specific route?
    No. IPv4 routers must use the most specific matching route (RFC 1812), so a `/24` inside a `/22` summary wins wherever both are installed. The summary decides only for addresses no more-specific covers. That is what makes it safe for a router to hold both its components and the summary, and also why someone else's more-specific can pull traffic away from a summary.
  • Why does aggregation do little for a multihomed site?
    RFC 4632 requires a site reachable through two providers to be announced explicitly by each of them. If its primary provider carried it only inside an aggregate while the other announced it on its own, longest match would send all its traffic to the other provider. So the site's prefix appears in the global table on its own, and RFC 4632 notes its routing cost is about what it was before CIDR.

saying these in an interview costs you the question

  • Any set of subnets can be summarised exactly, whether or not they are adjacent.
  • Every block inside a summary has to be the same size.
  • A summary route makes routers ignore the more-specific routes it covers.
  • Aggregation changes the subnet masks configured on hosts inside the summarised networks.
  • A summary loses no information and can never misroute traffic.