|
|
Subscribe / Log in / New account

ifupdown at least follows the principle of least surprise

ifupdown at least follows the principle of least surprise

Posted Sep 19, 2024 12:54 UTC (Thu) by maniax (subscriber, #4509)
Parent article: Debating ifupdown replacements for Debian trixie

I have to deal with network-scripts (ifcfg) in RHEL-based distros, netplan, networkd, NetworkManager - all this on debian and rhel-based distros, and honestly, ifupdown is one of the least painful. It does NOT react to interface state changes, which is pretty much a must for most servers, and via post/pre-up commands gives the option to have any custom config that's not really implementable otherwise (or would be a pain).

network-scripts (ifcfg) is the second best.

All the rest also happen to be non-deterministic in some situations, which might be a problem if you're trying to work around some weird bug that requires interfaces to go in specific order in a bond
(One of my pet peeves about NM is that if the interface flaps, it'll remove all IPs that were not added by it on the interface)

At some point you just say "screw this, I'll write a large and idempotent iproute2 script", but most people seem to be scared of those, and it's not trivial to convince customers that they should drop whatever the distro has and they have already configured.


to post comments

ifupdown at least follows the principle of least surprise

Posted Oct 25, 2024 2:56 UTC (Fri) by fest3er (guest, #60379) [Link] (3 responses)

«(One of my pet peeves about NM is that if the interface flaps, it'll remove all IPs that were not added by it on the interface)»

In my experience, the interface doesn't need to bounce. It seems that every time NM periodically wakes up, it 'deletes' everything it did not configure. (WTF!?! I just added those addresses! Where the eff dif they go?!?) It's akin to municipal residents going to the city park, setting up a badminton net and playing a match, only to have the park manager walk by, see the net and supports and remove them in the middle of the match because he did not set them up. (Kind-of foolhardy since the badminton players might start using *him* as the birdie, just as I have to kill NM when I'm using multiple IP addrs on an IF­—and then figure out how to handle WiFi myself.)

ifupdown at least follows the principle of least surprise

Posted Oct 25, 2024 4:32 UTC (Fri) by intelfx (subscriber, #130118) [Link]

> It's akin to municipal residents going to the city park, setting up a badminton net and playing a match, only to have the park manager walk by, see the net and supports and remove them in the middle of the match because he did not set them up

I thought that’s exactly how it worked :-)

ifupdown at least follows the principle of least surprise

Posted Oct 25, 2024 5:41 UTC (Fri) by zdzichu (subscriber, #17118) [Link]

If you have NM-managed interface, you should use NM to add addresses to it. `set ipv.addresses …` is longer than `ip a a …`, but works reliably.

NM *may* have some setting to ignore guerilla IP addresses (other tools, like systemd-network, have such settings), but I leave finding it as an excercise for the reader.

ifupdown at least follows the principle of least surprise

Posted Oct 29, 2024 10:42 UTC (Tue) by taladar (subscriber, #68407) [Link]

That seems like a good thing from the perspective of having a single source of truth instead of a big mess of half-manually, half-automatically configured parts of the system.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds