The problem with Fedora 15's consistent network device naming

October 15, 2011

Lately I've been doing a bunch of things with a real installed Fedora 15 machine (previous experimentation has mostly been with a Live USB stick used temporarily on various machines). One result of this is that I've actually noticed the name that Fedora 15 chose to give my ethernet as a result of its switch to consistent network device naming.

As it happens, my Fedora machine's Ethernet is now called p5p1. There are at least two problems with this name.

The first one is that it's wrong. Since this is an onboard Ethernet port, it should have an emN name (either em0 or em1 depending on which bit of documentation I read). It doesn't get the right name because biosdevname trusts the BIOS's information about what things are and aren't onboard devices. Yes, really, despite plenty of experience that trusting PC BIOSes for anything (or at least anything not required to boot Windows) mostly serves as a source of comedy gold (as long as you're at a safe distance).

The second problem is that this is a terrible name. Practically its sole virtue is that it's unique. It's not predictable (not without detailed information about the machine's bus topology and a good understanding of PCI), it's not very meaningful, and it's certainly not memorable. It's the kind of name that can only be sensibly used by programs that get it directly from the system's configuration in one way or another.

(There are a number of problems with slot based names, but one of them is that another machine with a different motherboard (but also onboard Ethernet) might well have a completely different name because its Ethernet controller is hooked up to the PCI(E) bus in a different 'slot' and a machine with a real network card (and no onboard network) will have yet another name.)

What this means is that while the idea of consistent network device naming may in theory be good, the tools for achieving it are not yet mature. Right now it certainly looks as if biosdevname is terminally naive and will frequently give wrong answers (I would guess that it gets things wrong more often than it gets them right).

(As it happens I think that there is enough information present in the output of biosdecode to deduce that the machine's Ethernet must be an onboard device, so it's clear that biosdevname should be able to do better. Possibly it needs to be taught about all of the common ways that BIOS creators get this information wrong and given heuristics for figuring out what the real situation is likely to be.)

Comments on this page:

From at 2011-10-15 06:33:52:

The embedded case is a real pain and I agree it'll get this wrong far more often than it ever does get it right. Only Dell and IBM servers ship with the necessary SMBIOS information to explicitly tell the OS that the interface is embedded - HP servers don't yet and I'd be surprised if any desktop or laptop did.

As for pluggable NICs in PCI(E) slots, I think the detection is more mature. It'll solve a lot of problems for some of the systems I see, where we expect large numbers of identical systems to be set up consistently. We're going to have to change the way we work though to stop assuming particular eth* numbers (especially eth0) and begin picking them up programmatically, which will be a difficult mindset change.

Hopefully the cure will end up being less bad than the symptoms.

By cks at 2011-10-15 16:06:28:

I wrote up what this machine's information shows in FindingOnboardEthernets. Short summary: my machine fails if you insist that the BIOS information conclusively prove that the device is an onboard one, but I maintain that this is the wrong standard in the face of information that's known to be uncertain.

My overall view is that the embedded case is a bad mistake for Fedora. My strong impression is that Fedora is installed on far more laptops and desktops than servers; in other words, this consistent device naming is all but guaranteed to be wrong on most Fedora machines. (And then it's going to change when biosdevname gets improved, which is not exactly 'consistent'.)

In general I also disagree with a physical slot based naming scheme for network cards; I don't feel that it maps well to what I actually want to do even on servers. But that's another large entry.

From at 2011-10-15 18:08:44:

You're right on the 'consistency' of biosdevname between releases, that really should be highlighted. I've seen a bug for a regression or change in biosdevname detection that causes device names, so the network config isn't applied at boot.

Technically, I'm not sure how you would solve it. Some pre/postinstall scriptlets in biosdevname could identify the change and potentially fix it, but do you really want an RPM to rewrite your network configuration during an upgrade?

-- Dominic

From at 2011-10-15 18:15:19:

Apologies, forgot to sign my comments. Both and were me.

-- Dominic

Written on 15 October 2011.
« Power consumption numbers for my 2011 home machine
Why I say Fedora 15 could get my machine's Ethernet's name right »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sat Oct 15 03:00:51 2011
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.