<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet type="text/xsl" href="lib/rfc2629.xslt"?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes"?>
<?rfc subcompact="no" ?>
<?rfc linkmailto="no" ?>
<?rfc editing="no" ?>
<?rfc comments="yes" ?>
<?rfc inline="yes"?>
<?rfc rfcedstyle="yes"?>
<?rfc-ext allow-markup-in-artwork="yes" ?>
<?rfc-ext include-index="no" ?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:x="http://purl.org/net/xml2rfc/ext" ipr="trust200902" category="info" docName="draft-ietf-dnsop-rrserial-01" tocInclude="true" symRefs="true" sortRefs="true" version="3" submissionType="IETF">
  <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." 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." surname="Vergara Ereche">
      <organization>ICANN</organization>
      <address>
        <email>mauricio.vergara@icann.org</email>
      </address>
    </author>
    <date year="2022"/>
    <area>General</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>rrserial</keyword>
    <abstract>
      <t>The "RRSERIAL" EDNS option allows a DNS querier to request a DNS authoritative server to
         add an 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 and diagnose problems by helping to recognize the
         data source of an answer in an atomic single query,
         by associating the response with a respective zone version.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" title="Introduction">
      <t>The "RRSERIAL" <xref target="RFC6891">EDNS option</xref>
       allows a DNS querier to request to a DNS authoritative server
       to add an EDNS option in the answer of such query
       with the SOA serial number field of the zone associated to the answered Resource Record.</t>
      <t>This "RRSERIAL" data allows to help debug by recognizing the data source of an answer,
       associating this answer with a respective zone version.</t>
      <t>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 responses,
       because you'd need to couple an answer with the same version of the zone used to obtain such data.
       Even when you could use a separate query to ask for the SOA RR of the zone and therefore know its SOA serial,
       such separate query is performed in a different time and could arrive from another authoritative source 
	   (for example, in the case the server is anycasted as described in <xref target="RFC4786" section="4.9"/>),
       so it's not directly correlated with the original query.</t>
      <t>This EDNS option is aimed to be used only on authoritative servers for a zone.
       It's intended for hop-to-hop communication (not transitive).
       Resolver and forwarder behavior is undefined.
      </t>
      <t>The RRSERIAL EDNS extension doesn't offer much relevance for zones served by an Authoritative server that don't use the SOA serial versioning as a meaning to its content.
       There are cases where nameservers use different backends for its data sources,
       like relational databases or by using a different off-DNS synchronicity.
       In such cases this extension has no benefit or utility to use in debugging or analysis of a response.</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"/>.</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" in <xref target="RFC1035" section="3.3.13"/>.</t>
      <t>The OPTION-LENGTH for the RRSERIAL option MUST have a value of 0 for queries,
       and MUST have a value of 4 for responses.</t>
    </section>
    <section title="RRSERIAL Processing">
      <section title="Initiator">
        <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,
         a name server that understands the RRSERIAL option and chooses to honor a particular RRSERIAL request,
         MUST put in the OPTION-DATA
         a copy of the serial field from the SOA Resource Record of the zone which contains the original QNAME of the reply
         (as per <xref target="RFC8499" section="4"/>).</t>
        <t>In the case of a SERVFAIL RCODE the responder MAY include the RRSERIAL EDNS option if the QNAME still belongs to an authoritative zone of the server, 
         in which case that serial MUST be the one included in the answer.</t>
        <t>Otherwise, the answer MUST NOT add an EDNS RRSERIAL option to the response.</t>
        <t>Note that a NODATA response code as defined in <xref target="RFC8499" section="3"/>
         MUST also include the RRSERIAL answer as declared before even when there's no ANSWER data for the QNAME,
         as the RCODE corresponds to NOERROR.</t>
      </section>
    </section>
    <section anchor="usage" title="Example usage">
      <figure>
        <artwork><![CDATA[

  $ dig @ns.example.com 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: ns.example.com#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>The authors thanks all the comments and support made in the DNSOPS mailing list, chats and discussions.
      </t>
    </section>
    <section anchor="IANA" title="IANA Considerations">
      <section title="DNS EDNS0 Option Code Registration">
        <t>Request to IANA for a code point registration for "RRSERIAL" option.</t>
      </section>
    </section>
    <section anchor="Security" title="Security Considerations">
      <t>The EDNS extension data it's not covered by RRSIG records,
       so there's no way to verify its authenticity nor integrity using DNSSEC
       and could theoricatelly be tampered by a person-in-the-middle if the transport is made by unsecure means.
       Caution should be taken to use the EDNS RRSERIAL data for any means besides troubleshooting and debugging.
       If there's a need to certify the RRSERIAL trustwortiness, 
       it will be necessary to use an encrypted and authenticated DNS transport. 
       If there's a need to authenticate data origin for the RRSERIAL value, 
       it should be compared to a separate regular SOA query with DO flag, 
       whose answer shall be DNSSEC signed,
	   with the cautions about Anycast and others as already stated in <xref target="intro" format="title"/>.</t>
      <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">
      <reference anchor="RFC1035" target="https://www.rfc-editor.org/info/rfc1035" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.1035.xml">
        <front>
          <title>Domain names - implementation and specification</title>
          <author initials="P.V." surname="Mockapetris" fullname="P.V. Mockapetris">
            <organization/>
          </author>
          <date year="1987" month="November"/>
          <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="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner" fullname="S. Bradner">
            <organization/>
          </author>
          <date year="1997" month="March"/>
          <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="RFC6891" target="https://www.rfc-editor.org/info/rfc6891" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6891.xml">
        <front>
          <title>Extension Mechanisms for DNS (EDNS(0))</title>
          <author initials="J." surname="Damas" fullname="J. Damas">
            <organization/>
          </author>
          <author initials="M." surname="Graff" fullname="M. Graff">
            <organization/>
          </author>
          <author initials="P." surname="Vixie" fullname="P. Vixie">
            <organization/>
          </author>
          <date year="2013" month="April"/>
          <abstract>
            <t>The Domain Name System's wire protocol includes a number of fixed fields whose range has been or soon will be exhausted and does not allow requestors to advertise their capabilities to responders.  This document describes backward-compatible mechanisms for allowing the protocol to grow.</t>
            <t>This document updates the Extension Mechanisms for DNS (EDNS(0)) specification (and obsoletes RFC 2671) based on feedback from deployment experience in several implementations.  It also obsoletes RFC 2673 ("Binary Labels in the Domain Name System") and adds considerations on the use of extended labels in the DNS.</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="75"/>
        <seriesInfo name="RFC" value="6891"/>
        <seriesInfo name="DOI" value="10.17487/RFC6891"/>
      </reference>
    </references>
    <references title="Informative References">
      <reference anchor="RFC4786" target="https://www.rfc-editor.org/info/rfc4786" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4786.xml">
        <front>
          <title>Operation of Anycast Services</title>
          <author initials="J." surname="Abley" fullname="J. Abley">
            <organization/>
          </author>
          <author initials="K." surname="Lindqvist" fullname="K. Lindqvist">
            <organization/>
          </author>
          <date year="2006" month="December"/>
          <abstract>
            <t>As the Internet has grown, and as systems and networked services within enterprises have become more pervasive, many services with high availability requirements have emerged.  These requirements have increased the demands on the reliability of the infrastructure on which those services rely.</t>
            <t>Various techniques have been employed to increase the availability of services deployed on the Internet.  This document presents commentary and recommendations for distribution of services using anycast.  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="126"/>
        <seriesInfo name="RFC" value="4786"/>
        <seriesInfo name="DOI" value="10.17487/RFC4786"/>
      </reference>
      <reference anchor="RFC8499" target="https://www.rfc-editor.org/info/rfc8499" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8499.xml">
        <front>
          <title>DNS Terminology</title>
          <author initials="P." surname="Hoffman" fullname="P. Hoffman">
            <organization/>
          </author>
          <author initials="A." surname="Sullivan" fullname="A. Sullivan">
            <organization/>
          </author>
          <author initials="K." surname="Fujiwara" fullname="K. Fujiwara">
            <organization/>
          </author>
          <date year="2019" month="January"/>
          <abstract>
            <t>The Domain Name System (DNS) is defined in literally dozens of different RFCs.  The terminology used by implementers and developers of DNS protocols, and by operators of DNS systems, has sometimes changed in the decades since the DNS was first defined.  This document gives current definitions for many of the terms used in the DNS in a single document.</t>
            <t>This document obsoletes RFC 7719 and updates RFC 2308.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="219"/>
        <seriesInfo name="RFC" value="8499"/>
        <seriesInfo name="DOI" value="10.17487/RFC8499"/>
      </reference>
    </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
       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

v01 2022-04-06  HS   No changes, just for revive it after it expired
v00 2021-06-11  HS   No changes, just new filename as requested by DNSOP chairs for WG adoption
v01 2021-06-01  HS   Substantial changes and enhancements from DNSOP discussion
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>
