<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="no"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc strict="yes"?>
<rfc ipr="full3978" category="std" docName="draft-ietf-dnsext-rfc2672bis-dname-14" obsoletes="2672" updates="3363,4294">
<front>
<title abbrev="DNAME Redirection"> Update to DNAME Redirection in the DNS </title>
	<author fullname="Scott Rose" initials="S." surname="Rose">
			<organization> NIST </organization>
			<address>
				<postal>
					<street>100 Bureau Dr.</street>
					<city>Gaithersburg</city>
					<code>20899</code>
					<region>MD</region>
					<country>USA</country>
				</postal>
				<phone>+1-301-975-8439</phone>
				<facsimile>+1-301-975-6238</facsimile>
				<email> scottr@nist.gov </email>
			</address>
		</author>
		<author fullname="Wouter Wijngaards" initials="W.C.A." surname="Wijngaards">
			<organization> NLnet Labs </organization>
			<address>
				<postal>
					<street>Kruislaan 419</street>
					<code>1098 VA</code>
					<city>Amsterdam</city>
					<country>The Netherlands</country>
				</postal>
				<phone>+31-20-888-4551</phone>
				<email> wouter@nlnetlabs.nl </email>
			</address>
		</author>
	
<date month="July" year="2008"/>
<area> Internet Area </area>
<workgroup> DNS Extensions Working Group </workgroup>
<keyword>DNS</keyword>
<keyword>DNAME</keyword>
<abstract>
	<t>
	The DNAME record provides redirection for a sub-tree of the domain
	name tree in the DNS system. That is, all names that 
	end with a particular suffix are redirected to another part of 
	the DNS. 
	This is a revision of the original specification in RFC 2672,
	also aligning RFC 3363 and RFC 4294 with this revision.
	</t>
</abstract>
	<note title="Requirements Language">
	<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;,
&quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;,
&quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;,
&quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be
interpreted as described in <xref target="RFC2119">RFC 2119</xref>.
	</t>
	</note>
</front>
<middle>
<section title="Introduction">
	<t> 
	DNAME is a DNS Resource Record type originally defined in 
	RFC 2672 <xref target="RFC2672" />. DNAME provides redirection from
	a part of the DNS name tree to another part of the DNS name tree. 
	</t><t>
	The DNAME RR and the CNAME RR <xref target="RFC1034"/> cause a 
	lookup to (potentially) return data corresponding to a domain name 
	different from the queried domain name.  The difference between 
	the two resource records is that the CNAME RR directs the lookup 
	of data at its owner to another single name, a DNAME RR directs 
	lookups for data at descendents of its owner's name to
	corresponding names under a different (single) node of the tree. 
	</t><t>
	Take for example, looking through a zone (see 
	<xref target="RFC1034">RFC 1034</xref>, section 4.3.2, step 3) for 
	the domain name "foo.example.com" and a DNAME resource record
	is found at "example.com" indicating that all queries under 
	"example.com" be directed to "example.net".  The lookup process 
	will return to step 1 with the new query name of "foo.example.net".  
	Had the query name been "www.foo.example.com" the new query name 
	would be "www.foo.example.net".
	</t><t>
	This document is a revision of the original specification of DNAME
	in <xref target="RFC2672">RFC 2672</xref>.  
	DNAME was conceived to help with the problem of maintaining 
	address-to-name mappings in a context of network renumbering.  
	With a careful set-up, a renumbering event in the network 
	causes no change to the authoritative server that has the 
	address-to-name mappings.  Examples in practice are classless 
	reverse address space delegations.
	</t><t>
	Another usage of DNAME lies in aliasing of name spaces. For 
	example, a zone administrator may want sub-trees of the DNS to 
	contain the same information.  Examples include punycode alternates for 
	domain spaces.  
	</t><t>
	This revision to DNAME does not change the wire format or the 
	handling of DNAME Resource Records by existing software.
	A new UD (Understand DNAME) bit in the EDNS flags field can be 
	used to signal that CNAME synthesis is not needed.
	Discussion is added on problems that may be encountered 
	when using DNAME.
	</t>
</section>
<section title="The DNAME Resource Record">
<section title="Format">
	<t>
	The DNAME RR has mnemonic DNAME and type code 39 (decimal).
	It is not class-sensitive.
	</t><t>
	<figure title="">
  	<preamble>
	Its RDATA is comprised of a single field, &lt;target>, which 
	contains a fully qualified domain name that must be sent in 
	uncompressed form <xref target="RFC1035" />, <xref target="RFC3597" />.
	The &lt;target> field MUST be present.
	The presentation format of &lt;target> is that of a domain 
	name <xref target="RFC1035" />.
  	</preamble>
  	<artwork>
        &lt;owner> &lt;ttl> &lt;class> DNAME &lt;target>
  	</artwork>
  	<postamble>The effect of the DNAME RR is the substitution of the record's
	&lt;target> for its owner name, as a suffix of a domain name.
	This substitution has to be applied for every DNAME RR found in the
	resolution process, which allows fairly lengthy valid chains of DNAME
	RRs.
  	</postamble>
	</figure>
	</t><t>
	Details of the substitution process, methods to avoid conflicting
	resource records, and rules for specific corner cases are given in
	the following subsections.
	</t>
</section>
<section title="The DNAME Substitution">
	<t>
	When following RFC 1034 <xref target="RFC1034"/>, section 4.3.2's 
	algorithm's third step, "start matching down, label by label, in 
	the zone" and a node is found to own a DNAME resource record 
	a DNAME substitution occurs.  The name being sought may be the 
	original query name or a name that is the result of a CNAME 
	resource record being followed or a previously encountered DNAME.  
	As is the case of finding a CNAME resource record or NS resource 
	record set, the processing of a DNAME will happen prior to 
	finding the desired domain name.
	</t><t>
	A DNAME substitution is performed by replacing the suffix labels 
	of the name being sought matching the owner name of the DNAME 
	resource record with the string of labels in the RDATA field.  
	The matching labels end with the root label in all cases. 
	Only whole labels are replaced. See the table of examples for 
	common cases and corner cases.
	</t><t>
	<figure title="Table 1. DNAME Substitution Examples.">
  	<preamble>
	In the table below, the QNAME refers to the query name. The 
	owner is the DNAME owner domain name, and the target refers to 
	the target of the DNAME record. The result is the resulting name
	after performing the DNAME substitution on the query name.
	"no match" means that the query did not match the DNAME and thus
	no substitution is performed and a possible error message is returned
	(if no other result is possible).
	In the examples below, 'cyc' and 'shortloop' contain loops.
  	</preamble>
  	<artwork>
 QNAME            owner  DNAME   target         result
 ---------------- -------------- -------------- -----------------
 com.             example.com.   example.net.   &lt;no match>
 example.com.     example.com.   example.net.   &lt;no match>
 a.example.com.   example.com.   example.net.   a.example.net.
 a.b.example.com. example.com.   example.net.   a.b.example.net.
 ab.example.com.  b.example.com. example.net.   &lt;no match>
 foo.example.com. example.com.   example.net.   foo.example.net.
 a.x.example.com. x.example.com. example.net.   a.example.net.
 a.example.com.   example.com.   y.example.net. a.y.example.net.
 cyc.example.com. example.com.   example.com.   cyc.example.com.
 cyc.example.com. example.com.   c.example.com. cyc.c.example.com.
 shortloop.x.x.   x.             .              shortloop.x.
 shortloop.x.     x.             .              shortloop.
  	</artwork>
 <!-- wildcard cases. Wildcards are not expanded, strict reading of 2672.
 *.example.com.   example.com.   example.net.   *.example.net.
 a.example.com.   *.example.com. example.net.   &lt;no match>
 a.*.example.com. *.example.com. example.net.   a.example.net.
 a.example.com.   example.com.   *.example.net. a.*.example.net.
 Wildcard left out - DNAME discouraged with wildcards.
 -->
  	<postamble>
  	</postamble>
	</figure>
	</t><t>
	It is possible for DNAMEs to form loops, just as
	CNAMEs can form loops. DNAMEs and CNAMEs can chain together to
	form loops. A single corner case DNAME can form a loop. Resolvers
	and servers should be cautious in devoting resources to a query,
	but be aware that fairly long chains of DNAMEs may be valid.  
	Zone content administrators should take care to insure that there
	are no loops that could occur when using DNAME or DNAME/CNAME 
	redirection.
	</t><t>
	The domain name can get too long during substitution. For example, suppose the
	target name of the DNAME RR is 250 octets in length (multiple labels), if 
	an incoming QNAME that has a first label over 5 octets in length, the result 
	of the result would be a name over 255 octets.  If this occurs the 
	server returns an RCODE of YXDOMAIN <xref target="RFC2136" />. The DNAME
	record and its signature (if the zone is signed) are included in the answer as proof 
	for the YXDOMAIN (value 6) RCODE.
	</t>
</section>
<section title="DNAME Apex not Redirected itself">
<t>
	Unlike a CNAME RR, a DNAME RR redirects DNS names subordinate to its
	owner name; the owner name of a DNAME is not redirected itself.
	The domain name that owns a DNAME record is allowed to have other
	resource record types at that domain name, except DNAMEs or CNAMEs.
	This means that DNAME RRs are not allowed at the parent side of a
	delegation point but are allowed at a zone apex.
</t><t>
	The reason for this decision was that one can have a DNAME at the
	zone apex.  There still is a need to have the customary SOA and NS
	resource records at the zone apex.  This means that DNAME does not
	mirror a zone completely, as it does not mirror the zone apex.
</t><t>
	These rules also allow DNAME records to be queried through RFC 1034
	<xref target="RFC1034" /> compliant, DNAME-unaware caches.
</t>
</section>
<section title="Names Next to and Below a DNAME Record">
	<t>
	Resource records MUST NOT exist at any domain name subordinate 
	to the owner of a DNAME RR.  To get the contents for names 
	subordinate to that owner, the DNAME redirection must be invoked 
	and the resulting target queried.  A server MAY refuse to load 
	a zone that has data at a domain name subordinate to a domain name 
	owning a DNAME RR.  If the server does load the zone, those names
	below the DNAME RR will be occluded, 
	RFC 2136 <xref target="RFC2136"/>, section 7.18.  
	Also a server SHOULD refuse to load
	a zone subordinate to the owner of a DNAME record in the ancestor zone.
	See <xref target="dynamic" /> for further discussion 
	related to dynamic update.
	</t><t>
	DNAME is a singleton type, meaning only one DNAME is allowed per 
	name.  The owner name of a DNAME can only have one DNAME RR, and 
	no CNAME RRs can exist at that name. 
	These rules make sure that for a single domain name only one 
	redirection exists, and thus no confusion which one to follow.
	A server SHOULD refuse to load a zone that violates these rules.
	</t>
</section>
<section title="Compression of the DNAME record.">
	<t>
	The DNAME owner name can be compressed like any other owner name. 
	The DNAME RDATA target name MUST NOT be sent out in 
	compressed form, so that a DNAME RR can be treated as an unknown type
	<xref target="RFC3597"/>.
	</t><t>
	Although the previous DNAME specification <xref target="RFC2672" /> 
	(that is obsoleted by this specification) talked about signaling 
	to allow compression of the target name, such signaling has never
	been specified and this document also does not specify this signaling 
	behavior.
	</t><t> 
	RFC 2672 (obsoleted by this document) stated that the EDNS version 
	had a meaning for understanding of DNAME and DNAME target name 
	compression. This document revises RFC 2672, in that there is no 
	EDNS version signaling for DNAME.  However, the flags section of 
	EDNS(0) is updated with a Understand-DNAME flag by this document 
	(See Section 3.3).
	</t>
</section>
</section> <!-- end sec DNAME resource record -->

<section title="Processing">
	<t>
	The DNAME RR causes type NS additional section processing.
	</t>

<section title="CNAME synthesis and UD bit" anchor="udbit">
	<t>
	When preparing an response, a server upon performing a DNAME 
	substitution will in all cases include the DNAME RR used in the 
	answer section. 
	A CNAME RR record with TTL equal to the corresponding DNAME RR 
	is synthesized and included in the answer section for old resolvers.
	The owner name of the CNAME is the QNAME of the query. DNSSEC 
	<xref target="RFC4033" />, <xref target="RFC4034" />, 
	<xref target="RFC4035" /> says that the 
	synthesized CNAME does not have to be signed.  The DNAME has an RRSIG 
	and a validating resolver can check the CNAME against the DNAME 
	record and validate the DNAME record. 
	</t><t>
	Resolvers MUST be able to handle a synthesized CNAME TTL of zero or
	equal to the TTL of the corresponding DNAME record. A TTL of zero
	means that the CNAME can be discarded immediately after processing
	the answer.  DNAME aware resolvers can set the Understand-DNAME
	(UD bit) to receive a response with only the DNAME RR and no 
	synthesized CNAMEs.
	</t><t>
	The UD bit is part of the EDNS <xref target="RFC2671" />
	extended RCODE and Flags field. 
	It is used to omit server processing, transmission and 
	resolver processing of unsigned synthesized CNAMEs.
	Resolvers can set this in a query to request omission of the
	synthesized CNAMEs. Servers copy the UD bit to the response, and can 
	omit synthesized CNAMEs from the answer.
	Older resolvers do not set the UD bit, and older servers do not
	copy the UD bit to the answer, and will not omit synthesized CNAMEs.
	</t><t><figure><preamble>Updated EDNS extended RCODE and Flags field.
	</preamble>
<artwork>
            +0 (MSB)                +1 (LSB)
   +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
0: |   EXTENDED-RCODE      |       VERSION         |
   +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
2: |DO|UD|                 Z                       |
   +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
</artwork><postamble></postamble>
	</figure>
	</t><t>
	Servers MUST be able to answer a query for a synthesized CNAME. Like
	other query types this invokes the DNAME, and synthesizes the CNAME 
	into the answer.
	</t>
</section>

<section title="Server algorithm">
	<t>
	Below the server algorithm, which appeared in RFC 2672 Section 4.1, 
	is expanded to handle the UD (Understand-DNAME) bit. 
	</t>
	<t>
<list style='numbers'>
<t> <!-- step 1 -->
   Set or clear the value of recursion available in the response
      depending on whether the name server is willing to provide
      recursive service.  If recursive service is available and
      requested via the RD bit in the query, go to step 5, otherwise
      step 2.
<vspace blankLines='1' />
</t>

<t> <!-- step 2 -->
   Search the available zones for the zone which is the nearest
      ancestor to QNAME.  If such a zone is found, go to step 3,
      otherwise step 4.
<vspace blankLines='1' />
</t>

<t> <!-- step 3 -->
   Start matching down, label by label, in the zone.  The matching
      process can terminate several ways:
<vspace blankLines='1' />
<list style="letters">
<t>
      If the whole of QNAME is matched, we have found the node.
      <vspace blankLines='1' />

         If the data at the node is a CNAME, and QTYPE does not match
         CNAME, copy the CNAME RR into the answer section of the
         response, change QNAME to the canonical name in the CNAME RR,
         and go back to step 1.
      <vspace blankLines='1' />

         Otherwise, copy all RRs which match QTYPE into the answer
         section and go to step 6.
<vspace blankLines='1' />
</t>

<t>
      If a match would take us out of the authoritative data, we have
         a referral.  This happens when we encounter a node with NS RRs
         marking cuts along the bottom of a zone.
      <vspace blankLines='1' />

         Copy the NS RRs for the sub-zone into the authority section of
         the reply.  Put whatever addresses are available into the
         additional section, using glue RRs if the addresses are not
         available from authoritative data or the cache.  Go to step 4.
<vspace blankLines='1' />
</t>

<t>
      If at some label, a match is impossible (i.e., the
         corresponding label does not exist), look to see whether the
         last label matched has a DNAME record.
      <vspace blankLines='1' />

         If a DNAME record exists at that point, copy that record into
         the answer section.  If substitution of its &lt;target> for its
         &lt;owner> in QNAME would overflow the legal size for a &lt;domain-
         name>, set RCODE to YXDOMAIN <xref target="RFC2136" /> and exit; 
	 otherwise
         perform the substitution and continue.  
	 If the EDNS OPT record is present in the query and the UD bit is set, 
	 the server MAY copy the UD bit to the answer EDNS OPT record, and 
	 omit CNAME synthesis. Else the server MUST synthesize a CNAME 
	 record as described above and include it in the answer section.
	 Go back to step 1.
      <vspace blankLines='1' />

         If there was no DNAME record, look to see if the "*" label
         exists.
      <vspace blankLines='1' />

         If the "*" label does not exist, check whether the name we are
         looking for is the original QNAME in the query or a name we
         have followed due to a CNAME or DNAME.  If the name is original, set an
         authoritative name error in the response and exit.  Otherwise
         just exit.
      <vspace blankLines='1' />

      If the "*" label does exist, match RRs at that node against
      QTYPE.  If any match, copy them into the answer section, but
      set the owner of the RR to be QNAME, and not the node with
      the "*" label.  If the data at the node with the "*" label is a CNAME,
      and QTYPE doesn't match CNAME, copy the CNAME RR into the answer
      section of the response changing the owner name to the QNAME,
      change QNAME to the canonical name in the CNAME RR, and go back to
      step 1. Otherwise, Go to step 6.
<vspace blankLines='1' />
</t>
</list>
</t>

<t> <!-- step 4 -->
   Start matching down in the cache.  If QNAME is found in the cache,
      copy all RRs attached to it that match QTYPE into the answer
      section.  If QNAME is not found in the cache but a DNAME record is
      present at an ancestor of QNAME, copy that DNAME record into the
      answer section.  If there was no delegation from authoritative
      data, look for the best one from the cache, and put it in the
      authority section.  Go to step 6.
<vspace blankLines='1' />
</t>

<t> <!-- step 5 -->
   Use the local resolver or a copy of its algorithm 
   to answer the query.  Store the results,
      including any intermediate CNAMEs and DNAMEs, in the answer
      section of the response.
<vspace blankLines='1' />
</t>

<t> <!-- step 6 -->
   Using local data only, attempt to add other RRs which may be
      useful to the additional section of the query.  Exit.
</t>
</list></t>

<t>
   Note that there will be at most one ancestor with a DNAME as
   described in step 4 unless some zone's data is in violation of the
   no-descendants limitation in section 3.  An implementation might take
   advantage of this limitation by stopping the search of step 3c or
   step 4 when a DNAME record is encountered.
</t>

</section>
<section title="Wildcards">
	<t>
	The use of DNAME in conjunction with wildcards is discouraged
	<xref target="RFC4592" />.  Thus records of the form
	"*.example.com DNAME example.net" SHOULD NOT be used. 
	</t><t>
	The interaction between the expansion of the wildcard and the 
	redirection of the DNAME is non-deterministic.
	Because the processing is non-deterministic, DNSSEC validating 
	resolvers may not be able to validate a wildcarded DNAME.
	</t><t>
	A server MAY give a warning that the behavior is unspecified
	if such a wildcarded DNAME is loaded.  The server MAY refuse it,
	refuse to load or refuse dynamic update.
	</t>
</section>

<section title="Acceptance and Intermediate Storage">
	<t>
	Recursive caching name servers can encounter data at names below the owner name of a
	DNAME RR, due to a change at the authoritative server where data from
	before and after the change resides in the cache. This conflict 
	situation is a transitional phase, that ends when the old data 
	times out. The caching name server can opt to store both old and new data and 
	treat each as if the other did not exist, or drop the old data, or 
	drop the longer domain name. In any approach, consistency returns 
	after the older data TTL times out.
	</t><t>
	Recursive caching name servers MUST perform CNAME synthesis on behalf of DNAME-ignorant 
	clients. A recursive caching name server that understands DNAMEs can send out queries
	on behalf of clients with the UD bit set (See <xref target="udbit" />).
        After receiving the answers the recursive caching name server sends replies to DNAME 
        ignorant clients that include DNAMEs and synthesized CNAMEs.
	</t>
</section>
</section> <!-- end of Processing section -->
<section title="DNAME Discussions in Other Documents">
	<t>In <xref target="RFC2181" />, in Section 10.3., the discussion
	on MX and NS records touches on redirection by CNAMEs, but this
	also holds for DNAMEs.
	</t><t>
	<figure><preamble> Excerpt from 10.3. MX and NS records 
	(in RFC 2181). </preamble>
<artwork>
        The domain name used as the value of a NS resource record, 
        or part of the value of a MX resource record must not be 
        an alias.  Not only is the specification clear on this 
        point, but using an alias in either of these positions 
        neither works as well as might be hoped, nor well fulfills 
        the ambition that may have led to this approach.  This 
        domain name must have as its value one or more address 
        records.  Currently those will be A records, however in 
        the future other record types giving addressing 
        information may be acceptable.  It can also have other 
        RRs, but never a CNAME RR.</artwork>
	<postamble></postamble>
	</figure>
	</t>
	<t> 
	The DNAME RR is discussed in RFC 3363, section 4, on A6 and DNAME.
	The opening premise of this section is demonstrably wrong, and so 
	the conclusion based on that premise is wrong.  In particular, 
	<xref target="RFC3363" /> deprecates the use of DNAME in the IPv6 
	reverse tree, which is then carried forward as a recommendation in 
	<xref target="RFC4294" />.  Based on the experience gained in the 
	meantime, <xref target="RFC3363" /> should be revised, dropping all 
	constraints on having DNAME RRs in these zones.  This would greatly 
	improve the manageability of the IPv6 reverse tree.  These changes 
	are made explicit below.
	</t>
	<t>
	<figure><preamble>In <xref target="RFC3363" />, the paragraph</preamble>
<artwork>
   "The issues for DNAME in the reverse mapping tree appears to be
   closely tied to the need to use fragmented A6 in the main tree: if
   one is necessary, so is the other, and if one isn't necessary, the
   other isn't either.  Therefore, in moving RFC 2874 to experimental,
   the intent of this document is that use of DNAME RRs in the reverse
   tree be deprecated."
        </artwork>
	<postamble>is to be replaced with the word "DELETED".</postamble>
	</figure>
	</t>

	<t>
	<figure><preamble>
        In <xref target="RFC4294" />, the reference to DNAME was left in as an
        editorial oversight.  The paragraph </preamble>
<artwork>
  "Those nodes are NOT RECOMMENDED to support the experimental A6 and
  DNAME Resource Records [RFC3363]."</artwork>
	<postamble></postamble></figure>
	
	<figure><preamble>
	is to be replaced by</preamble>
<artwork>
  "Those nodes are NOT RECOMMENDED to support the experimental 
  A6 Resource Record [RFC3363]."</artwork>
	<postamble></postamble></figure>
	</t>
  </section>
<section title="Other Issues with DNAME">
	<t>
	There are several issues to be aware of about the use of DNAME.
	</t>

<section title="Canonical hostnames cannot be below DNAME owners">
	<t>
	The names listed as target names of MX, NS, PTR and SRV
	<xref target="RFC2782" /> records must
	be canonical hostnames. This means no CNAME or DNAME redirection
	may be present during DNS lookup of the address records for the host.
	This is discussed in RFC 2181 <xref target="RFC2181" />, 
	section 10.3, and RFC 1912 <xref target="RFC1912" />, section 2.4.
	For SRV see RFC 2782 <xref target="RFC2782" /> page 4.
	</t><t>
	The upshot of this is that although the lookup of a PTR record can
	involve DNAMEs, the name listed in the PTR record can not fall under
	a DNAME.  The same holds for NS, SRV and MX records.  For example, 
	when punycode alternates for a zone use DNAME then the 
	NS, MX, SRV and PTR records that point to that zone must use names 
	without punycode in their RDATA.
	What must be done then is to have the domain names with DNAME 
	substitution already applied to it as the MX, NS, PTR, SRV data.
	These are valid canonical hostnames.
	</t>
</section>
<section title="Dynamic Update and DNAME" anchor="dynamic">
	<t>
	DNAME records can be added, changed and removed in a zone using
	dynamic update transactions.  Adding a DNAME RR to a zone occludes
	any domain names that may exist under the added DNAME.  
	</t>
	<t>
	A server MUST reject a dynamic update message that attempts to 
	add a DNAME RR at a name that already has a CNAME RR or another DNAME
	RR associated with that name.  
	</t>
</section>
<section title="DNSSEC and DNAME">
<section title="DNAME bit in NSEC type map">
	<t>
	When a validator checks the NSEC RRs returned on a name error response,
	it SHOULD check that the DNAME bit is not set. If the DNAME bit is
	set then the DNAME substitution should have been done, but has not.
	</t>
</section>
<section title="Validators Must Understand DNAME" anchor="validname">
	<t>
	Below are examples of why DNSSEC validators MUST understand DNAME.
	</t>
<section title="DNAME in Bitmap Causes Invalid Name Error">
	<t>
	<figure title=""><preamble></preamble>
<artwork>;; Header: QR AA DO RCODE=3(NXDOMAIN)
;; Question
foo.bar.example.com. IN A
;; Answer
bar.example.com. NSEC dub.example.com. A DNAME
bar.example.com. RRSIG NSEC [valid signature] 
  	</artwork><postamble></postamble></figure>
	</t><t>
	If this is the response, then only by understanding that the 
	DNAME bit means that foo.bar.example.com needed to have been
	redirected by the DNAME, the validator can see that it is a BOGUS reply
	from an attacker that collated existing records from the DNS
	to create a confusing reply. 
	</t><t>
	If the DNAME bit had not been set in the NSEC record above then
	the answer would have validated as a correct name error response.
	</t>
</section>
<section title="Valid Name Error Response Involving DNAME in Bitmap">
	<t>
	<figure title=""><preamble></preamble>
<artwork>;; Header: QR AA DO RCODE=3(NXDOMAIN)
;; Question
cee.example.com. IN A
;; Answer
bar.example.com. NSEC dub.example.com. A DNAME
bar.example.com. RRSIG NSEC [valid signature] 
  	</artwork><postamble></postamble></figure>
	This reply has the same NSEC records as the example above,
	but with this query name (cee.example.com), 
	the answer is validated, because 'cee' does 
	not get redirected by the DNAME at 'bar'.
	</t>
</section>
<section title="Response With Synthesized CNAME">
<t>
	<figure title=""><preamble></preamble>
<artwork>;; Header: QR AA DO RCODE=0(NOERROR)
;; Question
foo.bar.example.com. IN A
;; Answer
bar.example.com. DNAME bar.example.net.
bar.example.com. RRSIG DNAME [valid signature] 
foo.bar.example.com. CNAME foo.bar.example.net.
  	</artwork><postamble></postamble></figure>
	The answer shown above has the synthesized CNAME included.
	However, the CNAME has no signature, since the server does not
	sign online. So it cannot be trusted. It could be altered by
	an attacker to be foo.bar.example.com CNAME bla.bla.example.
	The DNAME record does have its signature included, since it
	does not change for every query name. The validator must verify
	the DNAME signature and then recursively resolve further to 
	query for the foo.bar.example.net A record.
	</t>
</section>
</section>
</section>
</section> <!-- end of issues with DNAME -->

<section anchor="IANA" title="IANA Considerations">
	<t>The DNAME Resource Record type code 39 (decimal) originally has been
	registered by [RFC2672].  IANA should update the DNS resource record
	registry to point to this document for RR type 39.
	</t><t>
	This draft requests the second highest bit in the EDNS flags
	field for the Understand-DNAME (UD) flag as described in Section 3.1.
	</t>
</section>

<section anchor="Security" title="Security Considerations">
	<t>
	DNAME redirects queries elsewhere, which may impact security based 
	on policy and the security status of the zone with the DNAME and 
	the redirection zone's security status. 
	</t><t>
	If a validating resolver accepts wildcarded DNAMEs, this creates
	security issues.  Since the processing of a wildcarded DNAME is 
	non-deterministic and the CNAME that was substituted by the 
	server has no signature, the resolver may choose a different 
	result than what the server meant, and consequently end up at 
	the wrong destination. Use of wildcarded DNAMEs is discouraged in 
	any case <xref target="RFC4592" />.
	</t><t>
	A validating resolver MUST understand DNAME, according to 
	<xref target="RFC4034" />. In <xref target="validname" /> 
	examples are given that illustrate this need. 
	</t>
</section>

<section anchor="Acknowledgments" title="Acknowledgments">
	<t>The authors of this draft would like to acknowledge Matt Larson 
	for beginning this effort to address the issues related to the 
	DNAME RR type. The authors would also like to acknowledge Paul Vixie,
	Ed Lewis, Mark Andrews, Mike StJohns, Niall O'Reilly, Sam Weiler,
	Alfred Hoenes and Kevin Darcy
	for their review and comments on this document.</t>
</section>
</middle>

<back>
	<references title="Normative References">
		<?rfc include="reference.RFC.1034" ?>
		<?rfc include="reference.RFC.1035" ?>
		<?rfc include="reference.RFC.2119" ?>
		<?rfc include="reference.RFC.2136" ?>
		<?rfc include="reference.RFC.2181" ?>
		<?rfc include="reference.RFC.2671" ?>
		<?rfc include="reference.RFC.2782" ?>
		<?rfc include="reference.RFC.3597" ?>
		<?rfc include="reference.RFC.4033" ?>
		<?rfc include="reference.RFC.4034" ?>
		<?rfc include="reference.RFC.4035" ?>
		<?rfc include="reference.RFC.4592" ?>
	</references>
	<references title="Informative References">
		<?rfc include="reference.RFC.1912" ?>
		<?rfc include="reference.RFC.2672" ?>
		<?rfc include="reference.RFC.3363" ?>
		<?rfc include="reference.RFC.4294" ?>
	</references>
</back>
</rfc>
