RFC 2929

Domain Name System (DNS) IANA Considerations

πŸ“… published September 2000, from ietf

RFC 2929: Domain Name System (DNS) IANA Considerations πŸŽ€

Okay bestie, this is the RFC that explains how IANA hands out DNS numbers and codes, and honestly it's iconic πŸ’…

  • RFC: 2929, from the Network Working Group 🌸
  • Title: Domain Name System (DNS) IANA Considerations
  • Authors: D. Eastlake, 3rd (Motorola), E. Brunner-Williams (Engage), and B. Manning (ISI) πŸ‘‘
  • Category: Best Current Practice, which is BCP 42 ✨
  • Date: September 2000 πŸ“…
  • Obsoletes and updates: the title block doesn't list anything this one obsoletes or updates πŸ™ˆ

Status of this Memo πŸ“œ

So this doc is a Best Current Practice for the whole Internet Community 🌍 and it's basically asking everyone to talk about it and send ideas for making it better πŸ’¬. Distribution of this memo is unlimited, so share away 🫢

Copyright (C) The Internet Society (2000). All Rights Reserved.

Abstract 🧁

This one's about IANA parameter assignment considerations: the rules for handing out DNS classes, Resource Record (RR) types, operation codes, error codes, etc. πŸ’–

Table of Contents πŸ“š

1. Introduction.................................................  2
2. DNS Query/Response Headers...................................  2
2.1 One Spare Bit?..............................................  3
2.2 Opcode Assignment...........................................  3
2.3 RCODE Assignment............................................  4
3. DNS Resource Records.........................................  5
3.1 RR TYPE IANA Considerations.................................  6
3.1.1 Special Note on the OPT RR................................  7
3.2 RR CLASS IANA Considerations................................  7
3.3 RR NAME Considerations......................................  8
4. Security Considerations......................................  9
References......................................................  9
Authors' Addresses.............................................. 11
Full Copyright Statement........................................ 12

1. Introduction ✨

Okay so the DNS is basically a set of replicated, distributed, secure, hierarchical databases πŸ—‚οΈ that store "resource records" (RRs) under domain names. Iconic architecture, no notes πŸ’…

The data is organized into CLASSes and zones, and those can be maintained independently πŸ¦‹ Familiarity with [RFC 1034, 1035, 2136, 2181, 2535] is assumed, so go read those first, bestie πŸ“š

This doc covers IANA parameter assignment considerations that apply across DNS query and response headers and all RRs, either directly or by reference πŸŽ€ There may be extra IANA considerations for just one particular RR type or one query/response opcode. If those exist, they live in the specific RFC that defines that RR type or opcode, so check there too πŸ”

IANA keeps a web page of DNS parameters at <http://www.iana.org/numbers.htm> 🌐

"IETF Standards Action", "IETF Consensus", "Specification Required", and "Private Use" all mean what they're defined to mean in [RFC 2434]. Love a good glossary moment 🧚

2. DNS Query/Response Headers πŸ“

Every DNS query and response has a header made of fields and bits, and it looks like this diagram taken from [RFC 2136, 2535] πŸ‘€

                                       1  1  1  1  1  1
         0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
        |                      ID                       |
        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
        |QR|   Opcode  |AA|TC|RD|RA| Z|AD|CD|   RCODE   |
        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
        |                QDCOUNT/ZOCOUNT                |
        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
        |                ANCOUNT/PRCOUNT                |
        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
        |                NSCOUNT/UPCOUNT                |
        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
        |                    ARCOUNT                    |
        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

The ID field identifies the query and gets echoed back in the response, so the two can be matched up πŸ’•

The QR bit tells you whether the header belongs to a query or a response πŸ’«

Here's the tea πŸ«– The AA, TC, RD, RA, AD, and CD bits are each only theoretically meaningful in queries or only in responses, depending on the bit. But lots of DNS implementations copy the query header as the starting value of the response header without clearing bits. So trying to use a "query" bit with a different meaning in a response, or give a query meaning to a "response" bit, is dangerous given existing implementations 😭 Such meanings may only be assigned by an IETF Standards Action.

The unsigned fields query count (QDCOUNT), answer count (ANCOUNT), authority count (NSCOUNT), and additional information count (ARCOUNT) give the number of records in each section for all opcodes except Update πŸ“Š Update uses the same structure and data types for these fields, but they're instead counts for the zone (ZOCOUNT), prerequisite (PRCOUNT), update (UPCOUNT), and additional information (ARCOUNT) sections.

2.1 One Spare Bit? πŸ€”

Ancient DNS implementations existed where the Z bit being on in a query meant that only a response from the primary server for a zone was acceptable πŸ›οΈ It is believed that current DNS implementations ignore this bit.

Assigning a meaning to the Z bit requires an IETF Standards Action πŸ”’

2.2 Opcode Assignment 🧩

New OpCode assignments require an IETF Standards Action πŸ”’

Right now, DNS OpCodes are assigned like this:

    OpCode Name                      Reference

     0     Query                     [RFC 1035]
     1     IQuery  (Inverse Query)   [RFC 1035]
     2     Status                    [RFC 1035]
     3     available for assignment
     4     Notify                    [RFC 1996]
     5     Update                    [RFC 2136]
    6-15   available for assignment

2.3 RCODE Assignment 🎟️

Looking at the DNS header above, it seems like only four bits of RCODE (the response or error code) are available. But RCODEs can show up in more places than the top level of a DNS response. They also appear inside OPT RRs [RFC 2671], TSIG RRs [RFC 2845], and TKEY RRs [RFC 2930] πŸ™Œ The OPT RR gives an eight bit extension, which makes a 12 bit RCODE field, and the TSIG and TKEY RRs have a 16 bit RCODE field.

Error codes in the DNS header and in these three RR types all refer to the same error code space. The one exception is error code 16, which means something different in the OPT RR than it does in other contexts. See the table below πŸ‘‡

RCODE   Name    Description                        Reference
Decimal
  Hexadecimal
 0    NoError   No Error                           [RFC 1035]
 1    FormErr   Format Error                       [RFC 1035]
 2    ServFail  Server Failure                     [RFC 1035]
 3    NXDomain  Non-Existent Domain                [RFC 1035]
 4    NotImp    Not Implemented                    [RFC 1035]
 5    Refused   Query Refused                      [RFC 1035]
 6    YXDomain  Name Exists when it should not     [RFC 2136]
 7    YXRRSet   RR Set Exists when it should not   [RFC 2136]
 8    NXRRSet   RR Set that should exist does not  [RFC 2136]
 9    NotAuth   Server Not Authoritative for zone  [RFC 2136]
10    NotZone   Name not contained in zone         [RFC 2136]
11-15           available for assignment
16    BADVERS   Bad OPT Version                    [RFC 2671]
16    BADSIG    TSIG Signature Failure             [RFC 2845]
17    BADKEY    Key not recognized                 [RFC 2845]
18    BADTIME   Signature out of time window       [RFC 2845]
19    BADMODE   Bad TKEY Mode                      [RFC 2930]
20    BADNAME   Duplicate key name                 [RFC 2930]
21    BADALG    Algorithm not supported            [RFC 2930]
22-3840         available for assignment
  0x0016-0x0F00
3841-4095       Private Use
  0x0F01-0x0FFF
4096-65535      available for assignment
  0x1000-0xFFFF

Since RCODEs have to be understood for interoperability, assigning a new RCODE from the ones listed above as "available for assignment" requires an IETF Consensus 🀝

3. DNS Resource Records πŸ¦‹

Every RR has the same top level format, shown in the figure below taken from [RFC 1035] πŸ–ΌοΈ

                                      1  1  1  1  1  1
        0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
      +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
      |                                               |
      /                                               /
      /                      NAME                     /
      |                                               |
      +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
      |                      TYPE                     |
      +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
      |                     CLASS                     |
      +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
      |                      TTL                      |
      |                                               |
      +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
      |                   RDLENGTH                    |
      +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
      /                     RDATA                     /
      /                                               /
      +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

NAME is the owner name, meaning the name of the node this resource record is about 🏷️ NAMEs are specific to a CLASS, as described in section 3.2. A NAME is an ordered sequence of one or more labels, and each label has a label type [RFC 1035, 2671] ✨

TYPE is a two octet unsigned integer holding one of the RR TYPE codes. See section 3.1 πŸ’«

CLASS is a two octet unsigned integer holding one of the RR CLASS codes. See section 3.2 🌸

TTL is a four octet (32 bit) bit unsigned integer. It says how many seconds the resource record may be cached before the source of the information should be consulted again ⏰ A value of zero is interpreted to mean the RR can only be used for the transaction in progress 🧁

RDLENGTH is an unsigned 16 bit integer that gives the length, in octets, of the RDATA field πŸ“

RDATA is a variable length string of octets that makes up the resource itself 🎁 Its format depends on the TYPE and, in some cases, the CLASS of the resource record 🌈


3.1 RR TYPE IANA Considerations ✨

okay so RR TYPE numbers come in three flavours bestie πŸ’–: data TYPEs, QTYPEs, and MetaTYPEs.

Data TYPEs are the main way we store stuff πŸ“¦. QTYPEs can only be used in queries πŸ”. Meta-TYPEs are for transient data tied to one particular DNS message, and sometimes they can also show up in queries.

So far, data TYPEs have been handed out starting from 1 and going up, plus the block from 100 through 103. Q and Meta types have been assigned from 255 going down, except for the OPT Meta-RR, which got TYPE 41 πŸ¦‹. Some DNS implementations even made caching decisions based on the top bit of the bottom byte of the RR TYPE πŸ‘€. literally wild.

There are currently three Meta-TYPEs assigned: OPT [RFC 2671], TSIG [RFC 2845], and TKEY [RFC 2930] πŸŽ€. There are also five QTYPEs assigned: * (all), MAILA, MAILB, AXFR, and IXFR ✨.

Here's how new RR TYPEs get allocated πŸ’…:

     Decimal
   Hexadecimal

     0
   0x0000 - TYPE zero is used as a special indicator for the SIG RR [RFC
          2535] and in other circumstances and must never be allocated
          for ordinary use.

     1 - 127
   0x0001 - 0x007F - remaining TYPEs in this range are assigned for data
          TYPEs by IETF Consensus.

     128 - 255
   0x0080 - 0x00FF - remaining TYPEs in this rage are assigned for Q and
          Meta TYPEs by IETF Consensus.

     256 - 32767
   0x0100 - 0x7FFF - assigned for data, Q, or Meta TYPE use by IETF
          Consensus.

     32768 - 65279
   0x8000 - 0xFEFF - Specification Required as defined in [RFC 2434].

     65280 - 65535
   0xFF00 - 0xFFFF - Private Use.

3.1.1 Special Note on the OPT RR

okay the OPT (OPTion) RR, number 41 πŸ¦‹, is specified in [RFC 2671]. Its main job is to stretch the effective field size of a bunch of DNS fields, including RCODE, label type, flag bits, and RDATA size πŸ™Œ. Like, for resolvers and servers that recognise it, it extends the RCODE field from 4 to 12 bits. iconic, honestly.

3.2 RR CLASS IANA Considerations

DNS CLASSes have been barely used, but they're another whole dimension of the DNS distributed database 🌈. There's no necessary relationship between the name space or root servers for one CLASS and those for another. Same name, totally different meanings in different CLASSes, even though the label types are the same and the null label only works as root in every CLASS πŸ™ˆ. BUT as global networking and DNS evolved, the IN (Internet) CLASS has absolutely dominated DNS use πŸ‘‘.

There are two subcategories of DNS CLASSes: normal data containing classes, and QCLASSes that only mean something in queries or updates πŸ’œ.

Here are the current CLASS assignments and what's planned for the future πŸ“‹:

     Decimal
   Hexadecimal

     0
   0x0000 - assignment requires an IETF Standards Action.

     1
   0x0001 - Internet (IN).

     2
   0x0002 - available for assignment by IETF Consensus as a data CLASS.

     3
   0x0003 - Chaos (CH) [Moon 1981].

     4
   0x0004 - Hesiod (HS) [Dyer 1987].

     5 - 127
   0x0005 - 0x007F - available for assignment by IETF Consensus as data
          CLASSes only.

     128 - 253
   0x0080 - 0x00FD - available for assignment by IETF Consensus as
          QCLASSes only.

     254
   0x00FE - QCLASS None [RFC 2136].

     255
   0x00FF - QCLASS Any [RFC 1035].

     256 - 32767
   0x0100 - 0x7FFF - assigned by IETF Consensus.

     32768 - 65280
   0x8000 - 0xFEFF - assigned based on Specification Required as defined
          in [RFC 2434].

     65280 - 65534
   0xFF00 - 0xFFFE - Private Use.

     65535
   0xFFFF - can only be assigned by an IETF Standards Action.

3.3 RR NAME Considerations

okay so DNS NAMEs are sequences of labels [RFC 1035] 🧩. The last label in each NAME is "ROOT", which is the zero length label. By definition, the null or ROOT label can not be used for any other NAME purpose 🚫.

Right now there are two categories of label types: data labels and compression labels. Compression labels are pointers to data labels somewhere else in an RR or DNS message, and they exist to shorten the wire encoding of NAMEs πŸͺ„. The two existing data label types are sometimes called Text and Binary. Text labels can, in fact, include any octet value (zero octets too!), but most current uses only involve [US-ASCII] πŸ”€. For retrieval, Text labels treat ASCII upper and lower case letter codes as matching ✨. Binary labels are bit sequences [RFC 2673] 🫧.

IANA considerations for label types are given in [RFC 2671] πŸ“.

NAMEs are local to a CLASS πŸ“. The Hesiod [Dyer 1987] and Chaos [Moon 1981] CLASSes are basically for local use. That makes the IN (Internet) CLASS the only DNS CLASS in global use on the Internet right now 🌍.

A somewhat dated description of name allocation in the IN Class is in [RFC 1591] πŸ“œ. Some info on reserved top level domain names is in Best Current Practice 32 [RFC 2606] πŸŽ€.

4. Security Considerations ✨

🚨 bestie, listen up: this document is about IANA considerations for allocating general DNS parameters. It is not about security. For secure DNS considerations, go read [RFC 2535] πŸ”.

This document addresses IANA considerations in the allocation of general DNS parameters, not security. See [RFC 2535] for secure DNS considerations.


References

  • [Dyer 1987] Dyer, S., and F. Hsu, "Hesiod", Project Athena Technical Plan - Name Service, April 1987,
  • [Moon 1981] D. Moon, "Chaosnet", A.I. Memo 628, Massachusetts Institute of Technology Artificial Intelligence Laboratory, June 1981.
  • [RFC 1034] Mockapetris, P., "Domain Names - Concepts and Facilities", STD 13, RFC 1034, November 1987.
  • [RFC 1035] Mockapetris, P., "Domain Names - Implementation and Specifications", STD 13, RFC 1035, November 1987.
  • [RFC 1591] Postel, J., "Domain Name System Structure and Delegation", RFC 1591, March 1994.
  • [RFC 1996] Vixie, P., "A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY)", RFC 1996, August 1996.
  • [RFC 2136] Vixie, P., Thomson, S., Rekhter, Y. and J. Bound, "Dynamic Updates in the Domain Name System (DNS UPDATE)", RFC 2136, April 1997.
  • [RFC 2181] Elz, R. and R. Bush, "Clarifications to the DNS Specification", RFC 2181, July 1997.
  • [RFC 2434] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.
  • [RFC 2535] Eastlake, D., "Domain Name System Security Extensions", RFC 2535, March 1999.
  • [RFC 2606] Eastlake, D. and A. Panitz, "Reserved Top Level DNS Names", RFC 2606, June 1999.
  • [RFC 2671] Vixie, P., "Extension mechanisms for DNS (EDNS0)", RFC 2671, August 1999.
  • [RFC 2672] Crawford, M., "Non-Terminal DNS Name Redirection", RFC 2672, August 1999.
  • [RFC 2673] Crawford, M., "Binary Labels in the Domain Name System", RFC 2673, August 1999.
  • [RFC 2845] Vixie, P., Gudmundsson, O., Eastlake, D. and B. Wellington, "Secret Key Transaction Authentication for DNS (TSIG)", RFC 2845, May 2000.
  • [RFC 2930] Eastlake, D., "Secret Key Establishment for DNS (TKEY RR)", RFC 2930, September 2000.
  • [US-ASCII] ANSI, "USA Standard Code for Information Interchange", X3.4, American National Standards Institute: New York, 1968.

Authors' Addresses πŸ’Œ

   Donald E. Eastlake 3rd
   Motorola
   140 Forest Avenue
   Hudson, MA 01749 USA

   Phone: +1-978-562-2827 (h)
          +1-508-261-5434 (w)
   Fax:   +1-508-261-4447 (w)
   EMail: Donald.Eastlake@motorola.com


   Eric Brunner-Williams
   Engage
   100 Brickstone Square, 2nd Floor
   Andover, MA 01810

   Phone: +1-207-797-0525 (h)
          +1-978-684-7796 (w)
   Fax:   +1-978-684-3118
   EMail: brunner@engage.com


   Bill Manning
   USC/ISI
   4676 Admiralty Way, #1001
   Marina del Rey, CA 90292 USA

   Phone: +1-310-822-1511
   EMail: bmanning@isi.edu

okay bestie, the legal bit is kept word-for-word so nothing gets twisted 🫢:

   Copyright (C) The Internet Society (2000).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement 🌸

Funding for the RFC Editor function is currently provided by the Internet Society. thank you, Internet Society πŸ«ΆπŸ’–

πŸ“¦ where this page comes from