/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 mask255.255.255.0
Wildcard mask0.0.0.255
Binary mask11111111.11111111.11111111.00000000
Total addresses256
Usable hosts254
Block size1 (third octet)

Example: 192.168.1.0/24

Network address192.168.1.0
First usable host192.168.1.1
Last usable host192.168.1.254
Broadcast address192.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

  1. Host bits: 32 − 24 = 8.
  2. Total addresses: 28 = 256.
  3. Usable hosts: 256 − 2 = 254, because the network and broadcast addresses can't be assigned to hosts.
  4. Subnet mask: 24 one-bits followed by 8 zero-bits. The third octet is 255 (256 − 1), which gives 255.255.255.0.
  5. 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.