Single CIDR block
8.8.8.0 - 8.8.8.255
Converts cleanly to one /24 block.
Convert /24 range
Network tool
Convert a start and end IPv4 or IPv6 address into the smallest set of covering CIDR blocks.
Reference
Advertisement
Overview
Range to CIDR converts a start and end IP address into the smallest set of CIDR blocks that covers that exact range.
It is useful when a vendor gives you raw IP ranges but your firewall, router, cloud rule, or API expects CIDR notation. For smaller network slices, use the subnet splitter.
Examples
Single CIDR block
8.8.8.0 - 8.8.8.255
Converts cleanly to one /24 block.
Convert /24 range
Uneven range
8.8.8.1 - 8.8.8.3
Requires more than one CIDR block because the range does not start on a larger block boundary.
Convert uneven range
Results
The CIDR block list is an exact cover of the start and end address range. If several blocks are returned, use all of them together; dropping one block changes the covered range.
Boundaries
Start and end addresses must use the same IP version, and the start address must be lower than or equal to the end address. The result optimizes for the fewest CIDR blocks, not for provider ownership or routing policy.
Next steps
Advertisement