EC2 virutal interface

0

I have multiple ec2 instance on a same subnet, Created virtual interface inside ec2 instance on instance 1 , now i would like to access the virtual interface from instance 2. We can achieve this using

ip route add 

method in real world, how to do the same using aws ec2 instance.

已提問 4 個月前檢視次數 589 次
3 個答案
2
已接受的答案

Hello,

Thank you for querying in this forum.

From the descriptions, I understand that you have implemented an overlay network by creating virtual IPs within EC2 instances, which are not visible or managed directly by AWS and can be viewed only by customers from within the instance. In AWS, to enable communication between EC2 instances in the same subnet, we can typically use Security Groups and Network Access Control Lists (ACLs) to allow traffic between them. Additionally, ensure that the routing table within the VPC allows traffic between the instances. Please check the below steps to connect from instance 2 to instance 1 over virtual IP address:

  1. Disable Source/Destination Check for the instance to send/receive traffic not explicitly addressed to their primary network interface. Please refer to below AWS article for the same: actions → Networking → Source/Dest. Check and disable it
  1. Route Configuration: Configure the routing tables of the instances involved. For example, If Instance 2 needs to communicate with the virtual IP (ex: 10.1.1.1) on Instance 1, you will need to add a custom route in the subnet route table of Instance 2, specifying the virtual IP as the destination (ex: 10.1.1.1/32) and the target being the Instance 1's primary interface ID (example eni-id: eni-1234567890).

Thank you for your interest in re:Post community. Have a great day!

AWS
已回答 4 個月前
profile picture
專家
已審閱 2 個月前
  • Great response rePost-User-6389159!

0

Are you able to articulate the requirement a bit more? From my understanding, you have EC2 instances, multiple ENIs, all in the same subnet? All private IPs? IP route add and modifying the Route Tables, with those subnets are my initial thoughts - but a little more detail would certainly help.

AWS
KAS
已回答 4 個月前
0

We don't have multiple ENIs...

  • So in a instance1(172.10.0.4) we have created multiple interface which are virtual to that instance, for example created virtual interface 10.14.0.4 and can ping this interface with in that instance1.
  • Now i have instance 2(172.10.0.5) from this instance2 i want to ping virtual interface created in instance1 i,e looking to ping 10.14.0.4 from instance2.
  • this is possible if i have 2 laptops in my home and ping virtual interface between the system using
ip route add via 172.10.0.4 dev eth0
已回答 4 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南