top | item 38381484

(no title)

blowfish721 | 2 years ago

Was trying to configure a network bridge for a vm just the other day from cli. The guide (for Ubuntu which I was also using) was using nmcli (Network Manager), tried it and command not found, back to searching and was nudged to systemd networking by stackoverflow which didnt work either. Turns out that my system was using Netplan. Three different systems to handle networking, really? Ok, chatgpt convert this nmcli command to netplan, sure here you go just put this in your netplan config file and apply config. Ends up with a botched network config on a headless system.

discuss

order

iam-TJ|2 years ago

netplan(.io) is an abstraction layer on top of either NetworkManager (GUI installs) or systemd-networkd (servers/non-GUI) and is not really needed except as a convenience for Canonical's own designs for automated mass deployments especially linked to cloud-init. Under the hood it just converts its YAML configuration files into the syntax for the underlying actual network management tool.

For NetworkManager it'll write the config file to /run/NetworkManager/system-connections/ and for networkd to /run/systemd/network/ on EVERY boot since /run/ is a tmpfs (file-system in RAM).

For almost all servers, and most workstations, netplan is an unnecessary indirection since most hosts (including containers) have pretty static network configurations that only require writing once (to /etc/NetworkManager/system-connections/ or /etc/systemd/network/ ).

nmcli is the NetworkManager command-line tool. There is also nmtui for a text user interface. These are terminal alternatives to the GUI applets such as nm-applet (network-manager-gnome) or plasma-nm for KDE.

networkctl is the CLI interface to systemd-networkd. There is no widely used GUI interface to it (yet).

programd|2 years ago

That's the exact experience I went through about a year ago trying to set up a bridged VM on a headless Ubuntu system. I mean right down to the sequence of nmcli, systemd, and Netplan, winding up with wiping it all away and just running Virtual Box on a way overpowered and mostly idle Win 10 system. Because I just wanted to run a VM connected to my local LAN.

Linux networking and DNS resolution, while working fine for the happy path, are a dumpster fire from a system management viewpoint. Especially if you want to do anything even mildly off-script. And I say this as a Linux user since before the kernel hit 1.0.

I don't know, maybe it's just a documentation problem. The accumulated junk of 50 years of obsolete documentation that you have to wade through to find out that the whiz-bang Linux distro you're using today is not the Linux which worked fine last year.

The exit off my lawn is in this direction.