1

I have created a VPC ec2 instance (t1.micro), in which I have two network interfaces, the primary eth0 and additional eth1.

I was able to bring up the eth1 by editing the /etc/network/inteface

auto eth1
iface eth1 inet dhcp

However, when I enable the secondary IP on this interface, I get the error "Failed to bring up eth1:1"

auto eth1:1
iface eth1:1 inet dhcp

I can find this secondary IP is being assigned on the ec2 "Manage Private IP", so what would be the reason?

1
  • 1
    not posting this as an answer since I'm not 100% sure.. but i don't think you can use dhcp on an aliased interface. It has to be a static ip like iface eth1:1 inet static then your static ip options below that
    – Mike
    Jul 23, 2013 at 14:00

1 Answer 1

2

You can't assign IPs to virtual interfaces via DHCP, they have to be statically assigned. The reason is that for a DHCP server, there's only one device eth1 that's indistiguishable from eth1:1 (because they share the same MAC).

You can statically assign an IP this way:

auto eth1:1
iface eth1:1 inet static
address x.x.x.x
netmask x.x.x.x

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .