On 16.07.24 11:24, Jose Luis Tallon wrote:
On 16/7/24 10:54, Lukas Märdian wrote:
[snip]
But it's not just this.
Netplan's beauty starts to shine when we're talking about the full picture:
* Netplan PLUS sd-networkd (server/cloud/container)
* Netplan PLUS NetworkManager(desktop/laptop)
* Netplan PLUS wpa_supplicant (server/embedded, using sd-networkd on WiFi)
* Netplan PLUS Open vSwitch (cloud/HPC)
So instead of having multiple different ways of configuring networking on Debian
systems, we should be telling one coherent story. In the end we want to have a
compelling answer to this question:
[snip]
Out of curiosity+ignorance: how does Netplan detect the environment? How
reliably?
It doesn't, it is all part of the explicit, declarative Netplan configuration.
So the
sysadmin or installer makes that decision. E.g. in the case of
[debian-installer] or
[calamares], we're checking if the "network-manager" package is installed in the
target system and install an additional Netplan config file in that case.
/etc/netplan/01-network-manager-all.yaml:
network:
version: 2
renderer: NetworkManager
This file controls Netplan's [default renderer] on a global level and is the
most common
case. But different "renderer" settings can also be applied to individual
interfaces; as
we learned in this thread before, using multiple network daemons (i.e. backend
renderers)
at the same time comes with its very own challenges. Still, it works and can be
useful in
certain edge cases.
In other cases, where only one backend option is supported in Netplan, e.g. for
setting up
SR-IOV devices, certain Open vSwitch configurations or wireless configurations
on
sd-networkd, it will pick the corresponding renderer implicitly (e.g.
wpa_supplicant, ovsdb).
I personally disfavour Netplan and other related tools (but open to be
convinced on technical merits)
Netplan isn't very common in the Debian world, yet, at least that was my
impression from
DebConf 2023. Still, it's already part of our stack and I'd like to invite you
to play
around with it, to learn more about its technical abilities. E.g. using one of
our official
Bookworm cloud images in a local VM:
https://blog.slyon.de/2023/07/10/netplan-and-systemd-networkd-on-debian-bookworm/
Cheers,
Lukas
[debian-installer]
https://salsa.debian.org/installer-team/netcfg/-/merge_requests/9/diffs#ba5cc2a898d2537d7b6ec1de1ec1b70a6477c2a4_53_75
[calamares]
https://github.com/calamares/calamares/pull/2284/files#diff-5960a6e192d1804ed3e3b84905264cff37275564879d6d87d0668369b495c21bR150
[default renderer]
https://netplan.readthedocs.io/en/latest/examples/#how-to-use-networkmanager-as-a-renderer
[reference]
https://netplan.readthedocs.io/en/stable/netplan-yaml/#properties-for-all-device-types