HTTPfy

Subnet cheat sheet

All 33 IPv4 prefix lengths and the IPv6 sizes you actually deploy, with netmasks, host counts and cloud limits. Pick a prefix for its full breakdown.

IPv4 CIDR table

PrefixNetmaskWildcardAddressesUsable hostsSize vs /24
/0 0.0.0.0 255.255.255.255 4,294,967,296 4,294,967,294 16,777,216 /24 networks
/1 128.0.0.0 127.255.255.255 2,147,483,648 2,147,483,646 8,388,608 /24 networks
/2 192.0.0.0 63.255.255.255 1,073,741,824 1,073,741,822 4,194,304 /24 networks
/3 224.0.0.0 31.255.255.255 536,870,912 536,870,910 2,097,152 /24 networks
/4 240.0.0.0 15.255.255.255 268,435,456 268,435,454 1,048,576 /24 networks
/5 248.0.0.0 7.255.255.255 134,217,728 134,217,726 524,288 /24 networks
/6 252.0.0.0 3.255.255.255 67,108,864 67,108,862 262,144 /24 networks
/7 254.0.0.0 1.255.255.255 33,554,432 33,554,430 131,072 /24 networks
/8 255.0.0.0 0.255.255.255 16,777,216 16,777,214 65,536 /24 networks
/9 255.128.0.0 0.127.255.255 8,388,608 8,388,606 32,768 /24 networks
/10 255.192.0.0 0.63.255.255 4,194,304 4,194,302 16,384 /24 networks
/11 255.224.0.0 0.31.255.255 2,097,152 2,097,150 8,192 /24 networks
/12 255.240.0.0 0.15.255.255 1,048,576 1,048,574 4,096 /24 networks
/13 255.248.0.0 0.7.255.255 524,288 524,286 2,048 /24 networks
/14 255.252.0.0 0.3.255.255 262,144 262,142 1,024 /24 networks
/15 255.254.0.0 0.1.255.255 131,072 131,070 512 /24 networks
/16 255.255.0.0 0.0.255.255 65,536 65,534 256 /24 networks
/17 255.255.128.0 0.0.127.255 32,768 32,766 128 /24 networks
/18 255.255.192.0 0.0.63.255 16,384 16,382 64 /24 networks
/19 255.255.224.0 0.0.31.255 8,192 8,190 32 /24 networks
/20 255.255.240.0 0.0.15.255 4,096 4,094 16 /24 networks
/21 255.255.248.0 0.0.7.255 2,048 2,046 8 /24 networks
/22 255.255.252.0 0.0.3.255 1,024 1,022 4 /24 networks
/23 255.255.254.0 0.0.1.255 512 510 2 /24 networks
/24 255.255.255.0 0.0.0.255 256 254 1 /24 network
/25 255.255.255.128 0.0.0.127 128 126 1/2 of a /24
/26 255.255.255.192 0.0.0.63 64 62 1/4 of a /24
/27 255.255.255.224 0.0.0.31 32 30 1/8 of a /24
/28 255.255.255.240 0.0.0.15 16 14 1/16 of a /24
/29 255.255.255.248 0.0.0.7 8 6 1/32 of a /24
/30 255.255.255.252 0.0.0.3 4 2 1/64 of a /24
/31 255.255.255.254 0.0.0.1 2 2 1/128 of a /24
/32 255.255.255.255 0.0.0.0 1 1 1/256 of a /24

Common IPv6 prefixes

PrefixMaskHost bitsAddresses/64 subnets
/32 ffff:ffff:: 96 79,228,162,514,264,337,593,543,950,336 4,294,967,296
/48 ffff:ffff:ffff:: 80 1,208,925,819,614,629,174,706,176 65,536
/56 ffff:ffff:ffff:ff00:: 72 4,722,366,482,869,645,213,696 256
/60 ffff:ffff:ffff:fff0:: 68 295,147,905,179,352,825,856 16
/64 ffff:ffff:ffff:ffff:: 64 18,446,744,073,709,551,616 1
/112 ffff:ffff:ffff:ffff:ffff:ffff:ffff:0 16 65,536 part of one
/126 ffff:ffff:ffff:ffff:ffff:ffff:ffff:fffc 2 4 part of one
/127 ffff:ffff:ffff:ffff:ffff:ffff:ffff:fffe 1 2 part of one
/128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 0 1 part of one

How to read CIDR notation

The number after the slash is the prefix length: how many leading bits of the address identify the network. An IPv4 address has 32 bits, so a /n network leaves 32 - n host bits and holds 2^(32 - n) addresses. Each step down in prefix length doubles the size of the block; each step up halves it.

Usable hosts. In a normal IPv4 subnet the first address is the network address and the last is the broadcast address, so usable hosts are 2^(32 - n) - 2. Two exceptions: a /31 has two usable addresses on point-to-point links (RFC 3021), and a /32 is a single host.

Netmask and wildcard. The netmask has the prefix bits set to 1 (255.255.255.0 for a /24). The wildcard mask is its inverse (0.0.0.255) and is what Cisco ACLs and OSPF network statements expect.

Alignment. A /n block must start on a multiple of its own size. 192.168.1.64/26 is valid; 192.168.1.50/26 is really 192.168.1.0/26 written with a host address, and tools like the subnet calculator normalise it.

Private IPv4 ranges (RFC 1918)

100.64.0.0/10 (/10) is shared address space for carrier-grade NAT, not RFC 1918, but is also not routed on the internet.

Cloud subnet limits

ProviderIPv4 subnet sizesReserved per subnet
AWS VPC/16 to /285: first four and the last address (network, VPC router, DNS, future use, broadcast)
Azure VNet/2 to /295: first four and the last address (network, default gateway, two for Azure DNS, broadcast)
Google Cloud VPC/4 to /294: first two and last two addresses (network, default gateway, second-to-last, broadcast)

For IPv6, AWS subnets can be /44 to /64 in steps of /4, while Azure and Google Cloud subnets are always a /64.

IPv6 sizing in one paragraph

IPv6 addresses have 128 bits and the host part of a LAN is always 64 bits, so every LAN is a /64. Planning happens above that: a site usually gets a /48 (65,536 LANs) or a /56 (256 LANs), and links between routers use a /127. Prefix lengths that are multiples of 4 line up with hex digits, which keeps addresses readable and reverse DNS zones simple.