/24 Subnet Mask
A /24 subnet mask is 255.255.255.0. It has 256 addresses, 254 usable hosts and the wildcard mask 0.0.0.255.
| CIDR prefix | /24 |
|---|---|
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| Binary mask | 11111111.11111111.11111111.00000000 |
| Total addresses | 256 |
| Usable hosts | 254 |
| Block size | 1 (third octet) |
Example: 192.168.1.0/24
| Network address | 192.168.1.0 |
|---|---|
| First usable host | 192.168.1.1 |
| Last usable host | 192.168.1.254 |
| Broadcast address | 192.168.1.255 |
Where /24 subnets start
/24 networks start on multiples of 1 in the third octet (0, 1, 2, 3, …). A /16 holds 256 /24 subnets.
How to calculate a /24 subnet
- Host bits: 32 − 24 = 8.
- Total addresses: 28 = 256.
- Usable hosts: 256 − 2 = 254, because the network and broadcast addresses can't be assigned to hosts.
- Subnet mask: 24 one-bits followed by 8 zero-bits. The third octet is 255 (256 − 1), which gives 255.255.255.0.
- Wildcard mask: 255.255.255.255 − 255.255.255.0 = 0.0.0.255.
When to use a /24
A /24 is the most common LAN size. It is also the smallest prefix generally accepted for routing on the global internet (BGP).
Updated . Calculate any network with the subnet calculator, or compare all prefixes in the subnet cheat sheet.