Subnet
Overview
A subnet is a slice of the IP range inside a virtual network. When you create a VM and pick a subnet, the VM is assigned an address from that subnet's range automatically.
Creating a subnet
-
Under Network > Subnets, click Create Subnet.
-
Configure the following:
Field Description Example Subnet name An identifying name prod-subnet-aLinked network The virtual network it belongs to prod-vnetNetwork CIDR Subnet range, within the virtual network 192.168.0.0/24Gateway Default gateway IP (one IP inside the subnet CIDR) 192.168.0.1 -
Click Create.
Subnet CIDR and gateway rules
- The subnet CIDR must be a subset of the virtual network CIDR. If the virtual network is
192.168.0.0/16, subnets can be192.168.0.0/24,192.168.1.0/24, etc. - If the gateway IP is outside the subnet CIDR, you'll see
networkCidrMismatch.
CIDR sizing guide
The subnet size can't be changed later, so estimate how many IPs you need before creating it.
| CIDR | Usable IPs | Typical use |
|---|---|---|
/23 | ~512 | Large environments (hundreds of VMs) |
/24 | ~256 | General use (dozens of VMs; default) |
/25 | ~128 | Smaller, isolated environments |
/26 | ~64 | Secondary subnets for DB / admin nodes |
Splitting subnets by role makes firewall rules easier (e.g. web-subnet, app-subnet, db-subnet, mgmt-subnet).
Managing subnets
- List: shows name, CIDR, parent virtual network, and IPs in use
- Delete: only possible when no network interfaces are attached
Next steps
- Virtual network: creating a virtual network and designing the CIDR
- Public IP: allocating an IP for internet access