<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC1035 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.1035.xml">
<!ENTITY RFC6891 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6891.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="no" ?>
<?rfc subcompact="no" ?>
<rfc category="info" docName="draft-salgado-dnsop-rrserial-00" ipr="trust200902">

  <front>
    <title abbrev="The RRSERIAL EDNS option">The "RRSERIAL" EDNS option for the SOA serial of a RR's zone</title>

    <author fullname="Hugo Salgado" initials="H.S." surname="Salgado">
      <organization>NIC Chile</organization>
      <address>
        <postal>
          <street>Miraflores 222, piso 14</street>
          <city>Santiago</city>
          <code>CP 8320198</code>
          <country>CL</country>
        </postal>
        <phone>+56 2 29407700</phone>
        <email>hsalgado@nic.cl</email>
      </address>
    </author>

    <author fullname="Mauricio Vergara Ereche" initials="M.V.E." surname="Vergara Ereche">
      <organization>ICANN</organization>
      <address>
        <email>mauricio.vergara@icann.org</email>
      </address>
    </author>

    <date year="2021" />

    <area>General</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <keyword>rrserial</keyword>

    <abstract>
        <t>The "RRSERIAL" EDNS option allows a DNS querier to ask a DNS authoritative server to
          add a EDNS option in the answer of such query with the SOA serial number field
          of the origin zone which contains the answered resource record.
      </t>
      <t>This "RRSERIAL" data allows to debug problems and diagnosis by helping to recognize the
          origin of an answer, associating this answer with a respective zone version.
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
        <t>The "RRSERIAL" <xref target="RFC6891">EDNS option</xref> allows a DNS querier to ask a DNS authoritative server to
          add a EDNS option in the answer of such query with the SOA serial number field
          of the zone which contains the answered resource record.
      </t>
      <t>This "RRSERIAL" data allows to debugging helping to recognize the origin of an answer,
          associating this answer with a respective zone version.
      </t>

<t>
    The DNS data is of loose coherent nature, meaning that a record obtained by a response could be out-of-sync with other authoritative sources of the same data. This makes it difficult to debug the responses because you'd need to couple an answer with the version of the zone used to obtain such data. Even when you could use a separate question to ask for the SOA RR of the zone to ask for its serial, this separate question is in another time and could even arrive to another authoritative source, so it's not directly correlated with another query.
</t>

<t>
    This EDNS option is aimed only to authorative servers for a zone. Resolvers and forwarders should ignore the option. It's only intended for hop-to-hop communication (not transitive).
</t>

      <section title="Requirements Language">
        <t>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 <xref
        target="RFC2119">RFC 2119</xref>.</t>
      </section>
    </section>

    <section title="The RRSERIAL Option">
        <t>The OPTION-CODE for the RRSERIAL option is &lt;TBD&gt;.</t>
        <t>The OPTION-DATA for the RRSERIAL option is an unsigned 32 bit version number
            as defined in the SERIAL field of the "SOA RDATA Format" section (3.3.13) of "DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION" (<xref target="RFC1035">RFC 1035</xref>) specification.</t>
    </section>
    <section title="RRSERIAL Processing">
    <section title="Querier">
     <t>The EDNS RRSERIAL option MAY be included on any QUERY, by adding a 
   zero-length EDNS RRSERIAL option to the options field
   of the OPT record when the query is made.</t>
   </section>
   <section title="Responder">
   <t>
   If an EDNS RRSERIAL option is sent to a server that is authoritative for the zone queried, and the RCODE for the answer is NOERROR, the OPTION-DATA MUST be a copy of the serial field of the SOA resource record of the zone which contains the resource record of the ANSWER section.</t>
        <t>Otherwise, the answer MUST NOT add an EDNS RRSERIAL option to the response.</t>
        </section>
    </section>

    <section anchor="usage"
             title="Example usage">
      <figure>
        <artwork><![CDATA[

  $ dig @auth_server www.example.com AAAA +rrserial +norec +nocmd

  ; (1 server found)
  ;; global options: +cmd
  ;; Got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16429
  ;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags:; udp: 4096
  ; RRSERIAL: 2019073001
  ;; QUESTION SECTION:
  ;www.example.com.                    IN      AAAA

  ;; ANSWER SECTION:
  www.example.com.             900     IN      AAAA 

  ;; Query time: 53 msec
  ;; SERVER: authoritative#53(2001:DB8::53)
  ;; WHEN: Tue Aug 07 16:54:05 -04 2018
  ;; MSG SIZE  rcvd: 71

        ]]></artwork>
      </figure>
    </section>


    <section anchor="Acknowledgements" title="Acknowledgements">
        <t>This document was made by his author in its entirety, so there're no acknowledgements yet.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">

        <section title="DNS EDNS0 Option Code Registration">

            <t>Ask to IANA for a code point registration for "RRSERIAL" option.</t>
  </section>

    </section>

    <section anchor="Security" title="Security Considerations">
        <t>There's no risk on disclosure of private information, as the SERIAL of the SOA record is already publicly available.</t>
    </section>
  </middle>

  <back>

    <references title="Normative References">
      &RFC1035;
      &RFC2119;
      &RFC6891;

    </references>

    <section anchor="implementation" title="Implementation References">
        <t>There's a patched NSD server 4.1.23 with support for RRSERIAL with the experimental opcode 65024 maintained in github https://github.com/huguei/nsd/tree/rrserial , and installed for live testing in 200.1.122.30 address with configured zones dateserial.example.com and incserial.example.com; with MX, TXT and AAAA apex records.</t>
    </section>

    <!-- Change Log

v00 2021-05-07  HS   New filename as requested by WG chair, to call for adoption
v01 2020-01-27  HS   No changes, just to avoid expiration
v00 2017-04-27  HS   Initial version

    -->

  </back>
</rfc>
