Comment 17 for bug 123773

gumptravels (pml-dtbb) wrote :

Using Hardy updated to latest updates as of today, 32-bit, on a Quad Xeon machine with an Intel 10/100 2-port NIC, the following /etc/network/interfaces still causes such errors:

/etc/network/interfaces:
auto eth1 eth1:0 eth1:1
iface eth1 inet static
        address 192.168.0.109
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255

iface eth1:0 inet static
       address 192.168.10.109
       netmask 255.255.255.0
       network 192.168.10.0
       broadcast 192.168.10.255

iface eth1:1 inet dhcp

# /etc/init.d/networking restart
 * Reconfiguring network interfaces...
There is already a pid file /var/run/dhclient.eth1:1.pid with pid 134519072
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

SIOCSIFFLAGS: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address
Bind socket to interface: No such device
Failed to bring up eth1:1.
   ...done.

eth1 Link encap:Ethernet HWaddr 00:02:a5:5c:d9:35
          inet addr:192.168.0.109 Bcast:192.168.0.255 Mask:255.255.255.0
          inet6 addr: fe80::202:a5ff:fe5c:d935/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:607 errors:0 dropped:0 overruns:0 frame:0
          TX packets:437 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:55066 (53.7 KB) TX bytes:66634 (65.0 KB)

eth1:0 Link encap:Ethernet HWaddr 00:02:a5:5c:d9:35
          inet addr:192.168.10.109 Bcast:192.168.10.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

It does however work with the non-dhcp virtual interface, which I couldn't get working until I figured out to put all the virtual devices on the same 'auto' line as their parent device, many examples on the net (debian docs) don't include that little note.

# uname -a
Linux www 2.6.13-15.18-smp #1 SMP Tue Oct 2 17:36:20 UTC 2007 i686 i686 i386 GNU/Linux

Other note: I removed the wireless-tools package (which also took ubuntu-minimal package with it), it didn't make any difference.

Other note2: So to sum up, it works for me with static virtual interfaces, but not dhcp interfaces. Writing this note right now, makes me think that you may not be able use dhcp on virtual interfaces since the mac address would be the same as all the other virtual interfaces on that same parent, and the same as the parent itself. However, allowing DHCP on a virtual interface still makes sense, as long as its the only virtual interfaces using dhcp, and the parent is not using dhcp. Otherwise, I guess one could make sure to use the parent device as the dhcp interface, and then static virtual interfaces for the rest, not sure if this is by design or not.