1

I have been looking everywhere here and I am certain I am missing something simple, but I just can't get this to work.

End goal: Have a single AWS instance with 15 EIP's assigned to it and have all outbound traffic routing in a round robin style fashion.

Just as a test, I set up 2 test instaces (1 AWS Linux and 1 Ubuntu), assigned a secondary Private and elastic IP to both. Inbound, locally I can connect to either Private IP address, but outbound is still only going through the single EIP that was assigned to the instance.

I can't seem to find much documentation on rotating outbound traffic through multiple EIP's, just a lot of inbound questions. I'm thinking I may need to add a route, but I can't for the life of me figure out what that is.

This has seriously been driving me mad, so any information would help me greatly.

Jason
  • 11
  • 1

1 Answers1

0

First of all you should understand that an instance has no knowledge of the public IPs it is associated with. This is handled by the IGW, which keeps a mapping of all public/private IP address pairs inside the VPC. That means you cannot configure outbound traffic by using Elastic IPs.

You can however assign multiple private IP addresses to EC2 instances but each instance type has a specific limit. So you have to launch at least an xlarge instance to be able to assign 15 private IP addresses. It is also possible to create multiple ENIs, but I guess that will complicate the solution further.

After configuring multiple private IP addresses, you just need to manage the outbound traffic at the OS level, by changing the routing tables as required. This answer might give you an idea on how to achieve this.

Just to note that the first IP address in VPC CIDR block is allocated to the VPC router. So you can use this address as the default gateway when configuring routes in your Linux instance.

Vikyol
  • 161
  • 4