You can configure it to wait for what you want as per documentation: https://www.freedesktop.org/software/systemd/man/latest/systemd-networkd-wait-online.service.html
Hi, I see, that would be a workaround. But do you have any idea why this only started happening in Trixie?
If you are using /etc/network/interfaces, is the interface even being managed by systemd-networkd? The output of: $ networkctl $ SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/systemd-networkd-wait-online would help you determine if systemd-networkd-wait-online is even at play here. Otherwise, if you are using ifupdown, then you need to look at /usr/lib/systemd/system/networking.service from ifupdown. If that service is completing before your IPv6 address is ready, then other services cannot reliably synchronize on network-online.target. $ systemctl list-dependencies --after network-online.target will show you what specific units are ordered Before=network-online.target.
Hi, I compared the files /usr/lib/systemd/system/networking.service from Bookworm and Trixie and there was no significant change, only what used to be /sbin/... was changed to /usr/sbin/... in Trixie. You are right, I’m using Debian’s default for network interfaces, ifupdown: # networkctl systemd-networkd is not running, output might be incomplete. IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback - unmanaged 2 ens18 ether - unmanaged 3 ens20 ether - unmanaged 3 links listed. # systemctl list-dependencies --after network-online.target network-online.target ● ├─networking.service ● └─network.target ● ├─ifupdown-pre.service ● ├─networking.service ○ ├─systemd-networkd.service ○ └─network-pre.target
Hi All, I tested here by switching from ifupdown to systemd-networkd and the system worked perfectly. Do you recommend that I start using systemd-networkd on the servers instead of ifupdown? # networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier configured 2 ens18 ether routable configured 3 ens20 ether routable configured 3 links listed.
https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_modern_network_configuration_without_gui. Glad it's working well for you.
Note that the default behavior of systemd-networkd-wait-online is to wait for any protocol to be configured. If you want to specifically require IPv6, you'll need to pass `--ipv6` via the commandline (using a systemd drop-in, probably) or add `RequiredFamilyForOnline=ipv6` to the interface's [Link] section. Otherwise you're just getting lucky that this is working for you, probably just based on timing of some configuration events. noah
Before systemd-networkd-wait-online looks at configured address families, it waits for the link state to be "configured". If a static IPv6 address is requested in the configuration, the link state will not be "configured" until the static address is set.
Yes, that's correct. I missed the static configuration detail earlier. What I wrote pertains to dynamic assignment. noah
Hi, Based on my tests, I conclude that the issue is not related to systemd itself, but rather to the ifupdown package. When using systemd-networkd instead of ifupdown, everything operates normally. It seems that something introduced between Bookworm and Trixie caused ifupdown (/etc/network/interfaces) to change its behavior, leading to services being started before the network is fully ready.