SaveMyCert
IPv4 reference

/24 subnet mask (255.255.255.0)

A /24 is the subnet mask 255.255.255.0: 24 network bits and 8 host bits, giving 256 addresses and 254 usable hosts. Its wildcard mask is 0.0.0.255 and its block size is 256.

Subnet mask
255.255.255.0
Wildcard
0.0.0.255
Addresses
256
Usable hosts
254
Block size
256

The /24 mask in binary

The prefix is the number of 1 bits at the start of the mask. Ones mark the network part of an address, zeros the host part.

11111111.11111111.11111111.00000000

24 network bits, 8 host bits.

Every /24 in 172.16.0.0/16

A /16 holds 256 /24 subnets. The first eight and the last are listed; the rest follow the same step.

/24 subnets of 172.16.0.0/16
NetworkFirst hostLast hostBroadcast
172.16.0.0/24172.16.0.1172.16.0.254172.16.0.255
172.16.1.0/24172.16.1.1172.16.1.254172.16.1.255
172.16.2.0/24172.16.2.1172.16.2.254172.16.2.255
172.16.3.0/24172.16.3.1172.16.3.254172.16.3.255
172.16.4.0/24172.16.4.1172.16.4.254172.16.4.255
172.16.5.0/24172.16.5.1172.16.5.254172.16.5.255
172.16.6.0/24172.16.6.1172.16.6.254172.16.6.255
172.16.7.0/24172.16.7.1172.16.7.254172.16.7.255
172.16.255.0/24172.16.255.1172.16.255.254172.16.255.255

Where a /24 is used

A /24 (255.255.255.0) is the default mask of the old class C range and still the default size for a home or office LAN: 254 usable hosts, with the network decided by the first three octets.

AWS and Azure both reserve five addresses in every subnet, so a /24 subnet in either cloud has 251 usable addresses.

Usable addresses in a /24
WhereUsable addresses
Ordinary network254
AWS VPC subnet (5 reserved)251
Azure subnet (5 reserved)251

Worked example: 172.16.45.9/24

The block-size method, the way you would do it in an exam without a calculator.

  1. /24 means a mask of 255.255.255.0.
  2. The mask ends exactly on an octet boundary, so the fourth octet onwards is all host bits: zero it for the network, set it to 255 for the broadcast.
  3. Network address = 172.16.45.0; broadcast = the next block minus one = 172.16.45.255.
  4. Usable hosts run from the network plus one to the broadcast minus one: 172.16.45.1 to 172.16.45.254, which is 2^8 − 2 = 254 addresses.

Try another address in the subnet calculator, or practise without one on the subnetting practice questions.

/24 subnet mask: your questions

The subnet mask for /24 is 255.255.255.0. The prefix counts the 1 bits in the mask: 11111111.11111111.11111111.00000000 has 24 ones. The wildcard mask, used in Cisco ACLs and OSPF, is 0.0.0.255.

Other prefixes