<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="info" docName="draft-sekar-dns-llq-06" indexInclude="true" ipr="trust200902" number="8764" prepTime="2020-06-22T21:06:29" scripts="Common,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="3" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-sekar-dns-llq-06" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc8764" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="Apple's DNS LLQ">Apple's DNS Long-Lived Queries Protocol</title>
    <seriesInfo name="RFC" value="8764" stream="independent"/>
    <author initials="S." surname="Cheshire" fullname="Stuart Cheshire">
      <organization showOnFrontPage="true">Apple Inc.</organization>
      <address>
        <postal>
          <street>One Apple Park Way</street>
          <city>Cupertino</city>
          <region>CA</region>
          <code>95014</code>
          <country>United States of America</country>
        </postal>
        <phone>+1 (408) 996-1010</phone>
        <email>cheshire@apple.com</email>
      </address>
    </author>
    <author initials="M." surname="Krochmal" fullname="Marc Krochmal">
      <organization showOnFrontPage="true">Apple Inc.</organization>
      <address>
        <postal>
          <street>One Apple Park Way</street>
          <city>Cupertino</city>
          <region>CA</region>
          <code>95014</code>
          <country>United States of America</country>
        </postal>
        <phone>+1 (408) 996-1010</phone>
        <email>marc@apple.com</email>
      </address>
    </author>
    <date month="06" year="2020"/>
    <keyword>Async</keyword>
    <keyword>Asynchronous</keyword>
    <keyword>Change Notification</keyword>
    <keyword>Push Notification</keyword>
    <abstract pn="section-abstract">
      <t pn="section-abstract-1">
	  Apple's DNS Long-Lived Queries (LLQ) is a mechanism
	   for extending the DNS protocol to support change notification,
	    thus allowing clients to learn about changes to DNS data
	     without polling the server.  From 2005 onwards, LLQ was
	      implemented in Apple products including Mac OS X, Bonjour for
	       Windows, and AirPort wireless base stations.  In 2020, the LLQ
	        protocol was superseded by the IETF Standards Track RFC 8765,
		"DNS
		 Push Notifications", which builds on experience gained with
		  the LLQ protocol to create a superior replacement.
      </t>
      <t pn="section-abstract-2">
    The existing LLQ protocol deployed and used from 2005 to 2020 is
    documented here to give
    background regarding the operational experience that informed
    the development of DNS Push Notifications, and to help facilitate
    a smooth transition from LLQ to DNS Push Notifications.
      </t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t pn="section-boilerplate.1-1">
            This document is not an Internet Standards Track specification; it is
            published for informational purposes.
        </t>
        <t pn="section-boilerplate.1-2">
            This is a contribution to the RFC Series, independently of any
            other RFC stream.  The RFC Editor has chosen to publish this
            document at its discretion and makes no statement about its value
            for implementation or deployment.  Documents approved for
            publication by the RFC Editor are not candidates for any level of
            Internet Standard; see Section 2 of RFC 7841.
        </t>
        <t pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc8764" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t pn="section-boilerplate.2-1">
            Copyright (c) 2020 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-transition-to-dns-push-noti">Transition to DNS Push Notifications</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t keepWithNext="true" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-conventions-and-terminology">Conventions and Terminology Used in This Document</xref></t>
          </li>
          <li pn="section-toc.1-1.3">
            <t pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-mechanisms">Mechanisms</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-assigned-numbers">Assigned Numbers</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-opt-rr-format">Opt-RR Format</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-llq-address-and-port-identi">LLQ Address and Port Identification</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-llq-setup">LLQ Setup</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-setup-message-retransmissio">Setup Message Retransmission</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-llq-setup-four-way-handshak">LLQ Setup Four-Way Handshake</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.2.2">
                  <li pn="section-toc.1-1.5.2.2.2.1">
                    <t pn="section-toc.1-1.5.2.2.2.1.1"><xref derivedContent="5.2.1" format="counter" sectionFormat="of" target="section-5.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-setup-request">Setup Request</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.2.2.2">
                    <t pn="section-toc.1-1.5.2.2.2.2.1"><xref derivedContent="5.2.2" format="counter" sectionFormat="of" target="section-5.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-setup-challenge">Setup Challenge</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.2.2.3">
                    <t pn="section-toc.1-1.5.2.2.2.3.1"><xref derivedContent="5.2.3" format="counter" sectionFormat="of" target="section-5.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-challenge-response">Challenge Response</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.2.2.4">
                    <t pn="section-toc.1-1.5.2.2.2.4.1"><xref derivedContent="5.2.4" format="counter" sectionFormat="of" target="section-5.2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ack-answers">ACK + Answers</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.5.2.3">
                <t pn="section-toc.1-1.5.2.3.1"><xref derivedContent="5.3" format="counter" sectionFormat="of" target="section-5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-resource-record-ttls">Resource Record TTLs</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-event-responses">Event Responses</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-add-events">Add Events</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-remove-events">Remove Events</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.3">
                <t pn="section-toc.1-1.6.2.3.1"><xref derivedContent="6.3" format="counter" sectionFormat="of" target="section-6.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-gratuitous-response-acknowl">Gratuitous Response Acknowledgments</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-llq-lease-life-expiration">LLQ Lease-Life Expiration</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-refresh-request">Refresh Request</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-llq-refresh-acknowledgment">LLQ Refresh Acknowledgment</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-server-dos">Server DoS</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-client-packet-storms">Client Packet Storms</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.3">
                <t pn="section-toc.1-1.8.2.3.1"><xref derivedContent="8.3" format="counter" sectionFormat="of" target="section-8.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-spoofing">Spoofing</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.10">
            <t pn="section-toc.1-1.10.1"><xref derivedContent="10" format="counter" sectionFormat="of" target="section-10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2">
              <li pn="section-toc.1-1.10.2.1">
                <t pn="section-toc.1-1.10.2.1.1"><xref derivedContent="10.1" format="counter" sectionFormat="of" target="section-10.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.10.2.2">
                <t pn="section-toc.1-1.10.2.2.1"><xref derivedContent="10.2" format="counter" sectionFormat="of" target="section-10.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.11">
            <t pn="section-toc.1-1.11.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-problems-with-the-llq-proto">Problems with the LLQ Protocol</xref></t>
          </li>
          <li pn="section-toc.1-1.12">
            <t pn="section-toc.1-1.12.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.13">
            <t pn="section-toc.1-1.13.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t pn="section-1-1">
    In dynamic environments, DNS-based Service Discovery <xref target="RFC6763" format="default" sectionFormat="of" derivedContent="RFC6763"/> benefits
    significantly from clients being able to learn about changes to
    DNS information via a mechanism that is both more timely and more
    efficient than simple polling. Such a mechanism enables "live
    browses" that (a) learn when a new instance of a service appears, (b)
    learn when
    an existing service instance disappears from the network, and (c) allows
    clients
    to monitor status changes to a service instance (e.g., printer ink
    levels).
    Multicast DNS <xref target="RFC6762" format="default" sectionFormat="of" derivedContent="RFC6762"/> supports this
    natively. When a device on the network publishes or deletes Multicast DNS
    records, these changes are multicast to other hosts on the network.
    Those hosts deliver the change notifications to interested clients
    (applications
    running on that host). Hosts also send occasional queries to the
    network, in case gratuitous announcements are not received due to
    packet loss, and to detect records lost due to their publishers
    crashing or having become disconnected from the network.
      </t>
      <t pn="section-1-2">
   This document defines an Apple extension to unicast DNS that enables a
   client to
   issue long-lived queries that allow a unicast DNS server to notify clients
   about changes to DNS data. This is a more scalable and practical
   solution than can be achieved by polling of the name server, because
   a low polling rate could leave the client with stale information,
   while a high polling rate would have an adverse impact on the network
   and server.
      </t>
      <t pn="section-1-3">
   The mechanism defined in this document is now being replaced by DNS Push
   Notifications <xref target="RFC8765" format="default" sectionFormat="of" derivedContent="RFC8765"/> as explained
   in <xref target="trans" format="default" sectionFormat="of" derivedContent="Section 1.1"/>.
      </t>
      <t pn="section-1-4">
      </t>
      <section anchor="trans" numbered="true" toc="include" removeInRFC="false" pn="section-1.1">
        <name slugifiedName="name-transition-to-dns-push-noti">Transition to DNS Push Notifications</name>
        <t pn="section-1.1-1">
    The LLQ protocol enjoyed over a decade of useful operation,
    enabling timely live updates for the service discovery user interface in
    Apple's Back to My Mac <xref target="RFC6281" format="default" sectionFormat="of" derivedContent="RFC6281"/>
    service.
        </t>
        <t pn="section-1.1-2">
    However, some problems were discovered, as described in <xref target="problems" format="default" sectionFormat="of" derivedContent="Appendix A"/>.
    This operational
    experience with LLQ informed the design of its IETF Standards
    Track successor, DNS Push Notifications <xref target="RFC8765" format="default" sectionFormat="of" derivedContent="RFC8765"/>.
    Since no further work is being done on the LLQ protocol, this LLQ
    specification will not be updated to remedy these problems.
        </t>
        <t pn="section-1.1-3">
    All existing LLQ implementations are <bcp14>RECOMMENDED</bcp14> to migrate
    to using DNS Push Notifications instead.
        </t>
        <t pn="section-1.1-4">
    Existing LLQ servers are <bcp14>RECOMMENDED</bcp14> to implement and
    support
    DNS Push Notifications so that clients can begin migrating to the
    newer protocol.
        </t>
        <t pn="section-1.1-5">
    Existing LLQ clients are <bcp14>RECOMMENDED</bcp14> to query for the
    <tt>_dns‑push‑tls._tcp.&lt;zone&gt;</tt> SRV record first, and
    then only if DNS Push Notifications fail, fall back to query for
    <tt>_dns‑llq._udp.&lt;zone&gt;</tt> instead.  Use of the
    <tt>_dns‑llq._udp.&lt;zone&gt;</tt> SRV record is described in <xref target="address-port" format="default" sectionFormat="of" derivedContent="Section 4"/>.
        </t>
        <t pn="section-1.1-6">
    This will cause clients to prefer the newer protocol when possible.  It is
    <bcp14>RECOMMENDED</bcp14> that clients always attempt DNS Push
    Notifications first for every new request, and only if that fails, then
    fall back to using LLQ.  Clients <bcp14>SHOULD NOT</bcp14> record that a
    given server only speaks LLQ and subsequently default to LLQ for that
    server, since server software gets updated and even a server that speaks
    only LLQ today may be updated to support DNS Push Notifications tomorrow.
        </t>
        <t pn="section-1.1-7">
    New client and server implementations are <bcp14>RECOMMENDED</bcp14> to
    support only
    DNS Push Notifications.
        </t>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-conventions-and-terminology">Conventions and Terminology Used in This Document</name>
      <t pn="section-2-1">
     The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
     "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
     "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
     "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are
     to be interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/>
        <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all
     capitals, as shown here.
      </t>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-mechanisms">Mechanisms</name>
      <t pn="section-3-1">
    DNS Long-Lived Queries (LLQ) are implemented using the standard
    DNS message format <xref target="RFC1035" format="default" sectionFormat="of" derivedContent="RFC1035"/> in
    conjunction with an EDNS(0) OPT
    pseudo‑RR <xref target="RFC6891" format="default" sectionFormat="of" derivedContent="RFC6891"/> with a new
    OPTION‑CODE
    and OPTION‑DATA format specified here.  Encoding the LLQ request in
    an OPT pseudo‑RR
    allows for implementation of LLQ with minimal modification to a name
    server's front end.  If a DNS query containing an LLQ option is sent to a
    server that does not implement LLQ, a server that complies with the
    EDNS(0) specification <xref target="RFC6891" format="default" sectionFormat="of" derivedContent="RFC6891"/> will
    silently ignore the unrecognized option and answer the request as a normal
    DNS query without establishing any long-lived state and without
    returning an LLQ option in its response.  If a DNS query containing an LLQ
    option is sent to a server that does not implement EDNS(0) at all, the
    server may silently ignore the EDNS(0) OPT pseudo‑RR or it may
    return a nonzero RCODE.  However, in practice, this issue is mostly
    theoretical, since having a zone's _dns‑llq._udp.&lt;zone&gt; SRV
    record target a host that does not implement LLQ is a configuration error.
      </t>
      <t pn="section-3-2">
    Note that this protocol is designed for data set sizes of a few dozen
    resource records at most and change rates no more than once every 10
    seconds on average. Data sets that frequently
    exceed a single IP packet, or that experience a rapid change rate, may
    have
    undesirable performance implications.
      </t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-3.1">
        <name slugifiedName="name-assigned-numbers">Assigned Numbers</name>
        <t pn="section-3.1-1">
	      This section describes constants used in this document.
        </t>
        <ul empty="true" bare="false" spacing="normal" pn="section-3.1-2">
          <li pn="section-3.1-2.1">
            <t pn="section-3.1-2.1.1">EDNS(0) OPTION‑CODE (recorded with IANA):</t>
            <ul empty="true" bare="false" spacing="normal" pn="section-3.1-2.1.2">
              <li pn="section-3.1-2.1.2.1">
                <dl indent="18" newline="false" spacing="normal" pn="section-3.1-2.1.2.1.1">
                  <dt pn="section-3.1-2.1.2.1.1.1">LLQ
                  </dt>
                  <dd pn="section-3.1-2.1.2.1.1.2">1
         </dd>
                </dl>
              </li>
            </ul>
          </li>
          <li pn="section-3.1-2.2">
LLQ‑PORT 5352 (recorded with IANA)
   </li>
          <li pn="section-3.1-2.3">
            <t pn="section-3.1-2.3.1">LLQ Opcodes (specific to this LLQ EDNS(0) Option):</t>
            <ul empty="true" bare="false" spacing="normal" pn="section-3.1-2.3.2">
              <li pn="section-3.1-2.3.2.1">
                <dl indent="18" spacing="compact" newline="false" pn="section-3.1-2.3.2.1.1">
                  <dt pn="section-3.1-2.3.2.1.1.1">LLQ‑SETUP
                  </dt>
                  <dd pn="section-3.1-2.3.2.1.1.2">1
         </dd>
                  <dt pn="section-3.1-2.3.2.1.1.3">LLQ‑REFRESH
                  </dt>
                  <dd pn="section-3.1-2.3.2.1.1.4">2
         </dd>
                  <dt pn="section-3.1-2.3.2.1.1.5">LLQ‑EVENT
                  </dt>
                  <dd pn="section-3.1-2.3.2.1.1.6">3
         </dd>
                </dl>
              </li>
            </ul>
          </li>
          <li pn="section-3.1-2.4">
            <t pn="section-3.1-2.4.1">LLQ Error Codes (specific to this LLQ EDNS(0) Option):</t>
            <ul empty="true" bare="false" spacing="normal" pn="section-3.1-2.4.2">
              <li pn="section-3.1-2.4.2.1">
                <dl indent="18" spacing="compact" newline="false" pn="section-3.1-2.4.2.1.1">
                  <dt pn="section-3.1-2.4.2.1.1.1">
NO-ERROR
</dt>
                  <dd pn="section-3.1-2.4.2.1.1.2">0
</dd>
                  <dt pn="section-3.1-2.4.2.1.1.3">
SERV-FULL
</dt>
                  <dd pn="section-3.1-2.4.2.1.1.4">1
</dd>
                  <dt pn="section-3.1-2.4.2.1.1.5">
STATIC
</dt>
                  <dd pn="section-3.1-2.4.2.1.1.6">2
</dd>
                  <dt pn="section-3.1-2.4.2.1.1.7">
FORMAT-ERR
</dt>
                  <dd pn="section-3.1-2.4.2.1.1.8">3
</dd>
                  <dt pn="section-3.1-2.4.2.1.1.9">
NO-SUCH-LLQ
</dt>
                  <dd pn="section-3.1-2.4.2.1.1.10">4
</dd>
                  <dt pn="section-3.1-2.4.2.1.1.11">
BAD-VERS
</dt>
                  <dd pn="section-3.1-2.4.2.1.1.12">5
</dd>
                  <dt pn="section-3.1-2.4.2.1.1.13">
UNKNOWN-ERR
</dt>
                  <dd pn="section-3.1-2.4.2.1.1.14">6
</dd>
                </dl>
              </li>
            </ul>
          </li>
        </ul>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-3.2">
        <name slugifiedName="name-opt-rr-format">Opt-RR Format</name>
        <t pn="section-3.2-1">
    As required by the EDNS(0) specification <xref target="RFC6891" format="default" sectionFormat="of" derivedContent="RFC6891"/>,
    all OPT pseudo‑RRs used in LLQs are formatted as follows:
        </t>
        <table anchor="OPT-RRs" align="center" pn="table-1">
          <name slugifiedName="name-opt-rrs-used-in-llqs">OPT-RRs Used in LLQs</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Field Name</th>
              <th align="left" colspan="1" rowspan="1">Field Type</th>
              <th align="left" colspan="1" rowspan="1">Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">NAME</td>
              <td align="left" colspan="1" rowspan="1">domain name</td>
              <td align="left" colspan="1" rowspan="1">MUST be 0 (root domain)</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">TYPE</td>
              <td align="left" colspan="1" rowspan="1">u_int16_t</td>
              <td align="left" colspan="1" rowspan="1">OPT (41)</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">CLASS</td>
              <td align="left" colspan="1" rowspan="1">u_int16_t</td>
              <td align="left" colspan="1" rowspan="1">0*</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">TTL</td>
              <td align="left" colspan="1" rowspan="1">u_int32_t</td>
              <td align="left" colspan="1" rowspan="1">0</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">RDLEN</td>
              <td align="left" colspan="1" rowspan="1">u_int16_t</td>
              <td align="left" colspan="1" rowspan="1">length of all RDATA</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">RDATA</td>
              <td align="left" colspan="1" rowspan="1">octet stream</td>
              <td align="left" colspan="1" rowspan="1">(see below)</td>
            </tr>
          </tbody>
        </table>
        <t pn="section-3.2-3">
    * The CLASS field indicates, as per the EDNS(0) specification <xref target="RFC6891" format="default" sectionFormat="of" derivedContent="RFC6891"/>, the sender's UDP payload
    size. However, clients and servers are not required to determine their
    reassembly buffer size, path MTU, etc., to support LLQ. Thus, the sender
    of
    an LLQ Request or Response <bcp14>MAY</bcp14> set the CLASS field to 0.
    The recipient <bcp14>MUST</bcp14> ignore the class field if it is set to
    0.
        </t>
        <t pn="section-3.2-4">
    The RDATA of an EDNS(0) OPT pseudo‑RR consists of zero or more
    options
    of the form { OPTION‑CODE, OPTION‑LENGTH, OPTION‑DATA }
    packed together,
    with the RDLEN field set accordingly to indicate the total size.
    An LLQ OPTION is illustrated below.
    An EDNS(0) OPT pseudo‑RR may contain zero or more LLQ OPTIONS in
    addition
    to zero or more other EDNS(0) options.
        </t>
        <table anchor="LLQ-OPT-FORMAT" align="center" pn="table-2">
          <name slugifiedName="name-llq-option">LLQ OPTION</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Field Name</th>
              <th align="left" colspan="1" rowspan="1">Field Type</th>
              <th align="left" colspan="1" rowspan="1">Description</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">OPTION-CODE</td>
              <td align="left" colspan="1" rowspan="1">u_int16_t</td>
              <td align="left" colspan="1" rowspan="1">LLQ (1)</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">OPTION-LENGTH</td>
              <td align="left" colspan="1" rowspan="1">u_int16_t</td>
              <td align="left" colspan="1" rowspan="1">Length of following fields (18)</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">LLQ-VERSION</td>
              <td align="left" colspan="1" rowspan="1">u_int16_t</td>
              <td align="left" colspan="1" rowspan="1">Version of LLQ protocol implemented</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">LLQ-OPCODE</td>
              <td align="left" colspan="1" rowspan="1">u_int16_t</td>
              <td align="left" colspan="1" rowspan="1">Identifies LLQ operation</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">LLQ-ERROR</td>
              <td align="left" colspan="1" rowspan="1">u_int16_t</td>
              <td align="left" colspan="1" rowspan="1">Identifies LLQ errors</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">LLQ-ID</td>
              <td align="left" colspan="1" rowspan="1">u_int64_t</td>
              <td align="left" colspan="1" rowspan="1">Identifier for an LLQ</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">LLQ-LEASE</td>
              <td align="left" colspan="1" rowspan="1">u_int32_t</td>
              <td align="left" colspan="1" rowspan="1">Requested or granted life of LLQ, in seconds</td>
            </tr>
          </tbody>
        </table>
        <t pn="section-3.2-6">
   The size and meaning of the OPTION‑CODE and OPTION‑LENGTH fields
   are as described in the EDNS(0) specification <xref target="RFC6891" format="default" sectionFormat="of" derivedContent="RFC6891"/>.  The remainder of the fields comprise the
   OPTION‑DATA of the EDNS(0) LLQ OPTION.  Since for LLQ the
   OPTION‑DATA is a
   fixed size, in EDNS(0) LLQ OPTIONS the OPTION‑LENGTH field always has
   the value 18.
        </t>
        <t pn="section-3.2-7">
   In keeping with Internet convention, all multi-byte numeric quantities
   (u_int16_t, u_int32_t, and u_int64_t)
   are represented in big endian byte order (most significant byte first).
        </t>
      </section>
    </section>
    <section numbered="true" toc="include" anchor="address-port" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-llq-address-and-port-identi">LLQ Address and Port Identification</name>
      <t pn="section-4-1">
   The client
   requires a mechanism to determine to which server it should send LLQ
   operations.
      </t>
      <t pn="section-4-2">
   Additionally, some firewalls block direct communication with a name server
   on port 53 to avoid spoof responses. However, this direct communication is
   necessary for LLQs. Thus, servers <bcp14>MAY</bcp14> listen for LLQs on a
   different port (typically 5352). Clients, therefore, also need a
   mechanism to determine to which port to send LLQ operations.
      </t>
      <t pn="section-4-3">
   The client determines the server responsible for a given LLQ much as a
   client determines to which server to send a DNS dynamic update. The client
   begins by sending a standard DNS query for the name of the LLQ, with type
   SOA.  If the record exists, then the server <bcp14>MUST</bcp14> answer with
   that SOA record in the Answer section.  If a record of type SOA with the
   LLQ name does not exist, then the server <bcp14>SHOULD</bcp14> include an
   SOA record for that name's zone in the Authority section.  For example, a
   query for "_ftp._tcp.example.com" with type SOA, when there is no SOA
   record with that name, might return an SOA record named "example.com" in
   the Authority section.  If the named SOA record does not exist and the
   server fails to include the enclosing SOA record in the Authority section,
   the client strips the leading label from the name and tries again,
   repeating until an answer is received.
      </t>
      <t pn="section-4-4">
   This iterative zone apex discovery algorithm is described in more detail in
   the DNS Push Notifications specification <xref target="RFC8765" format="default" sectionFormat="of" derivedContent="RFC8765"/>.
      </t>
      <t pn="section-4-5">
   Upon learning the zone apex (SOA), the client then constructs and sends an
   SRV query for the name, "_dns‑llq._udp.&lt;zone&gt;",
   e.g., "_dns‑llq._udp.example.com".
      </t>
      <t pn="section-4-6">
   An authoritative server for a zone implementing LLQ <bcp14>MUST</bcp14>
   answer with an SRV record <xref target="RFC2782" format="default" sectionFormat="of" derivedContent="RFC2782"/>
   for this name. The SRV RDATA is as follows:
      </t>
      <table anchor="SRV-RDATA" align="center" pn="table-3">
        <name slugifiedName="name-srv-rdata">SRV RDATA</name>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">PRIORITY</td>
            <td align="left" colspan="1" rowspan="1">typically 0</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">WEIGHT</td>
            <td align="left" colspan="1" rowspan="1">typically 0</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">PORT</td>
            <td align="left" colspan="1" rowspan="1">typically 53 or 5352</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">TARGET</td>
            <td align="left" colspan="1" rowspan="1">name of server providing LLQs for the requested zone</td>
          </tr>
        </tbody>
      </table>
      <t pn="section-4-8">
   The server <bcp14>SHOULD</bcp14> include the address record(s) for the
   target host in the Additional
   section of the response.
      </t>
      <t pn="section-4-9">
   If the server does not include the target host's address record(s) in the
   Additional
   section, the client <bcp14>SHOULD</bcp14> query explicitly for the address
   record(s)
   with the name of the SRV target.
      </t>
      <t pn="section-4-10">
   The client <bcp14>MUST</bcp14> send all LLQ requests, refreshes, and
   acknowledgments to the name server specified in the SRV target, at the
   address contained in the address record for that target. Note that the
   queries described in this section (including those for SOA and SRV records)
   <bcp14>MAY</bcp14> be sent to an intermediate DNS recursive resolver --
   they
   need not be sent directly to the name server.
      </t>
      <t pn="section-4-11">
   If, on issuing the SRV query, the client receives a negative
   response indicating that the SRV record does not exist, the client
   <bcp14>SHOULD</bcp14> conclude that the zone does not support LLQ.
   The client then <bcp14>SHOULD NOT</bcp14> send an LLQ request for
   the desired name, instead utilizing the behavior for LLQ-unaware
   servers described in <xref target="llq-setup" format="default" sectionFormat="of" derivedContent="Section 5"/>, "<xref target="llq-setup" format="title" sectionFormat="of" derivedContent="LLQ Setup"/>".
      </t>
      <t pn="section-4-12">
   Servers should send all messages to the source address and port of
   the LLQ setup message received from the client.
      </t>
    </section>
    <section numbered="true" toc="include" anchor="llq-setup" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-llq-setup">LLQ Setup</name>
      <t pn="section-5-1">
   An LLQ is initiated by a client and is completed via a four-way
   handshake. This handshake provides resilience to packet loss,
   demonstrates client reachability, and reduces denial-of-service
   attack opportunities (see <xref target="security-considerations" format="default" sectionFormat="of" derivedContent="Section 8"/>, "<xref target="security-considerations" format="title" sectionFormat="of" derivedContent="Security Considerations"/>").
      </t>
      <section numbered="true" toc="include" anchor="setup-message-retransmission" removeInRFC="false" pn="section-5.1">
        <name slugifiedName="name-setup-message-retransmissio">Setup Message Retransmission</name>
        <t pn="section-5.1-1">
   LLQ Setup Requests and Responses sent by the client <bcp14>SHOULD</bcp14>
   be
   retransmitted if no acknowledgments are received. The client
   <bcp14>SHOULD</bcp14>
   retry up to two more times (for a total of 3 attempts) before
   considering the server down or unreachable. The client <bcp14>MUST</bcp14>
   wait at
   least 2 seconds before the first retransmission and 4 seconds between
   the first and second retransmissions. The client <bcp14>SHOULD</bcp14>
   listen for a
   response for at least 8 seconds after the 3rd attempt before
   considering the server down or unreachable. Upon determining a
   server to be down, a client <bcp14>MAY</bcp14> periodically attempt to
   re-initiate
   an LLQ setup at a rate of not more than once per hour.
        </t>
        <t pn="section-5.1-2">
   Servers <bcp14>MUST NOT</bcp14> retransmit acknowledgments that do not
   generate
   responses from the client. Retransmission in setup is client driven,
   freeing servers from maintaining timers for incomplete LLQ setups. If
   servers receive duplicate messages from clients (perhaps due to the
   loss of the server's responses mid-flight), the server <bcp14>MUST</bcp14>
   resend
   its reply (possibly modifying the LLQ‑LEASE as described in <xref target="ack-answers" format="default" sectionFormat="of" derivedContent="Section 5.2.4"/>, "<xref target="ack-answers" format="title" sectionFormat="of" derivedContent="ACK + Answers"/>").
        </t>
        <t pn="section-5.1-3">
   Servers <bcp14>MUST NOT</bcp14> garbage collect LLQs that fail to complete
   the four-way handshake until the initially granted LLQ‑LEASE has
   elapsed.
        </t>
      </section>
      <section numbered="true" toc="include" anchor="four-way-handshake" removeInRFC="false" pn="section-5.2">
        <name slugifiedName="name-llq-setup-four-way-handshak">LLQ Setup Four-Way Handshake</name>
        <t pn="section-5.2-1">The four phases of the handshake include:
</t>
        <ul empty="true" bare="false" spacing="normal" pn="section-5.2-2">
          <li pn="section-5.2-2.1">
            <dl indent="24" newline="false" spacing="normal" pn="section-5.2-2.1.1">
              <dt pn="section-5.2-2.1.1.1">1)  Setup Request
</dt>
              <dd pn="section-5.2-2.1.1.2">client to server, identifies LLQ(s) requested
</dd>
              <dt pn="section-5.2-2.1.1.3">2)  Setup Challenge
</dt>
              <dd pn="section-5.2-2.1.1.4">server to client, provides
unique identifiers for successful requested LLQs, and
error(s) for unsuccessful requested LLQs.
</dd>
              <dt pn="section-5.2-2.1.1.5">3)  Challenge Response
</dt>
              <dd pn="section-5.2-2.1.1.6">client to server, echoes identifier(s), demonstrating client's
reachability and willingness to participate
</dd>
              <dt pn="section-5.2-2.1.1.7">4)  ACK + Answers
</dt>
              <dd pn="section-5.2-2.1.1.8">server to client, confirms setup and provides initial answers
</dd>
            </dl>
          </li>
        </ul>
        <section numbered="true" toc="include" anchor="setup-request" removeInRFC="false" pn="section-5.2.1">
          <name slugifiedName="name-setup-request">Setup Request</name>
          <t pn="section-5.2.1-1">
   A request for an LLQ is formatted like a standard DNS query but with
   an OPT pseudo‑RR containing LLQ metadata in its Additional
   section. LLQ
   Setup Requests are identified by the LLQ‑SETUP opcode and a
   zero‑valued LLQ‑ID.
          </t>
          <t pn="section-5.2.1-2">
   The request <bcp14>MAY</bcp14> contain multiple questions to set up
   multiple LLQs.
   A Setup Request consisting of multiple questions <bcp14>MUST</bcp14>
   contain multiple LLQ
   OPTIONS, one per question, with the LLQ OPTIONS in the
   same order as the questions they correspond to (i.e., the first
   LLQ OPTION corresponds to the first question, the second
   LLQ OPTION corresponds to the second question, etc.). If
   requesting multiple LLQs, clients <bcp14>SHOULD</bcp14> request the same
   LLQ‑LEASE
   for each LLQ. Requests over UDP <bcp14>MUST NOT</bcp14> contain multiple
   questions
   if doing so would cause the message to exceed a single IP packet.
          </t>
          <t pn="section-5.2.1-3">
   A client <bcp14>MUST NOT</bcp14> request multiple identical LLQs (i.e.,
   containing
   the same qname/type/class) from the same source IP address and port.
   This requirement is to avoid unnecessary load on servers.

   In the case of multiple independent client implementations that
   may run on the same device without knowledge of each other,
   it is allowable if they by chance send LLQ requests for the same
   qname/type/class. These independent implementations on the same
   client will be using different source ports. Likewise,
   to the server,
   multiple independent clients behind the same NAT gateway
   will appear as if they were
   multiple independent clients using different ports on the same host,
   and this is also allowable.


          </t>
          <t pn="section-5.2.1-4">
   The query <bcp14>MUST NOT</bcp14> be for record type ANY (255), class ANY
   (255), or
   class NONE (0).
          </t>
          <table anchor="OPT-RR-LLQ" align="center" pn="table-4">
            <name slugifiedName="name-setup-request-llq-option-fo">Setup Request LLQ OPTION Format</name>
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Field Name</th>
                <th align="left" colspan="1" rowspan="1">Field Type</th>
                <th align="left" colspan="1" rowspan="1">Description</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">OPTION-CODE</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">LLQ (1)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">OPTION-LENGTH</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">Length of following fields (18)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-VERSION</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">Version of LLQ protocol implemented by requester (1)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-OPCODE</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">LLQ-SETUP (1)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-ERROR</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">NO-ERROR (0)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-ID</td>
                <td align="left" colspan="1" rowspan="1">u_int64_t</td>
                <td align="left" colspan="1" rowspan="1">0</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-LEASE</td>
                <td align="left" colspan="1" rowspan="1">u_int32_t</td>
                <td align="left" colspan="1" rowspan="1">Desired life of LLQ request</td>
              </tr>
            </tbody>
          </table>
          <t pn="section-5.2.1-6">The Setup Request LLQ OPTION <bcp14>MUST</bcp14> be repeated once for each
additional query in the
Question section.
</t>
        </section>
        <section numbered="true" toc="include" anchor="setup-challenge" removeInRFC="false" pn="section-5.2.2">
          <name slugifiedName="name-setup-challenge">Setup Challenge</name>
          <t pn="section-5.2.2-1">
   Upon receiving an LLQ Setup Request, a server implementing LLQs will
   send a Setup Challenge to the requester (client). An LLQ Setup
   Challenge is a DNS response, with the DNS message ID matching that of
   the Setup Request, and with all questions contained in the Setup Request
   present
   in the Question section of the response. Additionally, the
   challenge contains a single OPT pseudo‑RR with an LLQ OPTION for
   each LLQ request, indicating the success or failure of each request.
   The LLQ OPTIONS <bcp14>MUST</bcp14> be in the same order as the questions
   they
   correspond to. Note that in a Setup Request containing multiple
   questions, some LLQs may succeed while others may fail.
          </t>
          <table anchor="CHALLENGE-OPT-RR-DATA" align="center" pn="table-5">
            <name slugifiedName="name-setup-challenge-llq-option-">Setup Challenge LLQ OPTION Format</name>
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Field Name</th>
                <th align="left" colspan="1" rowspan="1">Field Type</th>
                <th align="left" colspan="1" rowspan="1">Description</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">OPTION-CODE</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">LLQ (1)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">OPTION-LENGTH</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">Length of following fields (18)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-VERSION</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">Version of LLQ protocol implemented in server (1)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-OPCODE</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">LLQ-SETUP (1)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-ERROR</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">[As Appropriate]</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-ID</td>
                <td align="left" colspan="1" rowspan="1">u_int64_t</td>
                <td align="left" colspan="1" rowspan="1">[As Appropriate]</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-LEASE</td>
                <td align="left" colspan="1" rowspan="1">u_int32_t</td>
                <td align="left" colspan="1" rowspan="1">[As Appropriate]</td>
              </tr>
            </tbody>
          </table>
          <t pn="section-5.2.2-3">
   The Setup Challenge LLQ OPTION <bcp14>MUST</bcp14> be repeated once for
   each query in the Questions
   section of the Setup Challenge.
   Further details for LLQ‑ERROR, LLQ‑ID and LLQ‑LEASE are
   given below.
          </t>
          <t pn="section-5.2.2-4">
   LLQ‑ERROR:
          </t>
          <ul empty="true" bare="false" spacing="normal" pn="section-5.2.2-5">
            <li pn="section-5.2.2-5.1">
              <dl indent="18" newline="false" spacing="normal" pn="section-5.2.2-5.1.1">
                <dt pn="section-5.2.2-5.1.1.1">NO-ERROR:
                </dt>
                <dd pn="section-5.2.2-5.1.1.2">The LLQ Setup Request was successful.
         </dd>
                <dt pn="section-5.2.2-5.1.1.3">FORMAT-ERR:
</dt>
                <dd pn="section-5.2.2-5.1.1.4">The LLQ was improperly formatted.  Note that if the rest of the DNS
message is properly formatted, the DNS header error code <bcp14>MUST NOT</bcp14> include a format error code, since to do so would cause ambiguity
between the case where a client sends a valid LLQ Setup Request to a server
that does not understand LLQ and the case where a client sends a malformed
LLQ Setup Request to a server that does understand LLQ.
</dd>
                <dt pn="section-5.2.2-5.1.1.5">SERV-FULL:
</dt>
                <dd pn="section-5.2.2-5.1.1.6">The server cannot grant the LLQ request because it is overloaded or the
request exceeds the server's rate limit (see <xref target="security-considerations" format="default" sectionFormat="of" derivedContent="Section 8"/>, <xref target="security-considerations" format="title" sectionFormat="of" derivedContent="Security Considerations"/>).  Upon
returning this error, the server <bcp14>MUST</bcp14> include in the LLQ-LEASE
field a time interval, in seconds, after which the client may retry the LLQ
Setup.
</dd>
                <dt pn="section-5.2.2-5.1.1.7">STATIC:
</dt>
                <dd pn="section-5.2.2-5.1.1.8">The data for this name and type is not expected to change frequently, and
the server, therefore, does not support the requested LLQ.  The client
<bcp14>MUST</bcp14> honor the resource record TTLs returned and
<bcp14>MUST NOT</bcp14> poll sooner than indicated by those TTLs,
nor should it retry the LLQ Setup for this name and type.
</dd>
                <dt pn="section-5.2.2-5.1.1.9">BAD-VERS:
</dt>
                <dd pn="section-5.2.2-5.1.1.10">The protocol version specified in the client's Setup Request is not
supported by
the server.
</dd>
                <dt pn="section-5.2.2-5.1.1.11">UNKNOWN-ERR:
</dt>
                <dd pn="section-5.2.2-5.1.1.12">The LLQ was not granted for some other reason not covered by the preceding
error code values.
</dd>
              </dl>
            </li>
          </ul>
          <dl indent="18" newline="false" spacing="normal" pn="section-5.2.2-6">
            <dt pn="section-5.2.2-6.1">LLQ‑ID:
</dt>
            <dd pn="section-5.2.2-6.2">On success, a random number generated by the server that is unique on the
server for the
requested name/type/class. The LLQ‑ID <bcp14>SHOULD</bcp14> be an
unpredictable random number. A possible method of allocating LLQ‑IDs with
minimal bookkeeping would be to store the time, in seconds since the Epoch, in
the high 32 bits of the field, and a cryptographically generated 32-bit random
integer in the low 32 bits.
</dd>
            <dt pn="section-5.2.2-6.3">
</dt>
            <dd pn="section-5.2.2-6.4">
On error, the LLQ‑ID is set to 0. 
</dd>
            <dt pn="section-5.2.2-6.5">LLQ‑LEASE:
</dt>
            <dd pn="section-5.2.2-6.6">On success, the actual life of the LLQ, in seconds.  Value may be greater
than, less than, or equal to the value requested by the client, as per the
server administrator's policy. The server <bcp14>MAY</bcp14> discard the LLQ
after this LLQ‑LEASE expires unless the LLQ has been renewed by the
client (see <xref target="LLQ-LLE" format="default" sectionFormat="of" derivedContent="Section 7"/>, "<xref target="LLQ-LLE" format="title" sectionFormat="of" derivedContent="LLQ Lease-Life Expiration"/>").  The server <bcp14>MUST NOT</bcp14> generate events (see
<xref target="event-responses" format="default" sectionFormat="of" derivedContent="Section 6"/>, "<xref target="event-responses" format="title" sectionFormat="of" derivedContent="Event Responses"/>") for expired LLQs.
</dd>
            <dt pn="section-5.2.2-6.7"/>
            <dd pn="section-5.2.2-6.8">
 On SERV‑FULL error, LLQ‑LEASE <bcp14>MUST</bcp14> be set to a time
 interval, in seconds, after which the client may retry the LLQ Setup.
</dd>
            <dt pn="section-5.2.2-6.9">
</dt>
            <dd pn="section-5.2.2-6.10">
On other errors, the LLQ‑LEASE <bcp14>MUST</bcp14> be set to 0.
</dd>
          </dl>
        </section>
        <section numbered="true" toc="include" anchor="challenge-response" removeInRFC="false" pn="section-5.2.3">
          <name slugifiedName="name-challenge-response">Challenge Response</name>
          <t pn="section-5.2.3-1">

   Upon issuing a Setup Request, a client listens for a Setup Challenge
   (<xref target="setup-challenge" format="default" sectionFormat="of" derivedContent="Section 5.2.2"/>) retransmitting the Setup Request as
   necessary
   (<xref target="setup-message-retransmission" format="default" sectionFormat="of" derivedContent="Section 5.1"/>). After
   receiving a successful Setup Challenge, the client <bcp14>SHOULD</bcp14>
   send a Challenge
   Response to the server. This Challenge Response is a DNS request
   with questions as in the Setup Request and Setup Challenge, and a single
   OPT pseudo‑RR in
   the Additional section, with the LLQ OPTIONS corresponding to the
   LLQ OPTIONS contained in the Setup Challenge (i.e., echoing, for
   each LLQ OPTION, the random LLQ‑ID and the granted LLQ‑LEASE). If
   the Challenge Response contains multiple questions, the first
   question <bcp14>MUST</bcp14> correspond to the first LLQ OPTION, etc.
          </t>
          <t pn="section-5.2.3-2">
   If the Setup Request for a particular LLQ fails with a STATIC error, the
   client <bcp14>MUST NOT</bcp14>
   poll the server for that LLQ. The client <bcp14>SHOULD</bcp14> honor the
   resource record TTLs
   contained in the response.
          </t>
          <t pn="section-5.2.3-3">
   If a Setup Request fails with a SERV‑FULL error, the client
   <bcp14>MAY</bcp14>
   retry the LLQ Setup Request (<xref target="setup-request" format="default" sectionFormat="of" derivedContent="Section 5.2.1"/>) after the time
   indicated in the
   LLQ‑LEASE field.
          </t>
          <t pn="section-5.2.3-4">
   If the Setup Request fails with an error other than STATIC or
   SERV‑FULL, or the server is determined not to support LLQ
   (i.e., the client receives a DNS response with a nonzero RCODE,
   or a DNS response containing no LLQ option), the
   client <bcp14>MAY</bcp14> poll the server periodically with standard DNS
   queries,
   inferring Add and Remove Events (see <xref target="event-responses" format="default" sectionFormat="of" derivedContent="Section 6"/>,
   "Event Responses")
   by comparing answers to these queries. The client
   <bcp14>SHOULD NOT</bcp14> poll more than once every 15 minutes for a given
   query.
   The client <bcp14>MUST NOT</bcp14> poll if it receives a STATIC error code
   in the
   acknowledgment.
          </t>
        </section>
        <section numbered="true" toc="include" anchor="ack-answers" removeInRFC="false" pn="section-5.2.4">
          <name slugifiedName="name-ack-answers">ACK + Answers</name>
          <t pn="section-5.2.4-1">

   Upon receiving a correct Challenge Response, a server <bcp14>MUST</bcp14>
   return an
   acknowledgment, completing the LLQ setup, and provide all current
   answers to the question(s).
          </t>
          <t pn="section-5.2.4-2">
   To acknowledge a successful Challenge Response, i.e., a Challenge
   Response in which the LLQ‑ID and LLQ‑LEASE echoed by the client
   match the values issued by the server, the server <bcp14>MUST</bcp14> send
   a DNS
   response containing all available answers to the question(s)
   contained in the original Setup Request, along with all additional
   resource records appropriate for those answers in the Additional
   section. The Additional section also contains LLQ OPTIONS formatted as
   follows:
          </t>
          <table anchor="SUCCESSFUL-ACK-ANSWERS-OPT-RR-RDATA" align="center" pn="table-6">
            <name slugifiedName="name-successful-ack-answers-llq-">Successful ACK + Answers LLQ OPTION Format</name>
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Field Name</th>
                <th align="left" colspan="1" rowspan="1">Field Type</th>
                <th align="left" colspan="1" rowspan="1">Description</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">OPTION-CODE</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">LLQ (1)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">OPTION-LENGTH</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">Length of following fields (18)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-VERSION</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">Version of LLQ protocol implemented in server (1)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-OPCODE</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">LLQ-SETUP (1)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-ERROR</td>
                <td align="left" colspan="1" rowspan="1">u_int16_t</td>
                <td align="left" colspan="1" rowspan="1">NO-ERROR (0)</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-ID</td>
                <td align="left" colspan="1" rowspan="1">u_int64_t</td>
                <td align="left" colspan="1" rowspan="1">Originally granted ID, echoed in client's Response</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">LLQ-LEASE</td>
                <td align="left" colspan="1" rowspan="1">u_int32_t</td>
                <td align="left" colspan="1" rowspan="1">Remaining life of LLQ, in seconds</td>
              </tr>
            </tbody>
          </table>
          <t pn="section-5.2.4-4">
   If there is a significant delay in receiving a Challenge Response, or
   multiple Challenge Responses are issued (possibly because they were lost
   en route to the client, causing the client to resend the Challenge
   Response), the server <bcp14>MAY</bcp14> decrement the LLQ‑LEASE by
   the time
   elapsed since the Setup Challenge was initially issued.
          </t>
          <t pn="section-5.2.4-5">
   If the setup is completed over UDP and all initially available
   answers to the question(s), additional records, and the OPT pseudo‑RR
   do not
   fit in a single IP packet, some or all additional records (excluding the
   OPT pseudo‑RR) <bcp14>MUST</bcp14> be omitted. If, after omission of
   all additional
   records, the answers still do not fit in a single message, answers
   <bcp14>MUST</bcp14> be removed until the message fits in a single IP
   packet. These
   answers not delivered in the ACK + Answers <bcp14>MUST</bcp14> be delivered
   without undue delay to the client via Add Events (<xref target="event-responses" format="default" sectionFormat="of" derivedContent="Section 6"/>, "<xref target="event-responses" format="title" sectionFormat="of" derivedContent="Event Responses"/>").
          </t>
        </section>
      </section>
      <section numbered="true" toc="include" anchor="resource-record-ttls" removeInRFC="false" pn="section-5.3">
        <name slugifiedName="name-resource-record-ttls">Resource Record TTLs</name>
        <t pn="section-5.3-1">
   The TTLs of resource records contained in answers to successful LLQs
   <bcp14>SHOULD</bcp14> be ignored by the client. The client
   <bcp14>MAY</bcp14> cache LLQ answers until the client receives a gratuitous
   announcement (see <xref target="event-responses" format="default" sectionFormat="of" derivedContent="Section 6"/>, "<xref target="event-responses" format="title" sectionFormat="of" derivedContent="Event Responses"/>")
   indicating that the answer to the LLQ has changed.  The client
   <bcp14>SHOULD NOT</bcp14> cache answers after the LLQs LLQ‑LEASE
   expires without being refreshed (see <xref target="LLQ-LLE" format="default" sectionFormat="of" derivedContent="Section 7"/>, "LLQ
   Lease-Life Expiration").  If an LLQ request fails, the client <bcp14>SHOULD NOT</bcp14> cache answers for a period longer than the client's polling
   interval.
        </t>
        <t pn="section-5.3-2">
   Note that resource records intended specifically to be transmitted
   via LLQs (e.g., DNS-based Service Discovery resource records) may have
   unusually short TTLs. This is because it is assumed that the records
   may change frequently, and that a client's cache coherence will be
   maintained via the LLQ and gratuitous responses. Short TTLs prevent
   stale information from residing in intermediate DNS recursive resolvers
   that are
   not LLQ aware.
        </t>
        <t pn="section-5.3-3">
   TTLs of resource records included in the Additional section of an
   LLQ response (which do not directly answer the LLQ) <bcp14>SHOULD</bcp14>
   be honored
   by the client.
        </t>
      </section>
    </section>
    <section numbered="true" toc="include" anchor="event-responses" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-event-responses">Event Responses</name>
      <t pn="section-6-1">
   When a change ("event") occurs to a name server's zone, the server
   <bcp14>MUST</bcp14> check if the new or deleted resource records answer any
   LLQs.
   If so, the changes <bcp14>MUST</bcp14> be communicated to the LLQ
   requesters in
   the form of a gratuitous DNS response sent to the client, with the
   relevant question(s) in the Question section, and the corresponding answers
   in the Answer section. The response also includes
   an OPT pseudo‑RR in the Additional section. This OPT pseudo‑RR
   contains, in its
   RDATA, an LLQ OPTION for each LLQ being answered in the message. Each LLQ
   OPTION
   must include the LLQ‑ID. This reduces the potential for spoof events
   being sent to a client.
      </t>
      <table anchor="EVENT-RESPONSE-OPT-RR-RDATA" align="center" pn="table-7">
        <name slugifiedName="name-event-response-llq-option-f">Event Response LLQ OPTION Format</name>
        <thead>
          <tr>
            <th align="left" colspan="1" rowspan="1">Field Name</th>
            <th align="left" colspan="1" rowspan="1">Field Type</th>
            <th align="left" colspan="1" rowspan="1">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">OPTION-CODE</td>
            <td align="left" colspan="1" rowspan="1">u_int16_t</td>
            <td align="left" colspan="1" rowspan="1">LLQ (1)</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">OPTION-LENGTH</td>
            <td align="left" colspan="1" rowspan="1">u_int16_t</td>
            <td align="left" colspan="1" rowspan="1">Length of following fields (18)</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">LLQ-VERSION</td>
            <td align="left" colspan="1" rowspan="1">u_int16_t</td>
            <td align="left" colspan="1" rowspan="1">Version of LLQ protocol implemented in server (1)</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">LLQ-OPCODE</td>
            <td align="left" colspan="1" rowspan="1">u_int16_t</td>
            <td align="left" colspan="1" rowspan="1">LLQ-EVENT (3)</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">LLQ-ERROR</td>
            <td align="left" colspan="1" rowspan="1">u_int16_t</td>
            <td align="left" colspan="1" rowspan="1">NO-ERROR (0)</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">LLQ-ID</td>
            <td align="left" colspan="1" rowspan="1">u_int64_t</td>
            <td align="left" colspan="1" rowspan="1">[As Appropriate]</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">LLQ-LEASE</td>
            <td align="left" colspan="1" rowspan="1">u_int32_t</td>
            <td align="left" colspan="1" rowspan="1">0</td>
          </tr>
        </tbody>
      </table>
      <t pn="section-6-3">
   Gratuitous responses for a single LLQ <bcp14>MAY</bcp14> be batched such
   that
   multiple changes are communicated in a single message.
   Responses <bcp14>MUST NOT</bcp14> be batched if this would cause a message
   that
   would otherwise fit in a single IP packet to be truncated. While
   responses <bcp14>MAY</bcp14> be deferred to provide opportunities for
   batching,
   responses <bcp14>SHOULD NOT</bcp14> be delayed, for purposes of batching,
   for more
   than 30 seconds, as this would cause an unacceptable latency for the
   client.
      </t>
      <t pn="section-6-4">
   After sending a gratuitous response, the server <bcp14>MUST</bcp14> listen
   for an
   acknowledgment from the client. If the client does not respond, the
   server <bcp14>MUST</bcp14> resend the response. The server
   <bcp14>MUST</bcp14> resend two times
   (for a total of 3 transmissions), after which the server
   <bcp14>MUST</bcp14>
   consider the client to be unreachable and delete its LLQ. The server
   <bcp14>MUST</bcp14> listen for 2 seconds before resending the response, 4
   more
   seconds before resending again, and must wait an additional 8
   seconds after the 3rd transmission before terminating the LLQ.
      </t>
      <t pn="section-6-5">
   The DNS message header of the response <bcp14>SHOULD</bcp14> include an
   unpredictable
   random number in the DNS message ID field, which is to be echoed in
   the client's acknowledgment.
      </t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-6.1">
        <name slugifiedName="name-add-events">Add Events</name>
        <t pn="section-6.1-1">
   Add Events occur when a new resource record appears, usually as the
   result of a dynamic update <xref target="RFC2136" format="default" sectionFormat="of" derivedContent="RFC2136"/>, that
   answers an LLQ. This
   record must be sent in the Answer section of the event to the client.
   Records that normally accompany this record in responses <bcp14>MAY</bcp14>
   be
   included in the Additional section as per truncation restrictions
   described above.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-6.2">
        <name slugifiedName="name-remove-events">Remove Events</name>
        <t pn="section-6.2-1">
   Remove Events occur when a resource record previously sent to a
   client, either in an initial response or in an Add Event, becomes
   invalid (normally as a result of being removed via a dynamic update).
   The deleted resource record is sent in the Answer section of the
   event to the client. The resource record TTL is set to -1,
   indicating that the record has been removed.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-6.3">
        <name slugifiedName="name-gratuitous-response-acknowl">Gratuitous Response Acknowledgments</name>
        <t pn="section-6.3-1">
   Upon receiving a gratuitous response ("event"), the client
   <bcp14>MUST</bcp14> send
   an acknowledgment to the server. This acknowledgment is a DNS
   response echoing the OPT pseudo‑RR contained in the event, with the
   message
   ID of the gratuitous response echoed in the message header. The
   acknowledgment <bcp14>MUST</bcp14> be sent to the source IP address and
   port from
   which the event originated.
        </t>
      </section>
    </section>
    <section numbered="true" toc="include" anchor="LLQ-LLE" removeInRFC="false" pn="section-7">
      <name slugifiedName="name-llq-lease-life-expiration">LLQ Lease-Life Expiration</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.1">
        <name slugifiedName="name-refresh-request">Refresh Request</name>
        <t pn="section-7.1-1">
   If the client desires to maintain the LLQ beyond the duration specified in
   the LLQ‑LEASE field of the ACK + Answers (<xref target="ack-answers" format="default" sectionFormat="of" derivedContent="Section 5.2.4"/>), the client <bcp14>MUST</bcp14> send a
   Refresh Request. A Refresh Request is identical to an LLQ Challenge
   Response (<xref target="challenge-response" format="default" sectionFormat="of" derivedContent="Section 5.2.3"/>) but with the LLQ‑OPCODE
   set to
   LLQ‑REFRESH. Unlike a Challenge Response, a Refresh Request returns no
   answers.
        </t>
        <t pn="section-7.1-2">
   The client <bcp14>SHOULD</bcp14> refresh an LLQ when 80% of its
   LLQ‑LEASE has
   elapsed.
        </t>
        <t pn="section-7.1-3">
   As a means of reducing network traffic, when constructing refresh
   messages the client <bcp14>SHOULD</bcp14> include all LLQs established with
   a given
   server, even those not yet close to expiration. However, at least
   one LLQ <bcp14>MUST</bcp14> have elapsed at least 80% of its original
   LLQ‑LEASE.
   The client <bcp14>MUST NOT</bcp14> include additional LLQs if doing so
   would cause
   the message to no longer fit in a single IP packet. In this case, the
   LLQs furthest from expiration should be omitted such that the message
   fits in a single IP packet.  (These LLQs <bcp14>SHOULD</bcp14> be refreshed
   in a
   separate message when 80% of one or more of their lease lives have
   elapsed.)  When refreshing multiple LLQs simultaneously, the message
   contains multiple questions and a single OPT pseudo‑RR with multiple
   LLQ
   OPTIONS, one per question, with the LLQ OPTIONS in
   the same order as the questions they correspond to.
        </t>
        <t pn="section-7.1-4">
   The client <bcp14>SHOULD</bcp14> specify the original LLQ‑LEASE
   granted in the LLQ
   response as the desired LLQ‑LEASE in the Refresh Request. If
   refreshing multiple LLQs simultaneously, the client <bcp14>SHOULD</bcp14>
   request
   the same LLQ‑LEASE for all LLQs being refreshed (with the exception
   of termination requests; see below).
        </t>
        <t pn="section-7.1-5">
   To terminate an LLQ prior
   to its scheduled expiration (for instance, when the client terminates
   a DNS-based Service Discovery browse operation or when a client is about to go
   to sleep or shut down), the client specifies an LLQ‑LEASE value of 0.
        </t>
        <t pn="section-7.1-6">
   The client <bcp14>MUST</bcp14> listen for an acknowledgment from the
   server. The
   client <bcp14>MAY</bcp14> retry up to two more times (for a total of 3
   attempts)
   before considering the server down or unreachable. The client <bcp14>MUST NOT</bcp14> retry a first time before 90% of the LLQ‑LEASE has expired
   and
   <bcp14>MUST NOT</bcp14> retry again before 95% of the LLQ‑LEASE has
   expired. If
   the server is determined to be down, the client <bcp14>MAY</bcp14>
   periodically
   attempt to re-establish the LLQ via an LLQ Setup Request message.
   The client <bcp14>MUST NOT</bcp14> attempt the LLQ Setup Request more than
   once per
   hour.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-7.2">
        <name slugifiedName="name-llq-refresh-acknowledgment">LLQ Refresh Acknowledgment</name>
        <t pn="section-7.2-1">
   Upon receiving an LLQ Refresh message, a server <bcp14>MUST</bcp14> send an
   acknowledgment of the Refresh. This acknowledgment is formatted like
   the "ACK + Answers" message described in <xref target="ack-answers" format="default" sectionFormat="of" derivedContent="Section 5.2.4"/>, but
   with the following variations:
        </t>
        <ul bare="false" empty="false" spacing="normal" pn="section-7.2-2">
          <li pn="section-7.2-2.1">
            <t pn="section-7.2-2.1.1">
   It contains no answers.
            </t>
          </li>
          <li pn="section-7.2-2.2">
            <t pn="section-7.2-2.2.1">
   The LLQ‑OPCODE is set to LLQ‑REFRESH.
            </t>
          </li>
          <li pn="section-7.2-2.3">
            <t pn="section-7.2-2.3.1">
   NO‑SUCH‑LLQ <bcp14>MUST</bcp14> be returned as an error code if
   the client attempts
   to refresh an expired or non-existent LLQ (as determined by the
   LLQ‑ID in the request).
            </t>
          </li>
          <li pn="section-7.2-2.4">
            <t pn="section-7.2-2.4.1">
   The LLQ‑ID in the acknowledgment is set to the LLQ‑ID in the
   request.
            </t>
          </li>
        </ul>
      </section>
    </section>
    <section numbered="true" toc="include" anchor="security-considerations" removeInRFC="false" pn="section-8">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t pn="section-8-1">
   In datagram-based protocols
   (i.e., protocols running over UDP, or directly over IP, or similar), servers
   may be susceptible to denial-of-service (DoS) attacks, and clients
   may be subjected to packet storms. Carefully designed mechanisms are needed
   to limit potential for these attacks.
      </t>
      <t pn="section-8-2">
   Note: This section contains no new protocol elements -- it serves
   only to explain the rationale behind protocol elements described
   above as they relate to security.
      </t>
      <section numbered="true" toc="include" anchor="server-dos" removeInRFC="false" pn="section-8.1">
        <name slugifiedName="name-server-dos">Server DoS</name>
        <t pn="section-8.1-1">
   LLQs require that servers be stateful, maintaining entries for each LLQ
   over a potentially long period of time. If unbounded in quantity, these
   entries may overload the server. By returning SERV‑FULL in Setup
   Challenges, the server may limit the maximum number of LLQs it
   maintains. Additionally, the server may return SERV‑FULL to limit the
   number of LLQs requested for a single name and type, or by a single
   client. This throttling may be in the form of a hard limit, or, preferably,
   by token-bucket rate limiting. Such rate limiting should occur rarely in
   normal use and is intended to prevent DoS attacks -- thus, it is not built
   into the protocol explicitly but is instead implemented at the discretion
   of an administrator via the SERV‑FULL error and the LLQ‑LEASE
   field to indicate a retry time to the client.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-8.2">
        <name slugifiedName="name-client-packet-storms">Client Packet Storms</name>
        <t pn="section-8.2-1">
   In addition to protecting the server from DoS attacks, the LLQ protocol
   limits the ability of a malicious host to cause the server to flood a
   client with packets. This is achieved via the four-way handshake
   upon setup, demonstrating reachability and willingness of the client
   to participate, and by requiring that gratuitous responses be ACK'd
   by the client.
        </t>
        <t pn="section-8.2-2">
   Additionally, rate limiting by LLQ client address, as described in
   <xref target="server-dos" format="default" sectionFormat="of" derivedContent="Section 8.1"/>, serves to limit the number of packets that can
   be delivered to
   an unsuspecting client.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-8.3">
        <name slugifiedName="name-spoofing">Spoofing</name>
        <t pn="section-8.3-1">
   A large random ID greatly reduces the risk of an off-path attacker
   sending spoof packets to the client (containing spoof events)
   or to the server (containing phony requests or refreshes).
        </t>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-9">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t pn="section-9-1">
  The EDNS(0) OPTION CODE 1 has already been assigned for this DNS extension.
  IANA has updated the record in the "DNS EDNS0 Option Codes (OPT)" registry
  from "On-hold" to "Optional" and has set the reference to this document.
      </t>
      <t pn="section-9-2">
  TCP and UDP ports 5352 have already been assigned for LLQ.  IANA has
  added a reference to this document.
      </t>
    </section>
  </middle>
  <back>
    <references pn="section-10">
      <name slugifiedName="name-references">References</name>
      <references pn="section-10.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="RFC1035" target="https://www.rfc-editor.org/info/rfc1035" quoteTitle="true" derivedAnchor="RFC1035">
          <front>
            <title>Domain names - implementation and specification</title>
            <author initials="P.V." surname="Mockapetris" fullname="P.V. Mockapetris">
              <organization showOnFrontPage="true"/>
            </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" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization showOnFrontPage="true"/>
            </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="RFC2782" target="https://www.rfc-editor.org/info/rfc2782" quoteTitle="true" derivedAnchor="RFC2782">
          <front>
            <title>A DNS RR for specifying the location of services (DNS SRV)</title>
            <author initials="A." surname="Gulbrandsen" fullname="A. Gulbrandsen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Vixie" fullname="P. Vixie">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="L." surname="Esibov" fullname="L. Esibov">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2000" month="February"/>
            <abstract>
              <t>This document describes a DNS RR which specifies the location of the server(s) for a specific protocol and domain.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2782"/>
          <seriesInfo name="DOI" value="10.17487/RFC2782"/>
        </reference>
        <reference anchor="RFC6891" target="https://www.rfc-editor.org/info/rfc6891" quoteTitle="true" derivedAnchor="RFC6891">
          <front>
            <title>Extension Mechanisms for DNS (EDNS(0))</title>
            <author initials="J." surname="Damas" fullname="J. Damas">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Graff" fullname="M. Graff">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Vixie" fullname="P. Vixie">
              <organization showOnFrontPage="true"/>
            </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>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8765" target="https://www.rfc-editor.org/info/rfc8765" quoteTitle="true" derivedAnchor="RFC8765">
          <front>
            <title>DNS Push Notifications</title>
            <author initials="T" surname="Pusateri" fullname="Tom Pusateri">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S" surname="Cheshire" fullname="Stuart Cheshire">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="June" year="2020"/>
          </front>
          <seriesInfo name="RFC" value="8765"/>
          <seriesInfo name="DOI" value="10.17487/RFC8765"/>
        </reference>
      </references>
      <references pn="section-10.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="RFC2136" target="https://www.rfc-editor.org/info/rfc2136" quoteTitle="true" derivedAnchor="RFC2136">
          <front>
            <title>Dynamic Updates in the Domain Name System (DNS UPDATE)</title>
            <author initials="P." surname="Vixie" fullname="P. Vixie" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Thomson" fullname="S. Thomson">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="Y." surname="Rekhter" fullname="Y. Rekhter">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Bound" fullname="J. Bound">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1997" month="April"/>
            <abstract>
              <t>Using this specification of the UPDATE opcode, it is possible to add or delete RRs or RRsets from a specified zone.  Prerequisites are specified separately from update operations, and can specify a dependency upon either the previous existence or nonexistence of an RRset, or the existence of a single RR.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2136"/>
          <seriesInfo name="DOI" value="10.17487/RFC2136"/>
        </reference>
        <reference anchor="RFC4787" target="https://www.rfc-editor.org/info/rfc4787" quoteTitle="true" derivedAnchor="RFC4787">
          <front>
            <title>Network Address Translation (NAT) Behavioral Requirements for Unicast UDP</title>
            <author initials="F." surname="Audet" fullname="F. Audet" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Jennings" fullname="C. Jennings">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2007" month="January"/>
            <abstract>
              <t>This document defines basic terminology for describing different types of Network Address Translation (NAT) behavior when handling Unicast UDP and also defines a set of requirements that would allow many applications, such as multimedia communications or online gaming, to work consistently.  Developing NATs that meet this set of requirements will greatly increase the likelihood that these applications will function properly.  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="127"/>
          <seriesInfo name="RFC" value="4787"/>
          <seriesInfo name="DOI" value="10.17487/RFC4787"/>
        </reference>
        <reference anchor="RFC4953" target="https://www.rfc-editor.org/info/rfc4953" quoteTitle="true" derivedAnchor="RFC4953">
          <front>
            <title>Defending TCP Against Spoofing Attacks</title>
            <author initials="J." surname="Touch" fullname="J. Touch">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2007" month="July"/>
            <abstract>
              <t>Recent analysis of potential attacks on core Internet infrastructure indicates an increased vulnerability of TCP connections to spurious resets (RSTs), sent with forged IP source addresses (spoofing).  TCP has always been susceptible to such RST spoofing attacks, which were indirectly protected by checking that the RST sequence number was inside the current receive window, as well as via the obfuscation of TCP endpoint and port numbers.  For pairs of well-known endpoints often over predictable port pairs, such as BGP or between web servers and well-known large-scale caches, increases in the path bandwidth-delay product of a connection have sufficiently increased the receive window space that off-path third parties can brute-force generate a viable RST sequence number.  The susceptibility to attack increases with the square of the bandwidth, and thus presents a significant vulnerability for recent high-speed networks.  This document addresses this vulnerability, discussing proposed solutions at the transport level and their inherent challenges, as well as existing network level solutions and the feasibility of their deployment.  This document focuses on vulnerabilities due to spoofed TCP segments, and includes a discussion of related ICMP spoofing attacks on TCP connections.  This memo provides information for the Internet community.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4953"/>
          <seriesInfo name="DOI" value="10.17487/RFC4953"/>
        </reference>
        <reference anchor="RFC5382" target="https://www.rfc-editor.org/info/rfc5382" quoteTitle="true" derivedAnchor="RFC5382">
          <front>
            <title>NAT Behavioral Requirements for TCP</title>
            <author initials="S." surname="Guha" fullname="S. Guha" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K." surname="Biswas" fullname="K. Biswas">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="B." surname="Ford" fullname="B. Ford">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Sivakumar" fullname="S. Sivakumar">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Srisuresh" fullname="P. Srisuresh">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2008" month="October"/>
            <abstract>
              <t>This document defines a set of requirements for NATs that handle TCP that would allow many applications, such as peer-to-peer applications and online games to work consistently.  Developing NATs that meet this set of requirements will greatly increase the likelihood that these applications will function properly.  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="142"/>
          <seriesInfo name="RFC" value="5382"/>
          <seriesInfo name="DOI" value="10.17487/RFC5382"/>
        </reference>
        <reference anchor="RFC6281" target="https://www.rfc-editor.org/info/rfc6281" quoteTitle="true" derivedAnchor="RFC6281">
          <front>
            <title>Understanding Apple's Back to My Mac (BTMM) Service</title>
            <author initials="S." surname="Cheshire" fullname="S. Cheshire">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="Z." surname="Zhu" fullname="Z. Zhu">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Wakikawa" fullname="R. Wakikawa">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="L." surname="Zhang" fullname="L. Zhang">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2011" month="June"/>
            <abstract>
              <t>This document describes the implementation of Apple Inc.'s Back to My Mac (BTMM) service.  BTMM provides network connectivity between devices so that a user can perform file sharing and screen sharing among multiple computers at home, at work, or on the road.  The implementation of BTMM addresses the issues of single sign-on authentication, secure data communication, service discovery, and end-to-end connectivity in the face of Network Address Translators (NATs) and mobility of devices.  This document is not an Internet  Standards Track specification; it is published for informational  purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6281"/>
          <seriesInfo name="DOI" value="10.17487/RFC6281"/>
        </reference>
        <reference anchor="RFC6762" target="https://www.rfc-editor.org/info/rfc6762" quoteTitle="true" derivedAnchor="RFC6762">
          <front>
            <title>Multicast DNS</title>
            <author initials="S." surname="Cheshire" fullname="S. Cheshire">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Krochmal" fullname="M. Krochmal">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2013" month="February"/>
            <abstract>
              <t>As networked devices become smaller, more portable, and more ubiquitous, the ability to operate with less configured infrastructure is increasingly important.  In particular, the ability to look up DNS resource record data types (including, but not limited to, host names) in the absence of a conventional managed DNS server is useful.</t>
              <t>Multicast DNS (mDNS) provides the ability to perform DNS-like operations on the local link in the absence of any conventional Unicast DNS server.  In addition, Multicast DNS designates a portion of the DNS namespace to be free for local use, without the need to pay any annual fee, and without the need to set up delegations or otherwise configure a conventional DNS server to answer for those names.</t>
              <t>The primary benefits of Multicast DNS names are that (i) they require little or no administration or configuration to set them up, (ii) they work when no infrastructure is present, and (iii) they work during infrastructure failures.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6762"/>
          <seriesInfo name="DOI" value="10.17487/RFC6762"/>
        </reference>
        <reference anchor="RFC6763" target="https://www.rfc-editor.org/info/rfc6763" quoteTitle="true" derivedAnchor="RFC6763">
          <front>
            <title>DNS-Based Service Discovery</title>
            <author initials="S." surname="Cheshire" fullname="S. Cheshire">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Krochmal" fullname="M. Krochmal">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2013" month="February"/>
            <abstract>
              <t>This document specifies how DNS resource records are named and structured to facilitate service discovery.  Given a type of service that a client is looking for, and a domain in which the client is looking for that service, this mechanism allows clients to discover a list of named instances of that desired service, using standard DNS queries. This mechanism is referred to as DNS-based Service Discovery, or DNS-SD.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6763"/>
          <seriesInfo name="DOI" value="10.17487/RFC6763"/>
        </reference>
        <reference anchor="RFC6886" target="https://www.rfc-editor.org/info/rfc6886" quoteTitle="true" derivedAnchor="RFC6886">
          <front>
            <title>NAT Port Mapping Protocol (NAT-PMP)</title>
            <author initials="S." surname="Cheshire" fullname="S. Cheshire">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Krochmal" fullname="M. Krochmal">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2013" month="April"/>
            <abstract>
              <t>This document describes a protocol for automating the process of creating Network Address Translation (NAT) port mappings.  Included in the protocol is a method for retrieving the external IPv4 address of a NAT gateway, thus allowing a client to make its external IPv4 address and port known to peers that may wish to communicate with it. From 2005 onwards, this protocol was implemented in Apple products including Mac OS X, Bonjour for Windows, and AirPort wireless base stations.  In 2013, NAT Port Mapping Protocol (NAT-PMP) was superseded by the IETF Standards Track RFC "Port Control Protocol (PCP)", which builds on NAT-PMP and uses a compatible packet format, but adds a number of significant enhancements.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6886"/>
          <seriesInfo name="DOI" value="10.17487/RFC6886"/>
        </reference>
        <reference anchor="RFC6887" target="https://www.rfc-editor.org/info/rfc6887" quoteTitle="true" derivedAnchor="RFC6887">
          <front>
            <title>Port Control Protocol (PCP)</title>
            <author initials="D." surname="Wing" fullname="D. Wing" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Cheshire" fullname="S. Cheshire">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Boucadair" fullname="M. Boucadair">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Penno" fullname="R. Penno">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="P." surname="Selkirk" fullname="P. Selkirk">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2013" month="April"/>
            <abstract>
              <t>The Port Control Protocol allows an IPv6 or IPv4 host to control how incoming IPv6 or IPv4 packets are translated and forwarded by a Network Address Translator (NAT) or simple firewall, and also allows a host to optimize its outgoing NAT keepalive messages.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6887"/>
          <seriesInfo name="DOI" value="10.17487/RFC6887"/>
        </reference>
        <reference anchor="RFC7857" target="https://www.rfc-editor.org/info/rfc7857" quoteTitle="true" derivedAnchor="RFC7857">
          <front>
            <title>Updates to Network Address Translation (NAT) Behavioral Requirements</title>
            <author initials="R." surname="Penno" fullname="R. Penno">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Perreault" fullname="S. Perreault">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Boucadair" fullname="M. Boucadair" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Sivakumar" fullname="S. Sivakumar">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K." surname="Naito" fullname="K. Naito">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2016" month="April"/>
            <abstract>
              <t>This document clarifies and updates several requirements of RFCs 4787, 5382, and 5508 based on operational and development experience. The focus of this document is Network Address Translation from IPv4 to IPv4 (NAT44).</t>
              <t>This document updates RFCs 4787, 5382, and 5508.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="127"/>
          <seriesInfo name="RFC" value="7857"/>
          <seriesInfo name="DOI" value="10.17487/RFC7857"/>
        </reference>
        <reference anchor="RFC8490" target="https://www.rfc-editor.org/info/rfc8490" quoteTitle="true" derivedAnchor="RFC8490">
          <front>
            <title>DNS Stateful Operations</title>
            <author initials="R." surname="Bellis" fullname="R. Bellis">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Cheshire" fullname="S. Cheshire">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Dickinson" fullname="J. Dickinson">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Dickinson" fullname="S. Dickinson">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="T." surname="Lemon" fullname="T. Lemon">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="T." surname="Pusateri" fullname="T. Pusateri">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2019" month="March"/>
            <abstract>
              <t>This document defines a new DNS OPCODE for DNS Stateful Operations (DSO).  DSO messages communicate operations within persistent stateful sessions using Type Length Value (TLV) syntax.  Three TLVs are defined that manage session timeouts, termination, and encryption padding, and a framework is defined for extensions to enable new stateful operations.  This document updates RFC 1035 by adding a new DNS header OPCODE that has both different message semantics and a new result code.  This document updates RFC 7766 by redefining a session, providing new guidance on connection reuse, and providing a new mechanism for handling session idle timeouts.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8490"/>
          <seriesInfo name="DOI" value="10.17487/RFC8490"/>
        </reference>
        <reference anchor="SYN" target="https://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_9-4/ipj_9-4.pdf" quoteTitle="true" derivedAnchor="SYN">
          <front>
            <title>Defenses Against TCP SYN Flooding Attacks</title>
            <seriesInfo name="Volume" value="9"/>
            <seriesInfo name="Number" value="4"/>
            <seriesInfo name="The Internet Protocol Journal," value="Cisco              Systems"/>
            <author initials="W." surname="Eddy" fullname="Wesley Eddy">
              <organization showOnFrontPage="true">Verizon Federal Network Systems</organization>
              <address>
                <email>weddy@grc.nasa.gov</email>
              </address>
            </author>
            <date year="2006" month="December"/>
            <keyword>TCP</keyword>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="problems" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-problems-with-the-llq-proto">Problems with the LLQ Protocol</name>
      <t pn="section-appendix.a-1">
	In the course of using LLQ since 2005, some problems were discovered.
	Since no further work is being done on the LLQ protocol,
	this LLQ specification will not be updated to remedy these problems.
      </t>
      <t pn="section-appendix.a-2">
	LLQ's IETF Standards Track successor, "DNS Push Notifications"
	<xref target="RFC8765" format="default" sectionFormat="of" derivedContent="RFC8765"/>, does not
	suffer from these problems, so all existing LLQ
	implementations are <bcp14>RECOMMENDED</bcp14> to migrate to
	using DNS Push Notifications, and all new implementations are
	<bcp14>RECOMMENDED</bcp14> to implement DNS Push Notifications
	instead of LLQ.
      </t>
      <t pn="section-appendix.a-3">
	Known problems with LLQ are documented here as a cautionary tale
	about the challenges of building an application protocol directly
	using datagrams (like IP or UDP) without the benefit of a
	mature and thoroughly reviewed
	intervening transport layer (such as TCP or QUIC).
      </t>
      <t pn="section-appendix.a-4">
	An LLQ "Setup Challenge" message from server to client is identical to
	an LLQ "ACK + Answers" message from server to client
	when there are no current answers for the query.
	If there is packet loss, retransmission, and duplication in the
	network,
	then a duplicated "Setup Challenge" message arriving late at the
	client
	would look like an "ACK + Answers" message with no answers,
	causing the client to clear its cache of any
	records matching the query.
      </t>
      <t pn="section-appendix.a-5">
	<xref target="setup-message-retransmission" format="default" sectionFormat="of" derivedContent="Section 5.1"/> of this LLQ
	specification states, "Servers <bcp14>MUST NOT</bcp14> garbage collect LLQs that fail to complete the
	four-way handshake until the initially granted LLQ-LEASE has
	elapsed." This is probably a mistake since it exposes LLQ
	servers to an easy resource-exhaustion denial-of-service
	attack.
	LLQ's replacement,
	DNS Push Notifications <xref target="RFC8765" format="default" sectionFormat="of" derivedContent="RFC8765"/>,
	is built using DNS Stateful
	Operations <xref target="RFC8490" format="default" sectionFormat="of" derivedContent="RFC8490"/>, which
	uses TLS over TCP; a benefit of building on TCP is that there
	are already established industry best practices to guard
	against SYN flooding and similar attacks <xref target="SYN" format="default" sectionFormat="of" derivedContent="SYN"/> <xref target="RFC4953" format="default" sectionFormat="of" derivedContent="RFC4953"/>.
      </t>
      <t pn="section-appendix.a-6">
	The attempts here to pack multiple questions into a single UDP/IP
	packet for efficiency are awkward and lead to error-prone programming
	to deal with cases where some requests in a packet succeed and other
	requests in the same packet fail.  Fully specifying the correct
	handling in all possible cases would be a lot of work to document, a
	lot of work to implement, and even more work to thoroughly test.  DNS
	Push Notifications <xref target="RFC8765" format="default" sectionFormat="of" derivedContent="RFC8765"/>
	avoids this problem by using an underlying stream protocol (TLS/TCP)
	to deal with packing small multiple messages into larger IP packets
	for efficiency.
      </t>
      <t pn="section-appendix.a-7">
	In some cases, initial LLQ answers are delivered in the "ACK +
	Answers" message, and in other cases, such as when all the initial
	answers will not fit in a single IP packet, some of the initial
	answers are delivered in a subsequent "Add Event" message.
	Having two different ways to accomplish the same thing increases
	the possibility for programming errors.
	DNS Push Notifications <xref target="RFC8765" format="default" sectionFormat="of" derivedContent="RFC8765"/>
	corrects this error by having only one single consistent way to
	deliver results.
      </t>
      <t pn="section-appendix.a-8">
	LLQ is built using UDP, and because UDP has no
	standardized way of indicating the start and end of a session,
	firewalls and NAT gateways tend to be fairly aggressive about
	recycling UDP mappings that they believe to be disused <xref target="RFC4787" format="default" sectionFormat="of" derivedContent="RFC4787"/> <xref target="RFC5382" format="default" sectionFormat="of" derivedContent="RFC5382"/> <xref target="RFC7857" format="default" sectionFormat="of" derivedContent="RFC7857"/>.
	Using a high keepalive traffic rate to maintain firewall or
	NAT mapping state could remedy this but would largely defeat
	the purpose of using LLQ in the first place, which is to
	provide efficient change notification without wasteful
	polling.  Because of this, existing LLQ clients use the NAT
	Port Mapping Protocol (NAT-PMP) <xref target="RFC6886" format="default" sectionFormat="of" derivedContent="RFC6886"/> and/or Port Control Protocol (PCP)
	<xref target="RFC6887" format="default" sectionFormat="of" derivedContent="RFC6887"/> to establish
	longer port mapping lifetimes.  This solves the problem but
	adds extra complexity and doesn't work with firewalls and NAT
	gateways that don't support NAT-PMP or PCP.  By using TCP
	instead of UDP, the DNS Push Notifications protocol benefits
	from better longevity of sessions through firewalls and NAT
	gateways that don't support NAT-PMP or PCP.
      </t>
    </section>
    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t pn="section-appendix.b-1">
   The concepts described in this document were originally explored,
   developed,
   and implemented with help from <contact fullname="Chris Sharp"/> and
   <contact fullname="Roger Pantos"/>.
      </t>
      <t pn="section-appendix.b-2"><contact fullname="Kiren Sekar"/> made significant contributions to
      the first draft of this document and he wrote much of the code for the
      implementation of LLQ that shipped in Mac OS X 10.4 Tiger in April
      2005.</t>
      <t pn="section-appendix.b-3">Thanks to Independent Stream Editor <contact fullname="Adrian Farrel"/> for his support and
assistance in the publication of this RFC.
</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="S." surname="Cheshire" fullname="Stuart Cheshire">
        <organization showOnFrontPage="true">Apple Inc.</organization>
        <address>
          <postal>
            <street>One Apple Park Way</street>
            <city>Cupertino</city>
            <region>CA</region>
            <code>95014</code>
            <country>United States of America</country>
          </postal>
          <phone>+1 (408) 996-1010</phone>
          <email>cheshire@apple.com</email>
        </address>
      </author>
      <author initials="M." surname="Krochmal" fullname="Marc Krochmal">
        <organization showOnFrontPage="true">Apple Inc.</organization>
        <address>
          <postal>
            <street>One Apple Park Way</street>
            <city>Cupertino</city>
            <region>CA</region>
            <code>95014</code>
            <country>United States of America</country>
          </postal>
          <phone>+1 (408) 996-1010</phone>
          <email>marc@apple.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
