draft-ietf-dnsop-qname-minimisation-09.txt   rfc7816.txt 
Domain Name System Operations (dnsop) Working Group S. Bortzmeyer Internet Engineering Task Force (IETF) S. Bortzmeyer
Internet-Draft AFNIC Request for Comments: 7816 AFNIC
Intended status: Experimental January 8, 2016 Category: Experimental March 2016
Expires: July 11, 2016 ISSN: 2070-1721
DNS query name minimisation to improve privacy DNS Query Name Minimisation to Improve Privacy
draft-ietf-dnsop-qname-minimisation-09
Abstract Abstract
This document describes a technique to improve DNS privacy, a This document describes a technique to improve DNS privacy, a
technique called "QNAME minimisation", where the DNS resolver no technique called "QNAME minimisation", where the DNS resolver no
longer sends the full original QNAME to the upstream name server. longer sends the full original QNAME to the upstream name server.
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 5741.
This Internet-Draft will expire on July 11, 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/rfc7816.
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
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 and background . . . . . . . . . . . . . . . . . 2 1. Introduction and Background .....................................2
2. QNAME minimisation . . . . . . . . . . . . . . . . . . . . . 3 2. QNAME Minimisation ..............................................3
3. Possible issues . . . . . . . . . . . . . . . . . . . . . . . 4 3. Possible Issues .................................................4
4. Protocol and compatibility discussion . . . . . . . . . . . . 5 4. Protocol and Compatibility Discussion ...........................5
5. Operational considerations . . . . . . . . . . . . . . . . . 5 5. Operational Considerations ......................................5
6. Performance considerations . . . . . . . . . . . . . . . . . 6 6. Performance Considerations ......................................6
7. On the experimentation . . . . . . . . . . . . . . . . . . . 6 7. On the Experimentation ..........................................6
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 8. Security Considerations .........................................7
9. Security Considerations . . . . . . . . . . . . . . . . . . . 7 9. References ......................................................7
10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 7 9.1. Normative References .......................................7
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 9.2. Informative References .....................................8
11.1. Normative References . . . . . . . . . . . . . . . . . . 7 Appendix A. An Algorithm to Perform QNAME Minimisation .............9
11.2. Informative References . . . . . . . . . . . . . . . . . 8 Appendix B. Alternatives .........................................10
11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Acknowledgments ...................................................11
Appendix A. An algorithm to perform QNAME minimisation . . . . . 9 Author's Address ..................................................11
Appendix B. Alternatives . . . . . . . . . . . . . . . . . . . . 10
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 10
1. Introduction and background 1. Introduction and Background
The problem statement is described in [RFC7626]. The terminology The problem statement is described in [RFC7626]. The terminology
("QNAME", "resolver", etc) is also defined in this companion ("QNAME", "resolver", etc.) is also defined in this companion
document. This specific solution is not intended to fully solve the document. This specific solution is not intended to fully solve
DNS privacy problem; instead, it should be viewed as one tool amongst the DNS privacy problem; instead, it should be viewed as one tool
many. amongst many.
QNAME minimisation follows the principle explained in section 6.1 of QNAME minimisation follows the principle explained in Section 6.1 of
[RFC6973]: the less data you send out, the fewer privacy problems you [RFC6973]: the less data you send out, the fewer privacy problems
have. you have.
Currently, when a resolver receives the query "What is the AAAA Currently, when a resolver receives the query "What is the AAAA
record for www.example.com?", it sends to the root (assuming a cold record for www.example.com?", it sends to the root (assuming a cold
resolver, whose cache is empty) the very same question. Sending the resolver, whose cache is empty) the very same question. Sending the
full QNAME to the authoritative name server is a tradition, not a full QNAME to the authoritative name server is a tradition, not a
protocol requirement. This tradition comes [mockapetris-history] protocol requirement. In a conversation with the author in
from a desire to optimize the number of requests, when the same name January 2015, Paul Mockapetris explained that this tradition comes
server is authoritative for many zones in a given name (something from a desire to optimise the number of requests, when the same
which was more common in the old days, where the same name servers name server is authoritative for many zones in a given name
served .com and the root) or when the same name server is both (something that was more common in the old days, where the same
recursive and authoritative (something which is strongly discouraged name servers served .com and the root) or when the same name server
now). Whatever the merits of this choice at this time, the DNS is is both recursive and authoritative (something that is strongly
quite different now. discouraged now). Whatever the merits of this choice at this time,
the DNS is quite different now.
2. QNAME minimisation 2. QNAME Minimisation
The idea is to minimise the amount of data sent from the DNS resolver The idea is to minimise the amount of data sent from the DNS resolver
to the authoritative name server. In the example in the previous to the authoritative name server. In the example in the previous
section, sending "What are the NS records for .com?" would have been section, sending "What are the NS records for .com?" would have been
sufficient (since it will be the answer from the root anyway). The sufficient (since it will be the answer from the root anyway). The
rest of this section describes the recommended way to do QNAME rest of this section describes the recommended way to do QNAME
minimisation, the one which maximimes privacy benefits (other minimisation -- the way that maximises privacy benefits (other
alternatives are discussed in appendixes). alternatives are discussed in the appendices).
A resolver which implements QNAME minimisation, and which does not Instead of sending the full QNAME and the original QTYPE upstream, a
have already the answer in its cache, instead of sending the full resolver that implements QNAME minimisation and does not already have
QNAME and the original QTYPE upstream, sends a request to the name the answer in its cache sends a request to the name server
server authoritative for the closest known ancestor of the original authoritative for the closest known ancestor of the original QNAME.
QNAME. The request is done with: The request is done with:
the QTYPE NS, o the QTYPE NS
the QNAME which is the original QNAME, stripped to just one label o the QNAME that is the original QNAME, stripped to just one label
more than the zone for which the server is authoritative. more than the zone for which the server is authoritative
For example, a resolver receives a request to resolve For example, a resolver receives a request to resolve
foo.bar.baz.example. Let's assume it already knows that foo.bar.baz.example. Let's assume that it already knows that
ns1.nic.example is authoritative for .example and the resolver does ns1.nic.example is authoritative for .example and the resolver does
not know a more specific authoritative name server. It will send the not know a more specific authoritative name server. It will send the
query QTYPE=NS,QNAME=baz.example to ns1.nic.example. query QTYPE=NS,QNAME=baz.example to ns1.nic.example.
The minimising resolver works perfectly when it knows the zone cut The minimising resolver works perfectly when it knows the zone cut
(zone cuts are described in section 6 of [RFC2181]). But zone cuts (zone cuts are described in Section 6 of [RFC2181]). But zone cuts
do not necessarily exist at every label boundary. If we take the do not necessarily exist at every label boundary. If we take the
name www.foo.bar.example, it is possible that there is a zone cut name www.foo.bar.example, it is possible that there is a zone cut
between "foo" and "bar" but not between "bar" and "example". So, between "foo" and "bar" but not between "bar" and "example". So,
assuming the resolver already knows the name servers of .example, assuming that the resolver already knows the name servers of
when it receives the query "What is the AAAA record of .example, when it receives the query "What is the AAAA record of
www.foo.bar.example", it does not always know where the zone cut will www.foo.bar.example?", it does not always know where the zone cut
be. To find it out, it will query the .example name servers for the will be. To find the zone cut, it will query the .example
NS records for bar.example. It will get a NODATA response, name servers for the NS records for bar.example. It will get a
indicating there is no zone cut at that point, so it has to to query NODATA response, indicating that there is no zone cut at that point,
the .example name servers again with one more label, and so on. so it has to query the .example name servers again with one more
(Appendix A describes this algorithm in deeper details.) label, and so on. (Appendix A describes this algorithm in deeper
detail.)
Since the information about the zone cuts will be stored in the Since the information about the zone cuts will be stored in the
resolver's cache, the performance cost is probably reasonable. resolver's cache, the performance cost is probably reasonable.
Section 6 discusses this performance discrepancy further. Section 6 discusses this performance discrepancy further.
Note that DNSSEC-validating resolvers already have access to this Note that DNSSEC-validating resolvers already have access to this
information, since they have to know the zone cut (the DNSKEY record information, since they have to know the zone cut (the DNSKEY record
set is just below, the DS record set just above). set is just below; the DS record set is just above).
3. Possible issues 3. Possible Issues
QNAME minimisation is legal, since the original DNS RFC do not QNAME minimisation is legal, since the original DNS RFCs do not
mandate sending the full QNAME. So, in theory, it should work mandate sending the full QNAME. So, in theory, it should work
without any problems. However, in practice, some problems may occur without any problems. However, in practice, some problems may occur
(see an analysis in [huque-qnamemin] and an interesting discussion in (see [Huque-QNAME-Min] for an analysis and [Huque-QNAME-storify] for
[huque-qnamestorify]). an interesting discussion on this topic).
Some broken name servers do not react properly to qtype=NS requests. Some broken name servers do not react properly to QTYPE=NS requests.
For instance, some authoritative name servers embedded in load For instance, some authoritative name servers embedded in load
balancers reply properly to A queries but send REFUSED to NS queries. balancers reply properly to A queries but send REFUSED to NS queries.
This behaviour is a protocol violation, and there is no need to stop This behaviour is a protocol violation, and there is no need to stop
improving the DNS because of such behaviour. However, QNAME improving the DNS because of such behaviour. However, QNAME
minimisation may still work with such domains since they are only minimisation may still work with such domains, since they are only
leaf domains (no need to send them NS requests). Such setup breaks leaf domains (no need to send them NS requests). Such a setup breaks
more than just QNAME minimisation. It breaks negative answers, since more than just QNAME minimisation. It breaks negative answers, since
the servers don't return the correct SOA, and it also breaks anything the servers don't return the correct SOA, and it also breaks anything
dependent upon NS and SOA records existing at the top of the zone. dependent upon NS and SOA records existing at the top of the zone.
Another way to deal with such incorrect name servers would be to try Another way to deal with such incorrect name servers would be to try
with QTYPE=A requests (A being chosen because it is the most common with QTYPE=A requests (A being chosen because it is the most common
and hence a qtype which will be always accepted, while a qtype NS may and hence a QTYPE that will always be accepted, while a QTYPE NS may
ruffle the feathers of some middleboxes). Instead of querying name ruffle the feathers of some middleboxes). Instead of querying
servers with a query "NS example.com", we could use "A _.example.com" name servers with a query "NS example.com", we could use
and see if we get a referral. "A _.example.com" and see if we get a referral.
A problem can also appear when a name server does not react properly A problem can also appear when a name server does not react properly
to ENT (Empty Non-Terminals). If ent.example.com has no resource to ENTs (Empty Non-Terminals). If ent.example.com has no resource
records but foobar.ent.example.com does, then ent.example.com is an records but foobar.ent.example.com does, then ent.example.com is an
ENT. A query, whatever the qtype, for ent.example.com must return ENT. Whatever the QTYPE, a query for ent.example.com must return
NODATA (NOERROR / ANSWER: 0). However, some name servers incorrectly NODATA (NOERROR / ANSWER: 0). However, some name servers incorrectly
return NXDOMAIN for ENTs. If a resolver queries only return NXDOMAIN for ENTs. If a resolver queries only
foobar.ent.example.com, everything will be OK but, if it implements foobar.ent.example.com, everything will be OK, but if it implements
QNAME minimisation, it may query ent.example.com and get a NXDOMAIN. QNAME minimisation, it may query ent.example.com and get an NXDOMAIN.
See also section 3 of [I-D.vixie-dnsext-resimprove] for the other bad See also Section 3 of [DNS-Res-Improve] for the other bad
consequences of this bad behaviour. consequences of this bad behaviour.
A possible solution, currently implemented in Knot, is to retry with A possible solution, currently implemented in Knot, is to retry with
the full query when you receive a NXDOMAIN. It works but it is not the full query when you receive an NXDOMAIN. It works, but it is not
ideal for privacy. ideal for privacy.
Other practices that do not conform to the DNS protocol standards may Other practices that do not conform to the DNS protocol standards may
pose a problem: there is a common DNS trick used by some Web hosters pose a problem: there is a common DNS trick used by some web hosters
that also do DNS hosting that exploits the fact that the DNS protocol that also do DNS hosting that exploits the fact that the DNS protocol
(pre-DNSSEC) allows certain serious misconfigurations, such as parent (pre-DNSSEC) allows certain serious misconfigurations, such as parent
and child zones disagreeing on the location of a zone cut. and child zones disagreeing on the location of a zone cut.
Basically, they have a single zone with wildcards for each TLD like: Basically, they have a single zone with wildcards for each TLD, like:
*.example. 60 IN A 192.0.2.6 *.example. 60 IN A 192.0.2.6
(They could just wildcard all of "*.", which would be sufficient. We (They could just wildcard all of "*.", which would be sufficient. We
don't know why they don't do it.) don't know why they don't do it.)
This lets them have many Web hosting customers without having to This lets them have many web-hosting customers without having to
configure thousands of individual zones on their nameservers. They configure thousands of individual zones on their name servers. They
just tell the prospective customer to point their NS records at the just tell the prospective customer to point their NS records at the
hoster's nameservers, and the Web hoster doesn't have to provision hoster's name servers, and the web hoster doesn't have to provision
anything in order to make the customer's domain resolve. NS queries anything in order to make the customer's domain resolve. NS queries
to the hoster will therefore not give the right result, which may to the hoster will therefore not give the right result, which may
endanger QNAME minimisation (it will be a problem for DNSSEC, too). endanger QNAME minimisation (it will be a problem for DNSSEC, too).
4. Protocol and compatibility discussion 4. Protocol and Compatibility Discussion
QNAME minimisation is compatible with the current DNS system and QNAME minimisation is compatible with the current DNS system and
therefore can easily be deployed; since it is a unilateral change to therefore can easily be deployed; since it is a unilateral change to
the resolver, it does not change the protocol. (Because it is an the resolver, it does not change the protocol. (Because it is a
unilateral change, resolver implementers may do QNAME minimisation in unilateral change, resolver implementers may do QNAME minimisation in
slightly different ways, see the appendices for examples.) slightly different ways; see the appendices for examples.)
One should note that the behaviour suggested here (minimising the One should note that the behaviour suggested here (minimising the
amount of data sent in QNAMEs from the resolver) is NOT forbidden by amount of data sent in QNAMEs from the resolver) is NOT forbidden by
the [RFC1034] (section 5.3.3) or [RFC1035] (section 7.2). As said in Section 5.3.3 of [RFC1034] or Section 7.2 of [RFC1035]. As stated in
Section 1, the current method, sending the full QNAME, is not Section 1, the current method, sending the full QNAME, is not
mandated by the DNS protocol. mandated by the DNS protocol.
It may be noticed that many documents explaining the DNS and intended One may notice that many documents that explain the DNS and that are
for a wide audience, incorrectly describe the resolution process as intended for a wide audience incorrectly describe the resolution
using QNAME minimisation, for instance by showing a request going to process as using QNAME minimisation (e.g., by showing a request going
the root, with just the TLD in the query. As a result, these to the root, with just the TLD in the query). As a result, these
documents may confuse the privacy analysis of the users who see them. documents may confuse readers that use them for privacy analysis.
5. Operational considerations 5. Operational Considerations
The administrators of the forwarders, and of the authoritative name The administrators of the forwarders, and of the authoritative
servers, will get less data, which will reduce the utility of the name servers, will get less data, which will reduce the utility of
statistics they can produce (such as the percentage of the various the statistics they can produce (such as the percentage of the
QTYPEs) [kaliski-minimum]. various QTYPEs) [Kaliski-Minimum].
DNS administrators are reminded that the data on DNS requests that DNS administrators are reminded that the data on DNS requests that
they store may have legal consequences, depending on your they store may have legal consequences, depending on your
jurisdiction (check with your local lawyer). jurisdiction (check with your local lawyer).
6. Performance considerations 6. Performance Considerations
The main goal of QNAME minimisation is to improve privacy by sending The main goal of QNAME minimisation is to improve privacy by sending
less data. However, it may have other advantages. For instance, if less data. However, it may have other advantages. For instance, if
a root name server receives a query from some resolver for A.example a root name server receives a query from some resolver for A.example
followed by B.example followed by C.example, the result will be three followed by B.example followed by C.example, the result will be three
NXDOMAINs, since .example does not exist in the root zone. Under NXDOMAINs, since .example does not exist in the root zone. Under
query name minimisation, the root name servers would hear only one query name minimisation, the root name servers would hear only one
question (for .example itself) to which they could answer NXDOMAIN, question (for .example itself) to which they could answer NXDOMAIN,
thus opening up a negative caching opportunity in which the full thus opening up a negative caching opportunity in which the full
resolver could know a priori that neither B.example or C.example resolver could know a priori that neither B.example nor C.example
could exist. Thus in this common case the total number of upstream could exist. Thus, in this common case the total number of upstream
queries under QNAME minimisation would be counter-intuitively less queries under QNAME minimisation would be counterintuitively less
than the number of queries under the traditional iteration (as than the number of queries under the traditional iteration (as
described in the DNS standard). described in the DNS standard).
QNAME minimisation may also improve look-up performance for TLD QNAME minimisation may also improve lookup performance for TLD
operators. For a typical TLD, delegation-only, and with delegations operators. For a typical TLD, delegation-only, and with delegations
just under the TLD, a 2-label QNAME query is optimal for finding the just under the TLD, a two-label QNAME query is optimal for finding
delegation owner name. the delegation owner name.
QNAME minimisation can decrease performance in some cases, for QNAME minimisation can decrease performance in some cases -- for
instance for a deep domain name (like instance, for a deep domain name (like
www.host.group.department.example.com where www.host.group.department.example.com, where
host.group.department.example.com is hosted on example.com's name host.group.department.example.com is hosted on example.com's
servers). Let's assume a resolver which knows only the name servers name servers). Let's assume a resolver that knows only the
of .example. Without QNAME minimisation, it would send these name servers of .example. Without QNAME minimisation, it would send
.example nameservers a query for these .example name servers a query for
www.host.group.department.example.com and immediately get a specific www.host.group.department.example.com and immediately get a specific
referral or an answer, without the need for more queries to probe for referral or an answer, without the need for more queries to probe for
the zone cut. For such a name, a cold resolver with QNAME the zone cut. For such a name, a cold resolver with QNAME
minimisation will, depending how QNAME minimisation is implemented, minimisation will, depending on how QNAME minimisation is
send more queries, one per label. Once the cache is warm, there will implemented, send more queries, one per label. Once the cache is
be no difference with a traditional resolver. Actual testing is warm, there will be no difference with a traditional resolver.
described in [huque-qnamemin]. Such deep domains are specially Actual testing is described in [Huque-QNAME-Min]. Such deep domains
common under ip6.arpa. are especially common under ip6.arpa.
7. On the experimentation 7. On the Experimentation
This document has status "Experimental". Since the beginning of time This document has status "Experimental". Since the beginning of time
(or DNS), the fully qualified host name was always sent to the (or DNS), the fully qualified host name was always sent to the
authoritative name servers. There was a concern that changing this authoritative name servers. There was a concern that changing this
behavior may engage the Law of Unintended Consequences. Hence this behaviour may engage the Law of Unintended Consequences -- hence this
status. status.
The idea about the experiment is to observe QNAME minimisation in The idea behind the experiment is to observe QNAME minimisation in
action with multiple resolvers, various authoritative name servers, action with multiple resolvers, various authoritative name servers,
etc. etc.
8. IANA Considerations 8. Security Considerations
This document has no actions for IANA.
9. Security Considerations
QNAME minimisation's benefits are clear in the case where you want to QNAME minimisation's benefits are clear in the case where you want to
decrease exposure to the authoritative name server. But minimising decrease exposure to the authoritative name server. But minimising
the amount of data sent also, in part, addresses the case of a wire the amount of data sent also, in part, addresses the case of a wire
sniffer as well as the case of privacy invasion by the servers. sniffer as well as the case of privacy invasion by the servers.
(Encryption is of course a better defense against wire sniffers but, (Encryption is of course a better defense against wire sniffers, but,
unlike QNAME minimisation, it changes the protocol and cannot be unlike QNAME minimisation, it changes the protocol and cannot be
deployed unilaterally. Also, the effect of QNAME minimisation on deployed unilaterally. Also, the effect of QNAME minimisation on
wire sniffers depends on whether the sniffer is, on the DNS path.) wire sniffers depends on whether the sniffer is on the DNS path.)
QNAME minimisation offers zero protection against the recursive QNAME minimisation offers zero protection against the recursive
resolver, which still sees the full request coming from the stub resolver, which still sees the full request coming from the stub
resolver. resolver.
All the alternatives mentioned in Appendix B decrease privacy in the All the alternatives mentioned in Appendix B decrease privacy in the
hope of improving performance. They must not be used if you want the hope of improving performance. They must not be used if you want
maximum privacy. maximum privacy.
10. Acknowledgments 9. References
Thanks to Olaf Kolkman for the original idea during a KLM flight from
Amsterdam to Vancouver, although the concept is probably much older
[1]. Thanks for Shumon Huque and Marek Vavrusa for implementation
and testing. Thanks to Mark Andrews and Francis Dupont for the
interesting discussions. Thanks to Brian Dickson, Warren Kumari,
Evan Hunt and David Conrad for remarks and suggestions. Thanks to
Mohsen Souissi for proofreading. Thanks to Tony Finch for the zone
cut algorithm in Appendix A and for discussion of the algorithm.
Thanks to Paul Vixie for pointing out that there are practical
advantages (besides privacy) to QNAME minimisation. Thanks to
Phillip Hallam-Baker for the fallback on A queries, to deal with
broken servers. Thanks to Robert Edmonds for an interesting anti-
pattern.
11. References
11.1. Normative References 9.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>.
[RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J.,
Morris, J., Hansen, M., and R. Smith, "Privacy Morris, J., Hansen, M., and R. Smith, "Privacy
Considerations for Internet Protocols", RFC 6973, DOI Considerations for Internet Protocols", RFC 6973,
10.17487/RFC6973, July 2013, DOI 10.17487/RFC6973, July 2013,
<http://www.rfc-editor.org/info/rfc6973>. <http://www.rfc-editor.org/info/rfc6973>.
[RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626, [RFC7626] Bortzmeyer, S., "DNS Privacy Considerations", RFC 7626,
DOI 10.17487/RFC7626, August 2015, DOI 10.17487/RFC7626, August 2015,
<http://www.rfc-editor.org/info/rfc7626>. <http://www.rfc-editor.org/info/rfc7626>.
11.2. Informative References 9.2. Informative References
[RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS
Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997,
<http://www.rfc-editor.org/info/rfc2181>.
[I-D.wkumari-dnsop-hammer]
Kumari, W., Arends, R., Woolf, S., and D. Migault, "Highly
Automated Method for Maintaining Expiring Records", draft-
wkumari-dnsop-hammer-01 (work in progress), July 2014.
[I-D.vixie-dnsext-resimprove] [DNS-Res-Improve]
Vixie, P., Joffe, R., and F. Neves, "Improvements to DNS Vixie, P., Joffe, R., and F. Neves, "Improvements to DNS
Resolvers for Resiliency, Robustness, and Responsiveness", Resolvers for Resiliency, Robustness, and Responsiveness",
draft-vixie-dnsext-resimprove-00 (work in progress), June Work in Progress, draft-vixie-dnsext-resimprove-00,
2010. June 2010.
[mockapetris-history]
Mockapetris, P., "Private discussion", January 2015.
[kaliski-minimum] [HAMMER] Kumari, W., Arends, R., Woolf, S., and D. Migault, "Highly
Kaliski, B., "Minimum Disclosure: What Information Does a Automated Method for Maintaining Expiring Records", Work
Name Server Need to Do Its Job?", March 2015, in Progress, draft-wkumari-dnsop-hammer-01, July 2014.
<http://blogs.verisigninc.com/blog/entry/
minimum_disclosure_what_information_does>.
[huque-qnamemin] [Huque-QNAME-Min]
Huque, S., "Query name minimization and authoritative Huque, S., "Query name minimization and authoritative
server behavior", May 2015, <https://indico.dns- server behavior", May 2015,
oarc.net/event/21/contribution/9>. <https://indico.dns-oarc.net/event/21/contribution/9>.
[huque-qnamestorify] [Huque-QNAME-storify]
Huque, S., "Qname Minimization @ DNS-OARC", May 2015, Huque, S., "Qname Minimization @ DNS-OARC", May 2015,
<https://storify.com/shuque/qname-minimization-dns-oarc>. <https://storify.com/shuque/qname-minimization-dns-oarc>.
11.3. URIs [Kaliski-Minimum]
Kaliski, B., "Minimum Disclosure: What Information Does a
Name Server Need to Do Its Job?", March 2015,
<http://blogs.verisigninc.com/blog/entry/
minimum_disclosure_what_information_does>.
[1] https://lists.dns-oarc.net/pipermail/dns- [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS
operations/2010-February/005003.html Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997,
<http://www.rfc-editor.org/info/rfc2181>.
Appendix A. An algorithm to perform QNAME minimisation Appendix A. An Algorithm to Perform QNAME Minimisation
This algorithm performs name resolution with QNAME minimisation in This algorithm performs name resolution with QNAME minimisation in
presence of not-yet-known zone cuts. the presence of zone cuts that are not yet known.
Although a validating resolver already has the logic to find the zone Although a validating resolver already has the logic to find the
cut, other resolvers may be interested by this algorithm to follow in zone cuts, implementers of other resolvers may want to use this
order to locate the cuts. This is just a possible help for algorithm to locate the cuts. This is just a possible aid for
implementors, it is not intended to be normative: implementers; it is not intended to be normative:
(0) If the query can be answered from the cache, do so, otherwise (0) If the query can be answered from the cache, do so; otherwise,
iterate as follows: iterate as follows:
(1) Find closest enclosing NS RRset in your cache. The owner of (1) Find the closest enclosing NS RRset in your cache. The owner of
this NS RRset will be a suffix of the QNAME - the longest suffix this NS RRset will be a suffix of the QNAME -- the longest suffix
of any NS RRset in the cache. Call this ANCESTOR. of any NS RRset in the cache. Call this ANCESTOR.
(2) Initialize CHILD to the same as ANCESTOR. (2) Initialise CHILD to the same as ANCESTOR.
(3) If CHILD is the same as the QNAME, resolve the original query (3) If CHILD is the same as the QNAME, resolve the original query
using ANCESTOR's name servers, and finish. using ANCESTOR's name servers, and finish.
(4) Otherwise, add a label from the QNAME to the start of CHILD. (4) Otherwise, add a label from the QNAME to the start of CHILD.
(5) If you have a negative cache entry for the NS RRset at CHILD, (5) If you have a negative cache entry for the NS RRset at CHILD, go
go back to step 3. back to step 3.
(6) Query for CHILD IN NS using ANCESTOR's name servers. The (6) Query for CHILD IN NS using ANCESTOR's name servers. The
response can be: response can be:
(6a) A referral. Cache the NS RRset from the authority section (6a) A referral. Cache the NS RRset from the authority section,
and go back to step 1. and go back to step 1.
(6b) An authoritative answer. Cache the NS RRset from the (6b) An authoritative answer. Cache the NS RRset from the
answer section and go back to step 1. answer section, and go back to step 1.
(6c) An NXDOMAIN answer. Return an NXDOMAIN answer in response (6c) An NXDOMAIN answer. Return an NXDOMAIN answer in response
to the original query and stop. to the original query, and stop.
(6d) A NOERROR/NODATA answer. Cache this negative answer and (6d) A NOERROR/NODATA answer. Cache this negative answer, and
go back to step 3. go back to step 3.
Appendix B. Alternatives Appendix B. Alternatives
Remember that QNAME minimisation is unilateral so a resolver is not Remember that QNAME minimisation is unilateral, so a resolver is not
forced to implement it exactly as described here. forced to implement it exactly as described here.
There are several ways to perform QNAME minimisation. The one in There are several ways to perform QNAME minimisation. See Section 2
Section 2 is the suggested one. It can be called the aggressive for the suggested way. It can be called the aggressive algorithm,
algorithm, since the resolver only sends NS queries as long as it since the resolver only sends NS queries as long as it does not know
does not know the zone cuts. This is the safest, from a privacy the zone cuts. This is the safest, from a privacy point of view.
point of view. Another possible algorithm, not fully studied at this Another possible algorithm, not fully studied at this time, could be
time, could be to "piggyback" on the traditional resolution code. At to "piggyback" on the traditional resolution code. At startup, it
startup, it sends traditional full QNAMEs and learns the zone cuts sends traditional full QNAMEs and learns the zone cuts from the
from the referrals received, then switches to NS queries asking only referrals received, then switches to NS queries asking only for the
for the minimum domain name. This leaks more data but could require minimum domain name. This leaks more data but could require fewer
fewer changes in the existing resolver codebase. changes in the existing resolver codebase.
In the above specification, the original QTYPE is replaced by NS (or In the above specification, the original QTYPE is replaced by NS (or
may be A, if too many servers react incorrectly to NS requests), may be A, if too many servers react incorrectly to NS requests); this
which is the best approach to preserve privacy. But this erases is the best approach to preserve privacy. But this erases
information about the relative use of the various QTYPEs, which may information about the relative use of the various QTYPEs, which may
be interesting for researchers (for instance if they try to follow be interesting for researchers (for instance, if they try to follow
IPv6 deployment by counting the percentage of AAAA vs. A queries). A IPv6 deployment by counting the percentage of AAAA vs. A queries). A
variant of QNAME minimisation would be to keep the original QTYPE. variant of QNAME minimisation would be to keep the original QTYPE.
Another useful optimisation may be, in the spirit of the HAMMER idea Another useful optimisation may be, in the spirit of the HAMMER idea
[I-D.wkumari-dnsop-hammer] to probe in advance for the introduction [HAMMER], to probe in advance for the introduction of zone cuts where
of zone cuts where none previously existed (i.e. confirm their none previously existed (i.e., confirm their continued absence, or
continued absence, or discover them.) discover them).
To address the "number of queries" issue, described in Section 6, a To address the "number of queries" issue described in Section 6, a
possible solution is to always use the traditional algorithm when the possible solution is to always use the traditional algorithm when the
cache is cold and then to move to QNAME minimisation (precisely cache is cold and then to move to QNAME minimisation (precisely
defining what is "hot" or "cold" is left to the implementer). This defining what is "hot" or "cold" is left to the implementer). This
will decrease the privacy but will guarantee no degradation of will decrease the privacy but will guarantee no degradation of
performance. performance.
Acknowledgments
Thanks to Olaf Kolkman for the original idea during a KLM flight from
Amsterdam to Vancouver, although the concept is probably much older
(e.g., <https://lists.dns-oarc.net/pipermail/dns-operations/
2010-February/005003.html>). Thanks to Shumon Huque and Marek
Vavrusa for implementation and testing. Thanks to Mark Andrews and
Francis Dupont for the interesting discussions. Thanks to Brian
Dickson, Warren Kumari, Evan Hunt, and David Conrad for remarks and
suggestions. Thanks to Mohsen Souissi for proofreading. Thanks to
Tony Finch for the zone cut algorithm in Appendix A and for
discussion of the algorithm. Thanks to Paul Vixie for pointing out
that there are practical advantages (besides privacy) to QNAME
minimisation. Thanks to Phillip Hallam-Baker for the fallback on
A queries, to deal with broken servers. Thanks to Robert Edmonds for
an interesting anti-pattern.
Author's Address Author's Address
Stephane Bortzmeyer Stephane Bortzmeyer
AFNIC AFNIC
1, rue Stephenson 1, rue Stephenson
Montigny-le-Bretonneux 78180 Montigny-le-Bretonneux 78180
France France
Phone: +33 1 39 30 83 46 Phone: +33 1 39 30 83 46
Email: bortzmeyer+ietf@nic.fr Email: bortzmeyer+ietf@nic.fr
 End of changes. 86 change blocks. 
232 lines changed or deleted 220 lines changed or added

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