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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠