udev troubles finally solved

After spending total amount of several dozens hours of fighting with the infamous udev arbitrary device name assignment, I’ve finally won. Device name assignment is absolutely underdocumented and I was able to get it work only thanks to the kind people sharing their experience and knowledge on the net. For the record, after a lot of googling and experiments I ended up with the following setup of the multiple network and sound cards on my Debian system:

  • In module configuration:
options snd-... index=0
options snd-... index=1
options snd-... index=2

This ensures ALSA devices are assigned to the defined positions.

  • In /etc/udev/udev.rules:
KERNEL=="eth*", SYSFS{address}=="00:11:22:33:44:55", NAME="wan"
KERNEL=="eth*", SYSFS{address}=="ff:ee:dd:cc:bb:aa", NAME="lan"

Note:

  • Matchers have two equal signs, assignments only one.
  • Hexadecimal digits of the MAC address in ‘SYSFS{address}’ must be written in lower case. Stupid, stupid, stupid.

Then the network devices are accessible under the names ‘lan’ and ‘wan’ and you should use them in ‘/etc/network/interfaces’ instead of ‘eth0’ etc.

Leave a Reply

Your email address will not be published. Required fields are marked *