(last updated 2020/11/28)
I haven't touched lower-level network administration in a few years, but as part of a personal project I'm setting up a server from scratch. My fond memories of "ifup" and "/etc/network/interfaces" are pretty obsolete, and I'm not _that_ happy with the current state of getting-started-type documentation around NetPlan. This is a cheat sheet for my own use, but if you find it useful or want to suggest additions, shoot me an e-mail. :)
- Ubuntu: /etc/netplan/00-installer-config.yaml
Update after config change
After making changes to the yaml file, you'll need to reload them. Of course this happens on system boot, but to apply it immediately, run:
sudo netplan generate
sudo netplan --debug apply
Example Bridge Suitable for libvirt usage
This was easily the most annoying part to find documented. In this example,
eno4 is the physical network interface (in case it wasn't obvious); substitute for eth0 or whatever you've got. This example was based on existing examples but simplified somewhat. It is actually running on one of my home lab servers.
With this config, setting libvirt guests in bridge mode with bridge br0 will work as expected. Unfortunately, this isn't currently documented on the main libvirt page (as of 2020/11/28) - the instructions there will work up until Ubuntu 18.04, or current Debian, but not on Ubuntu 20.04 or any other netplan-based distribution.