Comment on Using systemd-networkd vs ifupdown on Debian
TCB13@lemmy.world 1 year agoI get your points and that’s a valid issue however, systemd-networkd
is designed for more persistent configurations but you’ve a few options:
-
systemctl reload systemd-networkd
andnetworkctl reload
. Don’t forget that if you change units on the filesystem asystemctl daemon-reload
is required before the previous commands. -
networkctl
commands such asreload
,reconfigure
,up
,down
andrenew
. Read more about them here. -
Temporary / volatile runtime units: manually drop a config under
/run/systemd/network/
it will apply until you reboot the machine. -
Transient scope units: those are kind of supersede temporary units as they are managed through a D-Bus interface so 3rd party interface can manage systemd. They don’t seem to work right now for network, but they might eventually do and this allows you to change options dynamically like they do for standard services.
An interesting thing to consider is that in most cases you can have your network configurations in /etc/systemd/network
but only bring them online when required. This for me seems to solve most cases, you’ve your network all configured and ready to go.
dr_robot@kbin.social 1 year ago
Thanks for this useful reply! I think I'll just need to closely examine my setup and figure out if I really need the ability to up/down interfaces like I described or whether the more persistent approach of networkd is actually more suitable for me. Sometimes I just want to reproduce behaviour that I've used before, but may not actually need.
TCB13@lemmy.world 1 year ago
Well
networkctl up enXX
+ pre-configured network files with the addresses and whatnot might be a suitable replacement for your requirements.