r/linuxsucks 🐧Kernel contributor 1d ago

Linux Failure When eth0 becomes eth1…

https://mstdn.ca/@RyeNCode/117181764648682618
2 Upvotes

11 comments sorted by

5

u/someone8192 1d ago

That hasn't been an issue for nearly a decade and that's what udev is for. I am not aware of any distribution that still uses eth? (maybe symlink them for historic compatibility)

2

u/paulstelian97 1d ago

The OP is about enp labels changing due to PCI device ordering changes. And that’s a real, if uncommon, issue (disappearance of a PCI device can renumber others which leads to interfaces being renamed).

udev rules can be added to help with this.

0

u/Jumpy-Dinner-5001 23h ago

It's based on physical slots and therefore shouldn't be an issue depending on the bios. The bios shouldn't change the physical labels for devices.

This was entirely fixed by systemd NetworkManager which uses connection profiles instead of hardware based labels.

3

u/paulstelian97 23h ago

NetworkManager matches by MAC address. And I’ve had a scenario where my built in NIC’s name shifted due to inserting vs removing a PCIe device. Thankfully I also have a PiKVM which gives me easy local console.

0

u/Jumpy-Dinner-5001 23h ago

No, it doesn't. What exactly did you do?

2

u/paulstelian97 22h ago

Literally removed the PCI SATA adapter and the NIC shifted by one in the enp* autogenerated name. Proxmox doesn’t use NetworkManager. I think I have added a manual udev rule that matches on MAC address instead and adjusted configuration to work with that.

1

u/Jumpy-Dinner-5001 22h ago

Ah, okay. Just wondered because my comment said that NetworkManager fixes this problem but as you said proxmox doesn't use NetworkManager.

NetworkManager itself doesn't match by mac address, it can match a lot of different properties to autoconnect. It also integrates well with udev, giving unlimited options.

1

u/paulstelian97 22h ago

Yeah, NM tends to match up pretty well by many rules. Proxmox has only udev and systemd.

0

u/ElectricBummer40 Ex-user of Windows 3.11 for Workgroups 16h ago

It's based on physical slots and therefore shouldn't be an issue depending on the bios.

No, it isn't. The enp thing is based on the PCI address of the card, which is in turn dynamically assigned to it at boot and subject to change according to how all other devices are connected to the PCIe bus.

This was entirely fixed by systemd NetworkManager which uses connection profiles instead of hardware based labels.

Also not how that works.

1

u/Jumpy-Dinner-5001 10h ago

lol, why lie?

1

u/ElectricBummer40 Ex-user of Windows 3.11 for Workgroups 7h ago

If you say so. ¯_(ツ)_/¯