idnits 2.17.00 (12 Aug 2021) /tmp/idnits6402/draft-ietf-dnsind-clarify-07.txt: ** The Abstract section seems to be numbered Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2022-05-20) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. == No 'Intended status' indicated for this document; assuming Proposed Standard 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.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There is 1 instance of too long lines in the document, the longest one being 1 character in excess of 72. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 93: '...used expressions MUST, SHOULD, MAY, or...' Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (March 1997) is 9197 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 1700 (Obsoleted by RFC 3232) ** Obsolete normative reference: RFC 2065 (Obsoleted by RFC 2535) Summary: 12 errors (**), 0 flaws (~~), 1 warning (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group Robert Elz 2 Internet Draft University of Melbourne 3 Expiration Date: September 1997 4 Randy Bush 5 RGnet, Inc. 7 March 1997 9 Clarifications to the DNS Specification 11 draft-ietf-dnsind-clarify-07.txt 13 Status of this Memo 15 This document is an Internet-Draft. Internet-Drafts are working 16 documents of the Internet Engineering Task Force (IETF), its areas, 17 and its working groups. Note that other groups may also distribute 18 working documents as Internet-Drafts. 20 Internet-Drafts are draft documents valid for a maximum of six months 21 and may be updated, replaced, or obsoleted by other documents at any 22 time. It is inappropriate to use Internet-Drafts as reference 23 material or to cite them other than as "work in progress." 25 To learn the current status of any Internet-Draft, please check the 26 "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow 27 Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), 28 munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or 29 ftp.isi.edu (US West Coast). 31 1. Abstract 33 This draft considers some areas that have been identified as problems 34 with the specification of the Domain Name System, and proposes 35 remedies for the defects identified. Eight separate issues are 36 considered: 38 + IP packet header address usage from multi-homed servers, 39 + TTLs in sets of records with the same name, class, and type, 40 + correct handling of zone cuts, 41 + two minor issues concerning SOA records and their use, 42 + the precise definition of the Time to Live (TTL) 43 + Use of the TC (truncated) header bit 44 + the issue of what is an authoritative, or canonical, name, 45 + and the issue of what makes a valid DNS label. 47 The first six of these are areas where the correct behaviour has been 48 somewhat unclear, we seek to rectify that. The other two are already 49 adequately specified, however the specifications seem to be sometimes 50 ignored. We seek to reinforce the existing specifications. 52 This versions ads two new minor clarifications, to the definition of 53 a TTL, and to use of the TC bit. This paragraph will be deleted from 54 the final version of this document. 56 Contents 58 1 Abstract ................................................... 1 59 2 Introduction ............................................... 2 60 3 Terminology ................................................ 3 61 4 Server Reply Source Address Selection ...................... 3 62 5 Resource Record Sets ....................................... 4 63 6 Zone Cuts .................................................. 8 64 7 SOA RRs .................................................... 10 65 8 Time to Live (TTL) ......................................... 10 66 9 The TC (truncated) header bit .............................. 11 67 10 Naming issues .............................................. 11 68 11 Name syntax ................................................ 13 69 12 Security Considerations .................................... 14 70 13 References ................................................. 14 71 14 Acknowledgements ........................................... 14 72 15 Authors' addresses ......................................... 15 74 2. Introduction 76 Several problem areas in the Domain Name System specification 77 [RFC1034, RFC1035] have been noted through the years [RFC1123]. This 78 draft addresses several additional problem areas. The issues here 79 are independent. Those issues are the question of which source 80 address a multi-homed DNS server should use when replying to a query, 81 the issue of differing TTLs for DNS records with the same label, 82 class and type, and the issue of canonical names, what they are, how 83 CNAME records relate, what names are legal in what parts of the DNS, 84 and what is the valid syntax of a DNS name. 86 Clarifications to the DNS specification to avoid these problems are 87 made in this memo. A minor ambiguity in RFC1034 concerned with SOA 88 records is also corrected, as is one in the definition of the TTL 89 (Time To Live) and some possible confusion in use of the TC bit. 91 3. Terminology 93 This memo does not use the oft used expressions MUST, SHOULD, MAY, or 94 their negative forms. In some sections it may seem that a 95 specification is worded mildly, and hence some may infer that the 96 specification is optional. That is not correct. Anywhere that this 97 memo suggests that some action should be carried out, or must be 98 carried out, or that some behaviour is acceptable, or not, that is to 99 be considered as a fundamental aspect of this specification, 100 regardless of the specific words used. If some behaviour or action 101 is truly optional, that will be clearly specified by the text. 103 4. Server Reply Source Address Selection 105 Most, if not all, DNS clients, expect the address from which a reply 106 is received to be the same address as that to which the query 107 eliciting the reply was sent. This is true for servers acting as 108 clients for the purposes of recursive query resolution, as well as 109 simple resolver clients. The address, along with the identifier (ID) 110 in the reply is used for disambiguating replies, and filtering 111 spurious responses. This may, or may not, have been intended when 112 the DNS was designed, but is now a fact of life. 114 Some multi-homed hosts running DNS servers fail to expect this usage. 115 Consequently they send replies from a source address other than the 116 destination address from the original query. This causes the reply 117 to be discarded by the client. 119 4.1. UDP Source Address Selection 121 To avoid these problems, servers when responding to queries using UDP 122 must cause the reply to be sent with the source address field in the 123 IP header set to the address that was in the destination address 124 field of the IP header of the packet containing the query causing the 125 response. If this would cause the response to be sent from an IP 126 address that is not permitted for this purpose, then the response may 127 be sent from any legal IP address allocated to the server. That 128 address should be chosen to maximise the possibility that the client 129 will be able to use it for further queries. Servers configured in 130 such a way that not all their addresses are equally reachable from 131 all potential clients need take particular care when responding to 132 queries sent to anycast, multicast, or similar, addresses. 134 4.2. Port Number Selection 136 Replies to all queries must be directed to the port from which they 137 were sent. When queries are received via TCP this is an inherent 138 part of the transport protocol. For queries received by UDP the 139 server must take note of the source port and use that as the 140 destination port in the response. Replies should always be sent from 141 the port to which they were directed. Except in extraordinary 142 circumstances, this will be the well known port assigned for DNS 143 queries [RFC1700]. 145 5. Resource Record Sets 147 Each DNS Resource Record (RR) has a label, class, type, and data. It 148 is meaningless for two records to ever have label, class, type and 149 data all equal - servers should suppress such duplicates if 150 encountered. It is however possible for most record types to exist 151 with the same label, class and type, but with different data. Such a 152 group of records is hereby defined to be a Resource Record Set 153 (RRSet). 155 5.1. Sending RRs from an RRSet 157 A query for a specific (or non-specific) label, class, and type, will 158 always return all records in the associated RRSet - whether that be 159 one or more RRs. The response must be marked as "truncated" if the 160 entire RRSet will not fit in the response. 162 5.2. TTLs of RRs in an RRSet 164 Resource Records also have a time to live (TTL). It is possible for 165 the RRs in an RRSet to have different TTLs. No uses for this have 166 been found that cannot be better accomplished in other ways. This 167 can, however, cause partial replies (not marked "truncated") from a 168 caching server, where the TTLs for some but not all the RRs in the 169 RRSet have expired. 171 Consequently the use of differing TTLs in an RRSet is hereby 172 deprecated, the TTLs of all RRs in an RRSet must be the same. 174 Should a client receive a response containing RRs from an RRSet with 175 differing TTLs, it should treat this as an error. If the RRSet 176 concerned is from a non-authoritative source for this data, the 177 client should simply ignore the RRSet, and if the values were 178 required, seek to acquire them from an authoritative source. Should 179 an authoritative source send such a malformed RRSet, the client 180 should treat the RRs for all purposes as if all TTLs in the RRSet had 181 been set to the value of the lowest TTL in the RRSet. In no case may 182 a server send an RRSet with TTLs not all equal. 184 5.3. DNSSEC Special Cases 186 Two of the record types added by DNS Security (DNSSEC) [RFC2065] 187 require special attention when considering the formation of Resource 188 Record Sets. Those are the SIG and NXT records. It should be noted 189 that DNS Security is still very new, and there is, as yet, little 190 experience with it. Readers should be prepared for the information 191 related to DNSSEC contained in this document to become outdated as 192 the DNS Security specification matures. 194 5.3.1. SIG records and RRSets 196 A SIG record provides signature (validation) data for another RRSet 197 in the DNS. Where a zone has been signed, every RRSet in the zone 198 will have had a SIG record associated with it. The data type of the 199 RRSet is included in the data of the SIG RR, to indicate with which 200 particular RRSet this SIG record is associated. Were the rules above 201 applied, whenever a SIG record was included with a response to 202 validate that response, the SIG records for all other RRSets 203 associated with the appropriate node would also need to be included. 204 In some cases, this could be a very large number of records, not 205 helped by their being rather large RRs. 207 Thus, it is specifically permitted for the authority section to 208 contain only those SIG RRs with the "type covered" field equal to the 209 type field of an answer being returned. However, where SIG records 210 are being returned in the answer section, in response to a query for 211 SIG records, or a query for all records associated with a name 212 (type=ANY) the entire SIG RRSet must be included, as for any other RR 213 type. 215 Servers that receive responses containing SIG records in the 216 authority section, or (probably incorrectly) as additional data, must 217 understand that the entire RRSet has almost certainly not been 218 included. Thus, they must not cache that SIG record in a way that 219 would permit it to be returned should a query for SIG records be 220 received at that server. RFC2065 actually requires that SIG queries 221 be directed only to authoritative servers to avoid the problems that 222 could be caused here, and while servers exist that do not understand 223 the special properties of SIG records, this will remain necessary. 224 However, careful design of SIG record processing in new 225 implementations should permit this restriction to be relaxed in the 226 future, so resolvers do not need to treat SIG record queries 227 specially. 229 It has been occasionally stated that a received request for a SIG 230 record should be forwarded to an authoritative server, rather than 231 being answered from data in the cache. This is not necessary - a 232 server that has the knowledge of SIG as a special case for processing 233 this way would be better to correctly cache SIG records, taking into 234 account their characteristics. Then the server can determine when it 235 is safe to reply from the cache, and when the answer is not available 236 and the query must be forwarded. 238 5.3.2. NXT RRs 240 Next Resource Records (NXT) are even more peculiar. There will only 241 ever be one NXT record in a zone for a particular label, so 242 superficially, the RRSet problem is trivial. However, at a zone cut, 243 both the parent zone, and the child zone (superzone and subzone in 244 RFC2065 terminology) will have NXT records for the same name. Those 245 two NXT records do not form an RRSet, even where both zones are 246 housed at the same server. NXT RRSets always contain just a single 247 RR. Where both NXT records are visible, two RRSets exist. However, 248 servers are not required to treat this as a special case when 249 receiving NXT records in a response. They may elect to notice the 250 existence of two different NXT RRSets, and treat that as they would 251 two different RRSets of any other type. That is, cache one, and 252 ignore the other. Security aware servers will need to correctly 253 process the NXT record in the received response though. 255 5.4. Receiving RRSets 257 Servers must never merge RRs from a response with RRs in their cache 258 to form an RRSet. If a response contains data that would form an 259 RRSet with data in a server's cache the server must either ignore the 260 RRs in the response, or discard the entire RRSet currently in the 261 cache, as appropriate. Consequently the issue of TTLs varying 262 between the cache and a response does not cause concern, one will be 263 ignored. That is, one of the data sets is always incorrect if the 264 data from an answer differs from the data in the cache. The 265 challenge for the server is to determine which of the data sets is 266 correct, if one is, and retain that, while ignoring the other. Note 267 that if a server receives an answer containing an RRSet that is 268 identical to that in its cache, with the possible exception of the 269 TTL value, it may, optionally, update the TTL in its cache with the 270 TTL of the received answer. It should do this if the received answer 271 would be considered more authoritative (as discussed in the next 272 section) than the previously cached answer. 274 5.4.1. Ranking data 276 When considering whether to accept an RRSet in a reply, or retain an 277 RRSet already in its cache instead, a server should consider the 278 relative likely trustworthiness of the various data. An 279 authoritative answer from a reply should replace cached data that had 280 been obtained from additional information in an earlier reply. 281 However additional information from a reply will be ignored if the 282 cache contains data from an authoritative answer or a zone file. 284 The accuracy of data available is assumed from its source. 285 Trustworthiness shall be, in order from most to least: 287 + Data from a primary zone file, other than glue data, 288 + Data from a zone transfer, other than glue, 289 + Data from the answer section of an authoritative reply, 290 + Data from the authority section of an authoritative answer, 291 + Glue from a primary zone, or glue from a zone transfer, 292 + Data from the answer section of a non-authoritative answer, 293 + Additional information from an authoritative answer, 294 Data from the authority section of a non-authoritative answer, 295 Additional information from non-authoritative answers. 297 Unauthenticated RRs received and cached from the least trustworthy of 298 those groupings, that is data from the additional data section, and 299 data from the authority section of a non-authoritative answer, should 300 not be cached in such a way that they would ever be returned as 301 answers to a received query. They may be returned as additional 302 information where appropriate. Ignoring this would allow the 303 trustworthiness of relatively untrustworthy data to be increased 304 without cause or excuse. 306 When DNS security [RFC2065] is in use, and an authenticated reply has 307 been received and verified, the data thus authenticated shall be 308 considered more trustworthy than unauthenticated data of the same 309 type. Note that throughout this document, "authoritative" means a 310 reply with the AA bit set. DNSSEC uses trusted chains of SIG and KEY 311 records to determine the authenticity of data, the AA bit is almost 312 irrelevant. However DNSSEC aware servers must still correctly set 313 the AA bit in responses to enable correct operation with servers that 314 are not security aware (almost all currently). 316 Note that, glue excluded, it is impossible for data from two 317 correctly configured primary zone files, two correctly configured 318 secondary zones (data from zone transfers) or data from correctly 319 configured primary and secondary zones to ever conflict. Where glue 320 for the same name exists in multiple zones, and differs in value, the 321 nameserver should select data from a primary zone file in preference 322 to secondary, but otherwise may choose any single set of such data. 323 Choosing that which appears to come from a source nearer the 324 authoritative data source may make sense where that can be 325 determined. Choosing primary data over secondary allows the source 326 of incorrect glue data to be discovered more readily, when a problem 327 with such data exists. Where a server can detect from two zone files 328 that one or more are incorrectly configured, so as to create 329 conflicts, it should refuse to load the zones determined to be 330 erroneous, and issue suitable diagnostics. 332 "Glue" above includes any record in a zone file that is not properly 333 part of that zone, including nameserver records of delegated sub- 334 zones (NS records), address records that accompany those NS records 335 (A, AAAA, etc), and any other stray data that might appear. 337 5.5. Sending RRSets (reprise) 339 A Resource Record Set should only be included once in any DNS reply. 340 It may occur in any of the Answer, Authority, or Additional 341 Information sections, as required. However it should not be repeated 342 in the same, or any other, section, except where explicitly required 343 by a specification. For example, an AXFR response requires the SOA 344 record (always an RRSet containing a single RR) be both the first and 345 last record of the reply. Where duplicates are required this way, 346 the TTL transmitted in each case must be the same. 348 6. Zone Cuts 350 The DNS tree is divided into "zones", which are collections of 351 domains that are treated as a unit for certain management purposes. 352 Zones are delimited by "zone cuts". Each zone cut separates a 353 "child" zone (below the cut) from a "parent" zone (above the cut). 354 The domain name that appears at the top of a zone (just below the cut 355 that separates the zone from its parent) is called the zone's 356 "origin". The name of the zone is the same as the name of the domain 357 at the zone's origin. Each zone comprises that subset of the DNS 358 tree that is at or below the zone's origin, and that is above the 359 cuts that separate the zone from its children (if any). The 360 existence of a zone cut is indicated in the parent zone by the 361 existence of NS records specifying the origin of the child zone. A 362 child zone does not contain any explicit reference to its parent. 364 6.1. Zone authority 366 The authoritative servers for a zone are enumerated in the NS records 367 for the origin of the zone, which, along with a Start of Authority 368 (SOA) record are the mandatory records in every zone. Such a server 369 is authoritative for all resource records in a zone that are not in 370 another zone. The NS records that indicate a zone cut are the 371 property of the child zone created, as are any other records for the 372 origin of that child zone, or any sub-domains of it. A server for a 373 zone should not return authoritative answers for queries related to 374 names in another zone, which includes the NS, and perhaps A, records 375 at a zone cut, unless it also happens to be a server for the other 376 zone. 378 Other than the DNSSEC cases mentioned immediately below, servers 379 should ignore data other than NS records, and necessary A records to 380 locate the servers listed in the NS records, that may happen to be 381 configured in a zone at a zone cut. 383 6.2. DNSSEC issues 385 The DNS security mechanisms [RFC2065] complicate this somewhat, as 386 some of the new resource record types added are very unusual when 387 compared with other DNS RRs. In particular the NXT ("next") RR type 388 contains information about which names exist in a zone, and hence 389 which do not, and thus must necessarily relate to the zone in which 390 it exists. The same domain name may have different NXT records in 391 the parent zone and the child zone, and both are valid, and are not 392 an RRSet. See also section 5.3.2. 394 Since NXT records are intended to be automatically generated, rather 395 than configured by DNS operators, servers may, but are not required 396 to, retain all differing NXT records they receive regardless of the 397 rules in section 5.4. 399 For a secure parent zone to securely indicate that a subzone is 400 insecure, DNSSEC requires that a KEY RR indicating that the subzone 401 is insecure, and the parent zone's authenticating SIG RR(s) be 402 present in the parent zone, as they by definition cannot be in the 403 subzone. Where a subzone is secure, the KEY and SIG records will be 404 present, and authoritative, in that zone, but should also always be 405 present in the parent zone (if secure). 407 Note that in none of these cases should a server for the parent zone, 408 not also being a server for the subzone, set the AA bit in any 409 response for a label at a zone cut. 411 7. SOA RRs 413 Two minor issues concerning the Start of Zone of Authority (SOA) 414 Resource Record need some clarification. 416 7.1. Placement of SOA RRs in authoritative answers 418 RFC1034, in section 3.7, indicates that the authority section of an 419 authoritative answer may contain the SOA record for the zone from 420 which the answer was obtained. When discussing negative caching, 421 RFC1034 section 4.3.4 refers to this technique but mentions the 422 additional section of the response. The former is correct, as is 423 implied by the example shown in section 6.2.5 of RFC1034. SOA 424 records, if added, are to be placed in the authority section. 426 7.2. TTLs on SOA RRs 428 It may be observed that in section 3.2.1 of RFC1035, which defines 429 the format of a Resource Record, that the definition of the TTL field 430 contains a throw away line which states that the TTL of an SOA record 431 should always be sent as zero to prevent caching. This is mentioned 432 nowhere else, and has not generally been implemented. 433 Implementations should not assume that SOA records will have a TTL of 434 zero, nor are they required to send SOA records with a TTL of zero. 436 8. Time to Live (TTL) 438 The definition of values appropriate to the TTL field in STD 13 is 439 not as clear as it could be, with respect to how many significant 440 bits exist, and whether the value is signed or unsigned. It is 441 hereby specified that a TTL value is an unsigned number, with a 442 minimum value of 0, and a maximum value of 2147483647. That is, a 443 maximum of 2^31 - 1. When transmitted, this value shall be encoded 444 in the less significant 31 bits of the 32 bit TTL field, with the 445 most significant, or sign, bit set to zero. 447 Implementations should treat TTL values received with the most 448 significant bit set as if the entire value received was zero. 450 Implementations are always free to place an upper bound on any TTL 451 received, and treat any larger values as if they were that upper 452 bound. The TTL specifies a maximum time to live, not a mandatory 453 time to live. 455 9. The TC (truncated) header bit 457 The TC bit should be set in responses only when an RRSet is required 458 as a part of the response, but could not be included in its entirety. 459 The TC bit should not be set merely because some extra information 460 could have been included, but there was insufficient room. This 461 includes the results of additional section processing. In such cases 462 the entire RRSet that will not fit in the response should be omitted, 463 and the reply sent as is, with the TC bit clear. If the recipient of 464 the reply needs the omitted data, it can construct a query for that 465 data and send that separately. 467 Where TC is set, the partial RRSet that would not completely fit may 468 be left in the response. When a DNS client receives a reply with TC 469 set, it should ignore that response, and query again, using a 470 mechanism, such as a TCP connection, that will permit larger replies. 472 10. Naming issues 474 It has sometimes been inferred from some sections of the DNS 475 specification [RFC1034, RFC1035] that a host, or perhaps an interface 476 of a host, is permitted exactly one authoritative, or official, name, 477 called the canonical name. There is no such requirement in the DNS. 479 10.1. CNAME records 481 The DNS CNAME ("canonical name") record exists to provide the 482 canonical name associated with an alias name. There may be only one 483 such canonical name for any one alias. That name should generally be 484 a name that exists elsewhere in the DNS, though some applications for 485 aliases with no accompanying canonical name exist. An alias name 486 (label of a CNAME record) may, if DNSSEC is in use, have SIG, NXT, 487 and KEY RRs, but may have no other data. That is, for any label in 488 the DNS (any domain name) exactly one of the following is true: 490 + one CNAME record exists, optionally accompanied by SIG, NXT, and 491 KEY RRs, 492 + one or more records exist, none being CNAME records, 493 + the name exists, but has no associated RRs of any type, 494 + the name does not exist at all. 496 10.1.1. CNAME terminology 498 It has been traditional to refer to the label of a CNAME record as "a 499 CNAME". This is unfortunate, as "CNAME" is an abbreviation of 500 "canonical name", and the label of a CNAME record is most certainly 501 not a canonical name. It is, however, an entrenched usage. Care 502 must therefore be taken to be very clear whether the label, or the 503 value (the canonical name) of a CNAME resource record is intended. 504 In this document, the label of a CNAME resource record will always be 505 referred to as an alias. 507 10.2. PTR records 509 Confusion about canonical names has lead to a belief that a PTR 510 record should have exactly one RR in its RRSet. This is incorrect, 511 the relevant section of RFC1034 (section 3.6.2) indicates that the 512 value of a PTR record should be a canonical name. That is, it should 513 not be an alias. There is no implication in that section that only 514 one PTR record is permitted for a name. No such restriction should 515 be inferred. 517 Note that while the value of a PTR record must not be an alias, there 518 is no requirement that the process of resolving a PTR record not 519 encounter any aliases. The label that is being looked up for a PTR 520 value might have a CNAME record. That is, it might be an alias. The 521 value of that CNAME RR, if not another alias, which it should not be, 522 will give the location where the PTR record is found. That record 523 gives the result of the PTR type lookup. This final result, the 524 value of the PTR RR, is the label which must not be an alias. 526 10.3. MX and NS records 528 The domain name used as the value of a NS resource record, or part of 529 the value of a MX resource record must not be an alias. Not only is 530 the specification clear on this point, but using an alias in either 531 of these positions neither works as well as might be hoped, nor well 532 fulfills the ambition that may have led to this approach. This 533 domain name must have as its value one or more address records. 534 Currently those will be A records, however in the future other record 535 types giving addressing information may be acceptable. It can also 536 have other RRs, but never a CNAME RR. 538 Searching for either NS or MX records causes "additional section 539 processing" in which address records associated with the value of the 540 record sought are appended to the answer. This helps avoid needless 541 extra queries that are easily anticipated when the first was made. 543 Additional section processing does not include CNAME records, let 544 alone the address records that may be associated with the canonical 545 name derived from the alias. Thus, if an alias is used as the value 546 of an NS or MX record, no address will be returned with the NS or MX 547 value. This can cause extra queries, and extra network burden, on 548 every query. It is trivial to avoid this by resolving the alias and 549 placing the canonical name directly in the affected record just once 550 when it is updated or installed. In some particular hard cases the 551 lack of the additional section address records in the results of a NS 552 lookup can cause the request to fail. 554 11. Name syntax 556 Occasionally it is assumed that the Domain Name System serves only 557 the purpose of mapping Internet host names to data, and mapping 558 Internet addresses to host names. This is not correct, the DNS is a 559 general (if somewhat limited) hierarchical database, and can store 560 almost any kind of data, for almost any purpose. 562 The DNS itself places only one restriction on the particular labels 563 that can be used to identify resource records. That one restriction 564 relates to the length of the label and the full name. The length of 565 any one label is limited to between 1 and 63 octets. A full domain 566 name is limited to 255 octets (including the separators). The zero 567 length full name is defined as representing the root of the DNS tree, 568 and is typically written and displayed as ".". Those restrictions 569 aside, any binary string whatever can be used as the label of any 570 resource record. Similarly, any binary string can serve as the value 571 of any record that includes a domain name as some or all of its value 572 (SOA, NS, MX, PTR, CNAME, and any others that may be added). 573 Implementations of the DNS protocols must not place any restrictions 574 on the labels that can be used. In particular, DNS servers must not 575 refuse to serve a zone because it contains labels that might not be 576 acceptable to some DNS client programs. A DNS server may be 577 configurable to issue warnings when loading, or even to refuse to 578 load, a primary zone containing labels that might be considered 579 questionable, however this should not happen by default. 581 Note however, that the various applications that make use of DNS data 582 can have restrictions imposed on what particular values are 583 acceptable in their environment. For example, that any binary label 584 can have an MX record does not imply that any binary name can be used 585 as the host part of an e-mail address. Clients of the DNS can impose 586 whatever restrictions are appropriate to their circumstances on the 587 values they use as keys for DNS lookup requests, and on the values 588 returned by the DNS. If the client has such restrictions, it is 589 solely responsible for validating the data from the DNS to ensure 590 that it conforms before it makes any use of that data. 592 See also [RFC1123] section 6.1.3.5. 594 12. Security Considerations 596 This document does not consider security. 598 In particular, nothing in section 4 is any way related to, or useful 599 for, any security related purposes. 601 Section 5.4.1 is also not related to security. Security of DNS data 602 will be obtained by the Secure DNS [RFC2065], which is mostly 603 orthogonal to this memo. 605 It is not believed that anything in this document adds to any 606 security issues that may exist with the DNS, nor does it do anything 607 to that will necessarily lessen them. Correct implementation of the 608 clarifications in this document might play some small part in 609 limiting the spread of non-malicious bad data in the DNS, but only 610 DNSSEC can help with deliberate attempts to subvert DNS data. 612 13. References 614 [RFC1034] Domain Names - Concepts and Facilities, (STD 13) 615 P. Mockapetris, ISI, November 1987. 617 [RFC1035] Domain Names - Implementation and Specification (STD 13) 618 P. Mockapetris, ISI, November 1987. 620 [RFC1123] Requirements for Internet hosts - application and support, 621 (STD 3) R. Braden, January 1989. 623 [RFC1700] Assigned Numbers (STD 2) 624 J. Reynolds, J. Postel, October 1994. 626 [RFC2065] Domain Name System Security Extensions, 627 D. E. Eastlake, 3rd, C. W. Kaufman, January 1997. 629 14. Acknowledgements 631 This memo arose from discussions in the DNSIND working group of the 632 IETF in 1995 and 1996, the members of that working group are largely 633 responsible for the ideas captured herein. Particular thanks to 634 Donald E. Eastlake, 3rd, and Olafur Gudmundsson, for help with the 635 DNSSEC issues in this document, and to John Gilmore for pointing out 636 where the clarifications were not necessarily clarifying. Bob Halley 637 suggested clarifying the placement of SOA records in authoritative 638 answers, and provided the references. Michael Patton, as usual, Mark 639 Andrews, and Alan Barrett provided much assistance with many details. 641 15. Authors' addresses 643 Robert Elz 644 Computer Science 645 University of Melbourne 646 Parkville, Victoria, 3052 647 Australia. 649 EMail: kre@munnari.OZ.AU 651 Randy Bush 652 RGnet, Inc. 653 10361 NE Sasquatch Lane 654 Bainbridge Island, Washington, 98110 655 United States. 657 EMail: randy@psg.com