How many usable hosts in a /8?
A /8 subnet has 16,777,216 IP addresses and 16,777,214 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.0.0.0 and its wildcard mask is 0.255.255.255.
/8 at a glance
- Prefix
- /8
- Netmask
- 255.0.0.0
- Wildcard
- 0.255.255.255
- Addresses
- 16,777,216
- Usable hosts
- 16,777,214
Example: 10.0.0.0/8
- Network
- 10.0.0.0
- Broadcast
- 10.255.255.255
- Hosts
- 10.0.0.1 – 10.255.255.254
Usable IPs in a /8 cloud subnet
As a cloud subnet it leaves 16,777,211 usable on Azure and 16,777,212 on Google Cloud; it is too large for AWS, which allows /16 to /28.
| Provider | Usable |
|---|---|
| AWS VPCReserves 5: network, VPC router, DNS, one held for future use, broadcast | Not allowed (/16–/28 only) |
| Azure VNetReserves 5: network, default gateway, two for Azure DNS, broadcast | 16,777,211 |
| Google Cloud VPCReserves 4: network, default gateway, second-to-last, broadcast | 16,777,212 |
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 /8?
255.0.0.0. In binary it is 8 ones followed by 24 zeros. The wildcard mask, which Cisco ACLs and OSPF use, is 0.255.255.255.
How many /24 subnets fit in a /8?
65,536. A /8 holds 16,777,216 addresses and a /24 holds 256, so it splits into 65,536 /24 subnets of 254 usable hosts each.