HTTPfy

/12 subnet mask (255.240.0.0)

A /12 network has 20 host bits, 1,048,576 addresses and 1,048,574 usable hosts. It is 4,096 /24 networks.

/12 at a glance

Netmask
255.240.0.0
Wildcard mask
0.15.255.255
Hex mask
0xFFF00000
Binary mask
11111111.11110000.00000000.00000000
Host bits
20
Total addresses
1,048,576
Usable hosts
1,048,574 (minus network and broadcast)
Compared with a /24
4,096 /24 networks

Typical uses of a /12

A /12 is the size of 172.16.0.0/12 (RFC 1918), which runs from 172.16.0.0 to 172.31.255.255. Kubernetes clusters built with kubeadm use 10.96.0.0/12 for Service IPs by default. Docker carves its default bridge networks out of this range too.

Well-known /12 blocks

  • 172.16.0.0/12: Private network (RFC 1918)
  • 10.96.0.0/12: kubeadm default Kubernetes service CIDR

Example /12 ranges

NetworkNetwork addressFirst usableLast usableBroadcastNext /12
10.0.0.0/12 10.0.0.0 10.0.0.1 10.15.255.254 10.15.255.255 10.16.0.0/12 calculate
172.16.0.0/12 172.16.0.0 172.16.0.1 172.31.255.254 172.31.255.255 172.32.0.0/12 calculate

The /12 boundary falls in the second octet, so /12 networks start every 16 in that octet (16 per /8): 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240.

How many /12s fit

In aNumber of /12 subnets
/816

What a /12 contains

Smaller blockHow many
/1616
/244,096
/2616,384
/2865,536
/29131,072
/30262,144
/321,048,576

Splitting a /12

IntoSubnetsUsable hosts each
/132524,286
/144262,142
/158131,070
/161665,534

/12 in AWS, Azure and Google Cloud

PlatformAllowed subnet sizes/12 allowed?Usable after reservation
AWS VPC/16 to /28 No -
Azure VNet/2 to /29 Yes 1,048,571 (5 reserved)
Google Cloud VPC/4 to /29 Yes 1,048,572 (4 reserved)

Cloud providers reserve addresses in every subnet (first four and the last address (network, VPC router, DNS, future use, broadcast) on AWS), so the usable count there differs from the classic 2^n - 2.