Skip to main content
correct dig result
Source Link

My DHCP server returns 3 DNS servers in this order

  • 10.10.0.100
  • 10.10.0.101
  • 10.0.0.1

I can dig all of them from my client (fedora 42, kde plasma):

➜  ~ dig @10.10.0.100 +short google.com 
172.217.208.138
...
➜  ~ dig @10.100.0.1001 +short google.com
17274.217125.20829.113102
...
➜  ~ dig @10.10.0.101 +short google.com
74.125.29.101

But systemd-resolved always takes 10.0.0.1 as the current DNS server

Link 3 (enp11s0)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 10.0.0.1
       DNS Servers: 10.10.0.100 10.10.0.101 10.0.0.1
     Default Route: yes

10.0.0.1 is the default route of my interface which is managed by NetworkManager.

➜  ~ ip a
3: enp11s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 3c:8c:f8:61:da:f3 brd ff:ff:ff:ff:ff:ff
    altname enx3c8cf861daf3
    inet 10.0.0.10/23 brd 10.0.1.255 scope global noprefixroute enp11s0
       valid_lft forever preferred_lft forever

How can I force systemd-resolved to follow my DHCP servers order?

My DHCP server returns 3 DNS servers in this order

  • 10.10.0.100
  • 10.10.0.101
  • 10.0.0.1

I can dig all of them from my client (fedora 42, kde plasma):

➜  ~ dig @10.10.0.100 +short google.com 
172.217.208.138
...
➜  ~ dig @10.10.0.100 +short google.com
172.217.208.113
...
➜  ~ dig @10.10.0.101 +short google.com
74.125.29.101

But systemd-resolved always takes 10.0.0.1 as the current DNS server

Link 3 (enp11s0)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 10.0.0.1
       DNS Servers: 10.10.0.100 10.10.0.101 10.0.0.1
     Default Route: yes

10.0.0.1 is the default route of my interface which is managed by NetworkManager.

➜  ~ ip a
3: enp11s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 3c:8c:f8:61:da:f3 brd ff:ff:ff:ff:ff:ff
    altname enx3c8cf861daf3
    inet 10.0.0.10/23 brd 10.0.1.255 scope global noprefixroute enp11s0
       valid_lft forever preferred_lft forever

How can I force systemd-resolved to follow my DHCP servers order?

My DHCP server returns 3 DNS servers in this order

  • 10.10.0.100
  • 10.10.0.101
  • 10.0.0.1

I can dig all of them from my client (fedora 42, kde plasma):

➜  ~ dig @10.10.0.100 +short google.com 
172.217.208.138
...
➜  ~ dig @10.0.0.1 +short google.com
74.125.29.102
...
➜  ~ dig @10.10.0.101 +short google.com
74.125.29.101

But systemd-resolved always takes 10.0.0.1 as the current DNS server

Link 3 (enp11s0)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 10.0.0.1
       DNS Servers: 10.10.0.100 10.10.0.101 10.0.0.1
     Default Route: yes

10.0.0.1 is the default route of my interface which is managed by NetworkManager.

➜  ~ ip a
3: enp11s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 3c:8c:f8:61:da:f3 brd ff:ff:ff:ff:ff:ff
    altname enx3c8cf861daf3
    inet 10.0.0.10/23 brd 10.0.1.255 scope global noprefixroute enp11s0
       valid_lft forever preferred_lft forever

How can I force systemd-resolved to follow my DHCP servers order?

Source Link

Why does systemd-resolved fallback to last DNS-Server in the list

My DHCP server returns 3 DNS servers in this order

  • 10.10.0.100
  • 10.10.0.101
  • 10.0.0.1

I can dig all of them from my client (fedora 42, kde plasma):

➜  ~ dig @10.10.0.100 +short google.com 
172.217.208.138
...
➜  ~ dig @10.10.0.100 +short google.com
172.217.208.113
...
➜  ~ dig @10.10.0.101 +short google.com
74.125.29.101

But systemd-resolved always takes 10.0.0.1 as the current DNS server

Link 3 (enp11s0)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 10.0.0.1
       DNS Servers: 10.10.0.100 10.10.0.101 10.0.0.1
     Default Route: yes

10.0.0.1 is the default route of my interface which is managed by NetworkManager.

➜  ~ ip a
3: enp11s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 3c:8c:f8:61:da:f3 brd ff:ff:ff:ff:ff:ff
    altname enx3c8cf861daf3
    inet 10.0.0.10/23 brd 10.0.1.255 scope global noprefixroute enp11s0
       valid_lft forever preferred_lft forever

How can I force systemd-resolved to follow my DHCP servers order?