<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc [
<!ENTITY RFC1995 PUBLIC "" "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1995.xml">
<!ENTITY RFC1996 PUBLIC "" "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1996.xml">
<!ENTITY RFC2119 PUBLIC "" "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC5936 PUBLIC "" "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5936.xml">
<!ENTITY RFC8174 PUBLIC "" "https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
]>

<?rfc strict="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     category="std"
     docName="draft-pels-dnsop-axfr-notify-00"
     ipr="trust200902"
     xml:lang="en"
     submissionType="IETF"
     version="3"
     consensus="yes">

  <front>

    <title abbrev="AXFR NOTIFY">AXFR message type for DNS NOTIFY</title>

    <seriesInfo name="Internet-Draft" value="draft-pels-dnsop-axfr-notify-00"/>

    <author fullname="Martin Pels" initials="M" surname="Pels">
      <organization>RIPE NCC</organization>
      <address>
        <postal>
          <country>NL</country>
        </postal>
        <email>mpels@ripe.net</email>
      </address>
    </author>

    <author fullname="Florian Obser" initials="F" surname="Obser">
      <organization>RIPE NCC</organization>
      <address>
        <postal>
          <country>NL</country>
        </postal>
        <email>fobser@ripe.net</email>
      </address>
    </author>

    <date />

    <abstract>
      <t>
        This document defines a new AXFR message type for DNS NOTIFY messages.
        The message instructs a secondary server to perform an AXFR zone transfer of a zone.
      </t>
    </abstract>
  </front>

  <middle>

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

      <t>
        DNS NOTFY<xref target="RFC1996"/> describes a method to inform secondary name servers that a zone has changed.
        Upon receipt of a <tt>NOTIFY(SOA)</tt> message, a secondary will query the primary server for the SOA of the zone, and perform an IXFR<xref target="RFC1995"/> or AXFR<xref target="RFC5936"/> zone transfer if the SOA SERIAL has been incremented since the last time the zone was fetched.
      </t>
      <t>
        There are cases when it is desirable to force a secondary server to perform an AXFR zone transfer.
        Example scenarios are an incorrectly synchronized database on a secondary server due to a software bug, or an operator incidentally wanting to propagate changes to a zone without updating the SOA SERIAL.
      </t>
      <t>
        Most authoritative DNS server software supports performing a forced AXFR zone transfer.
        However, this can only be initiated by the operator of the DNS server, and secondary servers for a zone may not be managed by the same operator as the primary server(s).
        This document defines a new <tt>NOTIFY(AXFR)</tt> message type, used to initiate forced AXFR transfers by secondary servers from a primary server of a zone.
      </t>

    </section>

    <section title="Terminology" anchor="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 title="Protocol sequence" anchor="protocol">

      <section title="Initiation" anchor="protocol.init">

        <t>
          When a primary server wants its secondary servers to perform an AXFR zone transfer, it sends a NOTIFY message with the following characteristics to each secondary server:
        </t>
        <sourcecode>
query ID:   (new)
op:         NOTIFY (4)
resp:       NOERROR
flags:      AA
qcount:     1
qname:      (zone name)
qclass:     (zone class)
qtype:      T_AXFR
        </sourcecode>

      </section>

      <section title="Secondary server behaviour" anchor="protocol.secondary">

        <t>
          When a secondary server receives a <tt>NOTIFY(AXFR)</tt> request from one of its locally designated primaries for the zone enclosing the given QNAME, with <tt>QTYPE=AXFR</tt> and <tt>QR=0</tt>, it <bcp14>SHOULD</bcp14> perform an AXFR zone transfer from one of its configured primary servers.
          It will also send a NOTIFY response back to the NOTIFY request's source, with the following characteristics:
        </t>
        <sourcecode>
query ID:   (same)
op:         NOTIFY (4)
resp:       NOERROR
flags:      QR AA
qcount:     1
qname:      (zone name)
qclass:     (zone class)
qtype:      T_AXFR
        </sourcecode>

        <t>
          If the secondary server, for the zone enclosing the given QNAME, is configured as a primary server for other secondary servers, it <bcp14>MUST</bcp14> also send a <tt>NOTIFY(AXFR)</tt> request to each of its configured secondaries.
          This ensures that an entire chain of secondary servers is synchronized in concert.
        </t>

      </section>

    </section>

    <section title="IANA considerations" anchor="iana">

      <t>
        This document has no IANA actions.
      </t>

    </section>

    <section title="Security considerations" anchor="security">

      <t>
        A <tt>NOTIFY(AXFR)</tt> request with a forged IP/UDP source address can cause a secondary to send spurious AXFR requests to its primary servers, leading to a denial of service attack if the forged requests are sent very often.
        To counter this, secondary servers <bcp14>MUST</bcp14> rate-limit how often they will request an AXFR from their primaries.
      </t>
      <t>
        If a primary server has many secondaries, requesting all of them to perform an AXFR simultaneously may cause the primary to become overloaded.
        The sending out of <tt>NOTIFY(AXFR)</tt> requests to secondary servers <bcp14>SHOULD</bcp14> be splayed to reduce this thundering herd effect.
      </t>
    </section>

    <!--
    <section title="Implementation status" anchor="implementation">

      <t>
        RFC-EDITOR: Please remove this section and the accompanying reference(s) before publication.
      </t>

    </section>
    -->

  </middle>

  <back>

    <references title="Normative References" anchor="normative">

      &RFC1995;
      &RFC1996;
      &RFC5936;

    </references>

    <references title="Informative References" anchor="informative">

      &RFC2119;
      &RFC8174;

    </references>

    <section title="Acknowledgements" anchor="acknowledgements">
      <t>
        The authors would like to thank Anand Buddhdev for contributing ideas and feedback to this document.
      </t>
    </section>

  </back>

</rfc>
