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
Longlived TCP connections to upstream resolvers #7617
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.
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.
Activity
poettering commentedon Dec 13, 2017
I figure this is a necessary step for #5671 anyway…
ott commentedon Jan 23, 2018
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:
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.
poettering commentedon May 3, 2018
Implementation pending in #8849
yuwata commentedon Jun 21, 2018
#8849 is merged. Let's close this.