Subnet cheat sheet
Every IPv4 prefix with its netmask, wildcard and usable hosts, plus how many addresses are left after AWS, Azure and Google Cloud reserve some. A /24 is 255.255.255.0: 256 addresses, 254 usable, and 251 in an AWS or Azure subnet.
What does each prefix give you?
The prefix is how many of an address's 32 bits name the network. The netmask is the same thing written as four numbers, and the wildcard is the netmask flipped, which is the form ACLs and router configs ask for. A dash in a cloud column means that cloud won't create a subnet that size.
Why do cloud subnets give you fewer hosts?
On a plain network you lose two addresses per subnet: the first is the network address and the last is broadcast. A cloud takes more.
- AWS keeps five: the network address, .1 for the VPC router, .2 for DNS, .3 for future use, and the last address. Subnets run from /16 to /28, so the smallest one you can make holds 11 usable addresses.
- Azure keeps five: the network address, .1 for the default gateway, .2 and .3 for Azure DNS, and the last address. The smallest subnet is a /29, which leaves you 3.
- Google Cloud keeps four in a subnet's primary range: the first two and the last two. The smallest is also a /29, which leaves 4. Secondary ranges are yours in full.
Which prefix fits how many hosts?
Size from your cloud's column, not the plain one, and go one size bigger if the subnet will grow. On a /24 nobody notices the difference. On a small subnet you do: eleven devices fit a /28 on a plain network with three addresses to spare. On AWS a /28 gives exactly 11, so the twelfth device needs a /27.
Where can each subnet start?
A block always starts on a multiple of its own size. A /26 is 64 addresses, so inside a /24 it can start at .0, .64, .128 or .192 and nowhere else. That's why 10.0.0.100 sits in the /26 that starts at 10.0.0.64. The same step works in any octet: a /20 is 16 /24s, so its third octet is always a multiple of 16.
Which ranges should a private network use?
Pick from the three private blocks in RFC 1918: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Watch the middle one, because it ends at 172.31.255.255, so 172.32.0.0 is a public address. Give every network you'll connect its own block, because two networks on the same range can't be joined without address conflicts.
How do you set this up on American Cloud?
Run your exact block through the CIDR calculator to split it into subnets. Then create a VPC with that block and add a tier per subnet. Each tier asks for a gateway and a netmask: for 10.0.0.0/24, that's 10.0.0.1 and 255.255.255.0. Pick the block before you build, since changing a network's CIDR later usually means a new network. A VPC is $12 a month, flat. If something doesn't connect, our support team's median reply time is under 2 minutes.