I have in /etc/udev/rules.d/70-persistent-net.rules: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="d4:3d:7e:02:xx:xx", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:0e:xx:xx", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" But when booting: r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded r8169 0000:02:00.0 eth0: RTL8168evl/8111evl at 0xf7e16000, d4:3d:7e:02:xx:xx, XID 0c900800 IRQ 44 r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI e1000: Copyright (c) 1999-2006 Intel Corporation. e1000 0000:04:01.0 eth1: (PCI:33MHz:32-bit) 00:1b:21:0e:xx:xx e1000 0000:04:01.0 eth1: Intel(R) PRO/1000 Network Connection As you can see, d4:3d:7e:02:xx:xx is eth0, while it should be eth1. The rule for USB wifi device in 70-persistent-net.rules works. Renaming to 99-persistent-net.rules did not help. The same setup worked correctly in F18.
Interface names can no longer be swapped, they need different names not clashing with the kernel namespace. It is not expected to work in Fedora 19 or any newer release. Edit the file to use any name other than eth0/1. Remove the rules and use the new default names, or install biosdevname. http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
I removed the rules (deleted the file completely), but after reboot interface names were still eth0 and eth1. How to get the new names?
*** Bug 989212 has been marked as a duplicate of this bug. ***
Hmm, what does (running as root): udevadm test /sys/class/net/eth0 print?
# udevadm test /sys/class/net/eth0 calling: test version 204 ... read rules file: /usr/lib/udev/rules.d/80-net-name-slot.rules read rules file: /etc/udev/rules.d/80-persistent-net.rules ... PROGRAM '/lib/udev/rename_device' /usr/lib/udev/rules.d/60-net.rules:1 starting '/lib/udev/rename_device' '/lib/udev/rename_device' [9468] exit with return code 0 IMPORT builtin 'net_id' /usr/lib/udev/rules.d/75-net-description.rules:6 IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/75-net-description.rules:12 NAME 'enp2s0' /usr/lib/udev/rules.d/80-net-name-slot.rules:12 RUN '/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name' /usr/lib/udev/rules.d/99-systemd.rules:52 changing net interface name from 'eth0' to 'enp2s0' error changing net interface name eth0 to enp2s0: Device or resource busy Will attach full command output.
Created attachment 780185 [details] udevadm output
Please note - I do have /etc/udev/rules.d/80-persistent-net.rules, which is the same as in this bug's description except eth0 and eth1 are swapped. But with or w/o it after reboot the interface names are the same - eth0 and eth1.
(In reply to Nerijus Baliūnas from comment #7) > Please note - I do have /etc/udev/rules.d/80-persistent-net.rules, which is > the same as in this bug's description except eth0 and eth1 are swapped. > > But with or w/o it after reboot the interface names are the same - eth0 and > eth1. The rules might fail any random time in the future, when the drivers are loaded in a different order. It's not safe to use them. Userspace cannot reliably rename devices in the same namespace the kernel uses to create new devices. (In reply to Nerijus Baliūnas from comment #2) > I removed the rules (deleted the file completely), but after reboot > interface names were still eth0 and eth1. How to get the new names? By removing your rules file. If custom names are specified, the default names will not be used.
As I told before - I removed the rules file, but dmesg after reboot still showed the names as eth0 and eth1, but not enp2s0 or similar.
(In reply to Nerijus Baliūnas from comment #9) > As I told before - I removed the rules file, but dmesg after reboot still > showed the names as eth0 and eth1, but not enp2s0 or similar. The requested test in comment 4 shows that the rules file is still there, that's why I assume that is the reason for the default names not getting active. The output shows that the names are properly composed, just not applied. If you want to debug it further, please repeat the test without the rules file.
The same "error changing net interface name eth0 to enp2s0: Device or resource busy" w/o the rules file. But ifconfig eth0 down helped - after it was renamed correctly: changing net interface name from 'eth0' to 'enp2s0' renamed netif to 'enp2s0' changed devpath to '/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/enp2s0' ACTION=add DEVPATH=/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/enp2s0 But running udevadm test /sys/class/net/eth1 does not rename the PCI e1000 card (output attached). Why?
Created attachment 785287 [details] udevadm eth1 output
(In reply to Nerijus Baliūnas from comment #11)
Busy interfaces can never be renamed, that was always the case. If something uses the device already, brings it up, it is too late to rename it. Seems you have a ifcfg file telling the device should be named eth1: NAME 'eth1' /usr/lib/udev/rules.d/60-net.rules:1