If you've seen something like 192.168.1.0/24 and wondered what on earth the "/24" means — you're in the right place. CIDR (pronounced "cider") notation is simply a shorthand way to write subnet masks.
The number after the slash (/) tells you how many bits of the IP address are dedicated to the network portion. The rest identify individual devices within that network.
192.168.1.0/24
^^
This /24 means: the first 24 bits (first 3 octets) are the NETWORK.
Since there are 32 bits total in an IPv4 address, that leaves 32 - 24 = 8 bits for devices. And 2⁸ = 256 addresses total (254 usable).
| CIDR | Subnet Mask | Total IPs | Usable Hosts | When to Use |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Huge organizations |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Large networks |
| /24 | 255.255.255.0 | 256 | 254 | Small office/home |
| /25 | 255.255.255.128 | 128 | 126 | Medium-small networks |
| /26 | 255.255.255.192 | 64 | 62 | Small teams |
| /27 | 255.255.255.224 | 32 | 30 | Workgroups |
| /28 | 255.255.255.240 | 16 | 14 | Small VLANs |
| /29 | 255.255.255.248 | 8 | 6 | Point-to-point links |
| /30 | 255.255.255.252 | 4 | 2 | Router connections |
| /32 | 255.255.255.255 | 1 | 0 | Single host (used for routing) |
Think of your network as a pizza:
Each step up (subtracting 1 from the CIDR number) cuts the pizza in half.
Your router probably uses: 192.168.1.1/24 - This means: 192.168.1.0 through 192.168.1.255 - That's 254 devices you can connect - Perfect for a typical home
You need separate networks for: - office: 10.0.1.0/24 (254 computers) - IoT devices: 10.0.2.0/24 (254 sensors/devices) - Guest wifi: 10.0.3.0/24 (254 guest devices)
When creating an AWS VPC, you might choose: - 10.0.0.0/16 (65,534 hosts) for the entire VPC - Then break it into /24 subnets for different availability zones
Here's the standard format:
[network address]/[CIDR prefix] Examples: 192.168.1.0/24 10.0.0.0/16 172.16.0.0/12 8.8.8.0/24
The network address is typically written with zeros for the host portion (e.g., 192.168.1.0/24, not 192.168.1.100/24), though any address in the range works for calculation purposes.
IPv6 uses 128 bits instead of 32, so you'll see CIDR like /64, /48, /32:
2001:db8::/32 - Documentation prefix fe80::/10 - Link-local (like 169.254.0.0/16 in IPv4) 2001:db8:cafe::/48 - Your organization's prefix
The math stays the same — only the numbers get bigger!
| Want to support... | Use this CIDR |
|---|---|
| ~16 million hosts | /8 |
| ~65,000 hosts | /16 |
| ~250 hosts | /24 |
| ~120 hosts | /25 |
| ~60 hosts | /26 |
| ~30 hosts | /27 |
| ~14 hosts | /28 |
| 2 routers only | /30 |