<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc autobreaks="yes"?>
<?rfc compact="yes"?>
<?rfc strict='yes'?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocindent="yes"?>
<rfc category="std" docName="draft-ietf-intarea-provisioning-domains-02"
     ipr="trust200902">
  <front>
    <title abbrev="Provisioning Domains">Discovering Provisioning Domain Names
    and Data</title>

    <author fullname="Pierre Pfister" initials="P" surname="Pfister">
      <organization>Cisco</organization>

      <address>
        <postal>
          <street>11 Rue Camille Desmoulins</street>

          <city>Issy-les-Moulineaux</city>

          <code>92130</code>

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

        <email>ppfister@cisco.com</email>
      </address>
    </author>

    <author fullname="Eric Vyncke" initials="E" role="editor" surname="Vyncke">
      <organization>Cisco</organization>

      <address>
        <postal>
          <street>De Kleetlaan, 6</street>

          <city>Diegem</city>

          <code>1831</code>

          <country>Belgium</country>
        </postal>

        <email>evyncke@cisco.com</email>
      </address>
    </author>

    <author fullname="Tommy Pauly" initials="T" surname="Pauly">
      <organization>Apple</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>tpauly@apple.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="David Schinazi" initials="D" surname="Schinazi">
      <organization>Apple</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>dschinazi@apple.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Wenqin Shao" initials="W" surname="Shao">
      <organization>Telecom-ParisTech</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

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

        <phone/>

        <facsimile/>

        <email>wenqin.shao@telecom-paristech.fr</email>

        <uri/>
      </address>
    </author>

    <!--
    <author fullname="Marcus Keane" initials="M" surname="Keane">
      <organization>Microsoft</organization>

      <address>
        <postal>
          <street>Sandyford Industrial Estate</street>

          <city>Dublin 18</city>

          <region/>

          <code/>

          <country>Ireland</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>Marcus.Keane@microsoft.com</email>

        <uri/>
      </address>
    </author>
	-->

    <date day="4" month="June" year="2018"/>

    <area>Internet</area>

    <workgroup>intarea</workgroup>

    <keyword>PVD</keyword>

    <keyword>provisioning domain</keyword>

    <keyword>host configuration</keyword>

    <abstract>
      <t>An increasing number of hosts access the Internet via multiple
      interfaces or, in IPv6 multi-homed networks, via multiple IPv6 prefix
      configurations context.</t>

      <t>This document describes a way for hosts to identify such contexts,
      called Provisioning Domains (PvDs), where Fully Qualified Domain Names
      (FQDNs) act as PvD identifiers. Those identifiers are advertised in a
      new Router Advertisement (RA) option and, when present, are associated
      with the set of information included within the RA.</t>

      <t>Based on this FQDN, hosts can retrieve additional information about
      their network access characteristics via an HTTP over TLS query. This
      allows applications to select which Provisioning Domains to use as well
      as to provide configuration parameters to the transport layer and
      above.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>It has become very common in modern networks for hosts to access the
      internet through different network interfaces, tunnels, or next-hop
      routers. To describe the set of network configurations associated with
      each access method, the concept of Provisioning Domain (PvD) was defined
      in <xref target="RFC7556"/>.</t>

      <t>This document specifies a way to identify PvDs with Fully Qualified
      Domain Names (FQDN), called PvD IDs. Those identifiers are advertised in
      a new Router Advertisement (RA) <xref target="RFC4861"/> option called
      the PvD ID Router Advertisement option which, when present, associates
      the PvD ID with all the information present in the Router Advertisement
      as well as any configuration object, such as addresses, deriving from
      it. The PVD ID Router Advertisement option may also contain a set of
      other RA options. Since such options are only considered by hosts
      implementing this specification, network operators may configure hosts
      that are 'PvD-aware' with PvDs that are ignored by other hosts.</t>

      <t>Since PvD IDs are used to identify different ways to access the
      internet, multiple PvDs (with different PvD IDs) could be provisioned on
      a single host interface. Similarly, the same PvD ID could be used on
      different interfaces of a host in order to inform that those PvDs
      ultimately provide identical services.</t>

      <t>This document also introduces a way for hosts to retrieve additional
      information related to a specific PvD by means of an HTTP over TLS query
      using an URI derived from the PvD ID. The retrieved JSON object contains
      additional information that would typically be considered unfit, or too
      large, to be directly included in the Router Advertisement, but might be
      considered useful to the applications, or even sometimes users, when
      choosing which PvD should be used.</t>
    </section>

    <section 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 <xref
      target="RFC2119"/>.</t>

      <t>In addition, this document uses the following terminology: <list
          style="hanging">
          <t hangText="Provisioning Domain (PvD): ">A set of network
          configuration information; for more information, see <xref
          target="RFC7556"/>.</t>

          <t hangText="PvD ID: ">A Fully Qualified Domain Name (FQDN) used to
          identify a PvD.</t>

          <t hangText="Explicit PvD: ">A PvD uniquely identified with a PvD
          ID. For more information, see <xref target="RFC7556"/>.</t>

          <t hangText="Implicit PvD: ">A PvD that, in the absence of a PvD ID,
          is identified by the host interface to which it is attached and the
          address of the advertising router. See also <xref
          target="RFC7556"/>.</t>

          <t hangText="PvD-aware host">A host that supports the association of
          network configuration information into PvDs and the use of these
          PvDs. Also named PvD-aware node in <xref target="RFC7556"/>.</t>
        </list></t>
    </section>

    <section anchor="ra"
             title="Provisioning Domain Identification using Router Advertisements">
      <t>Explicit PvDs are identified by a PvD ID. The PvD ID is a Fully
      Qualified Domain Name (FQDN) which MUST belong to the network operator
      in order to avoid naming collisions. The same PvD ID MAY be used in
      several access networks when they ultimately provide identical services
      (e.g., in all home networks subscribed to the same service); else, the
      PvD ID MUST be different to follow section 2.4 of <xref
      target="RFC7556"/>.</t>

      <section title="PvD ID Option for Router Advertisements">
        <t>This document introduces a Router Advertisement (RA) option called
        PvD option. It is used to convey the FQDN identifying a given PvD (see
        <xref target="format"/>), bind the PvD ID with configuration
        information received over DHCPv4 (see <xref target="dhcpv4"/>), enable
        the use of HTTP over TLS to retrieve the PvD Additional Information
        JSON object (see <xref target="data"/>), as well as contain any other
        RA options which would otherwise be valid in the RA.</t>

        <figure anchor="format"
                title="PvD ID Router Advertisements Option format">
          <preamble/>

          <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     |H|L|R|     Reserved    | Delay |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       Sequence Number         |                             ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                             ...
...                         PvD ID FQDN                       ...
...             +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...             |                  Padding                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                             ...
...            Router Advertisement message header            ...
...             (Only present when R-flag is set)             ...
...                                                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Options ...
+-+-+-+-+-+-+-+-+-+-+-+-
            ]]></artwork>

          <postamble/>
        </figure>

        <t><list style="hanging">
            <t hangText="Type        : ">(8 bits) Set to 21.</t>

            <t hangText="Length      : ">(8 bits) The length of the option in
            units of 8 octets, including the Type and Length fields, the
            Router Advertisement message header, if any, as well as the RA
            options that are included within the PvD Option.</t>

            <t hangText="H-flag      : ">(1 bit) 'HTTP' flag stating whether
            some PvD Additional Information is made available through HTTP
            over TLS, as described in <xref target="data"/>.</t>

            <t hangText="L-flag      : ">(1 bit) 'Legacy' flag stating whether
            the router is also providing IPv4 information using DHCPv4 (see
            <xref target="dhcpv4"/>).</t>

            <t hangText="R-flag      : ">(1 bit) 'Router Advertisement' flag
            stating whether the PvD Option is followed (right after padding to
            the next 64 bits boundary) by a Router Advertisement message
            header (See section 4.2 of <xref target="RFC4861"/>).</t>

            <t hangText="Delay       : ">(4 bits) Unsigned integer used to
            delay HTTP GET queries from hosts by a randomized backoff (see
            <xref target="retr"/>).</t>

            <t hangText="Reserved    : ">(13 bits) Reserved for later use. It
            MUST be set to zero by the sender and ignored by the receiver.</t>

            <t hangText="Sequence Number: ">(16 bits) Sequence number for the
            PvD Additional Information, as described in <xref
            target="data"/>.</t>

            <t hangText="PvD ID FQDN : ">The FQDN used as PvD ID encoded in
            DNS format, as described in Section 3.1 of <xref
            target="RFC1035"/>. Domain names compression described in Section
            4.1.4 of <xref target="RFC1035"/> MUST NOT be used.</t>

            <t hangText="Padding     : ">Zero or more padding octets to the
            next 8 octets boundary. It MUST be set to zero by the sender, and
            ignored by the receiver.</t>

            <t hangText="RA message header : ">(16 octets) When the R-flag is
            set, a full Router Advertisement message header as specified in
            <xref target="RFC4861"/>. The 'Type', 'Code' and 'Checksum' fields
            (i.e. the first 32 bits), MUST be set to zero by the sender and
            ignored by the receiver. The other fields are to be set and parsed
            as specified in <xref target="RFC4861"/> or any updating
            documents.</t>

            <t hangText="Options : ">Zero or more RA options that would
            otherwise be valid as part of the Router Advertisement main body,
            but are instead included in the PvD Option such as to be ignored
            by hosts that are not 'PvD-aware'.</t>
          </list>Here is an example of a PvD option with example.org as the
        PvD ID FQDN and including a RDNSS and prefix information options (it
        also have the sequence number 123, presence of additional information
        to be fetched with a delay indicated as 5):</t>

        <figure anchor="pvd_example">
          <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: 21      |  Length: 12   |1|0|0|     Reserved    |Delay:5|
  +---------------+-------------------------------+---------------+
  |       Seq number: 123         |      7        |       e       |
  +---------------+-----------------------------------------------+
  |      x        |       a       |      m        |       p       |
  +---------------------------------------------------------------+
  |      l        |       e       |      3        |       o       |
  +---------------------------------------------------------------+
  |      r        |       g       |      0        |   0 (padding) |
  +---------------------------------------------------------------+
  |   0 (padding) |  0 (padding)  |   0 (padding) |   0 (padding) |
  +---------------+---------------+---------------+---------------+
  |  RDNSS option (RFC 6106) length: 5                          ...
  ...                                                           ...
  ...                                                             |
  +---------------------------------------------------------------+
  | Prefix Information Option (RFC 4861) length: 4              ...
  ...                                                             |
  ...                                                             |
  +---------------------------------------------------------------+

]]></artwork>

          <postamble/>
        </figure>
      </section>

      <section title="Router Behavior">
        <t>A router MAY send RAs containing one PvD option, but MUST NOT
        include more than one PvD option in each RA. In particular, the PvD
        option MUST NOT contain further PvD options.</t>

        <t>The PvD Option MAY contain zero, one, or more RA options which
        would otherwise be valid as part of the same RA. Such options are
        processed by PvD-aware hosts, while ignored by others.</t>

        <t>In order to provide multiple different PvDs, a router MUST send
        multiple RAs. Different explicit PvDs MAY be advertised with RAs using
        the same IPv6 source address; but different implicit PvDs, advertised
        by different RAs, MUST use different link-local addresses because
        these implicit PvDs are identified by the source addresses of the
        RAs.</t>

        <t>Whenever an RA, for a single PvD, would need to be sent via
        multiple packets, the PvD option header (i.e., all fields except the
        'Options' field) MUST be repeated in all the transmitted RAs. But the
        options within the 'Options' field, MAY be transmitted only once,
        included in one of the transmitted PvD options.</t>
      </section>

      <section title="Non-PvD-aware Host Behavior">
        <t>As the PvD Option has a new option code, non-PvD-aware hosts will
        simply ignore the PvD Option and all the options it contains. This
        ensure the backward compatibility required in section 3.3 of <xref
        target="RFC7556"/>. This behavior allows for a mixed-mode network with
        a mix of PvD-aware and non-PvD-aware hosts coexist.</t>
      </section>

      <section anchor="host" title="PvD-aware Host Behavior">
        <t>Hosts MUST associate received RAs and included configuration
        information (e.g., Router Valid Lifetime, Prefix Information <xref
        target="RFC4861"/>, Recursive DNS Server <xref target="RFC8106"/>,
        Routing Information <xref target="RFC4191"/> options) with the
        explicit PvD identified by the first PvD Option present in the
        received RA, if any, or with the implicit PvD identified by the host
        interface and the source address of the received RA otherwise.</t>

        <t>In case multiple PvD options are found in a given RA, hosts MUST
        ignore all but the first PvD option.</t>

        <t>Similarly, hosts MUST associate all network configuration objects
        (e.g., default routers, addresses, more specific routes, DNS Recursive
        Resolvers) with the PvD associated with the RA which last updated the
        object. For example, addresses that are generated using a received
        Prefix Information option (PIO) are associated with the PvD of the
        last received RA which included the given PIO.</t>

        <t>PvD IDs MUST be compared in a case-insensitive manner (i.e., A=a),
        assuming ASCII with zero parity while non-alphabetic codes must match
        exactly (see also Section 3.1 of <xref target="RFC1035"/>). For
        example, "pvd.example.com." or "PvD.Example.coM." would refer to the
        same PvD.</t>

        <t>While resolving names, executing the default address selection
        algorithm <xref target="RFC6724"/> or executing the default router
        selection algorithm when forwarding packets (<xref target="RFC2461"/>,
        <xref target="RFC4191"/> and <xref target="RFC8028"/>), hosts MAY
        consider only the configuration associated with an arbitrary set of
        PvDs.</t>

        <t>For example, a host MAY associate a given process with a specific
        PvD, or a specific set of PvDs, while associating another process with
        another PvD. A PvD-aware application might also be able to select, on
        a per-connection basis, which PvDs should be used. In particular,
        constrained devices such as small battery operated devices (e.g. IoT),
        or devices with limited CPU or memory resources may purposefully use a
        single PvD while ignoring some received RAs containing different PvD
        IDs.</t>

        <t>The way an application expresses its desire to use a given PvD, or
        a set of PvDs, or the way this selection is enforced, is out of the
        scope of this document. Useful insights about these considerations can
        be found in <xref target="I-D.kline-mif-mpvd-api-reqs"/>.</t>

        <section title="DHCPv6 configuration association">
          <t>When a host retrieves configuration elements using DHCPv6 (e.g.,
          addresses or DNS recursive resolvers), they MUST be associated with
          the explicit or implicit PvD of the RA received on the same
          interface, sent from the same LLA, and with the O-flag or M-flag set
          <xref target="RFC4861"/>. If no such PvD is found, or whenever
          multiple different PvDs are found, the host behavior is
          unspecified.</t>

          <t>This process requires hosts to keep track of received RAs,
          associated PvD IDs, and routers LLA; it also assumes that the router
          either acts as a DHCPv6 server or relay and uses the same LLA for
          DHCPv6 and RA traffic (which may not be the case when the router
          uses VRRP to send its RA).</t>
        </section>

        <section anchor="dhcpv4" title="DHCPv4 configuration association">
          <t>When a host retrieves configuration elements from DHCPv4, they
          MUST be associated with the explicit PvD received on the same
          interface, whose PVD Options L-flag is set and, in the case of a non
          point-to-point link, using the same datalink address. If no such PvD
          is found, or whenever multiple different PvDs are found, the
          configuration elements coming from DHCPv4 MUST be associated with
          the implicit PvD identified by the interface on which the DHCPv4
          transaction happened. The case of multiple explicit PvD for an IPv4
          interface is undefined.</t>

          <!--t>Note: some reviewers suggested to remove the link with the legacy
          IPv4.</t-->
        </section>

        <section title="Connection Sharing by the Host">
          <t>The situation when a node receives an RA on one interface (e.g.
          cellular) and shares this connectivity by also acting as a router by
          transmitting RA on another interface (e.g. WiFi) is known as
          'tethering'. It can be done as ND proxy. The exact behavior is out
          of scope of this document but it is expected that the one or several
          PvD associated to the shared interface (e.g. cellular) will also be
          advertised to the clients on the other interface (e.g. WiFi).</t>
        </section>
      </section>
    </section>

    <section anchor="data" title="Provisioning Domain Additional Information">
      <t>Additional information about the network characteristics can be
      retrieved based on the PvD ID. This set of information is called PvD
      Additional Information, and is encoded as a JSON object <xref
      target="RFC7159"/>.</t>

      <t>The purpose of this additional set of information is to securely
      provide additional information to applications about the connectivity
      that is provided using a given interface and source address pair. It
      typically includes data that would be considered too large, or not
      critical enough, to be provided within an RA option. The information
      contained in this object MAY be used by the operating system, network
      libraries, applications, or users, in order to decide which set of PvDs
      should be used for which connection, as described in <xref
      target="host"/>.</t>

      <section anchor="retr" title="Retrieving the PvD Additional Information">
        <t>When the H-flag of the PvD Option is set, hosts MAY attempt to
        retrieve the PvD Additional Information associated with a given PvD by
        performing an HTTP over TLS <xref target="RFC2818"/> GET query to
        https://&lt;PvD-ID&gt;/.well-known/pvd <xref target="RFC5785"/>.
        Inversely, hosts MUST NOT do so whenever the H-flag is not set.</t>

        <!--t>Note: Should the PvD AI retrieval be a MAY or a SHOULD ? Could the
        object contain critical data, or should it only contain informational
        data ?</t-->

        <t>Note that the DNS name resolution of the PvD ID, the PKI checks as
        well as the actual query MUST be performed using the considered PvD.
        In other words, the name resolution, PKI checks, source address
        selection, as well as the next-hop router selection MUST be performed
        while using exclusively the set of configuration information attached
        with the PvD, as defined in <xref target="host"/>. In some cases, it
        may therefore be necessary to wait for an address to be available for
        use (e.g., once the Duplicate Address Detection or DHCPv6 processes
        are complete) before initiating the HTTP over TLS query. If the host
        has a temporary address per <xref target="RFC4941"/> in this PvD, then
        hosts SHOULD use a temporary address to fetch the PvD Additional
        Information and SHOULD deprecate the used temporary address and
        generate a new temporary address afterward.</t>

        <t>If the HTTP status of the answer is greater than or equal to 400
        the host MUST abandon and consider that there is no additional PvD
        information. If the HTTP status of the answer is between 300 and 399,
        inclusive, it MUST follow the redirection(s). If the HTTP status of
        the answer is between 200 and 299, inclusive, the host MAY get a file
        containing a single JSON object. When a JSON object could not be
        retrieved, an error message SHOULD be logged and/or displayed in a
        rate-limited fashion.</t>

        <!-- Considere performing retries with exponential backoffs -->

        <t>After retrieval of the PvD Additional Information, hosts MUST keep
        track of the Sequence Number value received in subsequent RAs
        including the same PvD ID. In case the new value is greater than the
        value that was observed when the PvD Additional Information object was
        retrieved (using serial number arithmetic comparisons <xref
        target="RFC1982"/>), or whenever the validity time included in the PVD
        Additional Information JSON object is expired, hosts MUST either
        perform a new query and retrieve a new version of the object, or,
        failing that, deprecate the object and stop using the additional
        information provided in the JSON object.</t>

        <t>Hosts retrieving a new PvD Additional Information object MUST check
        for the presence and validity of the mandatory fields specified in
        <xref target="aiformat"/>. A retrieved object including an expiration
        time that is already past or missing a mandatory element MUST be
        ignored.</t>

        <t>In order to avoid synchronized queries toward the server hosting
        the PvD Additional Information when an object expires, object updates
        are delayed by a randomized backoff time. <list>
            <t>When a host performs an object update after it detected a
            change in the PvD Option Sequence number, it MUST delay the query
            by a random time between zero and 2**(Delay * 2) milliseconds,
            where 'Delay' corresponds to the 4 bits long unsigned integer in
            the last received PvD Option.</t>

            <t>When a host last retrieved an object at time A including a
            validity time B, and is configured to keep the object up to date,
            it MUST perform the update at a uniformly random time in the
            interval [(B-A)/2,B].</t>
          </list></t>

        <t>In the example <xref target="pvd_example"/>, the delay field value
        is 5, this means that host MUST delay the query by a random number
        between 0 and 2**(5 * 2) milliseconds, i.e., between 0 and 1024
        milliseconds.</t>

        <t>Since the 'Delay' value is directly within the PvD Option rather
        than the object itself, an operator may perform a push-based update by
        incrementing the Sequence value while changing the Delay value
        depending on the criticality of the update and its PvD Additional
        Information servers capacity.</t>

        <t>The PvD Additional Information object includes a set of IPv6
        prefixes (under the key "prefixes") which MUST be checked against all
        the Prefix Information Options advertised in the RA. If any of the
        prefixes included in the PIO is not covered by at least one of the
        listed prefixes, the PvD associated with the tested prefix MUST be
        considered unsafe and MUST NOT be used. While this does not prevent a
        malicious network provider, it does complicate some attack scenarios,
        and may help detecting misconfiguration.</t>
      </section>

      <section title="Operational Consideration to Providing the PvD Additional Information">
        <t>Whenever the H-flag is set in the PvD Option, a valid PvD
        Additional Information object MUST be made available to all hosts
        receiving the RA by the network operator. In particular, when a
        captive portal is present, hosts MUST still be allowed to perform DNS,
        PKI and HTTP over TLS operations related to the retrieval of the
        object, even before logging into the captive portal.</t>

        <t>Routers MAY increment the PVD Option Sequence number in order to
        inform host that a new PvD Additional Information object is available
        and should be retrieved.</t>

        <t>The server providing the JSON files SHOULD also check whether the
        client address is part of the prefixes listed into the additional
        information and SHOULD return a 403 response code if there is no
        match.</t>
      </section>

      <section anchor="aiformat" title="PvD Additional Information Format">
        <t>The PvD Additional Information is a JSON object.</t>

        <t>The following table presents the mandatory keys which MUST be
        included in the object:</t>

        <texttable>
          <ttcol>JSON key</ttcol>

          <ttcol>Description</ttcol>

          <ttcol>Type</ttcol>

          <ttcol width="20%">Example</ttcol>

          <c>name</c>

          <c>Human-readable service name</c>

          <c>UTF-8 string <xref target="RFC3629"/></c>

          <c>"Awesome Wifi"</c>

          <c>expires</c>

          <c>Date after which this object is not valid</c>

          <c><xref target="RFC3339"/></c>

          <c>"2017-07-23T06:00:00Z"</c>

          <c>prefixes</c>

          <c>Array of IPv6 prefixes valid for this PVD</c>

          <c>Array of strings</c>

          <c>["2001:db8:1::/48", "2001:db8:4::/48"]</c>
        </texttable>

        <t>A retrieved object which does not include a valid string associated
        with the "name" key at the root of the object, or a valid date
        associated with the "expires" key, also at the root of the object,
        MUST be ignored. In such cases, an error message SHOULD be logged
        and/or displayed in a rate-limited fashion. If the PIO of the received
        RA is not covered by at least one of the "prefixes" key, the retrieved
        object SHOULD be ignored.</t>

        <t>The following table presents some optional keys which MAY be
        included in the object.</t>

        <texttable>
          <ttcol>JSON key</ttcol>

          <ttcol>Description</ttcol>

          <ttcol>Type</ttcol>

          <ttcol width="20%">Example</ttcol>

          <c>localizedName</c>

          <c>Localized user-visible service name, language can be selected
          based on the HTTP Accept-Language header in the request.</c>

          <c>UTF-8 string</c>

          <c>"Wifi G&eacute;nial"</c>

          <c>dnsZones</c>

          <c>DNS zones searchable and accessible</c>

          <c>array of DNS zones</c>

          <c>["example.com","sub.example.org"]</c>

          <c>noInternet</c>

          <c>No Internet, set when the PvD only provides restricted access to
          a set of services</c>

          <c>boolean</c>

          <c>true</c>
        </texttable>

        <t>It is worth noting that the JSON format allows for extensions.
        Whenever an unknown key is encountered, it MUST be ignored along with
        its associated elements.</t>

        <section anchor="keys-private" title="Private Extensions">
          <t>JSON keys starting with "x-" are reserved for private use and can
          be utilized to provide information that is specific to vendor, user
          or enterprise. It is RECOMMENDED to use one of the patterns
          "x-FQDN-KEY" or "x-PEN-KEY" where FQDN is a fully qualified domain
          name or PEN is a <xref target="PEN">private enterprise number</xref>
          under control of the author of the extension to avoid
          collisions.</t>
        </section>

        <section anchor="ex" title="Example">
          <t>Here are two examples based on the keys defined in this
          section.</t>

          <figure>
            <artwork><![CDATA[
{
  "name": "Foo Wireless",
  "localizedName": "Foo-France Wifi",
  "expires": "2017-07-23T06:00:00Z",
  "prefixes" : ["2001:db8:1::/48", "2001:db8:4::/48"],
}
]]></artwork>
          </figure>

          <figure>
            <artwork><![CDATA[
{
  "name": "Bar 4G",
  "localizedName": "Bar US 4G",
  "expires": "2017-07-23T06:00:00Z",
  "prefixes": ["2001:db8:1::/48", "2001:db8:4::/48"],
}
]]></artwork>
          </figure>
        </section>
      </section>

      <section anchor="misconfig"
               title="Detecting misconfiguration and misuse">
        <t>When a host retrieves the PvD Additional Information, it MUST
        verify that the TLS server certificate is valid for the performed
        request (e.g., that the Subject Name is equal to the PvD ID expressed
        as an FQDN). This authentication creates a secure binding between the
        information provided by the trusted Router Advertisement, and the
        HTTPS server. But this does not mean the Advertising Router and the
        PvD server belong to the same entity.</t>

        <t>Hosts MUST verify that all prefixes in the RA PIO are covered by a
        prefix from the PvD Additional Information. An adversarial router
        willing to fake the use of a given explicit PvD, without any access to
        the actual PvD Additional Information, would need to perform NAT66 in
        order to circumvent this check.</t>

        <t>It is also RECOMMENDED that the HTTPS server checks the source
        addresses of incoming connections (see <xref target="retr"/>). This
        check give reasonable assurance that neither NPTv6 <xref
        target="RFC6296"/> nor NAT66 were used and restricts the information
        to the valid network users.</t>
      </section>
    </section>

    <section title="Operational Considerations">
      <t>This section describes some use cases of PvD. For the sake of
      simplicity, the RA messages will not be described in the usual ASCII art
      but rather in an indented list. For example, a RA message containing
      some options and a PvD option that also contains other options will be
      described as:<list style="symbols">
          <t>RA Header: router lifetime = 6000</t>

          <t>Prefix Information Option: length = 4, prefix =
          2001:db8:cafe::/64</t>

          <t>PvD Option header: length = 3+ 5 +4 , PvD ID FQDN = example.org.,
          R-flag = 0 (actual length of the header with padding 24 bytes = 3 *
          8 bytes)<list style="symbols">
              <t>Recursive DNS Server: length = 5, addresses=
              [2001:db8:cafe::53, 2001:db8:f00d::53]</t>

              <t>Prefix Information Option: length = 4, prefix =
              2001:db8:f00d::/64</t>
            </list></t>
        </list></t>

      <t>It is expected that for some years, networks will have a mixed
      environment of PvD-aware hosts and non-PvD-aware hosts. If there is a
      need to give specific information to PvD-aware hosts only, then it is
      recommended to send TWO RA messages: one for each class of hosts. For
      example, here is the RA for non-PvD-aware hosts:<list style="symbols">
          <t>RA Header: router lifetime = 6000 (non-PvD-aware hosts will use
          this router as a default router)</t>

          <t>Prefix Information Option: length = 4, prefix =
          2001:db8:cafe::/64</t>

          <t>Recursive DNS Server Option: length = 3, addresses=
          [2001:db8:cafe::53]</t>

          <t>PvD Option header: length = 3+ 2, PvD ID FQDN = foo.example.org.,
          R-flag = 1 (actual length of the header 24 bytes = 3 * 8 bytes)<list
              style="symbols">
              <t>RA Header: router lifetime = 0 (PvD-aware hosts will not use
              this router as a default router), implicit length = 2</t>
            </list></t>
        </list></t>

      <t>And here is a RA example for PvD-aware hosts:<list style="symbols">
          <t>RA Header: router lifetime = 0 (non-PvD-aware hosts will not use
          this router as a default router)</t>

          <t>PvD Option header: length = 3+ 2 + 4 + 3, PvD ID FQDN =
          example.org., R-flag = 1 (actual length of the header 24 bytes = 3 *
          8 bytes)<list style="symbols">
              <t>RA Header: router lifetime = 1600 (PvD-aware hosts will use
              this router as a default router), implicit length = 2</t>

              <t>Prefix Information Option: length = 4, prefix =
              2001:db8:f00d::/64</t>

              <t>Recursive DNS Server Option: length = 3, addresses=
              [2001:db8:f00d::53]</t>
            </list></t>
        </list></t>

      <t>In the above example, non-PvD-aware hosts will only use the first RA
      sent from their default router and using the 2001:db8:cafe::/64 prefix.
      PvD-aware hosts will autonomously configure addresses from both PIOs,
      but will only use the source address in 2001:db8:f00d::/64 to
      communicate past the first hop router since only the router sending the
      second RA will be used as default router; similarly, they will use the
      DNS server 2001:db8:f00d::53 when communicating with this adress.</t>
    </section>

    <section title="Security Considerations">
      <t>Although some solutions such as IPsec or SeND <xref
      target="RFC3971"/> can be used in order to secure the IPv6 Neighbor
      Discovery Protocol, in practice actual deployments largely rely on link
      layer or physical layer security mechanisms (e.g. 802.1x <xref
      target="IEEE8021X"/>) in conjunction with RA Guard <xref
      target="RFC6105"/>.</t>

      <t>This specification does not improve the Neighbor Discovery Protocol
      security model, but extends the purely link-local trust relationship
      between the host and the default routers with HTTP over TLS
      communications which servers are authenticated as rightful owners of the
      FQDN received within the trusted PvD ID RA option.</t>

      <t>It must be noted that <xref target="misconfig"/> of this document
      only provides reasonable assurance against misconfiguration but does not
      prevent an hostile network access provider to advertize wrong
      information that could lead applications or hosts to select an hostile
      PvD. Users should always apply caution when connecting to an unknown
      network.</t>
    </section>

    <section title="Privacy Considerations">
      <t>Retrieval of the PvD Additional Information over HTTPS requires early
      communications between the connecting host and a server which may be
      located further than the first hop router. Although this server is
      likely to be located within the same administrative domain as the
      default router, this property can't be ensured. Therefore, hosts willing
      to retrieve the PvD Additional Information before using it without
      leaking identity information, SHOULD make use of an IPv6 Privacy Address
      and SHOULD NOT include any privacy sensitive data, such as User Agent
      header or HTTP cookie, while performing the HTTP over TLS query.</t>

      <t>From a privacy perspective, retrieving the PvD Additional Information
      is not different from establishing a first connection to a remote
      server, or even performing a single DNS lookup. For example, most
      operating systems already perform early queries to well known web sites,
      such as http://captive.example.com/hotspot-detect.html, in order to
      detect the presence of a captive portal.</t>

      <t>There may be some cases where hosts, for privacy reasons, should
      refrain from accessing servers that are located outside a certain
      network boundary. In practice, this could be implemented as a whitelist
      of 'trusted' FQDNs and/or IP prefixes that the host is allowed to
      communicate with. In such scenarios, the host SHOULD check that the
      provided PvD ID, as well as the IP address that it resolves into, are
      part of the allowed whitelist.</t>
    </section>

    <section title="IANA Considerations">
      <t>Upon publication of this document, IANA is asked to remove the
      'reclaimable' tag off the value 21 for the PvD option (from the IPv6
      Neighbor Discovery Option Formats registry).</t>

      <t>IANA is asked to assign the value "pvd" from the Well-Known URIs
      registry.</t>

      <t>IANA is asked to create and maintain a new registry entitled
      "Additional Information PvD Keys" containing ASCII strings. The initial
      content of this registry are given in <xref target="aiformat"/>; future
      assignments are to be made through Expert Review [BCP36].</t>

      <t>Finally, IANA is asked to create and maintain a new registry entitled
      "PvD option Flags" reserving bit positions from 0 to 15 to be used in
      the PvD option bitmask. Bit position 0, 1 and 2 are reserved by this
      document (as specified in <xref target="format"/>). Future assignments
      require a Standard Track RFC document.</t>
    </section>

    <section title="Acknowledgements">
      <t>Many thanks to M. Stenberg and S. Barth for their earlier work: <xref
      target="I-D.stenberg-mif-mpvd-dns"/>, as well as to Basile Bruneau who
      was author of an early version of this document.</t>

      <t>Thanks also to Marcus Keane, Mikael Abrahamson, Ray Bellis, Zhen Cao,
      Tim Chow, Lorenzo Colitti, Ian Farrer, Bob Hinden, Tatuya Jinmei, Erik
      Kline, Ted Lemon, Jen Lenkova, Veronika McKillop, Mark Townsley and
      James Woodyatt for useful and interesting discussions.</t>

      <t>Finally, special thanks to Thierry Danis and Wenqin Shao for their
      valuable inputs and implementation efforts (<xref target="github"/>),
      Tom Jones for his integration effort into the NEAT project and Rigil
      Salim for his implementation work.</t>
    </section>
  </middle>

  <back>
    <references title="Normative references">
      <?rfc include="reference.RFC.1035.xml"?>

      <?rfc include="reference.RFC.1982.xml"?>

      <?rfc include="reference.RFC.2119.xml"?>

      <?rfc include="reference.RFC.2461.xml"?>

      <?rfc include="reference.RFC.2818.xml"?>

      <?rfc include="reference.RFC.3629.xml"?>

      <?rfc include="reference.RFC.4861.xml"?>

      <?rfc include="reference.RFC.7159.xml"?>

      <?rfc include="reference.RFC.8126.xml"?>
    </references>

    <references title="Informative references">
      <?rfc include="reference.RFC.3339.xml"?>

      <?rfc include="reference.RFC.3971.xml"?>

      <?rfc include="reference.RFC.4191.xml"?>

      <?rfc include="reference.RFC.4941.xml"?>

      <?rfc include="reference.RFC.5785.xml"?>

      <?rfc include="reference.RFC.6105.xml"?>

      <?rfc include="reference.RFC.6296.xml"?>

      <?rfc include="reference.RFC.6724.xml"?>

      <?rfc include="reference.RFC.6731.xml"?>

      <?rfc include="reference.RFC.7556.xml"?>

      <?rfc include="reference.RFC.8028.xml"?>

      <?rfc include="reference.RFC.8106.xml"?>

      <?rfc include="reference.I-D.stenberg-mif-mpvd-dns"?>

      <?rfc include="reference.I-D.kline-mif-mpvd-api-reqs"?>

      <reference anchor="PEN"
                 target="https://www.iana.org/assignments/enterprise-numbers">
        <front>
          <title>Private Enterprise Numbers</title>

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

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

      <reference anchor="IEEE8021X">
        <front>
          <title>IEEE Standards for Local and Metropolitan Area Networks: Port
          based Network Access Control, IEEE Std</title>

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

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

      <reference anchor="github" target="https://github.com/IPv6-mPvD">
        <front>
          <title>IPv6-mPvD github repository</title>

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

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

    <section title="Changelog">
      <t>Note to RFC Editors: Remove this section before publication.</t>

      <section title="Version 00">
        <t>Initial version of the draft. Edited by Basile Bruneau + Eric
        Vyncke and based on Basile's work.</t>
      </section>

      <section title="Version 01">
        <t>Major rewrite intended to focus on the the retained solution based
        on corridors, online, and WG discussions. Edited by Pierre Pfister.
        The following list only includes major changes. <list>
            <t>PvD ID is an FQDN retrieved using a single RA option. This
            option contains a sequence number for push-based updates, a new
            H-flag, and a L-flag in order to link the PvD with the IPv4 DHCP
            server.</t>

            <t>A lifetime is included in the PvD ID option.</t>

            <t>Detailed Hosts and Routers specifications.</t>

            <t>Additional Information is retrieved using HTTP-over-TLS when
            the PvD ID Option H-flag is set. Retrieving the object is
            optional.</t>

            <t>The PvD Additional Information object includes a validity
            date.</t>

            <t>DNS-based approach is removed as well as the DNS-based encoding
            of the PvD Additional Information.</t>

            <t>Major cut in the list of proposed JSON keys. This document may
            be extended later if need be.</t>

            <t>Monetary discussion is moved to the appendix.</t>

            <t>Clarification about the 'prefixes' contained in the additional
            information.</t>

            <t>Clarification about the processing of DHCPv6.</t>
          </list></t>
      </section>

      <section title="Version 02">
        <t><list>
            <t>The FQDN is now encoded with ASCII format (instead of DNS
            binary) in the RA option.</t>

            <t>The PvD ID option lifetime is removed from the object.</t>

            <t>Use well known URI "https://&lt;PvD-ID&gt;/.well-known/pvd"</t>

            <t>Reference RFC3339 for JSON timestamp format.</t>

            <t>The PvD ID Sequence field has been extended to 16 bits.</t>

            <t>Modified host behavior for DHCPv4 and DHCPv6.</t>

            <t>Removed IKEv2 section.</t>

            <t>Removed mention of RFC7710 Captive Portal option. A new I.D.
            will be proposed to address the captive portal use case.</t>
          </list></t>
      </section>

      <section title="WG Document version 00">
        <t><list>
            <t>Document has been accepted as INTAREA working group
            document</t>

            <t>IANA considerations follow <xref
            target="RFC8126">RFC8126</xref></t>

            <t>PvD ID FQDN is encoded as per <xref target="RFC1035">RFC
            1035</xref></t>

            <t>PvD ID FQDN is prepended by a one-byte length field</t>

            <t>Marcus Keane added as co-author</t>

            <t>dnsZones key is added back</t>

            <t>draft of a privacy consideration section and added that a
            temporary address should be used to retrieve the PvD additional
            information</t>

            <t>per Bob Hinden's request: the document is now aiming at
            standard track and security considerations have been moved to the
            main section</t>
          </list></t>
      </section>

      <section title="WG Document version 01">
        <t><list>
            <t>Removing references to 'metered' and 'characteristics' keys.
            Those may be in scope of the PvD work, but this document will
            focus on essential parts only.</t>

            <t>Removing appendix section regarding link quality and billing
            information.</t>

            <t>The PvD RA Option may now contain other RA options such that
            PvD-aware hosts may receive configuration information otherwise
            invisible to non-PvD-aware hosts.</t>

            <t>Clarify that the additional PvD Additional Information is not
            intended to modify host's networking stack behavior, but rather
            provide information to the Application, used to select which PvDs
            must be used and provide configuration parameters to the transport
            layer.</t>

            <t>The RA option padding is used to increase the option size to
            the next 64 (was 32) bits boundary.</t>

            <t>Better detail the Security model and Privacy
            considerations.</t>
          </list></t>
      </section>

      <section title="WG Document version 02">
        <t><list>
            <t>Use the IANA value of 21 in the text and update the IANA
            considerations section accordingly</t>

            <t>add the Delay field to avoid the thundering herd effect</t>

            <t>add Wenqin Shao as author</t>

            <t>keep the 1 PvD per RA model</t>

            <t>changed the intro (per Zhen Cao) "when choosing which PvD and
            transport should be used" =&gt; "when choosing which PvD should be
            used"</t>

            <t>rename A-flag in R-flag to avoid A-flag of PIO</t>

            <t>use the wording "PvD Option", removing the ID token as it is
            now a container with more then just an ID, removing 'RA' in the
            option name to be consistent with other IANA NDP option</t>

            <t>use "non-PvD-aware" rather than "PvD-ignorant"</t>

            <t>added more reference to RFC 7556 (notably for PvD being
            globally unique, introducing PvD-aware host vs. PvD-aware
            node)</t>

            <t>Section 3.4.3 renamed from "interconnection shared by node" to
            'connection shared by node"</t>

            <t>Section 3.4 renamed into "PvD-aware Host Behavior"</t>

            <t>Added a section "Non-PvD-aware Host Behavior"</t>
          </list></t>
      </section>
    </section>
  </back>
</rfc>
