Subnet addressing and IP allocation

Subnet addressing and IP allocation

Plan private ranges, reserve addresses, and readdress occupied networks.

Subnets define the address ranges available to interfaces in a private network. An address allocation is a reservation tied to an interface or an explicitly reserved network resource.

Choose ranges before attachment

Create subnets under Network → Subnets. IPv4 uses a private CIDR unless the region explicitly publishes another supported range. IPv6 requires a region-approved prefix. The submitted CIDR must be a network address with no host bits set.

Infra rejects overlapping subnets within one routing domain. Separate isolated networks can reuse a private range, but those networks cannot later peer while the overlapping ranges remain. Include management, mesh, VPN, and external route ranges in the address plan even when they are not project subnets.

Reserved and usable addresses

The subnet detail lists infrastructure reservations, gateway addresses, and usable capacity. An IPv4 network and broadcast address cannot be assigned to an ordinary interface. The exact infrastructure reservation set is returned by the subnet API so automation does not infer availability by subtracting only two addresses.

Automatic allocation selects a free usable address. Explicit allocation requires an address in that set. An occupied address returns address_in_use; it is not moved from another interface automatically.

Allocation lifecycle

A reservation begins when an interface request is admitted. A pending interface can therefore consume an address before the guest exists. Stopping a droplet retains its interface and reservation. Deleting an interface releases the address only after managed network cleanup completes.

The subnet's allocation view includes the holding resource and operation ID. Use it to distinguish a leaked reservation from a still-reconciling interface. Do not create a competing guest-side static address outside the allocation record.

Expand an occupied network

Add a non-overlapping subnet instead of changing an occupied subnet's CIDR. Attach a second interface or use an explicit address-change operation, update guest routes and service references, then remove the old allocation.

An application can bind a specific local address. Readdressing the interface can leave it unreachable even when the guest applied the new route correctly. Update listeners, DNS, firewall selectors, and external allowlists as part of the same operating plan.

Exhaustion and stale references

An exhausted subnet rejects new interface allocation with subnet_exhausted. Free project quota does not add usable addresses. Release unused interfaces or add another subnet with a suitable range.

A released address can be allocated to another interface. Use droplet and interface IDs for durable references. DNS and application caches can still hold the old mapping until their own expiry.

Use Subnet API for allocation queries, Interface API for explicit address changes, and IPv6 networking for dual-stack planning.