<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="exp"
  docName="draft-bortzmeyer-dnsop-poisonlicious-03"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">

  <front>
    <title abbrev="Poisonlicious">Synchronizing caches of DNS resolvers</title>

    <seriesInfo name="Internet-Draft" value="draft-bortzmeyer-dnsop-poisonlicious-03"/>

    <author fullname="Stéphane Bortzmeyer" initials="S." surname="Bortzmeyer">

      <organization>Afnic</organization>
      <address>
        <postal>
          <street>7 avenue du 8 mai 1945</street>
          <city>Guyancourt</city>
          <code>78280</code>
          <country>FR</country>
        </postal>
        <email>bortzmeyer+ietf@nic.fr</email>
        <uri>https://www.afnic.fr/</uri>
      </address>
    </author>

    <author fullname="Willem Toorop" initials="W." surname="Toorop">

      <organization>NLnet Labs</organization>
      <address>
        <postal>
          <street>Science Park 400</street>
          <city>Amsterdam</city>
          <code>1098 XH</code>
          <country>NL</country>
        </postal>
        <email>willem@nlnetlabs.nl</email>
        <uri>https://nlnetlabs.nl/</uri>
      </address>
    </author>


    <author fullname="Babak Farrokhi" initials="B." surname="Farrokhi">

      <organization>Quad9</organization>
      <address>
        <postal>
          <street>Werdstrasse 2</street>
          <city>Zürich</city>
          <code>8004</code>
          <country>CH</country>
        </postal>
        <email>babak@farrokhi.net</email>
        <uri>https://quad9.net/</uri>
      </address>
    </author>


    <author fullname="Moin Rahman" initials="M." surname="Rahman">

      <organization>The FreeBSD Foundation</organization>
      <address>
        <postal>
          <street>3980 Broadway St</street>
          <city>Boulder</city>
          <code>CO 80304</code>
          <country>US</country>
        </postal>
        <email>bofh@freebsd.org</email>
        <uri>https://freebsdfoundation.org/</uri>
      </address>
    </author>

    <author initials="O." surname="Surý" fullname="Ondřej Surý">
      <organization showOnFrontPage="true">Internet Systems Consortium</organization>
      <address>
        <postal>
          <country>Czech Republic</country>
        </postal>
        <email>ondrej@isc.org</email>
      </address>
    </author>

    <author fullname="Otto Moerbeek" initials="O." surname="Moerbeek">
      <organization>PowerDNS</organization>
      <address>
        <postal>
          <country>NL</country>
        </postal>
        <email>otto.moerbeek@powerdns.com</email>
      </address>
    </author>

    <date year="2026" month="April" day="23"/>

    <area>General</area>
    <workgroup>Internet Engineering Task Force</workgroup>

    <keyword>DNS DNSSEC optimization caching</keyword>

    <abstract>
      <t>Network of cooperating and mutually trusting DNS resolvers
      could benefit from cache sharing, where one resolver would
      distribute the result of a resolution to other resolvers. This
      document standardizes a protocol to do so.</t>
    </abstract>

  </front>

  <middle>

    <section>
      <name>Introduction</name>
      <t>When an organisation operates a big network of DNS resolvers
      <xref target="RFC1034"/> <xref target="RFC1035"/>, for
      instance for an important public resolver (<xref
      section="6" sectionFormat="of" target="RFC9499"/>), it may be a performance
      improvment to distribute the result of the resolution process
      between the resolvers. This document standardizes how to to do
      so, using unicast messages to a
      set of pre-configured peers.
      </t>

      <section>
        <name>Requirements Language</name>
        <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>
	<name>Terminology</name>
        <dl newline="true">
        <dt>Network of resolvers</dt>
        <dd>A set of resolvers working together under the same administration</dd>
        <dt>Peer (or peer resolver)</dt>
        <dd>One of the other resolvers in the network</dd>
        <dt>Originating resolver</dt>
        <dd>A resolver sending data to its peers in the network</dd>
        <dt>Receiving resolver (or receiving peer)</dt>
        <dd>A resolver receiving data from one of its peers in the network</dd>
        <dt>Resolver</dt>
        <dd>As used in <xref section="6" sectionFormat="of" target="RFC9499"/></dd>
      </dl>
      </section>

    </section>

    <section>
      <name>The protocol</name>
      <t>When completing a successful DNS resolution, the resolver
      transmits a DNS message (with the Q/R bit set, since it is a
      response) to the pre-configured peers, authenticating with TSIG
      <xref target="RFC8945"/>. No acknowledgment is
      sent or expected. To save work, the resolver MAY send the data only if the TTL
      is higher than some predefined value.</t>
      <t>The resolver must send
      only data that it is sure of (for instance by DNSSEC validation
      or because it came with the AA bit from the queried
      server). Since all of the network of resolvers are in the same
      organizational domain, they MUST agree on the same policy for
      this assessment.</t>
      <t>Negative answers (<xref target="RFC9499"/>, section 3) MUST
      NOT be
      transmitted to peers.</t>
      <t>Messages of this protocol are distinguished from other DNS
      messages by the TSIG key they use (which must therefore be
      specific to this protocol).</t>
      <t>This message MAY be the message received by the resolver from
      the authoritative name servers or it MAY be a new message with
      data composed from data already obtained by the resolver, for
      instance without the question section (this would help a bit
      with privacy <xref target="Privacy"/>).</t>
      <t>The EDNS section MUST be a new one, created to fit the needs
      of successful transmission to the peer.</t>
      <t>Each peer then MAY store the data in
      its cache. The peer is not supposed to do DNSSEC validation
      (there is not always all the necessary data in the
      message). After all, the goal is to save work for the peers, so  <xref
      section="5.4.1" sectionFormat="of" target="RFC2181"/> does not
      apply here. (Remember all peers
      trust each other, and have a consistent policy.
      The data is as trustworthy as if you validated it yourself.) The
      receiver MAY cache only what is in the Answer section.</t>
    </section>

    <section anchor="IANA">
      <name>IANA Considerations</name>
      <t>None. [RFC-Editor: you may delete this section]</t>
    </section>

    <section anchor="Security">
      <name>Security Considerations</name>
      <t>The integrity and authenticity of the cached data is of
      course critical. DNSSEC would help but it is not yet universally
      deployed and, moreover, the peer resolvers should not have to
      redo the validation. So, trust between the peer resolvers is
      expected because it is the only way for the receiver to be sure
      of the data. One way to do so is to have all of the peers under the same
      organisational authority, as mandated here.</t>
      <t>For the same reason, the channel between peers must be
      protected, preferrably with cryptography (currently, TSIG is
      mandatory). ACL and other network techniques are of course
      useful.</t>
      <t>Encryption is less important than authentication since we
      transmit only public data. Nevertheless, it is better to be sure
      that the channel between the peers is not open to snooping.</t>
    </section>

    <section anchor="Privacy">
      <name>Privacy Considerations</name>
      <t>Confidentiality is currently out of scope for this
      document. The communication between the originating resolver and
      its receiving peers could be encrypted, for instance with DoT <xref
	target="RFC7858"/>
      but it is not otherwise specified.</t>
      <t>If the originating resolver sends the original question
      section in its messages to receiving peers, it can have
      privacy consequences <xref
      target="RFC9076"/>. These consequences are limited since all the
      peers are under the same administration, anyway. The originator MAY remove this section or replace it with
      dummy data.</t>
    </section>
    
    <section anchor="Operation">
      <name>Operational Considerations</name>
      <t>It is reminded that all resolvers in the network need to trust
      each other, being in the same administrative
      domain. This specification is not meant to be deployed between
      unrelated resolvers.</t>
      <t>The netwok of peer resolvers have to be configured
      out-of-band before. The way to do it is out-of-scope for this specification.</t>
    </section>

    <section anchor="related-future">
      <name>Related and future work</name>
      <section>
	<name>Related work</name>
	<t><xref target="I-D.hl-dnsop-cache-filling"/> describes a
	mechanism to fill DNS caches with data. The format is, like in
	this document, standard DNS as seen on the wire.</t>
      </section>
      <section>
      <name>Future work</name>
      <section>
	<name>Actual measurement</name>
	<t>Measuring the efficiency of caching
      optimizations is hard because the performance depend a lot on
      the actual queries sent and their timeline. It would be interesting to test on real-world data to
	measure the improvment brought by this technology.</t>
      </section>
      <section>
	<name>Negative answers</name>
	<t>If in the future, we may allow negative answers to be
	sent, which would permit the receivers to use <xref
	target="RFC8020"/> and/or <xref target="RFC8198"/> to
	synthetize negative answers.</t>
	<t>Be careful of
	the risk of overloading receving peers for instance when there
	is a dictionary attack.</t>
      </section>
      <section>
	<name>ECS</name>
	<t>Today, we don't transmit the EDNS record since EDNS is not
	end-to-end. But ECS
      <xref target="RFC7871"/> may be an important information for the
      participating resolvers.</t>
      </section>
      <section>
	<name>Authentication of messages</name>
	<t>Today, we authenticate only with TSIG <xref
	target="RFC8945"/>. SIG(0) <xref target="RFC2931"/> or DoT <xref
	target="RFC7858"/> may be
	interesting improvements in the future.</t>
      </section>
      <section>
	<name>Dispatching of messages</name>
	<t>Today, messages following this specification are sent to
	the proper handler based on the TSIG key used. It could be an
	interesting alternative to use a separate transport port instead.</t>
      </section>
      <section>
	<name>Transport of messages</name>
         <t>Messages could be transmitted in long-lived TCP sessions, too.</t>
         <t>If there are 1,000 servers, sending 1,000 messages, or having a full
	 mesh of 1,000 TCP connections may be too much. It may be interesting to replace the unicast messages by
         multicast <xref target="RFC5110"/> (the issues of multicast on the public Internet do
	 no apply here since we envision work under only one
	 organisation).</t>
         <t>Other protocols may be considered such as MQTT
	 <xref target="MQTT"/> which is well suited for
	 publish-by-one/consume-by-many, raw protocol buffers <xref
	 target="GPB"/> or dnstap <xref target="dnstap"/> over them.</t>
      </section>
      <section>
	<name>Packing of messages</name>
	<t>It could be interesting to optimize by packing the data in a C-DNS <xref
      target="RFC8618"/> flow, sent with TCP (with TLS) or
      QUIC. (Of course, other formats/protocols are possible.)</t>
      </section>
      <section>
	<name>Different responses</name>
	<t>When the authoritative servers send different replies
	depending on the client, the various peers may send different
	(and under-optimized) responses to a receiving peer.</t>
      </section>
    </section>
    </section>
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>

        <xi:include
            href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1034.xml"/>
        <xi:include
            href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1035.xml"/>
        <xi:include
            href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include
            href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8945.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9499.xml"/>
      </references>

      <references>
        <name>Informative References</name>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2181.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2931.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5110.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7858.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7871.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8020.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8198.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8618.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9076.xml"/>
        <xi:include
	    href="https://datatracker.ietf.org/doc/bibxml3/draft-hl-dnsop-cache-filling.xml"/>
        <reference anchor="MQTT" target="https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.docx">
          <front>
            <title>MQTT Version 5.0</title>
            <author>
              <organization>OASIS</organization>
            </author>
            <date year="2019"/>
          </front>
        </reference>
	<!-- https://mqtt.org/mqtt-specification/ -->
        <reference anchor="GPB"
		   target="https://protobuf.dev/">
	  <front>
	    <title>Protocol Buffers</title>
            <author>
	      <organization>Google Developers</organization>
	    </author>
	  </front>
	</reference>
        <reference anchor="dnstap"
		   target="https://dnstap.info/">
	  <front>
	    <title>dnstap</title>
	    <author fullname="Robert Edmonds"/>
	    <date year="2014"/>
	  </front>
	</reference>
      </references>
    </references>

        <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>Original idea at the DNS hackathon (RIPE-NCC / Netnod / DNS-OARC) in march 2025 at the
      Netnod office in Stockholm.</t>
    </section>

 </back>
</rfc>
