Network Engineering: A Practical Guide to IPv4 Range Expander
August 18, 2026 · The Devs Tools Team
A CIDR block like 192.168.1.0/24 is compact notation for an entire set of addresses, but working with firewall allowlists, DHCP reservation pools, or vulnerability scan targets often requires the opposite of compactness: the full, explicit list of every address the block contains. The prefix length after the slash tells you exactly how many addresses are in scope — a smaller prefix number covers a larger block, since it leaves more of the 32 bits free to vary as host bits. A /24 fixes the first 24 bits and leaves 8 bits free, yielding 2⁸ = 256 possible addresses; a /30 fixes 30 bits and leaves only 2, yielding 2² = 4 addresses. This exponential relationship means a one-digit change in the prefix can swing the address count by a factor of two, four, or more, which is exactly the kind of arithmetic that's easy to get subtly wrong when done by hand under time pressure. Beyond CIDR notation, ranges are also frequently expressed as a simple hyphenated pair, like 10.0.0.5-10.0.0.10, which needs no exponent math at all — just an inclusive walk from the first address to the last. A range expander handles both input styles and mechanically enumerates every address in between, which is exactly the kind of repetitive, error-prone task that should never be done manually.
[!TIP] Need to expand a CIDR block or address range into a full list right now? Try our free, local IPv4 Range Expander to enumerate every address completely offline.
CIDR Prefix to Address Count
The number of addresses in a CIDR block is always 2 raised to the number of remaining host bits (32 minus the prefix length):
/24 -> 2^(32-24) = 2^8 = 256 addresses (e.g. 192.168.1.0 - 192.168.1.255)
/30 -> 2^(32-30) = 2^2 = 4 addresses (e.g. 192.168.1.0 - 192.168.1.3)
/28 -> 2^(32-28) = 2^4 = 16 addresses
/16 -> 2^(32-16) = 2^16 = 65,536 addresses
Note that this expanded count includes the network address and, where applicable, the broadcast address — the range expander lists every address in the block, not just the assignable host addresses (that host-usability distinction is what the subnet calculator handles separately).
Worked Example: /30 Expansion
192.168.1.0/30 fixes the first 30 bits, leaving 2 host bits free — exactly 4 combinations:
192.168.1.0 (network address)
192.168.1.1
192.168.1.2
192.168.1.3 (broadcast address)
Hyphenated Ranges
A range like 10.0.0.5-10.0.0.10 doesn't require any power-of-two math — it's simply every address from the start to the end, inclusive, treating the last octet (or the full 32-bit value, if the range crosses octet boundaries) as a linear counter: 10.0.0.5, 10.0.0.6, 10.0.0.7, 10.0.0.8, 10.0.0.9, 10.0.0.10 — six addresses total.
Conclusion
Whether you're starting from CIDR notation or a hyphenated pair, expanding a block into individual addresses is mechanical but unforgiving of arithmetic slips, especially at scale where a miscount of even one address can break a firewall rule or DHCP pool. A dedicated expander removes the manual exponent math entirely and gives you the exact, complete list every time.
