<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.17 (Ruby 3.1.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-lenders-dns-cbor-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.15.1 -->
  <front>
    <title abbrev="dns+cbor">A Concise Binary Object Representation (CBOR) of DNS Messages</title>
    <seriesInfo name="Internet-Draft" value="draft-lenders-dns-cbor-00"/>
    <author fullname="Martine Sophie Lenders">
      <organization abbrev="FU Berlin">Freie Universität Berlin</organization>
      <address>
        <email>m.lenders@fu-berlin.de</email>
      </address>
    </author>
    <author fullname="Thomas C. Schmidt">
      <organization>HAW Hamburg</organization>
      <address>
        <email>t.schmidt@haw-hamburg.de</email>
      </address>
    </author>
    <author fullname="Matthias Wählisch">
      <organization abbrev="FU Berlin">Freie Universität Berlin</organization>
      <address>
        <email>m.waehlisch@fu-berlin.de</email>
      </address>
    </author>
    <date year="2022" month="October" day="18"/>
    <area>Applications</area>
    <workgroup>CBOR</workgroup>
    <keyword>Internet-Draft</keyword>
    <keyword>CBOR</keyword>
    <keyword>DNS</keyword>
    <abstract>
      <t>This document specifies a compressed data format of DNS messages using
the Concise Binary Object Representation <xref target="RFC7049"/>.
The primary purpose is to keep DNS messages small in constrained networks.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://anr-bmbf-pivot.github.io/draft-lenders-dns-cbor/draft-lenders-dns-cbor.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-lenders-dns-cbor/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        CBOR Working Group mailing list (<eref target="mailto:cbor@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/cbor/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/cbor/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/anr-bmbf-pivot/draft-lenders-dns-cbor"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>In constrained networks <xref target="RFC7228"/>, the link layer may restrict the payload sizes to
only a few hundreds bytes.  Encrypted DNS resolution, such as DNS over HTTPS (DoH) <xref target="RFC8484"/> or
DNS over CoAP (DoC) <xref target="I-D.ietf-core-dns-over-coap"/>, may lead to DNS message sizes that exceed this limit, even when
implementing header compression such as 6LoWPAN IPHC <xref target="RFC6282"/> or SCHC <xref target="RFC8724"/>,
<xref target="RFC8824"/>.</t>
      <t>Although adoption layers such as 6LoWPAN <xref target="RFC4944"/> or SCHC <xref target="RFC8724"/> offer fragmentation to
comply with small MTUs, fragmentation should be avoided in constrained networks, because
fragmentation combined with high packet loss multiplies the loss.  As such, a compression
format for DNS messages is needed.</t>
      <t>This document specifies a compressed data format for DNS messages.  DNS messages are encoded in
Concise Binary Object Representation (CBOR) <xref target="RFC7049"/> and, additionally, unnecessary or
redundant information is removed.  To use the outcome of this specification in DoH and DoC,
this document also specifies a Media Type header for DoH and a Content-Format option for DoC.</t>
    </section>
    <section anchor="terminology">
      <name>Terminology</name>
      <t>CBOR types (unsigned integer, byte string, text string, arrays, etc.) are used as defined in
<xref target="RFC7049"/>.</t>
      <t>A DNS query is a message that queries DNS information from an upstream DNS resolver.</t>
      <t>The term "constrained networks" is used as defined in <xref target="RFC7228"/>.</t>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
    </section>
    <section anchor="cbor-representations-applicationdnscbor">
      <name>CBOR Representations (application/dns+cbor)</name>
      <t>To keep overhead minimal, a DNS message is represented as CBOR arrays.  All CBOR items used in
this specification are of definite length.  CBOR arrays that do not follow the length
definitions of this or follow-up specifications, <bcp14>MUST</bcp14> be silently ignored.  It is assumed that
DNS query and DNS response are distinguished message types and that the query can be mapped to
the response by the transport protocol of choice.  To define the representation of binary
objects we use the Concise Data Definition Language (CDDL) <xref target="RFC8610"/>.</t>
      <section anchor="sec_domain-names">
        <name>Domain Name Representation</name>
        <t>Domain names are represented in their commonly known string format (e.g., "example.org", see Section
2.3.1 in <xref target="RFC1035"/>) and in IDNA encoding <xref target="RFC5890"/> as a text string. For the purpose of this
document, domain names remain case-insensitive as specified in <xref target="RFC1035"/>.</t>
        <t>The representation of a domain name is defined in <xref target="fig_domain-name"/>.</t>
        <figure anchor="fig_domain-name">
          <name>Domain Name Definition</name>
          <artwork type="CDDL" align="center"><![CDATA[
domain-name = tstr .regexp "([^\.]+\.)*[^\.]+"
]]></artwork>
        </figure>
      </section>
      <section anchor="sec_queries">
        <name>DNS Queries</name>
        <t>DNS queries are encoded as CBOR arrays containing up to 3 entries in the following order:  The
name (as text string, see <xref target="sec_domain-names"/>), an optional record type (as unsigned integer),
and an optional record class (as unsigned integer).</t>
        <t>If the record type is elided, record type <tt>AAAA</tt> as specified in <xref target="RFC3596"/> is assumed.
If the record class is elided, record class <tt>IN</tt> as specified in <xref target="RFC1035"/> is assumed.
If a record class is required, the record type <bcp14>MUST</bcp14> also be provided.</t>
        <t>The representation of a DNS query is defined in <xref target="fig_dns-query"/>.</t>
        <figure anchor="fig_dns-query">
          <name>DNS Query Definition</name>
          <artwork type="CDDLx" align="center"><![CDATA[
type-spec = (
  record-type: uint,
  ? record-class: uint,
)
dns-question = (
  name: domain-name,
  ? type: type-spec,
)
dns-query = [dns-question]
]]></artwork>
        </figure>
      </section>
      <section anchor="sec_rr">
        <name>Standard DNS Resource Records (RRs)</name>
        <t>DNS resource records are encoded as CBOR arrays containing 2 to 5 entries in the following
order: An optional name (as text string, see <xref target="sec_domain-names"/>), a TTL (as unsigned
integer), an optional record type (as unsigned integer), an optional record class (as unsigned
integer), and lastly a record data entry (as byte string or text string).</t>
        <t>If the first element of the resource record is a string, the first element is a name.  If the
name is elided, the name from the query, either derived from transport context or the provided
question section, see <xref target="sec_responses"/>, is assumed.  If the record type is elided, the record
type from the question is assumed. If record class is elided, the record class from the
question is assumed. If a record class is required, the record type <bcp14>MUST</bcp14> also be provided.</t>
        <t>The byte format of the record data follows the wire format as specified in Section 3.3 <xref target="RFC1035"/>
(or other specifications of the respective record type).  Note that this format does not
include the RDLENGTH field from <xref target="RFC1035"/> as this value is encoded in the length field of the
CBOR byte string.</t>
        <t>If and only if the record data represents a domain name (e.g., for CNAME or PTR records), the
record data <bcp14>MAY</bcp14> be represented as a text string as specified in <xref target="sec_domain-names"/>.  This can
save 1 bytes of data, because the byte representation of DNS names requires both an additional
byte to define the length of the first name component as well as a 0 byte at the end of the
name. With CBOR on the other hand only 1 byte is required to define type and length of the text
string.</t>
        <t>The representation of a DNS resource records is defined in <xref target="fig_dns-rr"/>.</t>
        <figure anchor="fig_dns-rr">
          <name>DNS Resource Record Definition</name>
          <artwork type="CDDL" align="center"><![CDATA[
rr = (
  ? name: domain-name,
  ttl: uint,
  ? type: record-type,
  rdata: bstr / domain-name,
)
dns-rr = [rr]
]]></artwork>
        </figure>
      </section>
      <section anchor="sec_responses">
        <name>DNS Responses</name>
        <t>DNS responses are encoded as array of CBOR arrays containing up to 4 entries.</t>
        <t>If only 1 array is included, then this is the DNS answer section represented as an array of one
or more DNS Resource Records (see <xref target="sec_rr"/>).</t>
        <t>If 2 arrays are included, then the first entry is a question section and the second entry is
an answer section. The question section is encoded like a DNS query as specified in
<xref target="sec_queries"/>, the answer section is represented as an array of one or more DNS Resource
Records (see <xref target="sec_rr"/>).</t>
        <t>If 3 arrays are included, then the first section is a question section, the second an answer
section, and the third an additional section (TBD: back choice to favor additional section by
empirical data). Again, the question section is encoded like a DNS query as specified in
<xref target="sec_queries"/> and both answer and additional sections are represented each as an array of one
or more DNS Resource Records (see <xref target="sec_rr"/>).</t>
        <t>If 4 arrays are included, then the first section is a question section, the second an answer
section, the third an authority section, and the fourth an additional section (TBD: back by
empirical data). They follow the specification of 3 arrays in the answer. The authority section is
also represented as an array of one or more DNS Resource Records (see <xref target="sec_rr"/>).</t>
        <figure anchor="fig_dns-response">
          <name>DNS Response Definition</name>
          <artwork type="CDDL" align="center"><![CDATA[
extra-sections = (
  ? authority: [1* dns-rr],
  additional: [1* dns-rr],
)
sections = (
  answer: [1* dns-rr],
) // (
  question: dns-query,
  answer: [1* dns-rr],
  ? extra: extra-sections,
)
dns-response = [sections]
]]></artwork>
        </figure>
      </section>
      <section anchor="edns0">
        <name>EDNS(0)</name>
        <t>TBD, do we need special formatting here?</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>TODO Security</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <section anchor="media-type">
        <name>Media Type Registration</name>
        <t>This document registers the media type for the serialization format of DNS messages in CBOR. It
follows the procedures specified in <xref target="RFC6838"/>.</t>
        <t>Type name: application</t>
        <t>Subtype name: dns+cbor</t>
        <t>Required parameters: None</t>
        <t>Optional parameters: None</t>
        <t>Encoding considerations: Must be encoded as using <xref target="RFC7049"/>. See [TBD-this-spec] for details.</t>
        <t>Security considerations: See <xref target="security-considerations"/> of this draft</t>
        <t>Interoperability considerations: TBD</t>
        <t>Published specification: [TBD-this-spec]</t>
        <t>Applications that use this media type: TBD DNS over X systems</t>
        <t>Fragment Identifier Considerations: TBD</t>
        <t>Additional information:</t>
        <t>   Deprecated alias names for this type: N/A</t>
        <t>   Magic number(s): N/A</t>
        <t>   File extension(s): dnsc</t>
        <t>   Macintosh file type code(s): none</t>
        <t>Person &amp; email address to contact for further information:
   Martine S. Lenders <eref target="mailto:m.lenders@fu-berlin.de">m.lenders@fu-berlin.de</eref></t>
        <t>Intended usage: COMMON</t>
        <t>Restrictions on Usage: None?</t>
        <t>Author: Martine S. Lenders <eref target="mailto:m.lenders@fu-berlin.de">m.lenders@fu-berlin.de</eref></t>
        <t>Change controller: Martine S. Lenders <eref target="mailto:m.lenders@fu-berlin.de">m.lenders@fu-berlin.de</eref></t>
        <t>Provisional registrations? No</t>
      </section>
      <section anchor="coap-content-format-registration">
        <name>CoAP Content-Format Registration</name>
        <t>IANA is requested to assign CoAP Content-Format ID for the DNS message media
type in the "CoAP Content-Formats" sub-registry, within the "CoRE Parameters"
registry <xref target="RFC7252"/>, corresponding the "application/dns+cbor" Media Type specified in
<xref target="media-type"/>:</t>
        <t>Media-Type: application/dns+cbor</t>
        <t>Encoding: -</t>
        <t>Id: TBD</t>
        <t>Reference: [TBD-this-spec]</t>
      </section>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC1035">
          <front>
            <title>Domain names - implementation and specification</title>
            <author fullname="P. Mockapetris" initials="P." surname="Mockapetris">
              <organization/>
            </author>
            <date month="November" year="1987"/>
            <abstract>
              <t>This RFC is the revised specification of the protocol and format used in the implementation of the Domain Name System.  It obsoletes RFC-883. This memo documents the details of the domain name client - server communication.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="13"/>
          <seriesInfo name="RFC" value="1035"/>
          <seriesInfo name="DOI" value="10.17487/RFC1035"/>
        </reference>
        <reference anchor="RFC3596">
          <front>
            <title>DNS Extensions to Support IP Version 6</title>
            <author fullname="S. Thomson" initials="S." surname="Thomson">
              <organization/>
            </author>
            <author fullname="C. Huitema" initials="C." surname="Huitema">
              <organization/>
            </author>
            <author fullname="V. Ksinant" initials="V." surname="Ksinant">
              <organization/>
            </author>
            <author fullname="M. Souissi" initials="M." surname="Souissi">
              <organization/>
            </author>
            <date month="October" year="2003"/>
            <abstract>
              <t>This document defines the changes that need to be made to the Domain Name System (DNS) to support hosts running IP version 6 (IPv6).  The changes include a resource record type to store an IPv6 address, a domain to support lookups based on an IPv6 address, and updated definitions of existing query types that return Internet addresses as part of additional section processing.  The extensions are designed to be compatible with existing applications and, in particular, DNS implementations themselves.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="88"/>
          <seriesInfo name="RFC" value="3596"/>
          <seriesInfo name="DOI" value="10.17487/RFC3596"/>
        </reference>
        <reference anchor="RFC7049">
          <front>
            <title>Concise Binary Object Representation (CBOR)</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann">
              <organization/>
            </author>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman">
              <organization/>
            </author>
            <date month="October" year="2013"/>
            <abstract>
              <t>The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation.  These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7049"/>
          <seriesInfo name="DOI" value="10.17487/RFC7049"/>
        </reference>
        <reference anchor="RFC8610">
          <front>
            <title>Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures</title>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz">
              <organization/>
            </author>
            <author fullname="C. Vigano" initials="C." surname="Vigano">
              <organization/>
            </author>
            <author fullname="C. Bormann" initials="C." surname="Bormann">
              <organization/>
            </author>
            <date month="June" year="2019"/>
            <abstract>
              <t>This document proposes a notational convention to express Concise Binary Object Representation (CBOR) data structures (RFC 7049).  Its main goal is to provide an easy and unambiguous way to express structures for protocol messages and data formats that use CBOR or JSON.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8610"/>
          <seriesInfo name="DOI" value="10.17487/RFC8610"/>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner">
              <organization/>
            </author>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba">
              <organization/>
            </author>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC5890">
          <front>
            <title>Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework</title>
            <author fullname="J. Klensin" initials="J." surname="Klensin">
              <organization/>
            </author>
            <date month="August" year="2010"/>
            <abstract>
              <t>This document is one of a collection that, together, describe the protocol and usage context for a revision of Internationalized Domain Names for Applications (IDNA), superseding the earlier version.  It describes the document collection and provides definitions and other material that are common to the set.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5890"/>
          <seriesInfo name="DOI" value="10.17487/RFC5890"/>
        </reference>
        <reference anchor="RFC6838">
          <front>
            <title>Media Type Specifications and Registration Procedures</title>
            <author fullname="N. Freed" initials="N." surname="Freed">
              <organization/>
            </author>
            <author fullname="J. Klensin" initials="J." surname="Klensin">
              <organization/>
            </author>
            <author fullname="T. Hansen" initials="T." surname="Hansen">
              <organization/>
            </author>
            <date month="January" year="2013"/>
            <abstract>
              <t>This document defines procedures for the specification and registration of media types for use in HTTP, MIME, and other Internet protocols.  This memo documents an Internet Best Current Practice.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="13"/>
          <seriesInfo name="RFC" value="6838"/>
          <seriesInfo name="DOI" value="10.17487/RFC6838"/>
        </reference>
        <reference anchor="RFC7252">
          <front>
            <title>The Constrained Application Protocol (CoAP)</title>
            <author fullname="Z. Shelby" initials="Z." surname="Shelby">
              <organization/>
            </author>
            <author fullname="K. Hartke" initials="K." surname="Hartke">
              <organization/>
            </author>
            <author fullname="C. Bormann" initials="C." surname="Bormann">
              <organization/>
            </author>
            <date month="June" year="2014"/>
            <abstract>
              <t>The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained (e.g., low-power, lossy) networks.  The nodes often have 8-bit microcontrollers with small amounts of ROM and RAM, while constrained networks such as IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs) often have high packet error rates and a typical throughput of 10s of kbit/s.  The protocol is designed for machine- to-machine (M2M) applications such as smart energy and building automation.</t>
              <t>CoAP provides a request/response interaction model between application endpoints, supports built-in discovery of services and resources, and includes key concepts of the Web such as URIs and Internet media types.  CoAP is designed to easily interface with HTTP for integration with the Web while meeting specialized requirements such as multicast support, very low overhead, and simplicity for constrained environments.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7252"/>
          <seriesInfo name="DOI" value="10.17487/RFC7252"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC4944">
          <front>
            <title>Transmission of IPv6 Packets over IEEE 802.15.4 Networks</title>
            <author fullname="G. Montenegro" initials="G." surname="Montenegro">
              <organization/>
            </author>
            <author fullname="N. Kushalnagar" initials="N." surname="Kushalnagar">
              <organization/>
            </author>
            <author fullname="J. Hui" initials="J." surname="Hui">
              <organization/>
            </author>
            <author fullname="D. Culler" initials="D." surname="Culler">
              <organization/>
            </author>
            <date month="September" year="2007"/>
            <abstract>
              <t>This document describes the frame format for transmission of IPv6 packets and the method of forming IPv6 link-local addresses and statelessly autoconfigured addresses on IEEE 802.15.4 networks. Additional specifications include a simple header compression scheme using shared context and provisions for packet delivery in IEEE 802.15.4 meshes.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4944"/>
          <seriesInfo name="DOI" value="10.17487/RFC4944"/>
        </reference>
        <reference anchor="RFC6282">
          <front>
            <title>Compression Format for IPv6 Datagrams over IEEE 802.15.4-Based Networks</title>
            <author fullname="J. Hui" initials="J." role="editor" surname="Hui">
              <organization/>
            </author>
            <author fullname="P. Thubert" initials="P." surname="Thubert">
              <organization/>
            </author>
            <date month="September" year="2011"/>
            <abstract>
              <t>This document updates RFC 4944, "Transmission of IPv6 Packets over IEEE 802.15.4 Networks".  This document specifies an IPv6 header compression format for IPv6 packet delivery in Low Power Wireless Personal Area Networks (6LoWPANs).  The compression format relies on shared context to allow compression of arbitrary prefixes.  How the information is maintained in that shared context is out of scope. This document specifies compression of multicast addresses and a framework for compressing next headers.  UDP header compression is specified within this framework.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6282"/>
          <seriesInfo name="DOI" value="10.17487/RFC6282"/>
        </reference>
        <reference anchor="RFC7228">
          <front>
            <title>Terminology for Constrained-Node Networks</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann">
              <organization/>
            </author>
            <author fullname="M. Ersue" initials="M." surname="Ersue">
              <organization/>
            </author>
            <author fullname="A. Keranen" initials="A." surname="Keranen">
              <organization/>
            </author>
            <date month="May" year="2014"/>
            <abstract>
              <t>The Internet Protocol Suite is increasingly used on small devices with severe constraints on power, memory, and processing resources, creating constrained-node networks.  This document provides a number of basic terms that have been useful in the standardization work for constrained-node networks.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7228"/>
          <seriesInfo name="DOI" value="10.17487/RFC7228"/>
        </reference>
        <reference anchor="RFC8484">
          <front>
            <title>DNS Queries over HTTPS (DoH)</title>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman">
              <organization/>
            </author>
            <author fullname="P. McManus" initials="P." surname="McManus">
              <organization/>
            </author>
            <date month="October" year="2018"/>
            <abstract>
              <t>This document defines a protocol for sending DNS queries and getting DNS responses over HTTPS.  Each DNS query-response pair is mapped into an HTTP exchange.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8484"/>
          <seriesInfo name="DOI" value="10.17487/RFC8484"/>
        </reference>
        <reference anchor="RFC8724">
          <front>
            <title>SCHC: Generic Framework for Static Context Header Compression and Fragmentation</title>
            <author fullname="A. Minaburo" initials="A." surname="Minaburo">
              <organization/>
            </author>
            <author fullname="L. Toutain" initials="L." surname="Toutain">
              <organization/>
            </author>
            <author fullname="C. Gomez" initials="C." surname="Gomez">
              <organization/>
            </author>
            <author fullname="D. Barthel" initials="D." surname="Barthel">
              <organization/>
            </author>
            <author fullname="JC. Zuniga" initials="JC." surname="Zuniga">
              <organization/>
            </author>
            <date month="April" year="2020"/>
            <abstract>
              <t>This document defines the Static Context Header Compression and fragmentation (SCHC) framework, which provides both a header compression mechanism and an optional fragmentation mechanism. SCHC has been designed with Low-Power Wide Area Networks (LPWANs) in mind.</t>
              <t>SCHC compression is based on a common static context stored both in the LPWAN device and in the network infrastructure side. This document defines a generic header compression mechanism and its application to compress IPv6/UDP headers.</t>
              <t>This document also specifies an optional fragmentation and reassembly mechanism. It can be used to support the IPv6 MTU requirement over the LPWAN technologies. Fragmentation is needed for IPv6 datagrams that, after SCHC compression or when such compression was not possible, still exceed the Layer 2 maximum payload size.</t>
              <t>The SCHC header compression and fragmentation mechanisms are independent of the specific LPWAN technology over which they are used. This document defines generic functionalities and offers flexibility with regard to parameter settings and mechanism choices. This document standardizes the exchange over the LPWAN between two SCHC entities. Settings and choices specific to a technology or a product are expected to be grouped into profiles, which are specified in other documents. Data models for the context and profiles are out of scope.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8724"/>
          <seriesInfo name="DOI" value="10.17487/RFC8724"/>
        </reference>
        <reference anchor="RFC8824">
          <front>
            <title>Static Context Header Compression (SCHC) for the Constrained Application Protocol (CoAP)</title>
            <author fullname="A. Minaburo" initials="A." surname="Minaburo">
              <organization/>
            </author>
            <author fullname="L. Toutain" initials="L." surname="Toutain">
              <organization/>
            </author>
            <author fullname="R. Andreasen" initials="R." surname="Andreasen">
              <organization/>
            </author>
            <date month="June" year="2021"/>
            <abstract>
              <t>This document defines how to compress Constrained Application Protocol (CoAP) headers using the Static Context Header Compression and fragmentation (SCHC) framework. SCHC defines a header compression mechanism adapted for Constrained Devices. SCHC uses a static description of the header to reduce the header's redundancy and size. While RFC 8724 describes the SCHC compression and fragmentation framework, and its application for IPv6/UDP headers, this document applies SCHC to CoAP headers. The CoAP header structure differs from IPv6 and UDP, since CoAP uses a flexible header with a variable number of options, themselves of variable length. The CoAP message format is asymmetric: the request messages have a header format different from the format in the response messages. This specification gives guidance on applying SCHC to flexible headers and how to leverage the asymmetry for more efficient compression Rules.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8824"/>
          <seriesInfo name="DOI" value="10.17487/RFC8824"/>
        </reference>
        <reference anchor="I-D.ietf-core-dns-over-coap">
          <front>
            <title>DNS over CoAP (DoC)</title>
            <author fullname="Martine Sophie Lenders" initials="M. S." surname="Lenders">
              <organization>Freie Universität Berlin</organization>
            </author>
            <author fullname="Christian Amsüss" initials="C." surname="Amsüss">
         </author>
            <author fullname="Cenk Gündoğan" initials="C." surname="Gündoğan">
              <organization>HAW Hamburg</organization>
            </author>
            <author fullname="Thomas C. Schmidt" initials="T. C." surname="Schmidt">
              <organization>HAW Hamburg</organization>
            </author>
            <author fullname="Matthias Wählisch" initials="M." surname="Wählisch">
              <organization>Freie Universität Berlin</organization>
            </author>
            <date day="5" month="September" year="2022"/>
            <abstract>
              <t>   This document defines a protocol for sending DNS messages over the
   Constrained Application Protocol (CoAP).  These CoAP messages are
   protected by DTLS-Secured CoAP (CoAPS) or Object Security for
   Constrained RESTful Environments (OSCORE) to provide encrypted DNS
   message exchange for constrained devices in the Internet of Things
   (IoT).

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-core-dns-over-coap-00"/>
        </reference>
      </references>
    </references>
    <section anchor="examples">
      <name>Examples</name>
      <section anchor="sec_query-examples">
        <name>DNS Queries</name>
        <t>A DNS query of the record <tt>AAAA</tt> in class <tt>IN</tt> for name "example.org" is
represented in CBOR extended diagnostic notation (EDN) (see Section 8 in
<xref target="RFC7049"/> and Appendix G in <xref target="RFC8610"/>) as follows:</t>
        <artwork><![CDATA[
["example.org"]
]]></artwork>
        <t>A query of an <tt>A</tt> record for the same name is represented as</t>
        <artwork><![CDATA[
["example.org", 1]
]]></artwork>
        <t>A query of <tt>ANY</tt> record for that name is represented as</t>
        <artwork><![CDATA[
["example.org", 255, 255]
]]></artwork>
      </section>
      <section anchor="sec_response-examples">
        <name>DNS Responses</name>
        <t>The responses to the examples provided in <xref target="sec_query-examples"/> are shown
below. We use the CBOR extended diagnostic notation (EDN) (see Section 8 in
<xref target="RFC7049"/> and Appendix G in <xref target="RFC8610"/>).</t>
        <t>To represent an <tt>AAAA</tt> record with TTL 300 seconds for the IPv6 address 2001:db8::1, a minimal
response to <tt>["example.org"]</tt> could be</t>
        <artwork><![CDATA[
[[[300, h'20010db8000000000000000000000001']]]
]]></artwork>
        <t>In this case, the name is derived from the query.</t>
        <t>If the name or the context is required, the following response would also
be valid:</t>
        <artwork><![CDATA[
[[["example.org", 300, h'20010db8000000000000000000000001']]]
]]></artwork>
        <t>If the query can not be mapped to the response for some reason, a response
would look like:</t>
        <artwork><![CDATA[
[["example.org"], [[300, h'20010db8000000000000000000000001']]]
]]></artwork>
        <t>To represent a minimal response of an <tt>A</tt> record with TTL 3600 seconds for the IPv4 address
192.0.2.1, a minimal response to <tt>["example.org", 1]</tt> could be</t>
        <artwork><![CDATA[
[[300, h'c0000201']]
]]></artwork>
        <t>Note that here also the 1 of record type <tt>A</tt> can be elided, as this record
type is specified in the question section.</t>
        <t>Lastly, a response to <tt>["example.org", 255, 255]</tt> could be</t>
        <artwork><![CDATA[
[
  ["example.org", 255, 255],
  [[3600, 12, "coap._udp.local"]],
  [
    [3600, 2, "ns1.example.org"],
    [3600, 2, "ns2.example.org"],
  ],
  [
    [
      "_coap._udp.local", 3600, 28,
      h'20010db8000000000000000000000001'
    ],
    [
      "_coap._udp.local", 3600, 28,
      h'20010db8000000000000000000000002'
    ],
    [
      "ns1.example.org", 3600, 28,
      h'20010db8000000000000000000000035'
    ],
    [
      "ns2.example.org", 3600, 28,
      h'20010db8000000000000000000003535'
    ]
  ]
]
]]></artwork>
        <t>This one advertises two local CoAP servers (identified by service name <tt>_coap._udp.local</tt>) at
2001:db8::1 and 2001:db8::2 and two nameservers for the example.org domain, ns1.example.org at
2001:db8::35 and ns2.example.org at 2001.db8::3535. Each of the transmitted records has a TTL of
3600 seconds.</t>
      </section>
    </section>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA7Va63LbyJX+30/RS1cl0oSEJEryyNw4M7Qoj1WlWyS5nCmN
NgKBJokIBJhuQDLj0jzL/siTbF4s3zndAHGhHHt2xj8sotF9+vS5fOfS6PV6
IouyWA1kZygP0ySIjJJvosTXS3k+/psKMnmpFloZlWR+FqWJ3Dh8c365KdOJ
HJ1dyVNljD9VpiP88VirB9AJE/OHYJzqjgj8TE1TvRxIk4VChGmQ+HNsFWp/
kvVilYRKmx7m92h+b3tbJPl8rPRAhFg5EEGaYF+Tm4HMdK4EqO8Kk4/nkTFg
JVsuQOz46Pqt8LXy6QiLRRwFzCc4ekz1/VSn+WIgiWdxr5YYCgdC9uRxkimd
qKw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