Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
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 '13 at 14:00

1 Answer 1

up vote 2 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.