systemd-resolve/NetworkManager changes (17.10 -> 18.04)

Teresa e Junior teresaejunior at gmail.com
Sat May 19 18:59:49 UTC 2018


Whenever I connect my laptop to a new network with NetworkManager, I 
don't need to manually set the DNS servers if I configure 
systemd-resolve with the following (in 
/etc/systemd/network/wireless.network):

[Match]
Name=wl*

[DHCP]
UseDNS=false

[Network]
DNS=8.8.4.4 208.67.220.220

The problem is that this stopped working when I upgraded from Artful to 
Bionic:

$ systemd-resolve --status | awk '/DNS Servers/,/^$/'
          DNS Servers: 189.4.0.242
                       189.4.0.153
                       189.4.0.234

But it works if I manually restart systemd-networkd and network-manager:

$ sudo systemctl restart systemd-networkd.service
$ sudo systemctl restart network-manager.service
$ systemd-resolve --status | awk '/DNS Servers/,/^$/'
          DNS Servers: 8.8.4.4
                       208.67.220.220

          DNS Servers: 8.8.4.4
                       208.67.220.220

How can I restore the old behaviour, or what is the preferred method now?




More information about the ubuntu-users mailing list