RFC 8806
Running a Root Server Local to a Resolver
π RFC 8806: Running a Root Server Local to a Resolver π
okay bestie, the title block is giving main character energy π This is an Informational doc (not a Standards Track thing, so it's a vibe and a how-to, not a rulebook π¦). It came out in June 2020 from the IETF (Internet Engineering Task Force), it was written by W. Kumari (Google) and P. Hoffman (ICANN), and it obsoletes RFC 7706 π«Ά. The ISSN is 2070-1721 if you're into that kind of thing πΈ
Abstract β¨
Okay so some DNS recursive resolvers are kinda far from the closest DNS root server π₯² which means the round-trip time is longer than anyone wants, and they can struggle to get answers from the root servers, especially when there's a network attack π Other resolver operators also just don't want third parties snooping on the requests they send to root servers π
The fix? Resolvers can serve a full copy of the root zone on the same server, like on a loopback address or inside the resolver software itself π§ Round-trip time drops way down and nobody can see the requests flying around. This doc walks through how to start and keep that copy up to date without breaking things for everyone else on the DNS π The catch is that the operator takes on some extra operational fragility, so it's not free, bestie π
This document obsoletes RFC 7706.
Status of This Memo β¨
This document is not an Internet Standards Track specification. It's published for informational purposes π
It's a product of the IETF, it represents the consensus of the IETF community, and it got public review and was approved for publication by the Internet Engineering Steering Group (IESG). Not every IESG-approved doc is a candidate for any level of Internet Standard though, so check Section 2 of RFC 7841 if you want the deets π
For the current status, errata, and how to send feedback, head to https://www.rfc-editor.org/info/rfc8806 π¦
Copyright Notice β¨
Copyright (c) 2020 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. Please review those carefully, because they describe your rights and restrictions for this document π Any Code Components pulled out of this doc have to include the Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty as described in that license π«Ά
Table of Contents πΈ
1. Introduction
1.1. Changes from RFC 7706
1.2. Requirements Notation
2. Requirements
3. Operation of the Root Zone on the Local Server
4. Security Considerations
5. IANA Considerations
6. References
6.1. Normative References
6.2. Informative References
Appendix A. Current Sources of the Root Zone
A.1. Root Zone Services
Appendix B. Example Configurations of Common Implementations
B.1. Example Configuration: BIND 9.12
B.2. Example Configuration: Unbound 1.8
B.3. Example Configuration: BIND 9.14
B.4. Example Configuration: Unbound 1.9
B.5. Example Configuration: Knot Resolver
B.6. Example Configuration: Microsoft Windows Server 2012
Acknowledgements
Authors' Addresses
1. Introduction π§
Okay so DNS recursive resolvers have to answer every query from their clients, even for domain names that don't exist π For each queried name under a top-level domain (TLD) that isn't in the resolver's cache, the resolver must send a query to a root server to get info for that TLD or to find out the TLD doesn't exist. Research shows the vast majority of queries going to the root are for names that don't exist in the root zone π
A lot of the queries from recursive resolvers to root servers get referrals back to other servers. Malicious third parties might be able to watch that traffic on the network between the recursive resolver and the root servers π
The main goals here are giving more reliable answers for root zone queries during network attacks that hit the root servers, and keeping queries and responses from being visible on the network π₯ This design probably won't make stub resolvers get faster answers for good queries on TLDs, since TTLs for most TLDs are long (like a day or two) and are usually already cached by the recursive resolver. Same goes for the TTL on negative answers from the root servers π (Even though the main goal is serving the root zone, the method works for any zone π)
This doc describes how an operator of a recursive resolver can have a complete root zone locally and hide root zone queries from outsiders π The basic idea is to make an up-to-date root zone service on the same host as the recursive server, then use that service whenever the recursive resolver looks up root info π«Ά The recursive resolver validates all responses from the root service on the same host, just like it would for a remote root server β¨
This design only lets the new root zone service run on the same server as the recursive resolver, so that server can't serve authoritative answers to any other system π ββοΈ Specifically, the root service on the local system MUST be configured to only answer queries from resolvers on the same host and MUST NOT answer queries from any other resolver π
When RFC 7706 [RFC7706] came out, it was controversial because there wasn't consensus on whether this was a "best practice" π€ Lots of people felt it was an excessively risky practice, since it added a brand new operational piece to local DNS operations where there wasn't one before π¬ Since then, the DNS operations community has mostly shifted to thinking that local serving of the root zone for an individual resolver is a reasonable practice π₯° Those advantages don't come free though: if this new system doesn't work correctly, users can get bad data, or the whole recursive resolution system might fail in ways that are super hard to diagnose π
This design uses an authoritative service running on the same machine as the recursive resolver. Common open source recursive resolver software doesn't need new functionality to act as an authoritative server for some zones, but other recursive resolver software might need to be able to talk to an authoritative server on the same host π§ Some resolver software can be both an authoritative server and a resolver, separated by logical "views", which lets a local root live inside a single process. Examples are in Appendix B π
A different approach to some of the problems in this doc is described in [RFC8198] π¦
Readers are expected to be familiar with [RFC8499] π
1.1. Changes from RFC 7706 πΈ
Okay so RFC 7706 explicitly required that a root server instance run on the loopback interface of the host running the validating resolver π€ It also had examples of setting up common software that didn't use the loopback interface. This doc loosens the loopback restriction and actually allows the use of a local service, not necessarily an authoritative server π«Ά But it keeps the requirement that only systems running on that single host can query that authoritative root server or service π
This doc also changes the use cases for running a local root service, to match better the reasons operators gave for using RFC 7706 π
- Removed the prohibition on distribution of recursive DNS servers, including configurations for this design, because some already do that and others have shown interest in doing so π
- Added the idea that a recursive resolver using this design might switch to using the normal (remote) root servers if the local root server fails π
- Refreshed the list of where you can get copies of the root zone π₯
- Added examples of other resolvers and updated the existing examples π
1.2. Requirements Notation π
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 π
2. Requirements π
In order to implement the mechanism described in this document π
- The system MUST be able to validate every signed record in a zone with DNSSEC [RFC4033] π
- The system MUST have an up-to-date copy of the public part of the Key Signing Key (KSK) [RFC4033] used to sign the DNS root π
- The system MUST be able to retrieve a copy of the entire root zone (including all DNSSEC-related records) π₯
- The system MUST be able to run an authoritative service for the root zone on the same host. The authoritative root service MUST only respond to queries from the same host. One way to make sure the authoritative root service doesn't respond to queries from other hosts is to run an authoritative server for the root that responds only on one of the loopback addresses (that is, an address in the range 127/8 for IPv4 or ::1 in IPv6). Another method is to have the resolver software also act as an authoritative server for the root zone, but only for answering queries from itself π§
A corollary of the above list is that authoritative data in the root zone used on the local authoritative server MUST be identical to the same data in the root zone for the DNS. It is possible to change the unsigned data (the glue records) in the copy of the root zone, but such changes could cause problems for the recursive server that accesses the local root zone, so any changes to the glue records SHOULD NOT be made π
Part 1 of 3 done, bestie! π More is coming, so stay tuned π¦
3. Operation of the Root Zone on the Local Server β¨
Okay so, running an authoritative server for the root can be its own separate thing from the recursive resolver, or it can just be part of the resolver's configuration. Either way works π
The steps to set up the root zone are:
- Retrieve a copy of the root zone. (Check Appendix A for some current places to grab it π§)
- Start the authoritative service for the root zone in a way that stops any system other than a recursive resolver on the same host from reaching it π
The contents of the root zone MUST be refreshed using the timers from the SOA record in the root zone, as described in [RFC1035]. Honestly this is lowkey the reason your local copy will be a little behind the global root servers π’ Those servers update when they get triggered by NOTIFY messages, so they're just faster.
There's a real risk that a system using a local authoritative server for the root zone can't refresh the contents before the expire time in the SOA π¬ A system using a local authoritative server for the root zone MUST NOT serve stale data for the root zone. To lower the chance of serving stale data, the local root server MUST immediately switch to using non-local root servers when it detects that it would be serving state data. No cap, this is the main safety net π«Ά
In a resolver that is using an internal service for the root zone, if the contents of the root zone cannot be refreshed before the expire time in the SOA, the resolver MUST immediately switch to using non-local root servers. π¨
If refreshing the root zone contents fails, things can get disastrous π For example, sometimes all the NS records for a TLD get changed in a short period of time (like 2 days). If the local root zone refresh is broken during that window, the recursive resolver ends up with bad data for the entire TLD zone. Not me having a whole TLD go wrong because of a broken refresh π
An administrator using the procedure in this document SHOULD have an automated method to check that the contents of the local root zone are being refreshed π This could be part of the resolver software. One way to do it is a separate process that checks the SOA of the local root zone every so often and makes sure it's changing. When this document was published, the SOA for the root zone was the current date written as digits with a two-digit counter stuck on the end, and it changed every day even when the contents stayed the same. For example, the SOA of the root zone on January 2, 2019 was 2019010201. A process can use that pattern to build a check on the local root zone contents (using a program not specified in this document) π
4. Security Considerations π
A system that doesn't follow the DNSSEC-related requirements given in Section 2 can get fooled into giving bad responses, same as any recursive resolver that skips DNSSEC validation on responses from a remote root server π Anyone deploying the method in this document should understand both the operational benefits and costs of deploying DNSSEC [RFC4033]. Seriously, do your homework bestie π
As stated in Section 1, this design explicitly requires the local copy of the root zone information to be available only from resolvers on that host. This gives the security property of limiting damage to clients of any local resolver that might try to rely on an altered copy of the root π‘οΈβ¨
5. IANA Considerations πΈ
This document has no IANA actions. Nothing to see here, no registries to update, we're all good π
6. References π
6.1. Normative References π¦
[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>.
[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>.
[RFC7706] Kumari, W. and P. Hoffman, "Decreasing Access Time to Root
Servers by Running One on Loopback", RFC 7706,
DOI 10.17487/RFC7706, November 2015,
<https://www.rfc-editor.org/info/rfc7706>.
[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>.
[RFC8499] Hoffman, P., Sullivan, A., and K. Fujiwara, "DNS
Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499,
January 2019, <https://www.rfc-editor.org/info/rfc8499>.
6.2. Informative References π§
[Manning2013]
Manning, W., "Client Based Naming", May 2013,
<http://www.sfc.wide.ad.jp/dissertation/bill_e.html>.
[RFC5936] Lewis, E. and A. Hoenes, Ed., "DNS Zone Transfer Protocol
(AXFR)", RFC 5936, DOI 10.17487/RFC5936, June 2010,
<https://www.rfc-editor.org/info/rfc5936>.
[RFC8198] Fujiwara, K., Kato, A., and W. Kumari, "Aggressive Use of
DNSSEC-Validated Cache", RFC 8198, DOI 10.17487/RFC8198,
July 2017, <https://www.rfc-editor.org/info/rfc8198>.
Appendix A. Current Sources of the Root Zone πΊοΈ
The root zone can be retrieved from anywhere, as long as it comes with all the DNSSEC records needed for validation. Right now, you can get the root zone from ICANN by zone transfer (AXFR) [RFC5936] over TCP from the DNS servers at xfr.lax.dns.icann.org and xfr.cjr.dns.icann.org. The root zone file can also be obtained using the methods described at <https://www.iana.org/domains/root/files>.
Right now, the root can also be retrieved by AXFR over TCP from the following root server operators:
b.root-servers.netc.root-servers.netd.root-servers.netf.root-servers.netg.root-servers.netk.root-servers.net
It is crucial to note that none of the above services are guaranteed to be available π¨ It's possible that ICANN or some of the root server operators will turn off AXFR on the servers listed above. Using AXFR over TCP to addresses that are likely to be anycast (like the ones above) may conceivably run into transfer problems because of anycast, but current practice shows that to be unlikely π€
A.1. Root Zone Services π
When this document was published, there was one root zone service that was active and one that had been announced as in the planning stages. This section describes all known active services β
LocalRoot (<https://localroot.isi.edu/>) is an experimental service that embodies many of the ideas in this document π§ͺ It distributes the root zone by AXFR and also offers DNS NOTIFY messages when the LocalRoot system sees that the root zone has changed.
Appendix B. Example Configurations of Common Implementations π
This section shows fragments of configurations for some popular recursive server software that is believed to correctly implement the requirements given in this document. These examples have been updated since [RFC7706] was published π
The IPv4 and IPv6 addresses in this section were checked in March 2020 by testing for AXFR over TCP from each address for the known single-letter names in the root-servers.net zone π
B.1. Example Configuration: BIND 9.12 π»
BIND 9.12 acts both as a recursive resolver and an authoritative server. Because of this, there's "fate-sharing" between the two servers in the following configuration. In other words, if the root server dies, it's likely that all of BIND is dead π
Note that a future version of BIND will support a much more robust method for creating a local mirror of the root or other zones; see Appendix B.3 π
With this configuration, queries for information in the root zone are returned with the Authoritative Answer (AA) bit not set.
When slaving a zone, BIND 9.12 will treat zone data differently depending on whether the zone is slaved into a separate view (or a separate instance of the software) or slaved into the same view or instance that's also doing the recursion π
- Validation: When using separate views or separate instances, the DS records in the slaved zone will be validated as the zone data is accessed by the recursive server. When using the same view, this validation does not occur for the slaved zone.
- Caching: When using separate views or instances, the recursive server will cache all of the queries for the slaved zone, just as it would using the traditional "root hints" method. So as the zone in the other view or instance gets refreshed or updated, the changed information won't appear in the recursive server until the TTL of the old record times out. Currently, the TTL for DS and delegation NS records is two days. When using the same view, all zone data in the recursive server gets updated as soon as it receives its copy of the zone β¨
view root {
match-destinations { 127.12.12.12; };
zone "." {
type slave;
file "rootzone.db";
notify no;
masters {
199.9.14.201; # b.root-servers.net
192.33.4.12; # c.root-servers.net
199.7.91.13; # d.root-servers.net
192.5.5.241; # f.root-servers.net
192.112.36.4; # g.root-servers.net
193.0.14.129; # k.root-servers.net
192.0.47.132; # xfr.cjr.dns.icann.org
192.0.32.132; # xfr.lax.dns.icann.org
2001:500:200::b; # b.root-servers.net
2001:500:2::c; # c.root-servers.net
2001:500:2d::d; # d.root-servers.net
2001:500:2f::f; # f.root-servers.net
2001:500:12::d0d; # g.root-servers.net
2001:7fd::1; # k.root-servers.net
2620:0:2830:202::132; # xfr.cjr.dns.icann.org
2620:0:2d0:202::132; # xfr.lax.dns.icann.org
};
};
};
view recursive {
dnssec-validation auto;
allow-recursion { any; };
recursion yes;
zone "." {
type static-stub;
server-addresses { 127.12.12.12; };
};
};
B.2. Example Configuration: Unbound 1.8 β¨
Okay so, Unbound is like BIND's bestie π Starting with version 1.8, it can act as a recursive resolver and an authoritative server. Main character energy π
auth-zone:
name: "."
master: 199.9.14.201 # b.root-servers.net
master: 192.33.4.12 # c.root-servers.net
master: 199.7.91.13 # d.root-servers.net
master: 192.5.5.241 # f.root-servers.net
master: 192.112.36.4 # g.root-servers.net
master: 193.0.14.129 # k.root-servers.net
master: 192.0.47.132 # xfr.cjr.dns.icann.org
master: 192.0.32.132 # xfr.lax.dns.icann.org
master: 2001:500:200::b # b.root-servers.net
master: 2001:500:2::c # c.root-servers.net
master: 2001:500:2d::d # d.root-servers.net
master: 2001:500:2f::f # f.root-servers.net
master: 2001:500:12::d0d # g.root-servers.net
master: 2001:7fd::1 # k.root-servers.net
master: 2620:0:2830:202::132 # xfr.cjr.dns.icann.org
master: 2620:0:2d0:202::132 # xfr.lax.dns.icann.org
fallback-enabled: yes
for-downstream: no
for-upstream: yes
B.3. Example Configuration: BIND 9.14 πΈ
BIND 9.14 can set up a local mirror of the root zone with one tiny config option, so cute π₯Ή
zone "." {
type mirror;
};
The "type mirror" setup works for the root zone because BIND 9.14 comes with a default list of primary servers for the IANA root zone already built in π§ If you want to mirror any other zone, you have to give it an explicit list of primary servers.
See the BIND 9.14 documentation for more detail on how to use this simplified config. It's the source of truth, bestie π
B.4. Example Configuration: Unbound 1.9 π¦
Recent versions of Unbound have an "auth-zone" feature that lets you mirror the root zone locally. The config looks like this:
auth-zone:
name: "."
master: "b.root-servers.net"
master: "c.root-servers.net"
master: "d.root-servers.net"
master: "f.root-servers.net"
master: "g.root-servers.net"
master: "k.root-servers.net"
fallback-enabled: yes
for-downstream: no
for-upstream: yes
zonefile: "root.zone"
B.5. Example Configuration: Knot Resolver π
Knot Resolver uses its "prefill" module to load the root zone information. You can read all about it at https://knot-resolver.readthedocs.io/en/v5.0.1/modules-rfc7706.html π«Ά
B.6. Example Configuration: Microsoft Windows Server 2012 πͺ
Windows Server 2012 has a DNS server inside its "DNS Manager" component. When it's activated, that component acts as a recursive server. The DNS Manager can also be an authoritative server, so it's basically a two-in-one situation β¨
With this configuration, queries for info in the root zone come back with the AA bit set. Iconic π
Here are the steps to set up the DNS Manager so it follows the requirements in this document:
- Launch the DNS Manager GUI. You can do this from the command line (
dnsmgmt.msc) or from the Service Manager (the"DNS"command in the"Tools"menu). - In the hierarchy under the server where the service is running, right-click
"Forward Lookup Zones"and select"New Zone". This opens a whole series of dialog boxes, bear with me π - In the
"Zone Type"dialog box, select"Secondary zone". - In the
"Zone Name"dialog box, enter".". - In the
"Master DNS Servers"dialog box, enter"b.root-servers.net". The system checks that it can do a zone transfer from that server. (Once this is set up, the DNS Manager will try to transfer from all of the root zone servers π) - In the
"Completing the New Zone Wizard"dialog box, click"Finish". Done and dusted π - Check that the DNS Manager is acting as a recursive resolver. Right-click the server name in the hierarchy and choose the
"Advanced"tab in the dialog box. Make sure"Disable recursion (also disables forwarders)"is not selected, and that"Enable DNSSEC validation for remote responses"is selected π
Acknowledgements β¨
Okay, big shoutout to the authors for being so honest here: running a copy of the root zone on the loopback address is not a new idea π They've chatted about it with a ton of people over time. For example, Bill Manning described a similar solution to these problems in his doctoral dissertation in 2013 [Manning2013] π
Evan Hunt put a lot of work into the logic in the requirements π«Ά Other big contributors include Wouter Wijngaards, Tony Hain, Doug Barton, Greg Lindsay, and Akira Kato π The authors also got lots of offline comments asking them to make it super clear that this is just a description of a way to operate a root zone on the same host, and not a recommendation to do so. Respect the clarity, bestie π§
People who helped with this update to [RFC7706] include Florian Obser, nusenu, Wouter Wijngaards, Mukund Sivaraman, Bob Harold, and Leo Vegoda πΈ
Authors' Addresses π
Warren Kumari Google
Email: Warren@kumari.net
Paul Hoffman ICANN
Email: paul.hoffman@icann.org
π¦ where this page comes from
- ietf: rfc8806 2020-06
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms