Internet Engineering Task Force (IETF) P. Koch
Request for Comments: 8109 DENIC eG
BCP: 209 M. Larson
Category: Best Current Practice P. Hoffman
ISSN: 2070-1721 ICANN
March 2017
Initializing a DNS Resolver with Priming Queries
Koch et al. Best Current Practice [Page 1]
RFC 8109 DNS Priming Queries March 2017
Table of Contents
1. Introduction
Recursive DNS resolvers need a starting point to resolve queries. [RFC1034] describes a common scenario for recursive resolvers: they begin with an empty cache and some configuration for finding the names and addresses of the DNS root servers. [RFC1034] describes that configuration as a list of servers that will give authoritative answers to queries about the root. This has become a common implementation choice for recursive resolvers, and is the topic of this document.
Koch et al. Best Current Practice [Page 2]
RFC 8109 DNS Priming Queries March 2017 2. Description of PrimingPriming is the act of finding the list of root servers from a configuration that lists some or all of the purported IP addresses of some or all of those root servers. A recursive resolver starts with no information about the root servers, and ends up with a list of their names and their addresses.
3. Priming Queries
A priming query is a DNS query used to get the root server information in a resolver. It has a QNAME of "." and a QTYPE of NS, and is sent to one of the addresses in the configuration for the recursive resolver. The priming query can be sent over either UDP or TCP. If the query is sent over UDP, the source port SHOULD be randomly selected (see [RFC5452]). The Recursion Desired (RD) bit MAY be set to 0 or 1, although the meaning of it being set to 1 is undefined for priming queries.
Koch et al. Best Current Practice [Page 3]
RFC 8109 DNS Priming Queries March 2017 3.1. Repeating Priming QueriesThe recursive resolver SHOULD send a priming query only when it is needed, such as when the resolver starts with an empty cache and when the NS RRset for the root zone has expired. Because the NS records for the root are not special, the recursive resolver expires those NS records according to their TTL values. (Note that a recursive resolver MAY pre-fetch the NS RRset before it expires.)
3.2. Target Selection
In order to spread the load across all the root server domain names, the recursive resolver SHOULD select the target for a priming query randomly from the list of addresses. The recursive resolver might choose either IPv4 or IPv6 addresses based on its knowledge of whether the system on which it is running has adequate connectivity on either type of address.
3.3. DNSSEC with Priming Queries
The resolver MAY set the DNSSEC OK (DO) bit. At the time of publication, there is little use to performing DNSSEC validation on the priming query. Currently, all root name server names end in "root-servers.net" and the AAAA and A RRsets for the root server names reside in the "root-servers.net" zone. All root servers are also authoritative for this zone, allowing priming responses to include the appropriate root name server A and AAAA RRsets. But, because the "root-servers.net" zone is not currently signed, these RRsets cannot be validated.
Koch et al. Best Current Practice [Page 4]
RFC 8109 DNS Priming Queries March 2017
If the "root-servers.net" zone is later signed, or if the root servers are named in a different zone and that zone is signed, having DNSSEC validation for the priming queries might be valuable.
4. Priming Responses
A priming query is a normal DNS query. Thus, a root name server cannot distinguish a priming query from any other query for the root NS RRset. Thus, the root server's response will also be a normal DNS response.
4.1. Expected Properties of the Priming Response
The priming response is expected to have an RCODE of NOERROR, and to have the Authoritative Answer (AA) bit set. Also, it is expected to have an NS RRset in the Answer section (because the NS RRset originates from the root zone), and an empty Authority section (because the NS RRset already appears in the Answer section). There will also be an Additional section with A and/or AAAA RRsets for the root name servers pointed at by the NS RRset.
4.2. Completeness of the Response
There are currently 13 root servers. All have one IPv4 address and one IPv6 address. Not even counting the NS RRset, the combined size of all the A and AAAA RRsets exceeds the original 512-octet payload limit from [RFC1035].
Koch et al. Best Current Practice [Page 5]
RFC 8109 DNS Priming Queries March 2017 5. Security ConsiderationsSpoofing a response to a priming query can be used to redirect all of the queries originating from a victim recursive resolver to one or more servers for the attacker. Until the responses to priming queries are protected with DNSSEC, there is no definitive way to prevent such redirection.
6. IANA Considerations
This document does not require any IANA actions.
7. Normative References
[RFC1034] Mockapetris, P., "Domain names - concepts and
Koch et al. Best Current Practice [Page 6]
RFC 8109 DNS Priming Queries March 2017
[RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More