172.16.0.0/12: network, broadcast and usable IPs
172.16.0.0/12 covers 1,048,576 IP addresses, from 172.16.0.0 to 172.31.255.255, with 1,048,574 usable hosts: 172.16.0.1 to 172.31.255.254. Its netmask is 255.240.0.0, and its scope is Private (RFC 1918). As a cloud subnet it leaves 1,048,571 usable on Azure and 1,048,572 on Google Cloud; it is too large for AWS, which allows /16 to /28.
Calculation
- CIDR
- 172.16.0.0/12
- Range
- 172.16.0.0 – 172.31.255.255
- Network
- 172.16.0.0
- Broadcast
- 172.31.255.255
- Netmask
- 255.240.0.0
- Wildcard
- 0.15.255.255
- First host
- 172.16.0.1
- Last host
- 172.31.255.254
- Addresses
- 1,048,576
- Usable hosts
- 1,048,574
- Class
- B
- Scope
- Private (RFC 1918)
Usable IPs in the cloud
| 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 | 1,048,571 |
| Google Cloud VPCReserves 4: network, default gateway, second-to-last, broadcast | 1,048,572 |
The middle RFC 1918 private range, 172.16.0.0 to 172.31.255.255. It is easy to misremember as 172.16.0.0/16, which is only its first sixteenth.
Split into four /14 subnets
172.16.0.0/12 holds 4 /14 blocks. See the /14 reference for that size, or the /12 reference for this block’s.
| Subnet | Hosts | Broadcast |
|---|---|---|
| 172.16.0.0/14 | 172.16.0.1 – 172.19.255.254 | 172.19.255.255 |
| 172.20.0.0/14 | 172.20.0.1 – 172.23.255.254 | 172.23.255.255 |
| 172.24.0.0/14 | 172.24.0.1 – 172.27.255.254 | 172.27.255.255 |
| 172.28.0.0/14 | 172.28.0.1 – 172.31.255.254 | 172.31.255.255 |
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.
Is 172.16.0.0/12 a private IP range?
Yes. 172.16.0.0/12 is one of the three private ranges defined in RFC 1918 (10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16). Those addresses aren’t routed on the public internet, so you can use them inside any VPC or LAN.
What are the first and last usable IPs in 172.16.0.0/12?
The first usable host is 172.16.0.1 and the last is 172.31.255.254. 172.16.0.0 is the network address and 172.31.255.255 is the broadcast address, so neither goes on a host.
Can I use 172.16.0.0/12 as an AWS VPC CIDR?
No, not as one block. AWS VPC CIDRs and subnets must be between /16 and /28, and 172.16.0.0/12 is a /12. Split it instead: it holds 16 /16 blocks, starting with 172.16.0.0/16, and each one can be a VPC.