draft-ietf-dnsop-5966bis-06.txt   rfc7766.txt 
dnsop J. Dickinson Internet Engineering Task Force (IETF) J. Dickinson
Internet-Draft S. Dickinson Request for Comments: 7766 S. Dickinson
Obsoletes: 5966 (if approved) Sinodun Obsoletes: 5966 Sinodun
Updates: 1035,1123 (if approved) R. Bellis Updates: 1035, 1123 R. Bellis
Intended status: Standards Track ISC Category: Standards Track ISC
Expires: July 18, 2016 A. Mankin ISSN: 2070-1721 A. Mankin
D. Wessels D. Wessels
Verisign Labs Verisign Labs
January 15, 2016 March 2016
DNS Transport over TCP - Implementation Requirements DNS Transport over TCP - Implementation Requirements
draft-ietf-dnsop-5966bis-06
Abstract Abstract
This document specifies the requirement for support of TCP as a This document specifies the requirement for support of TCP as a
transport protocol for DNS implementations and provides guidelines transport protocol for DNS implementations and provides guidelines
towards DNS-over-TCP performance on par with that of DNS-over-UDP. towards DNS-over-TCP performance on par with that of DNS-over-UDP.
This document obsoletes RFC5966 and therefore updates RFC1035 and This document obsoletes RFC 5966 and therefore updates RFC 1035 and
RFC1123. RFC 1123.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This is an Internet Standards Track document.
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on July 18, 2016. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc7766.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 18 skipping to change at page 2, line 28
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Requirements Terminology . . . . . . . . . . . . . . . . . . 4 2. Requirements Terminology . . . . . . . . . . . . . . . . . . 4
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
4. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 4 4. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 4
5. Transport Protocol Selection . . . . . . . . . . . . . . . . 5 5. Transport Protocol Selection . . . . . . . . . . . . . . . . 5
6. Connection Handling . . . . . . . . . . . . . . . . . . . . . 6 6. Connection Handling . . . . . . . . . . . . . . . . . . . . . 6
6.1. Current practices . . . . . . . . . . . . . . . . . . . . 6 6.1. Current Practices . . . . . . . . . . . . . . . . . . . . 6
6.1.1. Clients . . . . . . . . . . . . . . . . . . . . . . . 7 6.1.1. Clients . . . . . . . . . . . . . . . . . . . . . . . 7
6.1.2. Servers . . . . . . . . . . . . . . . . . . . . . . . 7 6.1.2. Servers . . . . . . . . . . . . . . . . . . . . . . . 7
6.2. Recommendations . . . . . . . . . . . . . . . . . . . . . 7 6.2. Recommendations . . . . . . . . . . . . . . . . . . . . . 8
6.2.1. Connection Re-use . . . . . . . . . . . . . . . . . . 8 6.2.1. Connection Reuse . . . . . . . . . . . . . . . . . . 8
6.2.1.1. Query Pipelining . . . . . . . . . . . . . . . . 8 6.2.1.1. Query Pipelining . . . . . . . . . . . . . . . . 8
6.2.2. Concurrent connections . . . . . . . . . . . . . . . 8 6.2.2. Concurrent Connections . . . . . . . . . . . . . . . 9
6.2.3. Idle Timeouts . . . . . . . . . . . . . . . . . . . . 9 6.2.3. Idle Timeouts . . . . . . . . . . . . . . . . . . . . 9
6.2.4. Tear Down . . . . . . . . . . . . . . . . . . . . . . 9 6.2.4. Teardown . . . . . . . . . . . . . . . . . . . . . . 10
7. Response Reordering . . . . . . . . . . . . . . . . . . . . . 10 7. Response Reordering . . . . . . . . . . . . . . . . . . . . . 10
8. TCP Message Length Field . . . . . . . . . . . . . . . . . . 10 8. TCP Message Length Field . . . . . . . . . . . . . . . . . . 11
9. TCP Fast Open . . . . . . . . . . . . . . . . . . . . . . . . 11 9. TCP Fast Open . . . . . . . . . . . . . . . . . . . . . . . . 11
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 10. Security Considerations . . . . . . . . . . . . . . . . . . . 12
11. Security Considerations . . . . . . . . . . . . . . . . . . . 12 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 13
12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13 11.1. Normative References . . . . . . . . . . . . . . . . . . 13
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 11.2. Informative References . . . . . . . . . . . . . . . . . 14
13.1. Normative References . . . . . . . . . . . . . . . . . . 13 Appendix A. Summary of Advantages and Disadvantages to Using TCP
13.2. Informative References . . . . . . . . . . . . . . . . . 14 for DNS . . . . . . . . . . . . . . . . . . . . . . 16
Appendix A. Summary of Advantages and Disadvantages to using TCP Appendix B. Changes to RFC 5966 . . . . . . . . . . . . . . . . 16
for DNS . . . . . . . . . . . . . . . . . . . . . . 15 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 17
Appendix B. Changes between revisions . . . . . . . . . . . . . 16 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18
B.1. Changes -05 to -06 . . . . . . . . . . . . . . . . . . . 16
B.2. Changes -04 to -05 . . . . . . . . . . . . . . . . . . . 17
B.3. Changes -03 to -04 . . . . . . . . . . . . . . . . . . . 17
B.4. Changes -02 to -03 . . . . . . . . . . . . . . . . . . . 18
B.5. Changes -01 to -02 . . . . . . . . . . . . . . . . . . . 18
B.6. Changes -00 to -01 . . . . . . . . . . . . . . . . . . . 19
Appendix C. Changes to RFC5966 . . . . . . . . . . . . . . . . . 19
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 20
1. Introduction 1. Introduction
Most DNS [RFC1034] transactions take place over UDP [RFC0768]. TCP Most DNS [RFC1034] transactions take place over UDP [RFC768]. TCP
[RFC0793] is always used for full zone transfers (AXFR) and is often [RFC793] is always used for full zone transfers (using AXFR) and is
used for messages whose sizes exceed the DNS protocol's original often used for messages whose sizes exceed the DNS protocol's
512-byte limit. The growing deployment of DNSSEC and IPv6 has original 512-byte limit. The growing deployment of DNS Security
increased response sizes and therefore the use of TCP. The need for (DNSSEC) and IPv6 has increased response sizes and therefore the use
increased TCP use has also been driven by the protection it provides of TCP. The need for increased TCP use has also been driven by the
against address spoofing and therefore exploitation of DNS in protection it provides against address spoofing and therefore
reflection/amplification attacks. It is now widely used in Response exploitation of DNS in reflection/amplification attacks. It is now
Rate Limiting [RRL1][RRL2]. Additionally, recent work on DNS privacy widely used in Response Rate Limiting [RRL1] [RRL2]. Additionally,
solutions such as [DNS-over-TLS] is another motivation to re-visit recent work on DNS privacy solutions such as [DNS-over-TLS] is
DNS-over-TCP requirements. another motivation to revisit DNS-over-TCP requirements.
Section 6.1.3.2 of [RFC1123] states: Section 6.1.3.2 of [RFC1123] states:
DNS resolvers and recursive servers MUST support UDP, and SHOULD DNS resolvers and recursive servers MUST support UDP, and SHOULD
support TCP, for sending (non-zone-transfer) queries. support TCP, for sending (non-zone-transfer) queries.
However, some implementors have taken the text quoted above to mean However, some implementors have taken the text quoted above to mean
that TCP support is an optional feature of the DNS protocol. that TCP support is an optional feature of the DNS protocol.
The majority of DNS server operators already support TCP and the The majority of DNS server operators already support TCP, and the
default configuration for most software implementations is to support default configuration for most software implementations is to support
TCP. The primary audience for this document is those implementors TCP. The primary audience for this document is those implementors
whose limited support for TCP restricts interoperability and hinders whose limited support for TCP restricts interoperability and hinders
deployment of new DNS features. deployment of new DNS features.
This document therefore updates the core DNS protocol specifications This document therefore updates the core DNS protocol specifications
such that support for TCP is henceforth a REQUIRED part of a full DNS such that support for TCP is henceforth a REQUIRED part of a full DNS
protocol implementation. protocol implementation.
There are several advantages and disadvantages to the increased use There are several advantages and disadvantages to the increased use
of TCP (see Appendix A) as well as implementation details that need of TCP (see Appendix A) as well as implementation details that need
to be considered. This document addresses these issues and presents to be considered. This document addresses these issues and presents
TCP as a valid transport alternative for DNS. It extends the content TCP as a valid transport alternative for DNS. It extends the content
of [RFC5966], with additional considerations and lessons learned from of [RFC5966], with additional considerations and lessons learned from
research, developments and implementation of TCP in DNS and in other research, developments, and implementation of TCP in DNS and in other
internet protocols. Internet protocols.
Whilst this document makes no specific requirements for operators of Whilst this document makes no specific requirements for operators of
DNS servers to meet, it does offer some suggestions to operators to DNS servers to meet, it does offer some suggestions to operators to
help ensure that support for TCP on their servers and network is help ensure that support for TCP on their servers and network is
optimal. It should be noted that failure to support TCP (or the optimal. It should be noted that failure to support TCP (or the
blocking of DNS over TCP at the network layer) will probably result blocking of DNS over TCP at the network layer) will probably result
in resolution failure and/or application-level timeouts. in resolution failure and/or application-level timeouts.
2. Requirements Terminology 2. Requirements Terminology
skipping to change at page 4, line 20 skipping to change at page 4, line 20
3. Terminology 3. Terminology
o Persistent connection: a TCP connection that is not closed either o Persistent connection: a TCP connection that is not closed either
by the server after sending the first response nor by the client by the server after sending the first response nor by the client
after receiving the first response. after receiving the first response.
o Connection Reuse: the sending of multiple queries and responses o Connection Reuse: the sending of multiple queries and responses
over a single TCP connection. over a single TCP connection.
o Idle DNS-over-TCP session: Clients and servers view application o Idle DNS-over-TCP session: Clients and servers view application-
level idleness differently. A DNS client considers an established level idleness differently. A DNS client considers an established
DNS-over-TCP session to be idle when it has no pending queries to DNS-over-TCP session to be idle when it has no pending queries to
send and there are no outstanding responses. A DNS server send and there are no outstanding responses. A DNS server
considers an established DNS-over-TCP session to be idle when it considers an established DNS-over-TCP session to be idle when it
has sent responses to all the queries it has received on that has sent responses to all the queries it has received on that
connection. connection.
o Pipelining: the sending of multiple queries and responses over a o Pipelining: the sending of multiple queries and responses over a
single TCP connection but not waiting for any outstanding replies single TCP connection but not waiting for any outstanding replies
before sending another query. before sending another query.
o Out-Of-Order Processing: The processing of queries concurrently o Out-of-Order Processing: The processing of queries concurrently
and the returning of individual responses as soon as they are and the returning of individual responses as soon as they are
available, possibly out-of-order. This will most likely occur in available, possibly out of order. This will most likely occur in
recursive servers, however it is possible in authoritative servers recursive servers; however, it is possible in authoritative
that, for example, have different backend data stores. servers that, for example, have different backend data stores.
4. Discussion 4. Discussion
In the absence of EDNS0 (Extension Mechanisms for DNS 0 [RFC6891]) In the absence of EDNS0 (Extension Mechanisms for DNS 0 [RFC6891];
(see below), the normal behaviour of any DNS server needing to send a see below), the normal behaviour of any DNS server that needs to send
UDP response that would exceed the 512-byte limit is for the server a UDP response that would exceed the 512-byte limit is for the server
to truncate the response so that it fits within that limit and then to truncate the response so that it fits within that limit and then
set the TC flag in the response header. When the client receives set the TC flag in the response header. When the client receives
such a response, it takes the TC flag as an indication that it should such a response, it takes the TC flag as an indication that it should
retry over TCP instead. retry over TCP instead.
RFC 1123 also says: RFC 1123 also says:
... it is also clear that some new DNS record types defined in the ... it is also clear that some new DNS record types defined in the
future will contain information exceeding the 512 byte limit that future will contain information exceeding the 512 byte limit that
applies to UDP, and hence will require TCP. Thus, resolvers and applies to UDP, and hence will require TCP. Thus, resolvers and
name servers should implement TCP services as a backup to UDP name servers should implement TCP services as a backup to UDP
today, with the knowledge that they will require the TCP service today, with the knowledge that they will require the TCP service
in the future. in the future.
Existing deployments of DNS Security (DNSSEC) [RFC4033] have shown Existing deployments of DNSSEC [RFC4033] have shown that truncation
that truncation at the 512-byte boundary is now commonplace. For at the 512-byte boundary is now commonplace. For example, a Non-
example, a Non-Existent Domain (NXDOMAIN) (RCODE == 3) response from Existent Domain (NXDOMAIN) (RCODE == 3) response from a DNSSEC-signed
a DNSSEC-signed zone using NextSECure 3 (NSEC3) [RFC5155] is almost zone using NextSECure 3 (NSEC3) [RFC5155] is almost invariably larger
invariably larger than 512 bytes. than 512 bytes.
Since the original core specifications for DNS were written, the Since the original core specifications for DNS were written, the
Extension Mechanisms for DNS have been introduced. These extensions extension mechanisms for DNS have been introduced. These extensions
can be used to indicate that the client is prepared to receive UDP can be used to indicate that the client is prepared to receive UDP
responses larger than 512 bytes. An EDNS0-compatible server responses larger than 512 bytes. An EDNS0-compatible server
receiving a request from an EDNS0-compatible client may send UDP receiving a request from an EDNS0-compatible client may send UDP
packets up to that client's announced buffer size without truncation. packets up to that client's announced buffer size without truncation.
However, transport of UDP packets that exceed the size of the path However, transport of UDP packets that exceed the size of the path
MTU causes IP packet fragmentation, which has been found to be MTU causes IP packet fragmentation, which has been found to be
unreliable in many circumstances. Many firewalls routinely block unreliable in many circumstances. Many firewalls routinely block
fragmented IP packets, and some do not implement the algorithms fragmented IP packets, and some do not implement the algorithms
necessary to reassemble fragmented packets. Worse still, some necessary to reassemble fragmented packets. Worse still, some
skipping to change at page 6, line 20 skipping to change at page 6, line 24
Regarding the choice of when to use UDP or TCP, Section 6.1.3.2 of Regarding the choice of when to use UDP or TCP, Section 6.1.3.2 of
RFC 1123 also says: RFC 1123 also says:
... a DNS resolver or server that is sending a non-zone-transfer ... a DNS resolver or server that is sending a non-zone-transfer
query MUST send a UDP query first. query MUST send a UDP query first.
This requirement is hereby relaxed. Stub resolvers and recursive This requirement is hereby relaxed. Stub resolvers and recursive
resolvers MAY elect to send either TCP or UDP queries depending on resolvers MAY elect to send either TCP or UDP queries depending on
local operational reasons. TCP MAY be used before sending any UDP local operational reasons. TCP MAY be used before sending any UDP
queries. If the resolver already has an open TCP connection to the queries. If the resolver already has an open TCP connection to the
server it SHOULD reuse this connection. In essence, TCP ought to be server, it SHOULD reuse this connection. In essence, TCP ought to be
considered a valid alternative transport to UDP, not purely a retry considered a valid alternative transport to UDP, not purely a retry
option. option.
In addition it is noted that all Recursive and Authoritative servers In addition, it is noted that all recursive and authoritative servers
MUST send responses using the same transport as the query arrived on. MUST send responses using the same transport as the query arrived on.
In the case of TCP this MUST also be the same connection. In the case of TCP, this MUST also be the same connection.
6. Connection Handling 6. Connection Handling
6.1. Current practices 6.1. Current Practices
Section 4.2.2 of [RFC1035] says: Section 4.2.2 of [RFC1035] says:
o The server should assume that the client will initiate connection - The server should assume that the client will initiate connection
closing, and should delay closing its end of the connection until closing, and should delay closing its end of the connection until
all outstanding client requests have been satisfied. all outstanding client requests have been satisfied.
o If the server needs to close a dormant connection to reclaim - If the server needs to close a dormant connection to reclaim
resources, it should wait until the connection has been idle for a resources, it should wait until the connection has been idle for a
period on the order of two minutes. In particular, the server period on the order of two minutes. In particular, the server
should allow the SOA and AXFR request sequence (which begins a should allow the SOA and AXFR request sequence (which begins a
refresh operation) to be made on a single connection. Since the refresh operation) to be made on a single connection. Since the
server would be unable to answer queries anyway, a unilateral server would be unable to answer queries anyway, a unilateral
close or reset may be used instead of graceful close. close or reset may be used instead of graceful close.
Other more modern protocols (e.g., HTTP/1.1 [RFC7230], HTTP/2 Other more modern protocols (e.g., HTTP/1.1 [RFC7230], HTTP/2
[RFC7540]) have support by default for persistent TCP connections for [RFC7540]) have support by default for persistent TCP connections for
all requests. Connections are then normally closed via a 'connection all requests. Connections are then normally closed via a 'connection
skipping to change at page 7, line 25 skipping to change at page 7, line 30
should close a TCP connection, and there are no specific should close a TCP connection, and there are no specific
recommendations with regard to DNS client idle timeouts. However, at recommendations with regard to DNS client idle timeouts. However, at
the time of writing, it is common practice for clients to close the the time of writing, it is common practice for clients to close the
TCP connection after sending a single request (apart from the SOA/ TCP connection after sending a single request (apart from the SOA/
AXFR case). AXFR case).
6.1.2. Servers 6.1.2. Servers
Many DNS server implementations use a long fixed idle timeout and Many DNS server implementations use a long fixed idle timeout and
default to a small number of TCP connections. They also offer little default to a small number of TCP connections. They also offer little
by the way of TCP connection management options. The disadvantages in the way of TCP connection management options. The disadvantages
of this include: of this include:
o Operational experience has shown that long server timeouts can o Operational experience has shown that long server timeouts can
easily cause resource exhaustion and poor response under heavy easily cause resource exhaustion and poor response under heavy
load. load.
o Intentionally opening many connections and leaving them idle can o Intentionally opening many connections and leaving them idle can
trivially create a TCP "denial-of-service" attack as many DNS trivially create a TCP denial of service (DoS) attack as many DNS
servers are poorly equipped to defend against this by modifying servers are poorly equipped to defend against this by modifying
their idle timeouts or other connection management policies. their idle timeouts or other connection management policies.
o A modest number of clients that all concurrently attempt to use o A modest number of clients that all concurrently attempt to use
persistent connections with non-zero idle timeouts to such a persistent connections with non-zero idle timeouts to such a
server could unintentionally cause the same "denial-of-service" server could unintentionally cause the same DoS problem.
problem.
Note that this denial-of-service is only on the TCP service. Note that this DoS is only on the TCP service. However, in these
However, in these cases it affects not only clients wishing to use cases, it affects not only clients that wish to use TCP for their
TCP for their queries for operational reasons, but all clients who queries for operational reasons, but all clients that choose to fall
choose to fall back to TCP from UDP after receiving a TC=1 flag. back to TCP from UDP after receiving a TC=1 flag.
6.2. Recommendations 6.2. Recommendations
The following sections include recommendations that are intended to The following sections include recommendations that are intended to
result in more consistent and scalable implementations of DNS-over- result in more consistent and scalable implementations of DNS-over-
TCP. TCP.
6.2.1. Connection Re-use 6.2.1. Connection Reuse
One perceived disadvantage to DNS over TCP is the added connection One perceived disadvantage to DNS over TCP is the added connection
setup latency, generally equal to one RTT. To amortize connection setup latency, generally equal to one RTT. To amortise connection
setup costs, both clients and servers SHOULD support connection reuse setup costs, both clients and servers SHOULD support connection reuse
by sending multiple queries and responses over a single persistent by sending multiple queries and responses over a single persistent
TCP connection. TCP connection.
When sending multiple queries over a TCP connection clients MUST NOT When sending multiple queries over a TCP connection, clients MUST NOT
re-use the DNS Message ID of an in-flight query on that connection in reuse the DNS Message ID of an in-flight query on that connection in
order to avoid Message ID collisions. This is especially important order to avoid Message ID collisions. This is especially important
if the server could be performing out-of-order processing (see if the server could be performing out-of-order processing (see
Section 7). Section 7).
6.2.1.1. Query Pipelining 6.2.1.1. Query Pipelining
Due to the historical use of TCP primarily for zone transfer and Due to the historical use of TCP primarily for zone transfer and
truncated responses, no existing RFC discusses the idea of pipelining truncated responses, no existing RFC discusses the idea of pipelining
DNS queries over a TCP connection. DNS queries over a TCP connection.
In order to achieve performance on par with UDP DNS clients SHOULD In order to achieve performance on par with UDP, DNS clients SHOULD
pipeline their queries. When a DNS client sends multiple queries to pipeline their queries. When a DNS client sends multiple queries to
a server, it SHOULD NOT wait for an outstanding reply before sending a server, it SHOULD NOT wait for an outstanding reply before sending
the next query. Clients SHOULD treat TCP and UDP equivalently when the next query. Clients SHOULD treat TCP and UDP equivalently when
considering the time at which to send a particular query. considering the time at which to send a particular query.
It is likely that DNS servers need to process pipelined queries It is likely that DNS servers need to process pipelined queries
concurrently and also send out-of-order responses over TCP in order concurrently and also send out-of-order responses over TCP in order
to provide the level of performance possible with UDP transport. If to provide the level of performance possible with UDP transport. If
TCP performance is of importance, clients might find it useful to use TCP performance is of importance, clients might find it useful to use
server processing times as input to server and transport selection server processing times as input to server and transport selection
algorithms. algorithms.
DNS servers (especially recursive) MUST expect to receive pipelined DNS servers (especially recursive) MUST expect to receive pipelined
queries. The server SHOULD process TCP queries concurrently, just as queries. The server SHOULD process TCP queries concurrently, just as
it would for UDP. The server SHOULD answer all pipelined queries, it would for UDP. The server SHOULD answer all pipelined queries,
even if they are received in quick succession. The handling of even if they are received in quick succession. The handling of
responses to pipelined queries is covered in Section 7. responses to pipelined queries is covered in Section 7.
6.2.2. Concurrent connections 6.2.2. Concurrent Connections
To mitigate the risk of unintentional server overload, DNS clients To mitigate the risk of unintentional server overload, DNS clients
MUST take care to minimize the number of concurrent TCP connections MUST take care to minimize the number of concurrent TCP connections
made to any individual server. It is RECOMMENDED that for any given made to any individual server. It is RECOMMENDED that for any given
client/server interaction there SHOULD be no more than one connection client/server interaction there SHOULD be no more than one connection
for regular queries, one for zone transfers and one for each protocol for regular queries, one for zone transfers, and one for each
that is being used on top of TCP, for example, if the resolver was protocol that is being used on top of TCP (for example, if the
using TLS. It is however noted that certain primary/secondary resolver was using TLS). However, it is noted that certain primary/
configurations with many busy zones might need to use more than one secondary configurations with many busy zones might need to use more
TCP connection for zone transfers for operational reasons (for than one TCP connection for zone transfers for operational reasons
example, to support concurrent transfers of multiple zones). (for example, to support concurrent transfers of multiple zones).
Similarly, servers MAY impose limits on the number of concurrent TCP Similarly, servers MAY impose limits on the number of concurrent TCP
connections being handled for any particular client IP address or connections being handled for any particular client IP address or
subnet. These limits SHOULD be much looser than the client subnet. These limits SHOULD be much looser than the client
guidelines above, because the server does not know, for example, if a guidelines above, because the server does not know, for example, if a
client IP address belongs to a single client or is multiple resolvers client IP address belongs to a single client, is multiple resolvers
on a single machine, or multiple clients behind a device performing on a single machine, or is multiple clients behind a device
Network Address Translation (NAT). performing Network Address Translation (NAT).
6.2.3. Idle Timeouts 6.2.3. Idle Timeouts
To mitigate the risk of unintentional server overload, DNS clients To mitigate the risk of unintentional server overload, DNS clients
MUST take care to minimize the idle time of established DNS-over-TCP MUST take care to minimise the idle time of established DNS-over-TCP
sessions made to any individual server. DNS clients SHOULD close the sessions made to any individual server. DNS clients SHOULD close the
TCP connection of an idle session, unless an idle timeout has been TCP connection of an idle session, unless an idle timeout has been
established using some other signalling mechanism, for example, established using some other signalling mechanism, for example,
[edns-tcp-keepalive]. [edns-tcp-keepalive].
To mitigate the risk of unintentional server overload it is To mitigate the risk of unintentional server overload, it is
RECOMMENDED that the default server application-level idle period be RECOMMENDED that the default server application-level idle period be
of the order of seconds, but no particular value is specified. In on the order of seconds, but no particular value is specified. In
practice, the idle period can vary dynamically, and servers MAY allow practice, the idle period can vary dynamically, and servers MAY allow
idle connections to remain open for longer periods as resources idle connections to remain open for longer periods as resources
permit. A timeout of at least a few seconds is advisable for normal permit. A timeout of at least a few seconds is advisable for normal
operations to support those clients that expect the SOA and AXFR operations to support those clients that expect the SOA and AXFR
request sequence to be made on a single connection as originally request sequence to be made on a single connection as originally
specified in [RFC1035]. Servers MAY use zero timeouts when specified in [RFC1035]. Servers MAY use zero timeouts when they are
experiencing heavy load or are under attack. experiencing heavy load or are under attack.
DNS messages delivered over TCP might arrive in multiple segments. A DNS messages delivered over TCP might arrive in multiple segments. A
DNS server that resets its idle timeout after receiving a single DNS server that resets its idle timeout after receiving a single
segment might be vulnerable to a "slow read attack." For this segment might be vulnerable to a "slow-read attack". For this
reason, servers SHOULD reset the idle timeout on the receipt of a reason, servers SHOULD reset the idle timeout on the receipt of a
full DNS message, rather than on receipt of any part of a DNS full DNS message, rather than on receipt of any part of a DNS
message. message.
6.2.4. Tear Down 6.2.4. Teardown
Under normal operation DNS clients typically initiate connection Under normal operation DNS clients typically initiate connection
closing on idle connections, however DNS servers can close the closing on idle connections; however, DNS servers can close the
connection if their local idle timeout policy is exceeded. connection if the idle timeout set by local policy is exceeded.
Connections can be also closed by either end under unusual conditions Also, connections can be closed by either end under unusual
such as defending against an attack or system failure/reboot. conditions such as defending against an attack or system failure/
reboot.
DNS Clients SHOULD retry unanswered queries if the connection closes DNS clients SHOULD retry unanswered queries if the connection closes
before receiving all outstanding responses. No specific retry before receiving all outstanding responses. No specific retry
algorithm is specified in this document. algorithm is specified in this document.
If a DNS server finds that a DNS client has closed a TCP session, or If a DNS server finds that a DNS client has closed a TCP session (or
if the session has been otherwise interrupted, before all pending if the session has been otherwise interrupted) before all pending
responses have been sent then the server MUST NOT attempt to send responses have been sent, then the server MUST NOT attempt to send
those responses. Of course the DNS server MAY cache those responses. those responses. Of course, the DNS server MAY cache those
responses.
7. Response Reordering 7. Response Reordering
RFC 1035 is ambiguous on the question of whether TCP responses may be RFC 1035 is ambiguous on the question of whether TCP responses may be
reordered -- the only relevant text is in Section 4.2.1, which reordered -- the only relevant text is in Section 4.2.1, which
relates to UDP: relates to UDP:
Queries or their responses may be reordered by the network, or by Queries or their responses may be reordered by the network, or by
processing in name servers, so resolvers should not depend on them processing in name servers, so resolvers should not depend on them
being returned in order. being returned in order.
For the avoidance of future doubt, this requirement is clarified. For the avoidance of future doubt, this requirement is clarified.
Authoritative servers and recursive resolvers are RECOMMENDED to Authoritative servers and recursive resolvers are RECOMMENDED to
support the preparing of responses in parallel and sending them out- support the preparing of responses in parallel and sending them out
of-order, regardless of the transport protocol in use. Stub and of order, regardless of the transport protocol in use. Stub and
recursive resolvers MUST be able to process responses that arrive in recursive resolvers MUST be able to process responses that arrive in
a different order to that in which the requests were sent, regardless a different order than that in which the requests were sent,
of the transport protocol in use. regardless of the transport protocol in use.
In order to achieve performance on par with UDP, recursive resolvers In order to achieve performance on par with UDP, recursive resolvers
SHOULD process TCP queries in parallel and return individual SHOULD process TCP queries in parallel and return individual
responses as soon as they are available, possibly out-of-order. responses as soon as they are available, possibly out of order.
Since pipelined responses can arrive out-of-order, clients MUST match Since pipelined responses can arrive out of order, clients MUST match
responses to outstanding queries on the same TCP connection using the responses to outstanding queries on the same TCP connection using the
Message ID. If the response contains a question section the client Message ID. If the response contains a question section, the client
MUST match the QNAME, QCLASS and QTYPE fields. Failure by clients to MUST match the QNAME, QCLASS, and QTYPE fields. Failure by clients
properly match responses to outstanding queries can have serious to properly match responses to outstanding queries can have serious
consequences for interoperability. consequences for interoperability.
8. TCP Message Length Field 8. TCP Message Length Field
DNS clients and servers SHOULD pass the two-octet length field, and DNS clients and servers SHOULD pass the two-octet length field, and
the message described by that length field, to the TCP layer at the the message described by that length field, to the TCP layer at the
same time (e.g., in a single "write" system call) to make it more same time (e.g., in a single "write" system call) to make it more
likely that all the data will be transmitted in a single TCP segment. likely that all the data will be transmitted in a single TCP segment.
This is both for reasons of efficiency and to avoid problems due to This is for reasons of both efficiency and to avoid problems due to
some DNS server implementations behaving undesirably when reading some DNS server implementations behaving undesirably when reading
data from the TCP layer (due to a lack of clarity in previous data from the TCP layer (due to a lack of clarity in previous
standards). For example, some DNS server implementations might abort documents). For example, some DNS server implementations might abort
a TCP session if the first "read" from the TCP layer does not contain a TCP session if the first "read" from the TCP layer does not contain
both the length field and the entire message. both the length field and the entire message.
To clarify, DNS servers MUST NOT close a connection simply because To clarify, DNS servers MUST NOT close a connection simply because
the first "read" from the TCP layer does not contain the entire DNS the first "read" from the TCP layer does not contain the entire DNS
message, and servers SHOULD apply the connection timeouts as message, and servers SHOULD apply the connection timeouts as
specified in Section 6.2.3. specified in Section 6.2.3.
9. TCP Fast Open 9. TCP Fast Open
This section is non-normative. This section is non-normative.
TCP Fast Open [RFC7413] (TFO) allows data to be carried in the SYN TCP Fast Open (TFO) [RFC7413] allows data to be carried in the SYN
packet, reducing the cost of re-opening TCP connections. It also packet, reducing the cost of reopening TCP connections. It also
saves up to one RTT compared to standard TCP. saves up to one RTT compared to standard TCP.
TFO mitigates the security vulnerabilities inherent in sending data TFO mitigates the security vulnerabilities inherent in sending data
in the SYN, especially on a system like DNS where amplification in the SYN, especially on a system like DNS where amplification
attacks are possible, by use of a server-supplied cookie. TFO attacks are possible, by use of a server-supplied cookie. TFO
clients request a server cookie in the initial SYN packet at the clients request a server cookie in the initial SYN packet at the
start of a new connection. The server returns a cookie in its SYN- start of a new connection. The server returns a cookie in its SYN-
ACK. The client caches the cookie and reuses it when opening ACK. The client caches the cookie and reuses it when opening
subsequent connections to the same server. subsequent connections to the same server.
The cookie is stored by the client's TCP stack (kernel) and persists The cookie is stored by the client's TCP stack (kernel) and persists
if either the client or server processes are restarted. TFO also if either the client or server processes are restarted. TFO also
falls back to a regular TCP handshake gracefully. falls back to a regular TCP handshake gracefully.
DNS services taking advantage of IP anycast [RFC4786] might need to DNS services taking advantage of IP anycast [RFC4786] might need to
take additional steps when enabling TFO. From [RFC7413]: take additional steps when enabling TFO. From [RFC7413]:
Servers that accept connection requests to the same server IP Servers behind load balancers that accept connection requests to
address should use the same key such that they generate identical the same server IP address should use the same key such that they
Fast Open Cookies for a particular client IP address. Otherwise a generate identical Fast Open cookies for a particular client IP
client may get different cookies across connections; its Fast Open address. Otherwise, a client may get different cookies across
attempts would fall back to regular 3WHS. connections; its Fast Open attempts would fall back to the regular
3WHS.
When DNS-over-TCP is a transport for DNS private exchange, as in When DNS-over-TCP is a transport for DNS private exchange, as in
[DNS-over-TLS], the implementor needs to be aware of TFO and to [DNS-over-TLS], the implementor needs to be aware of TFO and to
ensure that data requiring protection (e.g. data for a DNS query) is ensure that data requiring protection (e.g. data for a DNS query) is
not accidentally transported in the clear. See [DNS-over-TLS] for not accidentally transported in the clear. See [DNS-over-TLS] for
discussion." discussion.
10. IANA Considerations
This memo includes no request to IANA.
11. Security Considerations 10. Security Considerations
Some DNS server operators have expressed concern that wider promotion Some DNS server operators have expressed concern that wider promotion
and use of DNS over TCP will expose them to a higher risk of denial- and use of DNS over TCP will expose them to a higher risk of DoS
of-service (DoS) attacks on TCP (both accidental and deliberate). attacks on TCP (both accidental and deliberate).
Although there is a higher risk of some specific attacks against TCP- Although there is a higher risk of some specific attacks against TCP-
enabled servers, techniques for the mitigation of DoS attacks at the enabled servers, techniques for the mitigation of DoS attacks at the
network level have improved substantially since DNS was first network level have improved substantially since DNS was first
designed. designed.
Readers are advised to familiarise themselves with [CPNI-TCP], a Readers are advised to familiarise themselves with [CPNI-TCP], a
security assessment of TCP detailing known TCP attacks and security assessment of TCP that details known TCP attacks and
countermeasures which references most of the relevant RFCs on this countermeasures and that references most of the relevant RFCs on this
topic. topic.
To mitigate the risk of DoS attacks, DNS servers are advised to To mitigate the risk of DoS attacks, DNS servers are advised to
engage in TCP connection management. This could include maintaining engage in TCP connection management. This could include maintaining
state on existing connections, re-using existing connections and state on existing connections, reusing existing connections, and
controlling request queues to enable fair use. It is likely to be controlling request queues to enable fair use. It is likely to be
advantageous to provide configurable connection management options, advantageous to provide configurable connection management options,
for example: for example:
o total number of TCP connections o total number of TCP connections
o maximum TCP connections per source IP address or subnet o maximum TCP connections per source IP address or subnet
o TCP connection idle timeout o TCP connection idle timeout
o maximum DNS transactions per TCP connection o maximum DNS transactions per TCP connection
o maximum TCP connection duration o maximum TCP connection duration
No specific values are recommended for these parameters. No specific values are recommended for these parameters.
Operators are advised to familiarise themselves with the Operators are advised to familiarise themselves with the
configuration and tuning parameters available in the operating system configuration and tuning parameters available in the TCP stack of the
TCP stack. However detailed advice on this is outside the scope of operating system. However, detailed advice on this is outside the
this document. scope of this document.
Operators of recursive servers are advised to ensure that they only Operators of recursive servers are advised to ensure that they only
accept connections from expected clients (for example by the use of accept connections from expected clients (for example, by the use of
an ACL), and do not accept them from unknown sources. In the case of an Access Control List (ACL)) and do not accept them from unknown
UDP traffic, this will help protect against reflection attacks sources. In the case of UDP traffic, this will help protect against
reflection attacks [RFC5358]; and in the case of TCP traffic, it will
[RFC5358] and in the case of TCP traffic it will prevent an unknown prevent an unknown client from exhausting the server's limits on the
client from exhausting the server's limits on the number of number of concurrent connections.
concurrent connections.
12. Acknowledgements
The authors would like to thank Francis Dupont and Paul Vixie for
detailed review, Andrew Sullivan, Tony Finch, Stephane Bortzmeyer,
Joe Abley, Tatuya Jinmei and the many others who contributed to the
mailing list discussion. Also Liang Zhu, Zi Hu, and John Heidemann
for extensive DNS-over-TCP discussions and code. Lucie Guiraud and
Danny McPherson for reviewing early versions of this document. We
would also like to thank all those who contributed to RFC5966.
13. References 11. References
13.1. Normative References 11.1. Normative References
[RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
DOI 10.17487/RFC0768, August 1980, DOI 10.17487/RFC0768, August 1980,
<http://www.rfc-editor.org/info/rfc768>. <http://www.rfc-editor.org/info/rfc768>.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, [RFC793] Postel, J., "Transmission Control Protocol", STD 7,
RFC 793, DOI 10.17487/RFC0793, September 1981, RFC 793, DOI 10.17487/RFC0793, September 1981,
<http://www.rfc-editor.org/info/rfc793>. <http://www.rfc-editor.org/info/rfc793>.
[RFC1034] Mockapetris, P., "Domain names - concepts and facilities", [RFC1034] Mockapetris, P., "Domain names - concepts and facilities",
STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987,
<http://www.rfc-editor.org/info/rfc1034>. <http://www.rfc-editor.org/info/rfc1034>.
[RFC1035] Mockapetris, P., "Domain names - implementation and [RFC1035] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, specification", STD 13, RFC 1035, DOI 10.17487/RFC1035,
November 1987, <http://www.rfc-editor.org/info/rfc1035>. November 1987, <http://www.rfc-editor.org/info/rfc1035>.
skipping to change at page 14, line 42 skipping to change at page 14, line 38
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing", Protocol (HTTP/1.1): Message Syntax and Routing",
RFC 7230, DOI 10.17487/RFC7230, June 2014, RFC 7230, DOI 10.17487/RFC7230, June 2014,
<http://www.rfc-editor.org/info/rfc7230>. <http://www.rfc-editor.org/info/rfc7230>.
[RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext
Transfer Protocol Version 2 (HTTP/2)", RFC 7540, Transfer Protocol Version 2 (HTTP/2)", RFC 7540,
DOI 10.17487/RFC7540, May 2015, DOI 10.17487/RFC7540, May 2015,
<http://www.rfc-editor.org/info/rfc7540>. <http://www.rfc-editor.org/info/rfc7540>.
13.2. Informative References 11.2. Informative References
[Connection-Oriented-DNS] [Connection-Oriented-DNS]
Zhu, L., Hu, Z., Heidemann, J., Wessels, D., Mankin, A., Zhu, L., Hu, Z., Heidemann, J., Wessels, D., Mankin, A.,
and N. Somaiya, "Connection-Oriented DNS to Improve and N. Somaiya, "Connection-Oriented DNS to Improve
Privacy and Security", Privacy and Security", 2015 IEEE Symposium on Security and
<http://www.isi.edu/~johnh/PAPERS/Zhu15b.pdf>. Privacy (SP), DOI 10.1109/SP.2015.18,
<http://ieeexplore.ieee.org/xpl/
articleDetails.jsp?arnumber=7163025>.
[CPNI-TCP] [CPNI-TCP]
CPNI, "Security Assessment of the Transmission Control CPNI, "Security Assessment of the Transmission Control
Protocol (TCP)", 2009, <http://www.gont.com.ar/papers/ Protocol (TCP)", 2009, <http://www.gont.com.ar/papers/
tn-03-09-security-assessment-TCP.pdf>. tn-03-09-security-assessment-TCP.pdf>.
[DNS-over-TLS] [DNS-over-TLS]
Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D.,
and P. Hoffman, "TLS for DNS: Initiation and Performance and P. Hoffman, "Specification for DNS over TLS", Work in
Considerations", draft-ietf-dprive-dns-over-tls (work in Progress, draft-ietf-dprive-dns-over-tls-06, February
progress), January 2016. 2016.
[edns-tcp-keepalive] [edns-tcp-keepalive]
Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The
edns-tcp-keepalive EDNS0 Option", draft-ietf-dnsop-edns- edns-tcp-keepalive EDNS0 Option", Work in Progress,
tcp-keepalive-05 (work in progress), Jan 2015. draft-ietf-dnsop-edns-tcp-keepalive-03, September 2015.
[fragmentation-considered-poisonous] [fragmentation-considered-poisonous]
Herzberg, A. and H. Shulman, "Fragmentation Considered Herzberg, A. and H. Shulman, "Fragmentation Considered
Poisonous", May 2012, <http://arxiv.org/abs/1205.4011>. Poisonous", May 2012, <http://arxiv.org/abs/1205.4011>.
[RFC5405] Eggert, L. and G. Fairhurst, "Unicast UDP Usage Guidelines [RFC5405] Eggert, L. and G. Fairhurst, "Unicast UDP Usage Guidelines
for Application Designers", BCP 145, RFC 5405, for Application Designers", BCP 145, RFC 5405,
DOI 10.17487/RFC5405, November 2008, DOI 10.17487/RFC5405, November 2008,
<http://www.rfc-editor.org/info/rfc5405>. <http://www.rfc-editor.org/info/rfc5405>.
[RFC6824] Ford, A., Raiciu, C., Handley, M., and O. Bonaventure, [RFC6824] Ford, A., Raiciu, C., Handley, M., and O. Bonaventure,
"TCP Extensions for Multipath Operation with Multiple "TCP Extensions for Multipath Operation with Multiple
Addresses", RFC 6824, DOI 10.17487/RFC6824, January 2013, Addresses", RFC 6824, DOI 10.17487/RFC6824, January 2013,
<http://www.rfc-editor.org/info/rfc6824>. <http://www.rfc-editor.org/info/rfc6824>.
[RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP
Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014,
<http://www.rfc-editor.org/info/rfc7413>. <http://www.rfc-editor.org/info/rfc7413>.
[RRL1] Vixie, P. and V. Schryver, "DNS Response Rate Limiting [RRL1] Vixie, P. and V. Schryver, "DNS Response Rate Limiting
(DNS RRL)", ISC-TN 2012-1-Draft1, August 2014, (DNS RRL)", ISC-TN 2012-1-Draft1, April 2012,
<http://ss.vix.su/~vixie/isc-tn-2012-1.txt>. <https://ftp.isc.org/isc/pubs/tn/isc-tn-2012-1.txt>.
[RRL2] "BIND RRL", ISC Knowledge Base AA-00994, April 2012, [RRL2] ISC Support, "Using the Response Rate Limiting Feature in
<https://deepthought.isc.org/article/AA-00994/0/Using-the- BIND 9.10", ISC Knowledge Base AA-00994, June 2013,
Response-Rate-Limiting-Feature-in-BIND-9.10.html>. <https://kb.isc.org/article/AA-00994/>.
Appendix A. Summary of Advantages and Disadvantages to using TCP for Appendix A. Summary of Advantages and Disadvantages to Using TCP for
DNS DNS
The TCP handshake generally prevents address spoofing and, therefore, The TCP handshake generally prevents address spoofing and, therefore,
the reflection/amplification attacks which plague UDP. the reflection/amplification attacks that plague UDP.
IP fragmentation is less of a problem for TCP than it is for UDP. IP fragmentation is less of a problem for TCP than it is for UDP.
TCP stacks generally implement Path MTU Discovery so they can avoid TCP stacks generally implement Path MTU Discovery so they can avoid
IP fragmentation of TCP segments. UDP, on the other hand, does not IP fragmentation of TCP segments. UDP, on the other hand, does not
provide reassembly, which means datagrams that exceed the path MTU provide reassembly; this means datagrams that exceed the path MTU
size must experience fragmentation [RFC5405]. Middleboxes are known size must experience fragmentation [RFC5405]. Middleboxes are known
to block IP fragments, leading to timeouts and forcing client to block IP fragments, leading to timeouts and forcing client
implementations to "hunt" for EDNS0 reply size values supported by implementations to "hunt" for EDNS0 reply size values supported by
the network path. Additionally, fragmentation may lead to cache the network path. Additionally, fragmentation may lead to cache
poisoning [fragmentation-considered-poisonous]. poisoning [fragmentation-considered-poisonous].
TCP setup costs an additional RTT compared to UDP queries. Setup TCP setup costs an additional RTT compared to UDP queries. Setup
costs can be amortized by reusing connections, pipelining queries, costs can be amortised by reusing connections, pipelining queries,
and enabling TCP Fast Open. and enabling TCP Fast Open.
TCP imposes additional state-keeping requirements on clients and TCP imposes additional state-keeping requirements on clients and
servers. The use of TCP Fast Open reduces the cost of closing and servers. The use of TCP Fast Open reduces the cost of closing and
re-opening TCP connections. reopening TCP connections.
Long-lived TCP connections to anycast servers might be disrupted due Long-lived TCP connections to anycast servers might be disrupted due
to routing changes. Clients utilizing TCP for DNS need to always be to routing changes. Clients utilizing TCP for DNS need to always be
prepared to re-establish connections or otherwise retry outstanding prepared to re-establish connections or otherwise retry outstanding
queries. It might also be possible for TCP Multipath [RFC6824] to queries. It might also be possible for Multipath TCP [RFC6824] to
allow a server to hand a connection over from the anycast address to allow a server to hand a connection over from the anycast address to
a unicast address. a unicast address.
There are many "Middleboxes" in use today that interfere with TCP There are many "middleboxes" in use today that interfere with TCP
over port 53 [RFC5625]. This document does not propose any over port 53 [RFC5625]. This document does not propose any
solutions, other than to make it absolutely clear that TCP is a valid solutions, other than to make it absolutely clear that TCP is a valid
transport for DNS and support for it is a requirement for all transport for DNS and support for it is a requirement for all
implementations. implementations.
A more in-depth discussion of connection orientated DNS can be found A more in-depth discussion of connection-oriented DNS can be found
elsewhere [Connection-Oriented-DNS]. elsewhere [Connection-Oriented-DNS].
Appendix B. Changes between revisions Appendix B. Changes to RFC 5966
[Note to RFC Editor: please remove this section prior to
publication.]
B.1. Changes -05 to -06
Introduction: Add reference to DNS-over-TLS
Section 5: 's/it/the resolver/' and 's/fallback/retry/'
Section 6.1.1: Make clear behaviour is 'at the time of writing', not
a recommendation
Section 6.2.1.1: Change SHOULD to MUST.
Section 6.2.2: Clarify 'operational reasons' for zone transfers.
Section 8: Re-word to remove reference to TCP segments.
Section 9: Add sentence about use of TFO with DNS privacy solutions.
B.2. Changes -04 to -05
Added second RRL reference to introduction
Introduction, paragraph 5: s/may result/will probably result/
Section 5: Strengthened wording on update of RFC1123
Section 5: Added reference to HTTP/2
Section 6.2.1: Simplify wording of Message ID collisions
Section 6.2.2: Clarify wording on idle timeout reset
Section 6.2.4: Use DNS Server/client for consistency
Section 8: Re-word to reduce confusion of timeout vs TCP reads
Appendix C: Updated differences to RFC5966.
B.3. Changes -03 to -04
o Re-stated how messages received over TCP should be mapped to
queries.
o Added wording to cover timeouts for server side behaviour for when
receiving TCP messages.
o Added sentence to abstract stating this obsoletes RFC5966.
o Moved reference to RFC6891 earlier in Discussion section.
o Several minor wording updates to improve clarity.
o Corrected nits and updated references.
B.4. Changes -02 to -03
o Replaced certain lower case RFC2119 keywords to improve clarity.
o Updated section 6.2.2 to recognise requirements for concurrent
zone transfers.
o Changed 'client IP address' to 'client IP address or subnet' when
discussing restrictions on TCP connections from clients.
o Added reference to edns-tcp-keepalive draft.
o Added wording to introduction to reference Appendix A and state
TCP is a valid transport alternative for DNS.
o Improved description of CPNI-TCP as a general reference source on
TCP security related RFCs.
B.5. Changes -01 to -02
o Added more text to Introduction as background to TCP use.
o Added definitions of Persistent connection and Idle session to
Terminology section.
o Separated Connection Handling section into Current Practice and
Recommendations. Provide more detail on current practices and
divided Recommendations up into more granular sub-sections.
o Add section on Idle time with new text on recommendations for
client idle behaviour.
o Move TCP message field length discussion to separate section.
o Removed references to system calls in TFO section.
o Added more discussion on DoS mitigation in Security Considerations
section.
o Added statement that servers MAY use 0 idle timeout.
o Re-stated position of TCP as an alternative to UDP in Discussion.
o Updated text on server limits on concurrent connections from a
particular client.
o Added text that client retry logic is outside the scope of this
document.
o Clarified that servers should answer all pipelined queries even if
sent very close together.
B.6. Changes -00 to -01
o Changed updates to obsoletes RFC 5966.
o Improved text in Section 4 Transport Protocol Selection to change
"TCP SHOULD NOT be used only for the transfers and as a fallback"
to make the intention clearer and more consistent.
o Reference to TCP FASTOPEN updated now that it is an RFC.
o Added paragraph to say that implementations MUST NOT send the TCP
framing 2 byte length field in a separate packet to the DNS
message.
o Added Terminology section.
o Changed should and RECOMMENDED in reference to parallel processing
to SHOULD in sections 7 and 8.
o Added text to address what a server should do when a client closes
the TCP connection before pending responses are sent.
o Moved the Advantages and Disadvantages section to an appendix.
Appendix C. Changes to RFC5966
[Note to RFC Editor: please leave this section in the final
document.]
This document obsoletes [RFC5966] and differs from it in several This document obsoletes [RFC5966] and differs from it in several
respects. An overview of the most substantial changes/updates that respects. An overview of the most substantial changes/updates that
implementors should take note of is given below: implementors should take note of is given below.
1. A Terminology section (Section 3) is added defining several new 1. A Terminology section (Section 3) is added defining several new
concepts. concepts.
2. Paragraph 3 of Section 5 puts TCP on a more equal footing with 2. Paragraph 3 of Section 5 puts TCP on a more equal footing with
UDP than RFC5966. For example it states: UDP than RFC 5966 does. For example, it states:
1. TCP MAY be used before sending any UDP queries. 1. TCP MAY be used before sending any UDP queries.
2. TCP ought to be considered a valid alternative transport to 2. TCP ought to be considered a valid alternative transport to
UDP, not purely a fallback option. UDP, not purely a fallback option.
3. Section 6.2.1 adds a new recommendation that TCP connection- 3. Section 6.2.1 adds a new recommendation that TCP connection
reuse SHOULD be supported. reuse SHOULD be supported.
4. Section 6.2.1.1 adds a new recommendation that DNS clients 4. Section 6.2.1.1 adds a new recommendation that DNS clients
SHOULD pipeline their queries and DNS servers SHOULD process SHOULD pipeline their queries and DNS servers SHOULD process
pipelined queries concurrently. pipelined queries concurrently.
5. Section 6.2.2 adds new recommendations on the number and usage 5. Section 6.2.2 adds new recommendations on the number and usage
of TCP connections for client/server interactions. of TCP connections for client/server interactions.
6. Section 6.2.3 adds a new recommendation that DNS clients SHOULD 6. Section 6.2.3 adds a new recommendation that DNS clients SHOULD
close idle sessions unless using a signalling mechanism. close idle sessions unless using a signalling mechanism.
7. Section 7 clarifies that servers are RECOMMENDED to prepare TCP 7. Section 7 clarifies that servers are RECOMMENDED to prepare TCP
responses in parallel and send answers out-of-order. It also responses in parallel and send answers out of order. It also
clarifies how TCP queries and responses should be matched by clarifies how TCP queries and responses should be matched by
clients. clients.
8. Section 8 adds a new recommendation about how DNS clients and 8. Section 8 adds a new recommendation about how DNS clients and
servers should handle the 2 byte message length field for TCP servers should handle the 2-byte message length field for TCP
messages. messages.
9. Section 9 adds a non-normative discussion of the use of TCP Fast 9. Section 9 adds a non-normative discussion of the use of TCP Fast
Open. Open.
10. The Section 11 adds new advice regarding DoS mitigation 10. Section 10 adds new advice regarding DoS mitigation techniques.
techniques.
Acknowledgements
The authors would like to thank Francis Dupont and Paul Vixie for
their detailed reviews, as well as Andrew Sullivan, Tony Finch,
Stephane Bortzmeyer, Joe Abley, Tatuya Jinmei, and the many others
who contributed to the mailing list discussion. Also, the authors
thank Liang Zhu, Zi Hu, and John Heidemann for extensive DNS-over-TCP
discussions and code, and Lucie Guiraud and Danny McPherson for
reviewing early draft versions of this document. We would also like
to thank all those who contributed to RFC 5966.
Authors' Addresses Authors' Addresses
John Dickinson John Dickinson
Sinodun Internet Technologies Sinodun Internet Technologies
Magdalen Centre Magdalen Centre
Oxford Science Park Oxford Science Park
Oxford OX4 4GA Oxford OX4 4GA
UK United Kingdom
Email: jad@sinodun.com Email: jad@sinodun.com
URI: http://sinodun.com URI: http://sinodun.com
Sara Dickinson Sara Dickinson
Sinodun Internet Technologies Sinodun Internet Technologies
Magdalen Centre Magdalen Centre
Oxford Science Park Oxford Science Park
Oxford OX4 4GA Oxford OX4 4GA
UK United Kingdom
Email: sara@sinodun.com Email: sara@sinodun.com
URI: http://sinodun.com URI: http://sinodun.com
Ray Bellis Ray Bellis
Internet Systems Consortium, Inc Internet Systems Consortium, Inc
950 Charter Street 950 Charter Street
Redwood City CA 94063 Redwood City, CA 94063
USA United States
Phone: +1 650 423 1200 Phone: +1 650 423 1200
Email: ray@isc.org Email: ray@isc.org
URI: http://www.isc.org URI: http://www.isc.org
Allison Mankin Allison Mankin
Verisign Labs Verisign Labs
12061 Bluemont Way 12061 Bluemont Way
Reston, VA 20190 Reston, VA 20190
US United States
Phone: +1 703 948-3200
Email: amankin@verisign.com
Phone: +1 301 728 7198
Email: allison.mankin@gmail.com
Duane Wessels Duane Wessels
Verisign Labs Verisign Labs
12061 Bluemont Way 12061 Bluemont Way
Reston, VA 20190 Reston, VA 20190
US United States
Phone: +1 703 948-3200 Phone: +1 703 948 3200
Email: dwessels@verisign.com Email: dwessels@verisign.com
 End of changes. 97 change blocks. 
345 lines changed or deleted 196 lines changed or added

This html diff was produced by rfcdiff 1.43. The latest version is available from http://tools.ietf.org/tools/rfcdiff/