Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Bullseye not using persistent names for USB interfaces after upgrade from Buster

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
ardovm
Posts: 1
Joined: 2021-08-26 08:31

Bullseye not using persistent names for USB interfaces after upgrade from Buster

#1 Post by ardovm »

Dear Forum,

I just upgraded a small amd64 box from Buster to Bullseye. Sometimes I need to plug an Android phone with USB tethering to bring it on-line via the cellular network.

On Buster, the phone was detected as enp0s20u3u2. It is possible that the name changed depending on which USB port I connected it to, but I cannot recall.
Now on Bullseye the phone is always detected as usb0.

Is this the intended behavior?

It does not seem so, as file /lib/systemd/73-usb-net-by-mac.link seems to request mac-based naming of USB interfaces.

Some more information about my system:

Code: Select all

$ ls /lib/systemd/network/
73-usb-net-by-mac.link      80-container-vz.network  80-wifi-ap.network.example
80-container-host0.network  80-vm-vt.network         80-wifi-station.network.example
80-container-ve.network     80-wifi-adhoc.network    99-default.link

Code: Select all

$ find /etc/network/
/etc/network/
/etc/network/if-down.d
/etc/network/if-down.d/resolvconf
/etc/network/interfaces.d
/etc/network/if-up.d
/etc/network/if-up.d/000resolvconf
/etc/network/if-pre-up.d
/etc/network/interfaces
/etc/network/if-post-down.d
Relevant contents of /etc/network/interfaces:

Code: Select all

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

# Ethernet 1
allow-hotplug enp1s0
iface enp1s0 inet static
    address 192.168.x,y/z
    gateway 192.168.x.y
    dns-nameservers 192.168.x.y z.a.b.c

# Ethernet 2
allow-hotplug enp2s0
iface enp2s0 inet static
    address x.y.z.t/a

# This used to be enp0s20u3u2
allow-hotplug usb0
iface usb0 inet dhcp
    pre-up my_script.sh
    post-down another_script.sh
I believe that the pre-up and post-down scripts' contents should not be important, as they are launched when the interface name is already defined.

I can live with this "new and old" naming of the USB phone -- it is even better for me, because I do not have to remember the exact USB port -- but if this is a bug and will be corrected in the future, things will break unexpectedly for me.

Thank you in advance for any attempts to help!
Arrigo

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: Bullseye not using persistent names for USB interfaces after upgrade from Buster

#2 Post by Aki »

Hello,
You could try the udevadm [1] command to analyse how the system/udev respond to the event of device discovery and to its configuration. Otherwise, please check log files to analyze how the device (your phone) is recognized by the operating system.

[1] https://manpages.debian.org/bullseye/ud ... .8.en.html
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply