Skip to content

resolved.conf: Clarifications for DNS= necessary #13925

Closed

Description

@dilyanpalauzov

The documentation of resolved.conf states:

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

Activity

  1. monperrus commented on Feb 5, 2020

    @monperrus

    What's the current behavior when multiple DNS servers are set?

  2. dilyanpalauzov commented on Feb 5, 2020

    @dilyanpalauzov
    ContributorAuthor

    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.

  3. tmccombs commented on Feb 5, 2020

    @tmccombs
    Contributor

    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.

  4. dilyanpalauzov commented on Feb 5, 2020

    @dilyanpalauzov
    ContributorAuthor

    I do not know. As I said I had this in November, now I do not remember the details.

  5. tmccombs commented on Feb 10, 2020

    @tmccombs
    Contributor

    @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.

  6. keszybz commented on Oct 21, 2020

    @keszybz
    Member
    • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions