🌐 Supernet Calculator – CIDR Route Aggregation & Summarization
A supernet is a single, larger CIDR block that encompasses two or more smaller, contiguous network blocks. Supernetting — also called route summarization or prefix aggregation — is one of the most important techniques in modern networking: it shrinks routing tables, simplifies firewall rule sets, and makes IP address planning cleaner and more scalable.
This calculator applies the binary prefix aggregation algorithm to find the smallest single CIDR block that covers all supplied IPv4 or IPv6 networks. It also performs gap analysis, shows aggregation efficiency, and provides a visual binary breakdown of the prefix boundary.
What Is Supernetting?
Supernetting is the inverse of subnetting. Where subnetting divides a large block into smaller subnets, supernetting merges smaller subnets back into a larger, covering prefix. The result is a summary route — one routing table entry that replaces many individual entries.
Route Summarization
BGP, OSPF, and EIGRP engineers advertise one aggregate instead of dozens of individual /24s, reducing routing table churn.
Firewall / ACL Simplification
Replace a long list of individual network rules with one supernet prefix, making policy easier to read and manage.
ISP Address Planning
Aggregate customer-assigned blocks into provider-level announcements to minimize the global routing table footprint.
How the Algorithm Works
The supernet calculator implements the binary prefix aggregation algorithmin four steps:
- Convert each input network to its binary network address (32 bits for IPv4, 128 bits for IPv6) and its prefix length.
- Sort all networks by their binary address value.
- Compare the binary representations from the most-significant bit to find the longest common prefix shared by all network addresses.
- The supernet prefix length equals the number of shared leading bits. The supernet network address is those bits followed by all zeros.
Example — four /24s summarized into one /22:
10.0.0.0/24→ 00001010.00000000.00000000.xxxxxxxx
10.0.1.0/24→ 00001010.00000000.00000001.xxxxxxxx
10.0.2.0/24→ 00001010.00000000.00000010.xxxxxxxx
10.0.3.0/24→ 00001010.00000000.00000011.xxxxxxxx
Supernet: 10.0.0.0/22 (22 common leading bits)
Best-Fit vs. Strict Contiguous Mode
The calculator offers two aggregation modes:
- Best-Fit (default) — finds the smallest single CIDR block that covers all input networks, regardless of whether gaps exist between them. Use this for firewall rules where you want one rule to match a range of addresses.
- Strict Contiguous — only accepts input sets where every network is the same prefix length and all networks together exactly fill the supernet without any gaps. This is the technically correct form of CIDR aggregation for routing protocols that require clean summarization.
Understanding the Outputs
Supernet CIDR
The smallest covering aggregate prefix in CIDR notation (e.g., 10.0.0.0/22).
Subnet Mask
The dotted-decimal form of the supernet mask, useful for older device configurations.
Wildcard Mask
The bitwise inverse of the subnet mask, used in Cisco IOS ACLs and OSPF configurations.
Aggregation Efficiency
Percentage of the supernet's address space covered by input networks. 100% = no gaps; lower means unclaimed space inside the supernet.
Gap Analysis
CIDR ranges inside the supernet not covered by any input network. Advertising the supernet would also claim these gap addresses.
Binary Breakdown
Visual 32-bit binary display where shared prefix bits are highlighted in blue and host bits shown as 'x', making the aggregation boundary easy to see.
IPv4 vs. IPv6 Supernetting
The calculator supports both IPv4 (32-bit addresses, prefix lengths /0–/32) and IPv6 (128-bit addresses, prefix lengths /0–/128). The algorithm is identical — binary prefix matching — but IPv6 uses BigInt arithmetic internally to handle the full 128-bit address space.
For IPv6, the compressed colon-notation supernet address is automatically formatted using the standard :: compression (RFC 5952). Common use cases include aggregating customer /48 or /56 allocations into a provider /32 announcement.
Validation and Edge Cases
The tool automatically handles several common edge cases:
- Host bit correction — if you enter
192.168.1.5/24, the calculator auto-corrects it to192.168.1.0/24and notifies you. - Duplicate removal — identical networks are de-duplicated before calculation.
- Overlap detection — networks fully contained within another are removed, since they don't affect the supernet boundary.
- Mixed IPv4/IPv6 — switch the IP Version toggle to match your input; mixing address families in one calculation is not supported.
Practical Tips for Network Engineers
- Always review the gap analysis before advertising a supernet in BGP. Gaps mean you'd attract traffic for address space you don't own.
- Use aggregation efficiency as a sanity check: if it's below 50%, you may be summarizing too aggressively and should consider advertising more-specific prefixes instead.
- For OSPF or EIGRP summarization, enable Strict mode to confirm your networks form a clean CIDR boundary before configuring the summary-address command.
- The wildcard mask output can be pasted directly into Cisco IOS ACL statements:
permit ip 10.0.0.0 0.0.3.255 any.