idnits 2.17.1 draft-ietf-dnsop-no-response-issue-03.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 6, 2016) is 2942 days in the past. Is this intentional? Checking references for intended status: Best Current Practice ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Unknown state RFC: RFC 1033 ** Obsolete normative reference: RFC 5966 (Obsoleted by RFC 7766) Summary: 2 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group M. Andrews 3 Internet-Draft ISC 4 Intended status: Best Current Practice April 6, 2016 5 Expires: October 8, 2016 7 A Common Operational Problem in DNS Servers - Failure To Respond. 8 draft-ietf-dnsop-no-response-issue-03 10 Abstract 12 The DNS is a query / response protocol. Failure to respond or to 13 respond correctly to queries causes both immediate operational 14 problems and long term problems with protocol development. 16 This document identifies a number of common kinds of queries to which 17 some servers either fail to respond or else respond incorrectly. 18 This document also suggests procedures for TLD and other similar zone 19 operators to apply to help reduce / eliminate the problem. 21 The document does not look at the DNS data itself, just the structure 22 of the responses. 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 October 8, 2016. 41 Copyright Notice 43 Copyright (c) 2016 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 2. Common queries kinds that result in non responses. . . . . . 3 60 2.1. EDNS Queries - Version Independent . . . . . . . . . . . 3 61 2.2. EDNS Queries - Version Specific . . . . . . . . . . . . . 4 62 2.3. EDNS Options . . . . . . . . . . . . . . . . . . . . . . 4 63 2.4. EDNS Flags . . . . . . . . . . . . . . . . . . . . . . . 4 64 2.5. DNS Flags . . . . . . . . . . . . . . . . . . . . . . . . 4 65 2.6. Unknown / Unsupported Type Queries . . . . . . . . . . . 5 66 2.7. Unknown DNS opcodes . . . . . . . . . . . . . . . . . . . 5 67 2.8. TCP Queries . . . . . . . . . . . . . . . . . . . . . . . 5 68 3. Remediating . . . . . . . . . . . . . . . . . . . . . . . . . 5 69 4. Firewalls and Load Balancers . . . . . . . . . . . . . . . . 7 70 5. Scrubbing Services . . . . . . . . . . . . . . . . . . . . . 8 71 6. Whole Answer Caches . . . . . . . . . . . . . . . . . . . . . 9 72 7. Response Code Selection . . . . . . . . . . . . . . . . . . . 9 73 8. Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 74 8.1. Testing - Basic DNS . . . . . . . . . . . . . . . . . . . 10 75 8.2. Testing - Extended DNS . . . . . . . . . . . . . . . . . 12 76 9. Security Considerations . . . . . . . . . . . . . . . . . . . 15 77 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 78 11. Normative References . . . . . . . . . . . . . . . . . . . . 16 79 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 17 81 1. Introduction 83 The DNS [RFC1034], [RFC1035] is a query / response protocol. Failure 84 to respond to queries or to respond incorrectly causes both immediate 85 operational problems and long term problems with protocol 86 development. 88 Failure to respond to a query is indistinguishable from a packet loss 89 without doing a analysis of query response patterns and results in 90 unnecessary additional queries being made by DNS clients and 91 unnecessary delays being introduced to the resolution process. 93 Due to the inability to distinguish between packet loss and 94 nameservers dropping EDNS [RFC6891] queries, packet loss is sometimes 95 misclassified as lack of EDNS support which can lead to DNSSEC 96 validation failures. 98 Allowing servers which fail to respond to queries to remain results 99 in developers being afraid to deploy implementations of recent 100 standards. Such servers need to be identified and corrected / 101 replaced. 103 The DNS has response codes that cover almost any conceivable query 104 response. A nameserver should be able to respond to any conceivable 105 query using them. 107 Unless a nameserver is under attack, it should respond to all queries 108 directed to it as a result of following delegations. Additionally 109 code should not assume that there isn't a delegation to the server 110 even if it is not configured to serve the zone. Broken delegations 111 are a common occurrence in the DNS and receiving queries for zones 112 that the server is not configured for is not necessarily an 113 indication that the server is under attack. Parent zone operators 114 are supposed to regularly check that the delegating NS records are 115 consistent with those of the delegated zone and to correct them when 116 they are not [RFC1034]. If this was being done regularly, the 117 instances of broken delegations would be much lower. 119 When a nameserver is under attack it may wish to drop packets. A 120 common attack is to use a nameserver as a amplifier by sending 121 spoofed packets. This is done because response packets are bigger 122 than the queries and big amplification factors are available 123 especially if EDNS is supported. Limiting the rate of responses is 124 reasonable when this is occurring and the client should retry. This 125 however only works if legitimate clients are not being forced to 126 guess whether EDNS queries are accept or not. While there is still a 127 pool of servers that don't respond to EDNS requests, clients have no 128 way to know if the lack of response is due to packet loss, EDNS 129 packets not being supported or rate limiting due to the server being 130 under attack. Mis-classifications of server characteristics are 131 unavoidable when rate limiting is done. 133 2. Common queries kinds that result in non responses. 135 There are three common query kinds that result in non responses 136 today. These are EDNS queries, queries for unknown (unallocated) or 137 unsupported types, and filtering of TCP queries. 139 2.1. EDNS Queries - Version Independent 141 Identifying servers that fail to respond to EDNS queries can be done 142 by first identifying that the server responds to regular DNS queries, 143 followed by a series of otherwise identical queries using EDNS, then 144 making the original query again. A series of EDNS queries is needed 145 as at least one DNS implementation responds to the first EDNS query 146 with FORMERR but fails to respond to subsequent queries from the same 147 address for a period until a regular DNS query is made. The EDNS 148 query should specify a UDP buffer size of 512 bytes to avoid false 149 classification of not supporting EDNS due to response packet size. 151 If the server responds to the first and last queries but fails to 152 respond to most or all of the EDNS queries, it is probably faulty. 153 The test should be repeated a number of times to eliminate the 154 likelihood of a false positive due to packet loss. 156 Firewalls may also block larger EDNS responses but there is no easy 157 way to check authoritative servers to see if the firewall is 158 misconfigured. 160 2.2. EDNS Queries - Version Specific 162 Some servers respond correctly to EDNS version 0 queries but fail to 163 respond to EDNS queries with version numbers that are higher than 164 zero. Servers should respond with BADVERS to EDNS queries with 165 version numbers that they do not support. 167 Some servers respond correctly to EDNS version 0 queries but fail to 168 set QR=1 when responding to EDNS versions they do not support. Such 169 answers are discarded or treated as requests. 171 2.3. EDNS Options 173 Some servers fail to respond to EDNS queries with EDNS options set. 174 Unknown EDNS options are supposed to be ignored by the server 175 [RFC6891]. 177 2.4. EDNS Flags 179 Some servers fail to respond to EDNS queries with EDNS flags set. 180 Server should ignore EDNS flags they do not understand and should not 181 add them to the response [RFC6891]. 183 2.5. DNS Flags 185 Some servers fail to respond to DNS queries with various DNS flags 186 set, regardless of whether they are defined or still reserved. At 187 the time of writing there are servers that fail to respond to queries 188 with the AD bit set to 1 and servers that fail to respond to queries 189 with the last reserved flag bit set. 191 2.6. Unknown / Unsupported Type Queries 193 Identifying servers that fail to respond to unknown or unsupported 194 types can be done by making an initial DNS query for an A record, 195 making a number of queries for an unallocated type, then making a 196 query for an A record again. IANA maintains a registry of allocated 197 types. 199 If the server responds to the first and last queries but fails to 200 respond to the queries for the unallocated type, it is probably 201 faulty. The test should be repeated a number of times to eliminate 202 the likelihood of a false positive due to packet loss. 204 2.7. Unknown DNS opcodes 206 The use of previously undefined opcodes is to be expected. Since the 207 DNS was first defined two new opcodes have been added, UPDATE and 208 NOTIFY. 210 NOTIMP is the expected rcode to an unknown / unimplemented opcode. 212 Note: while new opcodes will most probably use the current layout 213 structure for the rest of the message there is no requirement than 214 anything other than the DNS header match. 216 2.8. TCP Queries 218 All DNS servers are supposed to respond to queries over TCP 219 [RFC5966]. Firewalls that drop TCP connection attempts rather that 220 resetting the connect attempt or send a ICMP/ICMPv6 administratively 221 prohibited message introduce excessive delays to the resolution 222 process. 224 Whether a server accepts TCP connections can be tested by first 225 checking that it responds to UDP queries to confirm that it is up and 226 operating, then attempting the same query over TCP. An additional 227 query should be made over UDP if the TCP connection attempt fails to 228 confirm that the server under test is still operating. 230 3. Remediating 232 While the first step in remediating this problem is to get the 233 offending nameserver code corrected, there is a very long tail 234 problem with DNS servers in that it can often take over a decade 235 between the code being corrected and a nameserver being upgraded with 236 corrected code. With that in mind it is requested that TLD, and 237 other similar zone operators, take steps to identify and inform their 238 customers, directly or indirectly through registrars, that they are 239 running such servers and that the customers need to correct the 240 problem. 242 TLD operators are being asked to do this as they, due to the nature 243 of running a TLD and the hierarchical nature of the DNS, have access 244 to a large numbers of nameserver names as well as contact details for 245 the registrants of those nameservers. While it is possible to 246 construct lists of nameservers from other sources, and that has been 247 done to survey the state of the Internet, that doesn't give the 248 tester the contact details necessary to inform the operators. The 249 SOA RNAME is often invalid and whois data is obscured and / or not 250 available which makes it infeasible for others to do this. 252 While this section talks about TLD operators performing this work, it 253 may be done by registrars on behalf of the TLD operator. The intent 254 is to ensure that the testing happens and that operators of non- 255 compliant nameservers be informed, rather than to prescribe who does 256 the actual testing and communication. Note: having registrars 257 perform this testing and reporting is likely to result in duplicate 258 reports for the same server being issued by multiple registrars. 260 TLD operators should construct a list of servers child zones are 261 delegated to along with a delegated zone name. This name shall be 262 the query name used to test the server as it is supposed to exist. 264 For each server the TLD operator shall make an SOA query of the 265 delegated zone name. This should result in the SOA record being 266 returned in the answer section. If the SOA record is not returned 267 but some other response is returned, this is a indication of a bad 268 delegation and the TLD operator should take whatever steps it 269 normally takes to rectify a bad delegation. If more that one zone is 270 delegated to the server, it should choose another zone until it finds 271 a zone which responds correctly or it exhausts the list of zones 272 delegated to the server. 274 If the server fails to get a response to a SOA query, the TLD 275 operator should make an A query as some nameservers fail to respond 276 to SOA queries but respond to A queries. If it gets no response to 277 the A query, another delegated zone should be queried for as some 278 nameservers fail to respond to zones they are not configured for. If 279 subsequent queries find a responding zone, all delegation to this 280 server need to be checked and rectified using the TLD's normal 281 procedures. 283 Having identified a working tuple the TLD 284 operator should now check that the server responds to EDNS, Unknown 285 Query Type and TCP tests as described above. If the TLD operator 286 finds that server fails any of the tests, the TLD operator shall take 287 steps to inform the operator of the server that they are running a 288 faulty nameserver and that they need to take steps to correct the 289 matter. The TLD operator shall also record the 290 for follow-up testing. 292 If repeated attempts to inform and get the customer to correct / 293 replace the faulty server are unsuccessful the TLD operator shall 294 remove all delegations to said server from the zone. Removal of 295 delegations is the step of last resort in handling complaints as 296 specified in [RFC1033] COMPLAINTS. 298 It will also be necessary for TLD operators to repeat the scans 299 periodically. It is recommended that this be performed monthly 300 backing off to bi-annually once the numbers of faulty servers found 301 drops off to less than 1 in 100000 servers tested. Follow-up tests 302 for faulty servers still need to be performed monthly. 304 Some operators claim that they can't perform checks at registration 305 time. If a check is not performed at registration time, it needs to 306 be performed within a week of registration in order to detect faulty 307 servers swiftly. 309 Checking of delegations by TLD operators should be nothing new as 310 they have been required from the very beginnings of DNS to do this 311 [RFC1034]. Checking for compliance of nameserver operations should 312 just be a extension of such testing. 314 It is recommended that TLD operators setup a test web page which 315 performs the tests the TLD operator performs as part of their regular 316 audits to allow nameserver operators to test that they have correctly 317 fixed their servers. Such tests should be rate limited to avoid 318 these pages being a denial of service vector. 320 Nothing in this section precludes others testing servers for protocol 321 compliance. DNS operators should test their servers to ensure that 322 their vendors have shipped protocol compliant products. Nameserver 323 vendors can use these tests as a part of this release processes. 324 Registrants can use these tests to check their DNS operators servers. 326 4. Firewalls and Load Balancers 328 Firewalls and load balancers can affect the externally visible 329 behaviour of a nameserver. Tests for conformance need to be done 330 from outside of any firewall so that the system as a whole is tested. 332 Firewalls and load balancers should not drop DNS packets that they 333 don't understand. They should either pass through the packets or 334 generate an appropriate error response. 336 Requests for unknown query types is normal client behaviour and 337 should not be construed as an attack. Nameservers have always been 338 expected to be able to handle such queries. 340 Requests with unassigned flags set (DNS or EDNS) is expected client 341 behaviour and should not be construed as an attack. The behaviour 342 for unassigned is to ignore them in the request and to not set them 343 in the response. All dropping DNS / EDNS packets with unassigned 344 flags does is make it harder to deploy extensions that make use of 345 them due to the need to reconfigure / update firewalls. 347 Requests with unknown EDNS options is expected client behaviour and 348 should not be construed as an attack. The correct behaviour for 349 unknown EDNS options is to ignore there presence when constructing a 350 reply. 352 Requests with unknown EDNS versions is expected client behaviour and 353 should not be construed as an attack. The correct behaviour for 354 unknown EDNS versions is to return BADVERS along with the highest 355 EDNS version the server supports. All dropping EDNS packets does is 356 break EDNS version negotiation. 358 Firewalls should not assume that there will only be a single response 359 message to a requests. There have been proposals to use EDNS to 360 signal that multiple DNS messages be returned rather than a single 361 UDP message that is fragmented at the IP layer. 363 5. Scrubbing Services 365 Scrubbing services, like firewalls, can affect the externally visible 366 behaviour of a nameserver. If a operator uses a scrubbing service, 367 they should check that legitimate queries are not being blocked. 369 Scrubbing services, unlike firewalls, are also turned on and off in 370 response to denial of service attacks. One needs to take care when 371 choosing a scrubbing service and ask questions like: 373 Do they pass unknown DNS query types? 375 Do they pass unknown EDNS versions? 377 Do they pass unknown EDNS options? 379 Do they pass unknown EDNS flags? 381 Do they pass requests with unknown DNS opcodes? 382 Do they pass requests with the remaining reserved DNS header flag 383 bit set? 385 None of these are attack vectors but some scrubbing services treat 386 them as such. 388 6. Whole Answer Caches 390 Whole answer caches take a previously constructed answer and return 391 it to a subsequent query for the same qname, qtype and qclass, just 392 updating the query id field and possibly the qname to match the 393 incoming query to avoid constructing each response individually. 395 Whole answer caches can return the wrong response to a query if they 396 do not take all of the attributes of the query into account, rather 397 than just some of them e.g. qname, qtype and qclass. This has 398 implications when testing and with overall protocol compliance. 400 e.g. There are whole answer caches that ignore the EDNS version 401 field which results in incorrect answers to non EDNS version 0 402 queries being returned if they were preceded by a EDNS version 0 403 query for the same name and type. 405 e.g. There are caches that ignore the EDNS options in the query 406 resulting in options only working some of the time and/or options 407 being returned when not requested. 409 7. Response Code Selection 411 Choosing the correct response code when fixing a nameserver is 412 important. Just because a type is not implemented does not mean that 413 NOTIMP is the correct response code to return. Response codes need 414 to be chosen considering how clients will handle them. 416 For unimplemented opcodes NOTIMP is the expected response code. 417 Additionally a new opcode could change the message format by 418 extending the header or changing the structure of the records etc. 419 This may result in FORMERR being returned though NOTIMP would be more 420 correct. 422 In general, for unimplemented type codes Name Error (NXDOMAIN) and 423 NOERROR (no data) are the expected response codes. A server is not 424 supposed to serve a zone which contains unsupported types ([RFC1034]) 425 so the only thing left is return if the QNAME exists or not. NOTIMP 426 and REFUSED are not useful responses as they force the clients to try 427 all the authoritative servers for a zone looking for a server which 428 will answer the query. 430 Meta queries type may be the exception but these need to be thought 431 about on a case by case basis. 433 If the server supports EDNS and get a query with an unsupported EDNS 434 version, the correct response is BADVERS [RFC6891]. 436 If the server do not support EDNS at all, FORMERR and NOTIMP are the 437 expected error codes. That said a minimal EDNS server implementation 438 just requires parsing the OPT records and responding with an empty 439 OPT record. There is no need to interpret any EDNS options present 440 in the request as unsupported options are expected to be ignored 441 [RFC6891]. 443 8. Testing 445 Testing is divided into two sections. Basic DNS which all servers 446 should meet and Extended DNS which should be met by all servers that 447 support EDNS. If a server does not support EDNS it should still 448 respond to all the tests. 450 It is advisable to run all of the tests below in parallel so as to 451 minimise the delays due to multiple timeouts when the servers do not 452 respond. 454 The tests below use dig from BIND 9.11.0 which is still in 455 development. 457 8.1. Testing - Basic DNS 459 This first set of tests cover basic DNS server behaviour and all 460 servers should pass these tests. 462 Verify the server is configured for the zone: 464 dig +noedns +noad +norec soa $zone @$server 466 expect: status: NOERROR 467 expect: SOA record 468 expect: flag: aa to be present 469 Check that TCP queries work: 471 dig +noedns +noad +norec +tcp soa $zone @$server 473 expect: status: NOERROR 474 expect: SOA record 475 expect: flag: aa to be present 477 The requirement that TCP be supported is defined in [RFC5966]. 479 Check that queries for an unknown type work: 481 dig +noedns +noad +norec type1000 $zone @$server 483 expect: status: NOERROR 484 expect: an empty answer section. 485 expect: flag: aa to be present 487 That new types are to be expected is specified in Section 3.6, 488 [RFC1035]. Servers that don't support a new type are expected to 489 reject a zone that contains a unsupported type as per Section 5.2, 490 [RFC1035]. This means that a server that does load a zone can answer 491 questions for unknown types with NOERROR or NXDOMAIN as per 492 Section 4.3.2, [RFC1034]. [RFC6895] later reserved distinct ranges 493 for meta and data types which allows servers to be definitive about 494 whether a query should be answerable from zone content or not. 496 Check that queries with CD=1 work: 498 dig +noedns +noad +norec +cd soa $zone @$server 500 expect: status: NOERROR 501 expect: SOA record to be present 502 expect: flag: aa to be present 504 CD use in queries is defined in [RFC4035]. 506 Check that queries with AD=1 work: 508 dig +noedns +norec +ad soa $zone @$server 510 expect: status: NOERROR 511 expect: SOA record to be present 512 expect: flag: aa to be present 514 AD use in queries is defined in [RFC6840]. 516 Check that queries with the last unassigned DNS header flag work and 517 that the flag bit is not copied to the response: 519 dig +noedns +noad +norec +zflag soa $zone @$server 521 expect: status: NOERROR 522 expect: SOA record to be present 523 expect: MBZ to not be in the response 524 expect: flag: aa to be present 526 MBZ (Must Be Zero) presence indicates the flag bit has been 527 incorrectly copied. See Section 4.1.1, [RFC1035] "Z Reserved for 528 future use. Must be zero in all queries and responses." 530 Check that new opcodes are handled: 532 dig +noedns +noad +opcode=15 +norec +header-only @$server 534 expect: status: NOTIMP 535 expect: SOA record to not be present 536 expect: flag: aa to NOT be present 538 As unknown opcodes have no definition, including packet format other 539 than there must be a DNS header present, there is only one possible 540 rcode that make sense to return to a request with a unknown opcode 541 and that is NOTIMP. 543 8.2. Testing - Extended DNS 545 The next set of test cover various aspects of EDNS behaviour. If any 546 of these tests succeed, then all of them should succeed. There are 547 servers that support EDNS but fail to handle plain EDNS queries 548 correctly so a plain EDNS query is not a good indicator of lack of 549 EDNS support. 551 Check that plain EDNS queries work: 553 dig +nocookie +edns=0 +noad +norec soa $zone @$server 555 expect: status: NOERROR 556 expect: SOA record to be present 557 expect: OPT record to be present 558 expect: EDNS Version 0 in response 559 expect: flag: aa to be present 561 +nocookie disables sending a EDNS COOKIE option in which is on by 562 default. 564 Check that EDNS version 1 queries work (EDNS supported): 566 dig +nocookie +edns=1 +noednsneg +noad +norec soa $zone @$server 568 expect: status: BADVERS 569 expect: SOA record to not be present 570 expect: OPT record to be present 571 expect: EDNS Version 0 in response 572 expect: flag: aa to NOT be present 574 Only EDNS Version 0 is currently defined so the response should 575 always be a 0 version. This will change when EDNS version 1 is 576 defined. BADVERS is the expected rcode if EDNS is supported as per 577 Section 6.1.3, [RFC6891]. 579 Check that EDNS queries with an unknown option work (EDNS supported): 581 dig +nocookie +edns=0 +noad +norec +ednsopt=100 soa $zone @$server 583 expect: status: NOERROR 584 expect: SOA record to be present 585 expect: OPT record to be present 586 expect: OPT=100 to not be present 587 expect: EDNS Version 0 in response 588 expect: flag: aa to be present 590 Unknown EDNS options are supposed to be ignored, Section 6.1.2, 591 [RFC6891]. 593 Check that EDNS queries with unknown flags work (EDNS supported): 595 dig +nocookie +edns=0 +noad +norec +ednsflags=0x40 soa $zone @$server 597 expect: status: NOERROR 598 expect: SOA record to be present 599 expect: OPT record to be present 600 expect: MBZ not to be present 601 expect: EDNS Version 0 in response 602 expect: flag: aa to be present 604 MBZ (Must Be Zero) presence indicates the flag bit has been 605 incorrectly copied as per Section 6.1.4, [RFC6891]. 607 Check that EDNS version 1 queries with unknown flags work (EDNS 608 supported): 610 dig +nocookie +edns=1 +noednsneg +noad +norec +ednsflags=0x40 soa \ 611 $zone @$server 613 expect: status: BADVERS 614 expect: SOA record to NOT be present 615 expect: OPT record to be present 616 expect: MBZ not to be present 617 expect: EDNS Version 0 in response 618 expect: flag: aa to NOT be present 620 +noednsneg disables EDNS version negotiation in DiG; MBZ (Must Be 621 Zero) presence indicates the flag bit has been incorrectly copied. 623 Check that EDNS version 1 queries with unknown options work (EDNS 624 supported): 626 dig +nocookie +edns=1 +noednsneg +noad +norec +ednsopt=100 soa \ 627 $zone @$server 629 expect: status: BADVERS 630 expect: SOA record to NOT be present 631 expect: OPT record to be present 632 expect: OPT=100 to NOT be present 633 expect: EDNS Version 0 in response 634 expect: flag: aa to be present 636 +noednsneg disables EDNS version negotiation in DiG. 638 Check that a DNSSEC queries work (EDNS supported): 640 dig +nocookie +edns=0 +noad +norec +dnssec soa $zone @$server 642 expect: status: NOERROR 643 expect: SOA record to be present 644 expect: OPT record to be present 645 expect: DO=1 to be present if a RRSIG is in the response 646 expect: EDNS Version 0 in response 647 expect: flag: aa to be present 649 DO=1 should be present if RRSIGs are returned as they indicate that 650 the server supports DNSSEC. Servers that support DNSSEC are supposed 651 to copy the DO bit from the request to the response as per [RFC3225]. 653 Check that EDNS version 1 DNSSEC queries work (EDNS supported): 655 dig +nocookie +edns=1 +noednsneg +noad +norec +dnssec soa \ 656 $zone @$server 658 expect: status: BADVERS 659 expect: SOA record to not be present 660 expect: OPT record to be present 661 expect: DO=1 to be present if the EDNS version 0 DNSSEC query test 662 returned DO=1 663 expect: EDNS Version 0 in response 664 expect: flag: aa to NOT be present 666 +noednsneg disables EDNS version negotiation in DiG. 668 Check that EDNS queries with multiple defined EDNS options work: 670 dig +edns=0 +noad +norec +cookie +nsid +expire +subnet=0.0.0.0/0 \ 671 soa $zone @$server 673 expect: status: NOERROR 674 expect: SOA record to be present 675 expect: OPT record to be present 676 expect: EDNS Version 0 in response 677 expect: flag: aa to be present 679 If EDNS is not supported by the nameserver, we expect a response to 680 all the above queries. That response may be a FORMERR or NOTIMP 681 error response or the OPT record may just be ignored. 683 Some nameservers only return a EDNS response when a particular EDNS 684 option or flag (e.g. DO=1) is present in the request. This 685 behaviour is not compliant behaviour and may hide other incorrect 686 behaviour from the above tests. Re-testing with the triggering 687 option / flag present will expose this misbehaviour. 689 9. Security Considerations 691 Testing protocol compliance can potentially result in false reports 692 of attempts to break services from Intrusion Detection Services and 693 firewalls. None of the tests listed above should break nominally 694 EDNS compliant servers. None of the tests above should break non 695 EDNS servers. All the tests above are well formed, though not 696 necessarily common, DNS queries. 698 Relaxing firewall settings to ensure EDNS compliance could 699 potentially expose a critical implementation flaw in the nameserver. 701 Nameservers should be tested for conformance before relaxing firewall 702 settings. 704 When removing delegations for non-compliant servers there can be a 705 knock on effect on other zones that require these zones to be 706 operational for the nameservers addresses to be resolved. 708 10. IANA Considerations 710 IANA / ICANN needs to consider what tests, if any, from above that it 711 should add to the zone maintenance procedures for zones under its 712 control including pre-delegation checks. Otherwise this document has 713 no actions for IANA. 715 11. Normative References 717 [RFC1033] Lottor, M., "Domain Administrators Operations Guide", 718 RFC 1033, DOI 10.17487/RFC1033, November 1987, 719 . 721 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 722 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 723 . 725 [RFC1035] Mockapetris, P., "Domain names - implementation and 726 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 727 November 1987, . 729 [RFC3225] Conrad, D., "Indicating Resolver Support of DNSSEC", 730 RFC 3225, DOI 10.17487/RFC3225, December 2001, 731 . 733 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 734 Rose, "Protocol Modifications for the DNS Security 735 Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005, 736 . 738 [RFC5966] Bellis, R., "DNS Transport over TCP - Implementation 739 Requirements", RFC 5966, DOI 10.17487/RFC5966, August 740 2010, . 742 [RFC6840] Weiler, S., Ed. and D. Blacka, Ed., "Clarifications and 743 Implementation Notes for DNS Security (DNSSEC)", RFC 6840, 744 DOI 10.17487/RFC6840, February 2013, 745 . 747 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 748 for DNS (EDNS(0))", STD 75, RFC 6891, 749 DOI 10.17487/RFC6891, April 2013, 750 . 752 [RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA 753 Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895, 754 April 2013, . 756 Author's Address 758 M. Andrews 759 Internet Systems Consortium 760 950 Charter Street 761 Redwood City, CA 94063 762 US 764 Email: marka@isc.org