Amazon ec2 instances loopback two Network interfaces backtoback

1

I am working application called Intel DPDK 18.05 on Amazon ec2 instance, I tried to send traffic from eth1(apart from management network) to eth2 created on my Instance.

the eth1 IP address is like 172.31.17.214 and the eth2 IP address is like 172.31.17.20,

My problem is I need to send multiple packets from source interface eth1 to destination eth2 like (172.31.17.214,.215,.216..., to 172.31.17.20) but it is working for only 172.31.17.214 to 172.31.17.20.

How we need to make this work for multiple ip addresses in Amazon ec2 instance?

Thanks, Darshan

Adarsha Verma

Posted 2019-06-28T13:10:03.580

Reputation: 11

Answers

1

You need to associate more IP addresses from the Amazon EC2 interface first. A guide on how to do that you can find here.

After that, you can add those interfaces with interface aliases:

Edit /etc/network/interfaces and add the following:

auto etho0:1
iface eth0:1 inet static
address another_ip_address
netmask netmask #must be same as eth0's netmask

Or if you want another ip address just for the same session, you can use ifconfig:

ifconfig eth0:1 ip_address up

Fanatique

Posted 2019-06-28T13:10:03.580

Reputation: 3 475

How to associate more IP address from the Amazon EC2 interface? – Adarsha Verma – 2019-06-28T13:34:06.343

@AdarshaVerma here is an amazon guide: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/MultipleIP.html

– Fanatique – 2019-06-28T13:37:40.773