Re: Enet names
On Sat 26 Jan 2019 at 06:44:07 (-0500), rhkra...@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.
Re: Enet names
On Sat, Jan 26, 2019 at 06:44:07AM -0500, rhkra...@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 signature.asc Description: Digital signature
Re: Enet names
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 ID4BFEBB31
Re: Enet names
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"?
Re: Enet names
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.
Re: Enet names
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 ⠈⠳⣄
Re: Enet names
ghe wrote: > Futzing with systemd makes one wonder what MS has on some of the Linux > system programmers. :D
Re: Enet names
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
Re: Enet names
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 Did I mention all opinions are my own?
Re: Enet names
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