<?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-btw-add-home-12" ipr="trust200902">
  <front>
    <title abbrev="Encrypted DNS in Home Networks">DHCP and Router
    Advertisement Options for Encrypted DNS Discovery</title>

    <author fullname="Mohamed Boucadair" initials="M." 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." surname="Reddy">
      <organization abbrev="McAfee">McAfee, Inc.</organization>

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

          <city>Bangalore</city>

          <region>Karnataka</region>

          <code>560071</code>

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

        <email>TirumaleswarReddy_Konda@McAfee.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>

    <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 to learn an authentication
      domain name together with a list of IP addresses and a port number to
      reach such encrypted DNS servers. The discovery of DNS-over-HTTPS URI
      Templates is also discussed.</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="I-D.ietf-dprive-dnsoquic"></xref> in local networks.</t>

      <t>In particular, the document specifies how a local encrypted DNS
      server can be discovered and used by connected hosts by means of DHCP
      <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
      optionally a port number. The discovery of DoH URI Templates is
      discussed in <xref target="URI"></xref>.</t>

      <t>Sample target deployment scenarios are discussed in <xref
      target="depl"></xref>; both managed and unmanaged Customer Premises
      Equipment (CPEs) are covered. It is out of the scope of this document to
      provide an exhaustive inventory of deployments where Encrypted DNS
      Options (Sections <xref format="counter" target="DHCPv6"></xref>, <xref
      format="counter" target="DHCP"></xref>, and <xref format="counter"
      target="RA"></xref>) can be used.</t>

      <t>Considerations related to hosting a DNS forwarder in a local network
      are described in <xref target="forwarder"></xref>.</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="Encrypted DNS:">refers to a scheme where DNS exchanges
          are transported over an encrypted channel. Examples of encrypted DNS
          are DNS-over-TLS (DoT) <xref target="RFC7858"></xref>,
          DNS-over-HTTPS (DoH) <xref target="RFC8484"></xref>, or
          DNS-over-QUIC (DoQ) <xref
          target="I-D.ietf-dprive-dnsoquic"></xref>.</t>

          <t hangText="Managed CPE:">refers to a CPE that is managed by an
          Internet Service Providers (ISP).</t>

          <t hangText="Unmanaged CPE:">refers to a CPE that is not managed by
          an ISP.</t>

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

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

      <t>As reported in Section 1.7.2 of <xref
      target="RFC6125"></xref>:<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>In order to allow for PKIX-based authentication between a DNS client
      and an encrypted DNS server while accommodating the current best
      practices for issuing certificates, this document allows for configuring
      an authentication domain name to be presented as a reference identifier
      for DNS authentication purposes.</t>

      <t>To avoid adding a dependency on another server to resolve the ADN,
      the options return a list of IP addresses to locate the encrypted DNS
      server. In the various scenarios sketched in <xref
      target="depl"></xref>, encrypted DNS servers may terminate on the same
      IP address or distinct IP addresses. Terminating encrypted DNS servers
      on the same or distinct IP addresses is deployment specific. It is
      RECOMMENDED to return both the ADN and a list of IP addresses to a
      requesting host.</t>

      <t>Note that in order to optimize the size of discovery messages when
      all servers terminate on the same IP address, a host may rely 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 to
      probe that list of IP addresses. To avoid such probing, the options
      defined in the following sections associate an IP address with an
      encrypted DNS type. No probing is required in such design.</t>

      <t>A list of IP addresses to reach an encrypted DNS server can be
      returned in the option to accommodate current deployments relying upon
      primary and backup servers. Whether one IP address or more are returned
      in an option is deployment specific. For example, a router embedding a
      recursive server or forwarder has to include one single IP address
      pointing to one of its LAN-facing interfaces. This 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 more than one IP address are to be returned in an Encrypted DNS
      server option, these addresses are ordered in the preference for use by
      the client.</t>

      <t>Because DoT and DoQ may make use of customized port numbers instead
      of default ones, the Encrypted DNS server options are designed to return
      alternate port numbers.</t>

      <t>Some ISPs rely upon external resolvers (e.g., outsourced service or
      public resolvers); these ISPs provide their customers with the IP
      addresses of these resolvers. These addresses are typically configured
      on CPEs using dedicated management tools. Likewise, users can modify the
      default DNS configuration of their CPEs (e.g., supplied by their ISP) to
      configure their favorite DNS servers. This document permits such
      deployments.</t>

      <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>The DNS client establishes an encrypted DNS session with the
      discovered DNS IP address(es) and port number, and uses 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.</t>

      <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>

      <t>DHCP/RA options to discover encrypted DNS servers (including, DoH URI
      Templates should the WG pursue that approach pending feedback) takes
      precedence over DEER <xref target="I-D.pauly-add-deer"></xref> since
      DEER uses unencrypted DNS to an external DNS resolver, which is
      susceptible to both internal and external attacks whereas DHCP/RA is
      only vulnerable to internal attacks.</t>
    </section>

    <section anchor="DHCPv6" title="DHCPv6 Encrypted DNS Options">
      <t>This section defines two DHCPv6 options: DHCPv6 Encrypted DNS ADN
      option (<xref target="DHCPv6-ADN"></xref>) and DHCPv6 Encrypted DNS
      Address option (<xref target="DHCPv6-ADD"></xref>).</t>

      <section anchor="DHCPv6-ADN" title="Encrypted DNS ADN Option">
        <t>The DHCPv6 Encrypted DNS ADN option is used to configure an
        authentication domain name of the encrypted DNS server. The format of
        this option is shown in <xref target="ri_option"></xref>.</t>

        <t><figure anchor="ri_option" title="DHCPv6 Encrypted DNS ADN Option">
            <artwork align="center"><![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_ENC_ADN          |         Option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Enc DNS Flags |                                               |
+---------------+                                               +
|                                                               |
~                   authentication-domain-name                  ~
|                                                               |
+---------------------------------------------------------------+
]]></artwork>
          </figure></t>

        <t>The fields of the option shown in <xref target="ri_option"></xref>
        are as follows:</t>

        <t><list style="hanging">
            <t hangText="Option-code:">OPTION_V6_ENC_ADN (TBA1, see <xref
            target="iana6"></xref>)</t>

            <t hangText="Option-length:">Length of the enclosed data in
            octets.</t>

            <t hangText="Enc DNS Flags (Encrypted DNS Flags):">Indicates the
            type(s) of the encrypted DNS server conveyed in this attribute.
            The format of this 8-bit field is shown in <xref
            target="types"></xref>. <figure align="center" anchor="types"
                title="Encrypted DNS Flags Field">
                <artwork align="center"><![CDATA[+-+-+-+-+-+-+-+-+
|U|U|U|U|U|Q|H|T|
+-+-+-+-+-+-+-+-+  ]]></artwork>
              </figure><list style="hanging">
                <t hangText="T:">If set, this bit indicates that the server
                supports DoT <xref target="RFC7858"></xref>.</t>

                <t hangText="H:">If set, this bit indicates that the server
                supports DoH <xref target="RFC8484"></xref>.</t>

                <t hangText="Q:">If set, this bit indicates that the server
                supports DoQ <xref
                target="I-D.ietf-dprive-dnsoquic"></xref>.</t>

                <t hangText="U:">Unassigned bits. These bits MUST be unset by
                the sender. Associating a meaning with an unassigned bit can
                be done as per <xref target="flags-IANA"></xref>.</t>
              </list>In a request, these bits are assigned to indicate the
            requested encrypted DNS server type(s) by the client. In a
            response, these bits are set as a function of the encrypted DNS
            supported by the server and the requested encrypted DNS server
            type(s).<vspace blankLines="1" />To keep the packet small, if more
            than one encrypted DNS type (e.g., both DoH and DoT) are to be
            returned to a requesting client and the same ADN is used for these
            types, the corresponding bits must be set in the 'Encrypted DNS
            Types' field of the same option instance in a response. For
            example, if the client requested DoH and DoT and the server
            supports both with the same ADN, then both T and H bits must be
            set.</t>

            <t hangText="authentication-domain-name:">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.</t>
          </list></t>

        <t><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>
      </section>

      <section anchor="DHCPv6-ADD" title="Encrypted DNS Address Option">
        <t>The DHCPv6 Encrypted DNS Address option is used to configure a list
        of IP addresses and a port number of the encrypted DNS server. The
        format of this option is shown in <xref
        target="dhcpv6_add"></xref>.</t>

        <t><figure anchor="dhcpv6_add"
            title="DHCPv6 Encrypted DNS Address Option">
            <artwork align="center"><![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_ENC_ADD          |         Option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Enc DNS Flags |   Unassigned  |          Port Number          |
+---------------+---------------+-------------------------------+
|                                                               |
|                         ipv6-address                          |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                         ipv6-address                          |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure>The fields of the option shown in <xref
        target="dhcpv6_add"></xref> are as follows:</t>

        <t><list style="hanging">
            <t hangText="Option-code:">OPTION_V6_ENC_ADD (TBA2, see <xref
            target="iana6"></xref>)</t>

            <t hangText="Option-length:">Length of the enclosed data in
            octets.</t>

            <t hangText="Enc DNS Flags (Encrypted DNS Flags):">Indicates the
            type(s) of the encrypted DNS server conveyed in this attribute.
            The format of this 8-bit field is shown in <xref
            target="types"></xref>. In a request, these bits are set to
            indicate the requested encrypted DNS server type(s) by the client.
            In a response, these bits are set as a function of the encrypted
            DNS supported by the server and the requested encrypted DNS server
            type(s).</t>

            <t hangText="Unassigned:">These bits MUST be unset by the sender.
            Associating a meaning with an unassigned bit can be done via
            Standards Action <xref target="RFC8126"></xref>.</t>

            <t hangText="Port Number:">If not null, it indicates the port
            number to be used for the encrypted DNS. If this field is set to
            zero, this indicates that default port numbers should be used. As
            a reminder, the default port number is 853 for DoT and 443 for
            DoH.</t>

            <t hangText="ipv6-address(es):">Indicates one or more IPv6
            addresses to reach the encrypted DNS server. An address can be
            link-local, ULA, or GUA.</t>
          </list></t>

        <t>Multiple instances of OPTION_V6_ENC_ADN (or OPTION_V6_ENC_ADD) may
        be returned to a DHCPv6 client; each pointing to a distinct encrypted
        DNS server type.</t>

        <t>If more than one encrypted DNS server types is supported on the
        same IP address and default port numbers are used, one instance of
        OPTION_V6_ENC_ADD option with the appropriate bits set in "Encr DNS
        Types" field should be returned by the DHCP server.</t>
      </section>

      <section title="DHCPv6 Client Behavior">
        <t>To discover an encrypted DNS server, the DHCPv6 client MUST include
        OPTION_V6_ENC_ADN and OPTION_V6_ENC_ADD 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>. The DHCPv6 client sets the
        Encrypted DNS Types field to the requested encrypted DNS server
        type(s).</t>

        <t>If the DHCPv6 client requested more than one encrypted DNS server
        type, the DHCP client MUST be prepared to receive multiple
        OPTION_V6_ENC_ADN (or OPTION_V6_ENC_ADD) options; each option is to be
        treated as a separate encrypted DNS server.</t>

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

    <section anchor="DHCP" title="DHCPv4 Encrypted DNS Option">
      <section title="Encrypted DNS Option">
        <t>The DHCPv4 Encrypted DNS option is used to configure an
        authentication domain name, a list of IP addresses, and a port number
        of the encrypted DNS server. The format of this 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     TBA3      |     Length    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Enc DNS Flags | Num Addresses |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Port Number         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
~         IPv4 Address(es)      ~
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
~  authentication-domain-name   ~
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></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_ENC_DNS (TBA3, see <xref
            target="iana4"></xref>).</t>

            <t hangText="Length:">Length of the enclosed data in octets.</t>

            <t hangText="Enc DNS Flags (Encrypted DNS Flags):">Indicates the
            type(s) of the encrypted DNS server conveyed in this attribute.
            The format of this field is shown in <xref
            target="types"></xref>.</t>

            <t hangText="Num Addresses:">Indicates the number of included IPv4
            addresses.</t>

            <t hangText="Port Number:">If not null, it indicates the port
            number to be used for the encrypted DNS. A null value indicates
            that default port numbers are used. As a reminder, the default
            port number is 853 for DoT and 443 for DoH.</t>

            <t hangText="IPv4 Address(es):">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="authentication-domain-name:">The 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>
          </list></t>

        <t>OPTION_V4_ENC_DNS is a concatenation-requiring option. As such, the
        mechanism specified in <xref target="RFC3396"></xref> MUST be used if
        OPTION_V4_ENC_DNS 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_ENC_DNS in a Parameter
        Request List option <xref target="RFC2132"></xref>. The DHCPv4 client
        sets the Encrypted DNS Types field to the requested encrypted DNS
        server.</t>

        <t>If the DHCPv4 client requested more than one encrypted DNS server
        type, the DHCPv4 client MUST be prepared to receive multiple DHCP
        OPTION_V4_ENC_DNS options; each option is to be treated as a separate
        encrypted DNS server.</t>

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

    <section anchor="RA" title="IPv6 RA Encrypted DNS Options">
      <t>This section defines two Neighbor Discovery <xref
      target="RFC4861"></xref>: IPv6 Router Advertisement (RA) Encrypted DNS
      ADN option (<xref target="RA-ADN"></xref>) and IPv6 RA Encrypted DNS
      Address option (<xref target="RA-ADD"></xref>). These options are useful
      in contexts similar to those discussed in Section 1.1 of <xref
      target="RFC8106"></xref>.</t>

      <section anchor="RA-ADN" title="Encrypted DNS ADN Option">
        <t>The IPv6 RA Encrypted DNS ADN option is used to configure an
        authentication domain name of the encrypted DNS server. The format of
        this option is illustrated in <xref target="ra_dns"></xref>.</t>

        <t><figure anchor="ra_dns" title="RA Encrypted DNS ADN 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     TBA4      |     Length    | Enc DNS Flags |   Unassigned  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Lifetime                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                   authentication-domain-name                  ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></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 (TBA4, 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="Enc DNS Flags (Encrypted DNS Flags):">Indicates the
            type(s) of the encrypted DNS server conveyed in this attribute.
            The format of this field is shown in <xref
            target="types"></xref>.</t>

            <t hangText="Unassigned:">This field is unused. It MUST be
            initialized to zero by the sender and MUST be ignored by the
            receiver.</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="authentication Domain Name:">The domain name of the
            encrypted DNS server. This field is formatted as specified in
            Section 10 of <xref target="RFC8415"></xref>.<vspace
            blankLines="1" />This field MUST be padded with zeros so that its
            size is a multiple of 8 octets.</t>
          </list></t>

        <t></t>
      </section>

      <section anchor="RA-ADD" title="Encrypted DNS Address Option">
        <t>The IPv6 RA Encrypted DNS Address option is used to configure a
        port number and a list of IPv6 addresses of the encrypted DNS server.
        The format of this option is illustrated in <xref
        target="ra_add"></xref>. 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 Address options may be used.</t>

        <t><figure anchor="ra_add" title="RA Encrypted DNS Address 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     TBA5      |     Length    |         Unassigned            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Lifetime                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Enc DNS Flags |  Unassigned   |           Port Number         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                         ipv6-address                          |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                         ipv6-address                          |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              ...                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
          </figure>The fields of the RA Encrypted DNS Address option shown in
        <xref target="ra_add"></xref> are as follows:</t>

        <t><list style="hanging">
            <t hangText="Type:">8-bit identifier of the Encrypted DNS Address
            Option as assigned by IANA (TBA5, 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="Unassigned:">This field is unused. It MUST be
            initialized to zero by the sender and MUST be ignored by the
            receiver.</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 encrypted DNS IPv6 addresses are 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 these IPv6 addresses MUST no longer be used.</t>

            <t hangText="Enc DNS Flags (Encrypted DNS Flags):">Indicates the
            type(s) of the encrypted DNS server conveyed in this attribute.
            The format of this field is shown in <xref
            target="types"></xref>.</t>

            <t hangText="Port Number:">If not null, it indicates the port
            number to be used for the encrypted DNS. A null value indicates
            that default port numbers must be used. As a reminder, the default
            port number is 853 for DoT and 443 for DoH.</t>

            <t hangText="ipv6-address(es):">One or more IPv6 addresses of the
            encrypted DNS server. An address can be link-local, ULA, or
            GUA.</t>
          </list></t>
      </section>
    </section>

    <section anchor="URI" title="DoH URI Templates">
      <t>DoH servers may support more than one URI Template <xref
      target="RFC8484"></xref>. Also, if the resolver hosts several DoH
      services (e.g., no-filtering, blocking adult content, blocking malware),
      these services can be discovered as templates. The following discusses a
      mechanism for a DoH client to retrieve the list of supported templates
      by a DoH server.</t>

      <t>Upon discovery of a DoH resolver (Sections <xref format="counter"
      target="DHCPv6"></xref>, <xref format="counter" target="DHCP"></xref>,
      and <xref format="counter" target="RA"></xref>), the DoH client may
      contact that DoH resolver to retrieve the list of supported DoH services
      using DEER <xref target="I-D.pauly-add-deer"></xref>. This will allow
      the client to discover the resolver's supported DoH templates or DoH
      resolvers that the discovered resolver designates using DNS SVCB queries
      <xref target="I-D.schwartz-svcb-dns"></xref>. The designated DoH
      resolvers and DoH resolver discovered using DHCP/RA may be hosted on the
      same or distinct IP addresses.</t>

      <t>Let's suppose that a host has discovered an encrypted DNS server that
      is DoH-capable. The host has also discovered the following
      information:</t>

      <t><list style="symbols">
          <t>ADN: doh.example.com</t>

          <t>Locator: 2001:db8:1::1</t>
        </list></t>

      <t>The client will use DEER <xref target="I-D.pauly-add-deer"></xref> to
      discover the DoH templates supported by the DNS server at the Locator
      (2001:db8:1::1). In addition to the checks included in DEER, clients
      should verify the ADN (doh.example.com) is valid for the certificate
      provided by the DoH resolver. However, the IP address of the
      DEER-discovered resolver may differ from the Locator field value. This
      will allow the ISP to offer different DoH services to the endpoints
      attached to local networks.</t>

      <t>Alternatively, dedicated DHCP/RA options may be defined to convey an
      URI template in order to avoid additional network traffic to bootstrap
      DoH configuration. An example of the format of such an option is
      depicted in <xref target="uri"></xref>.</t>

      <figure align="center" anchor="uri"
              title="Example of a DHCPv6 URI Template 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   OPTION_V6_DOH_TEMPLATE      |         Option-length         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                         uri-template-data                     ~
|                             . . .                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Each instance of the uri-template-data is formatted as follows:

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-...-+-+-+-+-+-+-+
|   uri-template-len            |          URI Template         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-...-+-+-+-+-+-+-+]]></artwork>
      </figure>

      <t><list style="empty">
          <t>Note: More feedback from the WG is needed to decide which
          approach(es) to follow.</t>
        </list></t>

      <t>How a DoH client makes use of the configured DoH services is out of
      the scope of this document.</t>
    </section>

    <section anchor="forwarder"
             title="Hosting Encrypted DNS Forwarder in Local Networks">
      <t>This section discusses some deployment considerations (not
      recommendations) to host an encrypted DNS forwarder within a local
      network.</t>

      <section anchor="forwarder_m" title="Managed CPEs">
        <t>The section discusses mechanisms that can be used to host an
        encrypted DNS forwarder in a managed CPE (<xref
        target="mcpe"></xref>).</t>

        <section title="DNS Forwarders">
          <t>The managed CPE should support a configuration parameter to
          instruct the CPE whether it has to relay the encrypted DNS server
          received from the ISP's network or has to announce itself as a
          forwarder within the local network. The default behavior of the CPE
          is to supply the encrypted DNS server received from the ISP's
          network.</t>
        </section>

        <section anchor="acme" title="ACME">
          <t>The ISP can assign a unique FQDN (e.g., "cpe1.example.com") and a
          domain-validated public certificate to the encrypted DNS forwarder
          hosted on the CPE. Automatic Certificate Management Environment
          (ACME) <xref target="RFC8555"></xref> can be used by the ISP to
          automate certificate management functions such as domain validation
          procedure, certificate issuance and certificate revocation.</t>
        </section>

        <section title="Auto-Upgrade Based on Domains and their Subdomains">
          <t>If the ADN conveyed in DHCP/RA (Sections <xref format="counter"
          target="DHCPv6"></xref>, <xref format="counter"
          target="DHCP"></xref>, and <xref format="counter"
          target="RA"></xref>) is preconfigured in popular OSes or browsers as
          a verified resolver and the auto-upgrade (<xref
          target="Auto"></xref>) is allowed for both the preconfigured ADN and
          its sub-domains, the encrypted DNS client will learn the local
          encrypted DNS forwarder using DHCP/RA and auto-upgrade because the
          preconfigured ADN would match the subjectAltName value in the server
          certificate. For example, if the preconfigured ADN is
          "*.example.com" and the discovered encrypted DNS forwarder is
          "cpe1.example.com", auto-upgrade will take place.</t>

          <t>In this case, the CPE can communicate the ADN of the local DoH
          forwarder (<xref target="acme"></xref>) to internal hosts using
          DHCP/RA (Sections <xref format="counter" target="DHCPv6"></xref>,
          <xref format="counter" target="DHCP"></xref>, and <xref
          format="counter" target="RA"></xref>).</t>

          <t>Let's suppose that "*.example.net" is preconfigured as a verified
          resolved in the browser or OS. If the encrypted DNS client discovers
          a local forwarder "cpe1-internal.example.net", the encrypted DNS
          client will auto-upgrade because the preconfigured ADN would match
          subjectAltName value "cpe1-internal.example.net" of type dNSName. As
          shown in <xref target="subdomainex"></xref>, the auto-upgrade to a
          rogue server advertising "rs.example.org" will fail because it does
          not match "*.example.net". <figure align="center"
              anchor="subdomainex"
              title="A Simplified Example of Auto-upgrade based on Subdomains">
              <artwork align="center"><![CDATA[Encrypted DNS                              CPE
capable client                             (@i) 
      |                                     | 
      |<=================DHCP===============| 
      | {ADN=cpe1-internal.example.net, @i} |  
      |                                     |
      |                   Rogue Server      |
      |                       (@rs)         |
      |                         |           |
      X<===========DHCP=========|           |
      |{ADN=rs.example.org, @rs}|           |
      |                         |           |
      |                                     |
      |<=================DoH===============>|
      |                                     |

Legend:
  * @i: internal IP address of the CPE
  * @rs: IP address of a rogue server
]]></artwork>
            </figure></t>
        </section>
      </section>

      <section anchor="forwarder_u" title="Unmanaged CPEs">
        <t>The approach specified in <xref target="forwarder_m"></xref> does
        not apply for hosting a DNS forwarder in an unmanaged CPE.</t>

        <t>The unmanaged CPE administrator (referred to as administrator) can
        host an encrypted DNS forwarder on the unmanaged CPE. This assumes the
        following:<list style="symbols">
            <t>The encrypted DNS server certificate is managed by the entity
            in-charge of hosting the encrypted DNS forwarder. <vspace
            blankLines="1" />Alternatively, a security service provider can
            assign a unique FQDN to the CPE. The encrypted DNS forwarder will
            act like a private encrypted DNS server only be accessible from
            within the the local network.</t>

            <t>The encrypted DNS forwarder will either be configured to use
            the ISP's or a 3rd party encrypted DNS server.</t>

            <t>The unmanaged CPE will advertise the encrypted DNS forwarder
            ADN using DHCP/RA to internal hosts.</t>
          </list></t>

        <t><xref target="internal_forwarded"></xref> illustrates an example of
        an unmanaged CPE hosting a forwarder which connects to a 3rd party
        encrypted DNS server. In this example, the DNS information received
        from the managed CPE (and therefore from the ISP) is ignored by the
        Internal CPE hosting the forwarder.</t>

        <t><figure align="center" anchor="internal_forwarded"
            title="Example of an Internal CPE Hosting a Forwarder">
            <artwork align="center"><![CDATA[         ,--,--,--.                         ,--,
       ,'         Internal   Managed     ,-'    '-     3rd Party
Host--(  Network#A  CPE--------CPE------(   ISP   )--- DNS Server
 |     `.         ,-'|          |        `-.    -'       |
 |       `-'--'--'   |          |<==DHCP==>|`--'         |
 |                   |<==DHCP==>|          |             | 
 |<======DHCP=======>|          |                        |
 |     {RI, @i}      |                                   |
 |<==Encrypted DNS==>|<==========Encrypted DNS==========>|

Legend:
  * @i: IP address of the DNS forwarder hosted in the Internal
        CPE. 
]]></artwork>
          </figure></t>
      </section>
    </section>

    <section anchor="legacy" title="Legacy CPEs">
      <t>Hosts serviced by legacy CPEs that can't be upgraded to support the
      options defined in Sections <xref format="counter"
      target="DHCPv6"></xref>, <xref format="counter" target="DHCP"></xref>,
      and <xref format="counter" target="RA"></xref> won't be able to learn
      the encrypted DNS server hosted by the ISP, in particular. If the ADN is
      not discovered using DHCP/RA, such hosts will have to fallback to use
      DEER as defined in <xref target="I-D.pauly-add-deer"></xref> to discover
      the encrypted DNS server and to retrieve the list of supported DoH
      services using the SVCB RRtype <xref
      target="I-D.schwartz-svcb-dns"></xref> without verifying the hostname of
      discovered templates with the ADN. Other guidance in DEER relating to
      resolver verification must be followed in this case. This will prevent
      an unencrypted resolver on a local address from referring to an
      encrypted resolver at a different address without an out-of-band
      configuration in the client beyond the scope of this document or
      DEER.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <section 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. Also, an
        attacker can use a public IP address and get an 'IP address'-validated
        public certificate from a CA to 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
            CPEs discards DHCP response messages received from any local
            endpoint.</t>

            <t>RA-Guard described in <xref target="RFC7113"></xref>, the CPE
            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 CPE filters
            packets with forged source IP addresses.</t>
          </list></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 information provided by such networks via DHCP, DHCPv6, or
        RA (e.g., NTP server, DNS server, default domain) are untrusted
        because DHCP and RA 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, so 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 of 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="flags-IANA" title="Encrypted DNS Flag Bits">
        <t><figure>
            <artwork><![CDATA[                                          1 2 3 4 5 6 7 8
                                         +-+-+-+-+-+-+-+-+
Encrypted DNS Types is a set of 8 flags: |U|U|U|U|U|Q|H|T|
                                         +-+-+-+-+-+-+-+-+]]></artwork>
          </figure>where flag bits in positions 1-5 are for future assignment
        as additional flag bits.</t>

        <t>This document requests IANA to create a new registry called
        "Encrypted DNS Types". The initial values of the registry are as
        follows:</t>

        <texttable>
          <ttcol align="center">Bit Position</ttcol>

          <ttcol align="center">Label</ttcol>

          <ttcol>Description</ttcol>

          <ttcol align="center">Reference</ttcol>

          <c>1</c>

          <c>U</c>

          <c>Unassigned</c>

          <c></c>

          <c>2</c>

          <c>U</c>

          <c>Unassigned</c>

          <c></c>

          <c>3</c>

          <c>U</c>

          <c>Unassigned</c>

          <c></c>

          <c>4</c>

          <c>U</c>

          <c>Unassigned</c>

          <c></c>

          <c>5</c>

          <c>U</c>

          <c>Unassigned</c>

          <c></c>

          <c>6</c>

          <c>Q</c>

          <c>DNS-over-QUIC (DoQ)</c>

          <c>[ThisDocument]</c>

          <c>7</c>

          <c>H</c>

          <c>DNS-over-HTTP (DoH)</c>

          <c>[ThisDocument]</c>

          <c>8</c>

          <c>T</c>

          <c>DNS-over-TLS (DoT)</c>

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

        <t>New flag bits are assigned via Standards Action <xref
        target="RFC8126"></xref>.</t>
      </section>

      <section anchor="iana6" title="DHCPv6 Options">
        <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_ENC_ADN</c>

          <c>Yes</c>

          <c>No</c>

          <c>[ThisDocument]</c>

          <c>TBA2</c>

          <c>OPTION_V6_ENC_ADD</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|                |                |
+------+------------------+-------+----------------+----------------+
| TBA3 | OPTION_V4_ENC_DNS| N     | Encrypted DNS  | [ThisDocument] |
|      |                  |       | Server         |                |
+------+------------------+-------+----------------+----------------+]]></artwork>
        </figure>
      </section>

      <section anchor="iana7" title="Neighbor Discovery Options">
        <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>TBA4</c>

          <c>DNS Encrypted DNS ADN Option</c>

          <c>[ThisDocument]</c>

          <c>TBA5</c>

          <c>DNS Encrypted DNS Address 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, and Iain Sharp for the comments.</t>

      <t>Thanks to Mark Nottingham for the feedback on HTTP redirection.</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>
    </section>

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

   Email: n.leymann@telekom.de]]></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.8126'?>

      <?rfc include='reference.RFC.3396'?>
    </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.8520'?>

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

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

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

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

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

      <?rfc include='reference.I-D.ietf-dprive-dnsoquic'?>

      <?rfc include='reference.I-D.ietf-v6ops-rfc7084-bis' ?>

      <?rfc include='reference.I-D.pauly-add-deer'?>

      <?rfc include='reference.I-D.schwartz-svcb-dns'?>

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

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

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

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

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

      <reference anchor="TR-069"
                 target="https://www.broadband-forum.org/technical/download/TR-069.pdf">
        <front>
          <title>CPE WAN Management Protocol</title>

          <author fullname="The Broadband Forum" initials=""
                  surname="The Broadband Forum">
            <organization></organization>
          </author>

          <date month="December" year="2018" />
        </front>
      </reference>

      <reference anchor="TS.24008"
                 target="http://www.3gpp.org/DynaReport/24008.htm">
        <front>
          <title>Mobile radio interface Layer 3 specification; Core network
          protocols; Stage 3 (Release 16)</title>

          <author fullname="" surname="">
            <organization>3GPP</organization>
          </author>

          <date day="0" month="December" year="2019" />
        </front>
      </reference>

      <reference anchor="Auto-upgrade"
                 target="docs.google.com/document/d/128i2YTV2C7T6Gr3I-81zlQ-_Lprnsp24qzy_20Z1Psw/edit">
        <front>
          <title>DoH providers: criteria, process for Chrome</title>

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

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

      <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>

    <section anchor="depl" title="Sample Target Deployment Scenarios">
      <t>Internet Service Providers (ISPs) traditionally provide DNS resolvers
      to their customers. To that aim, ISPs deploy the following mechanisms to
      advertise a list of DNS Recursive DNS server(s) to their customers:</t>

      <t><list style="symbols">
          <t>Protocol Configuration Options in cellular networks <xref
          target="TS.24008"></xref>.</t>

          <t>DHCPv4 <xref target="RFC2132"></xref> (Domain Name Server Option)
          or DHCPv6 <xref target="RFC8415"></xref><xref
          target="RFC3646"></xref> (OPTION_DNS_SERVERS).</t>

          <t>IPv6 Router Advertisement <xref target="RFC4861"></xref><xref
          target="RFC8106"></xref> (Type 25 (Recursive DNS Server
          Option)).</t>
        </list></t>

      <t>The communication between a customer's device (possibly via Customer
      Premises Equipment (CPE)) and an ISP-supplied DNS resolver takes place
      by using cleartext DNS messages (Do53). Some examples are depicted in
      <xref target="do53"></xref>. In the case of cellular networks, the
      cellular network will provide connectivity directly to a host (e.g.,
      smartphone, tablet) or via a CPE. Do53 mechanisms used within the Local
      Area Network (LAN) are similar in both fixed and cellular CPE-based
      broadband service offerings.</t>

      <t><figure align="center" anchor="do53"
          title="Sample Legacy Deployments">
          <artwork align="center"><![CDATA[(a) Fixed Networks
                                 ,--,--,--.
    +-+      LAN     +---+    ,-'           `-. 
    |H+--------------+CPE+---+      ISP        )
    +-+              +---+    `-.          ,-' 
     |                           `--'--'--'    
     |                               |
     |<=============Do53============>| 
     |                               |

(b) Cellular Networks

     |                               |
     |<=============Do53============>| 
     |                               |
     |                           ,--,--,-.
    +-+      LAN     +---+    ,-'         . 
    |H+--------------+CPE+---+             \
    +-+              +---+  ,'     ISP     `-.
                            (                )
                       +-----+-.          ,-'
    +-+                |        `--'--'--'  
    |H+----------------+             |
    +-+                              |
     |                               |
     |<=============Do53============>| 
     |                               |

Legend:
 * H: refers to a host.
]]></artwork>
        </figure></t>

      <section anchor="mcpe" title="Managed CPEs">
        <t>This section focuses on CPEs that are managed by ISPs.</t>

        <section title="Direct DNS">
          <t>ISPs have developed an expertise in managing service-specific
          configuration information (e.g., CPE WAN Management Protocol <xref
          target="TR-069"></xref>). For example, these tools may be used to
          provision the DNS server's ADN to managed CPEs if an encrypted DNS
          is supported by a local network similar to what is depicted in <xref
          target="wan"></xref>.</t>

          <t>For example, DoH-capable (or DoT) clients establish the DoH (or
          DoT) session with the discovered DoH (or DoT) server.</t>

          <t>The DNS client discovers whether the DNS server in the local
          network supports DoH/DoT/DoQ by using a dedicated field in the
          discovery message: Encrypted DNS Types (Sections <xref
          format="counter" target="DHCPv6"></xref>, <xref format="counter"
          target="DHCP"></xref>, and <xref format="counter"
          target="RA"></xref>) .</t>

          <t><figure align="center" anchor="wan"
              title="Encrypted DNS in the WAN">
              <artwork align="center"><![CDATA[(a) Fixed Networks

                                 ,--,--,--.
    +-+      LAN     +---+    ,-'           `-. 
    |H+--------------+CPE+---+      ISP        )
    +-+              +---+    `-.          ,-' 
     |                           `--'--'--'    
     |                               |
     |<========Encrypted DNS========>| 
     |                               |

(b) Cellular Networks    
                                                                      
     |                               |
     |<========Encrypted DNS========>| 
     |                               |
     |                           ,--,--,-.
    +-+      LAN     +---+    ,-'         . 
    |H+--------------+CPE+---+             \
    +-+              +---+  ,'     ISP     `-.
                            (                )
                       +-----+-.          ,-'
    +-+                |        `--'--'--'  
    |H+----------------+             |
    +-+                              |
     |                               |
     |<========Encrypted DNS========>| 
     |                               |]]></artwork>
            </figure></t>

          <t><xref target="wan"></xref> shows the scenario where the CPE
          relays the list of encrypted DNS servers it learns for the network
          by using mechanisms like DHCP or a specific Router Advertisement
          message. In such context, direct encrypted DNS sessions will be
          established between a host serviced by a CPE and an ISP-supplied
          encrypted DNS server (see the example depicted in <xref
          target="direct"></xref> for a DoH/DoT-capable host).</t>

          <t><figure align="center" anchor="direct"
              title="Direct Encrypted DNS Sessions">
              <artwork><![CDATA[
                      ,--,--,--.             ,--,--,--.
                   ,-'          `-.       ,-'   ISP    `-.
           Host---(      LAN      CPE----(    DNS Server  )
             |     `-.          ,-'       `-.          ,-'
             |        `--'--'--'             `--'--'--'
             |                                   | 
             |<=========Encrypted DNS===========>|
]]></artwork>
            </figure></t>

          <t></t>
        </section>

        <section title="Proxied DNS">
          <t><xref target="proxied"></xref> shows a deployment where the CPE
          embeds a caching DNS forwarder. The CPE advertises itself as the
          default DNS server to the hosts it serves. The CPE relies upon DHCP
          or RA to advertise itself to internal hosts as the default
          DoT/DoH/Do53 server. When receiving a DNS request it cannot handle
          locally, the CPE forwards the request to an upstream DoH/DoT/Do53
          resolver. Such deployment is required for IPv4 service continuity
          purposes (e.g., Section 5.4.1 of <xref
          target="I-D.ietf-v6ops-rfc7084-bis"></xref>) or for supporting
          advanced services within a local network (e.g., malware filtering,
          parental control, Manufacturer Usage Description (MUD) <xref
          target="RFC8520"></xref> to only allow intended communications to
          and from an IoT device). When the CPE behaves as a DNS forwarder,
          DNS communications can be decomposed into two legs:<list
              style="symbols">
              <t>The leg between an internal host and the CPE.</t>

              <t>The leg between the CPE and an upstream DNS resolver.</t>
            </list></t>

          <t>An ISP that offers encrypted DNS to its customers may enable
          encrypted DNS in one or both legs as shown in <xref
          target="proxied"></xref>. Additional considerations related to this
          deployment are discussed in <xref target="forwarder"></xref>.</t>

          <t><figure align="center" anchor="proxied"
              title="Proxied Encrypted DNS Sessions">
              <artwork><![CDATA[(a)
                      ,--,--,--.             ,--,--,--.
                   ,-'          `-.       ,-'   ISP    `-.
           Host---(      LAN      CPE----(    DNS Server  )
             |     `-.          ,-'|      `-.          ,-'
             |        `--'--'--'   |         `--'--'--'
             |                     |             | 
             |<=====Encrypted=====>|<=Encrypted=>| 
             |         DNS         |     DNS     | 

(b)
                      ,--,--,--.             ,--,--,--.
          Legacy   ,-'          `-.       ,-'   ISP    `-.
           Host---(      LAN      CPE----(    DNS Server  )
             |     `-.          ,-'|      `-.          ,-'
             |        `--'--'--'   |         `--'--'--'
             |                     |             | 
             |<=======Do53========>|<=Encrypted=>| 
             |                     |     DNS     | 
]]></artwork>
            </figure></t>

          <t></t>
        </section>
      </section>

      <section anchor="ucpe" title="Unmanaged CPEs">
        <t></t>

        <section title="ISP-facing Unmanaged CPEs">
          <t>Customers may decide to deploy unmanaged CPEs (assuming the CPE
          is compliant with the network access technical specification that is
          usually published by ISPs). Upon attachment to the network, an
          unmanaged CPE receives from the network its service configuration
          (including the DNS information) by means of, e.g., DHCP. That DNS
          information is shared within the LAN following the same mechanisms
          as those discussed in <xref target="mcpe"></xref>. A host can thus
          establish DoH/DoT session with a DoH/DoT server similar to what is
          depicted in <xref target="direct"></xref> or <xref
          target="proxied"></xref>.</t>
        </section>

        <section title="Internal Unmanaged CPEs">
          <t>Customers may also decide to deploy internal routers (called
          hereafter, Internal CPEs) for a variety of reasons that are not
          detailed here. Absent any explicit configuration on the internal CPE
          to override the DNS configuration it receives from the ISP-supplied
          CPE, an Internal CPE relays the DNS information it receives via
          DHCP/RA from the ISP-supplied CPE to connected hosts. Encrypted DNS
          sessions can be established by a host with the DNS servers of the
          ISP (see <xref target="internal_isp"></xref>).</t>

          <t><figure align="center" anchor="internal_isp"
              title="Direct Encrypted DNS Sessions with the ISP DNS Resolver (Internal CPE)">
              <artwork align="center"><![CDATA[
          ,--,--,--.                    ,--,--,--.
       ,-'          Internal         ,-'    ISP   `-.
Host--(    Network#A   CPE----CPE---(    DNS Server   )
 |     `-.          ,-'              `-.          ,-'
 |        `--'--'--'                    `--'--'--'
 |                                          | 
 |<==============Encrypted DNS=============>|
]]></artwork>
            </figure></t>

          <t>Similar to managed CPEs, a user may modify the default DNS
          configuration of an unmanaged CPE to use his/her favorite DNS
          servers instead. Encrypted DNS sessions can be established directly
          between a host and a 3rd Party DNS server (see <xref
          target="internal_3"></xref>).</t>

          <t><figure align="center" anchor="internal_3"
              title="Direct Encrypted DNS Sessions with a Third Party DNS Resolver ">
              <artwork align="center"><![CDATA[         ,--,--,--.                  ,--,
       ,'         Internal        ,-'    '-     3rd Party
Host--(  Network#A  CPE----CPE---(   ISP   )--- DNS Server
 |     `.         ,-'             `-.    -'         |
 |       `-'--'--'                   `--'           |
 |                                                  | 
 |<=================Encrypted DNS==================>|
]]></artwork>
            </figure></t>

          <t><xref target="forwarder_u"></xref> discusses considerations
          related to hosting a forwarder in the Internal CPE.</t>
        </section>
      </section>
    </section>

    <section anchor="Auto"
             title="Make Use of Discovered Encrypted DNS Servers">
      <t>Even if the use of a discovered encrypted DNS server is beyond the
      discovery process and falls under encrypted server selection, the
      following discusses typical conditions under which discovered encrypted
      DNS server can be used. <list style="symbols">
          <t>If the DNS server's IP address discovered by using DHCP/RA is
          preconfigured in the OS or Browser as a verified resolver (e.g.,
          part of an auto-upgrade program such as <xref
          target="Auto-upgrade"></xref>), the DNS client auto-upgrades to use
          the preconfigured encrypted DNS server tied to the discovered DNS
          server IP address. In such a case the DNS client will perform
          additional checks out of band, such as confirming that the Do53 IP
          address and the encrypted DNS server are owned and operated by the
          same organisation.</t>

          <t>Similarly, if the ADN conveyed in DHCP/RA (Sections <xref
          format="counter" target="DHCPv6"></xref>, <xref format="counter"
          target="DHCP"></xref>, and <xref format="counter"
          target="RA"></xref>) is preconfigured in the OS or browser as a
          verified resolver, the DNS client auto-upgrades to establish an
          encrypted a DoH/DoT/DoQ session with the ADN.<vspace
          blankLines="1" />In such case, the DNS client matches the domain
          name in the Encrypted DNS DHCP/RA option with the 'DNS-ID'
          identifier type within subjectAltName entry in the server
          certificate conveyed in the TLS handshake.</t>
        </list></t>
    </section>
  </back>
</rfc>
