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

Re: Discussion? New names of betwork devices



Hans <hans.ullrich@loop.de> writes:

> Am Freitag, 22. März 2019, 17:15:29 CET schrieb Reco:
>> Or, for instance, en0p2gibberish. They call them Unpredictable Device
>> Named for a reason.
>> 
>
> Yes, thsis is another thing, which I am thinking of: The names could change 
> (in case, when there are more than one network devices are active or the order 
> of activing changed).

No. Changes in the activation order or the number of devices do not
matter. The naming scheme is based on what bus the devices are on and
what position on that bus they hold[1]. Once a name is assigned, unless
you plug the card into a different slot, you will get the same name
(note that this may not apply on hotplug architectures that don't assume
fixed slot positions, like USB).

It is the *old* way that lead to unpredictable renames unless you
implemented udev rules to hardcode names to e.g. MAC addresses.

> In the past, I forced the order with persistent- net.rules. Dunno, if
> normal users can deal with it. Can it your Mom or your Dad? Grandpa?
> Grandma?
>  
Is it any worse than expecting them to write a udev rule?

In the end it is a hard problem to solve because the Linux kernel does
dynamic enumeration of devices, so you either need a deterministic
algorithm to assign a name (ask the firmware) or a userspace workaround
in identifying the device (e.g. using udev rules, or using UUIDs in
/etc/fstab, etc).

Mart

[1] OK, not *entirely* true, it's based on what the firmware reports as
the device position (it used to be called 'biosdevname'. Don't know if
that still is the name in these (U)EFI times).

-- 
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.


Reply to: