:: Re: [DNG] Proposed change in behavi…
Etusivu
Poista viesti
Vastaa
Lähettäjä: Rowland Penny
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [DNG] Proposed change in behaviour for ascii: eudev net.ifnames logic reversing proposal
On Sun, 20 Aug 2017 16:27:26 +0200
Adam Borowski <kilobyte@???> wrote:

> On Mon, Aug 21, 2017 at 01:38:00AM +1200, Daniel Reurich wrote:
> > We discussed a few weeks back in a dev meeting whether or not to
> > revert to jessie like naming scheme for ethernet interfaces by
> > default.
> >
> > The eudev package (currently found in the experimental repos and at
> > https://git.devuan.org/devuan-packages/eudev ) utilizes the same
> > logic like udev does when it comes to interface naming schemes. The
> > patch appended below would reverse the logic and make it opt-in
> > rather than opt-out.
> >
> > This would lead network interface names default to the old "eth0" or
> > "wlan0" scheme, rather than the new(?) "enp0s3"-like scheme. It
> > implies having "net.ifnames=1" in the kernel cmdline to get the
> > "enp0s3"-like scheme and not touching anything to get the "eth0"
> > scheme.
> >
> > To keep these things consistent we should also apply the same patch
> > to udev as well.
> >
> > Thoughts??
>
> There was a lengthy thread on debian-devel recently. While it did
> include the usual shout-fest, there's also a good amount of actually
> relevant info, thus I'd recommend reading it.
>
> It starts at:
> https://lists.debian.org/debian-devel/2017/07/msg00126.html
>
> TL;DR:
>
> * interface names changing randomly at boot are nasty for machines
> with multiple non-bonded interfaces. As drivers are loaded by the
> kernel in parallel, they're inherently racey, thus kernel ordering
> may change.
>
> * any renames to "eth0"/"wlan0" are a losing idea, as a new interface
> can appear at any moment, clashing with what you just tried to rename
> to. Several approaches to avoid this race have been tried, none worked
> reliably. Thus, any sane renaming should use a new namespace. Of
> what was proposed, it looks like people liked "en0"/"wl0" the most
> (yeah, it's purely an aesthethic thing). My idea "e0"/"w0" is too
> short to imply out of context you're talking about interface names,
> etc.
>
> * systemd-udev's promise of providing _stable_ names didn't deliver.
> They still change on major kernel upgrades, and sometimes on every
> boot. And their chosen naming is utterly insane (wlxf81a671bcfae,
> WTF?). Only systemd proponents still say it's a good idea.
>
> * there's an old alternate solution, package "ifrename" plus a
> generator, but that's quite meh
>
> * Guus Sliepen designed and coded a new mechanism and syntax, it's
> available in ifupdown in unstable/buster:
> .--==[ /etc/network/interfaces ]
> rename mac/00:e0:4c:11:7f:4e/=wl0
> allow-hotplug wl0
> iface wl0 inet static
> `----
> Would also need a generator.
>
>
> Thus, I think the best long-term solution would be writing a
> generation, using either *udev or ifupdown, that learns new
> interfaces as they come, and names them using a single namespace
> that's not "eth0"/"wlan0". In particular, a machine with only a
> single interface (ie, 99% of them) would predictably have en0 and
> possibly wl0.
>
> But sticking with just kernel names would still be much better than
> the enp0s3 idea. It'd be _predictable_ in that 99% case; machines
> with multiple interfaces tend to be either routers (which come
> preconfigured) or servers (which have an admin who's supposed to have
> a clue).
>
>
> Meow!


What is the difference between eth0/wlan0 and en0/wl0 or even e0/w0 ?
They are just variations on a theme.

The systemd way of doing things is, in my opinion, stupid and doesn't
actually help.

If you have more than one ethernet (or wireless) device, then yes,
they need to be consistently named, but as most people will not be
adding (or removing) devices often, could they be issued with a
name based on their MAC and store this somewhere and then use this
to rename the network devices once they are all up ?

Until then +1 to using eth0/wlan0

Rowland