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.