Tools / cidr / common

How many usable hosts in a /16?

A /16 subnet has 65,536 IP addresses and 65,534 usable hosts. The first address is the network address and the last is the broadcast address, so neither can go on a host. Its netmask is 255.255.0.0 and its wildcard mask is 0.0.255.255.

/16 at a glance

Prefix
/16
Netmask
255.255.0.0
Wildcard
0.0.255.255
Addresses
65,536
Usable hosts
65,534

Example: 172.16.0.0/16

Network
172.16.0.0
Broadcast
172.16.255.255
Hosts
172.16.0.1 – 172.16.255.254

Usable IPs in a /16 cloud subnet

As a cloud subnet it leaves 65,531 usable on AWS and Azure, which reserve 5 addresses, and 65,532 on Google Cloud, which reserves 4.

ProviderUsable
AWS VPCReserves 5: network, VPC router, DNS, one held for future use, broadcast65,531
Azure VNetReserves 5: network, default gateway, two for Azure DNS, broadcast65,531
Google Cloud VPCReserves 4: network, default gateway, second-to-last, broadcast65,532

Questions

Quick answers.

Worked out with the same code as the CIDR calculator, which takes any IPv4 block and also splits it and checks overlaps.

What is the subnet mask for a /16?

255.255.0.0. In binary it is 16 ones followed by 16 zeros. The wildcard mask, which Cisco ACLs and OSPF use, is 0.0.255.255.

How many /24 subnets fit in a /16?

256. A /16 holds 65,536 addresses and a /24 holds 256, so it splits into 256 /24 subnets of 254 usable hosts each.