26 Apr 2006

renaming network devices with udev

one annoying with a laptop i'm working with here is that eth0 and eth1 swaps around between the wired and the wireless interfaces on reboot. i just discovered that you can lock them down using udev. it is as simple as adding a file /etc/udev/rules.d/90-network.rules according to the udev primer:

An example rule is shown below:
KERNEL=="eth*", SYSFS{address}=="00:52:8b:d5:04:48", NAME="lan"
now not only do they stop moving around, they have a pretty name to go with it.

You can reply to me about this on Twitter: