Glam Prestige Journal

Bright entertainment trends with youth appeal.

No matter what I try, eth0 never budges from the DHCP DNS settings.

This is the result I get from sudo resolvectl status --no-pager

Global LLMNR setting: no
MulticastDNS setting: no DNSOverTLS setting: yes DNSSEC setting: yes DNSSEC supported: yes Current DNS Server: 1.1.1.1 DNS Servers: 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001 DNS Domain: ~.
Link 2 (eth0) Current Scopes: DNS
DefaultRoute setting: yes LLMNR setting: yes
MulticastDNS setting: no DNSOverTLS setting: yes DNSSEC setting: yes DNSSEC supported: yes Current DNS Server: 192.168.4.1 DNS Servers: 192.168.4.1
Link 3 (wlan0) Current Scopes: none
DefaultRoute setting: no LLMNR setting: yes
MulticastDNS setting: no DNSOverTLS setting: yes DNSSEC setting: yes DNSSEC supported: yes
Link 4 (docker0) Current Scopes: none
DefaultRoute setting: no LLMNR setting: yes
MulticastDNS setting: no DNSOverTLS setting: yes DNSSEC setting: yes DNSSEC supported: yes 

Note that eth0 is using 192.168.4.1.

I have tried adding:

[Network]
UseDNS=false
[DHCP]
UseDNS=false
[DHCPv4]
UseDNS=false
[DHCPv6]
UseDNS=false
[IPv6AcceptRA]
UseDNS=false

To /etc/systemd/network/eth0.network, /etc/systemd/networkd.conf, /etc/systemd/resolved.conf

I have tried any which combination of the following:

  • sudo resolvectl reset-server-features
  • sudo resolvectl revert eth0
  • sudo systemd-resolve --set-dns=1.1.1.1 --interface=eth0
  • sudo resolvectl dns eth0 1.1.1.1
  • sudo systemctl daemon-reload
  • sudo systemctl restart systemd-networkd
  • sudo systemctl restart systemd-resolved
  • sudo resolvectl flush-caches --no-pager
  • sudo resolvectl status --no-pager
  • sudo systemd-resolve --statistics

Here is the current cat /etc/systemd/resolved.conf

# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details
[DHCP]
UseDNS=false
[DHCPv4]
UseDNS=false
[DHCPv6]
UseDNS=false
[Resolve]
#DNS=
#FallbackDNS=
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=no
#LLMNR=no
#Cache=no-negative
#DNSStubListener=yes
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no
DNS=1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
DNSSEC=true
DNSOverTLS=true

What am I missing, I've gone through hundreds of tabs and internet searches, and I can't figure it out.

System is Ubuntu 20.10 (GNU/Linux 5.8.0-1029-raspi aarch64

1 Answer

Seems doing sudo systemctl restart systemd-networkd resets the DNS configuration that can be applied via sudo resolvectl dns eth0 1.1.1.1.

As such, the restarts should be done after configuration FILE changes, and flushes and status checks should be done after API changes.

That said, the best I can get is the following:

Link 2 (eth0) Current Scopes: DNS
DefaultRoute setting: no LLMNR setting: no
MulticastDNS setting: no DNSOverTLS setting: yes DNSSEC setting: yes DNSSEC supported: yes Current DNS Server: 192.168.4.1 DNS Servers: 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001 192.168.4.1 DNS Domain: ~. 

Which still has the Current DNS Server as the DHCP DNS server.


Was able to get eth0 to update by doing:

sleep 1
sudo ifdown "$interface"
sleep 1
sudo ifup "$interface"
sleep 1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy