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
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1879770

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

Status in systemd package in Ubuntu:
  Incomplete

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=12:34:56:78:90:11

  [Link]
  Name=myname123' | sudo tee '/etc/systemd/network/myname123.link'
  ########################################

  (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
  ProcVersionSignature: Ubuntu 5.4.0-29.33-generic 5.4.30
  Uname: Linux 5.4.0-29-generic x86_64
  ApportVersion: 2.20.11-0ubuntu27
  Architecture: amd64
  CasperMD5CheckResult: skip
  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=/vmlinuz-5.4.0-29-generic 
root=UUID=fd983ca3-a36f-4d8a-b881-164590fe35e2 ro rootflags=subvol=@ quiet 
splash vt.handoff=7
  SourcePackage: systemd
  SystemdDelta:
   [EXTENDED]   /usr/lib/systemd/system/rc-local.service → 
/usr/lib/systemd/system/rc-local.service.d/debian.conf
   [EXTENDED]   /usr/lib/systemd/system/user@.service → 
/usr/lib/systemd/system/user@.service.d/timeout.conf
   
   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.version: pc-q35-3.1
  dmi.modalias: 
dmi:bvnSeaBIOS:bvr1.12.0-1:bd04/01/2014:svnQEMU:pnStandardPC(Q35+ICH9,2009):pvrpc-q35-3.1:cvnQEMU:ct1:cvrpc-q35-3.1:
  dmi.product.name: Standard PC (Q35 + ICH9, 2009)
  dmi.product.version: pc-q35-3.1
  dmi.sys.vendor: QEMU

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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to