What is an Elastic IP? 

An Elastic IP (EIP) is an IP address that you can reserve from AWS for your account.  Once you've created an Elastic IP, you can assign it to any instance of your choice.  

NOTE: Elastic IPs are an Amazon-specific concept that's only supported on EC2.

 

What are the benefits of using Elastic IPs? 

Once you reserve an Elastic IP, nobody else can use that IP address.   With Elastic IPs, you can now allocate an IP address and assign it to an instance of your choice, which replaces the need for normal dynamic IP addressing in the cloud.  Elastic IPs are dynamically remappable IP addresses that make it easier to manage servers and make global changes compared to static IPs on traditional hosting solutions, because each EIP can be reassigned to a different instance when needed.  It's a way of ensuring that you don't 'inherit' traffic from other's servers on EC2, because you're using an IP that's specifically reserved for your usage only, as long as you keep that EIP. 

Once you've created an Elastic IP, you no longer have to contact your DNS provider to change your DNS settings (A records).  You can assign Elastic IPs directly from within the Dashboard.  See Create Elastic IP (EIP).

Elastic IPs are also an essential component for creating failover deployments on EC2.  For more details, see Best Practices for using Elastic IPs (EIP) and Availability Zones.

Elastic IPs are also especially useful for upgrading software releases.  Normally, you would have to make a change at the DNS level.  Now with Elastic IPs you can make the changes directly inside the Dashboard.   The first step is to launch your new instances (FE-2) with normal dynamic DNS from AWS.  Once it's been fully tested and is ready to receive traffic, simply associate the Elastic IP to the new server (FE-2) that has the latest software release and in a couple of minutes, all new traffic will served from the new server (FE-2).  The best part is that if you see a problem, simply switch the EIP back to the original server (FE-1).  Thanks to Elastic IPs, performing regular software upgrades has never been easier!

02-switch_existing_eips_diagram_2.gif

 

Is there a maximum number of Elastic IPs that can be used? 

By default, Amazon will let you reserve up to 5  EIPs per account. If you would like to reserve more than 5 EIPs, you can submit a request to Amazon at Request to Increase Elastic IP Address Limit.

 

How much do Elastic IPs cost?

Elastic IPs are totally free, as long as they are being used by an instance. However, Amazon will charge you $0.01/hr for each EIP that you reserve and do not use.

 

How do I reserve/create an Elastic IP?

Follow the Create an Elastic IP (EIP) tutorial. 

 

How do I delete an Elastic IP?

Plan ahead.  Before you delete an Elastic IP, verify that it's not in use.  Check your DNS records and make sure that it does not contain the Elastic IP that you are going to delete.  Remember, there is no undo button.  Once it's deleted, you will no longer be able to use that specific IP address ever again.  

Once you delete an Elastic IP from your account, it gets returned to Amazon's pool of IP addresses. 

Follow the steps below to make sure that you take the necessary steps before deleting an Elastic IP.

  1. Remove the Elastic IP from all DNS entries. 
  2. Wait a minimum of 24 hrs.
  3. While your Elastic IP remains idle in your account, perform some tests to make sure that your new DNS changes have gone through and that your deployment is running as expected without any errors related to the DNS records.
  4. Delete your unused Elastic IP.   (Clouds -> AWS -> Elastic IPs).  Click the Delete button.
    NOTE:  It will take about 5 minutes for the EIP to disappear from your screen after you've deleted it. 

20-eip_delete.gif

What happens when an EIP is assigned at launch from the RightScale Dashboard?

Assigning an Elastic IP at launch is a unique feature of the RightScale Dashboard and is not provided by Amazon. 

When you launch an instance that's configured to associate a particular Elastic IP at launch, you will notice that the specified Elastic IP that was previously highlighted with italics at the deployment level will seemingly "disappear" and change to -none-.  Don't worry, this behavior is expected.  

11-eip_launch_instance_pending.gif

When a machine is launched in EC2 and in the "pending" state, it is randomly assigned a dynamic IP address just like any other instance that is launched that does not have an Elastic IP.

During the booting state, the Elastic IP will be associated to the new instance and the instance will wait for the EIP to settle.  Once the instance reaches the operational state, it will be using the specified Elastic IP as its public IP address and will be ready to serve traffic sent to that IP address. 

NOTE: The internal IP address is not effected.

12-eip_launch_instance_operational.gif

 

What happens when I associate an Elastic IP after launch?

See Assign an Elastic IP after an instance is launched.

 

Tag page
You must login to post a comment.