I'm finding it difficult to find reliable up-to-date information on how networking configuration is managed on Ubuntu 18.04 workstation.
I believe in 16.04
dnsmasq
was the new kid on the block, and it took over duties from resolved
I recently found out about netplan
though. This link refers to netplan
for managing DNS, but it seems to only really apply to ubuntu-server
, as the netplan configuration file on my workstation offloads everything to NetworkManager
:
$ cat /etc/netplan/01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
I guess I'm just confused as to what is responsible for what, there is a lot of confusing information about ifupdown
, resolved
, dnsmasq
, netplan
, nm
, etc.
How can I get reliable, up-to-date information on whatever the state-of-the-art is for all things networking in Ubuntu 18.04?
In short... you actually have multiple questions...
NetworkManager vs Netplan
In older versions of Ubuntu, NetworkManager was king.
In newer versions of Ubuntu, Netplan and systemd-resolved tries to be king.
Unless you're running a server, I'd recommend staying with NetworkManager.
$ cat /etc/netplan/01-network-manager-all.yaml
dnsmasq vs systemd-resolved
In older versions of Ubuntu, dnsmasq was king.
In newer versions of Ubuntu, systemd-resolved tries to be king.
If you must run them both, you'll want to modify the following, or DNS errors will occur.
Do a
ps auxc | grep -i dns
andps auxc | grep -i resolv
and look fordnsmasq
andsystemd-resolved
, and if both are running, you need to disable the DNS part ofsystemd-resolved
by editing/etc/systemd/resolved.conf
and...change:
to:
/etc/resolv.conf
Do NOT manually edit this file.
if this file contains 127.0.0.1, then dnsmasq is managing this file.
if this file contains 127.0.0.53, then systemd-resolved is managing this file.
if you wish to add specific DNS servers, use the GUI for "Wired Connection", or your wireless connection profile.