<?xml version="1.0" encoding="UTF-8"?>


<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>


<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

  <!ENTITY rfc2119 PUBLIC '' 
  'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'> 


]>

  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
  <?rfc toc="yes" ?>
  <?rfc symrefs="yes" ?>
  <?rfc sortrefs="yes"?>
  <?rfc iprnotified="no" ?>
  <?rfc strict="yes" ?>
  <?rfc compact="yes" ?>
  <?rfc subcompact="no"?>
  <?rfc comments="yes"?>
  <?rfc inline="yes"?>


<rfc category="info" ipr="trust200902"
     docName="draft-sullivan-dns-class-useless-00">

  <front>

    <title abbrev="DNS CLASS Not Useful">
      The DNS Class Field is Not Useful
    </title>

    <author initials="A." surname="Sullivan" fullname="Andrew Sullivan">
      <organization>Dyn, Inc.</organization>
      <address>
        <postal>
          <street>150 Dow St</street>
          <city>Manchester</city>
          <region>NH</region>
          <code>03101</code>
          <country>U.S.A.</country>
        </postal>
        <email>asullivan@dyn.com</email>
      </address>
    </author>

    <date />

    <workgroup>IETF</workgroup>

    <abstract>
      <t>
        Domain Name System Resource Records are identified in part by
        their class. The class field is not effective, and it is not
        used the way it appears to have been intended.  This memo
        makes no recommendation about the DNS parameters registry, but
        urges those defining new RRTYPEs to define them for all classes.
      </t>
    </abstract>

  </front>

  <middle>
    <section title="Classes in the Domain Name System"
             anchor="sec_class_dns">
      <t>The Domain Name System (DNS) <xref target="RFC1034" /> <xref
      target="RFC1035" /> includes two types of division: one by
      class, and one by "cuts". As <xref target="RFC1034" /> says,</t>
      
      <t><list><t>The database for any class is organized, delegated,
      and maintained separately from all other classes. Since, by
      convention, the name spaces are the same for all classes, the
      separate classes can be thought of as an array of parallel
      namespace trees. Note that the data attached to nodes will be
      different for these different parallel classes. The most common
      reasons for creating a new class are the necessity for a new
      data format for existing types or a desire for a separately
      managed version of the existing name space.</t></list></t>

      <t>As of this writing, there are only three "ordinary" classes
      assigned.  Class 1 is the Internet or IN class.  Class 3 is the
      Chaos or CH class.  Class 4 is the Hesiod or HS class.  Class 2
      is noted in <xref target="RFC1035" /> as the CSNET or CS class,
      but the current registry (at <eref
      target="http://www.iana.org/assignments/dns-parameters/dns-parameters.xml#dns-parameters-2"
      />) no longer includes the assignment.</t>

      <t>There are two other assigned classes; these have special
      purposes.  Class 255, ANY or *, matches any class <xref
      target="RFC1035" />.  Class 254, NONE, is used in <xref
      target="RFC2136" /> to specify certain kinds of operations on
      RRsets.</t> 
      
      <t>Of the ordinary classes, only IN is found in common use on
      the Internet. Class CH is now sometimes used to carry certain
      kinds of name server metadata. It seems new classes might have
      been useful for a number of features that have been delivered in
      some other way. Yet classes have not been used, which might
      suggest that classes are less useful than they otherwise appear
      to be.
      </t>

      <t>Nevertheless, from time to time someone comes up with a
      suggestion for why a new class would solve some problem or
      other. The purpose of this memo is to offer some considerations
      for those contemplating such innovation.</t>
    </section>

<!--    <section title="Key words in this memo">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
      NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described
      in <xref target="RFC2119" >RFC 2119</xref>.</t>
    </section>
-->

    <section title="Why classes are not as useful as they should be"
             anchor="sec_why_not_work">
      <t>There are three problems with classes that mean they
      cannot work as hoped.  First, the class field is in the wrong
      part of the DNS message to be useful as a selector.  Second,
      specification of resource record types has not always attended
      to the handling of types across classes, which means that
      new classes are likely to be, at best, of uncertain utility.</t>
      <t>Apart from those technical problems, there is an
      administrative problem. The Internet name space starts from a
      common root, which means that any resolver needs to start from
      the same bootstrap mechanism no matter what classes it uses. But
      in order for that to work, the new class would need to be
      delegated from the root name servers.</t>
      
      <section title="Class data is in the wrong part of a resource
                      record" anchor="sec_wrong_part">
        <t>As noted in <xref target="sec_class_dns" />, classes are
        intended to divide the DNS into separate trees.
        Unfortunately, however, the class field does not appear in a
        convenient location in a DNS resource record (RR) to be
        effective for that purpose. DNS resource records provide the
        owner name before the class.  As a practical matter, then,
        the namespace is primary.</t>
        
        <t>The issues is made plain by considering the matching
        algorithm for name servers, described in <xref
        target="RFC1034" /> section 4.3.2.  Suppose there are two
        (imaginary) classes, EG and IE.  Imagine, further, that the
        same name has different RDATA in each class:</t>
        <t><list style="none">
          <t>example.com EG CNAME example.net</t>
          <t>example.com IE CNAME example.org</t>
        </list></t>
        
        <t>In principle, the above should work because, as noted in
        <xref target="sec_class_dns" />, each class is supposed to be
        "delegated separately". Therefore, when the name server for
        example.com in class EG receives the query for example.com, it
        already knows which class database to search; similarly for
        example.com in class IE.</t>
        
        <t>Yet while the class delegations are defined to be separate,
        there is of course no way to ensure that the NS record RDATA
        for example.com in class IE, and the NS record RDATA for
        example.com in class EG, are always different. Indeed, if the
        different classes of name space are truly managed separately,
        but the name space is by convention parallel, it would not be
        surprising that some name server ended up authoritative for
        the same name in different classes. (In <xref target="RFC1034"
        />, section 3.6.1, there is an ambiguous example that appears
        to contain two classes from the same master file and for the
        same name.) Therefore, the name server for example.com in
        every class needs to be able to identify the class for the
        QNAME before beginning to follow the resolution algorithm. But
        given the DNS message format, the name server cannot find the
        class until it knows the name. In effect, a multi-class name
        server needs to look at the QCLASS in the query it gets, and
        then select the class in question, before it starts trying to
        match name by name.</t>
        
        <t>Once one describes the resolution pattern this way, it
        seems obvious that a class needs to be selected in order to
        resolve a QNAME. But in that case, it is rather inconvenient
        that the class field does not come first in a resource
        record; and it is not too surprising that, given that the IN
        class is so widely used and others so rarely, some naive
        implementations simply assume IN for every resource record.
        That assumption, of course, makes the class division in the
        DNS again less useful.</t>

      </section>
      <section title="Not all RRTYPEs are careful about class"
               anchor="sec_class_care">
        <t>Some RRTYPEs are defined in a class-dependent way.
        For instance, the A record (type 1) is defined in <xref
        target="RFC1035" /> to be for class IN only. Perhaps
        unfortunately, the IANA registry for RRTYPEs (at <eref
        target="http://www.iana.org/assignments/dns-parameters/dns-parameters.xml#dns-parameters-4"
        />) does not include an indicator for the class in which the
        RRTYPE is defined.</t>

        <t>In addition, not every RRTYPE specification is clear about
        its definition under various classes. For instance, the
        specification of type 55, HIP, appears not to state the
        class(es) for which it is defined <xref target="RFC5205" />.
        The specification of LOC, type 29 (in <xref target="RFC1876"
        />), says that the type is defined for classes other than IN,
        but also says, "The semantics of such use are not defined by
        this memo." </t>

        <t>One might argue that this issue is resolved by <xref
        target="RFC3597" />, because it specifies that an unknown
        class and type combination is to be handled as unknown.
        Formally, of course, that means that every type can be handled
        regardless of class. But it would appear to reduce the utility
        of classes yet further, by increasing the probability that
        every RR in every class except IN will be treated as
        unknown.</t>
      </section>
      <section title="A new class requires new delegations"
               anchor="sec_new_delegations">
        <t>The Internet's DNS system is part of the common name space
        of the Internet, and that common name space starts from a
        common root (see <xref target="RFC2826" /> for the arguments
        about why this must be true).  In order to provide for the
        resolution of a new class, the root name servers would need to
        respond to resolution requests for that class and provide the
        delegation data.  Current policies about domain name
        delegation in the root zone appear to apply to the IN class,
        and it is not clear where responsibility would lie for the
        policies about a new class.  At the very least, a new policy
        of this sort would need to be worked out.</t>
      </section>
    </section>

    <section title="DNS classes are effectively vestigial"
             anchor="sec_class_vestige">
      <t>Given the considerations above, it is plain that DNS classes
      are unlikely to be useful in the future. Designers of new name
      systems should consider the design of classes in the DNS.  If
      a similar feature is desirable, its design needs to be different
      in order to be useful.  Given the the way the DNS has managed to
      thrive effectively without classes, however, it would be worth
      asking whether the feature is useful at all.</t>
    </section>

    <section title="Plea to authors: define new RRTYPEs for all classes"
             anchor="sec_rrtype_all_class">
      <t>When defining a new RRTYPE, it is best to ensure that there
      is a clear definition of the class for which the RRTYPE is
      defined. In the absence of strong reasons to do otherwise, new
      types should be defined for all classes.
      </t>
    </section>
  
  </middle>

  <back>
    <references title="Informative References">
      <?rfc include="reference.RFC.1034.xml"?>
      <?rfc include="reference.RFC.1035.xml"?>
      <?rfc include="reference.RFC.1876.xml"?>
      <?rfc include="reference.RFC.2826.xml"?>      
      <?rfc include="reference.RFC.2136.xml"?>
      <?rfc include="reference.RFC.3597.xml"?>      
      <?rfc include="reference.RFC.5205.xml"?>      
    </references>

    <section title="Discussion Venue">
      <t>This Internet-Draft is discussed on the IAB Internet Names
      and Identifiers Program public list: inip-discuss@iab.org.</t>
    </section>

    <section title="Change History">
      <t><list style="hanging">
        <t hangText="00:">
          <list style="symbols">
            <t>Initial version</t>
          </list>
        </t></list></t>
    </section>
  </back>
</rfc>
