Date: August 16, 2012

I did a fresh install of Fedora 17 back in July. At that time, I copied my old /etc/sysconfig/network-scripts/ifcfg-eth0 into place, nuked network manager, and did a service network restart to get myself on the air. This worked back then, and I ran for a month or so.

Then I rebooted the system to get a new kernel, and found no network connection. I was baffled for quite some time, and still don't fully understand how things worked for so long and why I got into trouble when I did a big upgrade of a bunch of packages and rebooted, but I am running again and do understand quite a lot about the mess I found myself in.

First of all, in their infinite wisdom, the Fedora wizards have decided to abandon the traditional network device names like eth0 in favor of new names that indicate what actual network hardware a logical device is connected to. Devices on the motherboard get names like em1, em2 (the numbering now starts at one and not zero). Devices on PCI cards get names like p0p4, where the number is derived from p<slot>p<port>. This apparently happened back with Fedora 15.

Indeed, ifconfig -a shows me an "em1" port that is not configured, and when I copied my ifcfg-eth0 script to ifcfg-em1 and did an "ifup em1" command, I was on the air. During the confusion, I used a USB network adapter (which did show up as eth0) and once I deleted the HWADDR line from ifcfg-eth0, it worked just fine till I got things sorted out. It is only a matter of time before they find a way to rename this eu1 or some such.

Allegedly, the motivation for this is to make things simpler for servers with multiple ethernet ports on a motherboard, or something like that. You can read their discussion of why they think this is a good idea at: this discussion of consistent network device naming for Fedora.

Getting eth0 back

At this point, I am happy to just have things working. The fix would be to hack on the file /etc/udev/rules.d/70-persistent-net.rules. I will note that this file no longer exists on my system. My guess is that it got removed as part of the big package update I did just before rebooting and that is why eth0 suddenly became em1. I will note that the biosdevname package is part of this whole game, and it was one of the packages updated.

A person might try creating the file /etc/udev/rules.d/70-persistent-net.rules with a line like this:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:48:72:fd:b8", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
I will note that when I look at /var/log/messages, I see two lines like this when the driver (in my case the forcedeth driver for my nVidia CK804 ethernet controller) fires up:
May 16 20:14:49 cholla kernel: [    9.679443] forcedeth 0000:00:0a.0: ifname eth0, PHY OUI 0x5043 @ 9, addr 04:4b:80:80:80:03
May 16 20:14:49 cholla kernel: [    9.679451] forcedeth 0000:00:0a.0: highdma csum gbit lnktim desc-v3
Notice in the above that the driver thinks it is setting up "eth0". Apparently the biosdevname package does the renaming somewhat later.

Take a look at:

And consider the contents of the biosdevname package:

rpm -qlp biosdevname-0.4.1-1.fc17.x86_64.rpm 
/lib/udev/rules.d/71-biosdevname.rules
/sbin/biosdevname
/usr/share/doc/biosdevname-0.4.1
/usr/share/doc/biosdevname-0.4.1/COPYING
/usr/share/doc/biosdevname-0.4.1/README
/usr/share/man/man1/biosdevname.1.gz

Notice that this game is only played on x86_64 systems where there is SMBIOS support, so you won't see this behavior on i386 systems.


Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org