Why aren't the configuration parameters of my DHCP options set passed to instances in the VPC?

3 minute read
0

I set custom configuration parameters to the Dynamic Host Configuration Protocol (DHCP) options set for my Amazon Virtual Private Cloud (Amazon VPC). However, those options aren't passed to the Amazon Elastic Compute Cloud (Amazon EC2) instances in the Amazon VPC.

Short description

When you associate new DHCP options with Amazon VPC, all new and instances that already exist in that VPC use the new options. Your instances automatically incorporate the changes, depending on how frequently they renew their DHCP leases. You can manually renew the address lease with the operating system on the instance. If you tried to renew the IP address and don't see the new DHCP parameters, then check the following information to troubleshoot the issue:

  • Parameters of the DHCP options set.
  • Network configuration and operating system kernel parameters of the Amazon EC2 instances.

Resolution

Parameters of the DHCP options set

  1. Open the Amazon VPC console.
  2. In the navigation pane, under Virtual Private Cloud, choose DHCP Options Sets.
  3. In the resource list, choose the DHCP options set with your custom configuration parameters.
  4. In the Summary view, verify that the Options follow the guidelines described in DHCP option sets in Amazon VPC.

Domain name parameter

Some Linux operating systems accept multiple domain names separated by spaces. Other Linux operating systems treat the value as a single domain. Windows operating systems treat the value as a single domain. Therefore, it's a best practice to specify only one domain name when the DHCP option set is associated with a VPC.

Domain name servers parameter

You can enter either the AmazonProvidedDNS or custom domain name servers. Using both might cause unexpected behavior. Therefore, it's a best practice to use either AmazonProvidedDNS, or a custom domain name server. You can enter the IP addresses of up to four IPv4 domain name servers. Or, you can add up to three IPv4 domain name servers, an AmazonProvidedDNS, and four IPv6 domain name servers separated by commas. Although you can specify up to eight domain name servers, some operating systems might impose lower limits.

Important: You can't modify the DHCP options set after you create the set. To modify your DHCP options set, create a new DHCP options set with the correct parameters and associate it with your VPC.

Network configuration and operating system kernel parameters of the Amazon EC2 instances

  1. Search for any customization (set either manually or by using scripts) in the configuration files. For more information, see User data and shell scripts.
  2. Verify that the configuration files used by the operating system are mutable. If the files are immutable, then the instance doesn't receive the configuration parameters from the DHCP options set correctly. When using Linux, configuration files are typically made immutable with the chattr command.
  3. Check the operating systems of the Amazon EC2 instances and search for known bugs. If there's a bug related to the issue, then follow the guidelines provided by the operating system. For more information, see How to configure a domain suffix search list on the Domain Name System clients on the Microsoft Learn website.

Related information

DNS attributes for your VPC

AWS OFFICIAL
AWS OFFICIALUpdated 5 months ago