1

Recently I've decided to find out how to configure the network in Ubuntu 20.04. Several years ago I used /etc/network/interfaces for this purpose, but now everything changed. As I've found for Ubuntu Desktop NetworkManager does all the work and for Ubuntu Server, it's customary to use systemd-networkd.

I also found Netplan — the network configuration abstraction renderer. What is the motivation to use this piece of software? Is it more convenient to have one more layer between the user and the actual network configuration utility? Why I can't write configuration for NetworkManager on a desktop without any intermediate layer?

I'd explored Netplan Design page and found such points:

  • No persistent generated config, only original YAML config
  • Retains the flexibility to change backends/policy later or adjust to “apt purge network-manager” as generated configuration is ephemeral

I don't understand this idea. As a server user most of the time I have a static network configuration, that is why I prefer to use systemd-networkd and write configs for this solution. As a desktop user, I need to have the ability to connect to different Wi-Fi networks and apply different network policies for different connections (e.g. limit traffic for mobile connection). That is why I use NetworkManager on my desktop.

For desktop and server I have completely different use cases, so, as a majority of users, I don't think that I'll ever switch from one tool to another. That is why some additional abstraction layer is useless.

I agree that Netplan can be useful for some cloud use cases when you want to store configuration as a code in one place, but is it useful to have this tool in the default Ubuntu Desktop installation?

I'll be happy if someone explain to me what is the purpose of Netplan in Ubuntu, especially Ubuntu Desktop.

0e39bf7b
  • 11
  • 1
  • "As a server user ... I prefer to use systemd-networkd and write configs for this" "As a desktop user ... I use NetworkManager" ... or you could use `netplan` for both and set the renderer as appropriate. – muru May 10 '21 at 09:50
  • Thanks for your answer! – 0e39bf7b May 10 '21 at 10:06
  • Your link gives some explanation, but it still looks strange for me. Why there was a migration from `ifupdown` to `netplan`? Why not to `sysemd-networkd`? > or you could use netplan for both I don't think it will be the best solution. I can use Python for writing anyl software, but I don't do so, because for some cases Python is not the best solution. The same is for network configuration tools. – 0e39bf7b May 10 '21 at 10:13
  • Pretty bad analogy. A better version, if you want to talk about Python, is writing some Python code (network configuration in netplan) and running it (rendering it) in CPython (NetworkManager) or PyPy (systemd-networkd) or some other implementation depending upon on environments, system requirements, etc. – muru May 10 '21 at 10:28

0 Answers0