idnits 2.17.1 draft-ietf-dnsop-no-response-issue-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 : ---------------------------------------------------------------------------- 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 (February 21, 2016) is 2985 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) ** Obsolete normative reference: RFC 5966 (Obsoleted by RFC 7766) Summary: 1 error (**), 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 February 21, 2016 5 Expires: August 24, 2016 7 A Common Operational Problem in DNS Servers - Failure To Respond. 8 draft-ietf-dnsop-no-response-issue-02 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 August 24, 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. 296 It will also be necessary for TLD operators to repeat the scans 297 periodically. It is recommended that this be performed monthly 298 backing off to bi-annually once the numbers of faulty servers found 299 drops off to less than 1 in 100000 servers tested. Follow-up tests 300 for faulty servers still need to be performed monthly. 302 Some operators claim that they can't perform checks at registration 303 time. If a check is not performed at registration time, it needs to 304 be performed within a week of registration in order to detect faulty 305 servers swiftly. 307 Checking of delegations by TLD operators should be nothing new as 308 they have been required from the very beginnings of DNS to do this 309 [RFC1034]. Checking for compliance of nameserver operations should 310 just be a extension of such testing. 312 It is recommended that TLD operators setup a test web page which 313 performs the tests the TLD operator performs as part of their regular 314 audits to allow nameserver operators to test that they have correctly 315 fixed their servers. Such tests should be rate limited to avoid 316 these pages being a denial of service vector. 318 4. Firewalls and Load Balancers 320 Firewalls and load balancers can affect the externally visible 321 behaviour of a nameserver. Tests for conformance need to be done 322 from outside of any firewall so that the system as a whole is tested. 324 Firewalls and load balancers should not drop DNS packets that they 325 don't understand. They should either pass through the packets or 326 generate an appropriate error response. 328 Requests for unknown query types is normal client behaviour and 329 should not be construed as an attack. Nameservers have always been 330 expected to be able to handle such queries. 332 Requests with unassigned flags set (DNS or EDNS) is expected client 333 behaviour and should not be construed as an attack. The behaviour 334 for unassigned is to ignore them in the request and to not set them 335 in the response. All dropping DNS / EDNS packets with unassigned 336 flags does is make it harder to deploy extensions that make use of 337 them due to the need to reconfigure / update firewalls. 339 Requests with unknown EDNS options is expected client behaviour and 340 should not be construed as an attack. The correct behaviour for 341 unknown EDNS options is to ignore there presence when constructing a 342 reply. 344 Requests with unknown EDNS versions is expected client behaviour and 345 should not be construed as an attack. The correct behaviour for 346 unknown EDNS versions is to return BADVERS along with the highest 347 EDNS version the server supports. All dropping EDNS packets does is 348 break EDNS version negotiation. 350 Firewalls should not assume that there will only be a single response 351 message to a requests. There have been proposals to use EDNS to 352 signal that multiple DNS messages be returned rather than a single 353 UDP message that is fragmented at the IP layer. 355 5. Scrubbing Services 357 Scrubbing services, like firewalls, can affect the externally visible 358 behaviour of a nameserver. If a operator uses a scrubbing service, 359 they should check that legitimate queries are not being blocked. 361 Scrubbing services, unlike firewalls, are also turned on and off in 362 response to denial of service attacks. One needs to take care when 363 choosing a scrubbing service and ask questions like: 365 Do they pass unknown DNS query types? 367 Do they pass unknown EDNS versions? 369 Do they pass unknown EDNS options? 371 Do they pass unknown EDNS flags? 373 Do they pass requests with unknown DNS opcodes? 375 Do they pass requests with the remaining reserved DNS header flag 376 bit set? 378 None of these are attack vectors but some scrubbing services treat 379 them as such. 381 6. Whole Answer Caches 383 Whole answer caches take a previously constructed answer and return 384 it to a subsequent query for the same qname, qtype and qclass, just 385 updating the query id field and possibly the qname to match the 386 incoming query to avoid constructing each response individually. 388 Whole answer caches can return the wrong response to a query if they 389 do not take all of the attributes of the query into account, rather 390 than just some of them e.g. qname, qtype and qclass. This has 391 implications when testing and with overall protocol compliance. 393 e.g. There are whole answer caches that ignore the EDNS version 394 field which results in incorrect answers to non EDNS version 0 395 queries being returned if they were preceded by a EDNS version 0 396 query for the same name and type. 398 e.g. There are caches that ignore the EDNS options in the query 399 resulting in options only working some of the time and/or options 400 being returned when not requested. 402 7. Response Code Selection 404 Choosing the correct response code when fixing a nameserver is 405 important. Just because a type is not implemented does not mean that 406 NOTIMP is the correct response code to return. Response codes need 407 to be chosen considering how clients will handle them. 409 For unimplemented opcodes NOTIMP is the expected response code. 410 Additionally a new opcode could change the message format by 411 extending the header or changing the structure of the records etc. 412 This may result in FORMERR being returned though NOTIMP would be more 413 correct. 415 In general, for unimplemented type codes Name Error (NXDOMAIN) and 416 NOERROR (no data) are the expected response codes. A server is not 417 supposed to serve a zone which contains unsupported types ([RFC1034]) 418 so the only thing left is return if the QNAME exists or not. NOTIMP 419 and REFUSED are not useful responses as they force the clients to try 420 all the authoritative servers for a zone looking for a server which 421 will answer the query. 423 Meta queries type may be the exception but these need to be thought 424 about on a case by case basis. 426 If the server supports EDNS and get a query with an unsupported EDNS 427 version, the correct response is BADVERS [RFC6891]. 429 If the server do not support EDNS at all, FORMERR and NOTIMP are the 430 expected error codes. That said a minimal EDNS server implementation 431 just requires parsing the OPT records and responding with an empty 432 OPT record. There is no need to interpret any EDNS options present 433 in the request as unsupported options are expected to be ignored 434 [RFC6891]. 436 8. Testing 438 Testing is divided into two sections. Basic DNS which all servers 439 should meet and Extended DNS which should be met by all servers that 440 support EDNS. If a server does not support EDNS it should still 441 respond to all the tests. 443 It is advisable to run all of the tests below in parallel so as to 444 minimise the delays due to multiple timeouts when the servers do not 445 respond. 447 The tests below use dig from BIND 9.11.0 which is still in 448 development. 450 8.1. Testing - Basic DNS 452 This first set of tests cover basic DNS server behaviour and all 453 servers should pass these tests. 455 Verify the server is configured for the zone: 457 dig +noedns +noad +norec soa $zone @$server 459 expect: status: NOERROR 460 expect: SOA record 461 expect: flag: aa to be present 463 Check that TCP queries work: 465 dig +noedns +noad +norec +tcp soa $zone @$server 467 expect: status: NOERROR 468 expect: SOA record 469 expect: flag: aa to be present 471 The requirement that TCP be supported is defined in [RFC5966]. 473 Check that queries for an unknown type work: 475 dig +noedns +noad +norec type1000 $zone @$server 477 expect: status: NOERROR 478 expect: an empty answer section. 479 expect: flag: aa to be present 481 That new types are to be expected is specified in Section 3.6, 482 [RFC1035]. Servers that don't support a new type are expected to 483 reject a zone that contains a unsupported type as per Section 5.2, 484 [RFC1035]. This means that a server that does load a zone can answer 485 questions for unknown types with NOERROR or NXDOMAIN as per 486 Section 4.3.2, [RFC1034]. [RFC6895] later reserved distinct ranges 487 for meta and data types which allows servers to be definitive about 488 whether a query should be answerable from zone content or not. 490 Check that queries with CD=1 work: 492 dig +noedns +noad +norec +cd soa $zone @$server 494 expect: status: NOERROR 495 expect: SOA record to be present 496 expect: flag: aa to be present 498 CD use in queries is defined in [RFC4035]. 500 Check that queries with AD=1 work: 502 dig +noedns +norec +ad soa $zone @$server 504 expect: status: NOERROR 505 expect: SOA record to be present 506 expect: flag: aa to be present 508 AD use in queries is defined in [RFC6840]. 510 Check that queries with the last unassigned DNS header flag work and 511 that the flag bit is not copied to the response: 513 dig +noedns +noad +norec +zflag soa $zone @$server 515 expect: status: NOERROR 516 expect: SOA record to be present 517 expect: MBZ to not be in the response 518 expect: flag: aa to be present 520 MBZ (Must Be Zero) presence indicates the flag bit has been 521 incorrectly copied. See Section 4.1.1, [RFC1035] "Z Reserved for 522 future use. Must be zero in all queries and responses." 524 Check that new opcodes are handled: 526 dig +noedns +noad +opcode=15 +norec +header-only @$server 528 expect: status: NOTIMP 529 expect: SOA record to not be present 530 expect: flag: aa to NOT be present 532 As unknown opcodes have no definition, including packet format other 533 than there must be a DNS header present, there is only one possible 534 rcode that make sense to return to a request with a unknown opcode 535 and that is NOTIMP. 537 8.2. Testing - Extended DNS 539 The next set of test cover various aspects of EDNS behaviour. If any 540 of these tests succeed, then all of them should succeed. There are 541 servers that support EDNS but fail to handle plain EDNS queries 542 correctly so a plain EDNS query is not a good indicator of lack of 543 EDNS support. 545 Check that plain EDNS queries work: 547 dig +nocookie +edns=0 +noad +norec soa $zone @$server 549 expect: status: NOERROR 550 expect: SOA record to be present 551 expect: OPT record to be present 552 expect: EDNS Version 0 in response 553 expect: flag: aa to be present 555 +nocookie disables sending a EDNS COOKIE option in which is on by 556 default. 558 Check that EDNS version 1 queries work (EDNS supported): 560 dig +nocookie +edns=1 +noednsneg +noad +norec soa $zone @$server 562 expect: status: BADVERS 563 expect: SOA record to not be present 564 expect: OPT record to be present 565 expect: EDNS Version 0 in response 566 expect: flag: aa to NOT be present 568 Only EDNS Version 0 is currently defined so the response should 569 always be a 0 version. This will change when EDNS version 1 is 570 defined. BADVERS is the expected rcode if EDNS is supported as per 571 Section 6.1.3, [RFC6891]. 573 Check that EDNS queries with an unknown option work (EDNS supported): 575 dig +nocookie +edns=0 +noad +norec +ednsopt=100 soa $zone @$server 577 expect: status: NOERROR 578 expect: SOA record to be present 579 expect: OPT record to be present 580 expect: OPT=100 to not be present 581 expect: EDNS Version 0 in response 582 expect: flag: aa to be present 584 Unknown EDNS options are supposed to be ignored, Section 6.1.2, 585 [RFC6891]. 587 Check that EDNS queries with unknown flags work (EDNS supported): 589 dig +nocookie +edns=0 +noad +norec +ednsflags=0x40 soa $zone @$server 591 expect: status: NOERROR 592 expect: SOA record to be present 593 expect: OPT record to be present 594 expect: MBZ not to be present 595 expect: EDNS Version 0 in response 596 expect: flag: aa to be present 598 MBZ (Must Be Zero) presence indicates the flag bit has been 599 incorrectly copied as per Section 6.1.4, [RFC6891]. 601 Check that EDNS version 1 queries with unknown flags work (EDNS 602 supported): 604 dig +nocookie +edns=1 +noednsneg +noad +norec +ednsflags=0x40 soa \ 605 $zone @$server 607 expect: status: BADVERS 608 expect: SOA record to NOT be present 609 expect: OPT record to be present 610 expect: MBZ not to be present 611 expect: EDNS Version 0 in response 612 expect: flag: aa to NOT be present 614 +noednsneg disables EDNS version negotiation in DiG; MBZ (Must Be 615 Zero) presence indicates the flag bit has been incorrectly copied. 617 Check that EDNS version 1 queries with unknown options work (EDNS 618 supported): 620 dig +nocookie +edns=1 +noednsneg +noad +norec +ednsopt=100 soa \ 621 $zone @$server 623 expect: status: BADVERS 624 expect: SOA record to NOT be present 625 expect: OPT record to be present 626 expect: OPT=100 to NOT be present 627 expect: EDNS Version 0 in response 628 expect: flag: aa to be present 630 +noednsneg disables EDNS version negotiation in DiG. 632 Check that a DNSSEC queries work (EDNS supported): 634 dig +nocookie +edns=0 +noad +norec +dnssec soa $zone @$server 636 expect: status: NOERROR 637 expect: SOA record to be present 638 expect: OPT record to be present 639 expect: DO=1 to be present if a RRSIG is in the response 640 expect: EDNS Version 0 in response 641 expect: flag: aa to be present 643 DO=1 should be present if RRSIGs are returned as they indicate that 644 the server supports DNSSEC. Servers that support DNSSEC are supposed 645 to copy the DO bit from the request to the response as per [RFC3225]. 647 Check that EDNS version 1 DNSSEC queries work (EDNS supported): 649 dig +nocookie +edns=1 +noednsneg +noad +norec +dnssec soa \ 650 $zone @$server 652 expect: status: BADVERS 653 expect: SOA record to not be present 654 expect: OPT record to be present 655 expect: DO=1 to be present if the EDNS version 0 DNSSEC query test 656 returned DO=1 657 expect: EDNS Version 0 in response 658 expect: flag: aa to NOT be present 660 +noednsneg disables EDNS version negotiation in DiG. 662 Check that EDNS queries with multiple defined EDNS options work: 664 dig +edns=0 +noad +norec +cookie +nsid +expire +subnet=0.0.0.0/0 \ 665 soa $zone @$server 667 expect: status: NOERROR 668 expect: SOA record to be present 669 expect: OPT record to be present 670 expect: EDNS Version 0 in response 671 expect: flag: aa to be present 673 If EDNS is not supported by the nameserver, we expect a response to 674 all the above queries. That response may be a FORMERR or NOTIMP 675 error response or the OPT record may just be ignored. 677 9. Security Considerations 679 Testing protocol compliance can potentially result in false reports 680 of attempts to break services from Intrusion Detection Services and 681 firewalls. None of the tests listed above should break nominally 682 EDNS compliant servers. None of the tests above should break non 683 EDNS servers. All the tests above are well formed, though not 684 necessarily common, DNS queries. 686 Relaxing firewall settings to ensure EDNS compliance could 687 potentially expose a critical implementation flaw in the nameserver. 688 Nameservers should be tested for conformance before relaxing firewall 689 settings. 691 When removing delegations for non-compliant servers there can be a 692 knock on effect on other zones that require these zones to be 693 operational for the nameservers addresses to be resolved. 695 10. IANA Considerations 697 IANA / ICANN needs to consider what tests, if any, from above that it 698 should add to the zone maintenance procedures for zones under its 699 control including pre-delegation checks. Otherwise this document has 700 no actions for IANA. 702 11. Normative References 704 [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", 705 STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, 706 . 708 [RFC1035] Mockapetris, P., "Domain names - implementation and 709 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 710 November 1987, . 712 [RFC3225] Conrad, D., "Indicating Resolver Support of DNSSEC", 713 RFC 3225, DOI 10.17487/RFC3225, December 2001, 714 . 716 [RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S. 717 Rose, "Protocol Modifications for the DNS Security 718 Extensions", RFC 4035, DOI 10.17487/RFC4035, March 2005, 719 . 721 [RFC5966] Bellis, R., "DNS Transport over TCP - Implementation 722 Requirements", RFC 5966, DOI 10.17487/RFC5966, August 723 2010, . 725 [RFC6840] Weiler, S., Ed. and D. Blacka, Ed., "Clarifications and 726 Implementation Notes for DNS Security (DNSSEC)", RFC 6840, 727 DOI 10.17487/RFC6840, February 2013, 728 . 730 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 731 for DNS (EDNS(0))", STD 75, RFC 6891, 732 DOI 10.17487/RFC6891, April 2013, 733 . 735 [RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA 736 Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895, 737 April 2013, . 739 Author's Address 741 M. Andrews 742 Internet Systems Consortium 743 950 Charter Street 744 Redwood City, CA 94063 745 US 747 Email: marka@isc.org