Supernet Calculator

Aggregate multiple subnets into a single supernet (also called a route summary or CIDR aggregate). Enter 2 to 8 network addresses and this tool will find the smallest CIDR block that covers all of them, showing the step-by-step binary math behind the calculation.

Supernet Calculator
Figure 1 — Supernet Calculator

What Is Supernetting?

Supernetting (also called route aggregation or route summarization) is the process of combining multiple contiguous subnets into a single, larger CIDR block. This is the opposite of subnetting, where you divide a network into smaller pieces. Supernetting reduces the number of entries in routing tables, which improves router performance and reduces memory usage across the internet backbone.

For example, if your organization owns four consecutive /24 networks — 192.168.0.0/24 through 192.168.3.0/24 — you can advertise them as a single 192.168.0.0/22 supernet. Instead of four routing table entries, your upstream peers only need one. This concept is fundamental to how the global IP addressing system scales using CIDR (Classless Inter-Domain Routing).

How Route Summarization Works

The algorithm behind supernetting finds the longest common binary prefix shared by all input networks. Here is the process broken down step by step:

  1. Convert all network addresses to binary — Each 32-bit IPv4 address becomes a string of 0s and 1s.
  2. Align and compare bit by bit from the left — Count how many leading bits are identical across all networks.
  3. The common prefix becomes the supernet mask — The number of matching bits determines the CIDR prefix length.
  4. Apply the new mask to get the supernet address — AND the first address with the supernet mask.
Network 1: 192.168.0.0/24 = 11000000.10101000.00000000.00000000
Network 2: 192.168.1.0/24 = 11000000.10101000.00000001.00000000
Network 3: 192.168.2.0/24 = 11000000.10101000.00000010.00000000
Network 4: 192.168.3.0/24 = 11000000.10101000.00000011.00000000
                             ^^^^^^^^ ^^^^^^^^ ^^^^^^
Common prefix: 22 bits  →  Supernet: 192.168.0.0/22

You can verify each address in binary using our IP to Binary Converter, and check the resulting range with the IP Range Calculator.

Supernetting Requirements

Not all groups of subnets can be neatly aggregated. For optimal (exact) supernetting, the following conditions must be met:

RequirementDescriptionExample
Contiguous AddressesNetworks must be adjacent with no gaps192.168.0.0/24, .1.0/24, .2.0/24, .3.0/24
Power-of-Two CountNumber of networks should be 2, 4, 8, 16, etc.4 × /24 = one /22
Aligned Start AddressFirst network must be a multiple of the block size192.168.0.0 (divisible by 1024 for /22)
Same Original PrefixInput networks should share the same prefix lengthAll /24 or all /26

If your networks don't meet these conditions, the supernet will include extra addresses that weren't in any original subnet. This calculator handles this case by showing you the smallest covering block, but be aware that the supernet may be "loose" — it includes IPs outside your original ranges. Use the Same Subnet Checker to verify specific addresses fall within the result.

Pro Tip: When aggregating routes for BGP announcements, always ensure your supernet doesn't accidentally cover address space you don't own. Announcing a /22 that includes a /24 belonging to another organization will cause routing conflicts. Verify ownership with WHOIS lookups and validate the range with our IP Range Calculator before advertising.

Supernetting in Practice: BGP Route Aggregation

The primary real-world application of supernetting is BGP route aggregation. Internet service providers and large enterprises use it to keep the global routing table manageable. Here is how you configure route aggregation on a Cisco router:

! Aggregate four /24 networks into one /22
router bgp 65000
 network 192.168.0.0 mask 255.255.252.0
 aggregate-address 192.168.0.0 255.255.252.0 summary-only

! The summary-only keyword suppresses the individual /24 routes
! Peers only see 192.168.0.0/22 instead of four separate /24s

Without aggregation, the global BGP routing table would be astronomically large. The current table has over 1 million IPv4 prefixes — without supernetting and CIDR, that number could be 10x larger. Understanding the subnet masks behind these aggregations is essential for any network engineer working with BGP.

Note: This calculator finds the smallest single CIDR block that covers all input networks. If your networks are non-contiguous (e.g., 192.168.0.0/24 and 192.168.4.0/24), the resulting supernet will include addresses between them. For non-contiguous aggregation, you would typically advertise multiple summary routes instead of a single supernet. Check specific coverage using our What Is My IP tool for public addresses.

Supernet Size Reference

This table shows how many smaller subnets fit within each supernet prefix length. Use it to quickly determine the correct aggregation level for your network gateway configuration:

Supernet/24s Covered/25s Covered/26s CoveredTotal Addresses
/2248161,024
/21816322,048
/201632644,096
/1932641288,192
/186412825616,384
/1712825651232,768
/162565121,02465,536

Supernetting vs Subnetting

Supernetting and subnetting are complementary operations that move in opposite directions on the CIDR prefix scale:

AspectSubnettingSupernetting
DirectionDivides large network into smaller onesCombines smaller networks into one
Prefix ChangeIncreases prefix (e.g., /24 → /26)Decreases prefix (e.g., /24 → /22)
PurposeEfficient address allocation within an orgReduces routing table size across orgs
Primary UseInternal network design, DHCP scopingBGP aggregation, ISP route management
ToolSubnet CalculatorSupernet Calculator (this tool)

For variable-length internal subnetting where different departments need different sizes, see our VLSM Calculator. For converting between notation formats, use the CIDR Converter.

When to Use Route Summarization

Route summarization is valuable in several scenarios. If you manage router infrastructure — whether at 192.168.1.1 on a home network or on enterprise border routers — understanding when to aggregate helps optimize routing:

  • BGP multihoming — Aggregate your address space before advertising to multiple upstream ISPs to reduce global table bloat.
  • OSPF area boundaries — Summarize routes between OSPF areas to limit the size of link-state databases. Configure wildcard masks with our Wildcard Mask Calculator.
  • Data center prefixes — Combine rack or pod subnets into a single advertisement.
  • VPN tunnels — Summarize branch office networks for cleaner routing over NAT and VPN gateways.
  • Firewall rules — Replace multiple per-subnet rules with a single supernet rule to simplify ACL management.
Key Takeaways
  • Supernetting combines multiple contiguous subnets into a single larger CIDR block.
  • The algorithm finds the longest common binary prefix across all input networks.
  • Ideal aggregation requires contiguous, power-of-two networks with aligned starting addresses.
  • BGP route aggregation is the primary real-world use case, keeping the global routing table manageable.
  • Non-contiguous networks produce a "loose" supernet that includes unowned addresses — verify coverage before advertising.
  • Use the Subnet Calculator for the inverse operation (dividing networks into smaller subnets).

Video: Route Summarization Explained

Related Tools and Guides

Frequently Asked Questions

What is the difference between supernetting and CIDR?

CIDR (Classless Inter-Domain Routing) is the addressing system that makes supernetting possible. Before CIDR, addresses were locked to Class A, B, or C boundaries. CIDR removed those restrictions, allowing arbitrary prefix lengths. Supernetting is a specific application of CIDR — using a shorter prefix to aggregate multiple networks. Use our Network Class Identifier to see the legacy class of any address.

Can I supernet non-contiguous subnets?

You can find a covering supernet for non-contiguous subnets, but the resulting block will include address space between them that wasn't in your original networks. This is called a "loose" summary. In practice, non-contiguous networks are typically advertised as separate routes rather than aggregated into one.

How many /24 networks fit in a /22 supernet?

A /22 contains exactly four /24 networks (2^(24-22) = 4). Each step of one bit doubles the count: /23 = 2× /24, /22 = 4× /24, /21 = 8× /24, and so on. Calculate exact ranges with our IP Range Calculator.

Does supernetting waste IP addresses?

If your input networks are perfectly contiguous and aligned, the supernet covers exactly those addresses with no waste. If they're not aligned (e.g., starting at .1.0 instead of .0.0), the supernet may include extra addresses. Always verify the resulting range and confirm you have authority over the entire block.

What is the minimum prefix length for a supernet?

Technically, the minimum prefix length is /0 (the entire IPv4 address space), but in practice ISPs typically don't accept BGP announcements longer than /24. Many require aggregation to at least /22 or /20 to filter out small announcements and keep routing tables manageable.

How does supernetting help with routing performance?

Every routing table entry consumes router memory and increases lookup time. By replacing four /24 routes with one /22 route, you reduce table size by 75% for those prefixes. At the scale of global BGP with over 1 million prefixes, aggregation is essential for router performance and convergence speed.

Can I use supernetting in my home network?

Home networks typically use a single /24 subnet (e.g., 192.168.1.1/24), so supernetting isn't necessary. However, if you run multiple VLANs or segments on an advanced gateway, you might summarize routes between segments. For most home setups, a basic static IP configuration is sufficient.

About Tommy N.

Tommy is the founder of RouterHax and a network engineer with 10+ years of experience in home and enterprise networking. He specializes in router configuration, WiFi optimization, and network security. When not writing guides, he's testing the latest mesh WiFi systems and helping readers troubleshoot their home networks.

Promotion for FREE Gifts. Moreover, Free Items here. Disable Ad Blocker to get them all.

Once done, hit any button as below