The /24 prefix means the first 24 bits of the address identify the network and the remaining 8 identify the host. Written out, the mask is 255.255.255.0, in binary 11111111.11111111.11111111.00000000, and its Cisco wildcard or inverse form is 0.0.0.255. It covers 256 addresses, of which 254 can be given to hosts.
| CIDR prefix | /24 |
|---|---|
| Subnet mask | 255.255.255.0 |
| Mask in binary | 11111111.11111111.11111111.00000000 |
| Wildcard (inverse) mask | 0.0.0.255 |
| Host bits | 8 |
| Total addresses | 256 |
| Usable hosts | 254 |
| Block size (magic number) | whole octet 3 |
A 172.16.0.0/16 contains 256 subnets of /24. Here are the first 8, which is enough to see the pattern: each one starts 256 after the last in octet 3.
| Network | First host | Last host | Broadcast |
|---|---|---|---|
| 172.16.0.0/24 | 172.16.0.1 | 172.16.0.254 | 172.16.0.255 |
| 172.16.1.0/24 | 172.16.1.1 | 172.16.1.254 | 172.16.1.255 |
| 172.16.2.0/24 | 172.16.2.1 | 172.16.2.254 | 172.16.2.255 |
| 172.16.3.0/24 | 172.16.3.1 | 172.16.3.254 | 172.16.3.255 |
| 172.16.4.0/24 | 172.16.4.1 | 172.16.4.254 | 172.16.4.255 |
| 172.16.5.0/24 | 172.16.5.1 | 172.16.5.254 | 172.16.5.255 |
| 172.16.6.0/24 | 172.16.6.1 | 172.16.6.254 | 172.16.6.255 |
| 172.16.7.0/24 | 172.16.7.1 | 172.16.7.254 | 172.16.7.255 |
A /24 falls exactly on an octet boundary, so there is no magic number to work out: octet 3 of the mask is 255 and every subnet starts where the previous one ended, counting octet 3 up by one.
The /24 is the mental unit of IPv4. 254 usable addresses, one subnet per VLAN, the third octet as the subnet number and the fourth as the host. Most people who say "a subnet" mean a /24 without thinking about it.
A /24 holds 256 addresses in total. After reserving the network and broadcast addresses, 254 are usable by hosts.
The /24 subnet mask is 255.255.255.0 in dotted-decimal notation.
The wildcard mask, also called the inverse mask, is 0.0.0.255. It is the bitwise inverse of 255.255.255.0 and is what Cisco access lists and OSPF network statements expect.
The /24 mask written out bit by bit is 11111111.11111111.11111111.00000000: 24 ones followed by 8 zeros.