Network Working Group B.J. van Hartingsveldt Internet-Draft Yocto Intended status: Informational 26 July 2024 Expires: 27 January 2025 Relative Labels in the Domain Name System draft-yocto-dns-relative-label-02 Abstract This document defines a new DNS Label Type using the Extension Mechanisms for DNS to indicate when a relative domain name is used. Status of This Memo 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 27 January 2025. Copyright Notice 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. van Hartingsveldt Expires 27 January 2025 [Page 1] Internet-Draft DNS Relative Labels July 2024 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 3. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . 2 4. Label Format . . . . . . . . . . . . . . . . . . . . . . . . 3 4.1. Wire format . . . . . . . . . . . . . . . . . . . . . . . 3 4.2. Representation format . . . . . . . . . . . . . . . . . . 3 4.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 3 5. Canonical Representation . . . . . . . . . . . . . . . . . . 3 6. Implementation . . . . . . . . . . . . . . . . . . . . . . . 4 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 8. Security Considerations . . . . . . . . . . . . . . . . . . . 4 9. Normative References . . . . . . . . . . . . . . . . . . . . 4 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 5 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction 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."). 2. Terminology 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]. 3. Motivation 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 resource 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. van Hartingsveldt Expires 27 January 2025 [Page 2] Internet-Draft DNS Relative Labels July 2024 4. Label Format 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. 4.1. Wire format 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ |0 1| ELT | +-+-+-+-+-+-+-+-+ Figure 1 ELT 000000 binary, the six-bit extended label type [RFC6891] assigned to the Relative Label. 4.2. Representation format As described in [RFC1035], relative domain names are domain names that don't end with a dot. 4.3. Examples 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. 5. Canonical Representation 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. van Hartingsveldt Expires 27 January 2025 [Page 3] Internet-Draft DNS Relative Labels July 2024 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 resource 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. 6. Implementation 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 resource record types. 7. IANA Considerations 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 [RFC6891]. 8. Security Considerations 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]. 9. Normative References [RFC1035] Mockapetris, P., "Domain names - implementation and specification", RFC 1035, DOI 10.17487/RFC1035, November 1987, . van Hartingsveldt Expires 27 January 2025 [Page 4] Internet-Draft DNS Relative Labels July 2024 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC2136] Vixie, P., "Dynamic Updates in the Domain Name System (DNS UPDATE)", RFC 2136, DOI 10.17487/RFC2136, April 1997, . [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, "DNS Security Introduction and Requirements", RFC 4033, DOI 10.17487/RFC4033, March 2005, . [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms for DNS (EDNS(0))", RFC 6891, DOI 10.17487/6891, April 2013, . Appendix A. Acknowledgements The author gratefully acknowledges the contributions and feedback of Alexander Robohm, Edward Lewis, Joe Abley, Mukund Sivaraman, Ondřej Surý, Tim Wicinski, Peter Thomassen, and Marco Davids. As well as all of those in the IETF community and on GitHub to who contributed to the discussions that resulted in this document. Author's Address B.J. van Hartingsveldt Yocto Email: ben.vanhartingsveldt@yocto.com van Hartingsveldt Expires 27 January 2025 [Page 5]