Skip to content

Longlived TCP connections to upstream resolvers #7617

Closed

Description

@ott

Submission type

Request for enhancement (RFE)

systemd version the issue has been seen with

master

Description

When DNSSEC is deployed more widely, DNS responses will become larger. In theory IPv4 and IPv6 are able to fragment packets that exceed the path MTU but in practice fragmented packets are often dropped or cause problems with anycast. RFC 7690 discusses this in more detail. Recent research by Geoff Houston at APNIC also confirms drop rates of over 30 % for IPv6 fragments. There has been an effort in the IETF to deprecate IPv6 fragmentation. And even if you assume that fragmentation works, EDNS0 UDP payload sizes are often limited to 4096 octets. If you want to send the entire DNSSEC validation path for query like in RFC 7901, this is not large enough. And as mentioned #5671, there are efforts to use TLS for DNS. So I think systemd-resolved must be able to efficiently handle DNS queries over TCP.

RFC 7766 specifies implementation requirements for resolvers that use TCP. I didn't check it in detail but I think systemd-resolved already meets some of the requirements. systemd-resolved is a stub resolver and communicates with only a few upstream resolvers per interface, so it seems that it would make sense to implement RFC 7828.

Activity

  1. added
    RFE 🎁
    on Dec 13, 2017
  2. poettering commented on Dec 13, 2017

    @poettering
    Member

    I figure this is a necessary step for #5671 anyway…

  3. ott commented on Jan 23, 2018

    @ott
    ContributorAuthor

    I did some measurements on RIPE Atlas. From over 10,000 RIPE Atlas probes worldwide I randomly selected 100 RIPE Atlas probes which have a working IPv4 and IPv6 connectivity and are able to resolve A RRs correctly. I measured whether the probes are able to resolve www.freedesktop.org over TCP and UDP with their local resolver, 8.8.8.8 and 2001:4860:4860::8888:

    The results are summarized in the following table:

    Resolver Protocol Probes NOERROR REFUSED Other Error
    Local TCP 99 41 (41 %) 1 (1 %) 57 (58 %)
    Local UDP 99 86 (87 %) 1 (1 %) 12 (12 %)
    8.8.8.8 TCP 99 98 (99 %) 0 (0 %) 1 (1 %)
    8.8.8.8 UDP 99 98 (99 %) 0 (0 %) 1 (1 %)
    2001:4860:4860::8888 TCP 99 97 (98 %) 0 (0 %) 2 (2 %)
    2001:4860:4860::8888 UDP 99 96 (97 %) 0 (0 %) 3 (2 %)

    The raw data is public, so perhaps someone can analyze the other errors in more depth.

    My conclusion is that 51 % of (working) local resolvers do not support TCP. It should be added that RIPE Atlas probes are often hosted by RIPE members or people that have a better understanding of the Internet and its protocols than the average. So I does not seem wrong to assume that the actual situation is even worse. What surprised me though is that DNS almost all queries to Google Public succeeded. I expected that most DNS traffic would be filtered by a firewall at the perimeter of the network.

    I think this means for systemd-resolved that UDP is often the only supported protocol. systemd-resolved must not rely on TCP and should also have a good UDP query and retry algorithm.

  4. poettering commented on May 3, 2018

    @poettering
    Member

    Implementation pending in #8849

  5. yuwata commented on Jun 21, 2018

    @yuwata
    Member

    #8849 is merged. Let's close this.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁resolve

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions