[arch-dev-public] network interface naming with systemd 197
Dave Reisner
d at falconindy.com
Sun Jan 6 13:52:03 EST 2013
On Sun, Jan 06, 2013 at 01:38:03PM -0500, Dave Reisner wrote:
> Just an FYI:
>
> Upstream pushed a commit[0] which gives network devices persistent, and
> unique, names based on hardware attributes, avoiding the random kernel
> names. While this solves a real problem, it's also a fairly jarring
> change. For example:
>
> $ udevadm info /sys/class/net/eth0
> P: /devices/pci0000:00/0000:00:1c.2/0000:05:00.0/net/eth0
> E: DEVPATH=/devices/pci0000:00/0000:00:1c.2/0000:05:00.0/net/eth0
> E: ID_BUS=pci
> E: ID_MODEL_ID=0x4364
> E: ID_NET_NAME_MAC=enxbcaec50bfcc8
> E: ID_NET_NAME_PATH=enp5s0
> E: ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC.
> E: ID_PCI_CLASS_FROM_DATABASE=Network controller
> E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
> E: ID_PRODUCT_FROM_DATABASE=88E8056 PCI-E Gigabit Ethernet Controller
> E: ID_VENDOR_FROM_DATABASE=Marvell Technology Group Ltd.
> E: ID_VENDOR_ID=0x11ab
> E: IFINDEX=2
> E: INTERFACE=eth0
> E: SUBSYSTEM=net
> E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/eth0
> E: TAGS=:systemd:
> E: USEC_INITIALIZED=42063
>
> If I were to reboot right now (systemd-git), eth0 would become enp5s0. I
> tend to think that this is fairly extreme, and would throw off a lot of
> people -- especially those who never needed to deal with interface
> renaming.
>
> For systemd 197, I plan on shipping this rule as documentation in
> /usr/share/doc/systemd and _not_ enabling it by default. Those who want
> to opt in can simply copy the rule to /etc/udev/rules.d. They can also,
> of course, continue to use whatever MAC-based rules they might have, but
> I would strongly recommend switching these rules to be triggered by
> ID_NET_NAME_{SLOT,PATH,ONBOARD} instead.
>
> Cheers,
> Dave
>
> [0] http://cgit.freedesktop.org/systemd/systemd/commit/?id=394e2938ff9
Alternatively, we could simply write a symlink to /dev/null on post_upgrade
to 197 and post_install() if /etc/udev/rules.d/80-net-name-slot.rules
doesn't exist. I don't particularly care either way, since both methods
are a matter of documentation to enable it. I'll point out that masking
has the advantage of not needing to worry about changes to the upstream
rule when a user opts in to interface renaming.
d
More information about the arch-dev-public
mailing list