ifupdown not working when multiple interfaces

Bug #1041356 reported by Teodori Serge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ifupdown (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu Server 12.04
ifup hangs when trying to start interface (only when using dhclient)
ifdown is complaining that interfaces is not in '/run/network/ifstate', and so refusing to stop it.
BUT worse ifdown eth2 will shutdown eth0, and so I lose connection over eth0 SSH.
After reboot, server cannot setup network.

Problem lies when ifup is forking to dhclient and it gets also messed up with is '/run/network' files. When using only one interface everything works fine but when two or more interfaces are setup it becomes buggy, for now I replaces ifup with ifconfig in '/etc/init/networking.conf'.....

Steve Langasek (vorlon)
affects: apt (Ubuntu) → ifupdown (Ubuntu)
Revision history for this message
Stéphane Graber (stgraber) wrote :

Can you attach the content of /var/log/upstart as well as your /etc/network/interfaces?

Revision history for this message
Teodori Serge (teodori-serge) wrote :

Unfortunatly no, I replaced in '/etc/init/networking.conf' 'ifup -a' with 'ifconfig eth0 192.168.1.100 up', etc. and I appended an 'dhclient eth0'. This solution works, but I had also to change other init scripts, to avoid blocking when waiting for some event. The problem can be very easily reproduced (I reproduced it in a virtual machine). Just create a few interfaces eth0, eth1, eth2, etc. then run 'ifup eth0' through 'ifup ethX', check '/run/network' and THERE you see some 'if*' files are missing. Now try to shutdown an interface 'ifdown eth1' and if some files were missing you end up with shutting down eth0, so the server becomes unusable (I lost my SSH connection).

<pre>
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
        network 192.168.2.0
        netmask 255.255.255.0
        gateway 192.168.2.1
        address 192.168.2.1
        broadcast 192.168.2.255

auto eth2
iface eth2 inet static
        network 192.168.3.0
        netmask 255.255.255.0
        gateway 192.168.3.1
        address 192.168.3.1
        broadcast 192.168.3.255
</pre>

Revision history for this message
Stéphane Graber (stgraber) wrote :

You can't have multiple default gateways like you're doing above unless you're setting the metric accordingly.
So apparently the problem in this bug is an invalid configuration. Marking Invalid.

Changed in ifupdown (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.