<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-ietf-add-dnr-08" ipr="trust200902">
  <front>
    <title abbrev="Discovery of Network-designated Resolvers">DHCP and Router
    Advertisement Options for the Discovery of Network-designated Resolvers
    (DNR)</title>

    <author fullname="Mohamed Boucadair" initials="M." role="editor"
            surname="Boucadair">
      <organization>Orange</organization>

      <address>
        <postal>
          <street></street>

          <city>Rennes</city>

          <code>35000</code>

          <country>France</country>
        </postal>

        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>

    <author fullname="Tirumaleswar Reddy" initials="T." role="editor"
            surname="Reddy">
      <organization>Akamai</organization>

      <address>
        <postal>
          <street>Embassy Golf Link Business Park</street>

          <city>Bangalore</city>

          <region>Karnataka</region>

          <code>560071</code>

          <country>India</country>
        </postal>

        <email>kondtir@gmail.com</email>
      </address>
    </author>

    <author fullname="Dan Wing" initials="D." surname="Wing">
      <organization abbrev="Citrix">Citrix Systems, Inc.</organization>

      <address>
        <postal>
          <street></street>

          <country>USA</country>
        </postal>

        <email>dwing-ietf@fuggles.com</email>
      </address>
    </author>

    <author fullname="Neil Cook" initials="N." surname="Cook">
      <organization>Open-Xchange</organization>

      <address>
        <postal>
          <street></street>

          <country>UK</country>
        </postal>

        <email>neil.cook@noware.co.uk</email>
      </address>
    </author>

    <author fullname="Tommy Jensen" initials="T." surname="Jensen">
      <organization>Microsoft</organization>

      <address>
        <postal>
          <street></street>

          <country>USA</country>
        </postal>

        <email>tojens@microsoft.com</email>
      </address>
    </author>

    <date />

    <workgroup>ADD</workgroup>

    <keyword>DNS</keyword>

    <keyword>service resolution</keyword>

    <keyword>encryption</keyword>

    <keyword>service discovery</keyword>

    <keyword>service provider</keyword>

    <keyword>network provider</keyword>

    <keyword>automation</keyword>

    <abstract>
      <t>The document specifies new DHCP and IPv6 Router Advertisement options
      to discover encrypted DNS servers (e.g., DNS-over-HTTPS, DNS-over-TLS,
      DNS-over-QUIC). Particularly, it allows a host to learn an
      authentication domain name together with a list of IP addresses and a
      set of service parameters to reach such encrypted DNS servers.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>This document focuses on the support of encrypted DNS such as
      DNS-over-HTTPS (DoH) <xref target="RFC8484"></xref>, DNS-over-TLS (DoT)
      <xref target="RFC7858"></xref>, or DNS-over-QUIC (DoQ) <xref
      target="RFC9250"></xref> in local networks.</t>

      <t>In particular, the document specifies how a local encrypted DNS
      server can be discovered by connected hosts by means of DHCPv4 <xref
      target="RFC2132"></xref>, DHCPv6 <xref target="RFC8415"></xref>, and
      IPv6 Router Advertisement (RA) <xref target="RFC4861"></xref> options.
      These options are designed to convey the following information: the DNS
      Authentication Domain Name (ADN), a list of IP addresses, and a set of
      service parameters. This procedure is called Discovery of
      Network-designated Resolvers (DNR).</t>

      <t>The options defined in this document can be deployed in a variety of
      deployments (e.g., local networks with Customer Premises Equipment
      (CPEs) that may or may not be managed by an Internet Service Provider
      (ISP), local networks with or without DNS forwarders). It is out of the
      scope of this document to provide an inventory of such deployments.</t>
    </section>

    <section anchor="notation" title="Terminology">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP 14
      <xref target="RFC2119"></xref> <xref target="RFC8174"></xref> when, and
      only when, they appear in all capitals, as shown here.</t>

      <t>This document makes use of the terms defined in <xref
      target="RFC8499"></xref>. The following additional terms are used: <list
          style="hanging">
          <t hangText="Do53:">refers to unencrypted DNS.</t>

          <t hangText="DNR:">refers to the Discovery of Network-designated
          Resolvers procedure.</t>

          <t hangText="Encrypted DNS:">refers to a scheme where DNS exchanges
          are transported over an encrypted channel. Examples of encrypted DNS
          are DoT, DoH, or DoQ.</t>

          <t hangText="Encrypted DNS options:">refers to the options defined
          in Sections <xref format="counter" target="DHCPv6"></xref>, <xref
          format="counter" target="DHCP"></xref>, and <xref format="counter"
          target="RA"></xref>.</t>

          <t hangText="DHCP:">refers to both DHCPv4 and DHCPv6.</t>
        </list></t>
    </section>

    <section anchor="RI" title="Overview">
      <t>This document describes how a DNS client can discover local encrypted
      DNS servers using DHCP (Sections <xref format="counter"
      target="DHCPv6"></xref> and <xref format="counter"
      target="DHCP"></xref>) and Neighbor Discovery protocol (<xref
      target="RA"></xref>): Encrypted DNS options.</t>

      <t>These options configure an authentication domain name, a list of IPv6
      addresses, and a set of service parameters of the encrypted DNS server.
      More information about the design of these options is provided in the
      following subsections.</t>

      <section anchor="rationale" title="Configuration Data for Encrypted DNS">
        <t>In order to allow for PKIX-based authentication between a DNS
        client and an encrypted DNS server, the Encrypted DNS options are
        designed to include an authentication domain name. This ADN is
        presented as a reference identifier for DNS authentication purposes.
        This design accommodates the current best practices for issuing
        certificates as per Section 1.7.2 of <xref
        target="RFC6125"></xref>:</t>

        <t><figure>
            <artwork><![CDATA[   |  Some certification authorities issue server certificates based on
   |  IP addresses, but preliminary evidence indicates that such
   |  certificates are a very small percentage (less than 1%) of issued
   |  certificates.]]></artwork>
          </figure></t>

        <t>To avoid adding a dependency on another server to resolve the ADN,
        the Encrypted DNS options return the IP address(es) to locate the
        encrypted DNS server. These encrypted DNS servers may be hosted on the
        same or distinct IP addresses. Such a decision is deployment
        specific.</t>

        <t>In order to optimize the size of discovery messages when all DNS
        servers terminate on the same IP address, early versions of this
        document considered relying upon the discovery mechanisms specified in
        <xref target="RFC2132"></xref><xref target="RFC3646"></xref><xref
        target="RFC8106"></xref> to retrieve a list of IP addresses to reach
        their DNS servers. Nevertheless, this approach requires a client that
        supports more than one encrypted DNS protocol (e.g., DoH and DoT) to
        probe that list of IP addresses. To avoid such a probing, the options
        defined in Sections <xref format="counter" target="DHCPv6"></xref>,
        <xref format="counter" target="DHCP"></xref>, and <xref
        format="counter" target="RA"></xref> associate an IP address with an
        encrypted DNS protocol. No probing is required in such a design.</t>

        <t>A list of IP addresses to reach an encrypted DNS server may be
        returned in an Encrypted DNS option to accommodate current deployments
        relying upon primary and backup servers. Whether one or more IP
        addresses are returned in an Encrypted DNS option is deployment
        specific. For example, a router embedding a recursive server or a
        forwarder has to include one single IP address pointing to one of its
        LAN-facing interfaces. This IP address can be a private IPv4 address,
        a link-local address, a Unique Local IPv6 unicast Address (ULA), or a
        Global Unicast Address (GUA).</t>

        <t>If multiple IP addresses are to be returned in an Encrypted DNS
        option, these addresses are ordered in the preference for use by the
        client.</t>

        <t>Because distinct encrypted DNS protocols may be provisioned by a
        network (e.g., DoT, DoH, and DoQ) and that some of these protocols may
        make use of customized port numbers instead of default ones, the
        Encrypted DNS options are designed to return a set of service
        parameters. These parameters are encoded following the same rules for
        encoding SvcParams in Section 2.1 of <xref
        target="I-D.ietf-dnsop-svcb-https"></xref>. This encoding approach may
        increase the size of the options but it has the merit relying upon an
        existing IANA registry and, thus, accommodating new encrypted DNS
        protocols and service parameters that may be defined in the future. At
        least the following service parameters are RECOMMENDED to be supported
        by a DNR implementation:</t>

        <t><list style="hanging">
            <t hangText="alpn:">Used to indicate the set of supported
            protocols (Section 7.1 of <xref
            target="I-D.ietf-dnsop-svcb-https"></xref>).</t>

            <t hangText="port:">Used to indicate the target port number for
            the encrypted DNS connection (Section 7.2 of <xref
            target="I-D.ietf-dnsop-svcb-https"></xref>).</t>

            <t hangText="ech:">Used to enable Encrypted ClientHello (ECH)
            (Section 7.3 of <xref
            target="I-D.ietf-dnsop-svcb-https"></xref>).</t>

            <t hangText="dohpath:">Used to supply a relative DoH URI Template
            (Section 5.1 of <xref target="I-D.ietf-add-svcb-dns"></xref>).</t>
          </list></t>

        <t>A single option is used to convey both the ADN and IP addresses
        because otherwise means to correlate an IP address conveyed in an
        option with an ADN conveyed in another option will be required if, for
        example, more than one ADN is supported by the network.</t>

        <t>The DHCP options defined in Sections <xref format="counter"
        target="DHCPv6"></xref> and <xref format="counter"
        target="DHCP"></xref> follow the option ordering guidelines in Section
        17 of <xref target="RFC7227"></xref>. Likewise, the RA option (<xref
        format="default" target="RA"></xref>) adheres to the recommendations
        in Section 9 of <xref target="RFC4861"></xref>.</t>

        <t>ServiceMode (Section 2.4.3 of <xref
        target="I-D.ietf-dnsop-svcb-https"></xref>) SHOULD be used because the
        Encrypted DNS options are self-contained and do not require any
        additional DNS queries. The reader may refer to <xref
        target="RFC7969"></xref> for an overview of advanced capabilities that
        are supported by DHCP servers to populate configuration data (e.g.,
        issue DNS queries).</t>

        <t>In contexts where putting additional complexity on requesting hosts
        is acceptable, returning an ADN only can be considered. The supplied
        ADN will be processed by a host following the procedure in Section 5
        of <xref target="I-D.ietf-add-ddr"></xref>. Note that this mode may be
        subject to active attacks, which can be mitigated by DNSSEC.</t>

        <t>Other mechanisms may be considered in other contexts (e.g., secure
        discovery) for the provisioning of encrypted DNS servers. It is
        RECOMMENDED that at least the following DNR information is made
        available to a requesting host:</t>

        <t><list style="symbols">
            <t>A service priority whenever the discovery mechanism does not
            rely on implicit ordering if multiple instances of the encrypted
            DNS are used.</t>

            <t>An authentication domain name.</t>

            <t>A list of IP addresses to locate the encrypted DNS server.</t>

            <t>A set of service parameters.</t>
          </list></t>
      </section>

      <section title="Handling Configuration Data Conflicts">
        <t>If the encrypted DNS is discovered by a host using both RA and
        DHCP, the rules discussed in Section 5.3.1 of <xref
        target="RFC8106"></xref> MUST be followed.</t>

        <t>DHCP/RA options to discover encrypted DNS servers (including, DoH
        URI Templates) takes precedence over Discovery of Designated Resolvers
        (DDR) <xref target="I-D.ietf-add-ddr"></xref> since DDR uses Do53 to
        an external DNS resolver, which is susceptible to both internal and
        external attacks whereas DHCP/RA is typically protected using the
        mechanisms discussed in <xref target="spoof"></xref>.</t>
      </section>

      <section title="Connection Establishment">
        <t>If the local DNS client supports one of the discovered Encrypted
        DNS protocols identified by Application Layer Protocol Negotiation
        (ALPN) protocol identifiers, the DNS client establishes an encrypted
        DNS session following the order of the discovered servers. The client
        follows the mechanism discussed in Section 8 of <xref
        target="RFC8310"></xref> to authenticate the DNS server certificate
        using the authentication domain name conveyed in the Encrypted DNS
        options. ALPN-related considerations can be found in Section 6.1 of
        <xref target="I-D.ietf-dnsop-svcb-https"></xref>.</t>
      </section>

      <section title="Multihoming Considerations">
        <t>Devices may be connected to multiple networks; each providing their
        own DNS configuration using the discovery mechanisms specified in this
        document. Nevertheless, it is out of the scope of this specification
        to discuss DNS selection of multi-interface devices. The reader may
        refer to <xref target="RFC6731"></xref> for a discussion of issues and
        an example of DNS server selection for multi-interfaced devices.</t>
      </section>
    </section>

    <section anchor="DHCPv6" title="DHCPv6 Encrypted DNS Option">
      <t></t>

      <section anchor="DHCPv6-ADN" title="Option Format">
        <t>The format of the DHCPv6 Encrypted DNS option is shown in <xref
        target="dhcpv6-format"></xref>.</t>

        <t><figure align="center" anchor="dhcpv6-format"
            title="DHCPv6 Encrypted DNS Option">
            <artwork><![CDATA[ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       OPTION_V6_DNR           |         Option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
|       Service Priority        |         ADN Length            |  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                   authentication-domain-name                  ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Addr Length           |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               | 
~                        ipv6-address(es)                       ~ 
|                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                               |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
~                 Service Parameters (SvcParams)                ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
          </figure>The fields of the option shown in <xref
        target="dhcpv6-format"></xref> are as follows:<list style="hanging">
            <t hangText="Option-code:">OPTION_V6_DNR (TBA1, see <xref
            target="iana6"></xref>)</t>

            <t hangText="Option-length:">Length of the enclosed data in
            octets. The option length is ('ADN Length' + 4) when only an ADN
            is included in the option.</t>

            <t hangText="Service Priority:">The priority of this OPTION_V6_DNR
            instance compared to other instances. This field is encoded
            following the rules specified in Section 2.4.1 of <xref
            target="I-D.ietf-dnsop-svcb-https"></xref>.</t>

            <t hangText="ADN Length:">Length of the authentication-domain-name
            field in octets.</t>

            <t hangText="authentication-domain-name (variable length):">A
            fully qualified domain name of the encrypted DNS server. This
            field is formatted as specified in Section 10 of <xref
            target="RFC8415"></xref>.<vspace blankLines="1" />An example of
            the authentication-domain-name encoding is shown in <xref
            target="fqdn"></xref>. This example conveys the FQDN
            "doh1.example.com.", and the resulting Option-length field is
            18.<figure anchor="fqdn"
                title="An Example of the DNS authentication-domain-name Encoding">
                <artwork align="center"><![CDATA[+------+------+------+------+------+------+------+------+------+
| 0x04 |   d  |   o  |   h  |  1   | 0x07 |   e  |   x  |   a  |
+------+------+------+------+------+------+------+------+------+
|   m  |   p  |   l  |   e  | 0x03 |   c  |   o  |   m  | 0x00 |
+------+------+------+------+------+------+------+------+------+
]]></artwork>
              </figure></t>

            <t hangText="Addr Length:">Length of enclosed IPv6 addresses in
            octets. It MUST be a multiple of 16 for ServiceMode.</t>

            <t hangText="ipv6-address(es) (variable length):">Indicates one or
            more IPv6 addresses to reach the encrypted DNS server. An address
            can be link-local, ULA, or GUA. The format of this field is shown
            in <xref target="v6add"></xref>.<figure align="center"
                anchor="v6add" title="Format of the IPv6 Addresses Field">
                <artwork><![CDATA[+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                         ipv6-address                          |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
              </figure></t>

            <t
            hangText="Service Parameters (SvcParams) (variable length):">Specifies
            a set of service parameters that are encoded following the rules
            in Section 2.1 of <xref
            target="I-D.ietf-dnsop-svcb-https"></xref>. Service parameters may
            include, for example, a list of ALPN protocol identifiers or
            alternate port numbers. The service parameters MUST NOT include
            "ipv4hint" or "ipv6hint" SvcParams as they are superseded by the
            included IP addresses. <vspace blankLines="1" />If no port service
            parameter is included, this indicates that default port numbers
            should be used. As a reminder, the default port number is 853 for
            DoT, 443 for DoH, and 853 for DoQ.<vspace blankLines="1" />The
            length of this field is ('Option-length' - 6 - 'ADN Length' -
            'Addr Length').</t>
          </list></t>

        <t></t>
      </section>

      <section title="DHCPv6 Client Behavior">
        <t>To discover an encrypted DNS server, the DHCPv6 client MUST include
        OPTION_V6_DNR in an Option Request Option (ORO), as in Sections
        18.2.1, 18.2.2, 18.2.4, 18.2.5, 18.2.6, and 21.7 of <xref
        target="RFC8415"></xref>.</t>

        <t>The DHCPv6 client MUST be prepared to receive multiple instances of
        the OPTION_V6_DNR option; each option is to be treated as a separate
        encrypted DNS server. These instances SHOULD be processed following
        their service priority (i.e., smaller service priority indicates a
        higher preference).</t>

        <t>The DHCPv6 client MUST silently discard multicast and host loopback
        addresses conveyed in OPTION_V6_DNR.</t>
      </section>
    </section>

    <section anchor="DHCP" title="DHCPv4 Encrypted DNS Option">
      <section title="Option Format">
        <t>The format of the DHCPv4 Encrypted DNS option is illustrated in
        <xref target="dhcpri_dns"></xref>.</t>

        <t><figure anchor="dhcpri_dns" title="DHCPv4 Encrypted DNS Option">
            <artwork align="center"><![CDATA[ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     TBA2      |     Length    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       Service Priority        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   ADN Length  |               |
+-+-+-+-+-+-+-+-+               |
~  authentication-domain-name   ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Addr Length  |               |
+-+-+-+-+-+-+-+-+               |
~        IPv4 Address(es)       ~
|               +-+-+-+-+-+-+-+-+
|               |               |
+-+-+-+-+-+-+-+-+               |
~Service Parameters (SvcParams) ~
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>

        <t>The fields of the option shown in <xref target="dhcpri_dns"></xref>
        are as follows:<list style="hanging">
            <t hangText="Code:">OPTION_V4_DNR (TBA2, see <xref
            target="iana4"></xref>).</t>

            <t hangText="Length:">Indicates the length of the enclosed data in
            octets. The option length is ('ADN Length' + 3) when only an ADN
            is included in the option.</t>

            <t hangText="Service Priority:">The priority of this OPTION_V4_DNR
            instance compared to other instances. This field is encoded
            following the rules specified in Section 2.4.1 of <xref
            target="I-D.ietf-dnsop-svcb-https"></xref>.</t>

            <t hangText="ADN Length:">Indicates the length of the
            authentication-domain-name in octets.</t>

            <t
            hangText="authentication-domain-name (variable length):">Includes
            the authentication domain name of the encrypted DNS server. This
            field is formatted as specified in Section 10 of <xref
            target="RFC8415"></xref>. The format of this field is shown in
            <xref target="adn"></xref>. The values s1, s2, s3, etc. represent
            the domain name labels in the domain name encoding.<figure
                align="center" anchor="adn"
                title="Format of the Authentication Domain Name Field">
                <artwork align="center"><![CDATA[
+-----+-----+-----+-----+-----+--
|  s1 |  s2 |  s3 |  s4 | s5  |  ...
+-----+-----+-----+-----+-----+--
  authentication-domain-name 
]]></artwork>
              </figure></t>

            <t hangText="Addr Length:">Indicates the length of included IPv4
            addresses in octets. It MUST be a multiple of 4 for
            ServiceMode.</t>

            <t hangText="IPv4 Address(es) (variable length):">Indicates one or
            more IPv4 addresses to reach the encrypted DNS server. Both
            private and public IPv4 addresses can be included in this field.
            The format of this field is shown in <xref target="v4"></xref>.
            This format assumes that an IPv4 address is encoded as
            a1.a2.a3.a4.<figure align="center" anchor="v4"
                title="Format of the IPv4 Addresses Field">
                <artwork align="center"><![CDATA[0     8     16    24    32    40    48
+-----+-----+-----+-----+-----+-----+--
|  a1 |  a2 |  a3 |  a4 |  a1 |  a2 | ...
+-----+-----+-----+-----+-----+-----+--
  IPv4 Address 1          IPv4 Address 2 ...  ]]></artwork>
              </figure></t>

            <t
            hangText="Service Paramters (SvcParams) (variable length):">Specifies
            a set of service parameters that are encoded following the rules
            in Section 2.1 of <xref
            target="I-D.ietf-dnsop-svcb-https"></xref>. Service parameters may
            include, for example, a list of ALPN protocol identifiers or
            alternate port numbers. The service parameters MUST NOT include
            "ipv4hint" or "ipv6hint" SvcParams as they are superseded by the
            included IP addresses.<vspace blankLines="1" />If no port service
            parameter is included, this indicates that default port numbers
            should be used. <vspace blankLines="1" />The length of this field
            is ('Option-length' - 4 - 'ADN Length' - 'Addr Length').</t>
          </list></t>

        <t>OPTION_V4_DNR is a concatenation-requiring option. As such, the
        mechanism specified in <xref target="RFC3396"></xref> MUST be used if
        OPTION_V4_DNR exceeds the maximum DHCPv4 option size of 255
        octets.</t>
      </section>

      <section title="DHCPv4 Client Behavior">
        <t>To discover an encrypted DNS server, the DHCPv4 client requests the
        Encrypted DNS server by including OPTION_V4_DNR in a Parameter Request
        List option <xref target="RFC2132"></xref>.</t>

        <t>The DHCPv4 client MUST be prepared to receive multiple instances of
        the OPTION_V4_DNR option; each option is to be treated as a separate
        encrypted DNS server. These instances SHOULD be processed following
        their service priority (i.e., smaller service priority indicates a
        higher preference).</t>

        <t>The DHCPv4 client MUST silently discard multicast and host loopback
        addresses conveyed in OPTION_V4_DNR.</t>
      </section>
    </section>

    <section anchor="RA" title="IPv6 RA Encrypted DNS Option">
      <t></t>

      <section anchor="RA-ADN" title="Option Format">
        <t>This section defines a new Neighbor Discovery option <xref
        target="RFC4861"></xref>: IPv6 RA Encrypted DNS option. This option is
        useful in contexts similar to those discussed in Section 1.1 of <xref
        target="RFC8106"></xref>.</t>

        <t>The format of the IPv6 RA Encrypted DNS option is illustrated in
        <xref target="ra_dns"></xref>.</t>

        <t><figure anchor="ra_dns" title="RA Encrypted DNS Option">
            <artwork align="center"><![CDATA[ 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     TBA3      |     Length    |        Service Priority       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Lifetime                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          ADN Length           |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
~                   authentication-domain-name                  ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Addr Length           |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
~                        ipv6-address(es)                       ~
|                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |     SvcParams Length          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                 Service Parameters (SvcParams)                ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>

        <t>The fields of the option shown in <xref target="ra_dns"></xref> are
        as follows:<list style="hanging">
            <t hangText="Type:">8-bit identifier of the Encrypted DNS option
            as assigned by IANA (TBA3, see <xref target="iana7"></xref>).</t>

            <t hangText="Length:">8-bit unsigned integer. The length of the
            option (including the Type and Length fields) is in units of 8
            octets.</t>

            <t hangText="Service Priority:">The priority of this Encrypted DNS
            option instance compared to other instances. This field is encoded
            following the rules specified in Section 2.4.1 of <xref
            target="I-D.ietf-dnsop-svcb-https"></xref>.</t>

            <t hangText="Lifetime:">32-bit unsigned integer. The maximum time
            in seconds (relative to the time the packet is received) over
            which the discovered Authentication Domain Name is valid. <vspace
            blankLines="1" />The value of Lifetime SHOULD by default be at
            least 3 * MaxRtrAdvInterval, where MaxRtrAdvInterval is the
            maximum RA interval as defined in <xref target="RFC4861"></xref>.
            <vspace blankLines="1" />A value of all one bits (0xffffffff)
            represents infinity. <vspace blankLines="1" />A value of zero
            means that this Authentication Domain Name MUST no longer be
            used.</t>

            <t hangText="ADN Length:">16-bit unsigned integer. This field
            indicates the length of the authentication-domain-name field in
            octets.</t>

            <t hangText="authentication-domain-name (variable length):">The
            domain name of the encrypted DNS server. This field is formatted
            as specified in Section 10 of <xref target="RFC8415"></xref>.</t>

            <t hangText="Addr Length:">16-bit unsigned integer. This field
            indicates the length of enclosed IPv6 addresses in octets. It MUST
            be a multiple of 16 for ServiceMode.</t>

            <t hangText="ipv6-address(es) (variable length):">One or more IPv6
            addresses of the encrypted DNS server. An address can be
            link-local, ULA, or GUA. <vspace blankLines="1" />All of the
            addresses share the same Lifetime value. Similar to <xref
            target="RFC8106"></xref>, if it is desirable to have different
            Lifetime values per IP address, multiple Encrypted DNS options may
            be used.<vspace blankLines="1" />The format of this field is shown
            in <xref target="v6add"></xref>.</t>

            <t hangText="SvcParams Length:">16-bit unsigned integer. This
            field indicates the length of the Service Parameters field in
            octets.</t>

            <t
            hangText="Service Paramters (SvcParams) (variable length):">Specifies
            a set of service parameters that are encoded following the rules
            in Section 2.1 of <xref
            target="I-D.ietf-dnsop-svcb-https"></xref>. Service parameters may
            include, for example, a list of ALPN protocol identifiers or
            alternate port numbers. The service parameters MUST NOT include
            "ipv4hint" or "ipv6hint" SvcParams as they are superseded by the
            included IP addresses.<vspace blankLines="1" />If no port service
            parameter is included, this indicates that default port numbers
            should be used.</t>
          </list></t>

        <t>The option MUST be padded with zeros so that the full enclosed data
        is a multiple of 8 octets (Section 4.6 of <xref
        target="RFC4861"></xref>).</t>
      </section>

      <section title="IPv6 Host Behavior">
        <t>The procedure for DNS configuration is the same as it is with any
        other Neighbor Discovery option <xref target="RFC4861"></xref>. In
        addition, the host follows the procedure described in Section 5.3.1 of
        <xref target="RFC8106"></xref> with the formatting requirements in
        <xref target="RA-ADN"></xref> substituted for the length
        validation.</t>

        <t>The host MUST be prepared to receive multiple Encrypted DNS options
        in RAs. These instances SHOULD be processed following their service
        priority (i.e., smaller service priority indicates a higher
        preference).</t>

        <t>The host MUST silently discard multicast and host loopback
        addresses conveyed in the Encrypted DNS options.</t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <section anchor="spoof" title="Spoofing Attacks">
        <t>DHCP/RA messages are not encrypted or protected against
        modification within the LAN. Unless mitigated (described below), the
        content of DHCP and RA messages can be spoofed or modified by active
        attackers, such as compromised devices within the local network. An
        active attacker (Section 3.3 of <xref target="RFC3552"></xref>) can
        spoof the DHCP/RA response to provide the attacker's Encrypted DNS
        server. Note that such an attacker can launch other attacks as
        discussed in Section 22 of <xref target="RFC8415"></xref>. The
        attacker can get a domain name with a domain-validated public
        certificate from a CA and host an Encrypted DNS server.</t>

        <t>Attacks of spoofed or modified DHCP responses and RA messages by
        attackers within the local network may be mitigated by making use of
        the following mechanisms:</t>

        <t><list style="symbols">
            <t>DHCPv6-Shield described in <xref target="RFC7610"></xref>, the
            router (e.g., a border router, a CPE) discards DHCP response
            messages received from any local endpoint.</t>

            <t>RA-Guard described in <xref target="RFC7113"></xref>, the
            router discards RAs messages received from any local endpoint.</t>

            <t>Source Address Validation Improvement (SAVI) solution for DHCP
            described in <xref target="RFC7513"></xref>, the router filters
            packets with forged source IP addresses.</t>
          </list></t>

        <t>The above mechanisms would ensure that the endpoint receives the
        correct configuration information of the encrypted DNS servers
        selected by the DHCP server (or RA sender), but cannot provide any
        information about the DHCP server or the entity hosting the DHCP
        server (or RA sender) .</t>

        <t>Encrypted DNS sessions with rogue servers that spoof the IP address
        of a DNS server will fail because the DNS client will fail to
        authenticate that rogue server based upon PKIX authentication <xref
        target="RFC6125"></xref>, particularly the authentication domain name
        in the Encrypted DNS Option. DNS clients that ignore authentication
        failures and accept spoofed certificates will be subject to attacks
        (e.g., redirect to malicious servers, intercept sensitive data).</t>

        <t>Encrypted DNS connections received from outside the local network
        MUST be discarded by the encrypted DNS forwarder in the CPE. This
        behavior adheres to REQ#8 in <xref target="RFC6092"></xref>; it MUST
        apply for both IPv4 and IPv6.</t>
      </section>

      <section title="Deletion Attacks">
        <t>If the DHCP responses or RAs are dropped by the attacker, the
        client can fallback to use a preconfigured encrypted DNS server.
        However, the use of policies to select servers is out of the scope of
        this document.</t>

        <t>Note that deletion attack is not specific to DHCP/RA.</t>
      </section>

      <section title="Passive Attacks">
        <t>A passive attacker (Section 3.2 of <xref target="RFC3552"></xref>)
        can identify a host is using DHCP/RA to discover an encrypted DNS
        server and can infer that host is capable of using DoH/DoT/DoQ to
        encrypt DNS messages. However, a passive attacker cannot spoof or
        modify DHCP/RA messages.</t>
      </section>

      <section title="Wireless Security - Authentication Attacks">
        <t>Wireless LAN (WLAN) as frequently deployed in local networks (e.g.,
        home networks) is vulnerable to various attacks (e.g., <xref
        target="Evil-Twin"></xref>, <xref target="Krack"></xref>, <xref
        target="Dragonblood"></xref>). Because of these attacks, only
        cryptographically authenticated communications are trusted on WLANs.
        This means that an information (e.g., NTP server, DNS server, domain
        search list) provided by such networks via DHCP, DHCPv6, or RA are
        untrusted because DHCP and RA messages are not authenticated.</t>

        <t>If the pre-shared key is the same for all clients that connect to
        the same WLAN, the shared key will be available to all nodes,
        including attackers. As such, it is possible to mount an active
        on-path attack. Man-in-the-middle attacks are possible within local
        networks because such WLAN authentication lacks peer entity
        authentication.</t>

        <t>This leads to the need for provisioning unique credentials for
        different clients. Endpoints can be provisioned with unique
        credentials (username and password, typically) provided by the local
        network administrator to mutually authenticate to the local WLAN
        Access Point (e.g., 802.1x Wireless User Authentication on OpenWRT
        <xref target="dot1x"></xref>, EAP-pwd <xref target="RFC8146"></xref>).
        Not all endpoint devices (e.g., IoT devices) support 802.1x supplicant
        and need an alternate mechanism to connect to the local network. To
        address this limitation, unique pre-shared keys can be created for
        each such device and WPA-PSK is used (e.g., <xref
        target="PSK"></xref>).</t>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t></t>

      <section anchor="iana6" title="DHCPv6 Option">
        <t>IANA is requested to assign the following new DHCPv6 Option Code in
        the registry maintained in <xref target="DHCPV6"></xref>.</t>

        <texttable>
          <ttcol>Value</ttcol>

          <ttcol>Description</ttcol>

          <ttcol>Client ORO</ttcol>

          <ttcol>Singleton Option</ttcol>

          <ttcol>Reference</ttcol>

          <c>TBA1</c>

          <c>OPTION_V6_DNR</c>

          <c>Yes</c>

          <c>No</c>

          <c>[ThisDocument]</c>
        </texttable>

        <t></t>
      </section>

      <section anchor="iana4" title="DHCPv4 Option">
        <t>IANA is requested to assign the following new DHCP Option Code in
        the registry maintained in <xref target="BOOTP"></xref>.</t>

        <figure>
          <artwork align="center"><![CDATA[+------+------------------+-------+----------------+----------------+
| Tag  | Name             | Data  | Meaning        | Reference      |
|      |                  | Length|                |                |
+------+------------------+-------+----------------+----------------+
| TBA2 | OPTION_V4_DNR    | N     | Encrypted DNS  | [ThisDocument] |
|      |                  |       | Server         |                |
+------+------------------+-------+----------------+----------------+]]></artwork>
        </figure>
      </section>

      <section anchor="iana7" title="Neighbor Discovery Option">
        <t>IANA is requested to assign the following new IPv6 Neighbor
        Discovery Option type in the "IPv6 Neighbor Discovery Option Formats"
        sub-registry under the "Internet Control Message Protocol version 6
        (ICMPv6) Parameters" registry maintained in <xref
        target="ND"></xref>.</t>

        <texttable>
          <ttcol>Type</ttcol>

          <ttcol>Description</ttcol>

          <ttcol>Reference</ttcol>

          <c>TBA3</c>

          <c>DNS Encrypted DNS Option</c>

          <c>[ThisDocument]</c>
        </texttable>
      </section>
    </section>

    <section title="Acknowledgements">
      <t>Many thanks to Christian Jacquenet and Michael Richardson for the
      review.</t>

      <t>Thanks to Stephen Farrell, Martin Thomson, Vittorio Bertola, Stephane
      Bortzmeyer, Ben Schwartz, Iain Sharp, and Chris Box for the
      comments.</t>

      <t>Thanks to Mark Nottingham for the feedback on HTTP redirection that
      was discussed in previous versions of this specification.</t>

      <t>The use of DHCP to retrieve an authentication domain name was
      discussed in Section 7.3.1 of <xref target="RFC8310"></xref> and <xref
      target="I-D.pusateri-dhc-dns-driu"></xref>.</t>

      <t>Thanks to Bernie Volz for the review of the DHCP part.</t>

      <t>Thanks to Andrew Campling for the Shepherd review. </t>
    </section>

    <section title="Contributing Authors">
      <t><figure>
          <artwork><![CDATA[   Nicolai Leymann
   Deutsche Telekom
   Germany

   Email: n.leymann@telekom.de

   Zhiwei Yan
   CNNIC
   No.4 South 4th Street, Zhongguancun
   Beijing  100190
   China

   EMail: yan@cnnic.cn]]></artwork>
        </figure></t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.2119'?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.4861'?>

      <?rfc include='reference.RFC.8415'?>

      <?rfc include='reference.RFC.2132'?>

      <?rfc include='reference.RFC.8106'?>

      <?rfc include='reference.RFC.3396'?>

      <?rfc include='reference.I-D.ietf-dnsop-svcb-https'?>

      <?rfc include='reference.I-D.ietf-add-svcb-dns'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.6092'?>

      <?rfc include='reference.RFC.8310'?>

      <?rfc include='reference.RFC.8499'?>

      <?rfc include='reference.RFC.6125'?>

      <?rfc include='reference.RFC.3646'?>

      <?rfc include='reference.RFC.7610'?>

      <?rfc include='reference.RFC.7113'?>

      <?rfc include='reference.RFC.7858'?>

      <?rfc include='reference.RFC.8484'?>

      <?rfc include='reference.RFC.9250'?>

      <?rfc include='reference.I-D.ietf-add-ddr'?>

      <?rfc include='reference.RFC.6731'?>

      <?rfc include='reference.RFC.3552'?>

      <?rfc include='reference.RFC.7513'?>

      <?rfc include='reference.RFC.8146'?>

      <?rfc include='reference.RFC.7227'?>

      <?rfc include='reference.RFC.7969'?>

      <?rfc include='reference.I-D.pusateri-dhc-dns-driu'?>

      <reference anchor="Evil-Twin"
                 target="https://en.wikipedia.org/wiki/Evil_twin_(wireless_networks)">
        <front>
          <title>Evil twin (wireless networks)</title>

          <author>
            <organization>The Unicode Consortium</organization>
          </author>

          <date day="" month="" year="" />
        </front>
      </reference>

      <reference anchor="Krack" target="https://www.krackattacks.com/">
        <front>
          <title>Key Reinstallation Attacks</title>

          <author>
            <organization>The Unicode Consortium</organization>
          </author>

          <date day="" month="" year="2017" />
        </front>
      </reference>

      <reference anchor="Dragonblood"
                 target="https://papers.mathyvanhoef.com/dragonblood.pdf">
        <front>
          <title>Dragonblood: Analyzing the Dragonfly Handshake of WPA3 and
          EAP-pwd</title>

          <author>
            <organization>The Unicode Consortium</organization>
          </author>

          <date day="" month="" year="" />
        </front>
      </reference>

      <reference anchor="PSK"
                 target="https://www.cisco.com/c/en/us/td/docs/wireless/controller/technotes/8-5/b_Identity_PSK_Feature_Deployment_Guide.html">
        <front>
          <title>Identity PSK Feature Deployment Guide</title>

          <author>
            <organization>Cisco</organization>
          </author>

          <date day="" month="" year="" />
        </front>
      </reference>

      <reference anchor="dot1x"
                 target="https://openwrt.org/docs/guide-user/network/wifi/wireless.security.8021x">
        <front>
          <title>Basic 802.1x Wireless User Authentication</title>

          <author>
            <organization>Cisco</organization>
          </author>

          <date day="" month="" year="" />
        </front>
      </reference>

      <reference anchor="DHCPV6"
                 target="https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-2">
        <front>
          <title>DHCPv6 Option Codes</title>

          <author>
            <organization></organization>
          </author>

          <date />
        </front>
      </reference>

      <reference anchor="ND"
                 target="http://www.iana.org/assignments/icmpv6-parameters/    icmpv6-parameters.xhtml#icmpv6-parameters-5">
        <front>
          <title>IPv6 Neighbor Discovery Option Formats</title>

          <author>
            <organization></organization>
          </author>

          <date />
        </front>
      </reference>

      <reference anchor="BOOTP"
                 target="https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml#options">
        <front>
          <title>BOOTP Vendor Extensions and DHCP Options</title>

          <author>
            <organization></organization>
          </author>

          <date />
        </front>
      </reference>
    </references>
  </back>
</rfc>
