/16 subnet: 255.255.0.0, 65,536 addresses

65,536 addresses (65,534 usable hosts)

A /16 has the netmask 255.255.0.0 and holds 65,536 addresses, 65,534 of them usable hosts. The first two octets are fixed, so 10.0.0.0/16 runs from 10.0.0.0 to 10.0.255.255. It’s the old class B size, and 192.168.0.0/16 is the smallest of the three RFC 1918 private ranges.

The numbers

Network        10.0.0.0/16
Broadcast      10.0.255.255
Netmask        255.255.0.0
Wildcard       0.0.255.255
First host     10.0.0.1
Last host      10.0.255.254

How it fits

A /8 holds 256 /16s, and the private range 172.16.0.0/12 holds 16, from 172.16.0.0/16 to 172.31.0.0/16. A /16 splits into 4 /18s, 16 /20s, 64 /22s or 256 /24s; the tool below lists the /24s, 10.0.0.0/24 to 10.0.255.0/24.

Where you’ll see it

  • AWS VPCs. /16 is the largest CIDR a VPC can have, and every region’s default VPC is 172.31.0.0/16.
  • Docker. The default bridge network, docker0, is 172.17.0.0/16 with the host at 172.17.0.1. User-defined networks take the next /16s, 172.18.0.0/16 onward.
  • Kubernetes. Flannel’s default pod network is 10.244.0.0/16 and Calico’s manifests default to 192.168.0.0/16. k3s uses 10.42.0.0/16 for pods and 10.43.0.0/16 for services, and EKS picks 10.100.0.0/16 or 172.20.0.0/16 for services.
  • Link-local. 169.254.0.0/16 (RFC 3927) is where a host gives itself an address when DHCP fails, and where cloud instance metadata lives, at 169.254.169.254.

Gotchas

  • Overlaps. A /16 is big enough to collide with something. Calico’s 192.168.0.0/16 covers every home LAN in 192.168.x.0/24, and on a Docker host, 172.17.0.0/16 beats a broader VPN route such as 172.16.0.0/12, so the host can’t reach remote addresses inside 172.17.0.0/16. Move Docker with bip and default-address-pools in /etc/docker/daemon.json, and pick the CNI’s pool before the cluster is built.
  • Peering. Two VPCs that are both 10.0.0.0/16 can’t peer. Neither can 10.0.0.0/16 and 10.0.128.0/17: the second is the upper half of the first.
  • Don’t hand it all out. Cutting a VPC into 256 /24s on day one leaves no room for a bigger subnet later. Allocate /20s per tier or zone and split those, and leave gaps.

In your stack

# Terraform: three /20s, one per availability zone, and the third /24
cidrsubnets("10.0.0.0/16", 4, 4, 4)    # ["10.0.0.0/20", "10.0.16.0/20", "10.0.32.0/20"]
cidrsubnet("10.0.0.0/16", 8, 2)        # "10.0.2.0/24"
import ipaddress
vpc = ipaddress.ip_network("10.0.0.0/16")
vpc.overlaps(ipaddress.ip_network("10.0.128.0/17"))   # True: these two can't peer
aws ec2 create-vpc --cidr-block 10.0.0.0/16
iptables -A INPUT -s 10.0.0.0/16 -j ACCEPT

Try it in the CIDR & Subnet Calculator

10.0.0.0/16 Private (RFC 1918)

Network10.0.0.0/16
Broadcast10.0.255.255
Netmask255.255.0.0
Wildcard0.0.255.255
Mask, binary11111111.11111111.00000000.00000000
First host10.0.0.1
Last host10.0.255.254
Addresses65536
Usable hosts65534
KindPrivate (RFC 1918)

256 subnets of /24.

SubnetFirstLast
10.0.0.0/2410.0.0.010.0.0.255
10.0.1.0/2410.0.1.010.0.1.255
10.0.2.0/2410.0.2.010.0.2.255
10.0.3.0/2410.0.3.010.0.3.255
10.0.4.0/2410.0.4.010.0.4.255
10.0.5.0/2410.0.5.010.0.5.255
10.0.6.0/2410.0.6.010.0.6.255
10.0.7.0/2410.0.7.010.0.7.255
10.0.8.0/2410.0.8.010.0.8.255
10.0.9.0/2410.0.9.010.0.9.255
10.0.10.0/2410.0.10.010.0.10.255
10.0.11.0/2410.0.11.010.0.11.255
10.0.12.0/2410.0.12.010.0.12.255
10.0.13.0/2410.0.13.010.0.13.255
10.0.14.0/2410.0.14.010.0.14.255
10.0.15.0/2410.0.15.010.0.15.255
10.0.16.0/2410.0.16.010.0.16.255
10.0.17.0/2410.0.17.010.0.17.255
10.0.18.0/2410.0.18.010.0.18.255
10.0.19.0/2410.0.19.010.0.19.255
10.0.20.0/2410.0.20.010.0.20.255
10.0.21.0/2410.0.21.010.0.21.255
10.0.22.0/2410.0.22.010.0.22.255
10.0.23.0/2410.0.23.010.0.23.255
10.0.24.0/2410.0.24.010.0.24.255
10.0.25.0/2410.0.25.010.0.25.255
10.0.26.0/2410.0.26.010.0.26.255
10.0.27.0/2410.0.27.010.0.27.255
10.0.28.0/2410.0.28.010.0.28.255
10.0.29.0/2410.0.29.010.0.29.255
10.0.30.0/2410.0.30.010.0.30.255
10.0.31.0/2410.0.31.010.0.31.255
10.0.32.0/2410.0.32.010.0.32.255
10.0.33.0/2410.0.33.010.0.33.255
10.0.34.0/2410.0.34.010.0.34.255
10.0.35.0/2410.0.35.010.0.35.255
10.0.36.0/2410.0.36.010.0.36.255
10.0.37.0/2410.0.37.010.0.37.255
10.0.38.0/2410.0.38.010.0.38.255
10.0.39.0/2410.0.39.010.0.39.255
10.0.40.0/2410.0.40.010.0.40.255
10.0.41.0/2410.0.41.010.0.41.255
10.0.42.0/2410.0.42.010.0.42.255
10.0.43.0/2410.0.43.010.0.43.255
10.0.44.0/2410.0.44.010.0.44.255
10.0.45.0/2410.0.45.010.0.45.255
10.0.46.0/2410.0.46.010.0.46.255
10.0.47.0/2410.0.47.010.0.47.255
10.0.48.0/2410.0.48.010.0.48.255
10.0.49.0/2410.0.49.010.0.49.255
10.0.50.0/2410.0.50.010.0.50.255
10.0.51.0/2410.0.51.010.0.51.255
10.0.52.0/2410.0.52.010.0.52.255
10.0.53.0/2410.0.53.010.0.53.255
10.0.54.0/2410.0.54.010.0.54.255
10.0.55.0/2410.0.55.010.0.55.255
10.0.56.0/2410.0.56.010.0.56.255
10.0.57.0/2410.0.57.010.0.57.255
10.0.58.0/2410.0.58.010.0.58.255
10.0.59.0/2410.0.59.010.0.59.255
10.0.60.0/2410.0.60.010.0.60.255
10.0.61.0/2410.0.61.010.0.61.255
10.0.62.0/2410.0.62.010.0.62.255
10.0.63.0/2410.0.63.010.0.63.255
10.0.64.0/2410.0.64.010.0.64.255
10.0.65.0/2410.0.65.010.0.65.255
10.0.66.0/2410.0.66.010.0.66.255
10.0.67.0/2410.0.67.010.0.67.255
10.0.68.0/2410.0.68.010.0.68.255
10.0.69.0/2410.0.69.010.0.69.255
10.0.70.0/2410.0.70.010.0.70.255
10.0.71.0/2410.0.71.010.0.71.255
10.0.72.0/2410.0.72.010.0.72.255
10.0.73.0/2410.0.73.010.0.73.255
10.0.74.0/2410.0.74.010.0.74.255
10.0.75.0/2410.0.75.010.0.75.255
10.0.76.0/2410.0.76.010.0.76.255
10.0.77.0/2410.0.77.010.0.77.255
10.0.78.0/2410.0.78.010.0.78.255
10.0.79.0/2410.0.79.010.0.79.255
10.0.80.0/2410.0.80.010.0.80.255
10.0.81.0/2410.0.81.010.0.81.255
10.0.82.0/2410.0.82.010.0.82.255
10.0.83.0/2410.0.83.010.0.83.255
10.0.84.0/2410.0.84.010.0.84.255
10.0.85.0/2410.0.85.010.0.85.255
10.0.86.0/2410.0.86.010.0.86.255
10.0.87.0/2410.0.87.010.0.87.255
10.0.88.0/2410.0.88.010.0.88.255
10.0.89.0/2410.0.89.010.0.89.255
10.0.90.0/2410.0.90.010.0.90.255
10.0.91.0/2410.0.91.010.0.91.255
10.0.92.0/2410.0.92.010.0.92.255
10.0.93.0/2410.0.93.010.0.93.255
10.0.94.0/2410.0.94.010.0.94.255
10.0.95.0/2410.0.95.010.0.95.255
10.0.96.0/2410.0.96.010.0.96.255
10.0.97.0/2410.0.97.010.0.97.255
10.0.98.0/2410.0.98.010.0.98.255
10.0.99.0/2410.0.99.010.0.99.255
10.0.100.0/2410.0.100.010.0.100.255
10.0.101.0/2410.0.101.010.0.101.255
10.0.102.0/2410.0.102.010.0.102.255
10.0.103.0/2410.0.103.010.0.103.255
10.0.104.0/2410.0.104.010.0.104.255
10.0.105.0/2410.0.105.010.0.105.255
10.0.106.0/2410.0.106.010.0.106.255
10.0.107.0/2410.0.107.010.0.107.255
10.0.108.0/2410.0.108.010.0.108.255
10.0.109.0/2410.0.109.010.0.109.255
10.0.110.0/2410.0.110.010.0.110.255
10.0.111.0/2410.0.111.010.0.111.255
10.0.112.0/2410.0.112.010.0.112.255
10.0.113.0/2410.0.113.010.0.113.255
10.0.114.0/2410.0.114.010.0.114.255
10.0.115.0/2410.0.115.010.0.115.255
10.0.116.0/2410.0.116.010.0.116.255
10.0.117.0/2410.0.117.010.0.117.255
10.0.118.0/2410.0.118.010.0.118.255
10.0.119.0/2410.0.119.010.0.119.255
10.0.120.0/2410.0.120.010.0.120.255
10.0.121.0/2410.0.121.010.0.121.255
10.0.122.0/2410.0.122.010.0.122.255
10.0.123.0/2410.0.123.010.0.123.255
10.0.124.0/2410.0.124.010.0.124.255
10.0.125.0/2410.0.125.010.0.125.255
10.0.126.0/2410.0.126.010.0.126.255
10.0.127.0/2410.0.127.010.0.127.255
10.0.128.0/2410.0.128.010.0.128.255
10.0.129.0/2410.0.129.010.0.129.255
10.0.130.0/2410.0.130.010.0.130.255
10.0.131.0/2410.0.131.010.0.131.255
10.0.132.0/2410.0.132.010.0.132.255
10.0.133.0/2410.0.133.010.0.133.255
10.0.134.0/2410.0.134.010.0.134.255
10.0.135.0/2410.0.135.010.0.135.255
10.0.136.0/2410.0.136.010.0.136.255
10.0.137.0/2410.0.137.010.0.137.255
10.0.138.0/2410.0.138.010.0.138.255
10.0.139.0/2410.0.139.010.0.139.255
10.0.140.0/2410.0.140.010.0.140.255
10.0.141.0/2410.0.141.010.0.141.255
10.0.142.0/2410.0.142.010.0.142.255
10.0.143.0/2410.0.143.010.0.143.255
10.0.144.0/2410.0.144.010.0.144.255
10.0.145.0/2410.0.145.010.0.145.255
10.0.146.0/2410.0.146.010.0.146.255
10.0.147.0/2410.0.147.010.0.147.255
10.0.148.0/2410.0.148.010.0.148.255
10.0.149.0/2410.0.149.010.0.149.255
10.0.150.0/2410.0.150.010.0.150.255
10.0.151.0/2410.0.151.010.0.151.255
10.0.152.0/2410.0.152.010.0.152.255
10.0.153.0/2410.0.153.010.0.153.255
10.0.154.0/2410.0.154.010.0.154.255
10.0.155.0/2410.0.155.010.0.155.255
10.0.156.0/2410.0.156.010.0.156.255
10.0.157.0/2410.0.157.010.0.157.255
10.0.158.0/2410.0.158.010.0.158.255
10.0.159.0/2410.0.159.010.0.159.255
10.0.160.0/2410.0.160.010.0.160.255
10.0.161.0/2410.0.161.010.0.161.255
10.0.162.0/2410.0.162.010.0.162.255
10.0.163.0/2410.0.163.010.0.163.255
10.0.164.0/2410.0.164.010.0.164.255
10.0.165.0/2410.0.165.010.0.165.255
10.0.166.0/2410.0.166.010.0.166.255
10.0.167.0/2410.0.167.010.0.167.255
10.0.168.0/2410.0.168.010.0.168.255
10.0.169.0/2410.0.169.010.0.169.255
10.0.170.0/2410.0.170.010.0.170.255
10.0.171.0/2410.0.171.010.0.171.255
10.0.172.0/2410.0.172.010.0.172.255
10.0.173.0/2410.0.173.010.0.173.255
10.0.174.0/2410.0.174.010.0.174.255
10.0.175.0/2410.0.175.010.0.175.255
10.0.176.0/2410.0.176.010.0.176.255
10.0.177.0/2410.0.177.010.0.177.255
10.0.178.0/2410.0.178.010.0.178.255
10.0.179.0/2410.0.179.010.0.179.255
10.0.180.0/2410.0.180.010.0.180.255
10.0.181.0/2410.0.181.010.0.181.255
10.0.182.0/2410.0.182.010.0.182.255
10.0.183.0/2410.0.183.010.0.183.255
10.0.184.0/2410.0.184.010.0.184.255
10.0.185.0/2410.0.185.010.0.185.255
10.0.186.0/2410.0.186.010.0.186.255
10.0.187.0/2410.0.187.010.0.187.255
10.0.188.0/2410.0.188.010.0.188.255
10.0.189.0/2410.0.189.010.0.189.255
10.0.190.0/2410.0.190.010.0.190.255
10.0.191.0/2410.0.191.010.0.191.255
10.0.192.0/2410.0.192.010.0.192.255
10.0.193.0/2410.0.193.010.0.193.255
10.0.194.0/2410.0.194.010.0.194.255
10.0.195.0/2410.0.195.010.0.195.255
10.0.196.0/2410.0.196.010.0.196.255
10.0.197.0/2410.0.197.010.0.197.255
10.0.198.0/2410.0.198.010.0.198.255
10.0.199.0/2410.0.199.010.0.199.255
10.0.200.0/2410.0.200.010.0.200.255
10.0.201.0/2410.0.201.010.0.201.255
10.0.202.0/2410.0.202.010.0.202.255
10.0.203.0/2410.0.203.010.0.203.255
10.0.204.0/2410.0.204.010.0.204.255
10.0.205.0/2410.0.205.010.0.205.255
10.0.206.0/2410.0.206.010.0.206.255
10.0.207.0/2410.0.207.010.0.207.255
10.0.208.0/2410.0.208.010.0.208.255
10.0.209.0/2410.0.209.010.0.209.255
10.0.210.0/2410.0.210.010.0.210.255
10.0.211.0/2410.0.211.010.0.211.255
10.0.212.0/2410.0.212.010.0.212.255
10.0.213.0/2410.0.213.010.0.213.255
10.0.214.0/2410.0.214.010.0.214.255
10.0.215.0/2410.0.215.010.0.215.255
10.0.216.0/2410.0.216.010.0.216.255
10.0.217.0/2410.0.217.010.0.217.255
10.0.218.0/2410.0.218.010.0.218.255
10.0.219.0/2410.0.219.010.0.219.255
10.0.220.0/2410.0.220.010.0.220.255
10.0.221.0/2410.0.221.010.0.221.255
10.0.222.0/2410.0.222.010.0.222.255
10.0.223.0/2410.0.223.010.0.223.255
10.0.224.0/2410.0.224.010.0.224.255
10.0.225.0/2410.0.225.010.0.225.255
10.0.226.0/2410.0.226.010.0.226.255
10.0.227.0/2410.0.227.010.0.227.255
10.0.228.0/2410.0.228.010.0.228.255
10.0.229.0/2410.0.229.010.0.229.255
10.0.230.0/2410.0.230.010.0.230.255
10.0.231.0/2410.0.231.010.0.231.255
10.0.232.0/2410.0.232.010.0.232.255
10.0.233.0/2410.0.233.010.0.233.255
10.0.234.0/2410.0.234.010.0.234.255
10.0.235.0/2410.0.235.010.0.235.255
10.0.236.0/2410.0.236.010.0.236.255
10.0.237.0/2410.0.237.010.0.237.255
10.0.238.0/2410.0.238.010.0.238.255
10.0.239.0/2410.0.239.010.0.239.255
10.0.240.0/2410.0.240.010.0.240.255
10.0.241.0/2410.0.241.010.0.241.255
10.0.242.0/2410.0.242.010.0.242.255
10.0.243.0/2410.0.243.010.0.243.255
10.0.244.0/2410.0.244.010.0.244.255
10.0.245.0/2410.0.245.010.0.245.255
10.0.246.0/2410.0.246.010.0.246.255
10.0.247.0/2410.0.247.010.0.247.255
10.0.248.0/2410.0.248.010.0.248.255
10.0.249.0/2410.0.249.010.0.249.255
10.0.250.0/2410.0.250.010.0.250.255
10.0.251.0/2410.0.251.010.0.251.255
10.0.252.0/2410.0.252.010.0.252.255
10.0.253.0/2410.0.253.010.0.253.255
10.0.254.0/2410.0.254.010.0.254.255
10.0.255.0/2410.0.255.010.0.255.255

Runs in your browser. Nothing you enter is sent anywhere.