Robert Donovan wrote:
Just when I thought I had gotten udev working right. I just upgraded
to udev-118-1.fc8 under the 2.6.24.7-92.fc8 kernel. I have two network
interfaces on my box, and they were named eth0 and eth1 as per normal,
before I updated. After the update, none of my VMWare virtual machines
started without a network error saying that the bridged network device
on vmnet0 was down, and the iptables started dropping all packets.

Checking /etc/sysconfig/network-scripts revealed the ifcfg-eth0 had
been renamed ifcfg-eth0.bak and two new files, named ifcfg-eth1 and
ifcfg-eth2, had been written in it's place. Checking
/etc/udev/rules.d/70-persistent-net.rules showed that the interface
names had been incremented by one. I tried removing the file and
rebooting, but no joy. Same problem. Tried adding a line in
70-persistent-net.rules: SUBSYSTEM=="net", DRIVERS=="forcedeth",
NAME="eth0" This didn't work, because restarting udev just caused the
file to be rewritten by the /lib/udev/write net rules script. I got
the network working again by manually changing all the references it
eth0 in iptables to eth1, but doing this in VMWare is a pain. Before I
go poking at the udev scripts any more, does anyone have a fix already
concocted for this?

This nonsense is really frustrating, I was under the impression that
udev's purpose was persistent naming, not persistent renaming, of
devices.

Part of the problem is that there is no guaranteed order to device assignment in the kernel. Module load order, timing issues, detection routines, PCI slot, and the phase of the moon all seem to have an effect on which device turns on as eth0 vs. eth1 when you have multiple devices in a system.

One thing I notice in your persistent rules is the lack of an address attribute for naming. For example, in my system I have a built-in 10/100 ethernet port and an add-in PCI card for gigabit ethernet. Left on its own the system wants to make the built-in port eth0, but that's not what I want. So I use the persistent rules to force re-naming. My 70-persistent-net.rules file looks like this:

---------------------------------------

# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:14:2a:46:65:b7", ATTR{type}=="1", NAME="eth1"


# PCI device 0x10ec:0x8169 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:40:f4:eb:c6:d9", ATTR{type}=="1", NAME="eth0"


---------------------------------------

The parts that I swapped around are the address and name. This forces a device with a certain MAC address to have a specified name.

Gus


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to