Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #245468

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

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB ethernet devices?
Date 2022-02-16 16:00 +0100
Message-ID <DRtWF-2dAs-3@gated-at.bofh.it> (permalink)
References <DRpgm-2aFX-3@gated-at.bofh.it> <DRtMZ-2dx0-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 16, 2022 at 05:30:17PM +0300, Reco wrote:
> 	Hi.
> 
> On Wed, Feb 16, 2022 at 03:55:21AM -0600, Flacusbigotis wrote:
> > 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.
> 
> It's still true in Bullseye, but the implementation has changed
> somewhat.
> Instead of /lib/udev/rules.d/73-usb-net-by-mac.rules now systemd uses
> /lib/systemd/network/73-usb-net-by-mac.link.
> 
> 
> > 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.
> 
> A straightforward approach would be to learn the actual name of the
> device via "ip a"/"ifconfig -a", and then using that name in /e/n/i.

I don't use a USB ethernet device.  I use the one that's inside my
computer.  Here's how I configure it.  First, I figured out what its MAC
address is.  Then, I decided what *name* I wanted it to have.  I chose
"lan0".

I created this file to assign that name to that interface, based on its
MAC address:

unicorn:~$ cat /etc/systemd/network/10-lan0.link 
[Match]
MACAddress=18:60:24:77:5c:ec

[Link]
Name=lan0


Next, I told interfaces(5) to configure it with DHCP:

unicorn:~$ cat /etc/network/interfaces
[...]
auto lan0
iface lan0 inet dhcp
[...]


Finally, I configured my router (which is also my DHCP server) to assign
the IP address I want, based on the MAC address.  In my case, it makes
the most sense to do this at the DHCP server, because I *also* configure
some IP port forwardings from the Internet to my computer in that same
router.  Keeping the IP assignment and the port forwardings all together
in the same device makes sense.

If you don't need to worry about port forwarding or other special Internet
configurations, then you might choose to assign the IP address statically
in interfaces(5) instead of using DHCP.  Both ways have their merits.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Flacusbigotis <flacusbigotis@gmail.com> - 2022-02-16 11:00 +0100
  Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Reco <recoverym4n@enotuniq.net> - 2022-02-16 15:50 +0100
    Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Greg Wooledge <greg@wooledge.org> - 2022-02-16 16:00 +0100
  Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Flacusbigotis <flacusbigotis@gmail.com> - 2022-02-17 07:40 +0100
    Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Reco <recoverym4n@enotuniq.net> - 2022-02-17 08:10 +0100
      Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Flacusbigotis <flacusbigotis@gmail.com> - 2022-02-22 03:00 +0100
        Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Reco <recoverym4n@enotuniq.net> - 2022-02-22 12:20 +0100
          Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Nicholas Geovanis <nickgeovanis@gmail.com> - 2022-02-22 18:00 +0100
            Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Reco <recoverym4n@enotuniq.net> - 2022-02-22 19:00 +0100
        Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Flacusbigotis <flacusbigotis@gmail.com> - 2022-02-23 05:40 +0100
          Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Tixy <tixy@yxit.co.uk> - 2022-02-23 10:20 +0100
            Re: 73-usb-net-by-mac.rules is no longer used in Bullseye for USB  ethernet devices? Flacusbigotis <flacusbigotis@gmail.com> - 2022-02-23 18:50 +0100

csiph-web