Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #204629 > unrolled thread

Enet names

Started byghe <ghe@slsware.net>
First post2019-01-25 19:30 +0100
Last post2019-01-26 16:50 +0100
Articles 11 — 9 participants

Back to article view | Back to linux.debian.user


Contents

  Enet names ghe <ghe@slsware.net> - 2019-01-25 19:30 +0100
    Re: Enet names Étienne Mollier <etienne.mollier@mailoo.org> - 2019-01-25 21:50 +0100
      Re: Enet names ghe <ghe@slsware.net> - 2019-01-26 01:00 +0100
        Re: Enet names deloptes <deloptes@gmail.com> - 2019-01-26 09:50 +0100
        Re: Enet names "Alexander V. Makartsev" <avbetev@gmail.com> - 2019-01-26 11:30 +0100
    Re: Enet names Étienne Mollier <etienne.mollier@mailoo.org> - 2019-01-25 21:50 +0100
    Re: Enet names Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-01-26 12:20 +0100
      Re: Enet names rhkramer@gmail.com - 2019-01-26 12:50 +0100
        Re: Enet names <tomas@tuxteam.de> - 2019-01-26 17:10 +0100
        Re: Enet names David Wright <deblis@lionunicorn.co.uk> - 2019-01-26 19:00 +0100
    Re: Enet names mick crane <mick.crane@gmail.com> - 2019-01-26 16:50 +0100

#204629 — Enet names

Fromghe <ghe@slsware.net>
Date2019-01-25 19:30 +0100
SubjectEnet names
Message-ID<xkeoO-oG-5@gated-at.bofh.it>
Buster, computer with MAC identified Ethernet ports

Is there a way to relabel Ethernet ports? Without changing things in a
number of config files?

I see on the web that changing udev used to do that, but now there are
at least 2 files to modify.

I'm gently moving to a new ISP, and I'm trying to set up new, virtual IP
addresses on my Enet ports. Webmin tells me that enp0s31f6 is too long.
I could do it in /etc/network/interfaces, but Webmin does all that quite
painlessly. Without typos.

I'd like to replace the /dev/random names with something understandable
to a mortal.

I was thinking of creating an alias in /dev pointing eth0 at enp0s31f6.
But where to put it? .bashrc would be convenient, but it'd be too late.
In an init file? Is the s.*d word going to do init files forever?

-- 
Glenn English

[toc] | [next] | [standalone]


#204644

FromÉtienne Mollier <etienne.mollier@mailoo.org>
Date2019-01-25 21:50 +0100
Message-ID<xkgAh-1Jz-3@gated-at.bofh.it>
In reply to#204629
On 1/25/19 9:29 PM, Étienne Mollier wrote:
> If you are trying to say that you wish to go back to the ethN
> network interface naming convention, then one way to do it is
[...]
> 
> 
> Now the interesting part, if you want to reliably identify your
[...]

My apologies, on rereading I realize it is unclear that both
assertions (modifying Grub entries or creating a systemd link)
are two separate distinct solutions.

Anyway, enjoy!  ;^)

Kind Regards,
-- 
Étienne Mollier <etienne.mollier@mailoo.org>
Did I mention all opinions are my own?

[toc] | [prev] | [next] | [standalone]


#204652

Fromghe <ghe@slsware.net>
Date2019-01-26 01:00 +0100
Message-ID<xkjya-3xS-7@gated-at.bofh.it>
In reply to#204644
On 1/25/19 1:47 PM, Étienne Mollier wrote:

> My apologies, on rereading I realize it is unclear that both
> assertions (modifying Grub entries or creating a systemd link)
> are two separate distinct solutions.

Very little prob. Doing vi /etc/default/grub, vi
/etc/network/interfaces, update-grub, reboot works great. It took me
only a few hours to put the Ethernet interfaces back to intelligible.

Thanks much for the directions.

Futzing with systemd makes one wonder what MS has on some of the Linux
system programmers.

-- 
Glenn English

[toc] | [prev] | [next] | [standalone]


#204660

Fromdeloptes <deloptes@gmail.com>
Date2019-01-26 09:50 +0100
Message-ID<xkrP3-d6-1@gated-at.bofh.it>
In reply to#204652
ghe wrote:

> Futzing with systemd makes one wonder what MS has on some of the Linux
> system programmers.

:D 

[toc] | [prev] | [next] | [standalone]


#204663

From"Alexander V. Makartsev" <avbetev@gmail.com>
Date2019-01-26 11:30 +0100
Message-ID<xktnP-1eb-7@gated-at.bofh.it>
In reply to#204652

[Multipart message — attachments visible in raw view] — view raw

On 26.01.2019 4:58, ghe wrote:
> On 1/25/19 1:47 PM, Étienne Mollier wrote:
>
>> My apologies, on rereading I realize it is unclear that both
>> assertions (modifying Grub entries or creating a systemd link)
>> are two separate distinct solutions.
> Very little prob. Doing vi /etc/default/grub, vi
> /etc/network/interfaces, update-grub, reboot works great. It took me
> only a few hours to put the Ethernet interfaces back to intelligible.
>
> Thanks much for the directions.
>
> Futzing with systemd makes one wonder what MS has on some of the Linux
> system programmers.
>
I recommend you to read through this article to understand rationale
behind changes "that dreaded, terrible and complicated systemd" has
implemented. [1]
I'm sure you will understand that there is a possibility "net.ifnames=0"
approach will come back some time later to bite you.
If you have several interfaces and their names will be randomly changed
at some point, you will end up at least with non functional interfaces
and\or iptables rules.
So I advise you to use more robust, manageable and simple link-file
approach and use your personal naming scheme. [2]

[1]
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
[2] https://www.freedesktop.org/software/systemd/man/systemd.link.html

-- 
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀ 

[toc] | [prev] | [next] | [standalone]


#204645

FromÉtienne Mollier <etienne.mollier@mailoo.org>
Date2019-01-25 21:50 +0100
Message-ID<xkgAh-1Jz-5@gated-at.bofh.it>
In reply to#204629
Glenn English, onb 2019-01-25 :
> Buster, computer with MAC identified Ethernet ports
>
> Is there a way to relabel Ethernet ports? Without changing things in a
> number of config files?
>
> I see on the web that changing udev used to do that, but now there are
> at least 2 files to modify.
>
> I'm gently moving to a new ISP, and I'm trying to set up new, virtual IP
> addresses on my Enet ports. Webmin tells me that enp0s31f6 is too long.
> I could do it in /etc/network/interfaces, but Webmin does all that quite
> painlessly. Without typos.
>
> I'd like to replace the /dev/random names with something understandable
> to a mortal.

Good Day Glenn,

Disclaimer: if the machine is remote, be very careful when
fiddling with network interfaces, you could lock yourself out.
Now, if it's a more local machine, like your laptop, then let's
proceed.  :^)

If you are trying to say that you wish to go back to the ethN
network interface naming convention, then one way to do it is
enable it at boot time, using kernel command line option
"net.ifnames=0".

To set this option on each reboot, edit /etc/default/grub to put
it in your GRUB_CMDLINE_LINUX:

	GRUB_CMDLINE_LINUX="net.ifnames=0"

Then update your Grub entries, reboot and enjoy (don't forget to
reconfigure your network interfaces, to take the new name in
account):

	$ sudo update-grub
	$ sudo reboot

This is something I used recently, when so called predictable
interface names have proved to cause issues with some Digital
Handcu^H^H^H^H^H^H Right Management software.  One file is to be
modified and one command to run, faster, easier, more dangerous
perhaps.


Now the interesting part, if you want to reliably identify your
network interfaces, I'll just shamelessly copy and paste this
example extracted from systemd.link(5) which sounds a lot like
something I would have loved to stumble upon earlier :
>      Example 2. /etc/systemd/network/10-dmz.link
>
>      This example assigns the fixed name "dmz0" to the
>      interface with the MAC address 00:a0:de:63:7a:e6:
>
>          [Match]
>          MACAddress=00:a0:de:63:7a:e6
>
>          [Link]
>          Name=dmz0

Have just had the occasion to test this, and worked like a charm
to rename my enp354f21s2p3wtf to if0. Sounds like the end result
could be interesting to you.  Even though it's systemd, it
sounds clearer than udev rules and moving to sysvinit (or any
other init of your choice).

Kind Regards,
-- 
Étienne Mollier <etienne.mollier@mailoo.org>

[toc] | [prev] | [next] | [standalone]


#204664

FromPascal Hambourg <pascal@plouf.fr.eu.org>
Date2019-01-26 12:20 +0100
Message-ID<xkuad-1JV-1@gated-at.bofh.it>
In reply to#204629
Le 25/01/2019 à 19:19, ghe a écrit :
> Buster, computer with MAC identified Ethernet ports
> 
> Is there a way to relabel Ethernet ports? Without changing things in a
> number of config files?

Short answare : no.

> I'm gently moving to a new ISP, and I'm trying to set up new, virtual IP
> addresses on my Enet ports. Webmin tells me that enp0s31f6 is too long.

Then Webmin is broken. It should accept any interface name that the 
kernel accepts.

> I could do it in /etc/network/interfaces, but Webmin does all that quite
> painlessly. Without typos.

Not so painlessly, according to the above, if it forces you to change 
interface names.

> I'd like to replace the /dev/random names with something understandable
> to a mortal.

enp0s31f6 is not random at all, rather the opposite ; it is a 
(supposedly) predictable naming scheme based on the hardware topology :

en = ethernet (wl would stand for wireless)
p0 = PCI bus 0
s31 = slot 31 (no physical slot if embedded on the motherboard)
f6 = function 6 in the device

I wrote "supposedly" because, unfortunately, on some motherboards it has 
been reported that PCI bus or slot numbers may change when another PCI 
device is added or removed.

> I was thinking of creating an alias in /dev pointing eth0 at enp0s31f6.

Network interfaces are not character nor block devices and do not have 
nodes in /dev.

Reverting to the "natural" kernel names has issues : interface names may 
not be persistent and change across reboots. More details following the 
link provided by Alexander.

[toc] | [prev] | [next] | [standalone]


#204665

Fromrhkramer@gmail.com
Date2019-01-26 12:50 +0100
Message-ID<xkuDf-1U1-9@gated-at.bofh.it>
In reply to#204664
On Saturday, January 26, 2019 06:18:59 AM Pascal Hambourg wrote:
> Network interfaces are not character nor block devices and do not have
> nodes in /dev.
> 
> Reverting to the "natural" kernel names has issues : interface names may
> not be persistent and change across reboots. More details following the
> link provided by Alexander.

Hmm, from the peanut gallery (and, at this time in the morning, pretty much 
non-thinking (if I ever do ;-) (And I'm not the OP.): does that violate / 
disprove the Linux meme that "everything is a file"?

[toc] | [prev] | [next] | [standalone]


#204674

From<tomas@tuxteam.de>
Date2019-01-26 17:10 +0100
Message-ID<xkyGR-4yK-11@gated-at.bofh.it>
In reply to#204665

[Multipart message — attachments visible in raw view] — view raw

On Sat, Jan 26, 2019 at 06:44:07AM -0500, rhkramer@gmail.com wrote:
> On Saturday, January 26, 2019 06:18:59 AM Pascal Hambourg wrote:
> > Network interfaces are not character nor block devices and do not have
> > nodes in /dev.

[...]

> Hmm, from the peanut gallery (and, at this time in the morning, pretty much 
> non-thinking (if I ever do ;-) (And I'm not the OP.): does that violate / 
> disprove the Linux meme that "everything is a file"?

Yes.

Try Plan9 if you want to come closer to that ideal.

Cheers
-- t

[toc] | [prev] | [next] | [standalone]


#204682

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2019-01-26 19:00 +0100
Message-ID<xkApk-5oY-9@gated-at.bofh.it>
In reply to#204665
On Sat 26 Jan 2019 at 06:44:07 (-0500), rhkramer@gmail.com wrote:
> On Saturday, January 26, 2019 06:18:59 AM Pascal Hambourg wrote:
> > Network interfaces are not character nor block devices and do not have
> > nodes in /dev.
> > 
> > Reverting to the "natural" kernel names has issues : interface names may
> > not be persistent and change across reboots. More details following the
> > link provided by Alexander.
> 
> Hmm, from the peanut gallery (and, at this time in the morning, pretty much 
> non-thinking (if I ever do ;-) (And I'm not the OP.): does that violate / 
> disprove the Linux meme that "everything is a file"?

As far as the user is concerned, isn't that what sockets are for?
I assume it would be pointless for the kernel to expose an actual
stream of bytes to anything but itself.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#204672

Frommick crane <mick.crane@gmail.com>
Date2019-01-26 16:50 +0100
Message-ID<xkynv-4cJ-3@gated-at.bofh.it>
In reply to#204629
On 2019-01-25 18:19, ghe wrote:
> Buster, computer with MAC identified Ethernet ports
> 
> Is there a way to relabel Ethernet ports? Without changing things in a
> number of config files?
> 
> I see on the web that changing udev used to do that, but now there are
> at least 2 files to modify.
> 
> I'm gently moving to a new ISP, and I'm trying to set up new, virtual 
> IP
> addresses on my Enet ports. Webmin tells me that enp0s31f6 is too long.
> I could do it in /etc/network/interfaces, but Webmin does all that 
> quite
> painlessly. Without typos.
> 
> I'd like to replace the /dev/random names with something understandable
> to a mortal.
> 
> I was thinking of creating an alias in /dev pointing eth0 at enp0s31f6.
> But where to put it? .bashrc would be convenient, but it'd be too late.
> In an init file? Is the s.*d word going to do init files forever?

I read the otherday that you can do that in grub

https://www.itzgeek.com/how-tos/linux/debian/change-default-network-name-ens33-to-old-eth0-on-debian-9.html

never tried

mick


-- 
Key ID    4BFEBB31

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web