0

Both plan 9 and FreeBSD have a filesystem-based approach to a unified userspace interface for networking configuration. This paper for example describes the advantages of such an interface, from security to usability, as designed and implemented for FreeBSD.

Is there any similar implementation available for linux systems? If not, is there a particular reason this isn't done/doable for linux?

1 Answers1

3

Linux has not just one "unified userspace interface for networking configuration", it has many of them... each optimized for different types of use cases.

  • NetworkManager is probably the one you will find as the default on most big-name desktop and server distributions these days. It would be overkill on embedded systems that might just need a single wired network interface with DHCP or a static IP address. If I recall correctly, an early version of it was put into wide distribution (by Fedora, I think) and received much hate because it was not quite ready for prime time at that point.
  • systemd-networkd is included in the systemd software suite. It is more lightweight than NetworkManager and apparently originally designed more for the embedded system use cases. I don't think it has the kind of desktop environment integration NetworkManager can have.
  • netplan was introduced by Canonical (the makers of Ubuntu) as a sort of upper management layer on top of whatever network configuration interface is used at the lower level. It seems it could be most useful in cloud service provider-type environments, as it can provide an unified interface for deploying network configurations in an automated way for many types of distributions

... and a lot of others.

There is no reason one could not develop a NetFS-workalike for Linux: it would be easy to implement with FUSE, as a network configuration filesystem is unlikely to need high performance.

But you know:

XKCD #927 on standards: whenever there are multiple competing standards, any attempt to unify them is likely to just add one more competing standard.

Besides, I don't see why representing configuring a network interface as creating a directory would be particularly useful. Sure, it would allow you to re-use the same "verbs" (commands), at the expense of making your concept of "nouns" (files and directories, some of which are now actually IP addresses with their own special rules) more complex.

A big part of why Unix-style operating systems have stayed in favor for so long is that its structure encourages the users to build their own "verbs" (shell aliases, scripts, custom programs) to fit their needs. It seems to me that trying to go back to a most minimal set of "verbs" instead of developing the best "verbs" to fit the task misses the point.

It also makes me think of the law of the hammer: "If the only tool you have is a hammer, it is tempting to treat everything as if it were a nail."

telcoM
  • 87,318
  • 3
  • 112
  • 232