This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours

Bug 915528

Summary: MAC-based network interface naming with systemd/udev is impossible
Product: [Fedora] Fedora Reporter: Frantisek Hanzlik <franta>
Component: systemdAssignee: systemd-maint
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 18CC: johannbg, lnykryn, metherid, mschmidt, msekleta, notting, plautrba, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-25 20:02:10 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Frantisek Hanzlik 2013-02-25 19:36:38 EST
Description of problem:
despite of docs at:

https://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming
http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames

rules for creating ethN interfaces names based on their MAC addresses did not work, interfaces are named ethX but numbered quite randomly.

Version-Release number of selected component (if applicable):
systemd-197-1.fc18.1.i686
kernel 3.7.9-201.fc18.i686.PAE

How reproducible:
Always: take 2+ NICs to box, write /etc/udev/rules.d/70-persistent-net.rules
according to documentation (my is:

# Bus 01:00.0 - PCI device 0x1969:0x1048 Atheros Attansic L1; atl1:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:8c:93:b5:8d", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# External PCI device 0x8086:0x10d3 Intel CT Desktop Adapter w. 82574L; e1000e:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:69:5f:74", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# External PCI device 0x1186:0x1300 D-Link System Inc DFE-528TX w. RTL8139; 8139too
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:11:63:96:35", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

) and boot system. You can see NICs are numbered quite randomly.

Expected results:
udev in F17 and before could did this fine, why should it be impossible now?

Additional info:
Moreover, it seems as udev support in systemd is broken in other area too: even if '/etc/udev/udev.conf' contains 'udev_log="debug"' (and this anyhow work, as there are additional messages in system log), in log isn't anything about which and how /etc/rules.d/ rules are proceeded - thus their debugging is impossible.
Comment 1 Michal Schmidt 2013-02-25 20:02:10 EST
(In reply to comment #0)
> https://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming

This describes the naming policy using biosdevname. I don't know if you even have biosdevname installed, but in any case your current udev rules would override it.

> http://www.freedesktop.org/wiki/Software/systemd/
> PredictableNetworkInterfaceNames

This describes the naming policy that will be used in Fedora 19, but it is not enabled in Fedora 18.


A couple of suggestions:

1. Install systemd-197-1.fc18.2, which is soon to reach the updates repository:
https://admin.fedoraproject.org/updates/FEDORA-2013-1590/initscripts-9.42.2-1.fc18,systemd-197-1.fc18.2

2. Change your udev rules to assign interface names that do not collide with the names the kernel itself generates (so no "ethX" names, but perhaps something meaningful like "external", "internal", "red", "green", "dmz", ...).

*** This bug has been marked as a duplicate of bug 896135 ***