/8 subnet: 255.0.0.0, 16,777,216 addresses

16,777,216 addresses (16,777,214 usable hosts)

A /8 has the netmask 255.0.0.0 and holds 16,777,216 addresses, 16,777,214 of them usable hosts once the network and broadcast addresses are taken out. Only the first octet is fixed. Before CIDR (RFC 4632) this was a class A network, and the one most people meet is 10.0.0.0/8, the largest of the three private ranges in RFC 1918.

The numbers

Network        10.0.0.0/8
Broadcast      10.255.255.255
Netmask        255.0.0.0
Wildcard       0.255.255.255
First host     10.0.0.1
Last host      10.255.255.254
Kind           Private (RFC 1918)

How it fits

A /8 is 1/256 of the whole IPv4 space. It splits into 2 /9s, 16 /12s, 256 /16s or 65,536 /24s. The tool below splits it into /16s, from 10.0.0.0/16 to 10.255.0.0/16.

Where you’ll see it

Nobody puts 16 million hosts on one network, so a /8 is an address plan, not a subnet. A common plan hands out /16s, one per VPC, region or site. That suits AWS, where a VPC’s CIDR runs from /16 down to /28: 10.0.0.0/8 holds 256 VPCs of the largest size.

Platforms draw from it too. kubeadm’s default service range is 10.96.0.0/12, so the cluster’s API service sits at 10.96.0.1, inside 10/8. Docker Swarm’s default pool for overlay networks is 10.0.0.0/8, cut into /24s. The other /8 everyone has is 127.0.0.0/8: all of it is loopback.

Gotchas

  • Everyone starts at 10.0. VPC wizards and Terraform examples reach for 10.0.0.0/16 first. VPC peering refuses overlapping CIDRs, and a route table can’t point the same range at two different networks, so give each account, environment and region its own /16 before they need to connect.
  • 10.0.0.0/8 in a firewall rule is broad. It admits every peered VPC, VPN client and container network that lives in 10/8, not just your subnet. Scope rules to the /16 or /24 you mean.
  • AWS won’t take it whole. A /8 is too large for a VPC. Create a /16 and add secondary CIDR blocks when it runs low.
  • Swarm and the office. If the corporate network already uses parts of 10/8, overlay networks from Swarm’s default pool can land on the same addresses. Set --default-addr-pool on docker swarm init to a range nothing else uses.

In your stack

# Terraform: the /16 for environment 20, or the first three in a row
cidrsubnet("10.0.0.0/8", 8, 20)        # "10.20.0.0/16"
cidrsubnets("10.0.0.0/8", 8, 8, 8)     # ["10.0.0.0/16", "10.1.0.0/16", "10.2.0.0/16"]
import ipaddress
plan = ipaddress.ip_network("10.0.0.0/8")
plan.num_addresses                               # 16777216
ipaddress.ip_address("10.96.0.1") in plan        # True
nft add rule inet filter input ip saddr 10.0.0.0/8 tcp dport 5432 accept

Try it in the CIDR & Subnet Calculator

10.0.0.0/8 Private (RFC 1918)

Network10.0.0.0/8
Broadcast10.255.255.255
Netmask255.0.0.0
Wildcard0.255.255.255
Mask, binary11111111.00000000.00000000.00000000
First host10.0.0.1
Last host10.255.255.254
Addresses16777216
Usable hosts16777214
KindPrivate (RFC 1918)

256 subnets of /16.

SubnetFirstLast
10.0.0.0/1610.0.0.010.0.255.255
10.1.0.0/1610.1.0.010.1.255.255
10.2.0.0/1610.2.0.010.2.255.255
10.3.0.0/1610.3.0.010.3.255.255
10.4.0.0/1610.4.0.010.4.255.255
10.5.0.0/1610.5.0.010.5.255.255
10.6.0.0/1610.6.0.010.6.255.255
10.7.0.0/1610.7.0.010.7.255.255
10.8.0.0/1610.8.0.010.8.255.255
10.9.0.0/1610.9.0.010.9.255.255
10.10.0.0/1610.10.0.010.10.255.255
10.11.0.0/1610.11.0.010.11.255.255
10.12.0.0/1610.12.0.010.12.255.255
10.13.0.0/1610.13.0.010.13.255.255
10.14.0.0/1610.14.0.010.14.255.255
10.15.0.0/1610.15.0.010.15.255.255
10.16.0.0/1610.16.0.010.16.255.255
10.17.0.0/1610.17.0.010.17.255.255
10.18.0.0/1610.18.0.010.18.255.255
10.19.0.0/1610.19.0.010.19.255.255
10.20.0.0/1610.20.0.010.20.255.255
10.21.0.0/1610.21.0.010.21.255.255
10.22.0.0/1610.22.0.010.22.255.255
10.23.0.0/1610.23.0.010.23.255.255
10.24.0.0/1610.24.0.010.24.255.255
10.25.0.0/1610.25.0.010.25.255.255
10.26.0.0/1610.26.0.010.26.255.255
10.27.0.0/1610.27.0.010.27.255.255
10.28.0.0/1610.28.0.010.28.255.255
10.29.0.0/1610.29.0.010.29.255.255
10.30.0.0/1610.30.0.010.30.255.255
10.31.0.0/1610.31.0.010.31.255.255
10.32.0.0/1610.32.0.010.32.255.255
10.33.0.0/1610.33.0.010.33.255.255
10.34.0.0/1610.34.0.010.34.255.255
10.35.0.0/1610.35.0.010.35.255.255
10.36.0.0/1610.36.0.010.36.255.255
10.37.0.0/1610.37.0.010.37.255.255
10.38.0.0/1610.38.0.010.38.255.255
10.39.0.0/1610.39.0.010.39.255.255
10.40.0.0/1610.40.0.010.40.255.255
10.41.0.0/1610.41.0.010.41.255.255
10.42.0.0/1610.42.0.010.42.255.255
10.43.0.0/1610.43.0.010.43.255.255
10.44.0.0/1610.44.0.010.44.255.255
10.45.0.0/1610.45.0.010.45.255.255
10.46.0.0/1610.46.0.010.46.255.255
10.47.0.0/1610.47.0.010.47.255.255
10.48.0.0/1610.48.0.010.48.255.255
10.49.0.0/1610.49.0.010.49.255.255
10.50.0.0/1610.50.0.010.50.255.255
10.51.0.0/1610.51.0.010.51.255.255
10.52.0.0/1610.52.0.010.52.255.255
10.53.0.0/1610.53.0.010.53.255.255
10.54.0.0/1610.54.0.010.54.255.255
10.55.0.0/1610.55.0.010.55.255.255
10.56.0.0/1610.56.0.010.56.255.255
10.57.0.0/1610.57.0.010.57.255.255
10.58.0.0/1610.58.0.010.58.255.255
10.59.0.0/1610.59.0.010.59.255.255
10.60.0.0/1610.60.0.010.60.255.255
10.61.0.0/1610.61.0.010.61.255.255
10.62.0.0/1610.62.0.010.62.255.255
10.63.0.0/1610.63.0.010.63.255.255
10.64.0.0/1610.64.0.010.64.255.255
10.65.0.0/1610.65.0.010.65.255.255
10.66.0.0/1610.66.0.010.66.255.255
10.67.0.0/1610.67.0.010.67.255.255
10.68.0.0/1610.68.0.010.68.255.255
10.69.0.0/1610.69.0.010.69.255.255
10.70.0.0/1610.70.0.010.70.255.255
10.71.0.0/1610.71.0.010.71.255.255
10.72.0.0/1610.72.0.010.72.255.255
10.73.0.0/1610.73.0.010.73.255.255
10.74.0.0/1610.74.0.010.74.255.255
10.75.0.0/1610.75.0.010.75.255.255
10.76.0.0/1610.76.0.010.76.255.255
10.77.0.0/1610.77.0.010.77.255.255
10.78.0.0/1610.78.0.010.78.255.255
10.79.0.0/1610.79.0.010.79.255.255
10.80.0.0/1610.80.0.010.80.255.255
10.81.0.0/1610.81.0.010.81.255.255
10.82.0.0/1610.82.0.010.82.255.255
10.83.0.0/1610.83.0.010.83.255.255
10.84.0.0/1610.84.0.010.84.255.255
10.85.0.0/1610.85.0.010.85.255.255
10.86.0.0/1610.86.0.010.86.255.255
10.87.0.0/1610.87.0.010.87.255.255
10.88.0.0/1610.88.0.010.88.255.255
10.89.0.0/1610.89.0.010.89.255.255
10.90.0.0/1610.90.0.010.90.255.255
10.91.0.0/1610.91.0.010.91.255.255
10.92.0.0/1610.92.0.010.92.255.255
10.93.0.0/1610.93.0.010.93.255.255
10.94.0.0/1610.94.0.010.94.255.255
10.95.0.0/1610.95.0.010.95.255.255
10.96.0.0/1610.96.0.010.96.255.255
10.97.0.0/1610.97.0.010.97.255.255
10.98.0.0/1610.98.0.010.98.255.255
10.99.0.0/1610.99.0.010.99.255.255
10.100.0.0/1610.100.0.010.100.255.255
10.101.0.0/1610.101.0.010.101.255.255
10.102.0.0/1610.102.0.010.102.255.255
10.103.0.0/1610.103.0.010.103.255.255
10.104.0.0/1610.104.0.010.104.255.255
10.105.0.0/1610.105.0.010.105.255.255
10.106.0.0/1610.106.0.010.106.255.255
10.107.0.0/1610.107.0.010.107.255.255
10.108.0.0/1610.108.0.010.108.255.255
10.109.0.0/1610.109.0.010.109.255.255
10.110.0.0/1610.110.0.010.110.255.255
10.111.0.0/1610.111.0.010.111.255.255
10.112.0.0/1610.112.0.010.112.255.255
10.113.0.0/1610.113.0.010.113.255.255
10.114.0.0/1610.114.0.010.114.255.255
10.115.0.0/1610.115.0.010.115.255.255
10.116.0.0/1610.116.0.010.116.255.255
10.117.0.0/1610.117.0.010.117.255.255
10.118.0.0/1610.118.0.010.118.255.255
10.119.0.0/1610.119.0.010.119.255.255
10.120.0.0/1610.120.0.010.120.255.255
10.121.0.0/1610.121.0.010.121.255.255
10.122.0.0/1610.122.0.010.122.255.255
10.123.0.0/1610.123.0.010.123.255.255
10.124.0.0/1610.124.0.010.124.255.255
10.125.0.0/1610.125.0.010.125.255.255
10.126.0.0/1610.126.0.010.126.255.255
10.127.0.0/1610.127.0.010.127.255.255
10.128.0.0/1610.128.0.010.128.255.255
10.129.0.0/1610.129.0.010.129.255.255
10.130.0.0/1610.130.0.010.130.255.255
10.131.0.0/1610.131.0.010.131.255.255
10.132.0.0/1610.132.0.010.132.255.255
10.133.0.0/1610.133.0.010.133.255.255
10.134.0.0/1610.134.0.010.134.255.255
10.135.0.0/1610.135.0.010.135.255.255
10.136.0.0/1610.136.0.010.136.255.255
10.137.0.0/1610.137.0.010.137.255.255
10.138.0.0/1610.138.0.010.138.255.255
10.139.0.0/1610.139.0.010.139.255.255
10.140.0.0/1610.140.0.010.140.255.255
10.141.0.0/1610.141.0.010.141.255.255
10.142.0.0/1610.142.0.010.142.255.255
10.143.0.0/1610.143.0.010.143.255.255
10.144.0.0/1610.144.0.010.144.255.255
10.145.0.0/1610.145.0.010.145.255.255
10.146.0.0/1610.146.0.010.146.255.255
10.147.0.0/1610.147.0.010.147.255.255
10.148.0.0/1610.148.0.010.148.255.255
10.149.0.0/1610.149.0.010.149.255.255
10.150.0.0/1610.150.0.010.150.255.255
10.151.0.0/1610.151.0.010.151.255.255
10.152.0.0/1610.152.0.010.152.255.255
10.153.0.0/1610.153.0.010.153.255.255
10.154.0.0/1610.154.0.010.154.255.255
10.155.0.0/1610.155.0.010.155.255.255
10.156.0.0/1610.156.0.010.156.255.255
10.157.0.0/1610.157.0.010.157.255.255
10.158.0.0/1610.158.0.010.158.255.255
10.159.0.0/1610.159.0.010.159.255.255
10.160.0.0/1610.160.0.010.160.255.255
10.161.0.0/1610.161.0.010.161.255.255
10.162.0.0/1610.162.0.010.162.255.255
10.163.0.0/1610.163.0.010.163.255.255
10.164.0.0/1610.164.0.010.164.255.255
10.165.0.0/1610.165.0.010.165.255.255
10.166.0.0/1610.166.0.010.166.255.255
10.167.0.0/1610.167.0.010.167.255.255
10.168.0.0/1610.168.0.010.168.255.255
10.169.0.0/1610.169.0.010.169.255.255
10.170.0.0/1610.170.0.010.170.255.255
10.171.0.0/1610.171.0.010.171.255.255
10.172.0.0/1610.172.0.010.172.255.255
10.173.0.0/1610.173.0.010.173.255.255
10.174.0.0/1610.174.0.010.174.255.255
10.175.0.0/1610.175.0.010.175.255.255
10.176.0.0/1610.176.0.010.176.255.255
10.177.0.0/1610.177.0.010.177.255.255
10.178.0.0/1610.178.0.010.178.255.255
10.179.0.0/1610.179.0.010.179.255.255
10.180.0.0/1610.180.0.010.180.255.255
10.181.0.0/1610.181.0.010.181.255.255
10.182.0.0/1610.182.0.010.182.255.255
10.183.0.0/1610.183.0.010.183.255.255
10.184.0.0/1610.184.0.010.184.255.255
10.185.0.0/1610.185.0.010.185.255.255
10.186.0.0/1610.186.0.010.186.255.255
10.187.0.0/1610.187.0.010.187.255.255
10.188.0.0/1610.188.0.010.188.255.255
10.189.0.0/1610.189.0.010.189.255.255
10.190.0.0/1610.190.0.010.190.255.255
10.191.0.0/1610.191.0.010.191.255.255
10.192.0.0/1610.192.0.010.192.255.255
10.193.0.0/1610.193.0.010.193.255.255
10.194.0.0/1610.194.0.010.194.255.255
10.195.0.0/1610.195.0.010.195.255.255
10.196.0.0/1610.196.0.010.196.255.255
10.197.0.0/1610.197.0.010.197.255.255
10.198.0.0/1610.198.0.010.198.255.255
10.199.0.0/1610.199.0.010.199.255.255
10.200.0.0/1610.200.0.010.200.255.255
10.201.0.0/1610.201.0.010.201.255.255
10.202.0.0/1610.202.0.010.202.255.255
10.203.0.0/1610.203.0.010.203.255.255
10.204.0.0/1610.204.0.010.204.255.255
10.205.0.0/1610.205.0.010.205.255.255
10.206.0.0/1610.206.0.010.206.255.255
10.207.0.0/1610.207.0.010.207.255.255
10.208.0.0/1610.208.0.010.208.255.255
10.209.0.0/1610.209.0.010.209.255.255
10.210.0.0/1610.210.0.010.210.255.255
10.211.0.0/1610.211.0.010.211.255.255
10.212.0.0/1610.212.0.010.212.255.255
10.213.0.0/1610.213.0.010.213.255.255
10.214.0.0/1610.214.0.010.214.255.255
10.215.0.0/1610.215.0.010.215.255.255
10.216.0.0/1610.216.0.010.216.255.255
10.217.0.0/1610.217.0.010.217.255.255
10.218.0.0/1610.218.0.010.218.255.255
10.219.0.0/1610.219.0.010.219.255.255
10.220.0.0/1610.220.0.010.220.255.255
10.221.0.0/1610.221.0.010.221.255.255
10.222.0.0/1610.222.0.010.222.255.255
10.223.0.0/1610.223.0.010.223.255.255
10.224.0.0/1610.224.0.010.224.255.255
10.225.0.0/1610.225.0.010.225.255.255
10.226.0.0/1610.226.0.010.226.255.255
10.227.0.0/1610.227.0.010.227.255.255
10.228.0.0/1610.228.0.010.228.255.255
10.229.0.0/1610.229.0.010.229.255.255
10.230.0.0/1610.230.0.010.230.255.255
10.231.0.0/1610.231.0.010.231.255.255
10.232.0.0/1610.232.0.010.232.255.255
10.233.0.0/1610.233.0.010.233.255.255
10.234.0.0/1610.234.0.010.234.255.255
10.235.0.0/1610.235.0.010.235.255.255
10.236.0.0/1610.236.0.010.236.255.255
10.237.0.0/1610.237.0.010.237.255.255
10.238.0.0/1610.238.0.010.238.255.255
10.239.0.0/1610.239.0.010.239.255.255
10.240.0.0/1610.240.0.010.240.255.255
10.241.0.0/1610.241.0.010.241.255.255
10.242.0.0/1610.242.0.010.242.255.255
10.243.0.0/1610.243.0.010.243.255.255
10.244.0.0/1610.244.0.010.244.255.255
10.245.0.0/1610.245.0.010.245.255.255
10.246.0.0/1610.246.0.010.246.255.255
10.247.0.0/1610.247.0.010.247.255.255
10.248.0.0/1610.248.0.010.248.255.255
10.249.0.0/1610.249.0.010.249.255.255
10.250.0.0/1610.250.0.010.250.255.255
10.251.0.0/1610.251.0.010.251.255.255
10.252.0.0/1610.252.0.010.252.255.255
10.253.0.0/1610.253.0.010.253.255.255
10.254.0.0/1610.254.0.010.254.255.255
10.255.0.0/1610.255.0.010.255.255.255

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