idnits 2.17.1 draft-kh-dnsop-7706bis-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) == There are 22 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 2 instances of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. -- The draft header indicates that this document updates RFC7706, but the abstract doesn't seem to directly say this. It does mention RFC7706 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 24, 2018) is 2132 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Informational ---------------------------------------------------------------------------- No issues found here. Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group W. Kumari 3 Internet-Draft Google 4 Updates: 7706 (if approved) P. Hoffman 5 Intended status: Informational ICANN 6 Expires: December 26, 2018 June 24, 2018 8 Decreasing Access Time to Root Servers by Running One On The Same Server 9 draft-kh-dnsop-7706bis-01 11 Abstract 13 Some DNS recursive resolvers have longer-than-desired round-trip 14 times to the closest DNS root server. Some DNS recursive resolver 15 operators want to prevent snooping of requests sent to DNS root 16 servers by third parties. Such resolvers can greatly decrease the 17 round-trip time and prevent observation of requests by running a copy 18 of the full root zone on the same server, such as on a loopback 19 address. This document shows how to start and maintain such a copy 20 of the root zone that does not pose a threat to other users of the 21 DNS, at the cost of adding some operational fragility for the 22 operator. 24 This draft will update RFC 7706. See Section 1.1 for a list of 25 topics that will be added in the update. 27 [ Ed note: Text inside square brackets ([]) is additional background 28 information, answers to freqently asked questions, general musings, 29 etc. They will be removed before publication.] 31 [ This document is being collaborated on in Github at: 32 https://github.com/wkumari/draft-kh-dnsop-7706bis. The most recent 33 version of the document, open issues, and so on should all be 34 available there. The authors gratefully accept pull requests. ] 36 Status of This Memo 38 This Internet-Draft is submitted in full conformance with the 39 provisions of BCP 78 and BCP 79. 41 Internet-Drafts are working documents of the Internet Engineering 42 Task Force (IETF). Note that other groups may also distribute 43 working documents as Internet-Drafts. The list of current Internet- 44 Drafts is at https://datatracker.ietf.org/drafts/current/. 46 Internet-Drafts are draft documents valid for a maximum of six months 47 and may be updated, replaced, or obsoleted by other documents at any 48 time. It is inappropriate to use Internet-Drafts as reference 49 material or to cite them other than as "work in progress." 51 This Internet-Draft will expire on December 26, 2018. 53 Copyright Notice 55 Copyright (c) 2018 IETF Trust and the persons identified as the 56 document authors. All rights reserved. 58 This document is subject to BCP 78 and the IETF Trust's Legal 59 Provisions Relating to IETF Documents 60 (https://trustee.ietf.org/license-info) in effect on the date of 61 publication of this document. Please review these documents 62 carefully, as they describe your rights and restrictions with respect 63 to this document. Code Components extracted from this document must 64 include Simplified BSD License text as described in Section 4.e of 65 the Trust Legal Provisions and are provided without warranty as 66 described in the Simplified BSD License. 68 Table of Contents 70 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 71 1.1. Updates from RFC 7706 . . . . . . . . . . . . . . . . . . 4 72 1.2. Requirements Notation . . . . . . . . . . . . . . . . . . 5 73 2. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 5 74 3. Operation of the Root Zone on the Local Server . . . . . . . 5 75 4. Using the Root Zone Server on the Same Host . . . . . . . . . 7 76 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 77 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 78 6.1. Normative References . . . . . . . . . . . . . . . . . . 7 79 6.2. Informative References . . . . . . . . . . . . . . . . . 8 80 Appendix A. Current Sources of the Root Zone . . . . . . . . . . 8 81 Appendix B. Example Configurations of Common Implementations . . 9 82 B.1. Example Configuration: BIND 9.9 . . . . . . . . . . . . . 9 83 B.2. Example Configuration: Unbound 1.4 and NSD 4 . . . . . . 10 84 B.3. Example Configuration: Microsoft Windows Server 2012 . . 11 85 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 12 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 88 1. Introduction 90 DNS recursive resolvers have to provide answers to all queries from 91 their customers, even those for domain names that do not exist. For 92 each queried name that has a top-level domain (TLD) that is not in 93 the recursive resolver's cache, the resolver must send a query to a 94 root server to get the information for that TLD, or to find out that 95 the TLD does not exist. Research shows that the vast majority of 96 queries going to the root are for names that do not exist in the root 97 zone, partially because the negative answers are cached for a much 98 shorter period of time. A slow path between the recursive resolver 99 and the closest root server has a negative effect on the resolver's 100 customers. 102 Many of the queries from recursive resolvers to root servers get 103 answers that are referrals to other servers. Malicious third parties 104 might be able to observe that traffic on the network between the 105 recursive resolver and root servers. 107 This document describes a method for the operator of a recursive 108 resolver to greatly speed these queries and to hide them from 109 outsiders. The basic idea is to create an up-to-date root zone 110 server on the same host as the recursive server, and use that server 111 when the recursive resolver looks up root information. The recursive 112 resolver validates all responses from the root server on the same 113 host, just as it would all responses from a remote root server. 115 The primary goals of this design are to provide faster negative 116 responses to stub resolver queries that contain queries that result 117 in NXDOMAIN responses, and to prevent queries and responses from 118 being visible on the network. This design will probably have little 119 effect on getting faster positive responses to stub resolver for good 120 queries on TLDs, because the TTL for most TLDs is usually long-lived 121 (on the order of a day or two) and is thus usually already in the 122 cache of the recursive resolver. 124 This design explicitly only allows the new root zone server to be run 125 on the same server as the recursive resolver, in order to prevent the 126 server from serving authoritative answers to any other system. 127 Specifically, the root server on the local system MUST be configured 128 to only answer queries from the resolvers on the same host, and MUST 129 NOT answer queries from any other resolver. 131 It is important to note that the design described in this document is 132 controversial. There is not consensus on whether this is a "best 133 practice". In fact, many people feel that it is an excessively risky 134 practice because it introduces a new operational piece to local DNS 135 operations where there was not one before. The advantages listed 136 above do not come free: if this new system does not work correctly, 137 users can get bad data, or the entire recursive resolution system 138 might fail in ways that are hard to diagnose. 140 This design requires the addition of authoritative name server 141 software running on the same machine as the recursive resolver. 142 Thus, recursive resolver software such as BIND will not need to add 143 much new functionality, but recursive resolver software such as 144 Unbound will need to be able to talk to an authoritative server (such 145 as NSD) running on the same host. However, more recursive resolver 146 software might add the capabilities described in this document in th 147 future. 149 A different approach to solving the problems discussed in this 150 document is described in [RFC8198]. 152 1.1. Updates from RFC 7706 154 RFC 7706 explicitly required that the root server instance be run on 155 the loopback interface of the host running the validating resolver. 156 However, RFC 7706 also had examples of how to set up common software 157 that did not use the loopback interface. Thus, this document loosens 158 the restriction on the interface but keeps the requirement that only 159 systems running on that single host be able to query that root server 160 instance. 162 Removed the prohibition on distribution of recursive DNS servers 163 including configurations for this design because some already do, and 164 others have expressed an interest in doing so. 166 Added the idea that a recursive resolver using this design might 167 switch to using the normal (remote) root servers if the local root 168 server fails. 170 [ This section will list all the changes from RFC 7706. For this 171 draft, it is also the list of changes that we will make in future 172 versions of the daft. ] 174 [ Give a clearer comparison of software that allows slaving the root 175 zone in the software (such as BIND) versus resolver software that 176 requires a local slaved root zone (Unbound). ] 178 [ Add examples of other resolvers such as Knot Resolver and PowerDNS 179 Recusor, and maybe Windows Server. ] 181 [ Add discussion of BIND slaving the root zone in the same view 182 instead of using different views. ] 184 [ Make the use cases explicit. Be clearer that a real use case is 185 folks who are worried that root server unavailabilty due to DDoS 186 against them is a reason some people would use the mechanisms here. 187 ] 189 [ Describe how slaving the root zone from root zone servers does not 190 fully remove the reliance on the root servers being available. ] 192 [ Refresh list of where one can get copies of the root zone. ] 194 [ Other new topics might go here. ] 196 1.2. Requirements Notation 198 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 199 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 200 document are to be interpreted as described in [RFC2119]. 202 2. Requirements 204 In order to implement the mechanism described in this document: 206 o The system MUST be able to validate a zone with DNSSEC [RFC4033]. 208 o The system MUST have an up-to-date copy of the key used to sign 209 the DNS root. 211 o The system MUST be able to retrieve a copy of the entire root zone 212 (including all DNSSEC-related records). 214 o The system MUST be able to run an authoritative server for the 215 root zone on the same host. The root server instance MUST only 216 respond to queries from the same host. One way to assure not 217 responding to queries from other hosts is to make the address of 218 the authoritative server one of the IPv4 loopback addresses (that 219 is, an address in the range 127/8 for IPv4 or ::1 in IPv6). 221 A corollary of the above list is that authoritative data in the root 222 zone used on the local authoritative server MUST be identical to the 223 same data in the root zone for the DNS. It is possible to change the 224 unsigned data (the glue records) in the copy of the root zone, but 225 such changes could cause problems for the recursive server that 226 accesses the local root zone, and therefore any changes to the glue 227 records SHOULD NOT be made. 229 3. Operation of the Root Zone on the Local Server 231 The operation of an authoritative server for the root in the system 232 described here can be done separately from the operation of the 233 recursive resolver, or it might be part of the configuration of the 234 recursive resolver system. 236 The steps to set up the root zone are: 238 1. Retrieve a copy of the root zone. (See Appendix A for some 239 current locations of sources.) 241 2. Start the authoritative server with the root zone on an address 242 on the host that is not in use. For IPv4, this could be 243 127.0.0.1, but if that address is in use, any address in 127/8 is 244 acceptable. For IPv6, this would be ::1. It can also be a 245 publicly-visible address on the host, but only if the 246 authoritative server software allows restricting the addresses 247 that can access the authoritative server, and the software is 248 configured to only allow access from addresses on this single 249 host. 251 The contents of the root zone MUST be refreshed using the timers from 252 the SOA record in the root zone, as described in [RFC1035]. This 253 inherently means that the contents of the local root zone will likely 254 be a little behind those of the global root servers because those 255 servers are updated when triggered by NOTIFY messages. 257 If the contents of the root zone cannot be refreshed before the 258 expire time in the SOA, the local root server MUST return a SERVFAIL 259 error response for all queries sent to it until the zone can be 260 successfully be set up again. Because this would cause a recursive 261 resolver on the same host that is relying on this root server to also 262 fail, a resolver might be configured to immediatly switch to using 263 other (non-local) root servers if the resolver receives a SERVFAIL 264 response from a local root server. 266 In the event that refreshing the contents of the root zone fails, the 267 results can be disastrous. For example, sometimes all the NS records 268 for a TLD are changed in a short period of time (such as 2 days); if 269 the refreshing of the local root zone is broken during that time, the 270 recursive resolver will have bad data for the entire TLD zone. 272 An administrator using the procedure in this document SHOULD have an 273 automated method to check that the contents of the local root zone 274 are being refreshed; this might be part of the resolver software. 275 One way to do this is to have a separate process that periodically 276 checks the SOA of the root zone from the local root zone and makes 277 sure that it is changing. At the time that this document is 278 published, the SOA for the root zone is the digital representation of 279 the current date with a two-digit counter appended, and the SOA is 280 changed every day even if the contents of the root zone are 281 unchanged. For example, the SOA of the root zone on January 2, 2018 282 was 2018010201. A process can use this fact to create a check for 283 the contents of the local root zone (using a program not specified in 284 this document). 286 4. Using the Root Zone Server on the Same Host 288 A recursive resolver that wants to use a root zone server operating 289 as described in Section 3 simply specifies the local address as the 290 place to look when it is looking for information from the root. All 291 responses from the root server MUST be validated using DNSSEC. 293 Note that using this simplistic configuration will cause the 294 recursive resolver to fail if the local root zone server fails. A 295 more robust configuration would cause the resolver to start using the 296 normal remote root servers when the local root server fails (such as 297 if it does not respond or gives SERVFAIL responses). 299 See Appendix B for more discussion of this for specific software. 301 To test the proper operation of the recursive resolver with the local 302 root server, use a DNS client to send a query for the SOA of the root 303 to the recursive server. Make sure the response that comes back has 304 the AA bit in the message header set to 0. 306 5. Security Considerations 308 A system that does not follow the DNSSEC-related requirements given 309 in Section 2 can be fooled into giving bad responses in the same way 310 as any recursive resolver that does not do DNSSEC validation on 311 responses from a remote root server. Anyone deploying the method 312 described in this document should be familiar with the operational 313 benefits and costs of deploying DNSSEC [RFC4033]. 315 As stated in Section 1, this design explicitly only allows the new 316 root zone server to be run on the same host, answering queries only 317 from resolvers on that host, in order to prevent the server from 318 serving authoritative answers to any system other than the recursive 319 resolver. This has the security property of limiting damage to any 320 other system that might try to rely on an altered copy of the root. 322 6. References 324 6.1. Normative References 326 [RFC1035] Mockapetris, P., "Domain names - implementation and 327 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 328 November 1987, . 330 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 331 Requirement Levels", BCP 14, RFC 2119, 332 DOI 10.17487/RFC2119, March 1997, 333 . 335 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 336 Rose, "DNS Security Introduction and Requirements", 337 RFC 4033, DOI 10.17487/RFC4033, March 2005, 338 . 340 6.2. Informative References 342 [Manning2013] 343 Manning, W., "Client Based Naming", 2013, 344 . 346 [RFC8198] Fujiwara, K., Kato, A., and W. Kumari, "Aggressive Use of 347 DNSSEC-Validated Cache", RFC 8198, DOI 10.17487/RFC8198, 348 July 2017, . 350 Appendix A. Current Sources of the Root Zone 352 The root zone can be retrieved from anywhere as long as it comes with 353 all the DNSSEC records needed for validation. Currently, one can get 354 the root zone from ICANN by zone transfer (AXFR) over TCP from DNS 355 servers at xfr.lax.dns.icann.org and xfr.cjr.dns.icann.org. 357 Currently, the root can also be retrieved by AXFR over TCP from the 358 following root server operators: 360 o b.root-servers.net 362 o c.root-servers.net 364 o f.root-servers.net 366 o g.root-servers.net 368 o k.root-servers.net 370 It is crucial to note that none of the above services are guaranteed 371 to be available. It is possible that ICANN or some of the root 372 server operators will turn off the AXFR capability on the servers 373 listed above. Using AXFR over TCP to addresses that are likely to be 374 anycast (as the ones above are) may conceivably have transfer 375 problems due to anycast, but current practice shows that to be 376 unlikely. 378 To repeat the requirement from earlier in this document: if the 379 contents of the zone cannot be refreshed before the expire time, the 380 server MUST return a SERVFAIL error response for all queries until 381 the zone can be successfully be set up again. 383 Appendix B. Example Configurations of Common Implementations 385 This section shows fragments of configurations for some popular 386 recursive server software that is believed to correctly implement the 387 requirements given in this document. 389 The IPv4 and IPv6 addresses in this section were checked recently by 390 testing for AXFR over TCP from each address for the known single- 391 letter names in the root-servers.net zone. 393 The examples here use a loopback address of 127.12.12.12, but typical 394 installations will use 127.0.0.1. The different address is used in 395 order to emphasize that the root server does not need to be on the 396 device at the name "localhost" which is often locally served as 397 127.0.0.1. 399 B.1. Example Configuration: BIND 9.9 401 BIND acts both as a recursive resolver and an authoritative server. 402 Because of this, there is "fate-sharing" between the two servers in 403 the following configuration. That is, if the root server dies, it is 404 likely that all of BIND is dead. 406 Using this configuration, queries for information in the root zone 407 are returned with the AA bit not set. 409 When slaving a zone, BIND will treat zone data differently if the 410 zone is slaved into a separate view (or a separate instance of the 411 software) versus slaved into the same view or instance that is also 412 performing the recursion. 414 Validation: When using separate views or separate instances, the DS 415 records in the slaved zone will be validated as the zone data is 416 accessed by the recursive server. When using the same view, this 417 validation does not occur for the slaved zone. 419 Caching: When using separate views or instances, the recursive 420 server will cache all of the queries for the slaved zone, just as 421 it would using the traditional "root hints" method. Thus, as the 422 zone in the other view or instance is refreshed or updated, 423 changed information will not appear in the recursive server until 424 the TTL of the old record times out. Currently, the TTL for DS 425 and delegation NS records is two days. When using the same view, 426 all zone data in the recursive server will be updated as soon as 427 it receives its copy of the zone. 429 view root { 430 match-destinations { 127.12.12.12; }; 431 zone "." { 432 type slave; 433 file "rootzone.db"; 434 notify no; 435 masters { 436 192.228.79.201; # b.root-servers.net 437 192.33.4.12; # c.root-servers.net 438 192.5.5.241; # f.root-servers.net 439 192.112.36.4; # g.root-servers.net 440 193.0.14.129; # k.root-servers.net 441 192.0.47.132; # xfr.cjr.dns.icann.org 442 192.0.32.132; # xfr.lax.dns.icann.org 443 2001:500:84::b; # b.root-servers.net 444 2001:500:2f::f; # f.root-servers.net 445 2001:7fd::1; # k.root-servers.net 446 2620:0:2830:202::132; # xfr.cjr.dns.icann.org 447 2620:0:2d0:202::132; # xfr.lax.dns.icann.org 448 }; 449 }; 450 }; 452 view recursive { 453 dnssec-validation auto; 454 allow-recursion { any; }; 455 recursion yes; 456 zone "." { 457 type static-stub; 458 server-addresses { 127.12.12.12; }; 459 }; 460 }; 462 B.2. Example Configuration: Unbound 1.4 and NSD 4 464 Unbound and NSD are separate software packages. Because of this, 465 there is no "fate-sharing" between the two servers in the following 466 configurations. That is, if the root server instance (NSD) dies, the 467 recursive resolver instance (Unbound) will probably keep running but 468 will not be able to resolve any queries for the root zone. 469 Therefore, the administrator of this configuration might want to 470 carefully monitor the NSD instance and restart it immediately if it 471 dies. 473 Using this configuration, queries for information in the root zone 474 are returned with the AA bit not set. 476 # Configuration for Unbound 477 server: 478 do-not-query-localhost: no 479 stub-zone: 480 name: "." 481 stub-prime: no 482 stub-addr: 127.12.12.12 484 # Configuration for NSD 485 server: 486 ip-address: 127.12.12.12 487 zone: 488 name: "." 489 request-xfr: 192.228.79.201 NOKEY # b.root-servers.net 490 request-xfr: 192.33.4.12 NOKEY # c.root-servers.net 491 request-xfr: 192.5.5.241 NOKEY # f.root-servers.net 492 request-xfr: 192.112.36.4 NOKEY # g.root-servers.net 493 request-xfr: 193.0.14.129 NOKEY # k.root-servers.net 494 request-xfr: 192.0.47.132 NOKEY # xfr.cjr.dns.icann.org 495 request-xfr: 192.0.32.132 NOKEY # xfr.lax.dns.icann.org 496 request-xfr: 2001:500:84::b NOKEY # b.root-servers.net 497 request-xfr: 2001:500:2f::f NOKEY # f.root-servers.net 498 request-xfr: 2001:7fd::1 NOKEY # k.root-servers.net 499 request-xfr: 2620:0:2830:202::132 NOKEY # xfr.cjr.dns.icann.org 500 request-xfr: 2620:0:2d0:202::132 NOKEY # xfr.lax.dns.icann.org 502 B.3. Example Configuration: Microsoft Windows Server 2012 504 Windows Server 2012 contains a DNS server in the "DNS Manager" 505 component. When activated, that component acts as a recursive 506 server. DNS Manager can also act as an authoritative server. 508 Using this configuration, queries for information in the root zone 509 are returned with the AA bit set. 511 The steps to configure DNS Manager to implement the requirements in 512 this document are: 514 1. Launch the DNS Manager GUI. This can be done from the command 515 line ("dnsmgmt.msc") or from the Service Manager (the "DNS" 516 command in the "Tools" menu). 518 2. In the hierarchy under the server on which the service is 519 running, right-click on the "Forward Lookup Zones", and select 520 "New Zone". This brings up a succession of dialog boxes. 522 3. In the "Zone Type" dialog box, select "Secondary zone". 524 4. In the "Zone Name" dialog box, enter ".". 526 5. In the "Master DNS Servers" dialog box, enter 527 "b.root-servers.net". The system validates that it can do a zone 528 transfer from that server. (After this configuration is 529 completed, the DNS Manager will attempt to transfer from all of 530 the root zone servers.) 532 6. In the "Completing the New Zone Wizard" dialog box, click 533 "Finish". 535 7. Verify that the DNS Manager is acting as a recursive resolver. 536 Right-click on the server name in the hierarchy, choosing the 537 "Advanced" tab in the dialog box. See that "Disable recursion 538 (also disables forwarders)" is not selected, and that "Enable 539 DNSSEC validation for remote responses" is selected. 541 Acknowledgements 543 The authors fully acknowledge that running a copy of the root zone on 544 the loopback address is not a new concept, and that we have chatted 545 with many people about that idea over time. For example, Bill 546 Manning described a similar solution but to a very different problem 547 (intermittent connectivity, instead of constant but slow 548 connectivity) in his doctoral dissertation in 2013 [Manning2013]. 550 Evan Hunt contributed greatly to the logic in the requirements. 551 Other significant contributors include Wouter Wijngaards, Tony Hain, 552 Doug Barton, Greg Lindsay, and Akira Kato. The authors also received 553 many offline comments about making the document clear that this is 554 just a description of a way to operate a root zone on the same host, 555 and not a recommendation to do so. 557 Authors' Addresses 559 Warren Kumari 560 Google 562 Email: Warren@kumari.net 564 Paul Hoffman 565 ICANN 567 Email: paul.hoffman@icann.org