[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB ethernet devices?



Thanks Reco & Greg.  I did see the /lib/systemd/network/73-usb-net-by-mac.link file. Thanks for that.

I don't know exactly what is happening, but the MAC address of the device keeps changing  after an ifdown/ifup cycle post boot.  When the device boots up, it comes up with its own real MAC, but it is failing to get an IP.  So, then if I do an ifdown and then a subsequent ifup on it, the MAC then changes to a random number.   I also see that the addr_assign_type attribute of the interface changed from 0 (at boot) to 1 (after the ifdown/ifup cycle).  It then remains as 1 until I reboot...

I also tried adding a udev file (/etc/udev/rules.d/99_fix_usb.rules) with the following content to try to force the addr_assign_type to 0, but this did nothing:

SUBSYSTEMS=="usb", SUBSYSTEM=="net", ATTR{addr_assign_type}="0"

Also, here is the output showing all that after a fresh boot:

user1@server1:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff
    altname enp40s0
3: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
    inet 10.8.0.11/24 brd 10.8.0.255 scope global enp1s0
       valid_lft forever preferred_lft forever
4: enx001234567890: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:12:34:56:78:90 brd ff:ff:ff:ff:ff:ff
    inet 8.8.10.10/24 brd 255.255.255.255 scope global dynamic enx001234567890
       valid_lft 279980sec preferred_lft 279980sec

root@server1:~# cat /sys/class/net/enx001234567890/addr_assign_type
0

root@server1:~# ifdown enx001234567890
Killed old client process
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/enx001234567890/00:12:34:56:78:90
Sending on   LPF/enx001234567890/00:12:34:56:78:90
Sending on   Socket/fallback
DHCPRELEASE of 8.8.10.10 on enx001234567890 to 192.168.64.33 port 67

root@server1:~# cat /sys/class/net/enx001234567890/addr_assign_type
0

root@server1:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff
    altname enp40s0
3: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
    inet 10.8.0.11/24 brd 10.8.0.255 scope global enp1s0
       valid_lft forever preferred_lft forever
4: enx001234567890: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:12:34:56:78:90 brd ff:ff:ff:ff:ff:ff

root@server1:~# ifup enx001234567890
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

RTNETLINK answers: Invalid argument
Listening on LPF/enx001234567890/96:6e:37:f1:d0:34
Sending on   LPF/enx001234567890/96:6e:37:f1:d0:34
Sending on   Socket/fallback
DHCPDISCOVER on enx001234567890 to 255.255.255.255 port 67 interval 8
send_packet: Network is down
dhclient.c:2446: Failed to send 300 byte long packet over enx001234567890 interface.
receive_packet failed on enx001234567890: Network is down
DHCPDISCOVER on enx001234567890 to 255.255.255.255 port 67 interval 17
send_packet: Network is down
dhclient.c:2446: Failed to send 300 byte long packet over enx001234567890 interface.
DHCPDISCOVER on enx001234567890 to 255.255.255.255 port 67 interval 14
send_packet: Network is down
dhclient.c:2446: Failed to send 300 byte long packet over enx001234567890 interface.
DHCPDISCOVER on enx001234567890 to 255.255.255.255 port 67 interval 10
send_packet: Network is down
dhclient.c:2446: Failed to send 300 byte long packet over enx001234567890 interface.
DHCPDISCOVER on enx001234567890 to 255.255.255.255 port 67 interval 12
send_packet: Network is down
dhclient.c:2446: Failed to send 300 byte long packet over enx001234567890 interface.
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

root@server1:~# cat /sys/class/net/enx001234567890/addr_assign_type
1

root@server1:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff
    altname enp40s0
3: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
    inet 10.8.0.11/24 brd 10.8.0.255 scope global enp1s0
       valid_lft forever preferred_lft forever
4: enx001234567890: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 96:6e:37:f1:d0:34 brd ff:ff:ff:ff:ff:ff permaddr 00:12:34:56:78:90

On Wed, Feb 16, 2022 at 3:55 AM Flacusbigotis <flacusbigotis@gmail.com> wrote:
My internet connection is off the ethernet port of a PCI-E card that also has USB ports on it, so the ethernet device is recognized as a "USB ethernet device"...

Back in Debian Buster, I learned that the "predictive" naming of this USB ethernet interface would be governed by "73-usb-net-by-mac.rules" and so I had it configured accordingly with a config file in /etc/network/interfaces.d/... Namely that the device name would basically be its MAC.

Well, I just upgraded to Bullseye, and I can't bring up the darn interface.  I have tried fiddling around with the device name in my config file in /etc/network/interfaces.d/ directory, but it just won't come up.  The Networking.service also fails during bootup.

I also noticed that the 73-usb-net-by-mac.rules file has completely disappeared, never mind that the official Debian NetworkInterfaceNames page here still talks about it!

Anyone know how the heck this is supposed to work in Bullseye?

BTW, the device shows up as disabled in lshw (I obfuscated the MAC in the output):

 *-network DISABLED
       description: Ethernet interface
       physical id: 1
       bus info: usb@7:1
       logical name: enx00XXXXXXXXXX    <<<=== Yes, I tried using this name in the config
       serial: 00:XX:XX:XX:XX:XX
       size: 10Mbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=off broadcast=yes driver=ax88179_178a driverversion=5.10.0-11-amd64 duplex=half link=no multicast=yes port=MII speed=10Mbit/s




Reply to: