Overview
Subnets define the IP address space within a network. Each subnet specifies a CIDR block, optional DHCP assignment, a gateway IP, and DNS resolvers that are pushed to instances at boot. A single network can host multiple subnets — e.g., one IPv4 and one IPv6 range — or separate subnets for different application tiers.Prerequisites
- An existing Xloud tenant network (see Create a Network)
- Dashboard access or CLI configured with valid credentials
Add a Subnet to an Existing Network
- Dashboard
- CLI
Configure CIDR and gateway
| Field | Description |
|---|---|
| Subnet Name | Descriptive name, e.g., db-subnet |
| Network Address | CIDR block, e.g., 10.0.2.0/24 |
| IP Version | IPv4 or IPv6 |
| Gateway IP | Optional — leave blank for auto-assign or enter 0.0.0.0 to disable |
Configure DHCP and allocation options
| Option | Description |
|---|---|
| Enable DHCP | Provide automatic IP assignment for instances on this subnet |
| Allocation Pools | Restrict the DHCP-assigned range, e.g., 10.0.2.10,10.0.2.200 |
| DNS Name Servers | Comma-separated list of resolvers |
| Host Routes | Static routes injected via DHCP in destination,nexthop format |
Subnet Management Operations
Update DNS Resolvers
- Dashboard
- CLI
Navigate to Project → Network → Networks, open the subnet row, and click Edit Subnet.
Update the DNS Name Servers field in the Subnet Details section.
Add Host Routes
Host routes are injected via DHCP and add static routing entries on the guest OS. Use them to direct traffic for specific CIDRs through a dedicated gateway.Add host route to subnet
Disable or Enable DHCP
Disable DHCP on a subnet
Re-enable DHCP on a subnet
Subnet Configuration Reference
| Parameter | CLI Flag | Description |
|---|---|---|
| CIDR | --subnet-range | IP address range in CIDR notation |
| Gateway | --gateway | Default gateway IP for DHCP clients |
| DHCP | --dhcp / --no-dhcp | Enable or disable automatic IP assignment |
| Allocation Pool | --allocation-pool | Start/end range for DHCP-assigned addresses |
| DNS Servers | --dns-nameserver | Resolvers pushed to instances (repeat for multiple) |
| Host Routes | --host-route | Static routes injected via DHCP |
| IP Version | --ip-version | 4 for IPv4, 6 for IPv6 |
Next Steps
Routers and Gateways
Attach subnets to a router to enable inter-subnet routing and internet access
DNS Configuration
Configure DNS name servers and hostname resolution for your subnets
Create a Network
Create the network that hosts your subnets
Network Troubleshooting
Diagnose and resolve subnet connectivity and DHCP issues