draft-ietf-dprive-dnsodtls-15.txt   rfc8094.txt 
DPRIVE T. Reddy Internet Engineering Task Force (IETF) T. Reddy
Internet-Draft Cisco Request for Comments: 8094 Cisco
Intended status: Experimental D. Wing Category: Experimental D. Wing
Expires: June 19, 2017 ISSN: 2070-1721
P. Patil P. Patil
Cisco Cisco
December 16, 2016 February 2017
Specification for DNS over Datagram Transport Layer Security (DTLS) DNS over Datagram Transport Layer Security (DTLS)
draft-ietf-dprive-dnsodtls-15
Abstract Abstract
DNS queries and responses are visible to network elements on the path DNS queries and responses are visible to network elements on the path
between the DNS client and its server. These queries and responses between the DNS client and its server. These queries and responses
can contain privacy-sensitive information which is valuable to can contain privacy-sensitive information, which is valuable to
protect. protect.
This document proposes the use of Datagram Transport Layer Security This document proposes the use of Datagram Transport Layer Security
(DTLS) for DNS, to protect against passive listeners and certain (DTLS) for DNS, to protect against passive listeners and certain
active attacks. As latency is critical for DNS, this proposal also active attacks. As latency is critical for DNS, this proposal also
discusses mechanisms to reduce DTLS round trips and reduce DTLS discusses mechanisms to reduce DTLS round trips and reduce the DTLS
handshake size. The proposed mechanism runs over port 853. handshake size. The proposed mechanism runs over port 853.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This document is not an Internet Standards Track specification; it is
provisions of BCP 78 and BCP 79. published for examination, experimental implementation, and
evaluation.
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 defines an Experimental Protocol for the Internet
and may be updated, replaced, or obsoleted by other documents at any community. This document is a product of the Internet Engineering
time. It is inappropriate to use Internet-Drafts as reference Task Force (IETF). It represents the consensus of the IETF
material or to cite them other than as "work in progress." community. It has received public review and has been approved for
publication by the Internet Engineering Steering Group (IESG). Not
all documents approved by the IESG are a candidate for any level of
Internet Standard; see Section 2 of RFC 7841.
This Internet-Draft will expire on June 19, 2017. 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/rfc8094.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2017 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction ....................................................3
1.1. Relationship to TCP Queries and to DNSSEC . . . . . . . . 3 1.1. Relationship to TCP Queries and to DNSSEC ..................3
1.2. Document Status . . . . . . . . . . . . . . . . . . . . . 3 1.2. Document Status ............................................4
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Terminology .....................................................4
3. Establishing and Managing DNS-over-DTLS Sessions . . . . . . 4 3. Establishing and Managing DNS over DTLS Sessions ................5
3.1. Session Initiation . . . . . . . . . . . . . . . . . . . 4 3.1. Session Initiation .........................................5
3.2. DTLS Handshake and Authentication . . . . . . . . . . . . 5 3.2. DTLS Handshake and Authentication ..........................5
3.3. Established Sessions . . . . . . . . . . . . . . . . . . 5 3.3. Established Sessions .......................................6
4. Performance Considerations . . . . . . . . . . . . . . . . . 6 4. Performance Considerations ......................................7
5. PMTU issues . . . . . . . . . . . . . . . . . . . . . . . . . 7 5. Path MTU (PMTU) Issues ..........................................7
6. Anycast . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 6. Anycast .........................................................8
7. Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7. Usage ...........................................................9
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 8. IANA Considerations .............................................9
9. Security Considerations . . . . . . . . . . . . . . . . . . . 9 9. Security Considerations .........................................9
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 10. References ....................................................10
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 10.1. Normative References .....................................10
11.1. Normative References . . . . . . . . . . . . . . . . . . 10 10.2. Informative References ...................................11
11.2. Informative References . . . . . . . . . . . . . . . . . 11 Acknowledgements ..................................................13
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 Authors' Addresses ................................................13
1. Introduction 1. Introduction
The Domain Name System is specified in [RFC1034] and [RFC1035]. DNS The Domain Name System is specified in [RFC1034] and [RFC1035]. DNS
queries and responses are normally exchanged unencrypted and are thus queries and responses are normally exchanged unencrypted; thus, they
vulnerable to eavesdropping. Such eavesdropping can result in an are vulnerable to eavesdropping. Such eavesdropping can result in an
undesired entity learning domains that a host wishes to access, thus undesired entity learning domain that a host wishes to access, thus
resulting in privacy leakage. The DNS privacy problem is further resulting in privacy leakage. The DNS privacy problem is further
discussed in [RFC7626]. discussed in [RFC7626].
This document defines DNS over DTLS (DNS-over-DTLS) which provides This document defines DNS over DTLS, which provides confidential DNS
confidential DNS communication between stub resolvers and recursive communication between stub resolvers and recursive resolvers, stub
resolvers, stub resolvers and forwarders, forwarders and recursive resolvers and forwarders, and forwarders and recursive resolvers.
resolvers. DNS-over-DTLS puts an additional computational load on DNS over DTLS puts an additional computational load on servers. The
servers. The largest gain for privacy is to protect the largest gain for privacy is to protect the communication between the
communication between the DNS client (the end user's machine) and its DNS client (the end user's machine) and its caching resolver. DNS
caching resolver. DNS-over-DTLS might work equally between recursive over DTLS might work equally between recursive clients and
clients and authoritative servers, but this application of the authoritative servers, but this application of the protocol is out of
protocol is out of scope for the DNS PRIVate Exchange (DPRIVE) scope for the DNS PRIVate Exchange (DPRIVE) working group per its
Working Group per its current charter. This document does not change current charter. This document does not change the format of DNS
the format of DNS messages. messages.
The motivations for proposing DNS-over-DTLS are that The motivations for proposing DNS over DTLS are that:
o TCP suffers from network head-of-line blocking, where the loss of o TCP suffers from network head-of-line blocking, where the loss of
a packet causes all other TCP segments to not be delivered to the a packet causes all other TCP segments not to be delivered to the
application until the lost packet is re-transmitted. DNS-over- application until the lost packet is retransmitted. DNS over
DTLS, because it uses UDP, does not suffer from network head-of- DTLS, because it uses UDP, does not suffer from network head-of-
line blocking. line blocking.
o DTLS session resumption consumes 1 round trip whereas TLS session o DTLS session resumption consumes one round trip, whereas TLS
resumption can start only after TCP handshake is complete. session resumption can start only after the TCP handshake is
However, with TCP Fast Open [RFC7413], the implementation can complete. However, with TCP Fast Open [RFC7413], the
achieve the same RTT efficiency as DTLS. implementation can achieve the same RTT efficiency as DTLS.
Note: DNS-over-DTLS is an experimental update to DNS, and the Note: DNS over DTLS is an experimental update to DNS, and the
experiment will be concluded when the specification is evaluated experiment will be concluded when the specification is evaluated
through implementations and interoperability testing. through implementations and interoperability testing.
1.1. Relationship to TCP Queries and to DNSSEC 1.1. Relationship to TCP Queries and to DNSSEC
DNS queries can be sent over UDP or TCP. The scope of this document, DNS queries can be sent over UDP or TCP. The scope of this document,
however, is only UDP. DNS over TCP can be protected with TLS, as however, is only UDP. DNS over TCP can be protected with TLS, as
described in [RFC7858]. DNS-over-DTLS alone cannot provide privacy described in [RFC7858]. DNS over DTLS alone cannot provide privacy
for DNS messages in all circumstances, specifically when the DTLS for DNS messages in all circumstances, specifically when the DTLS
record size is larger than the path MTU. In such situations the DNS record size is larger than the path MTU. In such situations, the DNS
server will respond with a truncated response (see Section 5). server will respond with a truncated response (see Section 5).
Therefore DNS clients and servers that implement DNS-over-DTLS MUST
also implement DNS-over-TLS in order to provide privacy for clients
that desire Strict Privacy as described in
[I-D.ietf-dprive-dtls-and-tls-profiles].
DNS Security Extensions (DNSSEC [RFC4033]) provides object integrity Therefore, DNS clients and servers that implement DNS over DTLS MUST
of DNS resource records, allowing end-users (or their resolver) to also implement DNS over TLS in order to provide privacy for clients
verify legitimacy of responses. However, DNSSEC does not provide that desire Strict Privacy as described in [DTLS].
privacy for DNS requests or responses. DNS-over-DTLS works in
conjunction with DNSSEC, but DNS-over-DTLS does not replace the need DNS Security Extensions (DNSSEC) [RFC4033] provide object integrity
of DNS resource records, allowing end users (or their resolver) to
verify the legitimacy of responses. However, DNSSEC does not provide
privacy for DNS requests or responses. DNS over DTLS works in
conjunction with DNSSEC, but DNS over DTLS does not replace the need
or value of DNSSEC. or value of DNSSEC.
1.2. Document Status 1.2. Document Status
This document is an Experimental RFC. One key aspect to judge This document is an Experimental RFC. One key aspect to judge
whether the approach is usable on a large scale is by observing the whether the approach is usable on a large scale is by observing the
uptake, usability, and operational behavior of the protocol in large- uptake, usability, and operational behavior of the protocol in large-
scale, real-life deployments. scale, real-life deployments.
This DTLS solution was considered by the DPRIVE working group as an This DTLS solution was considered by the DPRIVE working group as an
option to use in case the TLS based approach specified in [RFC7858] option to use in case the TLS-based approach specified in [RFC7858]
turns out to have some issues when deployed. At the time of writing, turns out to have some issues when deployed. At the time of writing,
it is expected that [RFC7858] is what will be deployed, and so this it is expected that [RFC7858] is what will be deployed, and so this
specification is mainly intended as a backup. specification is mainly intended as a backup.
The following guidelines should be considered when performance The following guidelines should be considered when performance
benchmarking DNS over DTLS: benchmarking DNS over DTLS:
1. DNS over DTLS can recover from packet loss and reordering, and 1. DNS over DTLS can recover from packet loss and reordering, and
does not suffer from network head-of-line blocking. DNS over does not suffer from network head-of-line blocking. DNS over
DTLS performance in comparison with DNS over TLS may be better in DTLS performance, in comparison with DNS over TLS, may be better
lossy networks. in lossy networks.
2. The number of round trips to send the first DNS query over DNS 2. The number of round trips to send the first DNS query over DNS
over DTLS is less than the number of round trips to send the over DTLS is less than the number of round trips to send the
first DNS query over TLS. Even if TCP Fast Open is used, it only first DNS query over TLS. Even if TCP Fast Open is used, it only
works for subsequent TCP connections between the DNS client and works for subsequent TCP connections between the DNS client and
server (Section 3 in [RFC7413]). server (Section 3 in [RFC7413]).
3. If DTLS 1.3 protocol [I-D.rescorla-tls-dtls13] is used for DNS 3. If the DTLS 1.3 protocol [DTLS13] is used for DNS over DTLS, it
over DTLS, it provides critical latency improvements for provides critical latency improvements for connection
connection establishment over DTLS 1.2. establishment over DTLS 1.2.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in "OPTIONAL" in this document are to be interpreted as described in
[RFC2119] . [RFC2119] .
3. Establishing and Managing DNS-over-DTLS Sessions 3. Establishing and Managing DNS over DTLS Sessions
3.1. Session Initiation 3.1. Session Initiation
By default, DNS-over-DTLS MUST run over standard UDP port 853 as By default, DNS over DTLS MUST run over standard UDP port 853 as
defined in Section 8, unless the DNS server has mutual agreement with defined in Section 8, unless the DNS server has mutual agreement with
its clients to use a port other than 853 for DNS-over-DTLS. In order its clients to use a port other than 853 for DNS over DTLS. In order
to use a port other than 853, both clients and servers would need a to use a port other than 853, both clients and servers would need a
configuration option in their software. configuration option in their software.
The DNS client should determine if the DNS server supports DNS-over- The DNS client should determine if the DNS server supports DNS over
DTLS by sending a DTLS ClientHello message to port 853 on the server, DTLS by sending a DTLS ClientHello message to port 853 on the server,
unless it has mutual agreement with its server to use a port other unless it has mutual agreement with its server to use a port other
than port 853 for DNS-over-DTLS. Such another port MUST NOT be port than port 853 for DNS over DTLS. Such another port MUST NOT be port
53 but MAY be from the "first-come, first-served" port range (User 53 but MAY be from the "first-come, first-served" port range (User
Ports [RFC6335], range 1024- 49151) . This recommendation against use Ports [RFC6335], range 1024-49151). This recommendation against the
of port 53 for DNS-over-DTLS is to avoid complication in selecting use of port 53 for DNS over DTLS is to avoid complications in
use or non-use of DTLS and to reduce risk of downgrade attacks. selecting use or non-use of DTLS and to reduce risk of downgrade
attacks.
A DNS server that does not support DNS-over-DTLS will not respond to A DNS server that does not support DNS over DTLS will not respond to
ClientHello messages sent by the client. If no response is received ClientHello messages sent by the client. If no response is received
from that server, and the client has no better round-trip estimate, from that server, and the client has no better round-trip estimate,
the client SHOULD retransmit the DTLS ClientHello according to the client SHOULD retransmit the DTLS ClientHello according to
Section 4.2.4.1 of [RFC6347]. After 15 seconds, it SHOULD cease Section 4.2.4.1 of [RFC6347]. After 15 seconds, it SHOULD cease
attempts to re-transmit its ClientHello. The client MAY repeat that attempts to retransmit its ClientHello. The client MAY repeat that
procedure to discover if DNS-over-DTLS service becomes available from procedure to discover if DNS over DTLS service becomes available from
the DNS server, but such probing SHOULD NOT be done more frequently the DNS server, but such probing SHOULD NOT be done more frequently
than every 24 hours and MUST NOT be done more frequently than every than every 24 hours and MUST NOT be done more frequently than every
15 minutes. This mechanism requires no additional signaling between 15 minutes. This mechanism requires no additional signaling between
the client and server. the client and server.
DNS clients and servers MUST NOT use port 853 to transport cleartext DNS clients and servers MUST NOT use port 853 to transport cleartext
DNS messages. DNS clients MUST NOT send and DNS servers MUST NOT DNS messages. DNS clients MUST NOT send and DNS servers MUST NOT
respond to cleartext DNS messages on any port used for DNS-over-DTLS respond to cleartext DNS messages on any port used for DNS over DTLS
(including, for example, after a failed DTLS handshake). There are (including, for example, after a failed DTLS handshake). There are
significant security issues in mixing protected and unprotected data, significant security issues in mixing protected and unprotected data;
therefore UDP connections on a port designated by a given server for therefore, UDP connections on a port designated by a given server for
DNS-over-DTLS are reserved purely for encrypted communications. DNS over DTLS are reserved purely for encrypted communications.
3.2. DTLS Handshake and Authentication 3.2. DTLS Handshake and Authentication
DNS client initiates DTLS handshake as described in [RFC6347], The DNS client initiates the DTLS handshake as described in
following the best practices specified in [RFC7525]. After DTLS [RFC6347], following the best practices specified in [RFC7525].
negotiation completes, if the DTLS handshake succeeds according to After DTLS negotiation completes, if the DTLS handshake succeeds
[RFC6347] the connection will be encrypted and is now protected from according to [RFC6347], the connection will be encrypted and would
eavesdropping. then be protected from eavesdropping.
DNS privacy requires encrypting the query (and response) from passive DNS privacy requires encrypting the query (and response) from passive
attacks. Such encryption typically provides integrity protection as attacks. Such encryption typically provides integrity protection as
a side-effect, which means on-path attackers cannot simply inject a side effect, which means on-path attackers cannot simply inject
bogus DNS responses. However, to provide stronger protection from bogus DNS responses. However, to provide stronger protection from
active attackers pretending to be the server, the server itself needs active attackers pretending to be the server, the server itself needs
to be authenticated. To authenticate the server providing DNS to be authenticated. To authenticate the server providing DNS
privacy, DNS client MUST use the authenication mechanisms discussed privacy, DNS client MUST use the authentication mechanisms discussed
in [I-D.ietf-dprive-dtls-and-tls-profiles]. This document does not in [DTLS]. This document does not propose new ideas for
propose new ideas for authentication. authentication.
3.3. Established Sessions 3.3. Established Sessions
In DTLS, all data is protected using the same record encoding and In DTLS, all data is protected using the same record encoding and
mechanisms. When the mechanism described in this document is in mechanisms. When the mechanism described in this document is in
effect, DNS messages are encrypted using the standard DTLS record effect, DNS messages are encrypted using the standard DTLS record
encoding. When a user of DTLS wishes to send a DNS message, the data encoding. When a DTLS user wishes to send a DNS message, the data is
is delivered to the DTLS implementation as an ordinary application delivered to the DTLS implementation as an ordinary application data
data write (e.g., SSL_write()). A single DTLS session can be used to write (e.g., SSL_write()). A single DTLS session can be used to send
send multiple DNS requests and receive multiple DNS responses. multiple DNS requests and receive multiple DNS responses.
To mitigate the risk of unintentional server overload, DNS-over-DTLS To mitigate the risk of unintentional server overload, DNS over DTLS
clients MUST take care to minimize the number of concurrent DTLS clients MUST take care to minimize the number of concurrent DTLS
sessions made to any individual server. It is RECOMMENDED that for sessions made to any individual server. For any given client/server
any given client/server interaction there SHOULD be no more than one interaction, it is RECOMMENDED that there be no more than one DTLS
DTLS session. Similarly, servers MAY impose limits on the number of session. Similarly, servers MAY impose limits on the number of
concurrent DTLS sessions being handled for any particular client IP concurrent DTLS sessions being handled for any particular client IP
address or subnet. These limits SHOULD be much looser than the address or subnet. These limits SHOULD be much looser than the
client guidelines above, because the server does not know, for client guidelines above because the server does not know, for
example, if a client IP address belongs to a single client, is example, if a client IP address belongs to a single client, is
multiple resolvers on a single machine, or is multiple clients behind representing multiple resolvers on a single machine, or is
a device performing Network Address Translation (NAT). representing multiple clients behind a device performing Network
Address Translation (NAT).
In between normal DNS traffic while the communication to the DNS In between normal DNS traffic, while the communication to the DNS
server is quiescent, the DNS client MAY want to probe the server server is quiescent, the DNS client MAY want to probe the server
using DTLS heartbeat [RFC6520] to ensure it has maintained using DTLS heartbeat [RFC6520] to ensure it has maintained
cryptographic state. Such probes can also keep alive firewall or NAT cryptographic state. Such probes can also keep alive firewall or NAT
bindings. This probing reduces the frequency of needing a new bindings. This probing reduces the frequency of needing a new
handshake when a DNS query needs to be resolved, improving the user handshake when a DNS query needs to be resolved, improving the user
experience at the cost of bandwidth and processing time. experience at the cost of bandwidth and processing time.
A DTLS session is terminated by the receipt of an authenticated A DTLS session is terminated by the receipt of an authenticated
message that closes the connection (e.g., a DTLS fatal alert). If message that closes the connection (e.g., a DTLS fatal alert). If
the server has lost state, a DTLS handshake needs to be initiated the server has lost state, a DTLS handshake needs to be initiated
with the server. For the server, to mitigate the risk of with the server. For the server, to mitigate the risk of
unintentional server overload, it is RECOMMENDED that the default unintentional server overload, it is RECOMMENDED that the default DNS
DNS-over-DTLS server application-level idle time be set to several over DTLS server application-level idle time be set to several
seconds and not set to less than a second, but no particular value is seconds and not set to less than a second, but no particular value is
specified. When no DNS queries have been received from the client specified. When no DNS queries have been received from the client
after idle time out, the server MUST send a DTLS fatal alert and then after idle timeout, the server MUST send a DTLS fatal alert and then
destroy its DTLS state. The DTLS fatal alert packet indicates the destroy its DTLS state. The DTLS fatal alert packet indicates the
server has destroyed its state, signaling to the client if it wants server has destroyed its state, signaling to the client that if it
to send a new DTLS message it will need to re-establish cryptographic wants to send a new DTLS message, it will need to re-establish
context with the server (via full DTLS handshake or DTLS session cryptographic context with the server (via full DTLS handshake or
resumption). In practice, the idle period can vary dynamically, and DTLS session resumption). In practice, the idle period can vary
servers MAY allow idle connections to remain open for longer periods dynamically, and servers MAY allow idle connections to remain open
as resources permit. for longer periods as resources permit.
4. Performance Considerations 4. Performance Considerations
DTLS protocol profile for DNS-over-DTLS is discussed in Section 11 of The DTLS protocol profile for DNS over DTLS is discussed in
[I-D.ietf-dprive-dtls-and-tls-profiles]. To reduce the number of Section 11 of [DTLS]. To reduce the number of octets of the DTLS
octets of the DTLS handshake, especially the size of the certificate handshake, especially the size of the certificate in the ServerHello
in the ServerHello (which can be several kilobytes), DNS clients and (which can be several kilobytes), DNS clients and servers can use raw
servers can use raw public keys [RFC7250] or Cached Information public keys [RFC7250] or Cached Information Extension [RFC7924].
Extension [RFC7924]. Cached Information Extension avoids Cached Information Extension avoids transmitting the server's
transmitting the server's certificate and certificate chain if the certificate and certificate chain if the client has cached that
client has cached that information from a previous TLS handshake. information from a previous TLS handshake. TLS False Start [RFC7918]
TLS False Start [RFC7918] can reduce round-trips by allowing the TLS can reduce round trips by allowing the TLS second flight of messages
second flight of messages (ChangeCipherSpec) to also contain the (ChangeCipherSpec) to also contain the (encrypted) DNS query.
(encrypted) DNS query.
It is highly advantageous to avoid server-side DTLS state and reduce It is highly advantageous to avoid server-side DTLS state and reduce
the number of new DTLS sessions on the server which can be done with the number of new DTLS sessions on the server that can be done with
TLS Session Resumption without server state [RFC5077]. This also TLS Session Resumption without server state [RFC5077]. This also
eliminates a round-trip for subsequent DNS-over-DTLS queries, because eliminates a round trip for subsequent DNS over DTLS queries, because
with [RFC5077] the DTLS session does not need to be re-established. with [RFC5077] the DTLS session does not need to be re-established.
Since responses within a DTLS session can arrive out of order, Since responses within a DTLS session can arrive out of order,
clients MUST match responses to outstanding queries on the same DTLS clients MUST match responses to outstanding queries on the same DTLS
connection using the DNS Message ID. If the response contains a connection using the DNS Message ID. If the response contains a
question section, the client MUST match the QNAME, QCLASS, and QTYPE question section, the client MUST match the QNAME, QCLASS, and QTYPE
fields. Failure by clients to properly match responses to fields. Failure by clients to properly match responses to
outstanding queries can have serious consequences for outstanding queries can have serious consequences for
interoperability ( [RFC7766], Section 7). interoperability (Section 7 of [RFC7766]).
5. PMTU issues 5. Path MTU (PMTU) Issues
Compared to normal DNS, DTLS adds at least 13 octets of header, plus Compared to normal DNS, DTLS adds at least 13 octets of header, plus
cipher and authentication overhead to every query and every response. cipher and authentication overhead to every query and every response.
This reduces the size of the DNS payload that can be carried. DNS This reduces the size of the DNS payload that can be carried. The
client and server MUST support the EDNS0 option defined in [RFC6891] DNS client and server MUST support the Extension Mechanisms for DNS
so that the DNS client can indicate to the DNS server the maximum DNS (EDNS0) option defined in [RFC6891] so that the DNS client can
response size it can reassemble and deliver in the DNS client's indicate to the DNS server the maximum DNS response size it can
network stack. If the DNS client does set the EDNS0 option defined reassemble and deliver in the DNS client's network stack. If the DNS
in [RFC6891] then the maximum DNS response size of 512 bytes plus client does set the EDNS0 option defined in [RFC6891], then the
DTLS overhead will be well within the Path MTU. If the Path MTU is maximum DNS response size of 512 bytes plus DTLS overhead will be
not known, an IP MTU of 1280 bytes SHOULD be assumed. The client well within the Path MTU. If the Path MTU is not known, an IP MTU of
sets its EDNS0 value as if DTLS is not being used. The DNS server 1280 bytes SHOULD be assumed. The client sets its EDNS0 value as if
MUST ensure that the DNS response size does not exceed the Path MTU DTLS is not being used. The DNS server MUST ensure that the DNS
i.e. each DTLS record MUST fit within a single datagram, as required response size does not exceed the Path MTU, i.e., each DTLS record
by [RFC6347]. The DNS server must consider the amount of record MUST fit within a single datagram, as required by [RFC6347]. The DNS
expansion expected by the DTLS processing when calculating the size server must consider the amount of record expansion expected by the
of DNS response that fits within the path MTU. Path MTU MUST be DTLS processing when calculating the size of DNS response that fits
greater than or equal to [DNS response size + DTLS overhead of 13 within the path MTU. The Path MTU MUST be greater than or equal to
octets + padding size ([RFC7830]) + authentication overhead of the the DNS response size + DTLS overhead of 13 octets + padding size
negotiated DTLS cipher suite + block padding (Section 4.1.1.1 of ([RFC7830]) + authentication overhead of the negotiated DTLS cipher
[RFC6347]]. If the DNS server's response were to exceed that suite + block padding (Section 4.1.1.1 of [RFC6347]). If the DNS
calculated value, the server MUST send a response that does fit server's response were to exceed that calculated value, the server
within that value and sets the TC (truncated) bit. Upon receiving a MUST send a response that does fit within that value and sets the TC
response with the TC bit set and wanting to receive the entire (truncated) bit. Upon receiving a response with the TC bit set and
response, the client behaviour is governed by the current Usage wanting to receive the entire response, the client behavior is
profile [I-D.ietf-dprive-dtls-and-tls-profiles]. For Strict Privacy governed by the current Usage Profile [DTLS]. For Strict Privacy,
the client MUST only send a new DNS request for the same resource the client MUST only send a new DNS request for the same resource
record over an encrypted transport (e.g. DNS-over-TLS [RFC7858]). record over an encrypted transport (e.g., DNS over TLS [RFC7858]).
Clients using Opportunistic Privacy SHOULD try for the best case (an Clients using Opportunistic Privacy SHOULD try for the best case (an
encrypted and authenticated transport) but MAY fallback to encrypted and authenticated transport) but MAY fall back to
intermediate cases and eventually the worst case scenario (clear intermediate cases and eventually the worst case scenario (clear
text) in order to obtain a response. text) in order to obtain a response.
6. Anycast 6. Anycast
DNS servers are often configured with anycast addresses. While the DNS servers are often configured with anycast addresses. While the
network is stable, packets transmitted from a particular source to an network is stable, packets transmitted from a particular source to an
anycast address will reach the same server that has the cryptographic anycast address will reach the same server that has the cryptographic
context from the DNS-over-DTLS handshake. But when the network context from the DNS over DTLS handshake. But, when the network
configuration or routing changes, a DNS-over-DTLS packet can be configuration or routing changes, a DNS over DTLS packet can be
received by a server that does not have the necessary cryptographic received by a server that does not have the necessary cryptographic
context. Clients using DNS-over-DTLS need to always be prepared to context. Clients using DNS over DTLS need to always be prepared to
re-initiate DTLS handshake and in the worst case this could even re-initiate the DTLS handshake, and in the worst case this could even
happen immediately after re-initiating a new handshake. To encourage happen immediately after re-initiating a new handshake. To encourage
the client to initiate a new DTLS handshake, DNS servers SHOULD the client to initiate a new DTLS handshake, DNS servers SHOULD
generate a DTLS fatal alert message in response to receiving a DTLS generate a DTLS fatal alert message in response to receiving a DTLS
packet for which the server does not have any cryptographic context. packet for which the server does not have any cryptographic context.
Upon receipt of an un-authenicated DTLS fatal alert, the DTLS client Upon receipt of an unauthenticated DTLS fatal alert, the DTLS client
validates the fatal alert is within the replay window validates the fatal alert is within the replay window
(Section 4.1.2.6 of [RFC6347]). It is difficult for the DTLS client (Section 4.1.2.6 of [RFC6347]). It is difficult for the DTLS client
to validate that the DTLS fatal alert was generated by the DTLS to validate that the DTLS fatal alert was generated by the DTLS
server in response to a request or was generated by an on- or off- server in response to a request or was generated by an on- or off-
path attacker. Thus, upon receipt of an in-window DTLS fatal alert, path attacker. Thus, upon receipt of an in-window DTLS fatal alert,
the client SHOULD continue re-transmitting the DTLS packet (in the the client SHOULD continue retransmitting the DTLS packet (in the
event the fatal alert was spoofed), and at the same time it SHOULD event the fatal alert was spoofed), and at the same time it SHOULD
initiate DTLS session resumption. When the DTLS client receives an initiate DTLS session resumption. When the DTLS client receives an
authenticated DNS response from one of those DTLS sessions, the other authenticated DNS response from one of those DTLS sessions, the other
DTLS session should be terminated. DTLS session should be terminated.
7. Usage 7. Usage
Two Usage Profiles, Strict and Opportunistic are explained in Two Usage Profiles, Strict and Opportunistic, are explained in
[I-D.ietf-dprive-dtls-and-tls-profiles]. Using encrypted DNS [DTLS]. The order of preference for DNS usage is as follows:
messages with an authenticated server is most preferred, encrypted
DNS messages with an unauthenticated server is next preferred, and 1. Encrypted DNS messages with an authenticated server
plain text DNS messages is least preferred.
2. Encrypted DNS messages with an unauthenticated server
3. Plaintext DNS messages
8. IANA Considerations 8. IANA Considerations
This specification uses port 853 already allocated in the IANA port This specification uses port 853 already allocated in the IANA port
number registry as defined in Section 6 of [RFC7858]. number registry as defined in Section 6 of [RFC7858].
9. Security Considerations 9. Security Considerations
The interaction between a DNS client and DNS server requires Datagram The interaction between a DNS client and a DNS server requires
Transport Layer Security (DTLS) with a ciphersuite offering Datagram Transport Layer Security (DTLS) with a ciphersuite offering
confidentiality protection. The guidance given in [RFC7525] MUST be confidentiality protection. The guidance given in [RFC7525] MUST be
followed to avoid attacks on DTLS. The DNS client SHOULD use the TLS followed to avoid attacks on DTLS. The DNS client SHOULD use the TLS
Certificate Status Request extension (Section 8 of [RFC6066]), Certificate Status Request extension (Section 8 of [RFC6066]),
commonly called "OCSP stapling" to check the revocation status of commonly called "OCSP stapling" to check the revocation status of the
public key certificate of the DNS server. OCSP stapling, unlike OCSP public key certificate of the DNS server. OCSP stapling, unlike OCSP
[RFC6960], does not suffer from scale and privacy issues. DNS [RFC6960], does not suffer from scale and privacy issues. DNS
clients keeping track of servers known to support DTLS enables clients keeping track of servers known to support DTLS enables
clients to detect downgrade attacks. To interfere with DNS-over- clients to detect downgrade attacks. To interfere with DNS over
DTLS, an on- or off-path attacker might send an ICMP message towards DTLS, an on- or off-path attacker might send an ICMP message towards
the DTLS client or DTLS server. As these ICMP messages cannot be the DTLS client or DTLS server. As these ICMP messages cannot be
authenticated, all ICMP errors should be treated as soft errors authenticated, all ICMP errors should be treated as soft errors
[RFC1122]. If the DNS query was sent over DTLS then the [RFC1122]. If the DNS query was sent over DTLS, then the
corresponding DNS response MUST only be accepted if it is received corresponding DNS response MUST only be accepted if it is received
over the same DTLS connection. This behavior mitigates all possible over the same DTLS connection. This behavior mitigates all possible
attacks described in Measures for Making DNS More Resilient against attacks described in Measures for Making DNS More Resilient against
Forged Answers [RFC5452]. Security considerations in [RFC6347] and Forged Answers [RFC5452]. The security considerations in [RFC6347]
[I-D.ietf-dprive-dtls-and-tls-profiles] are to be taken into account. and [DTLS] are to be taken into account.
A malicious client might attempt to perform a high number of DTLS A malicious client might attempt to perform a high number of DTLS
handshakes with a server. As the clients are not uniquely identified handshakes with a server. As the clients are not uniquely identified
by the protocol and can be obfuscated with IPv4 address sharing and by the protocol and can be obfuscated with IPv4 address sharing and
with IPv6 temporary addresses, a server needs to mitigate the impact with IPv6 temporary addresses, a server needs to mitigate the impact
of such an attack. Such mitigation might involve rate limiting of such an attack. Such mitigation might involve rate limiting
handshakes from a certain subnet or more advanced DoS/DDoS techniques handshakes from a certain subnet or more advanced DoS/DDoS techniques
beyond the scope of this paper. beyond the scope of this document.
10. Acknowledgements
Thanks to Phil Hedrick for his review comments on TCP and to Josh 10. References
Littlefield for pointing out DNS-over-DTLS load on busy servers (most
notably root servers). The authors would like to thank Simon
Josefsson, Daniel Kahn Gillmor, Bob Harold, Ilari Liusvaara, Sara
Dickinson, Christian Huitema, Stephane Bortzmeyer, Alexander
Mayrhofer, Allison Mankin, Jouni Korhonen, Stephen Farrell, Mirja
Kuehlewind, Benoit Claise and Geoff Huston for discussions and
comments on the design of DNS-over-DTLS. The authors would like to
give special thanks to Sara Dickinson for her help.
11. References 10.1. Normative References
11.1. Normative References
[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>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
skipping to change at page 11, line 15 skipping to change at page 11, line 15
[RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre,
"Recommendations for Secure Use of Transport Layer "Recommendations for Secure Use of Transport Layer
Security (TLS) and Datagram Transport Layer Security Security (TLS) and Datagram Transport Layer Security
(DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May
2015, <http://www.rfc-editor.org/info/rfc7525>. 2015, <http://www.rfc-editor.org/info/rfc7525>.
[RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830, [RFC7830] Mayrhofer, A., "The EDNS(0) Padding Option", RFC 7830,
DOI 10.17487/RFC7830, May 2016, DOI 10.17487/RFC7830, May 2016,
<http://www.rfc-editor.org/info/rfc7830>. <http://www.rfc-editor.org/info/rfc7830>.
11.2. Informative References 10.2. Informative References
[I-D.ietf-dprive-dtls-and-tls-profiles] [DTLS] Dickinson, S., Gillmor, D., and T. Reddy, "Authentication
Dickinson, S., Gillmor, D., and T. Reddy, "Authentication and (D)TLS Profile for DNS-over-(D)TLS", Work in
and (D)TLS Profile for DNS-over-(D)TLS", draft-ietf- Progress, draft-ietf-dprive-dtls-and-tls-profiles-08,
dprive-dtls-and-tls-profiles-07 (work in progress), January 2017.
October 2016.
[I-D.rescorla-tls-dtls13] [DTLS13] Rescorla, E. and H. Tschofenig, "The Datagram Transport
Rescorla, E. and H. Tschofenig, "The Datagram Transport Layer Security (DTLS) Protocol Version 1.3", Work in
Layer Security (DTLS) Protocol Version 1.3", draft- Progress, draft-rescorla-tls-dtls13-00, October 2016.
rescorla-tls-dtls13-00 (work in progress), October 2016.
[RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts -
Communication Layers", STD 3, RFC 1122, Communication Layers", STD 3, RFC 1122,
DOI 10.17487/RFC1122, October 1989, DOI 10.17487/RFC1122, October 1989,
<http://www.rfc-editor.org/info/rfc1122>. <http://www.rfc-editor.org/info/rfc1122>.
[RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS)
Extensions: Extension Definitions", RFC 6066, Extensions: Extension Definitions", RFC 6066,
DOI 10.17487/RFC6066, January 2011, DOI 10.17487/RFC6066, January 2011,
<http://www.rfc-editor.org/info/rfc6066>. <http://www.rfc-editor.org/info/rfc6066>.
skipping to change at page 12, line 39 skipping to change at page 13, line 5
[RFC7918] Langley, A., Modadugu, N., and B. Moeller, "Transport [RFC7918] Langley, A., Modadugu, N., and B. Moeller, "Transport
Layer Security (TLS) False Start", RFC 7918, Layer Security (TLS) False Start", RFC 7918,
DOI 10.17487/RFC7918, August 2016, DOI 10.17487/RFC7918, August 2016,
<http://www.rfc-editor.org/info/rfc7918>. <http://www.rfc-editor.org/info/rfc7918>.
[RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security [RFC7924] Santesson, S. and H. Tschofenig, "Transport Layer Security
(TLS) Cached Information Extension", RFC 7924, (TLS) Cached Information Extension", RFC 7924,
DOI 10.17487/RFC7924, July 2016, DOI 10.17487/RFC7924, July 2016,
<http://www.rfc-editor.org/info/rfc7924>. <http://www.rfc-editor.org/info/rfc7924>.
Acknowledgements
Thanks to Phil Hedrick for his review comments on TCP and to Josh
Littlefield for pointing out DNS over DTLS load on busy servers (most
notably root servers). The authors would like to thank Simon
Josefsson, Daniel Kahn Gillmor, Bob Harold, Ilari Liusvaara, Sara
Dickinson, Christian Huitema, Stephane Bortzmeyer, Alexander
Mayrhofer, Allison Mankin, Jouni Korhonen, Stephen Farrell, Mirja
Kuehlewind, Benoit Claise, and Geoff Huston for discussions and
comments on the design of DNS over DTLS. The authors would like to
give special thanks to Sara Dickinson for her help.
Authors' Addresses Authors' Addresses
Tirumaleswar Reddy Tirumaleswar Reddy
Cisco Systems, Inc. Cisco Systems, Inc.
Cessna Business Park, Varthur Hobli Cessna Business Park, Varthur Hobli
Sarjapur Marathalli Outer Ring Road Sarjapur Marathalli Outer Ring Road
Bangalore, Karnataka 560103 Bangalore, Karnataka 560103
India India
Email: tireddy@cisco.com Email: tireddy@cisco.com
skipping to change at page 13, line 4 skipping to change at page 13, line 27
Authors' Addresses Authors' Addresses
Tirumaleswar Reddy Tirumaleswar Reddy
Cisco Systems, Inc. Cisco Systems, Inc.
Cessna Business Park, Varthur Hobli Cessna Business Park, Varthur Hobli
Sarjapur Marathalli Outer Ring Road Sarjapur Marathalli Outer Ring Road
Bangalore, Karnataka 560103 Bangalore, Karnataka 560103
India India
Email: tireddy@cisco.com Email: tireddy@cisco.com
Dan Wing Dan Wing
Email: dwing-ietf@fuggles.com Email: dwing-ietf@fuggles.com
Prashanth Patil Prashanth Patil
Cisco Systems, Inc. Cisco Systems, Inc.
Bangalore
India
Email: praspati@cisco.com Email: praspati@cisco.com
 End of changes. 72 change blocks. 
209 lines changed or deleted 211 lines changed or added

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