<?xml version="1.0" encoding="utf-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.10 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC1034 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.1034.xml">
<!ENTITY RFC6891 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6891.xml">
<!ENTITY RFC2119 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
]>

<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>

<rfc ipr="trust200902" docName="draft-bellis-dnsop-edns-tags-00" category="std">

  <front>
    <title>DNS EDNS Tags</title>

    <author initials="R." surname="Bellis" fullname="Ray Bellis">
      <organization abbrev="ISC">Internet Systems Consortium, Inc.</organization>
      <address>
        <postal>
          <street>950 Charter Street</street>
          <city>Redwood City</city>
          <code>CA 94063</code>
          <country>USA</country>
        </postal>
        <phone>+1 650 423 1200</phone>
        <email>ray@isc.org</email>
      </address>
    </author>
    <author initials="A." surname="Clegg" fullname="Alan Clegg">
      <organization abbrev="ISC">Internet Systems Consortium, Inc.</organization>
      <address>
        <postal>
          <street>950 Charter Street</street>
          <city>Redwood City</city>
          <code>CA 94063</code>
          <country>USA</country>
        </postal>
        <phone>+1 650 423 1200</phone>
        <email>aclegg@isc.org</email>
      </address>
    </author>

    <date year="2019" month="March" day="04"/>

    <area>Internet</area>
    <workgroup>DNSOP Working Group</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>This document describes EDNS Tags, a mechanism by which DNS clients and
servers can transmit an opaque data field which has no defined semantic
meaning other than as previously agreed between the client and server.</t>



    </abstract>


  </front>

  <middle>


<section anchor="introduction" title="Introduction">

<t>This document describes EDNS Tags, a mechanism by which DNS clients and
servers <xref target="RFC1034"/> can transmit an opaque data field which has no
defined semantic meaning other than as previously agreed between the
client and server operators.</t>

<t>The tag is a single 16 bit field stored within the RDATA of an EDNS(0)
OPT RR as described in <xref target="RFC6891"/>.</t>

<t>Two EDNS options are defined to allow for the detection of servers that
incorrectly echo responses verbatim.  The EDNS-Client-Tag option may
only appear in client requests, and the EDNS-Server-Tag may only appear
in responses from servers.</t>

</section>
<section anchor="terminology" title="Terminology">

<t>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 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="description" title="Description">

<t>The values of the individual bits within a tag are not defined to have
any semantic meaning in this specification.  Their interpretation is
defined entirely by bi-lateral agreement between client and server
operators.  The definitions for EDNS-Client-Tag and EDNS-Server-Tag
values MAY be different.</t>

<t>Operators are free to partition the bits within that field as they see
fit; for example it could be used to transmit up to 16 separate boolean
flags, or perhaps to transmit a 10 bit numeric value combined a 2 bit
value and four boolean flags.</t>

<t>Possible use cases for EDNS-Client-Tags include:</t>

<t><list style="symbols">
  <t>client-controlled selection of a DNS-based security filter</t>
  <t>marking a packet passing through a proxy with transport-related information</t>
</list></t>

<t>Use cases for EDNS-Server-Tags are still to be determined. The option is
specified here for symmetry and in anticipation of new use cases being
discovered.</t>

<section anchor="packet-validation-rules" title=" Packet Validation Rules">

<t>The OPT RR in a DNS request packet (QR = 0) MUST NOT contain an
EDNS-Server-Tag option.  A request packet MUST NOT contain more
than one EDNS-Client-Tag option.</t>

<t>The OPT RR in a DNS response packet (QR = 1) MUST NOT contain an
EDNS-Client-Tag option.  A response packet MUST NOT contain more
than one EDNS-Server-Tag option.</t>

<t>An EDNS-Server-Tag option MUST NOT be sent unless the corresponding
client query contained an EDNS-Client-Tag option.</t>

</section>
<section anchor="error-handling" title=" Error Handling">

<t>Clients MUST discard any response packet that breaches any applicable
packet validation rule.</t>

<t>Servers MUST respond with a FORMERR in accordance with Section 7 of
<xref target="RFC6891"/> on receipt of a request that breaches any applicable packet
validation rule.</t>

</section>
<section anchor="wire" title="Wire Format">

<t>The format of the EDNS options are as follows, to be stored within the
RDATA of an OPT RR as specified in <xref target="RFC6891"/>:</t>

<section anchor="edns-client-tag" title="EDNS-Client-Tag">

<figure><artwork><![CDATA[
                +0 (MSB)                            +1 (LSB)
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0: |                       OPTION-CODE (TBD1)                      |
   +---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+
2: |                       OPTION-LENGTH (2)                       |
   +---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+
4: |                        CLIENT-TAG-DATA                        |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
]]></artwork></figure>

<t>OPTION-CODE: The option code identifier (TBD1).</t>

<t>OPTION-LENGTH: Size (in octets) of OPTION-DATA.  MUST be 2.</t>

<t>CLIENT-TAG-DATA: The tag field sent from client to server.</t>

</section>
<section anchor="edns-server-tag" title="EDNS-Server-Tag">

<figure><artwork><![CDATA[
                +0 (MSB)                            +1 (LSB)
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0: |                       OPTION-CODE (TBD2)                      |
   +---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+
2: |                       OPTION-LENGTH (2)                       |
   +---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+
4: |                        SERVER-TAG-DATA                        |
   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
]]></artwork></figure>

<t>OPTION-CODE: The option code identifier (TBD2).</t>

<t>OPTION-LENGTH: Size (in octets) of OPTION-DATA.  MUST be 2.</t>

<t>SERVER-TAG-DATA: The tag field sent from server to client.</t>

</section>
</section>
</section>
<section anchor="security" title="Security Considerations">

<t>Client tags are under the control of the client software and as such
(and in the absence of any other mechanism to authenticate the client’s
identity) this mechanism is not appropriate for applications where the
DNS server operator wishes to contractually differentiate service based
on the presence (or absence) of any particular tag.</t>

</section>
<section anchor="impstatus" title="Implementation status">

<t>TBC.</t>

</section>
<section anchor="privacy" title="Privacy Considerations">

<t>Tags are opaque fields that encode only a limited amount of information.
The size of the data field in this specification is chosen to offer a
compromise between offering sufficient content to be technically useful
while also limiting the scope for it to be used to transmit Personally
Identifiable Information.</t>

</section>
<section anchor="iana-considerations" title="IANA Considerations">

<t>IANA has assigned the following EDNS(0) Option Codes:</t>

<figure><artwork><![CDATA[
Value    Name                  Status         Reference
----------------------------------------------------------
TBD1     EDNS-Client-Tag       Standard       RFCXXXX
TBD2     EDNS-Server-Tag       Standard       RFCXXXX
]]></artwork></figure>

<t>« Note to IANA - please assign an even value to TBD1, and the next
consecutive odd value to TBD2.  This allows the least-significant
bit of the option value to be compared against the packet’s QR bit »</t>

</section>
<section anchor="acknowledgements" title="Acknowledgements">

<t>The authors wish to particularly thank Brian Conry, Peter van Dijk and
Matthijs Mekking for early review and feedback on this document.</t>

</section>


  </middle>

  <back>

    <references title='Normative References'>

&RFC1034;
&RFC6891;
&RFC2119;
&RFC8174;


    </references>




  </back>

<!-- ##markdown-source:
H4sIAGZNfVwAA+VZ3XIbtxW+x1OcWheRxl4OKbuOzaaZUpRsa0Z/IWWnvQR3
QRHR7oJZYEWztt6lz9In63cOdkmatJw0zkUz5YxM7gI4P9/5h5MkUcGG3PTp
+GJMJ/zPtb7xKnNpqQu8zio9DcnE5Ln1SVZ6N08MvpKAXUm3q5SdV30KVe3D
Ybf7snuodGV0n07LYKrSBLW4EdqXV/Sjq25teUOvK1fP1e1ivSk5Zi4q1aFP
PmRKpS7Dzj7VYZq8UHPbV0QJBZfKt18WlZn6+NtVQR6UrsPMVbITf0S29H0a
dehIZJdXUaWRXm6+dNXNWhIaL30whaehK5m0rYsnWEw7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