13

Does anybody have experience with both systems enough to compare them?

I'm currently using ifupdown on my Debian server as that's the default, but it seems that the modern way of managing the local network is via systemd-networkd so I'm contemplating putting the effort in to migrate.

Would those of you who have experience with it, recommend it?

In my short investigation, I have made the following observations:

  • using networkd means you can use networkctl to manually control the interfaces which is quite convenient
  • networkd aims to be fully declarative
  • networkd separates the creation of virtual interfaces (netdev files) from their configuration (network files)
  • networkd doesn't support all networking features (e.g. namespaces)
  • networkd is systemd, but surprisingly I can't find information on how to create other unit files that depend on the individual network files going up or down, other than networkd-dispatcher. I don't like dispatcher because just like ifupdown it triggers all the scripts and you need if tests to exclude all interfaces you don't need to be affected. I'd like to write unit files that can be targeted to activate and deactivate when a particular interface goes up or down.
  • networkd, other than via dispatcher, does not seem to support adding arbitrary commands to run like ifupdown supports via e.g. pre-down, post-up, etc.
top 17 comments
sorted by: hot top controversial new old
[-] TheInsane42@lemmy.world 3 points 1 year ago* (last edited 1 year ago)

I'm using ifupdown2 and have services depending on the state of virtual network devices (BindsTo=sys-devices-virtual-net-.device).

I hate systemd with a passion, as the refuses to wait for networking when you haven some service specified to be started After networking, but it start when the start of networking actions has sbeen tarted (not after networking is finished bringing up everything)

The only think I let systemd do is monitor the state of the devices and set the interface name, as udev seems to mess these names up in combination with systemd (and there is to much depending on systemd now in Debian to get rid of the junk)

[-] mystik@lemmy.world 3 points 1 year ago

Personally, I will use both: On servers with fixed network connections I will tend to use ifupdown; but on my linux laptops I'll use networkmanager or networkd which tend to have nice UI's for joining various forms of wifi networks. On my laptops for some VPN's i"ll use the ifupdown configuration, which lets me setup all sorts of exotic configurations (bridges, vlans, vxlan,, vpns, namespaces, etc.) The linux command line tooling has a litany of functions to check/test/diagnose/tweak networking settings, and they work across all the distros, AND they can reveal the full details of the network, as the kernel sees it. NetworkManager, networkd, connmann, etc, often omit details in the name of simplifying for the most common scenarios.

load more comments
view more: next ›
this post was submitted on 05 Aug 2023
13 points (100.0% liked)

Selfhosted

40040 readers
649 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS