Renaming interfaces using *.link file does not work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Dear Ubuntu team,
I wanted to use "systemd-networkd" intead of "udev" to rename network interface like this:
(replace MAC by real one)
#######
echo '[Match]
MACAddress=
[Link]
Name=myname123' | sudo tee '/etc/systemd/
#######
(and reboot)
But it does not work. And it should work based on the systemd documentation. I googled the issue but I didn't find anything interesting instead that I should run "update-initramfs -u" but that didn't help.
I tested that this doesn't work both on Ubuntu Desktop 20.04 and Ubuntu Server 20.04.
Thank you,
Kind regards,
Ven
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: systemd 245.4-4ubuntu3
ProcVersionSign
Uname: Linux 5.4.0-29-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: KDE
Date: Wed May 20 14:35:21 2020
InstallationDate: Installed on 2020-05-17 (3 days ago)
InstallationMedia: Kubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
Lsusb:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Lsusb-t:
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 480M
MachineType: QEMU Standard PC (Q35 + ICH9, 2009)
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
SystemdDelta:
[EXTENDED] /usr/lib/
[EXTENDED] /usr/lib/
2 overridden configuration files found.
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: 1.12.0-1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.
dmi.modalias: dmi:bvnSeaBIOS:
dmi.product.name: Standard PC (Q35 + ICH9, 2009)
dmi.product.
dmi.sys.vendor: QEMU
What's the output of:
$ networkctl status enp3s0
specifically, what's the 'Link File'. Change the name of the interface if needed, of course.
I am guessing it's "/lib/systemd/ network/ 99-default. link". That's because your link file is named "myname123.link", and "m" is after "9", so 99-default.link matches first (because it matches "OriginalName=*"). If this is the case, try renaming your link file so it's lower (alphabetically) than 99-, e.g. "50-myname123. link".
Alternately, if networkctl shows your interface link file is "/run/systemd/ network/ 10-netplan- enp3s0. link", it's because you have it configured using netplan, which also creates a link file for some operations (like setting interface name). Check your /etc/netplan/ dir for *.yaml files.