2010/09/25

How to Fix Internet Device Name in Linux?

Following is a sample of /etc/udev/rules.d/70-persistent-net.rules (A single line)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="aa:bb:cc:dd:ee:ff", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Thus, the network interface which has MAC "aa:bb:cc:dd:ee:ff" will always be named as eth0.

Note: udev checks MAC string case-sensitively.