How many usable hosts in a /18?
A /18 subnet has 16,384 IP addresses and 16,382 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.192.0 and its wildcard mask is 0.0.63.255.
/18 at a glance
- Prefix
- /18
- Netmask
- 255.255.192.0
- Wildcard
- 0.0.63.255
- Addresses
- 16,384
- Usable hosts
- 16,382
Example: 172.16.0.0/18
- Network
- 172.16.0.0
- Broadcast
- 172.16.63.255
- Hosts
- 172.16.0.1 – 172.16.63.254
Usable IPs in a /18 cloud subnet
As a cloud subnet it leaves 16,379 usable on AWS and Azure, which reserve 5 addresses, and 16,380 on Google Cloud, which reserves 4.
| Provider | Usable |
|---|---|
| AWS VPCReserves 5: network, VPC router, DNS, one held for future use, broadcast | 16,379 |
| Azure VNetReserves 5: network, default gateway, two for Azure DNS, broadcast | 16,379 |
| Google Cloud VPCReserves 4: network, default gateway, second-to-last, broadcast | 16,380 |
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 /18?
255.255.192.0. In binary it is 18 ones followed by 14 zeros. The wildcard mask, which Cisco ACLs and OSPF use, is 0.0.63.255.
How many /18 subnets fit in a /16?
4. Each extra prefix bit halves the block, so a /16 (65,536 addresses) splits into 4 /18 subnets of 16,384 addresses each.