IP fundamentals

CIDR route aggregation and alignment

An aggregate prefix represents a larger aligned interval. Adjacent smaller prefixes can merge only when their union exactly fits the larger prefix.

Updated

A valid pair

192.0.2.0/25 and 192.0.2.128/25 are aligned siblings and together cover 192.0.2.0/24. No other address is included.

An invalid pair

192.0.2.64/26 and 192.0.2.128/26 are adjacent but not siblings under a single /25. A larger covering prefix would also include unintended ranges.

Operational caution

Exact mathematical aggregation is only one consideration. Advertising an aggregate needs authority and correct forwarding behavior for its component ranges. Reachability holes and routing policy still matter.

A precise aggregation example

192.0.2.0/25 and 192.0.2.128/25 combine exactly into 192.0.2.0/24. Two neighboring /25 blocks that cross an aligned /24 boundary cannot be represented by that single /24. Check whether every address in the proposed aggregate is intended to be covered. Recheck the resulting address interval independently before documenting the conclusion.

Step-by-step example

Combine four contiguous aligned /26 networks into a /24 only when their routing policy permits it.

  1. 01

    List exact children

    The four /26 blocks start at .0, .64, .128 and .192. Together they cover exactly .0 through .255 with no gaps.

    192.0.2.0/26
    .0–.63
    192.0.2.64/26
    .64–.127
    192.0.2.128/26
    .128–.191
    192.0.2.192/26
    .192–.255
    Illustration · example, not a live result
  2. 02

    Find the common prefix

    The blocks share the first 24 bits, and the /24 is aligned. Use Range to CIDR on 192.0.2.0–192.0.2.255 to verify that one prefix covers the exact interval.

    First
    192.0.2.0
    Last
    192.0.2.255
    Summary
    192.0.2.0/24
    Illustration · example, not a live result
  3. 03

    Check the routing implications

    Mathematical coverage is not enough. Only advertise a summary if your authorized policy and reachability for its destinations support it. Do not aggregate missing or differently routed networks blindly.

    Exact range
    Mathematical match
    Routing policy
    Separate validation
    Illustration · example, not a live result

Check your understanding

CIDR aggregation reduces prefix count; it does not by itself authorize route announcements.

Try this tool →

Try this

Convert an inclusive address range into exact CIDR blocks, then compare that output with a proposed aggregate.

IP range to CIDR converter →

Technical references