<?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-01" 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>
    <author initials="P." surname="van Dijk" fullname="Peter van Dijk">
      <organization abbrev="PowerDNS">PowerDNS.COM B.V.</organization>
      <address>
        <postal>
          <street></street>
          <city>Den Haag</city>
          <code></code>
          <country>The Netherlands</country>
        </postal>
        <phone></phone>
        <email>peter.van.dijk@powerdns.com</email>
      </address>
    </author>

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

    <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 out-of-band bilateral agreement between client and
server operators.</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>The intended mode of operation is that the value of a bit (or range of
bits) could be tested in access control lists or any other such policy
control mechanism.</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.  The semantic definitions for EDNS-Client-Tag and
EDNS-Server-Tag values MAY be different; they need not be symmetrical.</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 interpretation of the tag’s value.</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:
H4sIADjemFwAA+VZ3XIbtxW+x1Og9oXliZcjyq4Ts2kmFCXbmtFfSNlpL8Fd
kES0u9gCWNGs43fps/TJ+p0DLElRUuLGuWimnJHJXQDn5zv/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