9
I want to rename on Fedora 22 a network interface managed by systemd-networkd (version 219) from the system-assigned name enp2s0
into wan
. For that I created the following file /etc/systemd/network/80-wan.link
:
[Match]
MACAddress=mac-address
[Link]
Name=wan
However, that have no effect on the system. After rebooting the name is still enp2s0
. I see with udevadm
that udev picked up the file for configuration but ignored the supplied name:
~> udevadm info /sys/class/net/enp2s0
P: /devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/enp2s0
E: DEVPATH=/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/enp2s0
E: ID_BUS=pci
E: ID_MM_CANDIDATE=1
E: ID_MODEL_FROM_DATABASE=RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
E: ID_MODEL_ID=0x8168
E: ID_NET_DRIVER=r8169
E: ID_NET_LINK_FILE=/etc/systemd/network/80-wan.link
E: ID_NET_NAME_MAC=enxMacAddress
E: ID_NET_NAME_PATH=enp2s0
E: ID_OUI_FROM_DATABASE=Shuttle Inc.
E: ID_PATH=pci-0000:02:00.0
E: ID_PATH_TAG=pci-0000_02_00_0
E: ID_PCI_CLASS_FROM_DATABASE=Network controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
E: ID_VENDOR_FROM_DATABASE=Realtek Semiconductor Co., Ltd.
E: ID_VENDOR_ID=0x10ec
E: IFINDEX=2
E: INTERFACE=enp2s0
E: SUBSYSTEM=net
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/enp2s0
E: TAGS=:systemd:
E: USEC_INITIALIZED=24183
Also there is no mentioning of the new name wan
in any logs even after activating udev debugging output. What I am doing wrong?
It's the same situation on Ubuntu 18.04 (and probably later too). Thanks for the fix. – user381521 – 2020-01-18T06:15:24.283