The /12 everyone has seen is 172.16.0.0/12, the middle private range from RFC 1918. It runs from 172.16.0.0 to 172.31.255.255, which is why 172.20.x.x or 172.31.x.x addresses are private while 172.32.x.x is public. Docker Desktop picks its default bridge networks from this range, so containers on a Mac often get 172.17.x.x addresses.
Facts
- Prefix
- /12
- Subnet mask
- 255.240.0.0
- Wildcard mask
- 0.15.255.255
- Binary mask
- 11111111.11110000.00000000.00000000
- Total addresses
- 1,048,576
- Usable hosts
- 1,048,574
- Example range
- 10.0.0.0/12: 10.0.0.0 – 10.15.255.255
- Typical use
- The size of the private 172.16.0.0/12 range.
Try it
Try: , ,
- CIDR block
- 10.0.0.0/12
- IP range
- 10.0.0.0 – 10.15.255.255
- Addresses
- 1,048,576
- Usable hosts
- 1,048,574
- Subnet mask
- 255.240.0.0
- Wildcard mask
- 0.15.255.255
Frequently asked questions
How many hosts are in a /12?
A /12 has 1,048,576 addresses. Subtracting the network and broadcast addresses leaves 1,048,574 usable hosts.
What is the subnet mask for /12?
/12 is 255.240.0.0 (wildcard mask 0.15.255.255). In binary that’s 12 ones followed by 20 zeros.