You are not logged in.
Hi!
I wanted to rename a network interface using the systemd provided machanisms but am failing...
I created a .link file but systemd is not renaming the interface:
[Match]
OriginalName=eth0
#OriginalName=ens*
[Link]
Name=netext$ journalctl -b | grep -A3 rename
Oct 26 00:16:27 minntooine kernel: virtio_net virtio2 ens18: renamed from eth0
Oct 26 00:16:27 minntooine kernel: input: PC Speaker as /devices/platform/pcspkr/input/input20
Oct 26 00:16:27 minntooine systemd[1]: Found device /dev/vda2.
Oct 26 00:16:27 minntooine systemd[1]: Mounting /boot...So systemd is renaming the interace before it mounts the root filesystem. Is it impossible for systemd to rename the interface again after it is booting the system? And if yes, shouldn't the initramfs take care of these things (like including the config with mkinitcpio)? Or am I simply doing something wrong?
Thanks
Last edited by OlafLostViking (2015-10-26 08:52:26)
Offline
Where did you get those variables? I believe "Name" is used for a match parameter, not something to be set.
If you want to rename your interface, follow this:
http://www.freedesktop.org/wiki/Softwar … faceNames/
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
What did you name your .link file? It needs to have a lexically earlier name than "99-default.link".
I use MACAddress rather than OriginalName in my files, and both of mine work fine. E.g.
$ cat /etc/systemd/network/50-wired0.link
[Match]
MACAddress=aa:bb:cc:dd:ee:ff
[Link]
Description=Top Ethernet Port
MACAddressPolicy=persistent
Name=wired0
$ Offline
Thank you both for your answers!
Where did you get those variables? I believe "Name" is used for a match parameter, not something to be set.
With the enries in the [Link] category you can change the settings of the interface matched by the parameters in the [Match] settings.
I use MACAddress rather than OriginalName in my files
This is a rented VM and I don't really trust my provider to keep the MAC address constant ;-)
What did you name your .link file? It needs to have a lexically earlier name than "99-default.link".
Ha, great! Thank you - I did the mistake of not taking care of the order! After I renamed the file to have a number prefix it works. ![]()
Offline