How many usable hosts in a /32? One.
A /32 is a single IP address: 1 usable host, with no network or broadcast address. Its netmask is 255.255.255.255. A /32 is a host route: a router's loopback address, a static route to one machine, or a firewall or security-group rule that matches exactly one IP.
/32 at a glance
- Prefix
- /32
- Netmask
- 255.255.255.255
- Wildcard
- 0.0.0.0
- Addresses
- 1
- Usable hosts
- 1
Example: 192.168.10.0/32
- Network
- 192.168.10.0 (a host address too)
- Broadcast
- None (single host)
- Hosts
- 192.168.10.0
Usable IPs in a /32 cloud subnet
No major cloud accepts a /32 subnet: AWS stops at /28, Azure and Google Cloud at /29.
| 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 | Not allowed (/2–/29 only) |
| Google Cloud VPCReserves 4: network, default gateway, second-to-last, broadcast | Not allowed (/4–/29 only) |
Single-host routes
A /32 has no hosts to share a subnet with, so there is no network or broadcast address to set aside. The one address is both the first and the last.
In AWS security groups and Azure NSGs, a source of 203.0.113.7/32 means “this one address and nothing else”.
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 /32?
255.255.255.255. In binary it is 32 ones followed by 0 zeros. The wildcard mask, which Cisco ACLs and OSPF use, is 0.0.0.0.
Can I put a /32 on a network interface?
Yes, for loopbacks and some routed setups, but a /32 has no neighbours on the same subnet. Traffic to anything else needs an explicit route, which is why /32s are used for loopbacks, VIPs and host routes rather than LANs.