A common topic of confusion is understanding when and why an instance's public and/or private IP addresses can change. For example, what happens to an instance's public IP address when an instance is rebooted, stopped and restarted, or an Elastic IP is associated or disassociated with it?
Once an EC2 instance is launched, it's assigned a public and private IP address at boot time. An instance's private IP address will never change during the lifetime of that instance. However, its public IP address can change under certain circumstances.
Note: Public and private DNS names are constructed based upon an instance's public and private IP addresses. So, if an instance's public IP address changes, the public DNS name will also change accordingly.
Once you understand how IP addresses and DNS names are affected when different actions are performed, you start to realize the importance of using remappable IP addresses such as Elastic IPs for front end servers in the cloud. Elastic IPs provide a way of maintaining the same public facing IP address even when the associated virtual machine instance is changed.
Manage AWS more efficiently with RightScale. Try it free.
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.