Skip to the content

/12 Subnet (255.240.0.0)

A /12 network has 1,048,576 addresses and the subnet mask 255.240.0.0. The private range 172.16.0.0/12 is the best-known example.

With or without a prefix: 192.168.1.10/24

/12

Network in CIDR notation

172.16.0.0/12

1,048,574 usable hosts, from 172.16.0.1 to 172.31.255.254.

Network address
172.16.0.0
Broadcast address
172.31.255.255
First usable host
172.16.0.1
Last usable host
172.31.255.254
Usable hosts
1,048,574
Total addresses
1,048,576
Subnet mask
255.240.0.0
Wildcard mask
0.15.255.255
IP class
B, default mask /16
Address type
Private (RFC 1918), in 172.16.0.0/12

In binary

Address
10101100.00010000.00000000.00000000
Mask
11111111.11110000.00000000.00000000
Network
10101100.00010000.00000000.00000000
Broadcast
10101100.00011111.11111111.11111111

The line marks where the network part ends: 12 network bits to its left, 20 host bits to its right.

Split into smaller subnets

4 subnets of /14, 262,142 usable hosts each.

  1. 172.16.0.0/14Hosts 172.16.0.1 – 172.19.255.254Broadcast 172.19.255.255
  2. 172.20.0.0/14Hosts 172.20.0.1 – 172.23.255.254Broadcast 172.23.255.255
  3. 172.24.0.0/14Hosts 172.24.0.1 – 172.27.255.254Broadcast 172.27.255.255
  4. 172.28.0.0/14Hosts 172.28.0.1 – 172.31.255.254Broadcast 172.31.255.255
Share this tool:TwitterFacebookLinkedInWhatsAppEmail

/12 at a glance

Subnet mask
255.240.0.0
Mask in binary
11111111.11110000.00000000.00000000
Wildcard mask
0.15.255.255
Addresses in one network
1,048,576
Usable for hosts
1,048,574
Networks of this size
16 in a /8

Where /12 networks begin

The mask stops inside the second number of the address, and one network covers 16 values of it. A new network begins wherever that number is a multiple of 16: 0, 16, 32, 48 and so on up to 240.

172.0.0.0/8 divided into 16 networks of /12

  1. 172.0.0.0/12Hosts 172.0.0.1 – 172.15.255.254Broadcast 172.15.255.255
  2. 172.16.0.0/12Hosts 172.16.0.1 – 172.31.255.254Broadcast 172.31.255.255
  3. 172.32.0.0/12Hosts 172.32.0.1 – 172.47.255.254Broadcast 172.47.255.255
  4. 172.48.0.0/12Hosts 172.48.0.1 – 172.63.255.254Broadcast 172.63.255.255
  5. 172.64.0.0/12Hosts 172.64.0.1 – 172.79.255.254Broadcast 172.79.255.255
  6. 172.80.0.0/12Hosts 172.80.0.1 – 172.95.255.254Broadcast 172.95.255.255
  7. 172.96.0.0/12Hosts 172.96.0.1 – 172.111.255.254Broadcast 172.111.255.255
  8. 172.112.0.0/12Hosts 172.112.0.1 – 172.127.255.254Broadcast 172.127.255.255
  9. 172.128.0.0/12Hosts 172.128.0.1 – 172.143.255.254Broadcast 172.143.255.255
  10. 172.144.0.0/12Hosts 172.144.0.1 – 172.159.255.254Broadcast 172.159.255.255
  11. 172.160.0.0/12Hosts 172.160.0.1 – 172.175.255.254Broadcast 172.175.255.255
  12. 172.176.0.0/12Hosts 172.176.0.1 – 172.191.255.254Broadcast 172.191.255.255
  13. 172.192.0.0/12Hosts 172.192.0.1 – 172.207.255.254Broadcast 172.207.255.255
  14. 172.208.0.0/12Hosts 172.208.0.1 – 172.223.255.254Broadcast 172.223.255.255
  15. 172.224.0.0/12Hosts 172.224.0.1 – 172.239.255.254Broadcast 172.239.255.255
  16. 172.240.0.0/12Hosts 172.240.0.1 – 172.255.255.254Broadcast 172.255.255.255

In practice

For the private range this means 172.16 up to and including 172.31, which is sixteen /16 networks. It is the range people get wrong most often: 172.32.0.0 and everything above it is public address space, and so is 172.15.255.255 just below.

Docker takes its default network, 172.17.0.0/16, from this range. A company network that also uses 172.17 can therefore become unreachable from a machine that runs Docker.

The subnet calculator takes any address with any prefix or mask, explains the address classes and the private ranges, and splits a network into subnets.