CIDR reference · IPv4

The /24 CIDR block

256 addresses, 254 usable, subnet mask 255.255.255.0.

/24 · 255.255.255.0 Open in the calculator

The most familiar size: 256 addresses, 254 usable, mask 255.255.255.0 (the old "class C"). 192.168.1.0/24 is the default on most home routers. In a /24 the network address ends in .0 and the broadcast in .255; the usable hosts are .1 to .254.

Key numbers

Prefix length/24 (24 network bits, 8 host bits)
Subnet mask255.255.255.0
Mask in binary11111111.11111111.11111111.00000000
Wildcard mask0.0.0.255
Total addresses256
Usable hosts254 (total minus network and broadcast)
Block sizeIncrements of 1 in octet 3

Example ranges

Private (RFC 1918) blocks of this size. Click one to open it in the calculator.

BlockFirst addressLast addressUsable hosts
10.0.0.0/2410.0.0.010.0.0.25510.0.0.1 – 10.0.0.254
172.16.0.0/24172.16.0.0172.16.0.255172.16.0.1 – 172.16.0.254
192.168.0.0/24192.168.0.0192.168.0.255192.168.0.1 – 192.168.0.254

Usable addresses in the cloud

Cloud providers reserve a few addresses in every subnet for the router, DNS and future use, so the usable count is lower than the formula gives.

ProviderUsable in a /24Notes
AWS VPC subnet251Allowed (/16 to /28). AWS reserves the first four addresses and the last one.
Azure virtual network subnet251Allowed. Azure reserves the first four addresses and the last one.
Google Cloud subnet252Allowed. Google Cloud reserves the first two and the last two addresses.

How the numbers are derived

An IPv4 address has 32 bits. A /24 uses 24 of them for the network, leaving 8 host bits, so the block has 28 = 256 addresses. The first address (all host bits 0) is the network address and the last (all host bits 1) is the broadcast address, which leaves 254 for hosts. The subnet mask is 24 ones followed by 8 zeros, written in dotted decimal as 255.255.255.0; the wildcard mask 0.0.0.255 is its inverse, used in Cisco ACLs and OSPF configuration.

FAQ

How many hosts can a /24 have?

256 addresses in total, of which 254 are usable after removing the network and broadcast addresses. Cloud providers reserve a few more: 251 usable in AWS and Azure, 252 in Google Cloud.

What is the difference between /24 and 255.255.255.0?

None: they are two notations for the same mask. /24 counts the network bits; 255.255.255.0 shows them as a dotted mask.