Hi Frederik,
On Tue, Jun 13, 2023 at 10:39:48PM +0800, Frederik Vanrenterghem via BitFolk Users wrote:
https://wiki.debian.org/NetworkInterfaceNames#bookworm-xen
The 'catchall interface naming' approach seems easy enough to implement now so
this doesn't bite in the future. Do you foresee any issues?
I'm taking that as meaning "add both eth0 and enX0 to
/etc/network/interfaces".
That should work, but seems a little messy. In this situation there
isn't really any need to guess: unless you take some action, the
version of systemd/udev in Debian 12 WILL rename your eth0 to enX0
when you next boot.
So I would either:
- rename eth0 to enX0 in /etc/network/interfaces, or;
- add net.ifnames=0 to the kernel command line
(GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and then
update-grub) to prevent this happening at all.
I suppose adding both eth0 and enX0 does have the advantage that you
can do it now while you remember and then things continue to work
even if you do reboot without upgrading.
The described "safety net" of "manual override" also seems viable;
that involves creating a .link file that will match your network
interface, so you get to choose the name. You can call it wan0 or
bf0 or whatever. That's described here:
https://wiki.debian.org/NetworkInterfaceNames#CUSTOM_SCHEMES_USING_.LINK_FI…
and should work for any version of Debian that has systemd.
You can match by MAC address like the example does (this will not
change for the life of your VM) although do note that if you add
some kinds of virtual interface they may use the same MAC as your
real one, which would make systemd try to rename those too, leading
to a mess. I would suggest matching also on Type=ether as there
shouldn't be any other Ethernet interface with the same MAC.
I think Kind=vif may also match it.
The systemd.link(5) man page covers all this:
https://manpages.debian.org/bookworm/udev/systemd.link.5.en.html
While getting this wrong may be irritating, it should not be
disastrous; you can always connect to Xen Shell and use "console"
command to get on the hvc0 console of your VM. From there you can
see what the network interface is actually called.
It's a very good idea to make sure you can connect to the Xen Shell
console before doing anything like an upgrade to the next major
release.
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting