I experiencing the same problem. My two Ethernet interfaces does not get
renamed. I want to accomplish the following.

eth0 => eth1
eth1 => eth0

Basically switching names between the Ethernet interfaces.

I had the same exact setup on 18.04 which worked.

You can find some information about my system below. Please let me know
if I should provide more information.

== networkctl(1) ==

# networkctl status eth0
WARNING: systemd-networkd is not running, output will be incomplete.

Failed to query link bit rates: Unit dbus-org.freedesktop.network1.service not 
found.
● 2: eth0                                                                
             Link File: n/a                                              
          Network File: n/a                                              
                  Type: ether                                            
                 State: n/a (unmanaged)                                  
            HW Address: e0:d5:5e:43:7e:52 (GIGA-BYTE TECHNOLOGY CO.,LTD.)
                   MTU: 1500 (min: 68, max: 9000)                        
  Queue Length (Tx/Rx): 1/1                                              
      Auto negotiation: yes                                              
                 Speed: 1Gbps                                            
                Duplex: full                                             
                  Port: tp                                               
               Address: 10.88.130.28                                     
                        fe80::e2d5:5eff:fe43:7e52                        
               Gateway: 10.88.0.1 (Hewlett Packard)                      

May 28 16:23:44 lnxjohansy systemd-udevd[503]: eth0: Failed to rename network 
interface 2 from 'eth0' to 'eth1': File exists
May 28 16:23:44 lnxjohansy systemd-udevd[503]: eth0: Failed to process device, 
ignoring: File exists

# networkctl status eth1
WARNING: systemd-networkd is not running, output will be incomplete.

Failed to query link bit rates: Unit dbus-org.freedesktop.network1.service not 
found.
● 3: eth1                                                  
             Link File: n/a                                
          Network File: n/a                                
                  Type: ether                              
                 State: n/a (unmanaged)                    
            HW Address: 68:05:ca:75:3d:65 (Intel Corporate)
                   MTU: 1500 (min: 68, max: 9212)          
  Queue Length (Tx/Rx): 1/1                                
      Auto negotiation: yes                                
                 Speed: n/a                                
                  Port: tp                                 

May 28 16:23:44 lnxjohansy systemd-udevd[503]: eth1: Failed to rename network 
interface 3 from 'eth1' to 'eth0': File exists
May 28 16:23:44 lnxjohansy systemd-udevd[503]: eth1: Failed to process device, 
ignoring: File exists

== systemd.link(5) ==

# ls -l /etc/systemd/network
total 8
-rw-r--r-- 1 root root 55 May 28 14:23 70-eth0.link
-rw-r--r-- 1 root root 55 May 28 14:23 70-eth1.link

# cat /etc/systemd/network/70-eth0.link 
[Match]
MACAddress=68:05:ca:75:3d:65

[Link]
Name=eth0

# cat /etc/systemd/network/70-eth1.link 
[Match]
MACAddress=e0:d5:5e:43:7e:52

[Link]
Name=eth1

# find / -iname "*.link"
/usr/lib/systemd/network/73-usb-net-by-mac.link
/usr/lib/systemd/network/99-default.link
/etc/systemd/network/70-eth1.link
/etc/systemd/network/70-eth0.link

== netplan(5) ==

# ls -l /etc/netplan/
total 4
-rw-r--r-- 1 root root 104 May 28 14:23 01-network-manager-all.yaml

# cat /etc/netplan/01-network-manager-all.yaml 
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

== interfaces(5) ==

# cat /etc/network/interfaces
auto lo eth0 eth1
iface lo inet loopback

iface eth1 inet dhcp
        wpa-driver wired
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

iface eth0 inet static
    address 192.168.0.1
    netmask 255.255.255.0

== systemd.network(5) ==

# systemctl is-active systemd-network
inactive

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1879770

Title:
  Renaming interfaces using *.link file does not work

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1879770/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to