What is CIDR?
CIDR — Classless Inter-Domain Routing — writes a network as
address/prefix, e.g., 192.168.1.0/24. The prefix is the number of
leading 1-bits in the subnet mask, which tells you how much of the address identifies the network and how
much identifies hosts within the network.
A /24 has 24 network bits and 8 host bits — 2⁸ = 256 addresses, 254 usable (reserving the network and broadcast addresses).
Prefix cheatsheet
| Prefix | Mask | Hosts | Common use |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | single host |
| /30 | 255.255.255.252 | 2 | point-to-point links |
| /29 | 255.255.255.248 | 6 | small office |
| /28 | 255.255.255.240 | 14 | VPC subnet |
| /24 | 255.255.255.0 | 254 | home / small LAN |
| /16 | 255.255.0.0 | 65,534 | class B equivalent |
| /8 | 255.0.0.0 | 16,777,214 | class A equivalent |
| /0 | 0.0.0.0 | all | default route |
Private IP ranges (RFC 1918)
- 10.0.0.0/8 — 16.7M addresses. Used by many corporate networks.
- 172.16.0.0/12 — 1M addresses. Docker's default range lives here.
- 192.168.0.0/16 — 65K addresses. Most home routers carve out 192.168.1.0/24 or 192.168.0.0/24.
- 100.64.0.0/10 — CGNAT (RFC 6598). ISPs use this when they run out of public IPv4.
- 169.254.0.0/16 — link-local. Auto-assigned when DHCP fails.
- 127.0.0.0/8 — loopback.
localhostis 127.0.0.1.
Network, broadcast, usable — the three special addresses
- Network address — all host bits set to 0. Identifies the subnet itself. Not assignable to a host.
- Broadcast address — all host bits set to 1. Sends to all hosts on the subnet. Not assignable.
- Usable host range — everything in between. So /24 has 256 addresses, 254 usable.
Exceptions: /31 (RFC 3021) is used for point-to-point links where both addresses are usable. /32 is a single-host route.
Wildcard mask — when and why
A wildcard mask is the inverse of a subnet mask. Cisco ACLs, OSPF, and some other tools use wildcards instead
of subnet masks. For /24, the subnet mask is 255.255.255.0 and the wildcard mask is
0.0.0.255.
FAQ
Does this support IPv6?
Not yet. IPv6 subnet math works on the same principles but uses 128-bit addresses. IPv6 mode is on the roadmap.
Can I split a subnet into smaller ones?
Enter the target prefix. For structured subnetting (take a /24, produce four /26s), a sub-splitter tool is coming.
Related tools
- UUID Generator — Generate UUID v4 and v7 identifiers in bulk.
- Regex Tester — Test regular expressions with live match highlighting and explanation.
- Timestamp Converter — Convert Unix timestamps, epoch seconds/milliseconds, and ISO 8601 dates.
- HTTP Status Codes — Full HTTP status code reference with explanations and when to use each.
Pillar
Part of Dev Productivity.
Written by Mian Ali Khalid. Last updated 2026-04-25.