bonding interface causes udev error after reboots



While testing a redundant network interface in OpenSUSE 11.0 I ran
into an error condition which prevents bonded interfaces coming up
again on reboot. It appears to be related to the udev persistent net
naming scheme, and can be easily reproduced.

eth0 and eth1 were configured as off, bond0 was configured as active-
backup using eth0 and eth1 as slaves, largely as configured by yast,
plus:

BONDING_MODULE_OPTS='mode=1 miimon=100 use_carrier=0 primary=eth0'
BONDING_SLAVE_0='eth0'
BONDING_SLAVE_1='eth1'

added to /etc/sysconfig/ifcfg-bond0.
On rebooting to restart the network and initialize the bond0 interface
all worked perfectly. On a second reboot, however, the eth1 interface
was renamed to "eth1_rename". since there was no eth1 slave the
bonded interface failed to start (itself very odd because the
redundancy of the bond should only require one working interface).

I noticed eth1's MAC address had been replaced by one identical to
eth0. This is evidently a normal thing for the bonding interface to
do. on reboot this confuses udev's persistent net naming rules, which
use the MAC address to assign the interface name, into naming the
interface eth1_rename_ren. It did not happen the first reboot because
the interface had not yet reprogrammed the MAC address.

I was able to create a workaround for this problem by using lspci to
determine the PCI bus ID, and changing lines in /etc/udev/rules.d/70-
persistent-net.rules ("You can modify it,as long as you keep each rule
on a single line"), such as changing:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:1c:c0:33:00:5b", ATTR{type}=="1", KERNEL=="eth*",
NAME="eth0"
to use the PCI bus ID to identify the devices:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
KERNELS=="0000:02:00.0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Is there a different or easier workaround for this problem, and is it
likely to cause problems, if the network card are not moved or PCI
addresses change?
.



Relevant Pages

  • Re: Shorewall & network/interfaces
    ... They don't need to be on the same network, but I only have one for now. ... My eth1 does not have an ip assigned: ... # The loopback network interface ... iface lo inet loopback ...
    (Debian-User)
  • Re: Second ethernet card seems to cause networking failure?
    ... The second networking card is for eth1, etc., and ... /sbin/ifconfig shows things as properly connected, with eth0 being the outside interface ... bring eth1 last the default gw is in the local network and assuming the dns ...
    (Debian-User)
  • Re: server hangs on boot with plugged in lan-cable
    ... then the server hangs after setting up the network. ... interface eth1 is not active. ... Warning: No interface active done eth0 device: Intel ...
    (alt.os.linux.suse)
  • Re: help about bridging...
    ... > I'm trying to set up a little server that can share an internet ... I try to specify an interface as ping source with -I. ... eth1 Device is correctly installed and its IP address ... same network, and first route to 192.168.7.3 is eth0. ...
    (comp.os.linux.networking)
  • Re: Network stack: three strikes and youre out....
    ... You can change from say a DHCP network configuration to a static ... your only solution is to reboot. ... Usually turning the interface off and on again ...
    (comp.sys.mac.comm)