Modify the DHCP options set associated with a VPC
You can associate a default or custom DHCP (Dynamic Host Configuration Protocol) options set with a VPC (Virtual Private Cloud) to apply the options it contains to the VM (Virtual Machine) created within this VPC.
This action replaces the DHCP options set with another one, as you can associate a VPC with only one DHCP options set at a time.
When you modify the DHCP options set associated with a VPC, the options it contains are automatically applied to existing VM, as well as to VM launched later. Existing VM apply these options a few hours after the modification, depending on the renewal frequency of their DHCP lease. You do not need to restart these VM. You can, however, force the DHCP lease renewal with the dhclient command for Linux VM, or the ipconfig/renew command for Windows VM.
Permissions
This action requires the following IAM (Identity and Access Management) permissions:
- compute.vpc.update
- Console
- API
- Terraform
Prerequisites
- From the left-hand side menu, click Network → VPC to access the list of VPC.
- On the row of the relevant VPC, click the Actions button.
- In the dialog box, click Associate DHCP.
- Select the desired DHCP options set from the drop-down list.
- Click Associate to confirm.
A confirmation message appears at the bottom of the page indicating that the DHCP options set has been associated with the VPC.
The PUT /compute/spaces/{spaceId}/vpcs/{id} command associates a DHCP options set with a specified network.
Example request: Associate a DHCP options set with a network ↗
The Terraform documentation is available on the Numspot registry ↗.