logoalt Hacker News

bbarnettlast Saturday at 8:04 PM2 repliesview on HN

For those worrying about the NIC change with systemd, this comes from the release doc:

https://www.debian.org/releases/trixie/release-notes/issues....

  # example:
  udevadm test-builtin net_setup_link /sys/class/net/eno4 2>/dev/null
  ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
  ID_NET_LINK_FILE_DROPINS=
  ID_NET_NAME=eno4  <-- note the NIC name that will happen after reboot
Here's a one-liner, excluding a bond interface and lo. Gives a nice list of pre and post change.

  for x in $(cat /etc/network/interfaces | grep auto | cut -d ' ' -f 2 | grep -Ev 'lo|bond0'); do echo -n $x:; udevadm test-builtin net_setup_link /sys/class/net/$x 2>/dev/null | grep NET_NAME| cut -d = -f 2; done
The doc's logic is that after you've upgraded to trixie, and before reboot, you're running enough of systemd to see what it will name interfaces after reboot.

So far I have not had an interface change due to upgrade, so I cannot say that the above does detect it.


Replies

champtarlast Saturday at 11:54 PM

Hopefully the last breaking change.

enoX should always stay stable, as it's the BIOS (in some ACPI table) telling that this device/port has this ID.

ensX means the NIC in PCIe slot X, but in your PCIe tree you can have PCIe bridges, so technically you could have multiple NIC in the same slot (what the BIOS declare as a slot), so there was a lot of breaking NIC naming changes over the years in systemd to figure out the right heuristics that are safe, enabling/disabling slot naming if there is a PCIe bridge, but just in some cases.

Also for historical reasons the PCIe slot number was read indirectly leading to some conflicts in some cases (this was fixed in systemd 257)

show 1 reply
forestolast Saturday at 10:24 PM

Do you happen to know if this change can affect people who have disabled systemd's Predictable* Network Interface Names before upgrading to Trixie?

*haha

show 1 reply