6 ms·
I was really hoping this was a rant how back in the good old days you had eth0 and eth1 and you were happy about it, now we get en0sp04 and who knows what port
by bombcar 5y ago
I was really hoping this was a rant how back in the good old days you had eth0 and eth1 and you were happy about it, now we get en0sp04 and who knows what port that even is.
- icelancer 5y agoYeah what's the deal with this? I turn on "rename ports" in raspi-config immediately when I configure a new ones. I'm not trying to see that nonsense in ifconfig.
- deleted 5y ago[deleted]
- AceJohnny2 5y agoIn the old days, ethernet port names was sequential depending on the order of bringing up the interfaces, and this could vary depending on timing. On some systems, plugging a dongle, or changing what port a USB hub was plugged in, could reorder/rename the ethernet ports and now your config for `eth2` was suddently being applied to a completely different interface. So they switched to names that depended on stable interface metadata (ethernet vs wifi, pci port...) But people still want easier to remember device names, so it's still possible to rename your weird (but stable) port name to something more memorable.
- bombcar 5y agoYeah, I wish more Linux versions made that easier to do - I find it much easier to remember eth0 and eth1 vs the low level name, though the stability is nice.
- eropple 5y agoDoes your shell not tab-complete interfaces? Mine does, and is smart enough not to suggest up interfaces for `ifup` (so if I have a machine with a 10G card and a 1G onboard I make sure to keep the 1G interface disabled), but I don't know if that's one of my army of zsh plugins. For me, it tends to be that only one interface of each type is ever live at a time, so I don't really even see it except as line noise 'til I have to care about it.
- jeffbee 5y agoIf using something like netplan it’s easy to associate a memorable name with a MAC address.
- cesarb 5y ago> In the old days, ethernet port names was sequential depending on the order of bringing up the interfaces, and this could vary depending on timing. In the even older days, before the Linux kernel started probing hardware in parallel to speed up the boot process, this wouldn't vary depending on timing; for a given kernel version, the order would always be the same. Of course, the order could change when you updated your kernel, either because it had a new driver which was probed earlier, or because the probing order for the PCI bus changed to the opposite order (IIRC, that actually did happen). And of course, having the network drivers as kernel modules makes it much harder to preserve a deterministic probing order; but back in these days, it was much more common to carefully customize each machine's kernel to have as built-in drivers precisely the set corresponding to the hardware present on a given machine or fleet of machines, carrying that customization over for each new kernel release ("make oldconfig"); kernel modules would be relegated to things like filesystems which you might need only once in a while, and they would be unloaded when no longer in use (memory was precious).
- eropple 5y agoI know exactly what enpXsY is at a glance, and you can too! It's predictable device naming and it helps a system administrator know what NIC they're dealing with at a glance. "enp2s0" is "en" (Ethernet; there's "wl" for WLAN and "ww" for WWAN), "p2" (PCIe bus 2), "s0" (PCIe slot 0). They can also be named "enoX" if the system knows that it's integrated/onboard, though this is rare, and hotplug PCIe devices read as "ensX". https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ https://www.freedesktop.org/wiki/Software/systemd/Predictabl... On systems that historically have not used this, it was possible for devices to be non-deterministically assigned to eth0, wlan0, etc. -- and while you could say "just pick a guaranteed order", that violates the principle of least surprise. Predictable device naming is the same, everywhere, on the same hardware. You can still set aliases if you're more comfortable with that, but this is a really sane default.
- kop316 5y agoThank you for the thoughful response on this. TIL.
- jeffbee 5y agoThis isn’t as consistent as you’re making it seem. I added an add-in PCIe Ethernet adapter and it became enp5s0 while the on-board Realtek formerly known as enp5s0 got bumped to enp6s0.
- eropple 5y agoYour hardware is reporting that peripherals have logically moved, so yeah, the names change? It's definitely not perfect, but also consider that this is in part to help manage larger fleets of systems, and if you have thirty of the same machine and you put thirty add-in PCIe ethernet cards into them, at least they'll all predictably change and so in your test lab (you got a test lab for this hypothetical fleet, right?) you'll know what your changes are causing and be able to roll out synchronized software changes to pick up on it. We don't all have fleets of machines, of course, and systemd has functionality for disambiguation in a single-system environment where interfaces might appear and disappear sometimes. udev also has a mode where the interface is automatically named after its MAC rather than its physical location. It's not on by default on any Linux distro I know of, but it's just a flag IIRC.
- deleted 5y ago[deleted]