[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

is the systemd .link mechanism supposed to work?



Hello,

I'm preparing to upgrade my linkstation pro from stretch to buster.
I'm following the instructions here:


https://www.debian.org/releases/buster/armel/release-notes/ch-information.en.html#migrate-interface-names

and I'm trying to use .link files in /etc/systemd/network to rename the interfaces (after commenting out the lines in 70-persistent-net.rules).

No matter what I do, the integrated network port is always named eth0 (with or without the .link file), while the usb wifi stick always takes the "funny" name based on its mac address (wlxe894f615307a).

This is the content of the link file I prepared for the wlan0 interface.

[Match]
MACAddress=e8:94:f6:15:30:7a
[Link]
Name=wlan0

udevadm says it matches

# udevadm test-builtin net_setup_link  /sys/class/net/wlxe894f615307a
calling: test-builtin
=== trie on-disk ===
tool version:          232
file size:         8440991 bytes
header size             80 bytes
strings            1846911 bytes
nodes              6594000 bytes
Load module index
Found container virtualization none
timestamp of '/etc/systemd/network' changed
Parsed configuration file /lib/systemd/network/99-default.link
Parsed configuration file /etc/systemd/network/10-wlan0.link
Created link configuration context.
ID_NET_DRIVER=ath9k_htc
Config file /etc/systemd/network/10-wlan0.link applies to device wlxe894f615307a
ID_NET_LINK_FILE=/etc/systemd/network/10-wlan0.link
Unload module index
Unloaded link configuration context.


and it should assign the wlan0 name
# udevadm info /sys/class/net/wlxe894f615307a
P: /devices/platform/soc/soc:internal-regs/f1050000.ehci/usb1/1-1/1-1:1.0/net/wlxe894f615307a E: DEVPATH=/devices/platform/soc/soc:internal-regs/f1050000.ehci/usb1/1-1/1-1:1.0/net/wlxe894f615307a
E: DEVTYPE=wlan
E: ID_BUS=usb
E: ID_MODEL=USB2.0_WLAN
E: ID_MODEL_ENC=USB2.0\x20WLAN
E: ID_MODEL_FROM_DATABASE=AR9271 802.11n
E: ID_MODEL_ID=9271
E: ID_NET_DRIVER=ath9k_htc
E: ID_NET_LINK_FILE=/etc/systemd/network/10-wlan0.link
E: ID_NET_NAME=wlan0
E: ID_NET_NAME_MAC=wlxe894f615307a
E: ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
E: ID_PATH=platform-f1050000.ehci-usb-0:1:1.0
E: ID_PATH_TAG=platform-f1050000_ehci-usb-0_1_1_0
E: ID_REVISION=0108
E: ID_SERIAL=ATHEROS_USB2.0_WLAN_12345
E: ID_SERIAL_SHORT=12345
E: ID_TYPE=generic
E: ID_USB_CLASS_FROM_DATABASE=Vendor Specific Class
E: ID_USB_DRIVER=ath9k_htc
E: ID_USB_INTERFACES=:ff0000:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_PROTOCOL_FROM_DATABASE=Vendor Specific Protocol
E: ID_USB_SUBCLASS_FROM_DATABASE=Vendor Specific Subclass
E: ID_VENDOR=ATHEROS
E: ID_VENDOR_ENC=ATHEROS
E: ID_VENDOR_FROM_DATABASE=Qualcomm Atheros Communications
E: ID_VENDOR_ID=0cf3
E: IFINDEX=5
E: INTERFACE=wlxe894f615307a
E: SUBSYSTEM=net
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/wlxe894f615307a /sys/subsystem/net/devices/wlxe894f615307a
E: TAGS=:systemd:
E: USEC_INITIALIZED=1287155652



yet it always gets the name wlxe894f615307a.

OTOH the wired interface is always named eth0 (even with no .link file), even if it should be

# udevadm test-builtin net_id /sys/class/net/eth0 2>/dev/null
ID_NET_NAME_MAC=enx00160141ad18
ID_OUI_FROM_DATABASE=BUFFALO.INC


For the time being I setup two stanzas in /etc/network/interfaces with the same settings, one for eth0 and the other for enx00160141ad18 but I'm worried I'd lose connectivity once I proceed with the update.

Any hint?
Extra points if it involves getting rid of systemd altogether ;-)

Bye
--
Luca


Reply to: