You are not logged in.
Pages: 1
hi, I have two network adapters. one is internal and one is a pci card. I used this https://wiki.archlinux.org/index.php/Ud … ork_device and added udev rules to make sure the correct one is always eth0 and the other one is eth1. but they still occasionally switch after a reboot,
my /etc/udev/rules.d/10-network.rules looks like this:
SUBSYSTEM=="net", ATTR{address}=="74:ea:3a:83:86:5e", NAME="eth0"
SUBSYSTEM=="net", ATTR{address}=="00:1c:c0:88:0b:3f", NAME="eth1"
I am using a full systemd environment. no classic initscripts or sysvinit installed (just in case that affects things).
Any idea how I can tell why this is happening?
Offline
When choosing the static names it should be avoided to use "ethX" and "wlanX", because this may lead to race conditions between the kernel und udev during boot. Instead better use interface names that are not used by the kernel as default, e.g. "net0, net1, wifi0, wifi1"
Offline
I think what 65kid's link is trying to say is that you should not try to change the kernel's naming structure, but rather add an alternate persistent name, and then direct everything to that instead.
For instance symlink 74:ea:3a:83:86:5e to /dev/net0 and then use that rather than /dev/eth0. It is the same thing as being able to use the /dev/disk/by-* insetad of /dev/sdXY
Offline
Try with NAME:= rather than NAME=
From "man udev":
Assign a value to a key finally; disallow any later changes.
However, I always saw the recommended method as being to assign a SYMLINK, and not change the name. E.g.:
SUBSYSTEM=="net", ATTR{address}=="00:c3:d1:a5:e4:09", SYMLINK+="eth-router"
Offline
Assigning a NAME is still valid for network devices, you're just not supposed to trample on the kernel's namespace. It's racy, and udev used to contain hacks to allow the switch to happen. The wiki is correct in this case -- pick a name that isn't ethX or wlanX.
Offline
ok, thank you guys. I will change eth0 to net0 and eth1 to local0 before next reboot. thanks you very much
Offline
Pages: 1