ADD M. Boucadair
Internet-Draft Orange
Intended status: Standards Track T. Reddy
Expires: February 17, 2021 McAfee
D. Wing
Citrix
N. Cook
Open-Xchange
August 16, 2020

Encrypted DNS Discovery and Deployment Considerations for Home Networks
draft-btw-add-home-08

Abstract

This document discusses encrypted DNS (e.g., DoH, DoT, DoQ) deployment considerations for home networks. It particularly sketches the required steps to use of encrypted DNS capabilities provided by local networks.

The document specifies new DHCP and Router Advertisement Options to convey a DNS Authentication Domain Name.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on February 17, 2021.

Copyright Notice

Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

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:

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) [I-D.ietf-dnsop-terminology-ter]. Some examples are depicted in Figure 1. 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.

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

(b) Cellular Networks
                |<===========Do53=========>| 
           ,--,-|,--.                      |
        ,-'   +--+   `-.               ,--,--,--.    
       ( LAN  |H |     CPE------------+          \
        `-.   +--+   ,-'            ,'   ISP     `-. 
           `--'--'--'              (                )
                              +-----+-.          ,-'
              +--+            |        `--'--'--'  
              |H +------------+
              +--+
Legend:
 * H: refers to a host.

Figure 1: Sample Legacy Deployments

This document focuses on the support of encrypted DNS such as DNS-over-HTTPS (DoH) [RFC8484], DNS-over-TLS (DoT) [RFC7858], or DNS-over-QUIC (DoQ) [I-D.ietf-dprive-dnsoquic] in local networks. In particular, the document describes how a local encrypted DNS server can be discovered and used by connected hosts. This document specifies options that allow DNS clients to discover local encrypted DNS servers. Section 4 describes DHCP, DHCPv6, and RA options to convey the DNS Authentication Domain Name (ADN) [RFC8310].

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.

Both managed and unmanaged CPEs are discussed in the document (Section 3). Also, considerations related to hosting a DNS forwarder in the CPE are described (Section 8).

Hosts and/or CPEs 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 [RFC6731] for a discussion of issues and an example of DNS server selection for multi-interfaced devices.

2. Terminology

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 [RFC2119][RFC8174] when, and only when, they appear in all capitals, as shown here.

This document makes use of the terms defined in [RFC8499] and [I-D.ietf-dnsop-terminology-ter].

Do53 refers to unencrypted DNS.

'DoH/DoT' refers to DNS-over-HTTPS and/or DNS-over-TLS.

3. Sample Deployment Scenarios

3.1. Managed CPEs

ISPs have developed an expertise in managing service-specific configuration information (e.g., CPE WAN Management Protocol [TR-069]). For example, these tools may be used to provision the ADN to managed CPEs if an encrypted DNS is supported by a local network similar to what is depicted in Figure 2.

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

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 (Section 4).

(a) Fixed Networks

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

(b) Cellular Networks    
                                                                      
                |<=====Encrypted DNS======>| 
           ,--,-|,--.                      |
        ,-'   +--+   `-.               ,--,--,--.    
       ( LAN  |H |     CPE------------+          \
        `-.   +--+   ,-'            ,'   ISP     `-. 
           `--'--'--'              (    DNS Server  )
                              +-----+-.          ,-'
               +--+           |        `--'--'--'  
               |H +-----------+
               +--+

Figure 2: Encrypted DNS in the WAN

Figure 2 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 Figure 3 for a DoH/DoT-capable host).

                      ,--,--,--.             ,--,--,--.
                   ,-'          `-.       ,-'   ISP    `-.
           Host---(      LAN      CPE----(    DNS Server  )
             |     `-.          ,-'       `-.          ,-'
             |        `--'--'--'             `--'--'--'
             |                                   | 
             |<=========Encrypted DNS===========>|

Figure 3: Direct Encrypted DNS Sessions

Figure 4 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., [I-D.ietf-v6ops-rfc7084-bis]) or for supporting advanced services within the home (e.g., malware filtering, parental control, Manufacturer Usage Description (MUD) [RFC8520] 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:

An ISP that offers encrypted DNS to its customers may enable encrypted DNS in both legs as shown in Figure 4. Additional considerations related to this deployment are discussed in Section 8.

                      ,--,--,--.             ,--,--,--.
                   ,-'          `-.       ,-'   ISP    `-.
           Host---(      LAN      CPE----(    DNS Server  )
             |     `-.          ,-'|      `-.          ,-'
             |        `--'--'--'   |         `--'--'--'
             |                     |             | 
             |<=====Encrypted=====>|<=Encrypted=>| 
                       DNS                DNS

Figure 4: Proxied Encrypted DNS Sessions

3.2. Unmanaged CPEs

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 Section 3.1. A host can thus, for example, establish DoH/DoT session with a DoH/DoT server similar to what is depicted in Figure 3.

Customers may also decide to deploy internal home 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 Figure 5).

          ,--,--,--.                    ,--,--,--.
       ,-'          Internal         ,-'    ISP   `-.
Host--(    Network#A   CPE----CPE---(    DNS Server   )
 |     `-.          ,-'              `-.          ,-'
 |        `--'--'--'                    `--'--'--'
 |                                          | 
 |<==============Encrypted DNS=============>|

Figure 5: Direct Encrypted DNS Sessions with the ISP DNS Resolver (Internal CPE)

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 Figure 6).

         ,--,--,--.                  ,--,
       ,'         Internal        ,-'    '-     3rd Party
Host--(  Network#A  CPE----CPE---(   ISP   )--- DNS Server
 |     `.         ,-'             `-.    -'         |
 |       `-'--'--'                   `--'           |
 |                                                  | 
 |<=================Encrypted DNS==================>|

Figure 6: Direct Encrypted DNS Sessions with a Third Party DNS Resolver

Section 8.2 discusses considerations related to hosting a forwarder in the Internal CPE.

4. DNS Reference Identifier Option

This section describes how a DNS client can discover the ADN of local encrypted DNS server(s) using DHCP (Sections 4.1 and 4.2) and Neighbor Discovery protocol (Section 4.3).

As reported in Section 1.7.2 of [RFC6125]:

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.

The DNS client establishes an encrypted DNS session with the discovered DNS IP address(es) (Section 5) and uses the mechanism discussed in Section 8 of [RFC8310] to authenticate the DNS server certificate using the authentication domain name conveyed in the DNS Reference Identifier. This assumes that default port numbers are used to establish an encrypted DNS session (e.g., 853 for DoT, 443 for DoH). A discussion on the use of customized port numbers is included in Appendix A.

If the DNS Reference Identifier is discovered by a host using both RA and DHCP, the rules discussed in Section 5.3.1 of [RFC8106] MUST be followed.

4.1. DHCPv6 Reference Identifier Option

The DHCPv6 Reference Identifier option is used to configure an authentication domain name of the encrypted DNS server. The format of this option is shown in Figure 7.

    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         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Encr DNS Types|                                               |
   +---------------+                                               |
   |                                                               |
   ~                 Authentication Domain Name                    ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 7: DHCPv6 DNS Reference Identifier Option

Figure 7 are as follows:

+-+-+-+-+-+-+-+-+
|U|U|U|U|U|Q|H|T|
+-+-+-+-+-+-+-+-+  

Figure 8: Encrypted DNS Types

Figure 9. This example conveys the FQDN "doh1.example.com.".

      +------+------+------+------+------+------+------+------+------+
      | 0x04 |   d  |   o  |   h  |  1   | 0x07 |   e  |   x  |   a  |
      +------+------+------+------+------+------+------+------+------+
      |   m  |   p  |   l  |   e  | 0x03 |   c  |   o  |   m  | 0x00 |
      +------+------+------+------+------+------+------+------+------+

Figure 9: An example of the authentication-domain-name Encoding

Multiple instances of OPTION_V6_DNS_RI may be returned to a DHCPv6 client; each pointing to a distinct encrypted DNS server type.

To discover an encrypted DNS server, the DHCPv6 client including OPTION_V6_DNS_RI 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 [RFC8415]. The DHCPv6 client sets the Encrypted DNS Types field to the requested encrypted DNS server type(s).

If the DHCPv6 client requested more than one encrypted DNS server type, the DHCP client MUST be prepared to receive multiple DHCP OPTION_V6_DNS_RI options; each option is to be treated as a separate encrypted DNS server.

4.2. DHCP DNS Reference Identifier Option

The DHCP DNS Reference Identifier option is used to configure an authentication domain name of the encrypted DNS server. The format of this option is illustrated in Figure 10.

          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         |     TBA2      |     Length    |
         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
         | Encr DNS Types|               |
         +-+-+-+-+-+-+-+-+               |
         |                               |
         ~  Authentication Domain Name   ~
         |                               |
         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  

with:

          Authentication Domain Name 
         +-----+-----+-----+-----+-----+--
         |  s1 |  s2 |  s3 |  s4 | s5  |  ...
         +-----+-----+-----+-----+-----+--

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

Figure 10: DHCP DNS Reference Identifier Option

The fields of the option shown in Figure 10 are as follows:

[RFC3396] MUST be used if OPTION_V4_DNS_RI exceeds the maximum DHCP option size of 255 octets.

To discover an encrypted DNS server, the DHCP client requests the Encrypted DNS Reference Identifier by including OPTION_V4_DNS_RI in a Parameter Request List option [RFC2132]. The DHCP client sets the Encrypted DNS Types field to the requested encrypted DNS server.

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

4.3. RA DNS Reference Identifier Option

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 Figure 11.

      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    | Encr DNS Types|   Unassigned  |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                           Lifetime                            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     :                  Authentication Domain Name                   :
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 11: RA DNS Reference Identifier Option

The fields of the option shown in Figure 11 are as follows:

5. Locating Encrypted DNS Servers

From an IP reachability standpoint, encrypted DNS servers SHOULD be located by their address literals rather than passing the discovered names (ADN) to a resolution library. This avoids adding a dependency on another server to resolve the ADN.

In the various scenarios sketched in Section 3, 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.

In order to optimize the size of discovery messages when all servers terminate on the same IP address, a CPE or a host relies upon the discovery mechanisms specified in [RFC2132][RFC3646][RFC8106] to retrieve a list of IP addresses to reach their DNS servers.

In deployments where encrypted DNS servers are not co-located, a list of servers that is composed of encrypted DNS servers can be returned using in [RFC2132][RFC3646][RFC8106]. For example, 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.

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. The DNS clients will try connecting to the DNS servers using both IP addresses and the standard ports for DoH and Do53 protocols in a fashion similar to the Happy Eyeballs mechanism defined in [RFC8305]. The DoH client selects the IP address 2001:db8:122:300::2 with which the TLS session is established, whereas the legacy Do53 client selects the IP address 2001:db8:122:300::1 with which cleartext DNS messages are exchanged over UDP or TCP.

                    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

The DHCP server may return a customized DNS configuration ([RFC7969]) 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).

An alternate design where a list of IP addresses is also included in the same option conveying ADN is discussed in Appendix A.

6. DoH URI Templates

DoH servers may support more than one URI Template [RFC8484]. 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.

Upon discovery of a DoH resolver (Section 4), the DoH client contacts that DoH resolver to retrieve the list of supported DoH services using the well-known URI defined in [I-D.btw-add-rfc8484-clarification]. DoH clients re-iterates that request regularly to retrieve an updated list of supported DoH services. Note that a "push" mode can be considered using the mechanism defined in [I-D.ietf-dnssd-push].

How a DoH client makes use of the configured DoH services is out of scope of this document.

7. Make Use of Discovered Encrypted DNS Server

Even if the use of a discovered encrypted DNS server is beyond the discovery process and falls under encrypted server selection, the following subsections discuss conditions under which discovered encrypted DNS server can be used.

7.1. Encrypted DNS Auto-Upgrade

Additional considerations are discussed below for the use of DoH and DoT servers provided by local networks:

7.2. DNS Server Identity Assertion

If the discovered encrypted DNS server information is not pre-configured in the OS or the browser, the DNS client needs evidence about the encrypted server to assess its trustworthiness and a way to appraise such evidence. The DNS client can validate the Policy Assertion Token signature (Section 7 of [I-D.reddy-add-server-policy-selection]) to cryptographically assert the DNS server identity to identify it is connecting to an encrypted DNS server hosted by a specific organization (e.g., ISP).

7.3.

Some deployment options to securely configure hosts are discussed below. These options are provided for the sake of completeness.

8. Hosting Encrypted DNS Forwarder in the CPE

8.1. Managed CPEs

The following mechanisms can be used to host a DoH/DoT forwarder in a managed CPE (Section 3.1).

8.1.1. ACME

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) [RFC8555] can be used by the ISP to automate certificate management functions such as domain validation procedure, certificate issuance and certificate revocation.

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.

8.1.2. Auto-Upgrade Based on Domains and their Subdomains

If the ADN conveyed in DHCP/RA (Section 4) is pre-configured in popular OSes or browsers as a verified resolver and the auto-upgrade (Section 7.1) is allowed for both the pre-configured ADN and its sub-domains, the DoH/DoT client will learn the local encrypted DNS forwarder using DHCP/RA and auto-upgrade because the left-most label of the pre-configured ADN would match the subjectAltName value in the server certificate. Concretely, the CPE can communicate the ADN of the local DoH forwarder (Section 8.1.1) to internal hosts using DHCP/RA (Section 4).

                         Rogue Server
             |              | 
             X<==DHCP=======|  
             | {ADN=        |        
             |  rs.example.org, @rs} 
             |              |                  --,--,-
             |        ,+-,--+--.             ,/  ISP   \.
             |     ,-'          `-.       ,-'            `-.
         DoH/DoT --(      LAN      CPE----( S (@1)          )
    capable client  `-.          ,-'|      `-.           ,-'
             |        `--'--'--'    |         `--'--'--'
             |<========DHCP========>|        
             |{ADN=                 |        
             |  cpe1-internal.example.net, @i}    
             |        
             |<========DoH=========>|    
             |                      |     
Legend:
  * S: DoH/DoT server
  * @1: IP address of S
  * @i: internal IP address of the CPE
  * @rs: IP address of a rogue server

Figure 12: A Simplified Example of Auto-upgrade based on Sub-domains

Let's suppose that "example.net" is pre-configured as a verified resolved in the browser or OS. If the DoH/DoT client discovers a local forwarder "cpe1-internal.example.net", the encrypted DNS client will auto-upgrade because the pre-configured ADN would match subjectAltName value "cpe1-internal.example.net" of type dNSName. As shown in Figure 12, the auto-upgrade to a rogue server advertising "rs.example.org" will fail.

8.2. Unmanaged CPEs

The approach specified in Section 8.1 does not apply for hosting a DNS forwarder in an unmanaged CPE.

The unmanaged CPE administrator (referred to as administrator) can host a DoH/DoT forwarder on the unmanaged CPE. This assumes the following:

Figure 13 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.

         ,--,--,--.                         ,--,
       ,'         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. 

Figure 13: Example of an Internal CPE Hosting a Forwarder

9. Legacy CPEs

Hosts serviced by legacy CPEs that can't be upgraded to support the options defined in Section 4 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 the special-use domain name defined in [I-D.pp-add-resinfo] to discover the encrypted DNS server and to retrieve the list of supported DoH services using the RESINFO RRtype [I-D.pp-add-resinfo].

The DHCP/RA option to discover ADN takes precedence over special-use domain name since the special-use domain name is suseptible to both internal and external attacks whereas DHCP/RA is only vulnerable to internal attacks.

10. Security Considerations

10.1. Spoofing Attacks

Because DHCP/RA messages are not encrypted or protected against modification in any way, their content can be spoofed or modified by active attackers (e.g., compromised devices within the home network). An active attacker (Section 3.3 of [RFC3552]) can spoof the DHCP/RA response to provide the attacker's DoH/DoT/DoQ server. Note that such an attacker can launch other attacks as discussed in Section 22 of [RFC8415]. The attacker can get a domain name, domain-validated public certificate from a CA, host a DoH/DoT/DoQ server and claim the best DNS privacy preservation policy. Also, an attacker can use a public IP address, get an 'IP address'-validated public certificate from a CA, host a DoH/DoT/DoQ server and claim the best DNS privacy preservation policy.

The possible mitigations for this attack are listed below:

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 [RFC6125] 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).

10.2. Deletion Attacks

If the DHCP responses or RAs are dropped by the attacker, the client can fallback to use a pre-configured encrypted DNS server. However, the use of policies to select servers is out of scope of this document.

Note that deletion attack is not specific to DHCP/RA.

10.3. Passive Attacks

A passive attacker (Section 3.2 of [RFC3552]) 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.

10.4. Security Capabilities of CPEs

TCP connections received from outside the home network MUST be discarded by the encrypted DNS forwarder in the CPE. This behavior adheres to REQ#8 in [RFC6092]; it MUST apply for both IPv4 and IPv6.

Various home routers also offer levels of security. Attacks of spoofed or modified DHCP responses and RA messages by attackers within the home network may be mitigated by making use of the following mechanisms:

10.5. Wireless Security - Authentication Attacks

Wireless LAN (WLAN) as frequently deployed in home networks is vulnerable to various attacks (e.g., [Evil-Twin], [Krack], [Dragonblood]). 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.

With the current deployments (2020), the pre-shared-key is the same for all clients that connect to the same WLAN. This results in the key being shared to attackers resulting in security breach. Man-in-the-middle attacks are possible within home networks because WLAN authentication lacks peer entity authentication.

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 home network administraor to mutually authenticate to the home WLAN Access Point (e.g., 802.1x Wireless User Authentication on OpenWRT [dot1x], EAP-pwd [RFC8146]). Not all of endpoint devices (e.g., IoT devices) support 802.1x supplicant and need an alternate mechanism to connect to the home network. To address this limitation, unique pre-shared keys can be created for each such device and WPA-PSK is used (e.g., [PSK]).

11. IANA Considerations

11.1. DHCPv6 Option

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.

Value Description Client ORO Singleton Option Reference
TBA1 OPTION_V6_DNS_RI Yes Yes [ThisDocument]

11.2. DHCP Option

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.

+------+------------------+-------+----------------+----------------+
| Tag  | Name             | Data  | Meaning        | Reference      |
|      |                  | Length|                |                |
+------+------------------+-------+----------------+----------------+
| TBA2 | OPTION_V4_DNS_RI | N     | DoT/DoH server | [ThisDocument] |
|      |                  |       | authentication |                |
|      |                  |       | domain name    |                |
+------+------------------+-------+----------------+----------------+

11.3. RA Option

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.

Type Description Reference
TBA3 DNS Reference Identifier Option [ThisDocument]

12. Acknowledgements

Many thanks to Christian Jacquenet for the review.

Thanks to Tommy Jensen, Stephen Farrell, Martin Thomson, Vittorio Bertola, Stephane Bortzmeyer, Ben Schwartz and Iain Sharp for the comments.

Thanks to Mark Nottingham for the feedback on HTTP redirection.

13. References

13.1. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[RFC2132] Alexander, S. and R. Droms, "DHCP Options and BOOTP Vendor Extensions", RFC 2132, DOI 10.17487/RFC2132, March 1997.
[RFC3396] Lemon, T. and S. Cheshire, "Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4)", RFC 3396, DOI 10.17487/RFC3396, November 2002.
[RFC4861] Narten, T., Nordmark, E., Simpson, W. and H. Soliman, "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, DOI 10.17487/RFC4861, September 2007.
[RFC8106] Jeong, J., Park, S., Beloeil, L. and S. Madanapalli, "IPv6 Router Advertisement Options for DNS Configuration", RFC 8106, DOI 10.17487/RFC8106, March 2017.
[RFC8126] Cotton, M., Leiba, B. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017.
[RFC8310] Dickinson, S., Gillmor, D. and T. Reddy, "Usage Profiles for DNS over TLS and DNS over DTLS", RFC 8310, DOI 10.17487/RFC8310, March 2018.
[RFC8415] Mrugalski, T., Siodelski, M., Volz, B., Yourtchenko, A., Richardson, M., Jiang, S., Lemon, T. and T. Winters, "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)", RFC 8415, DOI 10.17487/RFC8415, November 2018.

13.2. Informative References

[Auto-upgrade] The Unicode Consortium, "DoH providers: criteria, process for Chrome"
[dot1x] Cisco, "Basic 802.1x Wireless User Authentication"
[DPP] The Wi-Fi Alliance, "Device Provisioning Protocol Specification"
[Dragonblood] The Unicode Consortium, "Dragonblood: Analyzing the Dragonfly Handshake of WPA3 and EAP-pwd"
[Evil-Twin] The Unicode Consortium, "Evil twin (wireless networks)"
[I-D.btw-add-rfc8484-clarification] Boucadair, M., Cook, N., Reddy.K, T. and D. Wing, "Supporting Redirection for DNS Queries over HTTPS (DoH)", Internet-Draft draft-btw-add-rfc8484-clarification-02, July 2020.
[I-D.ietf-dnsop-terminology-ter] Hoffman, P., "Terminology for DNS Transports and Location", Internet-Draft draft-ietf-dnsop-terminology-ter-02, August 2020.
[I-D.ietf-dnssd-push] Pusateri, T. and S. Cheshire, "DNS Push Notifications", Internet-Draft draft-ietf-dnssd-push-25, October 2019.
[I-D.ietf-dprive-dnsoquic] Huitema, C., Mankin, A. and S. Dickinson, "Specification of DNS over Dedicated QUIC Connections", Internet-Draft draft-ietf-dprive-dnsoquic-00, April 2020.
[I-D.ietf-v6ops-rfc7084-bis] Palet, J., "Basic Requirements for IPv6 Customer Edge Routers", Internet-Draft draft-ietf-v6ops-rfc7084-bis-04, June 2017.
[I-D.pp-add-resinfo] Sood, P. and P. Hoffman, "DNS Resolver Information Self-publication", Internet-Draft draft-pp-add-resinfo-02, June 2020.
[I-D.reddy-add-iot-byod-bootstrap] Reddy.K, T., Wing, D., Richardson, M. and M. Boucadair, "A Bootstrapping Procedure to Discover and Authenticate DNS-over-TLS and DNS-over-HTTPS Servers for IoT and BYOD Devices", Internet-Draft draft-reddy-add-iot-byod-bootstrap-01, July 2020.
[I-D.reddy-add-server-policy-selection] Reddy.K, T., Wing, D., Richardson, M. and M. Boucadair, "DNS Server Selection: DNS Server Information with Assertion Token", Internet-Draft draft-reddy-add-server-policy-selection-04, July 2020.
[Krack] The Unicode Consortium, "Key Reinstallation Attacks", 2017.
[PSK] Cisco, "Identity PSK Feature Deployment Guide"
[RFC3552] Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003.
[RFC3646] Droms, R., "DNS Configuration options for Dynamic Host Configuration Protocol for IPv6 (DHCPv6)", RFC 3646, DOI 10.17487/RFC3646, December 2003.
[RFC6092] Woodyatt, J., "Recommended Simple Security Capabilities in Customer Premises Equipment (CPE) for Providing Residential IPv6 Internet Service", RFC 6092, DOI 10.17487/RFC6092, January 2011.
[RFC6125] Saint-Andre, P. and J. Hodges, "Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 2011.
[RFC6731] Savolainen, T., Kato, J. and T. Lemon, "Improved Recursive DNS Server Selection for Multi-Interfaced Nodes", RFC 6731, DOI 10.17487/RFC6731, December 2012.
[RFC7113] Gont, F., "Implementation Advice for IPv6 Router Advertisement Guard (RA-Guard)", RFC 7113, DOI 10.17487/RFC7113, February 2014.
[RFC7250] Wouters, P., Tschofenig, H., Gilmore, J., Weiler, S. and T. Kivinen, "Using Raw Public Keys in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)", RFC 7250, DOI 10.17487/RFC7250, June 2014.
[RFC7513] Bi, J., Wu, J., Yao, G. and F. Baker, "Source Address Validation Improvement (SAVI) Solution for DHCP", RFC 7513, DOI 10.17487/RFC7513, May 2015.
[RFC7610] Gont, F., Liu, W. and G. Van de Velde, "DHCPv6-Shield: Protecting against Rogue DHCPv6 Servers", BCP 199, RFC 7610, DOI 10.17487/RFC7610, August 2015.
[RFC7858] Hu, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D. and P. Hoffman, "Specification for DNS over Transport Layer Security (TLS)", RFC 7858, DOI 10.17487/RFC7858, May 2016.
[RFC7969] Lemon, T. and T. Mrugalski, "Customizing DHCP Configuration on the Basis of Network Topology", RFC 7969, DOI 10.17487/RFC7969, October 2016.
[RFC8146] Harkins, D., "Adding Support for Salted Password Databases to EAP-pwd", RFC 8146, DOI 10.17487/RFC8146, April 2017.
[RFC8305] Schinazi, D. and T. Pauly, "Happy Eyeballs Version 2: Better Connectivity Using Concurrency", RFC 8305, DOI 10.17487/RFC8305, December 2017.
[RFC8484] Hoffman, P. and P. McManus, "DNS Queries over HTTPS (DoH)", RFC 8484, DOI 10.17487/RFC8484, October 2018.
[RFC8489] Petit-Huguenin, M., Salgueiro, G., Rosenberg, J., Wing, D., Mahy, R. and P. Matthews, "Session Traversal Utilities for NAT (STUN)", RFC 8489, DOI 10.17487/RFC8489, February 2020.
[RFC8499] Hoffman, P., Sullivan, A. and K. Fujiwara, "DNS Terminology", BCP 219, RFC 8499, DOI 10.17487/RFC8499, January 2019.
[RFC8520] Lear, E., Droms, R. and D. Romascanu, "Manufacturer Usage Description Specification", RFC 8520, DOI 10.17487/RFC8520, March 2019.
[RFC8555] Barnes, R., Hoffman-Andrews, J., McCarney, D. and J. Kasten, "Automatic Certificate Management Environment (ACME)", RFC 8555, DOI 10.17487/RFC8555, March 2019.
[TR-069] The Broadband Forum, "CPE WAN Management Protocol", December 2018.
[TS.24008] 3GPP, "Mobile radio interface Layer 3 specification; Core network protocols; Stage 3 (Release 16)", December 2019.

Appendix A. Customized Port Numbers and IP Addresses

DoT and DoQ may make use of customized port numbers instead of default ones. Also, if many encrypted DNS types are supported by a network but terminate in distinct IP addresses, it is tempting to simplify the probing at the client side by returning both a port number and a list of IP addresses in the option that conveys the ADN. An example of such option is shown in Figure 14. This design will exacerbate the size of discovery messages.

More input is required from the WG.

    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         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Enc DNS Type | Num addresses |          Port Number          |
   +---------------+---------------+-------------------------------+
   |                                                               | 
   ~                         IPv6 Addresses                        ~
   |                                                               |
   +---------------------------------------------------------------+
   |                                                               |
   ~                  DNS Authentication Domain Name               ~
   |                                                               |
   +---------------------------------------------------------------+

Figure 14

Authors' Addresses

Mohamed Boucadair Orange Rennes, 35000 France EMail: mohamed.boucadair@orange.com
Tirumaleswar Reddy McAfee, Inc. Embassy Golf Link Business Park Bangalore, Karnataka 560071 India EMail: TirumaleswarReddy_Konda@McAfee.com
Dan Wing Citrix Systems, Inc. USA EMail: dwing-ietf@fuggles.com
Neil Cook Open-Xchange UK EMail: neil.cook@noware.co.uk