idnits 2.17.00 (12 Aug 2021) /tmp/idnits5846/draft-ietf-dnsind-clarify-05.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 (February 1997) is 9225 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. -------------------------------------------------------------------------------- 2 Network Working Group Robert Elz 3 Internet Draft University of Melbourne 4 Expiration Date: August 1997 5 Randy Bush 6 RGnet, Inc. 8 February 1997 10 Clarifications to the DNS Specification 12 draft-ietf-dnsind-clarify-05.txt 14 Status of this Memo 16 This document is an Internet-Draft. Internet-Drafts are working 17 documents of the Internet Engineering Task Force (IETF), its areas, 18 and its working groups. Note that other groups may also distribute 19 working documents as Internet-Drafts. 21 Internet-Drafts are draft documents valid for a maximum of six months 22 and may be updated, replaced, or obsoleted by other documents at any 23 time. It is inappropriate to use Internet-Drafts as reference 24 material or to cite them other than as "work in progress." 26 To learn the current status of any Internet-Draft, please check the 27 "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow 28 Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), 29 munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or 30 ftp.isi.edu (US West Coast). 32 1. Abstract 34 This draft considers some areas that have been identified as problems 35 with the specification of the Domain Name System, and proposes 36 remedies for the defects identified. Six separate issues are 37 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 issue of what is an authoritative, or canonical, name, 43 + and the issue of what makes a valid DNS label. 45 The first four of these are areas where the correct behaviour has 46 been somewhat unclear, we seek to rectify that. The other two are 47 already adequately specified, however the specifications seem to be 48 sometimes ignored. We seek to reinforce the existing specifications. 50 This version adds a brief discussion on the placement of an SOA 51 record in the answer to an authoritative query, and the issue of TTLs 52 on SOA records. It also contains rather more discussion inspired by 53 the oddities of some of the new DNSSEC record types. The ordered 54 list of trustworthiness of various data types was revised by grouping 55 the last three categories together, and adding a restriction on how 56 such data should be used. Many editorial changes were made. This 57 paragraph will be deleted from the final version of this document. 59 Contents 61 1 Abstract ................................................... 1 62 2 Introduction ............................................... 2 63 3 Terminology ................................................ 3 64 4 Server Reply Source Address Selection ...................... 3 65 5 Resource Record Sets ....................................... 4 66 6 Zone Cuts .................................................. 8 67 7 SOA RRs .................................................... 9 68 8 Naming issues .............................................. 10 69 9 Name syntax ................................................ 12 70 10 Security Considerations .................................... 13 71 11 References ................................................. 13 72 12 Acknowledgements ........................................... 13 73 13 Authors' addresses ......................................... 14 75 2. Introduction 77 Several problem areas in the Domain Name System specification 78 [RFC1034, RFC1035] have been noted through the years [RFC1123]. This 79 draft addresses several additional problem areas. The issues here 80 are independent. Those issues are the question of which source 81 address a multi-homed DNS server should use when replying to a query, 82 the issue of differing TTLs for DNS records with the same label, 83 class and type, and the issue of canonical names, what they are, how 84 CNAME records relate, what names are legal in what parts of the DNS, 85 and what is the valid syntax of a DNS name. 87 Clarifications to the DNS specification to avoid these problems are 88 made in this memo. A minor ambiguity in RFC1034 concerned with SOA 89 records is also corrected. 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 the RRs for all purposes as if all 176 TTLs in the RRSet had been set to the value of the lowest TTL in the 177 RRSet. 179 5.3. DNSSEC Special Cases 181 Two of the record types added by DNS Security (DNSSEC) [RFC2065] 182 require special attention when considering the formation of Resource 183 Record Sets. Those are the SIG and NXT records. It should be noted 184 that DNS Security is still very new, and there is, as yet, little 185 experience with it. Readers should be prepared for the information 186 related to DNSSEC contained in this document to become outdated as 187 the DNS Security specification matures. 189 5.3.1. SIG records and RRSets 191 A SIG records provides signature (validation) data for another RRSet 192 in the DNS. Where a zone has been signed, every RRSet in the zone 193 will have had a SIG record associated with it. The data type of the 194 RRSet is included in the data of the SIG RR, to indicate with which 195 particular RRSet this SIG record is associated. Were the rules above 196 applied, whenever a SIG record was included with a response to 197 validate that response, the SIG records for all other RRSets 198 associated with the appropriate node would also need to be included. 199 In some cases, this could be a very large number of records, not 200 helped by their being rather large RRs. 202 Thus, it is specifically permitted for only those SIG RRs with the 203 "type covered" field equal to the type field of an answer being 204 returned need be included in the authority section as validation 205 data. However, where SIG records are being returned in the answer 206 section, in response to a query for SIG records, or a query for all 207 records associated with a name (type=ANY) the entire SIG RRSet must 208 be included, as for any other RR type. 210 Servers that receive responses containing SIG records in the 211 authority section, or (probably incorrectly) as additional data, must 212 understand that the entire RRSet has almost certainly not been 213 included. Thus, they must not cache that SIG record in a way that 214 would permit it to be returned should a query for SIG records be 215 received at that server. RFC2065 actually requires that SIG queries 216 be directed only to authoritative servers to avoid the problems that 217 could be caused here, and while servers exist that do not understand 218 the special properties of SIG records, this will remain necessary. 219 However, careful design of SIG record processing in new 220 implementations should permit this restriction to be relaxed in the 221 future, so resolvers do not need to treat SIG record queries 222 specially. 224 It has been occasionally stated that a received request for a SIG 225 record should be forwarded to an authoritative server, rather than 226 being answered from data in the cache. This is not necessary - a 227 server that has the knowledge of SIG as a special case for processing 228 this way would be better to correctly cache SIG records, taking into 229 account their characteristics. Then the server can determine when it 230 is safe to reply from the cache, and when the answer is not available 231 and the query must be forwarded. 233 5.3.2. NXT RRs 235 Next Resource Records (NXT) are even more peculiar. There will only 236 ever be one NXT record in a zone for a particular label, so 237 superficially, the RRSet problem is trivial. However, at a zone cut, 238 both the parent zone, and the child zone (superzone and subzone in 239 RFC2065 terminology) will have NXT records for the same name. Those 240 two NXT records do not form an RRSet, even where both zones are 241 housed at the same server. NXT RRSets always contain just a single 242 RR. Where both NXT records are visible, two RRSets exist. However, 243 servers are not required to treat this as a special case when 244 receiving NXT records in a response. They may elect to notice the 245 existence of two different NXT RRSets, and treat that as they would 246 two different RRSets of any other type. That is, cache one, and 247 ignore the other. Security aware servers will need to correctly 248 process the NXT record in the received response though. 250 5.4. Receiving RRSets 252 Servers must never merge RRs from a response with RRs in their cache 253 to form an RRSet. If a response contains data that would form an 254 RRSet with data in a server's cache the server must either ignore the 255 RRs in the response, or discard the entire RRSet currently in the 256 cache, as appropriate. Consequently the issue of TTLs varying 257 between the cache and a response does not cause concern, one will be 258 ignored. That is, one of the data sets is always incorrect if the 259 data from an answer differs from the data in the cache. The 260 challenge for the server is to determine which of the data sets is 261 correct, if one is, and retain that, while ignoring the other. Note 262 that if a server receives an answer containing an RRSet that is 263 identical to that in its cache, with the possible exception of the 264 TTL value, it may, optionally, update the TTL in its cache with the 265 TTL of the received answer. It should do this if the received answer 266 would be considered more authoritative (as discussed in the next 267 section) than the previously cached answer. 269 5.4.1. Ranking data 271 When considering whether to accept an RRSet in a reply, or retain an 272 RRSet already in its cache instead, a server should consider the 273 relative likely trustworthiness of the various data. An 274 authoritative answer from a reply should replace cached data that had 275 been obtained from additional information in an earlier reply. 276 However additional information from a reply will be ignored if the 277 cache contains data from an authoritative answer or a zone file. 279 The accuracy of data available is assumed from its source. 280 Trustworthiness shall be, in order from most to least: 282 + Data from a primary zone file, other than glue data, 283 + Data from a zone transfer, other than glue, 284 + Data from the answer section of an authoritative reply, 285 + Data from the authority section of an authoritative answer, 286 + Glue from a primary zone, or glue from a zone transfer, 287 + Data from the answer section of a non-authoritative answer, 288 + Additional information from an authoritative answer, 289 Data from the authority section of a non-authoritative answer, 290 Additional information from non-authoritative answers. 292 Unauthenticated RRs received and cached from the least trustworthy of 293 those groupings, that is data from the additional data section, and 294 data from the authority section of a non-authoritative answer, should 295 not be cached in such a way that they would ever be returned as 296 answers to a received query. They may be returned as additional 297 information where appropriate. Ignoring this would allow the 298 trustworthiness of relatively untrustworthy data to be increased 299 without cause or excuse. 301 When DNS security [RFC2065] is in use, and an authenticated reply has 302 been received and verified, the data thus authenticated shall be 303 considered more trustworthy than unauthenticated data of the same 304 type. Note that throughout this document, "authoritative" means a 305 reply with the AA bit set. DNSSEC uses trusted chains of SIG and KEY 306 records to determine the authenticity of data, the AA bit is almost 307 irrelevant. However DNSSEC aware servers must still correctly set 308 the AA bit in responses to enable correct operation with servers that 309 are not security aware (almost all currently). 311 Note that, glue excluded, it is impossible for data from two 312 correctly configured primary zone files, two correctly configured 313 secondary zones (data from zone transfers) or data from correctly 314 configured primary and secondary zones to ever conflict. Where glue 315 for the same name exists in multiple zones, and differs in value, the 316 nameserver should select data from a primary zone file in preference 317 to secondary, but otherwise may choose any single set of such data. 318 Choosing that which appears to come from a source nearer the 319 authoritative data source may make sense where that can be 320 determined. Choosing primary data over secondary allows the source 321 of incorrect glue data to be discovered more readily, when a problem 322 with such data exists. Where a server can detect from two zone files 323 that one or more are incorrectly configured, so as to create 324 conflicts, it should refuse to load the zones determined to be 325 erroneous, and issue suitable diagnostics. 327 "Glue" above includes any record in a zone file that is not properly 328 part of that zone, including nameserver records of delegated sub- 329 zones (NS records), address records that accompany those NS records 330 (A, AAAA, etc), and any other stray data that might appear. 332 5.5. Sending RRSets (reprise) 334 A Resource Record Set should only be included once in any DNS reply. 335 It may occur in any of the Answer, Authority, or Additional 336 Information sections, as required. However it should not be repeated 337 in the same, or any other, section, except where explicitly required 338 by a specification. For example, an AXFR response requires the SOA 339 record (always an RRSet containing a single RR) be both the first and 340 last record of the reply. Where duplicates are required this way, 341 the TTL transmitted in each case must be the same. 343 6. Zone Cuts 345 The DNS tree is divided into "zones", which are collections of 346 domains that are treated as a unit for certain management purposes. 347 Zones are delimited by "zone cuts". Each zone cut separates a 348 "child" zone (below the cut) from a "parent" zone (above the cut). 349 The domain name that appears at the top of a zone (just below the cut 350 that separates the zone from its parent) is called the zone's 351 "origin". The name of the zone is the same as the name of the domain 352 at the zone's origin. Each zone comprises that subset of the DNS 353 tree that is at or below the zone's origin, and that is above the 354 cuts that separate the zone from its children (if any). The 355 existence of a zone cut is indicated in the parent zone by the 356 existence of NS records specifying the origin of the child zone. A 357 child zone does not contain any explicit reference to its parent. 359 6.1. Zone authority 361 The authoritative servers for a zone are enumerated in the NS records 362 for the origin of the zone, which, along with a Start of Authority 363 (SOA) record are the mandatory records in every zone. Such a server 364 is authoritative for all resource records in a zone that are not in 365 another zone. The NS records that indicate a zone cut are the 366 property of the child zone created, as are any other records for the 367 origin of that child zone, or any sub-domains of it. A server for a 368 zone should not return authoritative answers for queries related to 369 names in another zone, which includes the NS, and perhaps A, records 370 at a zone cut, unless it also happens to be a server for the other 371 zone. 373 Other than the DNSSEC cases mentioned immediately below, servers 374 should ignore data other than NS records, and necessary A records to 375 locate the servers listed in the NS records, that may happen to be 376 configured in a zone at a zone cut. 378 6.2. DNSSEC issues 380 The DNS security mechanisms [RFC2065] complicate this somewhat, as 381 some of the new resource record types added are very unusual when 382 compared with other DNS RRs. In particular the NXT ("next") RR type 383 contains information about which names exist in a zone, and hence 384 which do not, and thus must necessarily relate to the zone in which 385 it exists. The same domain name may have different NXT records in 386 the parent zone and the child zone, and both are valid, and are not 387 an RRSet. See also section 5.3.2. 389 Since NXT records are intended to be automatically generated, rather 390 than configured by DNS operators, servers may, but are not required 391 to, retain all differing NXT records they receive regardless of the 392 rules in section 5.4. 394 For a secure parent zone to securely indicate that a subzone is 395 insecure, DNSSEC requires that a KEY RR indicating that the subzone 396 is insecure, and the parent zone's authenticating SIG RR(s) be 397 present in the parent zone, as they by definition cannot be in the 398 subzone. Where a subzone is secure, the KEY and SIG records will be 399 present, and authoritative, in that zone, but should also always be 400 present in the parent zone (if secure). 402 Note that in none of these cases should a server for the parent zone, 403 not also being a server for the subzone, set the AA bit in any 404 response for a label at a zone cut. 406 7. SOA RRs 408 Two minor issues concerning the Start of Zone of Authority (SOA) 409 Resource Record need some clarification. 411 7.1. Placement of SOA RRs in authoritative answers 413 RFC1034, in section 3.7, indicates that the authority section of an 414 authoritative answer may contain the SOA record for the zone from 415 which the answer was obtained. When discussing negative caching, 416 RFC1034 section 4.3.4 refers to this technique but mentions the 417 additional section of the response. The former is correct, as is 418 implied by the example shown in section 6.2.5 of RFC1034. SOA 419 records, if added, are to be placed in the authority section. 421 7.2. TTLs on SOA RRs 423 It may be observed that in section 3.2.1 of RFC1035, which defines 424 the format of a Resource Record, that the definition of the TTL field 425 contains a throw away line which states that the TTL of an SOA record 426 should always be sent as zero to prevent caching. This is mentioned 427 nowhere else, and has not generally been implemented. 428 Implementations should not assume that SOA records will have a TTL of 429 zero, nor are they required to send SOA records with a TTL of zero. 431 8. Naming issues 433 It has sometimes been inferred from some sections of the DNS 434 specification [RFC1034, RFC1035] that a host, or perhaps an interface 435 of a host, is permitted exactly one authoritative, or official, name, 436 called the canonical name. There is no such requirement in the DNS. 438 8.1. CNAME records 440 The DNS CNAME ("canonical name") record exists to provide the 441 canonical name associated with an alias name. There may be only one 442 such canonical name for any one alias. That name should generally be 443 a name that exists elsewhere in the DNS, though some applications for 444 aliases with no accompanying canonical name exist. An alias name 445 (label of a CNAME record) may, if DNSSEC is in use, have SIG, NXT, 446 and KEY RRs, but may have no other data. That is, for any label in 447 the DNS (any domain name) exactly one of the following is true: 449 + one CNAME record exists, optionally accompanied by SIG, NXT, and 450 KEY RRs, 451 + one or more records exist, none being CNAME records, 452 + the name exists, but has no associated RRs of any type, 453 + the name does not exist at all. 455 8.1.1. CNAME terminology 457 It has been traditional to refer to the label of a CNAME record as "a 458 CNAME". This is unfortunate, as "CNAME" is an abbreviation of 459 "canonical name", and the label of a CNAME record is most certainly 460 not a canonical name. It is, however, an entrenched usage. Care 461 must therefore be taken to be very clear whether the label, or the 462 value (the canonical name) of a CNAME resource record is intended. 463 In this document, the label of a CNAME resource record will always be 464 referred to as an alias. 466 8.2. PTR records 468 Confusion about canonical names has lead to a belief that a PTR 469 record should have exactly one RR in its RRSet. This is incorrect, 470 the relevant section of RFC1034 (section 3.6.2) indicates that the 471 value of a PTR record should be a canonical name. That is, it should 472 not be an alias. There is no implication in that section that only 473 one PTR record is permitted for a name. No such restriction should 474 be inferred. 476 Note that while the value of a PTR record must not be an alias, there 477 is no requirement that the process of resolving a PTR record not 478 encounter any aliases. The label that is being looked up for a PTR 479 value might have a CNAME record. That is, it might be an alias. The 480 value of that CNAME RR, if not another alias, which it should not be, 481 will give the location where the PTR record is found. That record 482 gives the result of the PTR type lookup. This final result, the 483 value of the PTR RR, is the label which must not be an alias. 485 8.3. MX and NS records 487 The domain name used as the value of a NS resource record, or part of 488 the value of a MX resource record must not be an alias. Not only is 489 the specification clear on this point, but using an alias in either 490 of these positions neither works as well as might be hoped, nor well 491 fulfills the ambition that may have led to this approach. This 492 domain name must have as its value one or more address records. 493 Currently those will be A records, however in the future other record 494 types giving addressing information may be acceptable. It can also 495 have other RRs, but never a CNAME RR. 497 Searching for either NS or MX records causes "additional section 498 processing" in which address records associated with the value of the 499 record sought are appended to the answer. This helps avoid needless 500 extra queries that are easily anticipated when the first was made. 502 Additional section processing does not include CNAME records, let 503 alone the address records that may be associated with the canonical 504 name derived from the alias. Thus, if an alias is used as the value 505 of an NS or MX record, no address will be returned with the NS or MX 506 value. This can cause extra queries, and extra network burden, on 507 every query. It is trivial to avoid this by resolving the alias and 508 placing the canonical name directly in the affected record just once 509 when it is updated or installed. In some particular hard cases the 510 lack of the additional section address records in the results of a NS 511 lookup can cause the request to fail. 513 9. Name syntax 515 Occasionally it is assumed that the Domain Name System serves only 516 the purpose of mapping Internet host names to data, and mapping 517 Internet addresses to host names. This is not correct, the DNS is a 518 general (if somewhat limited) hierarchical database, and can store 519 almost any kind of data, for almost any purpose. 521 The DNS itself places only one restriction on the particular labels 522 that can be used to identify resource records. That one restriction 523 relates to the length of the label and the full name. The length of 524 any one label is limited to between 1 and 63 octets. A full domain 525 name is limited to 255 octets (including the separators). The zero 526 length full name is defined as representing the root of the DNS tree, 527 and is typically written and displayed as ".". Those restrictions 528 aside, any binary string whatever can be used as the label of any 529 resource record. Similarly, any binary string can serve as the value 530 of any record that includes a domain name as some or all of its value 531 (SOA, NS, MX, PTR, CNAME, and any others that may be added). 532 Implementations of the DNS protocols must not place any restrictions 533 on the labels that can be used. In particular, DNS servers must not 534 refuse to serve a zone because it contains labels that might not be 535 acceptable to some DNS client programs. A DNS server may be 536 configurable to issue warnings when loading, or even to refuse to 537 load, a primary zone containing labels that might be considered 538 questionable, however this should not happen by default. 540 Note however, that the various applications that make use of DNS data 541 can have restrictions imposed on what particular values are 542 acceptable in their environment. For example, that any binary label 543 can have an MX record does not imply that any binary name can be used 544 as the host part of an e-mail address. Clients of the DNS can impose 545 whatever restrictions are appropriate to their circumstances on the 546 values they use as keys for DNS lookup requests, and on the values 547 returned by the DNS. If the client has such restrictions, it is 548 solely responsible for validating the data from the DNS to ensure 549 that it conforms before it makes any use of that data. 551 See also [RFC1123] section 6.1.3.5. 553 10. Security Considerations 555 This document does not consider security. 557 In particular, nothing in section 4 is any way related to, or useful 558 for, any security related purposes. 560 Section 5.4.1 is also not related to security. Security of DNS data 561 will be obtained by the Secure DNS [RFC2065], which is mostly 562 orthogonal to this memo. 564 It is not believed that anything in this document adds to any 565 security issues that may exist with the DNS, nor does it do anything 566 to that will necessarily lessen them. Correct implementation of the 567 clarifications in this document might play some small part in 568 limiting the spread of non-malicious bad data in the DNS, but only 569 DNSSEC can help with deliberate attempts to subvert DNS data. 571 11. References 573 [RFC1034] Domain Names - Concepts and Facilities, (STD 13) 574 P. Mockapetris, ISI, November 1987. 576 [RFC1035] Domain Names - Implementation and Specification (STD 13) 577 P. Mockapetris, ISI, November 1987. 579 [RFC1123] Requirements for Internet hosts - application and support, 580 (STD 3) R. Braden, January 1989. 582 [RFC1700] Assigned Numbers (STD 2) 583 J. Reynolds, J. Postel, October 1994. 585 [RFC2065] Domain Name System Security Extensions, 586 D. E. Eastlake, 3rd, C. W. Kaufman, January 1997. 588 12. Acknowledgements 590 This memo arose from discussions in the DNSIND working group of the 591 IETF in 1995 and 1996, the members of that working group are largely 592 responsible for the ideas captured herein. Particular thanks to 593 Donald E. Eastlake, 3rd, and Olafur Gudmundsson, for help with the 594 DNSSEC issues in this document, and to John Gilmore for pointing out 595 where the clarifications were not necessarily clarifying. Bob Halley 596 suggested clarifying the placement of SOA records in authoritative 597 answers, and provided the references. Michael Patton, as usual, and 598 Alan Barrett provided much assistance with many details. 600 13. Authors' addresses 602 Robert Elz 603 Computer Science 604 University of Melbourne 605 Parkville, Victoria, 3052 606 Australia. 608 EMail: kre@munnari.OZ.AU 610 Randy Bush 611 RGnet, Inc. 612 10361 NE Sasquatch Lane 613 Bainbridge Island, Washington, 98110 614 United States. 616 EMail: randy@psg.com