[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Controlling eth0,eth1,... assignment order?

Torquil Macdonald Sørensen wrote:

I am having some problems controlling the assignement order of eth0,
eth1 and so on with udev. There was another thread about this earlier:


I created a /etc/udev/local.rules as adviced, with a symlink to this
file in /etc/udev/rules.d/, but it didn't solve the problem.

The assignment order is usually correct, but sometimes wrong, and I
remember seeing an error message during bootup warning about some
problems with renaming the network interfaces, but I did not manage to
locate the message in the log files.

I also had the same problem. It seems to me that udev cannot assign a
name to a network device if that name is already taken by another
device. Therefore these udev rules only "work" if the assignment
happened to be correct anyway and fail if the devices switch names
during boot. On my laptop I had a failure rate of about 5-10%.

I managed to circumvent this problem by assigning new names to both
devices in the udev rules, e.g.

KERNEL="eth*", SYSFS{address}="00:00:00:00:00:00", NAME="lan0"
KERNEL="eth*", SYSFS{address}="11:11:11:11:11:11", NAME="wlan0"

Then I changed /etc/network/interfaces so that it referred to the
devices by these new names instead of ethx. Since then the assignment
and the subsequent configuration have worked 100% reliable. Of course
you have to remember to change to the new names everywhere, for example
if you use ifplugd.


Reply to: