IPv4 subnet calculator
Common prefixes
| Prefix | Netmask | Addresses | Usable hosts |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 (a single address) |
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /27 | 255.255.255.224 | 32 | 30 |
| /26 | 255.255.255.192 | 64 | 62 |
| /25 | 255.255.255.128 | 128 | 126 |
| /24 | 255.255.255.0 | 256 | 254 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
How it works
The prefix says how many of the 32 bits are the network part. A /24 keeps the first 24 bits for the network and leaves 8 bits, 256 addresses, for hosts. The first address is the network itself and the last is the broadcast, so 254 can be given to machines. A /31 is the exception: point-to-point links use both addresses.
Private ranges you can use at home or inside a server: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. On natbox, each server gets a private IPv4 address in 10.66.0.0/24 behind the shared public address, and a whole routed /80 of IPv6 (IPv6 subnet calculator).
More free tools: IPv6 subnet calculator, DNS lookup, all tools.