IPv4 CIDR cheat sheet
| Prefix | Netmask | Wildcard | Addresses | Usable hosts |
|---|
How subnetting works
An IPv4 address is 32 bits. The prefix length (the number after the slash) says how many of those bits identify the network; the rest identify hosts inside it. In a /24, the first 24 bits are the network and the last 8 bits leave 256 addresses. The first address is the network address and the last is the broadcast address, which leaves 254 usable hosts.
/31 networks (RFC 3021) are a special case for point-to-point links: both addresses are usable and there is no broadcast address. A /32 is a single host, often used for loopbacks and routes. Private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are not routed on the internet. 100.64.0.0/10 is the carrier-grade NAT range ISPs use between customers and their NAT.