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.
Before you begin
Section titled “Before you begin”- 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
/28or larger. Leave the first and last blocks of the range free, because E2E keeps addresses there. VPC address ranges shows which blocks work.
Create the subnet
Section titled “Create the subnet”- 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.
- 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. - In IPv4 Subnet CIDR Block, enter the block. For a VPC with the range
10.10.0.0/23,10.10.0.128/25gives a subnet of 128 addresses. The form shows the block’s IP Size as you type. - 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.
Check the subnet
Section titled “Check the subnet”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.