CIDR — Prefixes and Block Sizes
Writing 255.255.255.192 every time is slow, and reading it is slower. Engineers write 192.168.10.64/26 instead. That slash number is CIDR notation, and with one small trick it lets you find any address's subnet, broadcast and host range in your head — the core skill of a subnet plan.
The rule
The slash counts the network bits; the block size is 256 minus the mask octet.
CIDR (Classless Inter-Domain Routing) writes a network as an address plus a prefix length: the number of 1s in the mask. /24 = 255.255.255.0, /26 = 255.255.255.192, /16 = 255.255.0.0. Host bits = 32 − prefix. It replaced the old fixed "class A, B, C" sizes, so a network can be any size that is a power of two.
The prefixes worth knowing by heart for the last octet:
| Prefix | Mask | Block size | Usable hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
The block size is how far apart the subnets start. Subnets always begin at multiples of it: for /26, at .0, .64, .128 and .192.