<?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-02" ipr="trust200902">
  <front>
    <title abbrev="DoH/DoT in Home and Mobile ">DNS-over-HTTPS and
    DNS-over-TLS Server Discovery and Deployment Considerations for Home and
    Mobile Networks</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>

    <date />

    <workgroup>ADD</workgroup>

    <abstract>
      <t>This document discusses DoT/DoH deployment considerations for home
      networks. It particularly sketches the required steps to use DoT/DoH
      capabilities provided by local networks.</t>

      <t>One of the goals of this document is to assess to what extent
      existing tools can be used to provide a DoT/DoH service. As an outcome,
      new DHCP and Router Advertisement Options are specified in order to
      convey a DNS Authentication Domain Name.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <t>Internet Service Providers (ISPs) traditionally provide DNS resolvers
      to their customers. Typically, ISPs deploy the following mechanisms to
      advertise a list of DNS Recursive DNS server(s) to their customers:
      <?rfc subcompact="yes" ?></t>

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

          <t>DHCP <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)).<?rfc subcompact="no" ?></t>
        </list></t>

      <t>The communication between a customer's device (a.k.a., User Equipment
      (UE)) (possibly via Customer Premises Equipment (CPE)) and an
      ISP-supplied DNS resolver takes place by using cleartext DNS messages
      (Do53, <xref target="I-D.ietf-dnsop-terminology-ter"></xref>). Some
      examples are depicted in <xref target="do53"></xref>. In the case of
      cellular networks, connectivity can be provided to a UE or to 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

           ,--,--,--.             ,--,--,--.
        ,-'   +--+  `-.       ,-'   ISP    `-. 
       ( LAN  |UE|    CPE----(    DNS Server  )
        `-.   +--+   ,-'       `-.          ,-' 
           `--'|-'--'             `--'--'--'    
               |                     |
               |<=======Do53========>| 


(b) Cellular Networks

                |<===========Do53=========>| 
           ,--,-|,--.                      |
        ,-'   +--+   `-.               ,--,--,--.    
       ( LAN  |UE|     CPE------------+          \
        `-.   +--+   ,-'            ,'   ISP     `-. 
           `--'--'--'              (    DNS Server  )
                              +-----+-.          ,-'
               +--+           |        `--'--'--'  
               |UE+-----------+
               +--+
]]></artwork>
        </figure></t>

      <t>ISPs use DNS to provide additional services such as (but not limited
      to) malware filtering, parental control, or VoD (Video on Demand)
      optimization. DNS is also a central component for mastering the quality
      of experience for current latency-sensitive services, but also emerging
      ones (such as those services that pertain to the Ultra Reliability and
      Low Latency Communications (uRLLC) or Enhanced Mobile Broadband (eMBB).
      <list style="empty">
          <t>For example, the latency targets set in the context of 5G are 1ms
          (uRLLC) and 4ms (eMBB). An ISP will be able to address such
          demanding latency requirements assuming the corresponding services
          rely upon resources (network, compute, storage) that are located as
          close to the user as possible (e.g., by means of Edge Computing
          techniques and resources). Such latency requirements are likely to
          be addressed by means of optimized designs (DNS, in particular),
          too.</t>
        </list>Relying upon local DNS resolvers will therefore contribute to
      meet the aforementioned service requirements. The use of external
      resolvers is likely to induce an extra service delay which exceeds by
      far the service target.</t>

      <t>This document focuses on the support of DNS-over-HTTPS (DoH) <xref
      target="RFC8484"></xref> or DNS-over-TLS (DoT) <xref
      target="RFC7858"></xref> in local networks. In particular, the document
      describes how a local DoH/DoT server can be discovered and used by
      connected hosts. This document specifies options that allow DNS clients
      to discover local DoT/DoH servers. In particular, <xref
      target="RI"></xref> describes DHCP, DHCPv6, and RA options to convey the
      Authentication Domain Name (ADN, defined in <xref
      target="RFC8310"></xref>).</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 the same mechanisms listed above. 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>
    </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> and <xref
      target="I-D.ietf-dnsop-terminology-ter"></xref>.</t>

      <t>'DoH/DoT' refers to DNS-over-HTTPS and/or DNS-over-TLS.</t>
    </section>

    <section anchor="depl" title="Sample Deployment Scenarios">
      <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 authentication domain name information (ADN) to managed
      CPEs if DoH/DoT is supported by a local network similar to what is
      depicted in <xref target="wan"></xref>.</t>

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

      <t>If a DNS client supports both DoT and DoH, the client try to
      establish DoH/DoT sessions with the discovered DNS server to determine
      whether these servers support DoH and/or DoT (<xref
      target="address"></xref>). Alternatively, the DNS client may discover
      whether the DNS server in the local network supports DoH/DoT by using
      the mechanism discussed in <xref target="discovery"></xref>.</t>

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

           ,--,--,--.             ,--,--,--.
        ,-'   +--+  `-.       ,-'   ISP    `-. 
       ( LAN  |UE|    CPE----(    DNS Server  )
        `-.   +--+   ,-'       `-.         ,-' 
           `--'|-'--'             `--'--'--'    
               |                     |
               |<=======DoH/DoT=====>| 


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

      <t><xref target="wan"></xref> shows the scenario where the CPE relays
      the list of DoT/DoH servers it learns for the network by using
      mechanisms like DHCP or a specific Router Advertisement message. In such
      context, direct DoH/DoT sessions will be established between a host
      serviced by a CPE and an ISP-supplied DoT/DoH 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 DoH/DoT Sessions">
          <artwork><![CDATA[
                      ,--,--,--.             ,--,--,--.
                   ,-'          `-.       ,-'   ISP    `-.
            UE----(      LAN      CPE----(    DNS Server  )
             |     `-.          ,-'       `-.          ,-'
             |        `--'--'--'             `--'--'--'
             |                                   | 
             |<==============DoT/DoH============>|
]]></artwork>
        </figure></t>

      <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., <xref
      target="I-D.ietf-v6ops-rfc7084-bis"></xref>) or for supporting advanced
      services within the home (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 DoH/DoT to its customers may enable DoH/DoT in
      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 DoH/DoT Sessions">
          <artwork><![CDATA[
                      ,--,--,--.             ,--,--,--.
                   ,-'          `-.       ,-'   ISP    `-.
            UE----(      LAN      CPE----(    DNS Server  )
             |     `-.          ,-'|      `-.          ,-'
             |        `--'--'--'   |         `--'--'--'
             |                     |             | 
             |<======DoT/DoH======>|<==DoT/DoH==>| 

]]></artwork>
        </figure></t>

      <t></t>
    </section>

    <section anchor="RI" title="DNS Reference Identifier Option">
      <t>This section describes how a DNS client can discover the ADN of local
      DoH/DoT 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>:<list
          style="empty">
          <t>"few 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".</t>
        </list></t>

      <t>In order to allow for PKIX-based authentication between a DNS client
      and a DoH/DoT 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>The DNS client establishes a DoH/DoT session with the discovered DNS
      IP address(es) (<xref target="address"></xref>) 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 DNS Reference Identifier.</t>

      <t>If the DNS Reference Identifier 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>

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

        <t><figure anchor="ri_option"
            title="DHCPv6 DNS Reference Identifier 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_DNS_RI          |         Option-length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                 Authentication Domain Name                    |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
          </figure>The fields of the option shown in <xref
        target="ri_option"></xref> are as follows:<?rfc subcompact="yes" ?></t>

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

            <t>Option-length: Length of the Authentication Domain Name field
            in octets.</t>

            <t>Authentication Domain Name: A fully qualified domain name of
            the DoH/DoT server. This field is formatted as specified in
            Section 10 of <xref target="RFC8415"></xref>.</t>
          </list></t>

        <t><?rfc subcompact="no" ?>An example of the Authentication Domain
        Name encoding is shown in <xref target="fqdn"></xref>. This example
        conveys the FQDN "doh1.example.com.".</t>

        <t><figure anchor="fqdn"
            title="An example of the authentication-domain-name Encoding">
            <artwork><![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="DHCP" title="DHCP DNS Reference Identifier Option">
        <t>The DHCP DNS Reference Identifier option is used to configure an
        authentication domain name of the DoH/DoT server. The format of this
        option is illustrated in <xref target="dhcpri_dns"></xref>.</t>

        <t><figure anchor="dhcpri_dns"
            title="DHCP DNS Reference Identifier Option">
            <artwork><![CDATA[
          Code  Length   Authentication Domain Name 
         +-----+-----+-----+-----+-----+-----+-----+--
         |TBA2 |  n  |  s1 |  s2 |  s3 |  s4 | s5  |  ...
         +-----+-----+-----+-----+-----+-----+-----+--

   The values s1, s2, s3, etc. represent the domain name labels in the
   domain name encoding.

]]></artwork>
          </figure></t>

        <t>The fields of the option shown in <xref target="dhcpri_dns"></xref>
        are as follows:<?rfc subcompact="yes" ?><list style="symbols">
            <t>Code: OPTION_V4_DNS_RI (TBA2, see <xref
            target="iana4"></xref>).</t>

            <t>Length: Includes the length of the Authentication Domain Name
            field in octets.</t>

            <t>Authentication Domain Name: The domain name of the DoH/DoT
            server. This field is formatted as specified in Section 10 of
            <xref target="RFC8415"></xref>.</t>
          </list></t>

        <t><?rfc subcompact="no" ?></t>
      </section>

      <section anchor="RA" title="RA DNS Reference Identifier Option">
        <t>The IPv6 Router Advertisement (RA) DNS Reference Identifier option
        is used to configure an authentication domain name of the DoH/DoT
        server. The format of this option is illustrated in <xref
        target="ra_dns"></xref>.</t>

        <t><figure anchor="ra_dns" title="RA DNS Reference Identifier Option">
            <artwork><![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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      |     Length    |           Reserved            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                           Lifetime                            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     :                  Authentication Domain Name                   :
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
          </figure></t>

        <t>The fields of the option shown in <xref target="ra_dns"></xref> are
        as follows:<?rfc subcompact="yes" ?><list style="symbols">
            <t>Type: 8-bit identifier of the DNS Reference Identifier Option
            as assigned by IANA (TBA3, see <xref target="iana7"></xref>).</t>

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

            <t>Reserved: This field is unused. It MUST be initialized to zero
            by the sender and MUST be ignored by the receiver.</t>

            <t>Lifetime: 32-bit unsigned integer. The maximum time in seconds
            (relative to the time the packet is received) over which the
            authentication domain name MAY be used as a DNS Reference
            Identifier. <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 the DNS Reference
            Identifier MUST no longer be used.</t>

            <t>Authentication Domain Name: The domain name of the DoH/DoT
            server. This field is formatted as specified in Section 10 of
            <xref target="RFC8415"></xref>.</t>
          </list></t>

        <t><?rfc subcompact="no" ?></t>
      </section>
    </section>

    <section anchor="address" title="Locating DoH/DoT Servers">
      <t>A CPE or a host relies upon discovery mechanisms (such as PCO, DHCP,
      or RA) to retrieve DoH/DoT servers' reachability information. In the
      various scenarios sketched in <xref target="depl"></xref>, Do53, DoH,
      and DoT may terminate on the same IP address (or distinct IP addresses
      as depicted in <xref target="selection"></xref>). Terminating
      Do53/DoH/DoT on the same or distinct IP addresses is
      deployment-specific.</t>

      <t>From an IP reachability standpoint, DoH/DoT servers SHOULD be located
      by their address literals rather than their names. This avoids adding a
      dependency on another server to resolve the DoH/DoT name. Concretely, if
      Do53/DoH/DoT terminate on same IP addresses, existing discovery
      mechanisms <xref target="RFC2132"></xref><xref
      target="RFC3646"></xref><xref target="RFC8106"></xref> can be leveraged
      to learn the IP addresses of DoT/DoH servers while an authentication
      domain name is supplied by one of the options discussed in <xref
      target="RI"></xref>. An example is depicted in <xref
      target="selection-s"></xref>.<figure align="center" anchor="selection-s"
          title="Locating DoH/DoT/Do53 (Same DNS Server)">
          <artwork><![CDATA[
                 Legacy Do53                       
                   client                        
                       |<===DHCP===>|
                       |    {@1}    |       |
                       |            |       |
                       |======Do53 Query===>|
                       |            |       |   --,--,-
                      ,+-,--,--.    |       |,/  ISP   \.
                   ,-'          `-. |     ,-'            `-.
         DoH/DoT --(      LAN      CPE----( S (@1)         )
    capable client  `-.          ,-'|      `-.           ,-'
             |        `--'--'--'    |       | `--'--'--'
             |<========DHCP========>|       | 
             |       {RI, @1}       |       | 
             |                              | 
             |<=========DoT/DoH============>|

Legend:
  * S: DNS server 
  * {@1}: IP address of S; returned in a DHCP 
    Domain Name Server option
  * RI: DNS Reference Identifier
]]></artwork>
        </figure></t>

      <t><figure align="center" anchor="selection"
          title="Locating DoH/DoT/Do53 (Distinct Servers)">
          <artwork><![CDATA[
                 Legacy Do53                       
                   client                        
                       |<===RA======|
                       | {RI,@1,@2} |             |
                       |            |             |
                       |========Do53 Query=======>|
                       |            |           --,--,-
                      ,+-,--,--.    |        ,/  S1 (@1)\.
                   ,-'          `-. |     ,-'    ISP     `-.
         DoH/DoT --(      LAN      CPE----(                 )
    capable client  `-.          ,-'|      `-.   S2 (@2)  ,-'
             |        `--'--'--'    |         `--'--'--'
             |<=========RA==========|             | 
             |      {RI,@1,@2}      |             | 
             |                                    | 
             |<===============DoT/DoH============>|

Legend:
  * S1: Do53 server
  * S2: DoH/DoT server
  * @1: IP address of S1
  * @1: IP address of S2
  * RI: DNS Reference Identifier
]]></artwork>
        </figure></t>

      <t>The following sub-sections discusses the conditions under which
      discovered DoT/DoH server can be used.</t>

      <section anchor="auto" title="DoT/DoH Auto-Upgrade">
        <t>Additional considerations are discussed below for the use of DoH
        and DoT servers provided by local networks:<list style="symbols">
            <t>If the DNS server's IP address discovered by using DHCP/RA is
            pre-configured 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 pre-configured DoH/DoT server tied to the discovered DNS
            server IP address. In such a case the DNS client will perform
            additional check out of band, such as confirming that the Do53 IP
            address and the DoH server are owned and operated by the same
            organisation.</t>

            <t>Similarly, if the ADN conveyed in DHCP/RA (<xref
            target="RI"></xref>) is pre-configured in the OS or browser as a
            verified resolver, the DNS client auto-upgrades to establish a
            DoH/DoT session with the ADN.<vspace blankLines="1" />In such
            case, the DNS client matches the domain name in the DNS Reference
            Identifier 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>

      <section anchor="ad" title="Other Deployment Options">
        <t>Some deployment options to securely configure hosts are discussed
        below. These options are provided for the sake of completeness. </t>

        <t><list style="symbols">
            <t>If Device Provisioning Protocol (DPP) <xref
            target="DPP"></xref> is used, the configurator can securely
            configure devices in the home network with the local DoT/DoH
            server using DPP. If the DoT/DoH servers use raw public keys <xref
            target="RFC7250"></xref>, the Subject Public Key Info (SPKI) pin
            set <xref target="RFC7250"></xref> of raw public keys may be
            encoded in a QR code. The configurator (e.g., mobile device) can
            scan the QR code and provision SPKI pin set in OS/Browser. The
            configurator can in-turn securely configure devices (e.g.,
            thermostat) in the home network with the SPKI pin set using
            DPP.</t>

            <t>If a CPE is co-located with security services within the home
            network, the CPE can use WPA-PSK but with unique pre-shared keys
            for different endpoints to deal with security issues. In such
            networks, <xref
            target="I-D.reddy-dprive-bootstrap-dns-server"></xref> may be used
            to securely bootstrap endpoint devices with the authentication
            domain name and DNS server certificate of the local network's
            DoH/DoT server. <vspace blankLines="1" />The OS would not know if
            the WPA pre-shared-key is the same for all clients or a unique
            pre-shared key is assigned to the host. Hence, the user has to
            indicate to the system that a unique pre-shared key is assigned to
            trigger the bootstrapping procedure. <vspace blankLines="1" />If
            the device joins a home network using a single shared password
            among all the attached devices, a compromised device can host a
            fake access point, and the device cannot be securely bootstrapped
            with the home network's DoH/DoT server.</t>
          </list></t>
      </section>
    </section>

    <section anchor="discovery" title="DoT and DoH DNS-SD Considerations">
      <t>As an alternative to probing discovered DNS servers in order to check
      (1) whether they support DoT and/or DoH, and (2) whether customized port
      numbers are used (instead of 443/853 port numbers), a DNS client MAY use
      DNS-based Service Discovery (DNS-SD) <xref target="RFC6763"></xref>.</t>

      <t>DNS-SD defines a set of naming rules for certain DNS record types
      that they use for advertising and discovering services. Section 4.1 of
      <xref target="RFC6763"></xref> specifies that a service instance name in
      DNS-SD has the following structure:</t>

      <figure>
        <artwork><![CDATA[<Instance> . <Service> . <Domain>]]></artwork>
      </figure>

      <t></t>

      <t>The &lt;Domain&gt; portion specifies the authentication domain name
      (<xref target="RI"></xref>). The &lt;Service&gt; portion of the DNS
      service instance name MUST be "_domain-s._tcp" (Section 6 of <xref
      target="RFC7858"></xref>) or "_doh._tcp" (<xref target="name"></xref>).
      If no DNS-SD records can be retrieved by the DNS client, it MUST wait a
      time period that is appropriate for the encountered error (e.g.,
      NXDOMAIN, timeout, etc.).</t>

      <t>If DoH is supported by the DNS server, the DNS client may request the
      URI resource record type <xref target="RFC7553"></xref> using the domain
      name discovered using DNS Reference Identifier DHCP/RA option (<xref
      target="RI"></xref>) to use the HTTPS URI scheme (Section 3 of <xref
      target="RFC8484"></xref>).</t>
    </section>

    <section anchor="forwarder" title="Hosting DoH/DoT Forwarder in the CPE">
      <t>The following mechanisms can be used to host a DoH/DoT forwarder in
      the CPE:</t>

      <t><list style="hanging">
          <t hangText="ACME:">If a CPE is co-located with security services
          (e.g., malware filtering, parental control, MUD), the ISP can assign
          a unique FQDN (e.g., cpe1.example.com) and a domain-validated public
          certificate to the DoH/DoT forwarder hosted on the CPE. Automatic
          Certificate Management Environment (ACME) <xref
          target="RFC8555"></xref> can be used to automate certificate
          management functions such as domain validation procedure,
          certificate issuance and certificate revocation.<vspace
          blankLines="1" />Alternatively, the security service provider can
          assign a unique FQDN to the managed CPE. DNS requests to the
          forwarder are sent to the internal IP address, not the external one.
          The DoH/DoT forwarder will act like a private DoT/DoH server only be
          accessible from within the home network.</t>

          <t hangText="Redirection:">An ISP-managed CPE can be configured with
          the ISP's DoH/DoT resolver IP addresses and ADN, which it will
          communicate to internal hosts using DHCP/RA. Upon joining the
          network, a DoH/DoT client follows the procedure specified in <xref
          target="auto"></xref> to upgrade to DoT/DoH. <vspace
          blankLines="1" />Once the DoH session is established, the ISP
          DoH/DoT server uses HTTP redirection (Section 6.4.4 in <xref
          target="RFC7231"></xref>) to redirect the DNS client to the DoH
          forwarder hosted on the CPE (e.g., cpe1-internal.example.net). The
          DNS client either uses Do53 or opportunistic privacy profile
          (Section 7.2 of <xref target="RFC8310"></xref>) to resolve the
          domain name in the redirected URI and eventually establishes DoH
          session with the DoH forwarder in the CPE reachable on the LAN
          interface. A simplified example is illustrated in <xref
          target="redirection"></xref>.<vspace blankLines="1" />PKIX
          authentication <xref target="RFC6125"></xref> based upon the domain
          name in the redirected URI will detect rogue DNS servers.<vspace
          blankLines="1" />A DNS client that successfully connects to a
          redirected DoH server may choose to locally cache the server host IP
          addresses in order to not have to repeat the Do53 query.<figure
              align="center" anchor="redirection"
              title="A Simplified Example of Redirection to the DNS Forwarder in the CPE">
              <artwork><![CDATA[                                                --,--,-
                      ,+-,--,--.             ,/  ISP   \.
                   ,-'          `-.       ,-'            `-.
         DoH/DoT --(      LAN      CPE----( S (@1)          )
    capable client  `-.          ,-'|      `-.           ,-'
             |        `--'--'--'    |       | `--'--'--'
             |<========DHCP========>|       | 
             |       {RI, @1}       |       | 
             |                              | 
             |<============DoH=============>|
             |<------303 (See Other)--------| 
             |                              | 
             |-----Do53 Query------>| 
             |<----CPE's LAN @------|
             |                      |        
             |<========DoH=========>|    
             |                      |     
Legend:
  * S: DoH/DoT server
  * @1: IP address of S
]]></artwork>
            </figure></t>
        </list></t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>An attacker can get a domain name, domain-validated public
      certificate from a CA, host a DoT/DoH server and claim the best DNS
      privacy preservation policy. Also, an attacker within the home network
      can use the public IP address, get an 'IP address'-validated public
      certificate from a CA, host a DoT/DoH server and claim the best DNS
      privacy preservation policy.</t>

      <t>Because DHCP/RA messages are not encrypted or protected against
      modification in any way, their content can be spoofed or modified by
      compromised devices within the home network. An attacker can spoof the
      DHCP/RA response to provide the attacker's DoT/DoH server. Note that
      such an attacker can launch other attacks as discussed in Section 22 of
      <xref target="RFC8415"></xref>. Furthermore, if the browser or the OS is
      pre-configured with a list of DNS servers and some of which perform
      malware filtering while others do not, an attacker can prevent
      contacting the preferred filtering DNS servers causing a downgrade
      attack to a non-filtering DNS server, which the attacker can leverage to
      deliver malware.<!--Related to the downgrade attack described in the previous paragraph,
   if the browser or OS is pre-configured to use a DNS server that
   filters malware, it MUST NOT use verified DNS servers (e.g.,
   learned via DHCP/RA) unless they also perform malware filtering and also
   conform to the user's privacy policy.
--></t>

      <t>The primary attacks against the methods described in <xref
      target="discovery"></xref> are the ones that would lead to impersonation
      of a DNS server and spoofing the DNS response to indicate that the DNS
      server does not support DoH or DoT. To protect against DNS-vectored
      attacks, secured DNS (DNSSEC) can be used to ensure the validity of the
      received DNS records received. Impersonation of a DoH/DoT server is
      prevented by validating the certificate presented by the DoH/DoT server.
      If DHCP/RA conveys an ADN, but the DNS-SD lookup indicates that the DNS
      server does not support DoH/DoT, the DNS client can detect the DNS
      response is spoofed.</t>

      <t>The use of DoH/DoT also depends on the user's policies. For example,
      the user may indicate his/her consent to use (or not) the
      locally-discovered DoH/DoT server. The DNS client must adhere to these
      policies. This document does not make any assumption about the structure
      of such policies nor mandates specific requirements. Such policies and
      their handling is out of scope.</t>

      <t>DoH/DoT servers discovered using insecure discovery mechanisms like
      DHCP/RA are used by a DNS client if the insecurely discovered DoH/DoT
      server is pre-configured in the OS or the browser. Sections <xref
      format="counter" target="auto"></xref> and <xref format="counter"
      target="ad"></xref> identify a set of deployment options under which
      DHCP/RA RI options can be used.</t>

      <t>If the insecurely discovered DoH/DoT server is not pre-configured in
      the OS or browser, its policy information must be cryptographically
      attested by the ISP (e.g., <xref
      target="I-D.reddy-dprive-dprive-privacy-policy"></xref>); user consent
      is required to use the locally-discovered DoH/DoT server. Such consent
      may be part of the generic policies discussed above.</t>

      <t>DoT/DoH sessions with rogue servers spoofing 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> based upon the authentication domain name in
      the Reference Identifier 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>TCP connections received outside the home network MUST be discarded
      by the DoH/DoT 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 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:
        https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-2.</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_DNS_RI</c>

          <c>Yes</c>

          <c>Yes</c>

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

        <t></t>
      </section>

      <section anchor="iana4" title="DHCP Option">
        <t>IANA is requested to assign the following new DHCP Option Code in
        the registry maintained in:
        https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml#options.</t>

        <figure>
          <artwork><![CDATA[+------+------------------+-------+----------------+----------------+
| Tag  | Name             | Data  | Meaning        | Reference      |
|      |                  | Length|                |                |
+------+------------------+-------+----------------+----------------+
| TBA2 | OPTION_V4_DNS_RI | N     | DoT/DoH server | [ThisDocument] |
|      |                  |       | authentication |                |
|      |                  |       | domain name    |                |
+------+------------------+-------+----------------+----------------+]]></artwork>
        </figure>
      </section>

      <section anchor="iana7" title="RA 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
        http://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml#icmpv6-parameters-5.</t>

        <texttable>
          <ttcol>Type</ttcol>

          <ttcol>Description</ttcol>

          <ttcol>Reference</ttcol>

          <c>TBA3</c>

          <c>DNS Reference Identifier Option</c>

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

        <t></t>
      </section>

      <section anchor="name" title="Service Name">
        <t>IANA is requested to allocate the following service name from the
        registry available at:
        https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.</t>

        <t><figure>
            <artwork><![CDATA[     Service Name:            doh
     Port Number:             N/A
     Transport Protocol(s):   TCP
     Description:             DNS-over-HTTPS
     Assignee:                IESG <iesg@ietf.org>
     Contact:                 IETF Chair <chair@ietf.org>
     Reference:               [ThisDocument]
]]></artwork>
          </figure></t>
      </section>
    </section>

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

      <t>Thanks to Tommy Jensen for the comments.</t>
    </section>
  </middle>

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

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

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

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

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

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

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

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

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

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

      <?rfc include='reference.RFC.6763'?>
    </references>

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

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

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

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

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

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

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

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

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

      <?rfc include='reference.I-D.reddy-dprive-dprive-privacy-policy'?>

      <?rfc include='reference.I-D.reddy-dprive-bootstrap-dns-server'?>

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

      <?rfc include='reference.I-D.ietf-dnsop-terminology-ter'?>

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

      <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="DPP"
                 target="https://www.wi-fi.org/download.php?file=/sites/default/files/private/Device_Provisioning_Protocol_Specification_v1.1_1.pdf">
        <front>
          <title>Device Provisioning Protocol Specification</title>

          <author fullname="The Wi-Fi Alliance" initials=""
                  surname="The Wi-Fi Alliance">
            <organization></organization>
          </author>

          <date />
        </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>
    </references>

    <section title="Customized DHCP Configuration">
      <t>In deployment where DoH/DoT/Do53 are not co-located, an ISP may
      return a list of servers that is composed of DoH (and/or DoT) and Do53
      servers. A host that is also DoH-capable (and/or DoT-capable), will try
      to establish a DoH (and/or DoT) session to that list. DoT and/or DoH are
      supported if the client succeeds to establish a session.</t>

      <t>Let's consider that the DoH server is reachable at
      2001:db8:122:300::2 while the Do53 server is reachable at
      2001:db8:122:300::1. The DHCP server will then return a list that
      includes both 2001:db8:122:300::1 and 2001:db8:122:300::2 to a
      requesting DNS client. That list is passed to the DNS client. A legacy
      Do53 client will select 2001:db8:122:300::1 while a DoH client will
      select 2001:db8:122:300::2.</t>

      <t>Alternatively, the DHCP server may return a customized DNS
      configuration (<xref target="RFC7969"></xref>) as a function of the
      requested DHCP options. For example, if the DHCP client does not include
      a DNS Reference Identifier option in its request, the DHCP server will
      return the IP address of the Do53 server (2001:db8:122:300::1). If a DNS
      Reference Identifier option is present in the request, the DHCP server
      returns the IP address(es) of the DoH server (2001:db8:122:300::2) (or
      2001:db8:122:300::2 and 2001:db8:122:300::1 in this order).</t>
    </section>
  </back>
</rfc>
