You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
resolved.conf: Clarifications for DNS= necessary #13925
A space-separated list of IPv4 and IPv6 addresses to use as system DNS servers. DNS requests are sent to one of the listed DNS servers in parallel to suitable per-link DNS servers acquired from systemd-networkd.service(8) or set at runtime by external applications. For compatibility reasons, if this setting is not specified, the DNS servers listed in /etc/resolv.conf are used instead, if that file exists and any servers are configured in it. This setting defaults to the empty list.
I want to serve an unregistered domain, that is offered by a private DNS server. I add this server in DNS= and this server does not return answers for any other domains, except the unregistered domain.
From the documentatiton the behaviour of systemd-resolved is unclear, how it acts, when:
A query is made for a domain, that can be served by the per-link DNS servers, but not by the ones in the DNS= setting. Does the answer of resolved depend on the order, in which answers from the per-link DNS server and the DNS= server are received? So that depending on the order, resolved either finds or not finds a domain.
Likewise, what happens, when asking for a domain, that can be served by the DNS= servers, but not by the per-link DNS= servers
As far as I am concerned, I do not know. I raised this back in November, when I had a DNS-server for non-existing domain. Today I do not have this anymore. As far as I remember, adding the dns-server for the non-existent domain to DNS= has not helped.
Related question: what if per-link DNS returns a different result than the DNS= setting? For example if using a VPN that returns internal ip addresses for some domains while the default dns server returns public ips.
@monperrus as I understand it, this question is about per-interface DNS servers, and resolved will make requests to multiple per-interface DNS servers and the default dns server in parallel.
A query is made for a domain, that can be served by the per-link DNS servers, but not by the ones in the DNS= setting. Does the answer of resolved depend on the order, in which answers from the per-link DNS server and the DNS= server are received? So that depending on the order, resolved either finds or not finds a domain.
Likewise, what happens, when asking for a domain, that can be served by the DNS= servers, but not by the per-link DNS= servers
I think this should all be answered after 801d25e.
Related question: what if per-link DNS returns a different result than the DNS= setting? For example if using a VPN that returns internal ip addresses for some domains while the default dns server returns public ips.
In general, the domain to route the question to is decided first. Whatever the server that is assigned to that interface returns becomes the answer for the client. When multiple interfaces are queried in parallel, the first successful answer is returned.
Activity
monperrus commentedon Feb 5, 2020
What's the current behavior when multiple DNS servers are set?
dilyanpalauzov commentedon Feb 5, 2020
As far as I am concerned, I do not know. I raised this back in November, when I had a DNS-server for non-existing domain. Today I do not have this anymore. As far as I remember, adding the dns-server for the non-existent domain to DNS= has not helped.
tmccombs commentedon Feb 5, 2020
Related question: what if per-link DNS returns a different result than the DNS= setting? For example if using a VPN that returns internal ip addresses for some domains while the default dns server returns public ips.
dilyanpalauzov commentedon Feb 5, 2020
I do not know. As I said I had this in November, now I do not remember the details.
monperrus commentedon Feb 10, 2020
per @realpclaudio the behavior is
https://unix.stackexchange.com/questions/566341/how-are-dns-servers-selected-in-system-resolved/566402?noredirect=1#comment1053297_566402
tmccombs commentedon Feb 10, 2020
@monperrus as I understand it, this question is about per-interface DNS servers, and resolved will make requests to multiple per-interface DNS servers and the default dns server in parallel.
keszybz commentedon Oct 21, 2020
I think this should all be answered after 801d25e.
In general, the domain to route the question to is decided first. Whatever the server that is assigned to that interface returns becomes the answer for the client. When multiple interfaces are queried in parallel, the first successful answer is returned.