0

I have been able to setup 2 ENI to work on ec2 RHEL instances (ip routing for extra eni on RHEL ec2 instances)

but now i have application using the eth1 for inter-cluster communication and services are bind to the eth1

but the problem is ELB routes to eth0 by default

does anyone know how to edit my routes here (ip routing for extra eni on RHEL ec2 instances) to allow ELB to route traffic to eth1?

Thanks

Default:

ELB ==> eth0 (nothing is bounded here)

what i want:

ELB ==> eth1

OR

ELB ==> eth0 ==> eth1
uberrebu
  • 503
  • 6
  • 17
  • 36
  • I'm not sure if having two interfaces on the same subnet is a supported configuration. Without more details I question if that is even necessary. You should explore putting both interfaces on separate subnets. Then you can place the load balancer on whatever subnets you want. – Appleoddity Aug 22 '17 at 04:08
  • please check the link i referenced for having eth0 and eth1 work fine https://serverfault.com/questions/867047/ip-routing-for-extra-eni-on-rhel-ec2-instances – uberrebu Aug 22 '17 at 04:15
  • Yes, I understand you have two issues. One about routing and one about ELB. I reiterate, I'm not sure that having two interfaces on the same subnet in conjunction with an ELB is a supported configuration. The ELB allows you to select a subnet and instance to associate with it. There aren't any "route" settings on an ELB, so what you are doing is probably not supported. I'm sure you have your reasons, but I can't think of any why you would have two interfaces on the SAME subnet, so consider this is not the way it should be done. – Appleoddity Aug 22 '17 at 04:26
  • Multiple ENI on the same subnet *is* a valid configuration. ELB, however, always uses the first address on eth0, and any service accessible to the ELB needs to be bound there. It sounds as if your decision to use multiple interfaces may have initially been a misdirected attempt to solve some other problem, but the question lacks a full description of the scenario. – Michael - sqlbot Aug 22 '17 at 10:17
  • well it lacks because i dont think it matters much..my services are bound to eth1 because i need static eni. So lets just say i have to use eth1 for my communication but now i need to allow ELB to route my traffic. Now i have heard of asymmetric routing and that is the solution i a pursuing – uberrebu Aug 22 '17 at 21:09
  • Are you using Classic or Application ELB? If using Application ELB you can set eth1's IP address as a target. However I also question the need for multiple ENIs. –  Aug 31 '17 at 22:11

1 Answers1

0

Many people have now questioned why it is necessary to have two network interfaces on the same subnet. The only information you have given us to go on is that you "need a static eni."

All I can do is assume you want a static IP address on an interface, and you failed to configure the primary interface the proper way when creating the instance.

You will not find any documentation in AWS to support your request, because it is not supported and should not be done.

In fact, here is the exact wording under best practices in the ENI configuration guide:

If you attach two or more network interfaces from the same subnet to an instance, you may encounter networking issues such as asymmetric routing. If possible, use a secondary private IPv4 address on the primary network interface instead. For more information, see Assigning a Secondary Private IPv4 Address.

If your problem is that you configured the first interface wrong, then add additional IP addresses to the primary interface. Or, better yet, simply create an AMI of the server, and redeploy a new server with the proper network interface settings. The whole process takes less than 15 minutes.

Appleoddity
  • 3,488
  • 2
  • 13
  • 33