Just a heads up: I did this in midnight, and I’m also drunk, so … Help yourself out.
I forget when, but Ubuntu introduced Network Manager just when most people gradually shift from /etc/network/interfaces
to netplan /etc/
netplan.
technically, the transition from netplan to Network Manager is simple, you modify your netplan config to say NetworkManager
in render rather than networkd
. Install Network Manager on apt or snap, start and enable the service, reapply netplan and it just works!
Unfortunately it’s not quite easy for me, so here’s my journey of switching to Network Manager and introduced an hour of downtime to my Mastodon instance.
- Install networkmanager from apt or snap. start it up
- switch netplan renderer from networkd to networkmanager.
- Restart network manager, run
sudo nmcli d
and see if the devices you use are connected. If so, skip to last step. - If the device shows as unmanaged, then you might encountered this bug https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1638842 but first, check something else
- the interfaces might be managed by
/etc/network/interfaces
file. Instead of removing the file, you can go to NetworkManager’s config file to override it (forcefully manage these interfaces) - Go to
/etc/NetworkManager/NetworkManager.conf
, there’s a line calledifupdown
, and amanaged
value. Set it to true and try to restart NetworkManager, to see if it’s able to manage your network interface. If so, skip to last step. - if step 5 and 6 didn’t solve the issue, you might be using Ethernet interfaces. And the bug tracker link on step 4 showed there’s a file that by default instruct Network Manager to not manage Ethernet.
- What you can do is, create a empty file at
/etc/NetworkManager/conf.d/10-globally-managed-devices.conf
. Restart NetworkManager after should be able to show your interfaces are managed. - Once the interfaces are managed, you should configure the interfaces. The easiest way is to run nmtui and follow the prompt. After everything is done, make sure to restart and setup auto start for the service as system boots! Forget to do that’ll cause additional unnecessary downtimes at your system when it reboot.
Hope this helps! I might come back later to fix format and some styles, I might not. Good luck!