[Bug 1579969] Re: Xenial: impossible to rename an interface with a .link file
Launchpad Bug Tracker
1579969 at bugs.launchpad.net
Sat May 14 13:38:23 UTC 2016
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: systemd (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1579969
Title:
Xenial: impossible to rename an interface with a .link file
Status in systemd package in Ubuntu:
Confirmed
Bug description:
Hi,
Impossible to rename an interface with a .link file in a updated
Ubuntu Xenial. It's a fresh and basic install without GUI, just a ssh
server (it's a VirtualBox VM).
Here is my environment:
-------------------------------------------
root at xenial-clean:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
-------------------------------------------
According to the manpage "systemd.link" (example 2), I can rename an
interface with a .link file like this:
-------------------------------------------
root at xenial-clean:~# ll /etc/systemd/network/10-eth0.link
-rw-r--r-- 1 root root 57 May 10 02:07 /etc/systemd/network/10-eth0.link
root at xenial-clean:~# cat /etc/systemd/network/10-eth0.link
[Match]
MACAddress=08:00:27:be:14:c2
[Link]
Name=eth0
-------------------------------------------
Currently the interface name is enp0s3 because the OS is not yet
rebooted:
-------------------------------------------
root at xenial-clean:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:be:14:c2 brd ff:ff:ff:ff:ff:ff
-------------------------------------------
And now I reboot the OS. But, after the reboot, the interface name is
still enp0s3:
-------------------------------------------
root at xenial-clean:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 08:00:27:be:14:c2 brd ff:ff:ff:ff:ff:ff
-------------------------------------------
Just for information:
-------------------------------------------
root at xenial-clean:~# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.4.0-22-generic root=UUID=03363c3a-58b5-4398-82a8-6997ec1a00e5 ro quiet splash
root at xenial-clean:~# apt-cache policy systemd
systemd:
Installed: 229-4ubuntu4
Candidate: 229-4ubuntu4
Version table:
*** 229-4ubuntu4 500
500 http://fr.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
-------------------------------------------
Note: the .link file is taken into account _only_ if I set the "net.ifnames=0" kernel boot parameter. But, according to the manpage "man systemd.link", this is normally not necessary.
Regards.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1579969/+subscriptions
More information about the foundations-bugs
mailing list