RFC 6672
DNAME Redirection in the DNS
RFC 6672: DNAME Redirection in the DNS π
Internet Engineering Task Force (IETF), Request for Comments 6672. Okay bestie, here's the tea on who made this and what it does π«Ά
- Authors: S. Rose (NIST) and W. Wijngaards (NLnet Labs) π
- Category: Standards Track β¨
- Date: June 2012 π
- ISSN: 2070-1721
- Obsoletes: RFC 2672 π (this one replaces it, so RFC 2672 is retired)
- Updates: RFC 3363 π (it tweaks how IPv6 addresses are represented in DNS)
Abstract π¦
Okay so the DNAME record gives you redirection for a whole subtree of the domain name tree in the DNS πΈ Basically, every name that ends with a certain suffix gets sent over to some other part of the DNS. This document obsoletes the original spec in RFC 2672, and it also updates the document about representing IPv6 addresses in DNS (RFC 3363). Main character energy π
Status of This Memo π
This is an Internet Standards Track document. β¨
It's a product of the Internet Engineering Task Force (IETF), so it represents the consensus of the IETF community. It went through public review and got approved for publication by the Internet Engineering Steering Group (IESG). If you want more info on Internet Standards, check out Section 2 of RFC 5741 π
For the current status of this document, any errata, and how to send feedback, the info lives at http://www.rfc-editor.org/info/rfc6672 π₯
Copyright Notice πΈ
Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved. π
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info), as they stand on the date this document was published. Please read these carefully, because they spell out your rights and restrictions for this document π Any Code Components pulled out of this document must include the Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as the Simplified BSD License describes.
This document might include material from IETF Documents or IETF Contributions that were published or made publicly available before November 10, 2008. The people who control the copyright in some of that material may not have given the IETF Trust permission to allow modifications outside the IETF Standards Process. So unless you get a proper license from those copyright holders, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process. The one exceptions are formatting it for publication as an RFC or translating it into languages other than English π§
Table of Contents π
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4
2. The DNAME Resource Record . . . . . . . . . . . . . . . . . . 5
2.1. Format . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2. The DNAME Substitution . . . . . . . . . . . . . . . . . . 5
2.3. DNAME Owner Name Matching the QNAME . . . . . . . . . . . 6
2.4. Names next to and below a DNAME Record . . . . . . . . . . 7
2.5. Compression of the DNAME Record . . . . . . . . . . . . . 7
3. Processing . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1. CNAME Synthesis . . . . . . . . . . . . . . . . . . . . . 8
3.2. Server Algorithm . . . . . . . . . . . . . . . . . . . . . 9
3.3. Wildcards . . . . . . . . . . . . . . . . . . . . . . . . 10
3.4. Acceptance and Intermediate Storage . . . . . . . . . . . 11
3.4.1. Resolver Algorithm . . . . . . . . . . . . . . . . . . 11
4. DNAME Discussions in Other Documents . . . . . . . . . . . . . 12
5. Other Issues with DNAME . . . . . . . . . . . . . . . . . . . 13
5.1. Canonical Hostnames Cannot Be below DNAME Owners . . . . . 13
5.2. Dynamic Update and DNAME . . . . . . . . . . . . . . . . . 13
5.3. DNSSEC and DNAME . . . . . . . . . . . . . . . . . . . . . 14
5.3.1. Signed DNAME, Unsigned Synthesized CNAME . . . . . . . 14
5.3.2. DNAME Bit in NSEC Type Map . . . . . . . . . . . . . . 14
5.3.3. DNAME Chains as Strong as the Weakest Link . . . . . . 14
5.3.4. Validators Must Understand DNAME . . . . . . . . . . . 14
5.3.4.1. Invalid Name Error Response Caused by DNAME in
Bitmap . . . . . . . . . . . . . . . . . . . . . . 15
5.3.4.2. Valid Name Error Response Involving DNAME in
Bitmap . . . . . . . . . . . . . . . . . . . . . . 15
5.3.4.3. Response with Synthesized CNAME . . . . . . . . . 16
6. Examples of DNAME Use in a Zone . . . . . . . . . . . . . . . 16
6.1. Organizational Renaming . . . . . . . . . . . . . . . . . 16
6.2. Classless Delegation of Shorter Prefixes . . . . . . . . . 17
6.3. Network Renumbering Support . . . . . . . . . . . . . . . 17
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18
8. Security Considerations . . . . . . . . . . . . . . . . . . . 18
9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 18
10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10.1. Normative References . . . . . . . . . . . . . . . . . . . 19
10.2. Informative References . . . . . . . . . . . . . . . . . . 20
Appendix A. Changes from RFC 2672 . . . . . . . . . . . . . . . . 21
A.1. Changes to Server Behavior . . . . . . . . . . . . . . . . 21
A.2. Changes to Client Behavior . . . . . . . . . . . . . . . . 21
1. Introduction β¨
Okay so DNAME is a DNS resource record type that was first defined in RFC 2672 [RFC2672] π¦ It lets you redirect from one part of the DNS name tree over to another part.
The DNAME RR and the CNAME RR [RFC1034] both make a lookup possibly return data for a different domain name than the one you asked for. The difference is that a CNAME RR points the lookup for data at its owner to one single other name. A DNAME RR, on the other hand, points lookups for data at the descendants of its owner's name over to matching names under a different single node of the tree. Lowkey genius π§
Here's an example. Take a lookup through a zone (see RFC 1034 [RFC1034], Section 4.3.2, step 3) for the domain name foo.example.com. Say a DNAME resource record is found at example.com saying that all queries under example.com should be directed to example.net. The lookup process goes back to step 1 with the new query name of foo.example.net. And if the query name had been www.foo.example.com, the new query name would be www.foo.example.net π
This document is a revision of the original DNAME spec in RFC 2672 [RFC2672]. DNAME was created to help with maintaining address-to-name mappings when a network gets renumbered π If it's set up carefully, a renumbering event causes no change at all to the authoritative server that holds those address-to-name mappings. Real-world examples of this are classless reverse address space delegations.
DNAME also helps with aliasing name spaces. A zone administrator might want certain subtrees of the DNS to hold the same information, for example punycode [RFC3492] alternates for domain spaces π§
This revision of the DNAME spec does not change the wire format or the handling of DNAME resource records. What it does add is discussion of problems you might run into when using DNAME π
1.1. Requirements Language π
Okay, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED" "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be read as described in RFC 2119 [RFC2119]. Those words are the rules, so pay attention to them π
2. The DNAME Resource Record πΈ
2.1. Format π
The DNAME RR has the mnemonic DNAME and type code 39 (decimal). It is CLASS-insensitive π«Ά
Its RDATA is made up of a single field, <target>, which holds a fully qualified domain name that MUST be sent in uncompressed form [RFC1035] [RFC3597]. The <target> field MUST be present. The presentation format of <target> is that of a domain name [RFC1035]. The presentation format of the whole RR looks like this:
<owner> <ttl> <class> DNAME <target>
So the effect of the DNAME RR is that the record's <target> gets substituted in for its owner name, as a suffix of a domain name. That substitution applies to all names below the owner name of the DNAME RR. It has to be applied for every DNAME RR found during the resolution process, which is what allows pretty lengthy valid chains of DNAME RRs π₯
The details of the substitution process, the ways to avoid conflicting resource records, and the rules for specific corner cases are covered in the subsections that follow. Stay tuned, because part 2 is where it gets spicy π β¨
2.2. The DNAME Substitution β¨
okay so when you're following step 3 of the algorithm in RFC 1034 [RFC1034], Section 4.3.2, "start matching down, label by label, in the zone" πΊοΈ and a node turns out to own a DNAME resource record, a DNAME substitution happens π . The name being sought can be the original query name, or a name that came from a CNAME resource record being followed, or from a DNAME you already ran into π. Same deal as when you find a CNAME resource record or an NS resource record set: the DNAME gets processed before you find the desired domain name π«Ά.
So a DNAME substitution swaps out the suffix labels of the name being sought that match the owner name of the DNAME resource record, and puts in the string of labels from the RDATA field π¦. The matching labels always end at the root label, and only whole labels get replaced, no half-labels allowed π ββοΈ. Here's the table of examples for the common cases and the corner cases π.
In the table, QNAME is the query name, owner is the DNAME owner domain name, and target is the target of the DNAME record. result is the name you end up with after doing the DNAME substitution on the query name. "no match" means the query didn't match the DNAME, so no substitution happens and a possible error message gets returned (if no other result is possible). Every line has one example substitution in it πΈ. In the examples, 'cyc' and 'shortloop' contain loops π.
QNAME owner DNAME target result
---------------- -------------- -------------- -----------------
com. example.com. example.net. <no match>
example.com. example.com. example.net. [0]
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. <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.
[0] The result depends on the QTYPE. If the QTYPE = DNAME, then the result is "example.com.", else "<no match>".
Table 1. DNAME Substitution Examples π
DNAMEs can form loops, just like CNAMEs can π. DNAMEs and CNAMEs can chain together into loops too, and a single corner case DNAME can form a loop all by itself π΅βπ«. So resolvers and servers should be cautious about how many resources they pour into one query π§―, but heads up: pretty long chains of DNAMEs can totally be valid β¨. Zone content administrators should take care to make sure no loops can occur when they use DNAME or DNAME/CNAME redirection π.
The domain name can get too long during substitution π. For example, say the target name of the DNAME RR is 250 octets long (multiple labels), and an incoming QNAME has a first label over 5 octets long. The result would be a name over 255 octets, which is way too long π. If this happens, the server returns an RCODE of YXDOMAIN [RFC2136]. The DNAME record and its signature (if the zone is signed) get included in the answer as proof for the YXDOMAIN (value 6) RCODE π§Ύ.
2.3. DNAME Owner Name Matching the QNAME πͺ
Unlike a CNAME RR, a DNAME RR redirects DNS names that are subordinate to its owner name π³. The owner name of a DNAME is not redirected itself, so it's not a CNAME situation at all π ββοΈ. The domain name that owns a DNAME record is allowed to have other resource record types at that domain name, except DNAMEs, CNAMEs, or other types that have restrictions on what they can coexist with π€.
When the QTYPE matches a type (or types) also owned by the owner name, the response is sourced from the owner name π¬. For example, a QTYPE of ANY would return the (available) types at the owner name, not the target name π.
DNAME RRs MUST NOT appear at the same owner name as an NS RR unless the owner name is the zone apex π«. If it isn't the zone apex, then the NS RR signifies a delegation point, and the DNAME RR must in that case appear below the zone cut at the zone apex of the child zone π§©.
If a DNAME record is present at the zone apex, you still need the customary SOA and NS resource records there too π. Such a DNAME can't be used to mirror a zone completely, because it doesn't mirror the zone apex πͺπ.
These rules also let DNAME records get queried through caches that are RFC 1034 [RFC1034] compliant and are DNAME unaware π΅οΈββοΈ.
2.4. Names next to and below a DNAME Record π‘
Resource records MUST NOT exist at any subdomain of the owner of a DNAME RR π ββοΈ. To get the contents for names subordinate to that owner name, the DNAME redirection must be invoked and the resulting target queried π. A server MAY refuse to load a zone that has data at a subdomain of a domain name owning a DNAME RR π. If the server does load the zone, then those names below the DNAME RR will be occluded as described in RFC 2136 [RFC2136], Section 7.18 π«₯. Also, a server ought to refuse to load a zone subordinate to the owner of a DNAME record in the ancestor zone π§. See Section 5.2 for further discussion related to dynamic update π.
DNAME is a singleton type, meaning only one DNAME is allowed per name 1οΈβ£. 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, so there's no confusion about which one to follow π. A server ought to refuse to load a zone that violates these rules π ββοΈ.
2.5. Compression of the DNAME Record ποΈ
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, and it MUST be downcased for DNS Security Extensions (DNSSEC) validation π.
Okay, so the previous DNAME specification [RFC2672] (that is obsoleted by this specification) talked about signaling to allow compression of the target name, but that signaling has never been specified π. It isn't specified in this document either π€·ββοΈ.
RFC 2672 (obsoleted by this document) states that the Extended DNS (EDNS) version has a means for understanding DNAME and DNAME target name compression π. This document revises RFC 2672, in that there is no EDNS version signaling for DNAME π.
3. Processing βοΈ
3.1. CNAME Synthesis πͺ
When preparing a response, a server performing a DNAME substitution will, in all cases, include the relevant DNAME RR in the answer section π¦. Relevant cases includes the following:
- The DNAME is being employed as a substitution instruction.
- The DNAME itself matches the QTYPE, and the owner name matches QNAME.
When the owner name matches the QNAME and the QTYPE matches another type owned there, the DNAME is not included in the answer π.
A CNAME RR with Time to Live (TTL) equal to the corresponding DNAME RR is synthesized and included in the answer section when the DNAME is employed as a substitution instruction β¨. The owner name of the CNAME is the QNAME of the query π―. The DNSSEC specification ([RFC4033] [RFC4034] [RFC4035]) says that the synthesized CNAME does not have to be signed ποΈ. The signed DNAME has an RRSIG, and a validating resolver can check the CNAME against the DNAME record and validate the signature over the DNAME RR π΅οΈββοΈπ.
Servers MUST be able to answer a query for a synthesized CNAME π. Like other query types, this invokes the DNAME, and then the server synthesizes the CNAME and places it into the answer section π§. If the server in question is a cache, the synthesized CNAME's TTL SHOULD be equal to the decremented TTL of the cached DNAME β³.
Resolvers MUST be able to handle a synthesized CNAME TTL of zero or a value equal to the TTL of the corresponding DNAME record (as some older, authoritative server implementations set the TTL of synthesized CNAMEs to zero) π« . A TTL of zero means that the CNAME can be discarded immediately after processing the answer ποΈβ¨.
3.2. Server Algorithm πΈ
Okay so this is the revised server algorithm, the one that tells a name server exactly what to do with a query. It's basically the RFC 2672, Section 4.1 algorithm, but with DNAME added in. Let's go step by step π
- 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, go to 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, go to step 4. π
- Start matching down, label by label, in the zone. The matching process can end in a few different ways, so pay attention bestie π
- A. If the whole of QNAME is matched, we've found the node. If the data at the node is a CNAME, and QTYPE doesn't 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. Otherwise, copy all RRs which match QTYPE into the answer section and go to step 6. β¨
- B. If a match would take us out of the authoritative data, we have a referral. This happens when we hit a node with NS RRs marking cuts along the bottom of a zone. 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 aren't available from authoritative data or the cache. Go to step 4. π¦
- C. If at some label, a match is impossible (i.e., the corresponding label doesn't exist), look to see whether the last label matched has a DNAME record. This is where DNAME really shines π
- If a DNAME record exists at that point, copy that record into the answer section. If substitution of its <target> for its <owner> in QNAME would overflow the legal size for a <domain-name>, set RCODE to YXDOMAIN [RFC2136] and exit. Otherwise, perform the substitution and continue. The server MUST synthesize a CNAME record as described above and include it in the answer section. Go back to step 1. π
- If there was no DNAME record, look to see if the
*label exists. - If the
*label does not exist, check whether the name we're looking for is the original QNAME in the query or a name we 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. π - 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. π§
- 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 isn't 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. π
- 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. π«Ά
- Using local data only, attempt to add other RRs that may be useful to the additional section of the query. Exit. π
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. Lowkey a really handy shortcut π¦
3.3. Wildcards π·
Using DNAME together with wildcards is discouraged [RFC4592]. So records of the form *.example.com DNAME example.net SHOULD NOT be used. Please don't do this, bestie π
ββοΈ
The interaction between the expansion of the wildcard and the redirection of the DNAME is non-deterministic. Since the processing is non-deterministic, DNSSEC validating resolvers may not be able to validate a wildcarded DNAME. That's a whole mess π
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 the zone, or refuse dynamic updates. Your call, but know your options π
3.4. Acceptance and Intermediate Storage π§
Recursive caching name servers can run into data at names below the owner name of a DNAME RR. This happens because of a change at the authoritative server, where data from before and after the change is sitting in the cache together. It's a transitional phase that ends once the old data times out. The caching name server can choose to store both old and new data and treat each as if the other didn't exist, or drop the old data, or drop the longer domain name. Whatever approach it picks, consistency comes back after the older data TTL times out. Honestly a little chaotic, but it fixes itself β¨
Recursive caching name servers MUST perform CNAME synthesis on behalf of clients. No skipping this one π
If a recursive caching name server encounters a DNSSEC validated DNAME RR that contradicts information already in the cache (excluding CNAME records), it SHOULD cache the DNAME RR, but it MAY cache the CNAME record received along with it, subject to the rules for CNAME. π
If the DNAME RR can't be validated via DNSSEC (i.e., it's not BOGUS, but it's not able to validate either), the recursive caching server SHOULD NOT cache the DNAME RR. It MAY still cache the CNAME record received along with it, subject to the rules for CNAME. Unverified vibes don't get stored, periodt π
3.4.1. Resolver Algorithm π¦
Below is the revised resolver algorithm, which is RFC 2672, Section 4.2 but updated for DNAME. Here we go π
- See if the answer is in local information or can be synthesized from a cached DNAME. If so, return it to the client.
- Find the best servers to ask.
- Send queries until one returns a response.
- Analyze the response, which goes one of these ways:
- A. If the response answers the question or contains a name error, cache the data as well as return it back to the client. β¨
- B. If the response contains a better delegation to other servers, cache the delegation information, and go to step 2.
- C. If the response shows a CNAME and that isn't the answer itself, cache the CNAME, change the SNAME to the canonical name in the CNAME RR, and go to step 1.
- D. If the response shows a DNAME and that isn't the answer itself, cache the DNAME (upon successful DNSSEC validation if the client is a validating resolver). If substitution of the DNAME's target name for its owner name in the SNAME would overflow the legal size for a domain name, return an implementation-dependent error to the application. Otherwise, perform the substitution and go to step 1. πΈ
- E. If the response shows a server failure or other bizarre contents, delete the server from the SLIST and go back to step 3. π
4. DNAME Discussions in Other Documents π
Section 10.3 of [RFC2181] talks about redirection by CNAMEs in the context of MX and NS records, but this also holds for DNAMEs. Here's what that section says:
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.
The DNAME RR is discussed in RFC 3363, Section 4, on A6 and DNAME. The opening premise of this section is demonstrably wrong, so the conclusion based on that premise is wrong too. In particular, [RFC3363] deprecates the use of DNAME in the IPv6 reverse tree. Based on the experience gained in the meantime, [RFC3363] is revised, dropping all constraints on having DNAME RRs in these zones [RFC6434]. This would greatly improve the manageability of the IPv6 reverse tree. These changes are made explicit below. Glow-up energy π
In [RFC3363], the following paragraph is updated by this document, and the use of DNAME RRs in the reverse tree is no longer deprecated. The old paragraph reads:
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.
5. Other Issues with DNAME π§©
There are several issues to be aware of about the use of DNAME. Let's dish π
5.1. Canonical Hostnames Cannot Be below DNAME Owners π«
The names listed as target names of MX, NS, PTR, and SRV [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 [RFC2181], Section 10.3, and RFC 1912 [RFC1912], Section 2.4. For SRV, see RFC 2782 [RFC2782], page 4. π
The upshot of this is that although the lookup of a PTR record can involve DNAMEs, the name listed in the PTR record can't fall under a DNAME. The same holds for NS, SRV, and MX records. For example, when punycode [RFC3492] alternates for a zone use DNAME, then the NS, MX, SRV, and PTR records that point to that zone must use names that are not aliases in their RDATA. So what you have to do is put the domain names with DNAME substitution already applied as the MX, NS, PTR, and SRV data. Those are valid canonical hostnames, and that's the move π¦
5.2. Dynamic Update and DNAME π
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. Kinda dramatic, but accurate π
If a dynamic update message attempts to add a DNAME with a given owner name, but a CNAME is associated with that name, then the server MUST ignore the DNAME. If a DNAME is already associated with that name, then it is replaced with the new DNAME. Otherwise, add the DNAME. If a CNAME is added with a given owner name, but a DNAME is associated with that name, then the CNAME MUST be ignored. Similar behavior occurs for dynamic updates to an owner name of a CNAME RR [RFC2136]. Rules are rules, babe π
5.3. DNSSEC and DNAME π
The following subsections specify the behavior of implementations that understand both DNSSEC and DNAME (synthesis). Security-nerd era has officially begun π
5.3.1. Signed DNAME, Unsigned Synthesized CNAME π
okay so in any response, a signed DNAME RR means the query got a non-terminal redirection π¦. There might or might not be a server-synthesized CNAME in the answer section, and if there is one, it will never be signed π. For a DNSSEC validator, checking the DNAME RR and then checking that the CNAME was properly synthesized is sufficient proof β¨.
5.3.2. DNAME Bit in NSEC Type Map
in any negative response, the NSEC or NSEC3 [RFC5155] record type bitmap SHOULD be checked to see that there was no DNAME that could have been applied π. if the DNAME bit in the type bitmap is set and the query name is a subdomain of the closest encloser that is asserted, then DNAME substitution should have been done, but the substitution has not been done as specified π.
5.3.3. DNAME Chains as Strong as the Weakest Link
a response can contain a chain of DNAME and CNAME redirections π. that chain can end in a positive answer or a negative reply (no name error or no data error) β¨. each step in that chain results in resource records being added to the answer or authority section of the response. only if all steps are secure can the AD (Authentic Data) bit be set for the response π. if one of the steps is bogus, the result is bogus π.
5.3.4. Validators Must Understand DNAME π
okay bestie, here are examples of why DNSSEC validators MUST understand DNAME π«Ά. in the examples, SOA records, wildcard denial NSECs, and other material not under discussion have been omitted or shortened π§.
5.3.4.1. Invalid Name Error Response Caused by DNAME in Bitmap
;; Header: QR AA RCODE=3(NXDOMAIN)
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; Question
foo.bar.example.com. IN A
;; Authority
bar.example.com. NSEC dub.example.com. A DNAME
bar.example.com. RRSIG NSEC [valid signature]
if this is the received response, then only by understanding that the DNAME bit in the NSEC bitmap means that foo.bar.example.com needed to have been redirected by the DNAME can the validator see that it is a BOGUS reply from an attacker π΅οΈββοΈ. that attacker collated existing records from the DNS to create a confusing reply π€.
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 β .
5.3.4.2. Valid Name Error Response Involving DNAME in Bitmap
;; Header: QR AA RCODE=3(NXDOMAIN)
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; Question
cee.example.com. IN A
;; Authority
bar.example.com. NSEC dub.example.com. A DNAME
bar.example.com. RRSIG NSEC [valid signature]
this response 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' π¦.
5.3.4.3. Response with Synthesized CNAME
;; Header: QR AA RCODE=0(NOERROR)
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; 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.
the response shown above has the synthesized CNAME included π. however, the CNAME has no signature, since the server does not sign online π¬. so this response 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 πΈ. the validator must verify the DNAME signature and then recursively resolve further in order to query for the foo.bar.example.net A record π§ .
6. Examples of DNAME Use in a Zone π
below are some examples of the use of DNAME in a zone π. these examples are by no means exhaustive π.
6.1. Organizational Renaming π’
if an organization with domain name FROBOZZ.EXAMPLE.NET became part of an organization with domain name ACME.EXAMPLE.COM, it might ease transition by placing information such as this in its old zone π§.
frobozz.example.net. DNAME frobozz-division.acme.example.com.
MX 10 mailhub.acme.example.com.
the response to an extended recursive query for www.frobozz.example.net would contain, in the answer section, the DNAME record shown above and the relevant RRs for www.frobozz-division.acme.example.com β¨.
if an organization wants to have aliases for names, for a different spelling or language, the same example applies π. note that the MX RR at the zone apex is not redirected and has to be repeated in the target zone β οΈ. also note that the services at mailhub or www.frobozz-division.acme.example.com have to recognize and handle the aliases π«Ά.
6.2. Classless Delegation of Shorter Prefixes π
the classless scheme for in-addr.arpa delegation [RFC2317] can be extended to prefixes shorter than 24 bits by use of the DNAME record π§©. for example, the prefix 192.0.8.0/22 can be delegated by the following records π.
$ORIGIN 0.192.in-addr.arpa.
8/22 NS ns.slash-22-holder.example.com.
8 DNAME 8.8/22
9 DNAME 9.8/22
10 DNAME 10.8/22
11 DNAME 11.8/22
a typical entry in the resulting reverse zone for some host with address 192.0.9.33 might be as follows π:
$ORIGIN 8/22.0.192.in-addr.arpa.
33.9 PTR somehost.slash-22-holder.example.com.
the advisory remarks in [RFC2317] concerning the choice of the "/" character apply here as well π.
6.3. Network Renumbering Support π’
if IPv4 network renumbering were common, maintenance of address space delegation could be simplified by using DNAME records instead of NS records to delegate πͺ.
$ORIGIN new-style.in-addr.arpa.
189.190 DNAME in-addr.example.net.
$ORIGIN in-addr.example.net.
188 DNAME in-addr.customer.example.com.
$ORIGIN in-addr.customer.example.
1 PTR www.customer.example.com
2 PTR mailhub.customer.example.com.
; etc ...
this would allow the address space 190.189.0.0/16 assigned to the ISP "example.net" to be changed without having to alter the zone data describing the use of that space by the ISP and its customers π.
renumbering IPv4 networks is currently so arduous a task that updating the DNS is only a small part of the labor, so this scheme may have a low value π . but it is hoped that in IPv6 the renumbering task will be quite different, and the DNAME mechanism may play a useful part π¦β¨.
7. IANA Considerations π
the DNAME resource record type code 39 (decimal) originally was registered by [RFC2672] in the DNS Resource Record (RR) Types registry table at http://www.iana.org/assignments/dns-parameters. IANA has updated the DNS resource record registry to point to this document for RR type 39 π
.
8. Security Considerations π¨
β οΈ this section is serious, bestie, so read it carefully π«£
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 π. for validating resolvers, the lowest security status of the links in the chain of CNAME and DNAME redirections is applied to the result π.
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 [RFC4592] π ββοΈ.
a validating resolver MUST understand DNAME, according to [RFC4034] π«Ά. the examples in Section 5.3.4 illustrate this need π§ .
9. Acknowledgments π
the authors of this document 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 reviews and comments on this document ππ.
10. References π
10.1. Normative References
[RFC1034] Mockapetris, P., "Domain names - concepts and facilities",
STD 13, RFC 1034, November 1987.
[RFC1035] Mockapetris, P., "Domain names - implementation and
specification", STD 13, RFC 1035, November 1987.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2136] Vixie, P., Thomson, S., Rekhter, Y., and J. Bound,
"Dynamic Updates in the Domain Name System (DNS UPDATE)",
RFC 2136, April 1997.
[RFC2181] Elz, R. and R. Bush, "Clarifications to the DNS
Specification", RFC 2181, July 1997.
[RFC2317] Eidnes, H., de Groot, G., and P. Vixie, "Classless IN-
ADDR.ARPA delegation", BCP 20, RFC 2317, March 1998.
[RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for
specifying the location of services (DNS SRV)", RFC 2782,
February 2000.
[RFC3597] Gustafsson, A., "Handling of Unknown DNS Resource Record
(RR) Types", RFC 3597, September 2003.
[RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "DNS Security Introduction and Requirements",
RFC 4033, March 2005.
[RFC4034] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Resource Records for the DNS Security Extensions",
RFC 4034, March 2005.
[RFC4035] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "Protocol Modifications for the DNS Security
Extensions", RFC 4035, March 2005.
[RFC4592] Lewis, E., "The Role of Wildcards in the Domain Name
System", RFC 4592, July 2006.
[RFC5155] Laurie, B., Sisson, G., Arends, R., and D. Blacka, "DNS
Security (DNSSEC) Hashed Authenticated Denial of
Existence", RFC 5155, March 2008.
10.2. Informative References
[RFC1912] Barr, D., "Common DNS Operational and Configuration
Errors", RFC 1912, February 1996.
[RFC2672] Crawford, M., "Non-Terminal DNS Name Redirection",
RFC 2672, August 1999.
[RFC3363] Bush, R., Durand, A., Fink, B., Gudmundsson, O., and T.
Hain, "Representing Internet Protocol version 6 (IPv6)
Addresses in the Domain Name System (DNS)", RFC 3363,
August 2002.
[RFC3492] Costello, A., "Punycode: A Bootstring encoding of Unicode
for Internationalized Domain Names in Applications
(IDNA)", RFC 3492, March 2003.
[RFC6434] Jankiewicz, E., Loughney, J., and T. Narten, "IPv6 Node
Requirements", RFC 6434, December 2011.
Appendix A. Changes from RFC 2672 β¨
the changes from RFC 2672 continue in the next part π¦
A.1. Changes to Server Behavior β¨
Okay so, bestie, here's the tea on the big server-side glow-up compared to the original DNAME spec π :
- The rules for DNAME substitution have been clarified in Section 2.2.
- The EDNS option to signal DNAME understanding and compression has never been specified, and this document clarifies that there is no signaling method (Section 2.5). π
- The TTL for synthesized CNAME RRs is now set to the TTL of the DNAME, not zero (Section 3.1). π
- Recursive caching servers MUST perform CNAME synthesis on behalf of clients (Section 3.4). π
- The revised server algorithm is detailed in Section 3.2. π§
- Rules for dynamic update messages adding a DNAME or CNAME RR to a zone where a CNAME or DNAME already exists are detailed in Section 5.2. π₯
A.2. Changes to Client Behavior π¦
And now the client side, which is giving major main character energy too π. Here's what changed from the original DNAME spec:
- Clients MUST be able to accept synthesized CNAME RR's with a TTL of either zero or the TTL of the DNAME RR that accompanies the CNAME RR. π«Ά
- DNSSEC-aware clients SHOULD cache DNAME RRs and MAY cache synthesized CNAME RRs they receive in the same response. DNSSEC-aware clients SHOULD also check the NSEC/NSEC3 type bitmap to verify that DNAME redirection is to be done. DNSSEC validators MUST understand DNAME (Section 5.3). Literally the most important bullet here, ngl π
- The revised client algorithm is detailed in Section 3.4.1. πΈ
Authors' Addresses π
Scott Rose
NIST
100 Bureau Dr.
Gaithersburg, MD 20899
USA
Phone: +1-301-975-8439
Fax: +1-301-975-6238
EMail: scott.rose@nist.gov
Wouter Wijngaards
NLnet Labs
Science Park 140
Amsterdam 1098 XH
The Netherlands
Phone: +31-20-888-4551
EMail: wouter@nlnetlabs.nl
π¦ where this page comes from
- ietf: rfc6672 2012-06
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms