CIDR combines an IP address with a subnet mask: 192.168.1.0/24. The number after the slash is the network bit count.
CIDR Quick Reference
| CIDR | Mask | Hosts | Use Case |
|---|---|---|---|
| /24 | 255.255.255.0 | 254 | Office subnet |
| /16 | 255.255.0.0 | 65,534 | Data center |
| /30 | 255.255.255.252 | 2 | Point-to-point link |
| /32 | 255.255.255.255 | 1 | Single host |
Practical Examples
# UFW — allow an entire subnet
sudo ufw allow from 10.0.0.0/8
# WireGuard — route all traffic through VPN
AllowedIPs = 0.0.0.0/0, ::/0
💡 Online calculators: cidr.xyz or jodies.de/ipcalc instantly show address ranges, masks, and first/last hosts for any CIDR.