At a glance
- Owner
- StratQuad
- Version
- November 2026
- Applies to
- Network scoping, firewall rules, allow lists and incident investigation
- Mandatory
- Reference
Key points
- CIDR notation gives the network address and the number of fixed bits: 192.168.10.0/24 fixes the first 24 bits and leaves 8 for hosts.
- Usable IPv4 hosts in a subnet are 2 to the power of the host bits, minus 2 for the network and broadcast addresses (except /31 and /32).
- Private ranges (RFC 1918) are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. 100.64.0.0/10 is carrier grade NAT space.
- A typical IPv6 subnet is a /64.
IPv4 subnet sizes
| CIDR | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 (single host) |
| /31 | 255.255.255.254 | 2 | 2 (point to point links) |
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /27 | 255.255.255.224 | 32 | 30 |
| /26 | 255.255.255.192 | 64 | 62 |
| /25 | 255.255.255.128 | 128 | 126 |
| /24 | 255.255.255.0 | 256 | 254 |
| /23 | 255.255.254.0 | 512 | 510 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /21 | 255.255.248.0 | 2,048 | 2,046 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
Special IPv4 ranges
| Range | Use |
|---|---|
| 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 | Private networks (RFC 1918) |
| 100.64.0.0/10 | Shared address space for carrier grade NAT (RFC 6598) |
| 127.0.0.0/8 | Loopback |
| 169.254.0.0/16 | Link local; cloud instance metadata services use 169.254.169.254 |
| 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | Documentation examples |
| 224.0.0.0/4 | Multicast |
| 0.0.0.0/8 | "This network" |
IPv6 basics
| Prefix | Use |
|---|---|
| ::1/128 | Loopback |
| fe80::/10 | Link local |
| fc00::/7 | Unique local addresses (private) |
| 2000::/3 | Global unicast |
| ::ffff:0:0/96 | IPv4 mapped addresses |
| 2001:db8::/32, 3fff::/20 | Documentation examples |
Working it out
To find the range for 10.20.30.77/27: a /27 has 32 addresses, so blocks start at multiples of 32 in the last octet (0, 32, 64, 96). 77 falls in the block starting at 64, so the network is 10.20.30.64, the broadcast is 10.20.30.95, and usable hosts are .65 to .94.
Practitioner note
When writing allow lists or blocking attacker infrastructure, check whether an address sits in a cloud provider's or a CDN's shared range before blocking a whole block: you can cut off legitimate services. Conversely, include 169.254.169.254 and the IPv6 metadata address in server side request forgery protections, since attackers use them to steal cloud credentials.
Sources
- IETF. RFC 1918 Address Allocation for Private Internets (opens in a new tab)
- IETF. RFC 6598 IANA Reserved IPv4 Prefix for Shared Address Space (opens in a new tab)
- IANA. IANA IPv4 Special Purpose Address Registry (opens in a new tab)
- IANA. IANA IPv6 Special Purpose Address Registry (opens in a new tab)