I am having problems adding a 2nd IP on AWS EC2 instance. I am running Ubuntu 14.04.
I already tried this:
Right clicked the instance and added a 'private IP' from the manage Private IP.
Ssh'ed into the machine and added a file
/etc/network/interfaces.d/eth0_0.cfg
with this content:auto eth0:0 iface eth0:0 inet dhcp
Then I ran sudo ifup eth0:0
and I get:
Internet Systems Consortium DHCP Client 4.2.4 Copyright 2004-2012
Internet Systems Consortium. All rights reserved. For info, please
visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0:0/0a:ee:d5:2f:e3:36 Sending on
LPF/eth0:0/0a:ee:d5:2f:e3:36 Sending on Socket/fallback DHCPDISCOVER
on eth0:0 to 255.255.255.255 port 67 interval 3 (xid=0x4dfeb91a)
DHCPREQUEST of 172.31.21.78 on eth0:0 to 255.255.255.255 port 67
(xid=0x4dfeb91a) DHCPOFFER of 172.31.21.78 from 172.31.16.1 DHCPACK of
172.31.21.78 from 172.31.16.1 RTNETLINK answers: File exists bound to 172.31.21.78 -- renewal in 1683 seconds.
But I cannot see it using ifconfig. I can only see this if I run ifconfig eth0:0
eth0:0 Link encap:Ethernet HWaddr 0a:ee:d5:2f:e3:36
UP BROADCAST RUNNING MULTICAST MTU:9001 Metric:1
Any ideas how I can activate the 2nd private IP?