RFC 9609
Initializing a DNS Resolver with Priming Queries
RFC 9609: Initializing a DNS Resolver with Priming Queries π
Okay bestie, so RFC 9609 is called Initializing a DNS Resolver with Priming Queries π It's a Best Current Practice (that's BCP 209 for the nerds π€) from the IETF, published February 2025. The authors are P. Koch from DENIC eG, M. Larson (no affiliation listed), and P. Hoffman from ICANN π«Ά It's ISSN 2070-1721, and it obsoletes RFC 8109, so this is the new and improved version. β¨
Abstract
This doc spells out the queries a DNS resolver should send to fill up its cache π§ The big payoff is that the resolver ends up with a current NS resource record set (RRset) for the root zone, plus the address info it needs to reach the root servers. Main character energy π
This document obsoletes RFC 8109. π
Status of This Memo
This memo documents an Internet Best Current Practice. πΈ
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on BCPs is available in Section 2 of RFC 7841.
Info about the current status of this document, any errata, and how to give feedback is at https://www.rfc-editor.org/info/rfc9609 π¬
Copyright Notice
Copyright (c) 2025 IETF Trust and the persons identified as the document authors. All rights reserved. β
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, because they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions, and they are provided without warranty as described in the Revised BSD License. π«Ά
Table of Contents
- 1. Introduction
- 1.1. Terminology
- 2. Description of Priming
- 2.1. Content of Priming Information
- 3. Priming Queries
- 3.1. Repeating Priming Queries
- 3.2. Target Selection
- 3.3. DNSSEC with Priming Queries
- 4. Priming Responses
- 4.1. Expected Properties of the Priming Response
- 4.2. Completeness of the Response
- 5. Post-Priming Strategies
- 6. Security Considerations
- 7. IANA Considerations
- 8. References
- 8.1. Normative References
- 8.2. Informative References
- Appendix A. Changes from RFC 8109
- Acknowledgements
- Authors' Addresses
1. Introduction β¨
Okay so recursive DNS resolvers need a starting point before they can resolve anything π [RFC1034] describes the usual setup: the resolver starts with an empty cache and some configuration that helps it find the names and addresses of the DNS root servers. That configuration is described there as a list of servers that give authoritative answers about the root. This has become a super common implementation choice for recursive resolvers, and it's the topic of this doc. π
This document walks through the steps for that common choice. Starting a recursive name server with an empty cache isn't the only way to do it, but it's the only one [RFC1034] describes. Some implementers went in other directions π Some of those work well, and others fail (sometimes disastrously) under different conditions. For example, an implementation that only gets the root name server addresses from configuration, and not from the DNS as this document describes, will have stale data that could cause slower resolution. π’
This document only deals with recursive name servers (also called "recursive resolvers" and just "resolvers") for the IN class. π¦
See Appendix A for the list of changes from [RFC8109]. π
1.1. Terminology
Here's the key bit π The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
For root server system terminology, see [RSSAC026v2]. For general DNS terminology, see [RFC9499]. π
2. Description of Priming π
So priming 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 cached info about the root servers and finishes with a full list of their names and addresses in its cache. Iconic glow-up π¦
Priming is described in Sections 5.3.2 and 5.3.3 of [RFC1034]. (That doc calls it SBELT, a "safety belt" structure π§·) The scenario used in that description, a recursive server that's also authoritative, isn't as common anymore. π«
The configured list of IP addresses for the root servers usually comes from the vendor or distributor of the recursive server software. This list is generally accurate and complete when it's distributed, but it can become outdated over time π°οΈ
The domain names for the root servers are called the "root server identifiers". This list has stayed stable since 1997, but the IPv4 and IPv6 addresses for these identifiers occasionally change. Research shows that, after such changes, certain resolvers fail to update to the new addresses. For more on that, check [OLD-J]. π
So it's really important that resolvers can cope with change, even if their operator never gets around to applying configuration updates π Root server identifier and address changes are the main reasons resolvers need to use priming to get a full and accurate list of root servers, instead of just using a statically configured list. π
See [RSSAC023v2] for a history of the root server system. π
This document targets the global DNS, but it could apply to a private DNS as well. These terms are defined in [RFC9499]. π
Some systems serve a copy of the full root zone on the same server as the resolver, as described in [RFC8806], for example. In that setup, the resolver primes its cache using the same methods as the rest of this document describes. π§
2.1. Content of Priming Information
As we said above, the configuration for priming is a list of IP addresses. The priming info in software can be in any format, as long as it gives the software the addresses associated with at least some of the root server identifiers. π
Some software also has configuration with the root server identifiers (like "L.ROOT-SERVERS.NET"), sometimes as comments and sometimes as data the software actually uses. For example, the "root hints file" published by IANA at https://www.internic.net/domain/named.root is derived directly from the root zone and has all of the addresses of the root server identifiers found in the root zone. It's in DNS zone file presentation format and includes the root server identifiers. Adding these names doesn't hurt anything, but they aren't useful in the priming process. π€·ββοΈ
3. Priming Queries π«Ά
A priming query is a DNS query whose response provides root server identifiers and addresses. It has a QNAME of ., a QTYPE of NS, and a QCLASS of IN. It gets sent to one of the addresses in the configuration for the recursive resolver. It can go over either UDP or TCP. If it goes over UDP, the source port SHOULD be randomly selected (see [RFC5452]) to hamper on-path attacks. DNS cookies [RFC7873] can also be used to hamper on-path attacks. The Recursion Desired (RD) bit SHOULD be set to 0. What it means when RD is set to 1 is undefined for priming queries and is outside the scope of this document. π
ββοΈ
The recursive resolver SHOULD use EDNS0 [RFC6891] for priming queries. It SHOULD also announce and handle a reassembly size of at least 1024 octets [RFC3226]. Doing that allows responses that cover the size of a full priming response (see Section 4.2) for the current set of root servers. For how to set the DNSSEC OK (DO) bit (defined in [RFC4033]), see Section 3.3. π₯
3.1. Repeating Priming Queries
The recursive resolver SHOULD send a priming query only when it's needed, such as when the resolver starts with an empty cache or when the NS resource record set (RRset) for the root zone has expired. The NS records for the root zone aren't special, so the resolver expires them according to their TTL values. (Note that a recursive resolver MAY pre-fetch the NS RRset before it expires. β°)
If a resolver chooses to pre-fetch the root NS RRset before that RRset has expired in its cache, it has to decide whether to use the addresses for the root NS RRset it already has in its cache, or the addresses in its configuration. Such a resolver SHOULD send queries to the addresses in its cache, so it's less likely to get delayed by out-of-date addresses in its configuration. π§
If a priming query doesn't get a response, the recursive resolver MUST retry the query with a different target address from the configuration. No giving up, bestie πͺ
3.2. Target Selection
To spread the load across all the root server identifiers, 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, depending on what it knows about whether the system it's running on has adequate connectivity on either type of address. πΈ
This recommended method isn't the only way to choose from the list in a recursive resolver's configuration. Two other common methods are picking the first one on the list, and remembering which address gave the fastest response earlier and using that one again. There are probably other methods in use today too. However, the random method SHOULD be used for priming. π
to be continued in part 2 π¦β¨
3.3. DNSSEC with Priming Queries
okay so this section is the one that makes me go "wait, really??" ππ₯ The root NS RRset is signed and can be validated by a DNSSEC validating resolver π
. At the time this document is published, the addresses for the names in the root NS RRset are in the root-servers.net zone. All root servers are also authoritative for the root-servers.net zone, which lets priming responses include the appropriate root name server A and AAAA RRsets β¨. BUT, because the root-servers.net zone is not signed at the time this document is published, those root name server A and AAAA RRsets cannot be validated π. So an attacker who is able to provide a spoofed priming response can hand over alternative A and AAAA RRsets and totally fool a resolver into thinking the attacker's addresses are authoritative for the root zone π.
Lowkey terrifying, bestie. A rogue root name server can see all the queries from the resolver to the root, and it can alter all the unsigned parts of responses, like the parent-side NS RRsets and glue in referral responses π. A resolver can get fooled into trusting child (Top-Level Domain (TLD)) NS addresses that are under the control of the attacker as authoritative if the resolver:
- follows referrals from a rogue root server,
- and does not explicitly query the authoritative NS RRset at the apex of the child (TLD) zone,
- and does not explicitly query for the authoritative A and AAAA RRsets for the child (TLD) NS RRsets.
With resolvers like that, an attacker who controls a rogue root server effectively controls the entire domain name space π± and can view all queries and alter all unsigned data without anyone noticing, unless other protections are configured at the resolver. Periodt π.
An attacker controlling a rogue root name server also has complete control over all unsigned delegations and over the entire domain name space in the case of non-DNSSEC validating resolvers π₯.
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 π§. The benefits and costs of resolvers validating the responses will depend heavily on the naming scheme used π.
4. Priming Responses β¨
okay so here's the vibe: a priming query is a normal DNS query π. That means a root server literally cannot tell a priming query apart from any other query for the root NS RRset π. So the root server's response is also just a normal DNS response π.
4.1. Expected Properties of the Priming Response π¦
The priming response MUST have an RCODE of NOERROR and MUST have the Authoritative Answer (AA) bit set π. Also, it MUST 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 servers pointed at by the NS RRset π«Ά.
Resolver software SHOULD treat the response to the priming query as a normal DNS response, just like it would use any other data fed to its cache πΈ. Resolver software SHOULD NOT expect 13 NS RRs because, historically, some root servers have returned fewer π.
4.2. Completeness of the Response π
At the time this document is published, there are 13 root server operators operating a total of more than 1500 root server instances β. Each instance has one IPv4 address and one IPv6 address. The combined size of all the A and AAAA RRsets exceeds the original 512-octet payload limit specified in [RFC1035] π.
In the event of a response where the Additional section omits certain root server address information, reissuing the priming query does not help with those root name servers that respond with a fixed order of addresses in the Additional section π. Instead, the recursive resolver needs to issue direct queries for A and AAAA RRsets for the remaining names π₯. At the time this document is published, these RRsets would be authoritatively available from the root name servers β¨.
If some root server addresses are omitted from the Additional section, there is no expectation that the TC bit in the response will be set to 1 π. At the time this document is written, many of the root servers are not setting the TC bit when omitting addresses from the Additional section π .
Note that [RFC9471] updates [RFC1034] with respect to the use of the TC bit. It says:
| If message size constraints prevent the inclusion of all glue | records for in-domain name servers over the chosen transport, the | server MUST set the TC (Truncated) flag to inform the client that | the response is incomplete and that the client SHOULD use another | transport to retrieve the full response.
Because the priming response is not a referral, root server addresses in the priming response are not considered glue records π¦. Thus, [RFC9471] does not apply to the priming response, and root servers are not required to set the TC bit if not all root server addresses fit within message size constraints π. There are no requirements on the number of root server addresses that a root server must include in a priming response π«Ά.
5. Post-Priming Strategies π§
okay so when a resolver has a zone's NS RRset in its cache and it gets a query for a domain in that zone that can't be answered from its cache, the resolver has to choose which NS to send queries to π . (This is just as true for the root zone as for any other zone in the DNS, fr fr β¨.) Two common strategies for choosing are "determine the fastest name server and always use it" and "create buckets of fastness and pick randomly in the buckets" π. This document does not specify a preference for any particular strategy, other than to suggest that resolvers not treat the root zone as special for this decision π.
6. Security Considerations π
Okay bestie, this one's serious π. Spoofing a response to a priming query can be used to redirect all of the queries coming from a victim recursive resolver to one or more servers controlled by the attacker π¨. Until the responses to priming queries are protected with DNSSEC, there is no definitive way to prevent such redirection π₯.
An on-path attacker who sees a priming query coming from a resolver can inject false answers before a root server can give correct answers π. If the attacker's answers are accepted, this can set up the ability to give further false answers for future queries to the resolver π. False answers for root servers are more dangerous than, say, false answers for TLDs, because the root is the highest node of the DNS π. See Section 3.3 for more discussion π.
In both of the scenarios listed here, a validating resolver will be able to detect the attack if its chain of queries comes from a zone that is signed, but not from those that are unsigned π‘οΈ.
7. IANA Considerations πΈ
This document has no IANA actions π«Ά.
8. References π
8.1. Normative References
- [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, <https://www.rfc-editor.org/info/rfc1034>.
- [RFC1035] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, November 1987, <https://www.rfc-editor.org/info/rfc1035>.
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.
- [RFC3226] Gudmundsson, O., "DNSSEC and IPv6 A6 aware server/resolver message size requirements", RFC 3226, DOI 10.17487/RFC3226, December 2001, <https://www.rfc-editor.org/info/rfc3226>.
- [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, "DNS Security Introduction and Requirements", RFC 4033, DOI 10.17487/RFC4033, March 2005, <https://www.rfc-editor.org/info/rfc4033>.
- [RFC5452] Hubert, A. and R. van Mook, "Measures for Making DNS More Resilient against Forged Answers", RFC 5452, DOI 10.17487/RFC5452, January 2009, <https://www.rfc-editor.org/info/rfc5452>.
- [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms for DNS (EDNS(0))", STD 75, RFC 6891, DOI 10.17487/RFC6891, April 2013, <https://www.rfc-editor.org/info/rfc6891>.
- [RFC7873] Eastlake 3rd, D. and M. Andrews, "Domain Name System (DNS) Cookies", RFC 7873, DOI 10.17487/RFC7873, May 2016, <https://www.rfc-editor.org/info/rfc7873>.
- [RFC8109] Koch, P., Larson, M., and P. Hoffman, "Initializing a DNS Resolver with Priming Queries", BCP 209, RFC 8109, DOI 10.17487/RFC8109, March 2017, <https://www.rfc-editor.org/info/rfc8109>.
- [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.
- [RFC9471] Andrews, M., Huque, S., Wouters, P., and D. Wessels, "DNS Glue Requirements in Referral Responses", RFC 9471, DOI 10.17487/RFC9471, September 2023, <https://www.rfc-editor.org/info/rfc9471>.
- [RFC9499] Hoffman, P. and K. Fujiwara, "DNS Terminology", BCP 219, RFC 9499, DOI 10.17487/RFC9499, March 2024, <https://www.rfc-editor.org/info/rfc9499>.
8.2. Informative References
- [OLD-J] Wessels, D., Castonguay, J., and P. Barber, "Thirteen Years of 'Old J Root'", DNS-OARC Fall 2015 Workshop, October 2015, <https://indico.dns-oarc.net/event/24/contributions/378/>.
- [RFC8806] Kumari, W. and P. Hoffman, "Running a Root Server Local to a Resolver", RFC 8806, DOI 10.17487/RFC8806, June 2020, <https://www.rfc-editor.org/info/rfc8806>.
- [RSSAC023v2] "History of the Root Server System", A Report from the ICANN Root Server System Advisory Committee (RSSAC), RSSAC023v2, June 2020, <https://www.icann.org/en/system/files/files/rssac-023-17jun20-en.pdf>.
- [RSSAC026v2] "RSSAC Lexicon", An Advisory from the ICANN Root Server System Advisory Committee (RSSAC), RSSAC026v2, March 2020, <https://www.icann.org/en/system/files/files/rssac-026-lexicon-12mar20-en.pdf>.
Appendix A. Changes from RFC 8109 π¦
okay so this document obsoletes [RFC8109] π and here's the glow-up, the significant changes from RFC 8109 bestie π
- Added a section on the content of priming information π§
- Added a paragraph saying there's no expectation that the TC bit in responses will be set π
- Added a paragraph about RFC 9471 and the requirements on authoritative servers and the TC bit β¨ this one cleared up the role of glue records and truncation for responses from the root zone, which is so important π
- Changed "man-in-the-middle" to "machine-in-the-middle" π€ more inclusive AND more technically accurate, iconic π
- Clarified that there are other effects of machine-in-the-middle attacks π
- Clarified the language for root server domain names as "root server identifiers" πΈ
- Added a short discussion of post-priming strategies π
- Added informative references to Root Server System Advisory Committee (RSSAC) documents π
- Added a short discussion about this document and private DNS π
- Clarified that machine-in-the-middle attacks could be successful for non-signed TLDs π
- Added a discussion of where resolvers that pre-fetch should get the root NS addresses π¦
- Elevated the expectations in Section 4.1 ("Expected Properties of the Priming Response") to MUST-level π₯ this is the big one, the expectations are now hard requirements, no wiggle room bestie π
- Clarified that "currently" means "at the time this document is published" β
- Added a note about priming and RFC 8806 π«Ά
- Added a reference to research about discontinued root server addresses π
Acknowledgements π
okay so RFC 8109 was the product of the DNSOP WG, and it benefited from the reviews done there π this document also benefited from review by Duane Wessels π«Ά the squad really showed up for this one β¨
Authors' Addresses π
these are the babes who wrote this, so you know who to slide into the DMs π
Peter Koch
DENIC eG
Email: pk@DENIC.DE
Matt Larson
ICANN
Email: matt.larson@icann.org
Paul Hoffman
ICANN
Email: paul.hoffman@icann.org
π¦ where this page comes from
- ietf: rfc9609 2025-02
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms