idnits 2.17.1 draft-wkumari-dnsop-root-loopback-02.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 : ---------------------------------------------------------------------------- == There are 17 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. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 26, 2014) is 3439 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: 0 errors (**), 0 flaws (~~), 3 warnings (==), 2 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 Intended status: Informational P. Hoffman 5 Expires: May 30, 2015 VPN Consortium 6 November 26, 2014 8 Decreasing Access Time to Root Servers by Running One on Loopback 9 draft-wkumari-dnsop-root-loopback-02 11 Abstract 13 Some DNS recursive resolvers have longer-than-desired round trip 14 times to the closest DNS root server. Such resolvers can greatly 15 decrease the round trip time by running a copy of the full root zone 16 on a loopback address (such as 127.0.0.1). Typically, the vast 17 majority of queries going to the root are for names that do not exist 18 in the root zone, and the negative answers are cached for a much 19 shorter period of time. This document shows how to start and 20 maintain such a copy of the root zone in a manner that is secure for 21 the operator of the recursive resolver and does not pose a threat to 22 other users of the DNS. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on May 30, 2015. 41 Copyright Notice 43 Copyright (c) 2014 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 59 1.1. Requirements Notation . . . . . . . . . . . . . . . . . . 3 60 2. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 3 61 3. Operation of the Root Zone on the Loopback Address . . . . . 4 62 4. Using the Root Zone Server on the Loopback Address . . . . . 4 63 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 64 6. Security Considerations . . . . . . . . . . . . . . . . . . . 4 65 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 66 8. Normative References . . . . . . . . . . . . . . . . . . . . 5 67 Appendix A. Current Sources of the Root Zone . . . . . . . . . . 5 68 Appendix B. Example Configurations of Common Implementations . . 6 69 B.1. Example Configuration: BIND 9.9 . . . . . . . . . . . . . 6 70 B.2. Example Configuration: Unbound 1.4 and NSD 4 . . . . . . 7 71 B.3. Example Configuration: Microsoft Windows Server 2012 . . 8 72 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 74 1. Introduction 76 DNS recursive resolvers have to answer all queries from their 77 customers, even those which are for domain names that do not exist. 78 For each queried name that has a top level domain (TLD) that is not 79 in the recursive resolver's cache, the resolver must send a query to 80 a root server to get the information for that TLD, or to find out 81 that the TLD does not exist. If there is a slow path between the 82 recursive resolver and the closest root server, getting slow 83 responses to these queries has a negative effect on the resolver's 84 customers. 86 This document describes a method for the operator of a recursive 87 resolver to greatly speed these queries. The basic idea is to create 88 an up-to-date root zone server on a loopback address on the same host 89 as the recursive server, and that server is used when the recursive 90 resolver uses for looking up root information. The recursive 91 resolver validates all responses from the root server on the loopback 92 address, just as it would all responses from a remote root server. 94 The primary goal of this design is to provide faster negative 95 responses to stub resolver queries that contain junk queries. This 96 design will probably have little effect on getting faster positive 97 responses to stub resolver for good queries on TLDs, because the data 98 for those zones is usually long-lived and already in the cache of the 99 recursive resolver; thus, getting faster positive responses is a non- 100 goal of this design. 102 This design explicitly only allows the new root zone server to be run 103 on a loopback address. This prevents the server from serving 104 authoritative answers to any system other than the recursive 105 resolver. 107 This design requires the addition of authoritative name server 108 software running on the same machine as the recursive resolver. 109 Thus, recursive resolver software such as BIND will not need to add 110 much new functionality, but recursive resolver software such as 111 Unbound will need to be able to talk to an authoritative server (such 112 as NSD) running on the same host. 114 1.1. Requirements Notation 116 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 117 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 118 document are to be interpreted as described in [RFC2119]. 120 2. Requirements 122 In order to implement the mechanism described in this document: 124 o The system MUST be able to validate a zone with DNSSEC. 126 o The system MUST have an up-to-date copy of the DNS root key. 128 o The system MUST be able to retrieve a copy of the entire root zone 129 (including all DNSSEC-related records). 131 o The system MUST be able to run an authoritative server on one of 132 the IPv4 loopback addresses (that is, an address in the range 133 127/8). 135 A corollary of the above list is that authoritative data in the root 136 zone used on the local authoritative server MUST be identical to the 137 same data in the root zone for the DNS. It is possible to change the 138 unsigned data (the glue records) in the copy of the root zone, but 139 such changes are likely to cause problems for the recursive server 140 that accesses the local root zone. 142 3. Operation of the Root Zone on the Loopback Address 144 The operation of an authoritative server for the root in the system 145 described here can be done separately from the operation of the 146 recursive resolver. 148 The steps to set up the root zone are: 150 1. Retrieve a copy of the root zone. (See Appendix A for some 151 current locations of sources.) 153 2. Start the authoritative server with the root zone on a loopback 154 address that is not in use. This would typically be 127.0.0.1, 155 but if that address is in use, any address in 127/8 is 156 acceptable. 158 The contents of the root zone must be refreshed using the timers from 159 the SOA record in root zone, as described in [RFC1035]. If the 160 contents of the zone cannot be refreshed before the expire time, the 161 server MUST return a SERVFAIL error response for all queries until 162 the zone can be successfully be set up again. 164 4. Using the Root Zone Server on the Loopback Address 166 A recursive resolver that wants to use a root zone server operating 167 as described in Section 3 simply specifies the local address as the 168 place to look when it is looking for information from the root. All 169 responses from the root server must be validated using DNSSEC. 171 Note that using this configuration will cause the recursive resolver 172 to fail if the local root zone server fails. See Appendix B for more 173 discussion of this for specific software. 175 To test the proper operation of the recursive resolver with the local 176 root server, use a DNS client to send a query for the SOA of the root 177 to the recursive server. Make sure the response that comes back does 178 not have the AD bit in the message header set. 180 5. IANA Considerations 182 This document requires no action from the IANA. 184 6. Security Considerations 186 A system that does not follow the DNSSEC-related requirements given 187 in Section 2 can be fooled into giving bad responses in the same way 188 as any recursive resolver that does not do DNSSEC validation on 189 responses from a remote root server. 191 7. Acknowledgements 193 The editors fully acknowledge that this is not a new concept, and 194 that we have chatted with many people about this. In fact, this 195 concept may already have been implemented without the knowledge of 196 the authors. For example, Bill Manning described something similar 197 in his doctoral dissertation in 2013. 199 Evan Hunt contributed greatly to the logic in the requirements. 200 Other significant contributors include Wouter Wijngaards, Tony Hain 201 Doug Barton, and Greg Lindsay. 203 8. Normative References 205 [RFC1035] Mockapetris, P., "Domain names - implementation and 206 specification", STD 13, RFC 1035, November 1987. 208 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 209 Requirement Levels", BCP 14, RFC 2119, March 1997. 211 Appendix A. Current Sources of the Root Zone 213 The root zone can be retrieved from anywhere as long as it comes with 214 all the DNSSEC records needed for validation. Currently, there are 215 three sources of the root zone supported by ICANN: 217 o From ICANN via FTP at ftp://rs.internic.net/domain/root.zone 219 o From ICANN via HTTP at http://www.internic.net/domain/root.zone 221 o From ICANN by AXFR from DNS servers at xfr.lax.dns.icann.org and 222 xfr.cjr.dns.icann.org 224 Currently, the root can be retrieved by zone transfer (AXFR) from the 225 following root server operators: 227 o b.root-servers.net 229 o c.root-servers.net 231 o f.root-servers.net 233 o g.root-servers.net 235 o k.root-servers.net 237 Appendix B. Example Configurations of Common Implementations 239 This section shows fragments of configurations for some popular 240 recursive server software that is believed to correctly implement the 241 requirements given in this document. 243 The IPv4 and IPv6 addresses in this section were checked recently by 244 testing for AXFR over TCP from each address for the known single- 245 letter names in the root-servers.net zone. 247 The examples here use a loopback address of 127.12.12.12, but typical 248 installations will use 127.0.0.1. The different address is used in 249 order to emphasize that the root server does not need to be on the 250 device at "localhost". 252 B.1. Example Configuration: BIND 9.9 254 BIND acts both as a recursive resolver and an authoritative server. 255 Because of this, there is "fate sharing" between the two servers in 256 the following configuration. That is, if the root server dies, it is 257 likely that all of BIND is dead. 259 Using this configuration, queries for information in the root zone 260 are returned with the AA bit not set. 262 When slaving a zone, BIND will treat zone data differently if it is 263 slaved into a separate view (or a separate instance of the software) 264 versus slaving the zone into the same view or instance that is also 265 performing the recursion. 267 Validation: When using separate views or separate instances, the DS 268 records in the slaved zone will be validated as the zone data is 269 accessed by the recursive server. When using the same view, this 270 validation does not occur for the slaved zone. 272 Caching: When using separate views or instances, the recursive 273 server will cache all of the queries for the slaved zone, just as 274 it would using the traditional root hints method. Thus, as the 275 zone in the other view or instance is refreshed or updated, 276 changed information will not appear in the recursive server until 277 the TTL of the old record times out. Currently the TTL for DS and 278 delegation NS records is two days. When using the same view, all 279 zone data in the recursive server will be updated as soon as it 280 receives its copy of the zone. 282 view root { 283 match-destinations { 127.12.12.12; }; 284 zone "." { 285 type slave; 286 file "rootzone.db"; 287 notify no; 288 masters { 289 192.228.79.201; # b.root-servers.net 290 192.33.4.12; # c.root-servers.net 291 192.5.5.241; # f.root-servers.net 292 192.112.36.4; # g.root-servers.net 293 193.0.14.129; # k.root-servers.net 294 2001:500:84::b; # b.root-servers.net 295 2001:500:2f::f; # f.root-servers.net 296 2001:7fd::1; # k.root-servers.net 297 }; 298 }; 299 }; 301 view recursive { 302 dnssec-validation auto; 303 allow-recursion { any; }; 304 recursion yes; 305 zone "." { 306 type static-stub; 307 server-addresses { 127.12.12.12; }; 308 }; 309 }; 311 B.2. Example Configuration: Unbound 1.4 and NSD 4 313 Unbound and NSD are separate software packages. Because of this, 314 there is no "fate sharing" between the two servers in the following 315 configurations. That is, if the root server instance (NSD) dies, the 316 recursive resolver instance (Unbound) will probably keep running, but 317 will not be able to resolve any queries for the root zone. 318 Therefore, the administrator of this configuration might want to 319 carefully monitor the NSD instance and restart it immediately if it 320 dies. 322 Using this configuration, queries for information in the root zone 323 are returned with the AA bit not set. 325 # Configuration for Unbound 326 server: 327 do-not-query-localhost: no 328 stub-zone: 329 name: "." 330 stub-prime: no 331 stub-addr: 127.12.12.12 333 # Configuration for NSD 334 server: 335 ip-address: 127.12.12.12 336 zone: 337 name: "." 338 request-xfr: 192.228.79.201 NOKEY # b.root-servers.net 339 request-xfr: 192.33.4.12 NOKEY # c.root-servers.net 340 request-xfr: 192.5.5.241 NOKEY # f.root-servers.net 341 request-xfr: 192.112.36.4 NOKEY # g.root-servers.net 342 request-xfr: 193.0.14.129 NOKEY # k.root-servers.net 343 request-xfr: 2001:500:84::b NOKEY # b.root-servers.net 344 request-xfr: 2001:500:2f::f NOKEY # f.root-servers.net 345 request-xfr: 2001:7fd::1 NOKEY # k.root-servers.net 347 B.3. Example Configuration: Microsoft Windows Server 2012 349 Windows Server 2012 contains a DNS server in the "DNS Manager" 350 component. When activated, that component acts as a recursive 351 server. DNS Manager can also act as an authoritative server. 353 Using this configuration, queries for information in the root zone 354 are returned with the AA bit set. 356 The steps to configure DNS Manager to implement the requirements in 357 this document are: 359 1. Launch the DNS Manager GUI. This can be done from the command 360 line ("dnsmgmt.msc") or from the Service Manager (the "DNS" 361 command in the "Tools" menu). 363 2. In the hierarchy under the server on which the service is 364 running, right-click on the "Forward Lookup Zones", and select 365 "New Zone". This brings up a succession of dialog boxes. 367 3. In the "Zone Type" dialog box, select "Secondary zone". 369 4. In the "Zone Name" dialog box, enter ".". 371 5. In the "Master DNS Servers" dialog box, enter "b.root- 372 servers.net". The system validates that it can do a zone 373 transfer from that server. (After this configuration is 374 completed, DNS Manager will attempt to transfer from all of the 375 root zone servers.) 377 6. In the "Completing the New Zone Wizard" dialog box, click 378 "Finish". 380 7. Verify that the DNS Manager is acting as a recursive resolver. 381 Right-click on the server name in the hierarch, choosing the 382 "Advanced" tab in the dialog box. See that "Disable recursion 383 (also disables forwarders)" is not selected, and that "Enable 384 DNSSEC validation for remote responses" is selected. 386 Authors' Addresses 388 Warren Kumari 389 Google 391 Email: Warren@kumari.net 393 Paul Hoffman 394 VPN Consortium 396 Email: paul.hoffman@vpnc.org