I built a new firewall under Debian 12. The machine has eight network ports, and during configuration I accidentally used the same name for a couple of the ports in the files under /etc/systemd/network/*.link. I ended up with two link files referencing two different MAC addresses but naming each of them as WAN0, and once systemd got that configuration it wouldn’t let it go.
From what I could find online, normally I would just issue systemctl daemon-reload
followed by a update-initramfs -u
and after a reboot systemd should have had the updated information… but no dice this time. The way I finally discovered the problem was when I noticed under ifconfig that my wan0 port was pointing to the wrong MAC address (even though the link files had been corrected).
After several hours of fighting with it, I finally managed to get it to work by renumbering all of my link files, and now the information for each port matches up correctly. But my real question here is WHY did systemd refuse to read updated link files? Is there another step I should have taken which was mysteriously never mentioned in any of the dozens of web pages I looked at trying to fix this? I really need to understand the proper process for getting it to correctly use these files so I can maintain the machine in the future.
(God I miss the reliability of udev already)
Debian can install without systemd, you can use SysV init and udev instead. So far I’ve had no particular problems with it, and the more people who do it, the better support is likely to be.
I can’t help you much with the systemd issue, frustrating issues like that drive me round the bend too.
Yeah frustrating is definitely one word for it. I was up until 4am Saturday morning trying to get this one issue resolved, everything else worked almost perfectly on the new firewall setup except I couldn’t get out to the internet. I had already tried renaming the files earlier and that didn’t do the trick so I’m not sure why it finally decided to start working, but all eight ports are correctly configured now. (Not that I have much faith in what will happen down the road if one of the network adapters needs replaced.)
And the only reason I had to fight with giving all the network ports new names is because “predictable naming” is NOT… Turns out if you cold boot the machine the interfaces get named one way, and if you do a reboot they get a different set of names, so I had no choice about renaming them by MAC address.
Oh well, maybe someone else will see the post and offer some suggestions. I can’t imagine having to do this again on my other servers when I upgrade them from Buster.