Internet-Draft | DNS Relative Labels | July 2024 |
van Hartingsveldt | Expires 24 January 2025 | [Page] |
This document defines a new DNS Label Type using the Extension Mechanisms for DNS to indicate when a relative domain name is used.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 24 January 2025.¶
Copyright (c) 2024 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 (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document defines a "Relative Label" which may appear within domain names. This new label type enables resource records to be used with their relative form (e.g. "www" instead of "www.example.com.").¶
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 [RFC2119].¶
Relative labels are intended to efficiently solve the problem of using FQDNs when a relative label is wanted. For example, when someone wants to add the MX record "0 mx" instead of "0 mx.example.com." to a zone using DNS UPDATE [RFC2136]. It is also useful for DNS providers that store all the records in binary format. Saving data in binary requires less space and the data is already in wire format, but at the moment there is no way to save relative domains in their binary form.¶
Relative labels can only appear in the end of a relative FQDN, like the zero octet only appears in the end of an absolute FQDN. [TODO: MOVE -->] Message compression is possible when also using the relative label, but because the relative label already gives the possibility to leave out the zone name, message compression will likely have less effect.¶
As described in [RFC1035], relative domain names are domain names that don't end with a dot.¶
When an absolute domain name like "www.example.com." is converted to binary, its hexadecimal representation would be: [03] 77 77 77 [07] 65 78 61 6D 70 6C 65 [03] 63 6F 6D [00]. The square brackets indicate the label lengths.¶
When converting a relative domain name like "www.subdomain" to binary, its hexadecimal representation becomes: [03] 77 77 77 [09] 73 75 62 64 6F 6D 61 69 6E [40]. The square brackets also indicate the labels lengths here, except for [40], which is the extended label type defined by this specification.¶
Relative domain names do not contain the zone they belong to. For the resource records, in order to be queried with the QUERY opcode or sorted for DNSSEC [RFC4033], at some moment the records should be converted to their canonical form. To be able to do that, the absolute form of the domain name should be known.¶
To retrieve the absolute domain name from a relative domain name, the containing zone MUST be known from context. In DNS UPDATE [RFC2136], the zone is sent in the zone section, which a renaming of the question section. When using binary zone files, the zone will likely be encoded in the file header or the file name.¶
On binary level, to get the absolute form of the domain name, the last byte of the relative domain name, 0x40, MUST be removed. Then, the binary form of the zone name MUST be appended. For example, [03] 77 77 77 [40] (www) and [07] 65 78 61 6D 70 6C 65 [03] 63 6F 6D [00] (example.com.), will become [03] 77 77 77 [07] 65 78 61 6D 70 6C 65 [03] 63 6F 6D [00] (www.example.com.).¶
Relative labels should be avoided in QUERY results, because clients MAY NOT support it. Also, for supporting clients, it is impossible know which zone the records belong to. For AXFR and IXFR, it is possible to know the zone, so using the relative label for those queries MAY be considered.¶
Implementation is OPTIONAL, so clients SHOULD NOT expect every server to support this feature. An indicator MAY BE added in the future for servers to indicate that they support relative labels and for which record types.¶
This document defines one Extended Label Type, termed the Relative Label, and requests registration of the code point 000000 binary in the space defined by [RFC2671].¶
All security considerations which apply to traditional ASCII DNS labels apply equally to binary labels. The canonicalization and sorting rules of section 3.3 allow these to be addressed by DNS Security [RFC4033].¶