For the complete documentation index, see llms.txt. This page is also available as Markdown.

DHCP

What Is DHCP?

DHCP (Dynamic Host Configuration Protocol) is a network protocol that dynamically assigns IP addresses and other network parameters — such as the subnet mask, gateway, and DNS servers — to client devices.

Every vNIC on an Elastic Compute instance, primary or secondary, can obtain its network configuration automatically through DHCP. The platform runs a distributed DHCP service on every compute node, so an instance's DHCP requests are answered on the node it runs on. The operating system inside the instance must send the DHCP request itself; public images configure DHCP only on the primary vNIC by default.

What Is a DHCP Options Set?

A DHCP options set carries extra configuration through the DHCP protocol. You create an options set and associate it with a subnet to set custom DNS servers and the IP address lease time for every instance in that subnet.

When to Use a DHCP Options Set

  • Self-hosted or third-party DNS: All instances in the subnet use the DNS servers you specify, without changing each instance's configuration.

  • Reaching instances by name: Combined with private authoritative domains, instances can reach each other by hostname or fully qualified domain name instead of fixed IP addresses.

  • Adjusting the lease time: Shorten or lengthen the renewal interval to suit your workload.

In This Guide

Page
What you'll learn

The platform DHCP architecture, how requests are handled, and what DHCP delivers

DHCP support on primary and secondary vNICs, and how to enable DHCP on a secondary vNIC

Supported options, association rules, value precedence, and when changes take effect

Limits

Item
Limit

Options sets per subnet

1

DNS servers per options set

Up to 4 IPv4 and up to 4 IPv6

Lease time

24–1,176 hours or 87,600–175,200 hours

Self-hosted DHCP server in a VPC

Not supported. The platform answers DHCP requests directly

Secondary private IPs

Not delivered by DHCP. Configure them inside the instance

FAQ

A secondary vNIC has no IP address after I attach it. What should I do?

Public images don't send DHCP requests for secondary vNICs. Enable DHCP inside the instance as described in Primary and Secondary vNICs.

I changed the DHCP options set, but DNS inside the instance didn't change. Why?

The new configuration takes effect at the instance's next lease renewal. Wait for the automatic renewal, or request a new lease inside the instance. If DNS is hard-coded inside the instance (for example, by editing /etc/resolv.conf directly), it may override the DNS delivered by DHCP.

Can I skip DHCP and configure a static IP?

Yes. Make sure the IP, mask, and gateway you configure inside the instance match the vNIC's details in the console; otherwise the network won't work.

Why didn't my instance get an IPv6 address?

The platform delivers IPv6 addresses through DHCPv6. Check that the vNIC has an IPv6 address assigned and that a DHCPv6 client is enabled inside the instance.

Can instances still renew leases if the platform control plane is down?

Yes. The DHCP service on each compute node caches vNIC configuration, so vNICs that already have an address renew as usual.

Last updated