"No DNS servers known" in /run/systemd/resolve/resolv.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
systemd:
Installed: 245.4-4ubuntu3.13
Candidate: 245.4-4ubuntu3.13
3) What you expected to happen
/etc/network/
auto lo
iface lo inet loopback
dns-nameservers 1.1.1.1 8.8.8.8
auto eth0
iface eth0 inet static
address ip/24
mtu 1500
post-up route add default gw gw_ip || true
pre-down route del default gw gw_ip || true
When system rebooted I expected in
/run/resolvconf
nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 127.0.0.53
and in /run/systemd/
nameserver 1.1.1.1
nameserver 8.8.8.8
This is stated in "man 8 systemd-resolved":
systemd-resolved maintains the /run/systemd/
4) What happened instead
/run/systemd/
# No DNS servers known.
But after restarting systemd-resolved it update this file correctly.
5) Also
The system behaves correctly when DHCP is used. So when in /etc/network/
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
Then /run/systemd/