:: Re: [DNG] systemd and wlan0 interfa…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Bruce Ferrell
Fecha:  
A: dng
Asunto: Re: [DNG] systemd and wlan0 interface problem
On 06/30/2018 03:50 PM, Steve Litt wrote:
> On Sat, 30 Jun 2018 17:06:09 -0400
> Haines Brown <haines@???> wrote:
>
>> I've long struggled with a problem with a new installation of ascii. I
>> can get an ethernet connection, but with a usb WiFi dongle using an
>> Atheros chip, my wlan0 interface gets automatically changed to wl<mac
>> address>, and so cannot communicate with DHCP.
> Look back through the archives a couple years, and you'll find one of my
> emails with a shellscript to tell you all wifi device names and all
> wired ethernet names. A couple days after I submitted it, somebody else
> improved it. A shellscript like that belongs on every computer, so it
> can be invoked from every init script and run file and other
> shellscripts needing the exact name of network devices.
>
> This even works if you're using a laptop with a wifi dongle that gets
> plugged into various usb ports and therefore has various predictable
> names.
>
>
> SteveT
>
> Steve Litt
> June 2018 featured book: Twenty Eight Tales of Troubleshooting
> http://www.troubleshooters.com/28
>
>
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>

I like the idea of the script, but I also would like to point out this behavior is strictly udev.  Checking my ascii system, the rules seem to have bene moved to
/lib/udev/rules.d/75-persistent-net-generator.rules


If you look those over, they'll give a VERY clear look at how renaming interfaces work... You could name the interfaces Popeye, Brutus and Olivoyl based on the MAC addresses.  I
don't suggest it, but you could (another of those, "just because you can, doesn't mean you should" things).  Just for completeness, here's an example.  MAC addresses are changed to
protect the guilty.

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="AA:BB:CC:DD:EE:FF", ATTR{type}=="1", NAME="popeye"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="BB:CC:DD:EE:FF:AA", ATTR{type}=="1", NAME="brutus"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="CC:DD:EE:FF:AA:BB", ATTR{type}=="1", NAME="olivoyl"