EC2 instance with two internal IPs - using ifconfig

1

I am trying to allocate another internal IP to an EC2 (classic - not VPC) instance with the following command.

sudo ifconfig eth0:0 inet 10.80.7.40 netmask 255.255.255.0

Here, 10.80.7.40 is just a random IP I cooked up. This IP address is in addition to the internal IP that the EC2 instance comes with.

I cannot ping 10.80.7.40 from other EC2 classic instances, although I can ping the amazon-allotted internal IP. As far as I can tell, this is not a security group or firewall issue.

Is this even possible? I'm something of a networking novice, and I apologize in advance if my question makes no sense.

Background: I am trying to correctly configure the delegate_IP part of pgPool's watchdog on EC2 instances.

Alptigin Jalayr

Posted 2013-10-23T02:01:46.340

Reputation: 111

Answers

0

You need to add a route to the other instances so that they know which interface to send the traffic to:

ip route add 10.80.7.0/16 dev eth0

With 10.80.7.0/16 is the CIDR address of the internal network you are trying to connect.

Minh Danh

Posted 2013-10-23T02:01:46.340

Reputation: 101