Mail archive
alpine-devel

Re: Interface names (WAS: [alpine-devel] eudev pushed to git master (edge))

From: Isaac Dunham <ibid.ag_at_gmail.com>
Date: Mon, 20 Jul 2015 08:08:21 -0700

On Mon, Jul 20, 2015 at 09:52:12AM +0200, Natanael Copa wrote:
> On Sat, 18 Jul 2015 11:35:50 +0200
> Carlo Landmeter <clandmeter_at_gmail.com> wrote:
>
> > I also have the feeling I have to cleanup older (automatic) udev rules,
> > because my nic name has changed into something weird.
> > I didnt look into it too much, but i think people should really watch out
> > with updating edge if they don't want to break anything.
>
> For the record. As mentioned on IRC, The NIC name change is to get
> persistent and predictable net interface names.
>
> https://github.com/gentoo/eudev/blob/master/src/udev/udev-builtin-net_id.c#L20

At the latter qualification (predictable) it fails, if you're talking about
mortals.

> To get back the old style names you can do:
>
> ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules

I'd used "touch", but ln -s /dev/null is probably better since it
also discards future modifications.

> This also means that which NIC becomes eth0 and eth1 etc is
> unpredictable.
>
> We will need a long term solution for this.
>
> The problem is that kernel will assign net interface name based on what
> order they are discovered during coldplug. The way we have worked
> around this in Alpine is that we sort the modaliases before doing
> modprobe. That way eth0 will become eth0 every reboot, even after
> kernel upgrades.

Using "sort -u" is also desireable because it means that repeats of the
same hardware only provoke one module load (if you have multiple
USB buses or ethernet cards from the same manufacturer).

> Udev developers has other solution for this problem: invent a new
> naming standard for network interfaces.
>
> I think we want keep whatever is current for people who are upgrading.
> But for new installs, what do we do? How do we name the network
> interfaces?
>
> Do we want udev users and non-udev users have same interfaces names, or
> do we want let users who don't want udev keep the old, traditional
> inerface naming and let users who chose udev to get whatever upstream
> udev does?
>
> How do we make sure that interface names does not change after reboot?
>
> Do we want be (partially) compatible with other distro's way to name
> interfaces? (even a bad naming standard might be better than no naming
> standard)

I, for one, *do* *NOT* *want* udev-style names.

The kernel developers worked for years on moving from driver-specific
names to "ethN"/"wlanN" interface names. "Predictable" interface naming
a la udev not only reverses those gains, it makes things worse since
anyone who isn't using udev code can't predict interface names even
if they know the driver.
Udev's approach means that if I pull out a network card and replace it,
I have to reconfigure /etc/network/interfaces or whatever else I use.

For what it's worth, Debian Jessie (and Devuan Jessie) use
/lib/udev/write_net_rules to make the kernel name that they detect first
persistent.

Thanks,
Isaac Dunham


---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Mon Jul 20 2015 - 08:08:21 GMT