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

Re: New nomeclature of ethernet devices



On Tue, Jun 25, 2019 at 08:46:28AM -0400, The Wanderer wrote:
On 2019-06-25 at 08:11, Michael Stone wrote:

On Tue, Jun 25, 2019 at 11:09:12AM +0200, Hans wrote:

Might be, but this does not explain, why there are still scripts
and configurations, which are still using the old names. And THAT
is the problem.

It isn't because:
1) the new names are predictable but not constant, so you can't
configure a single default across all systems

Which seems reasonable to describe as "unpredictable".

They're perfectly predictable for a given system. The old names also weren't constant, but people didn't seem to care as much about the nuances because "that's the way it's always been". (Sometimes it was an eth, sometimes it was a wlan, etc.) Why were those differences ok but these differences aren't? Familiarity.

On a single computer with any number of interfaces of any type, the new
names are 100% predictable from one boot to the next. (At least assuming
you don't change which slot a given network device is connected to; IIRC
that can change the assigned name, in at least some cases.)

That does change the name, that's the entire point.

Computers with multiple interfaces of the same type are, AFAIK always
have been, and IMO are likely to always be, much less common than
computers with at most one interface of a given type.

They're also the only computers where the name actually matters. In the simple case it's set at install time and doesn't change, so it could be completely random and it wouldn't make a difference.

They are tremendously helpful if you build servers with multiple
interfaces, or you ever have to swap out a broken nic. If you have a
simple system it gets set once at install time, so who cares?

Among possibly other things: anyone who has to work with multiple
systems with different hardware configurations, which have at most one
interface of each type.

Imagine carrying around a live-CD type of environment, for rescue-boot
or maintenance-boot purposes, to use on end-user computers. I work in
exactly that situation, and adapting - both scripts, and tech habits /
expectations / etc. - to the way network interface names now vary
between machines has been quite a pain.

ifquery --list | grep -v lo

If there's more than one result, it was going to be hard "the old way" also. More portably, something like

ip -o l | awk '{sub(/:/, "", $2); if ($2 != "lo") print $2}'

or
ip -o l | awk '{sub(/:/, "", $2); if ($2 != "lo") {print $2; exit 0}}'

if you just want the first interface


Reply to: