Systemd Interface Rename Does Not Work

Home » CentOS » Systemd Interface Rename Does Not Work
CentOS 2 Comments

Hi,

I’m moving to Systemd for my network management but I don’t see my link name changed when I try to using a .link name.

The .network file works right, networkmanager is removed as well to accomplish this.

Any idea why the rename is not done ?

/etc/systemd/network/0-eth.network
[Match]
MACAddress:1a:4a:a9:0a:17

[Network]
Address2.16.3.141/24
Gateway2.16.3.254
DNS2.16.3.1
DNS2.16.3.2

/etc/systemd/network/0-eth.link
[Match]
MACAddress:1a:4a:a9:0a:17

[Link]
Name=eth0

2 thoughts on - Systemd Interface Rename Does Not Work

  • Hi,

    i dont know what way you prefer to archieve network interface renaming, what I do is set specific udev rules.

    user@host# cat /etc/udev/rules.d/60-net.rules SUBSYSTEM==”net”, ACTION==”add”, ATTR{address}==”00:00:50:cc:19:0a”, ATTR{type}==”1″, NAME=”eth0″
    SUBSYSTEM==”net”, ACTION==”add”, ATTR{address}==”00:00:50:cc:4f:3c”, ATTR{type}==”1″, NAME=”eth1″
    SUBSYSTEM==”net”, ACTION==”add”, ATTR{address}==”00:00:50:cc:10:02″, ATTR{type}==”1″, NAME=”eth2″

    After a reboot the interface names will be seit accordingly. I have never read about an way to change an interface name via networkmanager.

    —–Urspr

  • Can you try with a name that does not start with “eth”?


    Marcelo

    “¿No será acaso que esta vida moderna está teniendo más de moderna que de vida?” (Mafalda)

LEAVE A COMMENT