Skip to content

VPC address ranges

View as Markdown

You choose a VPC’s address range when you create it, and the VPC keeps that range for as long as it exists. To use a different range, create a new VPC. Size the range for the resources you expect to have later, as well as the ones you start with.

A range must be:

  • a private IPv4 network, inside 172.16.0.0 to 172.29.255.255 or inside 192.168.0.0/16;
  • between /16 and /28 in size;
  • written as a network address, with the host bits at zero.
Value Accepted
172.16.231.0/24 Yes
192.168.0.0/16 Yes
172.16.231.5/24 No. The host bits must be zero.
192.168.1.0/16 No. The host bits must be zero.

The Create VPC form lists the ranges you can use under Available ranges and checks yours as you type.

A VPC refuses three ranges, even though they are valid private ranges elsewhere: the whole 10.0.0.0/8 block, including every range inside 10.x.x.x, 172.30.0.0/16, and 172.31.0.0/16.

Everything else inside 172.16.0.0 to 172.29.255.255 and 192.168.0.0/16 is available, so 172.16.231.0/24 and 192.168.50.0/24 are both safe starting points. Two VPCs can use the same range, because each VPC is its own network.

If you expect Consider
A handful of resources, for a test or a demo /27 or /26
A typical project /24, with 247 usable addresses, the most common choice
A large or growing deployment /22 or /20
Many resources in one network /16

A /28 leaves only seven usable addresses, which is easy to outgrow. When in doubt, take the larger range, because a range that is too small means creating a new VPC and moving your resources.

Every VPC sets aside nine addresses from its range for networking: the first eight and the last. In a /24 that starts at .0, those are .0 to .7 and .255. For a VPC on 172.16.231.0/24, 172.16.231.0 to 172.16.231.7 and 172.16.231.255 are reserved, leaving 172.16.231.8 to 172.16.231.254 for your resources.

The VPC sets these nine aside once for the whole range, so a /16 gives up the same nine addresses that a /28 does.

The Available IPs column in the VPC list shows free addresses over assignable ones. Assignable is every address the VPC can ever hand out: the size of the range, less the nine reserved addresses. Free is how many of those are still unused.

Size Addresses in the range Assignable
/16 65,536 65,527
/20 4,096 4,087
/22 1,024 1,015
/24 256 247
/26 64 55
/27 32 23
/28 16 7

Create a VPC with the range you chose. For help with a message about the range, see Troubleshooting VPC.