Internet-Draft DNS Relative Labels July 2024
van Hartingsveldt Expires 27 January 2025 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-yocto-dns-relative-label-02
Published:
Intended Status:
Informational
Expires:
Author:
B.J. van Hartingsveldt
Yocto

Relative Labels in the Domain Name System

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.

Table of Contents

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.

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.

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, , <https://www.rfc-editor.org/rfc/rfc1035>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC2136]
Vixie, P., "Dynamic Updates in the Domain Name System (DNS UPDATE)", RFC 2136, DOI 10.17487/RFC2136, , <https://www.rfc-editor.org/rfc/rfc2136>.
[RFC4033]
Arends, R., Austein, R., Larson, M., Massey, D., and S. Rose, "DNS Security Introduction and Requirements", RFC 4033, DOI 10.17487/RFC4033, , <https://www.rfc-editor.org/rfc/rfc4033>.
[RFC6891]
Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms for DNS (EDNS(0))", RFC 6891, DOI 10.17487/6891, , <https://www.rfc-editor.org/rfc/rfc6891>.

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