draft-ietf-dnsop-rfc7816bis-03.txt   draft-ietf-dnsop-rfc7816bis-04.txt 
Network Working Group S. Bortzmeyer Network Working Group S. Bortzmeyer
Internet-Draft AFNIC Internet-Draft AFNIC
Obsoletes: 7816 (if approved) R. Dolmans Obsoletes: 7816 (if approved) R. Dolmans
Intended status: Standards Track NLnet Labs Intended status: Standards Track NLnet Labs
Expires: September 7, 2020 P. Hoffman Expires: September 10, 2020 P. Hoffman
ICANN ICANN
March 6, 2020 March 9, 2020
DNS Query Name Minimisation to Improve Privacy DNS Query Name Minimisation to Improve Privacy
draft-ietf-dnsop-rfc7816bis-03 draft-ietf-dnsop-rfc7816bis-04
Abstract Abstract
This document describes techniques called "QNAME minimisation" to This document describes techniques called "QNAME minimisation" to
improve DNS privacy, where the DNS resolver no longer always sends improve DNS privacy, where the DNS resolver no longer always sends
the full original QNAME to the upstream name server. This document the full original QNAME to the upstream name server. This document
obsoletes RFC 7816. obsoletes RFC 7816.
This document is part of the IETF DNSOP (DNS Operations) Working This document is part of the IETF DNSOP (DNS Operations) Working
Group. The source of the document, as well as a list of open issues, Group. The source of the document, as well as a list of open issues,
skipping to change at page 1, line 46 skipping to change at page 1, line 46
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 7, 2020. This Internet-Draft will expire on September 10, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 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
(https://trustee.ietf.org/license-info) in effect on the date of (https://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 26 skipping to change at page 2, line 26
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
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. Description of QNAME Minimisation . . . . . . . . . . . . . . 3 2. Description of QNAME Minimisation . . . . . . . . . . . . . . 3
2.1. Algorithm to Perform Aggressive Method QNAME Minimisation 5 2.1. Algorithm to Perform Aggressive Method QNAME Minimisation 5
3. QNAME Minimisation Examples . . . . . . . . . . . . . . . . . 5 3. QNAME Minimisation Examples . . . . . . . . . . . . . . . . . 6
4. Limit number of queries . . . . . . . . . . . . . . . . . . . 6 4. Limit number of queries . . . . . . . . . . . . . . . . . . . 7
5. Operational Considerations . . . . . . . . . . . . . . . . . 7 5. Operational Considerations . . . . . . . . . . . . . . . . . 8
6. Performance Considerations . . . . . . . . . . . . . . . . . 9 6. Performance Considerations . . . . . . . . . . . . . . . . . 10
7. Alternative Methods for QNAME Minimisation . . . . . . . . . 10 7. Alternative Methods for QNAME Minimisation . . . . . . . . . 10
8. Results of the Experimentation . . . . . . . . . . . . . . . 10 8. Results of the Experimentation . . . . . . . . . . . . . . . 11
9. Security Considerations . . . . . . . . . . . . . . . . . . . 10 9. Security Considerations . . . . . . . . . . . . . . . . . . . 11
10. Implementation Status . . . . . . . . . . . . . . . . . . . . 11 10. Implementation Status . . . . . . . . . . . . . . . . . . . . 11
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 12
11.1. Normative References . . . . . . . . . . . . . . . . . . 12 11.1. Normative References . . . . . . . . . . . . . . . . . . 12
11.2. Informative References . . . . . . . . . . . . . . . . . 13 11.2. Informative References . . . . . . . . . . . . . . . . . 13
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 14 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 15
Changes from RFC 7816 . . . . . . . . . . . . . . . . . . . . . . 14 Changes from RFC 7816 . . . . . . . . . . . . . . . . . . . . . . 15
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15
1. Introduction and Background 1. Introduction and Background
The problem statement for this document and its predecessor [RFC7816] The problem statement for this document and its predecessor [RFC7816]
is described in [I-D.bortzmeyer-dprive-rfc7626-bis]. The terminology is described in [I-D.bortzmeyer-dprive-rfc7626-bis]. The terminology
("QNAME", "resolver", etc.) is defined in ("QNAME", "resolver", etc.) is defined in
[I-D.ietf-dnsop-terminology-bis]. This specific solution is not [I-D.ietf-dnsop-terminology-bis]. This specific solution is not
intended to fully solve the DNS privacy problem; instead, it should intended to fully solve the DNS privacy problem; instead, it should
be viewed as one tool amongst many. be viewed as one tool amongst many.
skipping to change at page 3, line 43 skipping to change at page 3, line 43
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
2. Description of QNAME Minimisation 2. Description of QNAME Minimisation
The idea behind QNAME minimisation is to minimise the amount of The idea behind QNAME minimisation is to minimise the amount of
privacy sensitive data sent from the DNS resolver to the privacy sensitive data sent from the DNS resolver to the
authoritative name server. This section describes the RECOMMENDED authoritative name server. This section describes the RECOMMENDED
way to do QNAME minimisation -- the way that maximises privacy way to do QNAME minimisation -- the way that maximises privacy
benefits. That algorithm is summarized in Section 2.1. benefits. That algorithm is summarised in Section 2.1.
When a resolver is not able to answer a query from cache it has to When a resolver is not able to answer a query from cache it has to
send a query to an authoritative nameserver. Traditionally these send a query to an authoritative nameserver. Traditionally these
queries would contain the full QNAME and the original QTYPE as queries would contain the full QNAME and the original QTYPE as
received in the client query. The full QNAME and original QTYPE are received in the client query. The full QNAME and original QTYPE are
only needed at the nameserver that is authoritative for the record only needed at the nameserver that is authoritative for the record
requested by the client. All other nameservers queried while requested by the client. All other nameservers queried while
resolving the query only need to receive enough of the QNAME to be resolving the query only need to receive enough of the QNAME to be
able to answer with a delegation. The QTYPE in these queries is not able to answer with a delegation. The QTYPE in these queries is not
relevant, as the nameserver is not authoritative to answer with the relevant, as the nameserver is not able to authoritatively answer the
records the client is looking for. Sending the full QNAME and records the client is looking for. Sending the full QNAME and
original QTYPE to these nameservers therefore exposes more privacy original QTYPE to these nameservers therefore exposes more privacy
sensitive data than necessary to resolve the client's request. A sensitive data than necessary to resolve the client's request. A
resolver that implements QNAME minimisation changes the QNAME and resolver that implements QNAME minimisation changes the QNAME and
QTYPE in queries to authoritative nameserver that are not known to be QTYPE in queries to authoritative nameserver that are not known to be
responsible for the original QNAME. These request are done with: responsible for the original QNAME. These request are done with:
o a QTYPE selected by the resolver to hide the original QTYPE o a QTYPE selected by the resolver to hide the original QTYPE
o the QNAME that 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 longest matching domain name for which the more than the longest matching domain name for which the
nameserver is known to be authoritative nameserver is known to be authoritative
This method is called the "aggressive method" in this document This method is called the "aggressive method" in this document
because the resolver won't expose the original QTYPE to nameservers because the resolver won't expose the original QTYPE to nameservers
that are not known to be responsible for the desired name. This that are not known to be responsible for the desired name. This
method is the safest from a privacy point of view, and is thus the method is the safest from a privacy point of view, and is thus the
RECOMMENDED method for this document. Other methods are described in RECOMMENDED method for this document. Other methods are described in
Section 7. Section 7.
Note that this document relaxes the recommendation to use the NS
QTYPE to hide the original QTYPE, as was specified in RFC7816. Using
the NS QTYPE is still allowed. The authority of NS records lies at
the child side. The parent side of the delegation will answer using
a referral, like it will do for queries with other QTYPEs. Using the
NS QTYPE therefore has no added value over other QTYPEs.
The QTYPE to use while minimising queries can be any possible data The QTYPE to use while minimising queries can be any possible data
TYPE RRTYPE (rfc6895 #3.1) for which the authority always lies below TYPE RRTYPE ([RFC6895] Section 3.1) for which the authority always
the zone cut (i.e. not DS, NSEC, NSEC3, OPT, TSIG, TKEY, ANY, MAILA, lies below the zone cut (i.e. not DS, NSEC, NSEC3, OPT, TSIG, TKEY,
MAILB, AXFR, and IXFR), as long as there is no relation between the ANY, MAILA, MAILB, AXFR, and IXFR), as long as there is no relation
incoming QTYPE and the selection of the QTYPE to use while between the incoming QTYPE and the selection of the QTYPE to use
minimising. A good candidate is to always use the A QTYPE as this is while minimising. A good candidate is to always use the A QTYPE as
the least likely to give issues at DNS software and middleboxes that this is the least likely to give issues at DNS software and
do not properly support all QTYPEs. The QTYPE=A queries will also middleboxes that do not properly support all QTYPEs. The QTYPE=A
blend into traffic from non-minimising resolvers, making it in some queries will also blend into traffic from non-minimising resolvers,
cases harder to observe that the resolving has QNAME minimisation making it in some cases harder to observe that the resolver has QNAME
enabled. minimisation enabled. Using the QTYPE that occurs most in incoming
queries will slightly reduce the number of queries, as there is no
extra check needed for delegations on non-apex records.
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. In the name do not necessarily exist at every label boundary. In the name
www.foo.bar.example, it is possible that there is a zone cut between www.foo.bar.example, it is possible that there is a zone cut between
"foo" and "bar" but not between "bar" and "example". So, assuming "foo" and "bar" but not between "bar" and "example". So, assuming
that the resolver already knows the name servers of example, when it that the resolver already knows the name servers of example, when it
receives the query "What is the AAAA record of www.foo.bar.example?", receives the query "What is the AAAA record of www.foo.bar.example?",
it does not always know where the zone cut will be. To find the it does not always know where the zone cut will be. To find the
zone cut, it will query the example name servers for a record for zone cut, it will query the example name servers for a record for
bar.example. It will get a non-referral answer, it has to query the bar.example. It will get a non-referral answer, it has to query the
example name servers again with one more label, and so on. example name servers again with one more label, and so on.
(Section 2.1 describes this algorithm in deeper detail.) (Section 2.1 describes this algorithm in deeper detail.)
TODO what to do if the resolver forwards? Unbound disables QNAME
minimisation in that case, since the forwarder will see everything,
anyway. What should a minimising resolver do when forwarding the
request to a forwarder, not to an authoritative name server? Send
the full qname? Minimises? (But how since the resolver does not
know the zone cut?)
2.1. Algorithm to Perform Aggressive Method QNAME Minimisation 2.1. Algorithm to Perform Aggressive Method QNAME Minimisation
This algorithm performs name resolution with aggressive method QNAME This algorithm performs name resolution with aggressive method QNAME
minimisation in the presence of zone cuts that are not yet known. minimisation in the presence of zone cuts that are not yet known.
Although a validating resolver already has the logic to find the Although a validating resolver already has the logic to find the
zone cuts, implementers of other resolvers may want to use this zone cuts, implementers of other resolvers may want to use this
algorithm to locate the zone cuts. algorithm to locate the zone cuts.
(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) Get the closest delegation point that can be used for QNAME from (1) Get the closest delegation point that can be used for the
the cache. This is the NS RRset with the owner matching the most original QNAME/QTYPE combination from the cache.
labels with the QNAME. The QNAME will be equal to or a subdomain
of this NS RRset. Call this ANCESTOR. (1a) For queries with QTYPE=DS this is the NS RRset with the
owner matching the most labels with the QNAME stripped by
one label. The QNAME will be a subdomain of (but not equal
to) this NS RRset. Call this ANCESTOR.
(1b) For queries with other original QTYPEs this is the NS RRset
with the owner matching the most labels with the QNAME. The
QNAME will be equal to or a subdomain of this NS RRset.
Call this ANCESTOR.
(2) Initialise 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, or if the CHILD is one label
using ANCESTOR's name servers, and finish. shorter than the QNAME and the original QTYPE is DS, resolve the
original query 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) Look for a negative cache entry for the NS RRset at CHILD. If (5) Look for a negative cache entry for the NS RRset at CHILD. If
this entry is for an NXDOMAIN and the resolver has support for this entry is for an NXDOMAIN and the resolver has support for
RFC8020 the NXDOMAIN can be used in response to the original RFC8020 the NXDOMAIN can be used in response to the original
query, and stop. If the entry is for a NOERROR/NODATA answer go query, and stop. If the entry is for a NOERROR/NODATA answer go
back to step 3 back to step 3
(6) Query for CHILD with the minimised QTYPE using ANCESTOR's (6) Query for CHILD with the minimised QTYPE using ANCESTOR's
name servers. The response can be: name servers. The 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) A NOERROR answer. Cache this answer, and go back to step 3. (6b) A NOERROR answer. Cache this answer, and go back to step 3.
(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) An answer with another RCODE, or no answer. Try another
name server at the same delegation point. Stop if none of
them are able to return a valid answer
3. QNAME Minimisation Examples 3. QNAME Minimisation Examples
For example, a resolver receives a request to resolve For example, a resolver receives a request to resolve
foo.bar.baz.example. Assume that the resolver already knows that foo.bar.baz.example. Assume that the resolver already knows that
ns1.nic.example is authoritative for .example, and that the resolver ns1.nic.example is authoritative for .example, and that the resolver
does not know a more specific authoritative name server. It will does not know a more specific authoritative name server. It will
send the query QTYPE=NS, QNAME=baz.example to ns1.nic.example. send the query with QNAME=baz.example and the QTYPE selected to hide
the original QTYPE to ns1.nic.example.
Here are more detailed examples of queries with the aggressive method Here are more detailed examples of queries with the aggressive method
of QNAME minimisation: of QNAME minimisation:
Cold cache, traditional resolution algorithm without QNAME Cold cache, traditional resolution algorithm without QNAME
minimisation, request for A record of a.b.example.org: minimisation, request for MX record of a.b.example.org:
QTYPE QNAME TARGET NOTE QTYPE QNAME TARGET NOTE
A a.b.example.org root nameserver MX a.b.example.org root nameserver
A a.b.example.org org nameserver MX a.b.example.org org nameserver
A a.b.example.org example.org nameserver MX a.b.example.org example.org nameserver
Cold cache, aggressive QNAME minimisation method, request for A Cold cache, aggressive QNAME minimisation method, request for MX
record of a.b.example.org, using NS QTYPE to hide the original QTYPE: record of a.b.example.org, using the A QTYPE to hide the original
QTYPE:
QTYPE QNAME TARGET NOTE QTYPE QNAME TARGET NOTE
NS org root nameserver A org root nameserver
NS example.org org nameserver A example.org org nameserver
NS b.example.org example.org nameserver A b.example.org example.org nameserver
NS a.b.example.org example.org nameserver "a" may be delegated A a.b.example.org example.org nameserver "a" may be delegated
A a.b.example.org example.org nameserver MX a.b.example.org example.org nameserver
Note that in above example one query would have been saved if the
incoming QTYPE would have been the same as the QTYPE selected by the
resolver to hide the original QTYPE. Only one query needed with as
QTYPE a.b.example.org would have been needed if the original QTYPE
would have been A. Using the most used QTYPE to hide the original
QTYPE therefore slightly reduces the number of outgoing queries.
Warm cache with only org delegation known, (example.org's NS RRset is Warm cache with only org delegation known, (example.org's NS RRset is
not known), aggressive QNAME minimisation method, request for A not known), aggressive QNAME minimisation method, request for MX
record of a.b.example.org, using NS QTYPE to hide the original QTYPE: record of a.b.example.org, using A QTYPE to hide the original QTYPE:
QTYPE QNAME TARGET NOTE QTYPE QNAME TARGET NOTE
NS example.org org nameserver A example.org org nameserver
NS b.example.org example.org nameserver A b.example.org example.org nameserver
NS a.b.example.org example.org nameserver "a" may be delegated A a.b.example.org example.org nameserver "a" may be delegated
A a.b.example.org example.org nameserver MX a.b.example.org example.org nameserver
4. Limit number of queries 4. Limit number of queries
When using QNAME minimisation the number of labels in the received When using QNAME minimisation the number of labels in the received
QNAME can influence the number of queries sent from the resolver. QNAME can influence the number of queries sent from the resolver.
This opens an attack vector and can decrease performance. Resolvers This opens an attack vector and can decrease performance. Resolvers
supporting QNAME minimisation should implement a mechanism to limit supporting QNAME minimisation should implement a mechanism to limit
the number of outgoing queries per user request. the number of outgoing queries per user request.
Take for example an incoming QNAME with many labels, like Take for example an incoming QNAME with many labels, 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 host.group.department.example.com is hosted on example.com's
name servers). Assume a resolver that knows only the name servers of name servers. Assume a resolver that knows only the name servers of
example.com. Without QNAME minimisation, it would send these example.com. Without QNAME minimisation, it would send these
example.com name servers a query for example.com 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 on how QNAME minimisation is minimisation will, depending on how QNAME minimisation is
implemented, send more queries, one per label. Once the cache is implemented, send more queries, one per label. Once the cache is
warm, there will be no difference with a traditional resolver. warm, there will be no difference with a traditional resolver.
Actual testing is described in [Huque-QNAME-Min]. Such deep domains Actual testing is described in [Huque-QNAME-Min]. Such deep domains
are especially common under ip6.arpa. are especially common under ip6.arpa.
This behaviour can be exploited by sending queries with a large This behaviour can be exploited by sending queries with a large
number of labels in the QNAME that will be answered using a wildcard number of labels in the QNAME that will be answered using a wildcard
record. Take for example a record for *.example.com, hosted on record. Take for example a record for *.example.com, hosted on
example.com's name servers. An incoming query containing a QNAME example.com's name servers. An incoming query containing a QNAME
with more than 100 labels, ending in example.com, will result in a with more than 100 labels, ending in example.com, will result in a
query per label. By using random labels the attacker can bypass the query per label. By using random labels the attacker can bypass the
caching and always require the resolver to send many queries cache and always require the resolver to send many queries upstream.
upstream. Note that RFC8198 can limit this attack in some cases. Note that [RFC8198] can limit this attack in some cases.
One mechanism to reduce this attack vector is by sending more than One mechanism to reduce this attack vector is by appending more than
one label per iteration for QNAMEs with a large number of labels. To one label per iteration for QNAMEs with a large number of labels. To
do this a maximum number of QNAME minimisation iterations has to be do this a maximum number of QNAME minimisation iterations has to be
selected (MAX_MINIMISE_COUNT), a good value is 10. Optionally a selected (MAX_MINIMISE_COUNT), a good value is 10. Optionally a
value for the number of queries that should only have one label value for the number of queries that should only have one label
appended can be selected (MINIMISE_ONE_LAB), a good value is 4. The appended can be selected (MINIMISE_ONE_LAB), a good value is 4. The
assumption here is that the number of labels on delegations higher in assumption here is that the number of labels on delegations higher in
the hierarchy are rather small, therefore not exposing too may labels the hierarchy are rather small, therefore not exposing too may labels
early on has the most privacy benefit. early on has the most privacy benefit.
When a resolver needs to send out a query if will look for the When a resolver needs to send out a query if will look for the
skipping to change at page 8, line 16 skipping to change at page 9, line 9
authoritative servers other than the server for a full name from authoritative servers other than the server for a full name from
seeing information about the relative use of the various QTYPEs. seeing information about the relative use of the various QTYPEs.
That information may be interesting for researchers (for instance, if That information may be interesting for researchers (for instance, if
they try to follow IPv6 deployment by counting the percentage of AAAA they try to follow IPv6 deployment by counting the percentage of AAAA
vs. A queries). vs. A queries).
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. Such a setup breaks
minimisation may still work with such domains, since they are only
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.
Note that this document relaxes the recommendation to use the NS
Another way to deal with such incorrect name servers would be to try QTYPE.
with QTYPE=A requests (A being chosen because it is the most common
and hence a QTYPE that will always be accepted, while a QTYPE NS may
ruffle the feathers of some middleboxes). Instead of querying
name servers with a query "NS example.com", a resolver could use
"A _.example.com" and see if it gets a referral. TODO this is what
Unbound does
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 ENTs (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. Whatever the QTYPE, a query 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 an NXDOMAIN. QNAME minimisation, it may query ent.example.com and get an NXDOMAIN.
See also Section 3 of [DNS-Res-Improve] for the other bad See also Section 3 of [DNS-Res-Improve] for the other bad
skipping to change at page 9, line 17 skipping to change at page 9, line 50
(They could just wildcard all of "*.", which would be sufficient. It (They could just wildcard all of "*.", which would be sufficient. It
is impossible to tell why they don't do it.) is impossible to tell 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 name servers. 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 name servers, 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).
Note that this document relaxes the NS QTYPE recommendation.
TODO report by Akamai about why they return erroneous responses
https://mailarchive.ietf.org/arch/msg/dnsop/
XIX16DCe2ln3ZnZai723v32ZIjE
TODO what to do if the resolver forwards? Unbound disables QNAME
minimisation in that case, since the forwarder will see everything,
anyway. What should a minimising resolver do when forwading the
request to a forwarder, not to an authoritative name server? Send
the full qname? Minimises? (But how since the resolver does not
know the zone cut?)
The administrators of the forwarders, and of the authoritative
name servers, will get less data, which will reduce the utility of
the statistics they can produce (such as the percentage of the
various QTYPEs).
DNS administrators are reminded that the data on DNS requests that
they store may have legal consequences, depending on your
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 resolver sends a root name server queries for A.example followed by a resolver sends a root name server queries for A.example followed by
B.example followed by C.example, the result will be three NXDOMAINs, B.example followed by C.example, the result will be three NXDOMAINs,
since .example does not exist in the root zone. When using QNAME since .example does not exist in the root zone. When using QNAME
minimisation, the resolver would send only one question (for .example minimisation, the resolver would send only one question (for .example
itself) to which they could answer NXDOMAIN, thus opening up a itself) to which they could answer NXDOMAIN. The resolver can cache
negative caching opportunity in which the full resolver could know a this answer and use it as to prove that nothing below .example exists
priori that neither B.example nor C.example could exist. Thus, in ([RFC8020]). A resolver now knows a priori that neither B.example
this common case, the total number of upstream queries under QNAME nor C.example exist. Thus, in this common case, the total number of
minimisation could be counterintuitively less than the number of upstream queries under QNAME minimisation could counterintuitively be
queries under the traditional iteration (as described in the DNS less than the number of queries under the traditional iteration (as
standard). TODO mention [RFC8020]? And [RFC8198], the latter described in the DNS standard).
depending on DNSSEC?
QNAME minimisation may also improve lookup performance for TLD QNAME minimisation may also improve lookup performance for TLD
operators. For a TLD that is delegation-only, a two-label QNAME operators. For a TLD that is delegation-only, a two-label QNAME
query may be optimal for finding the delegation owner name, depending query may be optimal for finding the delegation owner name, depending
on the way domain matching is implemented. on the way domain matching is implemented.
QNAME minimisation can increase the number of queries based on the QNAME minimisation can increase the number of queries based on the
incoming QNAME. This is described in Section 4. incoming QNAME. This is described in Section 4.
7. Alternative Methods for QNAME Minimisation 7. Alternative Methods for QNAME Minimisation
One useful optimisation may be, in the spirit of the HAMMER idea One useful optimisation may be, in the spirit of the HAMMER idea
[HAMMER], The resolver can probe in advance for the introduction of [HAMMER], The resolver can probe in advance for the introduction of
zone cuts where none previously existed to confirm their continued zone cuts where none previously existed to confirm their continued
absence or to discover them. absence or to discover them.
To reduce the number of queries (an issue described in Section 6), a To reduce the number of queries (an issue described in Section 4), a
resolver could always use full name queries when the cache is cold resolver could always use full name queries when the cache is cold
and then to move to the aggressive method of QNAME minimisation when and then to move to the aggressive method of QNAME minimisation when
the cache is warm. (Precisely defining what is "warm" or "cold" is the cache is warm. (Precisely defining what is "warm" or "cold" is
left to the implementer). This will decrease the privacy for initial left to the implementer). This will decrease the privacy for initial
queries but will guarantee no degradation of performance. queries but will guarantee no degradation of performance.
Another possible algorithm, not fully studied at this time, could be Another possible algorithm, not fully studied at this time, could be
to "piggyback" on the traditional resolution code. At startup, it to "piggyback" on the traditional resolution code. At startup, it
sends traditional full QNAMEs and learns the zone cuts from the sends traditional full QNAMEs and learns the zone cuts from the
referrals received, then switches to NS queries asking only for the referrals received, then switches to NS queries asking only for the
minimum domain name. This leaks more data but could require fewer minimum domain name. This leaks more data but could require fewer
changes in the existing resolver codebase. changes in the existing resolver codebase.
8. Results of the Experimentation 8. Results of the Experimentation
TODO various experiences from actual deployments, problems heard. Many (open source) resolvers now support QNAME minimisation. The
TODO the Knot bug #339 https://gitlab.labs.nic.cz/knot/knot-resolver/ lessons learned from implementing QNAME minimisation are used to
issues/339? TODO Problems with AWS https://forums.aws.amazon.com/ create this new revision.
thread.jspa?threadID=269116?
Data from DNSThought [dnsthought-qnamemin] shows that 47% of the
tested resolvers support QNAME minimisation in some way.
Academic research has been performed on QNAME minimisation
[devries-qnamemin]. This work shows that QNAME minimisation in
relaxed mode causes almost no problems. The paper recommends using
the A QTYPE, and limiting the number of queries in some way.
9. Security Considerations 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
skipping to change at page 11, line 46 skipping to change at page 12, line 20
and feedback that have made the implemented protocols more mature. and feedback that have made the implemented protocols more mature.
It is up to the individual working groups to use this information as It is up to the individual working groups to use this information as
they see fit". they see fit".
Unbound has had a QNAME minimisation feature since version 1.5.7, Unbound has had a QNAME minimisation feature since version 1.5.7,
December 2015, (see [Dolmans-Unbound]) and it has had QNAME December 2015, (see [Dolmans-Unbound]) and it has had QNAME
minimisation turned default since version 1.7.2, June 2018. It has minimisation turned default since version 1.7.2, June 2018. It has
two modes set by the "qname-minimisation-strict" configuration two modes set by the "qname-minimisation-strict" configuration
option. In strict mode (option set to "yes"), there is no workaround option. In strict mode (option set to "yes"), there is no workaround
for broken authoritative name servers. In lax mode, Unbound retries for broken authoritative name servers. In lax mode, Unbound retries
when there is a NXDOMAIN response from the minimized query. Since when there is a NXDOMAIN response from the minimised query, unless
November 2016, Unbound uses only queries for the A RRtype and not the the domain is DNSSEC signed. Since November 2016, Unbound uses only
NS RRtype. queries for the A RRtype and not the NS RRtype. Unbound limits the
number of queries in the way proposed in Section 4.
Knot Resolver has had a QNAME minimisation feature since version Knot Resolver has had a QNAME minimisation feature since version
1.0.0, May 2016, and it is activated by default. 1.0.0, May 2016, and it is activated by default
TODO, how does knot limit queries? How does knot handle NXDOMAIN on
ENT? Which QTYPE does knot use to hide the incoming QTYPE?
BIND has had a QNAME minimisation feature since unstable development BIND has had a QNAME minimisation feature since unstable development
version 9.13.2, July 2018. It currently has several modes, with or version 9.13.2, July 2018. It currently has several modes, with or
without workarounds for broken authoritative name servers. without workarounds for broken authoritative name servers.
The Cloudflare's public resolver at IP address 1.1.1.1 has QNAME TODO, how does bind limit queries? How does bind handle NXDOMAIN on
minimisation. (It currently uses Knot.) ENT? Which QTYPE does bind use to hide the incoming QTYPE?
Testing with one thousand RIPE Atlas probes [atlas-qname-min], one
can see that QNAME minimisation is now common:
% blaeu-resolve --requested 1000 --type TXT qnamemintest.internet.nl TODO: add powerdns. They now also support QNAME minimisation.
["no - qname minimisation is not enabled on your resolver :("] : 888 occurrences
["hooray - qname minimisation is enabled on your resolver :)!"] : 105 occurrences
[ERROR: SERVFAIL] : 3 occurrences
Test #16113243 done at 2018-09-14T13:01:47Z
10 % of the probes have a resolver with QNAME minimisation (it is not TODO: are there closed source implementations?
possible to infer the percentage of users having QNAME minimisation).
11. References 11. References
11.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,
<https://www.rfc-editor.org/info/rfc1034>. <https://www.rfc-editor.org/info/rfc1034>.
[RFC1035] Mockapetris, P., "Domain names - implementation and [RFC1035] Mockapetris, P., "Domain names - implementation and
skipping to change at page 13, line 11 skipping to change at page 13, line 30
[RFC7816] Bortzmeyer, S., "DNS Query Name Minimisation to Improve [RFC7816] Bortzmeyer, S., "DNS Query Name Minimisation to Improve
Privacy", RFC 7816, DOI 10.17487/RFC7816, March 2016, Privacy", RFC 7816, DOI 10.17487/RFC7816, March 2016,
<https://www.rfc-editor.org/info/rfc7816>. <https://www.rfc-editor.org/info/rfc7816>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
11.2. Informative References 11.2. Informative References
[atlas-qname-min] [devries-qnamemin]
Bortzmeyer, S., "DNS resolution of "A First Look at QNAME Minimization in the Domain Name
qnamemintest.internet.nl/TXT on RIPE Atlas probes", System", March 2019,
September 2018, <https://nlnetlabs.nl/downloads/publications/
<https://atlas.ripe.net/measurements/16113243/>. devries2019.pdf>.
[DNS-Res-Improve] [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",
Work in Progress, draft-vixie-dnsext-resimprove-00, June Work in Progress, draft-vixie-dnsext-resimprove-00, June
2010. 2010.
[dnsthought-qnamemin]
"DNSThought QNAME minimisation results. Using Atlas
probes", March 2020,
<https://dnsthought.nlnetlabs.nl/#qnamemin>.
[Dolmans-Unbound] [Dolmans-Unbound]
Dolmans, R., "Unbound QNAME minimisation @ DNS-OARC", Dolmans, R., "Unbound QNAME minimisation @ DNS-OARC",
March 2016, <https://indico.dns- March 2016, <https://indico.dns-
oarc.net/event/22/contributions/332/attachments/310/542/ oarc.net/event/22/contributions/332/attachments/310/542/
unbound_qnamemin_oarc24.pdf>. unbound_qnamemin_oarc24.pdf>.
[HAMMER] Kumari, W., Arends, R., Woolf, S., and D. Migault, "Highly [HAMMER] Kumari, W., Arends, R., Woolf, S., and D. Migault, "Highly
Automated Method for Maintaining Expiring Records", Work Automated Method for Maintaining Expiring Records", Work
in Progress, draft-wkumari-dnsop-hammer-01, July 2014. in Progress, draft-wkumari-dnsop-hammer-01, July 2014.
skipping to change at page 14, line 9 skipping to change at page 14, line 32
[I-D.ietf-dnsop-terminology-bis] [I-D.ietf-dnsop-terminology-bis]
Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS
Terminology", draft-ietf-dnsop-terminology-bis-14 (work in Terminology", draft-ietf-dnsop-terminology-bis-14 (work in
progress), September 2018. progress), September 2018.
[RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS [RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS
Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997, Specification", RFC 2181, DOI 10.17487/RFC2181, July 1997,
<https://www.rfc-editor.org/info/rfc2181>. <https://www.rfc-editor.org/info/rfc2181>.
[RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA
Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895,
April 2013, <https://www.rfc-editor.org/info/rfc6895>.
[RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running [RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running
Code: The Implementation Status Section", BCP 205, Code: The Implementation Status Section", BCP 205,
RFC 7942, DOI 10.17487/RFC7942, July 2016, RFC 7942, DOI 10.17487/RFC7942, July 2016,
<https://www.rfc-editor.org/info/rfc7942>. <https://www.rfc-editor.org/info/rfc7942>.
[RFC8020] Bortzmeyer, S. and S. Huque, "NXDOMAIN: There Really Is [RFC8020] Bortzmeyer, S. and S. Huque, "NXDOMAIN: There Really Is
Nothing Underneath", RFC 8020, DOI 10.17487/RFC8020, Nothing Underneath", RFC 8020, DOI 10.17487/RFC8020,
November 2016, <https://www.rfc-editor.org/info/rfc8020>. November 2016, <https://www.rfc-editor.org/info/rfc8020>.
[RFC8198] Fujiwara, K., Kato, A., and W. Kumari, "Aggressive Use of [RFC8198] Fujiwara, K., Kato, A., and W. Kumari, "Aggressive Use of
DNSSEC-Validated Cache", RFC 8198, DOI 10.17487/RFC8198, DNSSEC-Validated Cache", RFC 8198, DOI 10.17487/RFC8198,
July 2017, <https://www.rfc-editor.org/info/rfc8198>. July 2017, <https://www.rfc-editor.org/info/rfc8198>.
Acknowledgments Acknowledgments
TODO (refer to 7816) TODO (refer to 7816)
Changes from RFC 7816 Changes from RFC 7816
Changed in -04
o Start structure for implementation section
o Add clarification why the used QTYPE does not matter
o Make algorithm DS QTYPE compatible
Changed in -03
o Drop recommendation to use the NS QTYPE to hide the incoming QTYPE
o Describe DoS attach vector for QNAME with large number of labels,
and propose a mitigation.
o Simplify examples and change qname to a.b.example.com to show the
change in number of queries.
Changed in -00, -01, and -02
o Made changes to deal with errata #4644 o Made changes to deal with errata #4644
o Changed status to be on standards track o Changed status to be on standards track
o Major reorganization o Major reorganization
Authors' Addresses Authors' Addresses
Stephane Bortzmeyer Stephane Bortzmeyer
AFNIC AFNIC
 End of changes. 40 change blocks. 
118 lines changed or deleted 160 lines changed or added

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