Why aren't the configuration parameters of my DHCP options set passing 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 passing to the Amazon Elastic Compute Cloud (Amazon EC2) instances in the Amazon VPC. How can I fix this?

Short description

When you associate a new set of DHCP options with your Amazon VPC, all new and existing instances in that VPC use the new options. Your instances automatically pick up the changes, depending on how frequently they renew their DHCP leases. You can manually renew the address lease using the operating system on the instance. If you tried renewing the IP address and don't see the new DHCP parameters, then check these resources and configurations to diagnose and 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 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

  • Search for any customization (PEERDNS, timeouts, and so on) in the network configuration files that were set either manually or by using scripts. For more information, see User data and shell scripts.
  • 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.
  • 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. Some helpful articles include: How to configure a domain suffix search list on the Domain Name System clients.

Related information

DNS attributes for your VPC

AWS OFFICIAL
AWS OFFICIALUpdated a year ago