Easy guide to setup Amazon EC2 multiple IPs
By default, an EC2 instance comes with just a single public IP. However, there are many scenarios where you need multiple public IPs for your web services to work.
For instance, multi-site WordPress hosting, multiple websites with SSL, high availability fail-over setup for services, network appliances like load balancer, etc. require multiple IPs.
How to setup multiple IPs in EC2
Among the two types of EC2 instances – Classic and VPC, only the latter supports multiple IPs. But adding these IPs isn’t an easy task that can be done in a single click.
To enable multiple IP support in EC2 VPC, first assign private IPs to the instance and then associate Elastic IPs to those private IPs. Today, we’ll see the steps to do that.
1. Add private IPs
In EC2 VPC instances, the private IPs are static. They do not change over each reboot but would stay assigned until the EC2 instance is terminated.
When a new instance is created, a private IP address is assigned to it by default. It is possible to add additional (secondary) private IPs to that instance.
To add a secondary private IP to an EC2 instance, choose the option ‘Actions’ -> ‘Networking’ -> ‘Manage private IP addresses’ for that instance in the AWS console.
2. Add Elastic IPs
A private IP is an internal IP. There is a public IP assigned to each instance but it changes with each restart. This can cause intermittent service downtime due to DNS changes.
That’s why Elastic IPs are relevant. Being static in nature, they don’t incur any DNS downtime. It is also possible to add multiple Elastic IPs to publicly access an EC2.
To add a new EIP to your Amazon account, choose ‘Elastic IPs’ from the AWS console and ‘Allocate New Address’.
Bobcares provides Outsourced Hosting Support for online businesses. Our services include Outsourced Web Hosting Support, Outsourced Server Support, Outsourced Help Desk Support, Outsource Live Chat Support and Phone Support Services.