Friday, March 14, 2014

Hostname resolution problems when you launch instances in non-default VPC's?.

Typically when you create VPC (virtual private cloud) using VPC wizard, the VPC already has DHCP option sets created for you with "domain-name" attribute pointing to the region where the VPC was created and "domain-name-servers" pointing to Amazon DNS servers such as below:


In cases where non-default VPC has been created, the "domain-name" attribute may need to point to "mycompany.com" and "domain-name-servers" to point your company's DNS server. In absence of which, the EC2 instances will not be publicly addressable.

A simple "ping" check can reveal problems with dhcp option set:
  • $ping ip-10-98-0-1. eu-west-1.compute.internal – will RESOLVE 
  • $ping ip-10-98-0-1 - will FAIL
Also, you can check on the actual instance by running a $hostname command. The AWS console will also give you additional information about Public/Private DNS


You can refer to detailed documentation on Amazon site below:-

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html


No comments:

Post a Comment