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ヶ月前588ビュー
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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ