Matt Domsch from Dell has recently introduced a new change in Rawhide bringing consistent network device naming to Linux. Devices in Linux have been called eth0, eth1 etc forever but the names were not always consistent or predictable and this has lead to several problems for Linux administrators who are looking for a consistent device naming. There has been some attempts to solve this problem before. In Fedora 14, on my system,
$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82567LM Gigabit Network Connection
DEVICE=eth0
HWADDR=00:23:2A:F7:CB:F6
(values changed to protect the innocent)
The hardware MAC address is used by udev to rename the devices when necessary to preserve consistency and udev uses the file /etc/udev/rules.d/70-persistent-net.rules to accomplish this. The relevant line on my system looks like
# PCI device 0x8086:0x10f5 (e1000e)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:23:2A:F7:CB:F6″, ATTR{dev_id}==”0x0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
According to the feature description, this is racy and error prone and we have now a alternative method that picks up names using the BIOS with a udev helper to accomplish the same task in a better way. Quoting from the description:
“Starting in Fedora 15, Ethernet ports on servers will have a new naming scheme corresponding to physical locations, rather than ethX. Ethernet ports embedded on server motherboards will be named em<port_number>, while ports on PCI cards will be named pci<slot_number>#<port_number>, corresponding to the chassis labels. Additionally, if the network device is an SR-IOV Virtual Function, the name will have a suffix of _<virtual_instance>.
By changing the naming convention, system administrators will no longer have to guess at the ethX to physical port mapping, or invoke workarounds on each system to rename them into some “sane” order.”
Similar to the Btrfs effort in Fedora, this has also been a project involving many people over the last several years. Again, let’s look at the overall timeline:
* Matt Domsch from Dell announces a project called biosdevname back in August 2007. biosdevname review request filed for Fedora soon after. He worked with Harald Hoyer (Red Hat udev maintainer) and Kay Sievers (Novell and upstream udev developer) via this review request to enhance software and fix bugs. biosdevname becomes part of Fedora 8 and things went fairly quiet in Fedora land although work continued elsewhere
* After consensus is reached, we had a quick announcement that this feature was coming up as part of the Fedora 15 discussions. This was followed up at a later point with more details as a new version of biosdevname hit rawhide. The rules are getting into upstream udev. Anaconda, kickstart and dracut is getting enhanced to use biosdevname and it will also be installed by default in the Fedora 15 release.
Anaconda will use this feature by default and so far there isn’t a way to disable it during a fresh installation. Upgrades will preserve the same behaviour as before since /etc/udev/rules.d/70-persistent-net.rules will retain the names. As indicated earlier, this is of interest to system administrators managing server class hardware. Systems which feature a SMBIOS 2.6 version or above and have multiple ethernet ports will notice a difference in the network device names on a fresh installation to provide consistent names matching how the network ports are physically located.
Welcome to a new era. After 18+ years of history in Linux of having ethX as device names for ethernet ports and we are seeing a change now. We lived through a change of /dev/hd* to /dev/sd* and we can deal with this as well as the benefits are going to be good for system administrators and desktop users and others are not affected typically. Kudos to the developers involved in this effort. A persistent effort to bring persistent device names is finally paying off.