Fedora 15 Changes Network Device Naming Scheme
dkd903 writes "Fedora developer Matt Domsch has announced that Fedora 15 is breaking the conventional ethX naming scheme used for Ethernet devices by adopting a new scheme called Consistent Network Device Naming. The ethX naming scheme works fine as long as the system has only one Ethernet port. However if there are more than one Ethernet ports, the actual problem starts."
The excitement of the "ifup/ifdown ethX" game with co-workers watching for the green light while mapping blade enclosures is no more? What a shame.
Civilization, the death of dreams.
At my last job we sold CentOS-based routers and fileservers. I'd rename the interfaces ethWAN and ethLAN in the /etc/sysconfig/network-scripts/ifcfg-eth* scripts. And then labeled the interfaces on the box for the installer. Worked pretty well, until we started messing with VLANs, and the init scripts choked on VLANs attached to renamed interfaces.
Debian's udev rules also tried it, but it didn't work out so well for systems that had a lot of changes - we've got machines in the field that are on /dev/eth8...
Why can't I mod "-1 Idiot"?
the proposed solution depends on the slot the board is in? These must have been Apple II guys who haven't come out of cave in the last 20 years.
Why don't they just use an alias for the MAC address on the cards, so that it is totally general?
"However if there are more than one Ethernet ports, a sort of race condition develops at every system boot and the ports may get their names in an arbitrary order"
Wrong, udev handles this very fine. This is a complicated solution to a non-problem.
I mean it's not like network cards have unique identifiers or anything... sigh.
There are a lot of device file naming conventions which could be adopted and would serve some useful purposes, but this isn't one. Hasn't the trend been *away* from trying to identify things by how they're plugged in toward identifying them for what they are?
I want my Cowboyneal
1. ethX works fine as long as X fits into 1, 2 or 4 bytes counter. /proc filesystem conventions, the sdXY SCSI disk names convention and so on
2. the MAC address for each ethernet is the thing that allows you to discern among all of them, 1, 2 or 65536!
3. Good move, Fedora. Then you can change also the
Maybe Computers will never be as intelligent as Humans.
For sure they won't ever become so stupid. [VR-1988]
http://webcache.googleusercontent.com/search?q=cache:mIvkJYLNHM0J:domsch.com/blog/%3Fp%3D455+matt+domsch+ethernet&cd=1&hl=en&ct=clnk&gl=uk
His blog seems be down with all the floods of people telling him to lay off the crack pipe.
What's this going to cause as far as applications, is it going to require every single app that talks to ethernet to have special functions for Fedora?
Build your own energy sources from scratch. http://otherpower.com/
Fedora Core already makes use of "udev" and it does a decent job. Then there are the "interface-specific" scripts in "network-scripts" that do a decent job of naming or renaming interfaces along with other stuff. The combined method of "udev" and "network-scripts" confused me when "udev" became "useful" since I was used to using those "network-scripts", but I learned how stuff works. Why can't this Redhat engineer just leave things alone?
As for this Redhat developer's claims that problems start when multiple Ethernet interfaces exist in a computer, I think he is DEAD WRONG. My own experiences with multiple Ethernet interfaces in the same Redhat/Fedora Core Linux computer have always been predictable...and I have used Fedora Core since it was called Redhat 4.0 (still have the original box to prove it and once had "paid support" with Redhat). I have used Ethernet interfaces from the same vendor, even the same model from the same vendor (in some cases a few MAC addresses apart), as well as mixed-vendor setups. Never an issue. NEVER. IMHO multiple network card detection and support in Linux has gotten better over the years.
I think this Redhat engineer is just looking for work to do...or trouble to cause...depending on your point of view, of course.
Dunno it is really an issue. Seems to me Fedora are making work for themselves. In Debian they use a 70-persistent-net.rules file to tag interfaces with the same name each time they are detected. Works nicely especially when you have multiple interfaces and one that is removable.
Just another FTSTP really.
Rooster - A friend. "Anyone's friend in particular or just generally well disposed to people?"
This is a complex solution to a non-problem I think
So tell me, when, on a reboot, we cannot make sure that 'eth0' will remain 'eth0' if we have more than one ethernet device? Bullfish to the n-th factor. The boot strapping in /etc/init.d/network has MORE than compensated for this for years in any RedHat-related or spin-off distro I've been working with. For any sort of persistent device naming you can use udev rules (can be a bit over learning overhead so you don't trump rules or get your rules to work the way you want them to) or hack out one of the ifcfg-eth* network device scripts and edit the HWADDR parameter with the MAC address of the ethernet device you want to hard-line to that device name.
To the articles defense, the new naming scheme does make sense, but regardless, it's just that: over engineered and way more complicated than it needs to be. If it isn't broke, don't fix it. And furthermore, don't call something broke when it's not.
As has been mentioned above - you can tell from your comments you are just a home user.
Try writing OS-level software (stuff that is imaged onto the device) that depends on the NIC in position 1 on the PCI bus always being the management interface (IE, the first port in the chassis). Remember this software has to know IN ADVANCE which port it is, you can't use the MAC for this at all.
This has been a problem in Linux for years and one that developers have always had to hack and slash around. I am glad RedHat is finally fixing it. Hopefully other distributions will follow suit.
this is why I don't like the /dev/sd* interfaces in Linux - you have to dig deep into /proc to find out which port SATA and SAS devices are on
You might appreciate /dev/disk/by-id/:
$ ls -l /dev/disk/by-id/ ../../sdb ../../sda
total 0
lrwxrwxrwx 1 root root 9 Dec 24 10:58 ata-ST3500630AS_9QG32BJ5 ->
CLIPPED FOR LAMENESS FILTER
lrwxrwxrwx 1 root root 9 Dec 24 10:58 ata-ST3500641AS_3PM1BA52 ->
CLIPPED FOR LAMENESS FILTER
The /dev/disk tree can be super useful for, e.g. iSCSI device names in scripts.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Usually udev handles this correctly. /etc/udev/rules.d/70-persistent-net.rules and rebooted, and then everything was renumbered, I went from there, and it has been stable since. Took me a while to figure out what was going on.
Recently I was swapping NIC cards in and out of my server, and after putting a card back in, only one of my 3 network cards was functioning. Fortunately there was a system message saying that udev was renaming eth1 to eth2 (I don't know why it was), and neither eth1 or eth2 was functioning. I blew away
At setup a system that identifies the MOBO NIC and the other PCI NICs would have been helpful. That's what the new system proposes doing.
I have never had much of a problem with multiple eth devices. Sometimes udev gets mixed up and changes the order. You can manually correct this in the udev.d rules. I suppose if you were trying to deploy large numbers of machines this could become problematic. If you knew it was all the same hardware seems you could just code the udev network rules so they would not be modified.
Making the naming consistent does *not* require using new names.
I've never had ports swap names on a reboot, but I have seen it after a kernel upgrade. I've seem Mac servers with small tree cards also do it after an OS upgrade.
This 'solves' one problem but creates another.
Yes, sometimes in a multi-homed server, the ordering gets confusing. *however* if trying to write a script to operate on a range of heterogeneous systems, 'eth0', etc is more likely to work than 'em0','pci0',etc. Most places that do have confusing names compensate by one of the following:
-Using ethtool to see what driver manages it and deal with it that way (basically mimicking this design), but this has the same issues, which lead many places to do the second option.
-Detecting what subnet they are via DHCP and using that information to find the 'right' nic for something or other.
In multi-homed systems, the bios-dictated topology is usually less important than the IP topology.
XML is like violence. If it doesn't solve the problem, use more.
How about a compromise? Keep the ethX names, but use the proposed scheme to have an unambiguous order in which the names are assigned.
"Education is not the filling of a pail, but the lighting of a fire." -- William Butler Yeats
There are plenty of posts here about hardwired interfaces. Survey seems to say that udev and /dev/disk/by-id/ current provide enough flexibility.
Is it possible to say the same of wireless networks, given the rapidly evolving environment we're part of? I say we should focus on the dynamic nature of wireless, and handle device naming, prioritization. security and routing.
Can we take a look at how these things work and fix these entwanglements? (TM)
Like the healthcare debate, lets fix whats broken, not re-invent the whole magilla.
I prefer having greater clarity and visibility into which dev is which specific piece of hardware.
The new convention is pretty straight forward and consistent. I like consistent.
The feature[1] is only for some servers (HP, DELL), so that the device name would match the label on the port. THERE IS NO NEED TO PANIC.
also, it won't change your settings, it will only change on new installations.
[1] https://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming
[2] https://fedoraproject.org/wiki/FeatureList - " On Dell and HP servers with multiple network ports on the motherboard, name them lomX rather than ethX. "
You cannot meaningfully use the MAC addresses in a JumpStart kind of situation as you don't know at jump-start creation which adapter will be which in the MAC address sort order, particularly when you are using insert cards.
I use udev, but then I edit the persistent rules it generates to rename my interfaces "intX" and "extX" (internal and external interfaces) for making firewall rules and so on.
The problem is that there is no real "right answer" for naming devices berfore you identify them explicitly.
Oddly enough, once you are part of "a system" (q.v. a network or server farm) the problem can be magically moot. IPV6 will solve most of your internal/external network topology questions once you have established your anchor machines (routers). Explicit naming of media (Volume Labels, LVM names, metadevice names) will solve the media topology issues. etc.
The only "impossible" topology is dynamic USB as the standard doesn't provide any means for tagging, say, which of which serial adapters are connected to what devices. They get ttyUSB(X) names in probed-then-plugged order and there are several semi-universal chips used to connect a large number of devices (touch screens, GPS, raw serial adapters, etc) that all report just the serial chip's vendor and part id's.
All of the solutions that involve implicit tagging by arbitrary value (MAC) or bus topology (PCI bus ID, USB bus ID, SCSI bus LUN, etc) will have just as many drawbacks as arbitrary naming, but they won't seem to have those drawbacks until after they get instituted as policy and _then_ they bite you.
Bad information, especially when it is only occasionally bad, is always worse than no information.
Innocent people shouldn't be forced to pay for inferior software development.
--"Code Complete" Microsoft Press
Let's break compatibility for a narrow market segment!
THERE IS NO NEED TO PANIC.
You're new to Slashdot, aren't you?
Have gnu, will travel.
I am a noob at this stuff, but even I can find on Wikipedia the following:
udev supports persistent device naming, which does not depend on, for example, the order in which the devices are plugged into the system. The default udev setup provides persistent names for storage devices. Any hard disk is recognized by its unique filesystem id, the name of the disk and the physical location on the hardware it is connected to.
udev rules can match on properties like the kernel subsystem, the kernel device name, the physical location of the device, or properties like the device's serial number. Rules can also request information from external programs to name a device or specify a custom name that will always be the same, regardless of the order devices are discovered by the system.
Is this a solution to a problem that doesn't exist? I can however see how the new naming scheme looks tidy.. but then again - we do not want to know about the underlying hardware when in userland, do we?
I run a cluster with eth0 and eth1 defined. If I swap out a network card on a machine, a new eth2 gets created, rendering that machine unreachable over the network. To fix this, I edit /etc/udev/rules.d/70-persistent-net.rules manually.
Udev doesn't seem intelligent enough to figure out how to do the substitution automatically.
To-do List: Receive telemarketing call during a tornado warning. Check.
jnelson4765 is right. It is about consistency when provisioning large numbers of machines, such as virtual servers. You want to be able to predict the interface assignments, so that physical and ethernet (VLAN) connectivity can be done consistently. For example, if I am provisioning 100 servers of the same model into my farm of virtual servers, I want to be able to reliably predict which interface will be connected to a VLAN. I don't want to have to do a scripted hack to determine that on machine1 eth0 is on the production VLAN, but on machine2 eth0 is on the management VLAN. This solves that problem. With this, I can take a server WITH NO OPERATING SYSTEM ON IT and physically connect the embedded NIC to the management VLAN and the PCI NIC to the production VLAN and know ahead of time which interface names will be connected to each VLAN. Without this method, I will still get persistency across reboots, but may not get consistency across multiple systems.
Matt has been working on this problem a long time. I believe he used to be with DELL and tried to get a group of hardware vendors to solve the problem by (1) default ordering the eth0 interfaces by MAC address (required some code support in the OS) and then (2) getting the hardware vendors to agree on a universal rule that MAC addresses were assigned to devices in preferrential order, hopefully coordinated with the packaging on the motherboard or the server itself. The problem has long roots, at one time I believe the "convention" was to order eth0-ethX by the PCI discovery order on the PCI buss.. but while stable for one machine.. as soon as a new rev of that motherboard came out or a new chipset emerged.. blewy.. right in the middle of a build on thousands of servers. Eventually Peter Anvin with Syslinux bootloader and PXE fame began making available some plugin modules to pre-probe or assess the situation before loading the kernel and passing a custom kernel argument to the booting OS.. be that linux, windows.. whatever.. which looked very very promising. Even worked with WinPE.. awesome. But the problem is still very generic and germane to lots of hardware.. even hard drives or storage LUNs.. to avoid violating the rule "do no harm" a system booting with unknown hardware is left untouched.. just in case it formated with a pattern of file system that is not recognizable.. like GPT or HPFS+ It gets even more mind blowing when you consider java virtual machines and virtual cloud vm support systems.. how do you know what you don't know.. if you didn't build the entire system? Fair warning.. I used to work at HP.. but we tackled this problem.. and did win the day.. but you could only do it in a software+hardware company+opensource sort of way.. Long term.. i think the best way would be a plugin for Syslinux that supported snmp read-only probing for basic ethernet, pci bus and possibly storage device signatures. In thoery this would solve the entire problem and be supportable far into the future.. but I never got a chance to execute on it. GrubPXE also shows a lot of promise in the same area. Bootloaders and Partiton management are vastly underrated for all systems.
If you all would actually read the article, you would have read that while Fedora is the first to implement this, other popular distributions such as Ubuntu. Quoting from the article:
> Although Fedora is shipping biosdevname first, other Linux distributions are also expected to adopt it.
> There is reportedly a blueprint for integrating this in Ubuntu 11.04 already and a feature request for inclusion in OpenSUSE as well.
I have been following this issue for awhile now which also affects CentOS 4 and CentOS 5. For setting up Linux firewall systems it can be a big security risk for interfaces to come up differently on a reboot. There are workarounds but an out of the box solution would surely make setting up firewalls easier on Linux.
/etc/udev/rules.d/10-local.rules add the following:
The details are in the redhat bug here:
https://bugzilla.redhat.com/show_bug.cgi?id=491432
I use the fix where you tell udev to ignore ethernet cards and let the normal modprobe.conf load the modules.
SUBSYSTEM=="pci", SYSFS{class}=="0x020000", OPTIONS="ignore_device"
I thought it was already done partially, and actually is :))
http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming
What is the benefit? In using same configuration when moving OS from one server to another?
Yeah, actually that is ugly thing - I am tired of rewriting MAC addresses, but maybe I want it so! :)
[root@Fedora ~]# cat /etc/udev/rules.d/70-persistent-net.rules /lib/udev/write_net_rules
# This file was automatically generated by the
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x8086:0x108c (e1000e) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:48:01:ab:cd", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x109a (e1000e) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:48:02:ab:cd", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
"It feels like I'm at the Zoo when reading this thread - I'm frightened, but it's interesting" (c)
It's a very thought provoking topic.
More on the topic of uniquely naming indexed or discovered hardware on a system under Linux so it always gets the same name http://www.delltechcenter.com/page/Linux+Projects [delltechcenter.com] Terrific brain teasers - they're like fermat's last theorem except for servers and workstations
If you want to clear the rules, go to /etc/udev/rules.d and delete the persistent net rules file. The new mac will then default to eth0 again. Or edit the rules file to your hearts content.
Why don't NICs have device nodes in /dev anyway? That would be the UNIX way of doing things, right? And you could place symlinks in there all you like, e.g. to name the NICs by MAC address (/dev/nics/by-macaddr/*), or by bus technology/number, or whatnot, and then refer to devices from userspace using whatever scheme you prefer.
What happened to scripting the installer to write up a simple HAL / UDEV rule for persistent interface names? Even two cards that are the same model and manufacturer have enough unique IDs at kernel level to have them named persistently.
Most times the devices won't even be the same manufacturer much less model making it even easier. I have named mine that way for quite a while already....
To err is human; effective mayhem requires the root password!
# cat /etc/udev/rules.d/70-persistent-net.rules /lib/udev/write_net_rules
# This file was automatically generated by the
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# PCI device 0x14e4:0x164c (bnx2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:72:62:58:a2", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x14e4:0x164c (bnx2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:72:62:58:a4", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"