IPv4 subnet cheat sheet: CIDR sizes, masks and special ranges
The three tables everyone in this business keeps re-deriving: every prefix length from /8 to /30 with its address count and mask, the reserved ranges that explain the odd addresses in your logs, and the ASN ranges that are never real networks. Bookmark it, and when a number needs more than a table row, the linked explainers pick up from here.
The CIDR table, /8 to /30
The rule behind the whole table: the slash number counts fixed bits out of 32, and every remaining bit doubles the addresses. Notes are left n/a where a size has no special story; the sizes essay covers what the market-relevant rows mean in practice.
| Prefix | Addresses | Mask | Notes |
|---|---|---|---|
| /8 | 16,777,216 | 255.0.0.0 | One of the 256 top level blocks; institutions and legacy giants |
| /9 | 8,388,608 | 255.128.0.0 | n/a |
| /10 | 4,194,304 | 255.192.0.0 | The size of the CGNAT shared space 100.64.0.0/10 |
| /11 | 2,097,152 | 255.224.0.0 | n/a |
| /12 | 1,048,576 | 255.240.0.0 | The size of the RFC 1918 172.16.0.0 private range |
| /13 | 524,288 | 255.248.0.0 | n/a |
| /14 | 262,144 | 255.252.0.0 | n/a |
| /15 | 131,072 | 255.254.0.0 | n/a |
| /16 | 65,536 | 255.255.0.0 | An institution; 256 /24s |
| /17 | 32,768 | 255.255.128.0 | n/a |
| /18 | 16,384 | 255.255.192.0 | n/a |
| /19 | 8,192 | 255.255.224.0 | n/a |
| /20 | 4,096 | 255.255.240.0 | Serious infrastructure; 16 /24s |
| /21 | 2,048 | 255.255.248.0 | n/a |
| /22 | 1,024 | 255.255.252.0 | Common hosting working size; 4 /24s |
| /23 | 512 | 255.255.254.0 | n/a |
| /24 | 256 | 255.255.255.0 | The atom: the smallest block routed and traded on its own |
| /25 | 128 | 255.255.255.128 | Below the routing threshold; internal use only from here down |
| /26 | 64 | 255.255.255.192 | n/a |
| /27 | 32 | 255.255.255.224 | n/a |
| /28 | 16 | 255.255.255.240 | n/a |
| /29 | 8 | 255.255.255.248 | A common small hosting assignment; 6 usable hosts on a LAN |
| /30 | 4 | 255.255.255.252 | Point to point links; 2 usable hosts |
Reading the counts honestly
The counts are arithmetic totals. Used as a flat LAN, each subnet loses its first and last address to network and broadcast, which is why a /29 is listed as 6 usable and a /30 as 2. A gateway then takes one of those, so a /29 leaves 5 for hosts; on a /30 point-to-point link the 2 usable addresses are simply the two router interfaces. Used as a routed pool for services, nearly the whole count can work. The distinction matters when comparing per-address prices, and the sizing essay walks through it.
Special-use IPv4 ranges
These ranges have no registry holder and no public routing history, by design. Seeing one as a source on the open internet means something is leaking or spoofed, not that you found the user.
| Range | What it is | Defined by |
|---|---|---|
| 0.0.0.0/8 | "This network"; unspecified source | RFC 791 |
| 10.0.0.0/8 | Private space | RFC 1918 |
| 100.64.0.0/10 | Shared space for carrier NAT | RFC 6598 |
| 127.0.0.0/8 | Loopback | RFC 1122 |
| 169.254.0.0/16 | Link-local (self-assigned) | RFC 3927 |
| 172.16.0.0/12 | Private space | RFC 1918 |
| 192.0.2.0/24 | Documentation (TEST-NET-1) | RFC 5737 |
| 192.168.0.0/16 | Private space | RFC 1918 |
| 198.18.0.0/15 | Benchmarking | RFC 2544 |
| 198.51.100.0/24 | Documentation (TEST-NET-2) | RFC 5737 |
| 203.0.113.0/24 | Documentation (TEST-NET-3) | RFC 5737 |
| 224.0.0.0/4 | Multicast | RFC 5771 |
| 240.0.0.0/4 | Reserved for future use | RFC 1112 |
| 255.255.255.255/32 | Limited broadcast | RFC 919 |
ASN ranges worth recognising
The same idea applies to AS numbers: some ranges are never real networks, and recognising them saves chasing a ghost.
| Range | What it is | Defined by |
|---|---|---|
| 0 | Reserved; must not originate routes | RFC 7607 |
| 23456 | AS_TRANS, the 16-bit stand-in for 32-bit ASNs | RFC 6793 |
| 64496 to 64511 | Documentation | RFC 5398 |
| 64512 to 65534 | Private use | RFC 6996 |
| 65535 | Reserved | RFC 7300 |
| 65536 to 65551 | Documentation (32-bit examples) | RFC 5398 |
| 4200000000 to 4294967294 | Private use (32-bit) | RFC 6996 |
| 4294967295 | Reserved | RFC 7300 |
When a row is not enough
A table can tell you what a number is; it cannot tell you what the space behind it has been. When the question is a real block or a real network rather than a size, look it up: a reserved range answers instantly with its RFC story, and everything else answers with its registration, routing and dated reputation history. The cheat sheet is for the numbers that never change; the search box is for the ones that do.
Any address, prefix or AS number in these tables can be typed straight into the front page. Reserved space explains itself; everything else comes back with its history, dated and sourced.