Two Sides of the Same CIDR Coin
Every network engineer learns subnetting first: take a large block, divide it into smaller pieces, assign one piece per department or security zone. That skill is foundational. But as soon as you start working at the ISP level, or handling BGP advertisements for a university or enterprise, you encounter the opposite challenge: hundreds of small networks that need to be announced efficiently to the global routing table. That is where supernetting—also called route aggregation or route summarization—becomes indispensable.
Both operations are governed by the same mathematical framework: CIDR (Classless Inter-Domain Routing), introduced in 1993 to replace the rigid class-based system (Class A, B, C) and give engineers the flexibility to define prefix lengths anywhere from /0 to /32. Understanding both directions—splitting down and aggregating up—is what separates a junior network engineer from someone who can design scalable infrastructure.
How Subnetting Works
Subnetting takes a parent block and divides it by extending the prefix length. Every time you add one bit to the prefix, you cut the address space in half and double the number of subnets. Starting from a /24 (256 addresses), you can create two /25s (128 addresses each), four /26s (64 addresses each), and so on down to individual /32 host routes.
The math relies on the fact that all subnet boundaries must align to powers of two. A /26 block always starts at an address divisible by 64: 0, 64, 128, 192. You cannot start a /26 at address 10 and end it at address 73—the binary math simply does not work out to a valid mask.
Practically, this means:
- Network address: The first address in the block—never assigned to a host.
- Broadcast address: The last address in the block—also reserved.
- Usable hosts: 2n − 2, where n is the number of host bits.
A /29 gives you 8 addresses total, 6 usable hosts. A /30 gives you 4 addresses, 2 usable hosts—useful for point-to-point links between routers.
How Supernetting Works
Supernetting runs in reverse. You take multiple contiguous, smaller networks and represent them as a single larger prefix by reducing the prefix length. The critical requirement: the blocks must be contiguous and aligned on the correct power-of-two boundary.
Consider a university that owns four /24 networks: 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24, and 192.168.3.0/24. Instead of advertising four separate BGP routes, the university can summarize all four into a single 192.168.0.0/22 advertisement. The router receiving that /22 knows it covers all addresses from 192.168.0.0 through 192.168.3.255.
The alignment rule is strict: to merge two /24s into a /23, the first /24 must start at an even multiple of the /23 block size. 192.168.0.0/24 and 192.168.1.0/24 merge cleanly. 192.168.1.0/24 and 192.168.2.0/24 do not merge into a single /23—the boundary is wrong.
CIDR Notation: The Universal Language
Both operations use CIDR slash notation. The number after the slash tells you how many bits are fixed (the network portion); the remaining bits are the host portion. Larger prefix numbers mean smaller networks:
/8— 16,777,216 addresses (formerly Class A)/16— 65,536 addresses (formerly Class B)/24— 256 addresses (formerly Class C)/28— 16 addresses (common for small segments)/30— 4 addresses (point-to-point links)/32— 1 address (single host route or loopback)
In BGP, all route advertisements are expressed in CIDR notation. A router receiving 10.0.0.0/8 knows it applies to 16 million addresses. The same block as a 10.0.0.0/24 applies to just 256. Routers always prefer the most specific (longest prefix) match when forwarding packets.
Architecture and Real-World Applications
Understanding where each technique applies is as important as knowing the math.
Subnetting use cases:
- Network segmentation: Separating servers, end-user workstations, voice (VoIP), and guest Wi-Fi into different subnets so that broadcast traffic stays contained and firewall rules can be applied at Layer 3.
- VLSM (Variable Length Subnet Masking): Allocating exactly the right size block for each segment rather than wasting addresses. A 50-host server subnet gets a
/26; a two-router link gets a/30. - Data center design: Cloud providers subnet their address space into per-availability-zone, per-VPC, and per-subnet allocations using CIDR with prefixes as long as
/28or/29.
Supernetting use cases:
- ISP route aggregation: An ISP with a large
/16block sub-allocates/24s to customers but advertises only the single/16to its upstream BGP peers, keeping the global routing table clean. - BGP route summarization at enterprise edges: A company with multiple branch offices, each owning a
/24, can summarize them into a single/21or/20at the border router, reducing the number of prefixes injected into the ISP's BGP table. - Reducing routing table size: The global BGP routing table exceeded 900,000 prefixes as of 2024. Without aggressive aggregation, routers would need far more memory to hold all possible routes.
Subnetting vs. Supernetting: Side-by-Side Comparison
| Attribute | Subnetting | Supernetting / Route Aggregation |
|---|---|---|
| Direction | Divides a large block into smaller pieces | Merges smaller blocks into a larger one |
| Prefix length change | Increases (e.g., /16 → /24) | Decreases (e.g., /24 × 4 → /22) |
| Primary purpose | Segmentation, security, organization | Routing efficiency, table reduction |
| Used at | LAN design, cloud VPC, campus networks | BGP peering, ISP edge routers, WAN design |
| Alignment requirement | Subnets must align on power-of-two boundaries | Blocks must be contiguous and on correct boundary |
| Effect on routing table | Adds more specific routes | Reduces the number of advertised prefixes |
| Key skill required | Binary mask arithmetic, VLSM | Identifying contiguous, alignable blocks |
Common Misconceptions
Misconception 1: Supernetting is just reverse subnetting
While the analogy is useful for learning, supernetting has a strict constraint subnetting does not: the blocks being merged must be topologically contiguous and the aggregate must correctly represent all the traffic it covers. If you summarize blocks you do not actually own, you create a black hole—traffic destined for those addresses will arrive at your router and be dropped because the more-specific routes do not exist there.
Misconception 2: A Larger Prefix Always Wins
The longest-prefix-match rule means /28 beats /24 for any address that falls within both ranges. But this only applies when both routes exist in the routing table. If only the /22 aggregate exists, all traffic for that entire range follows the single summarized route, regardless of which specific /24 the destination is in.
Misconception 3: CIDR Eliminated Classes Entirely
CIDR eliminated classful routing in terms of how routers forward packets—no router today uses the old Class A/B/C rules to determine the network boundary. However, legacy documentation, IANA allocations, and some firewall products still reference classful terminology. You need to know both systems.
Misconception 4: Subnetting Wastes Addresses
Every subnet reserves a network address and a broadcast address, so you always lose two addresses per subnet. For large blocks this is negligible. For /30 point-to-point links, you lose two of four addresses (50%). This is a known cost, not a flaw—and for numbered links, it is the standard approach. Unnumbered links (using interface addresses only) exist as an alternative but add operational complexity.
Pro Tips
- Always document your subnet allocations in an IPAM tool. Spreadsheets become unmanageable fast. Tools like NetBox, phpIPAM, or even a well-structured Infoblox deployment will save you from overlapping allocations when the network grows.
- Use /30s for router-to-router links, not /24s. Assigning a /24 to a point-to-point link wastes 252 usable addresses that will never be used. A /30 gives you exactly what you need.
- Plan your address space hierarchically from day one. Assign a /16 to a region, /20s to sites within that region, and /24s to VLANs within each site. This makes summarization trivial later.
- Verify alignment before advertising a supernet. Write out the binary representation of your block boundaries to confirm the proposed aggregate prefix does not accidentally cover addresses you do not own or control.
- Use the divide-by-subnet-count rule (round up to the next power of two). If you need 5 subnets from a /24, the next power of two is 8 (2³), so you use /27 masks—giving 8 subnets of 30 usable hosts each.
- Watch for route flapping with over-specific advertisements. If a link goes up and down repeatedly, a /32 host route for a server on that link will flap across the entire BGP internet. Summarizing to a stable aggregate at the edge prevents that instability from propagating.
Whether you are segmenting a campus LAN or designing the IP hierarchy for a multi-site enterprise, mastering both subnetting and supernetting gives you full control over how traffic flows, how tables scale, and how your network grows. Check your IP details and subnet information right now.