I know that ubuntu-server uses networkd by default but some features of gnome doesn't play well with it so I'm trying to replace with Network Manager. The problem is that Network Manager's default connection doesn't give access to internet (it has a non-automatic ipv4 configuration), I tried to edit it and create new connections with higher priorities but after reboot the same default connection appears and is used again.
NAME UUID TYPE DEVICE
enp0s3 24ba6c77-1bee-4bf6-a4d5-dfcds9e8f5d37 ethernet enp0s3
enp0s3 170f0ded-562e-e99b-b9a8-e66be0s63bdb1 ethernet --
my_connection df453bef-42b3-4ead-b380-3c66b95cd6aas ethernet --
netplan-enp0s3 1eaf7e45-3b9d-3043-0435-9690a02759203 ethernet --
The first ensp0s3
is the mentioned connection created and used by default after the reboot, the second is my attempt before the reboot to edit this default connection, the netplan-enp0s3
is created automatically based on /etc/netplan/50-cloud-init.yaml
(I tried to disable cloud-init too). If I change to any other connection the default one would disappear instantly and my internet works again.
My /etc/netplan/50-cloud-init.yaml
:
network:
renderer: NetworkManager
ethernets:
enp0s3:
dhcp4: true
match:
macaddress: 02:09:93:B7:81:45
set-name: enp0s3
version: 2
My /etc/NetworkManager/NetworkManager.conf
:
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=false
[device]
wifi.scan-rand-mac-address=no
Possibly relevant: when I reboot the nmcli
command returns with enp0s3: connected (externally) to enp0s3
.
ethernets
section, as it will make that connection immutable to Network Manager.