Skip to content

Create a subnet

View as Markdown

A subnet is a smaller block of addresses inside a VPC’s range, and the nodes you place in it get their private IPs from that block. VPC address ranges shows how to lay subnets out.

  • A VPC with a Custom CIDR range larger than /28, in the Active state. That is the kind of VPC that takes subnets; to make one, see Create a VPC.
  • The block you want: inside the VPC’s range, smaller than it, and /28 or larger. Leave the first and last blocks of the range free, because E2E keeps addresses there. VPC address ranges shows which blocks work.
  1. Open Network > VPC, open the VPC’s actions menu, and choose Create Subnet. For a VPC with no subnets yet, the link on its Subnet tab opens the same form.
  2. Create Subnet opens with the VPC’s name and range at the top. Keep the suggested Subnet Name, or type one that says what the block is for, such as web. The name must not already be in use in the region.
  3. In IPv4 Subnet CIDR Block, enter the block. For a VPC with the range 10.10.0.0/23, 10.10.0.128/25 gives a subnet of 128 addresses. The form shows the block’s IP Size as you type.
  4. Click Create Subnet.

A message confirms that the subnet was created. A block that overlaps addresses already in use is refused instead, with “Error while creating subnet, not enough available IPs”; Troubleshooting VPC shows how to pick one that fits.

Select the VPC and open its Subnet tab. The new subnet is listed with its CIDR and its Used/Total IPs, such as 0/128 for a new /25.

Your subnet is ready to use. Pick it under VPC when you create a node, or when you attach a node to a VPC, and the node gets its private IP from the block.