<?xml version="1.0" encoding="UTF-8"?>

<!-- updated by Chris 01/05/21 -->

<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" docName="draft-ietf-dhc-dhcpv6-pd-relay-requirements-05" 
number="8987" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" category="std" 
consensus="true" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" 
version="3">

  <!-- xml2rfc v2v3 conversion 3.5.0 -->
  <front>
    <title abbrev="DHCPv6 PD Relay">DHCPv6 Prefix Delegating Relay Requirements</title>
    <seriesInfo name="RFC" value="8987"/>
    <author fullname="Ian Farrer" initials="I." surname="Farrer">
      <organization>Deutsche Telekom AG</organization>
      <address>
        <postal>
          <street>Landgrabenweg 151</street>
          <city>Bonn</city>
          <code>53227</code>
          <country>Germany</country>
        </postal>
        <email>ian.farrer@telekom.de</email>
      </address>
    </author>
    <author fullname="Naveen Kottapalli" initials="N." surname="Kottapalli">
      <organization>Benu Networks</organization>
      <address>
        <postal>
          <street>WeWork Galaxy, 43 Residency Road</street>
          <city>Bangalore</city>
          <code>560025</code>
          <region>Karnataka</region>
          <country>India</country>
        </postal>
        <email>nkottapalli@benunets.com</email>
      </address>
    </author>
    <author fullname="Martin Hunek" initials="M." surname="Hunek">
      <organization>Technical University of Liberec</organization>
      <address>
        <postal>
          <street>Studentska 1402/2</street>
          <city>Liberec</city>
          <code>46017</code>
          <country>Czech Republic</country>
        </postal>
        <email>martin.hunek@tul.cz</email>
      </address>
    </author>
    <author fullname="Richard Patterson" initials="R." surname="Patterson">
      <organization>Sky UK Ltd.</organization>
      <address>
        <postal>
          <street>1 Brick Lane</street>
          <city>London</city>
          <code>E1 6PU</code>
          <country>United Kingdom</country>
        </postal>
        <email>richard.patterson@sky.uk</email>
      </address>
    </author>
    <date month="February" year="2021"/>
    <area>Internet</area>
    <workgroup>DHC Work Group</workgroup>
    <keyword>Prefix Delegation</keyword>
    <keyword>DHCPv6 relay</keyword>
    <keyword>Delegating router</keyword>
    <keyword>Requesting router</keyword>
    <keyword>Delegating relay</keyword>
    <abstract>
      <t>This document describes operational problems that are known to 
    occur when using DHCPv6 relays with prefix delegation. These 
    problems can prevent successful delegation and result in routing 
    failures. To address these problems, this document provides 
    necessary functional requirements for operating DHCPv6 relays with 
    prefix delegation.</t>
      <t>It is recommended that any network operator using DHCPv6 
    prefix delegation with relays ensure that these requirements 
    are followed on their networks.</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>For Internet service providers that offer native IPv6 access 
    with prefix delegation to their customers, a common deployment 
    architecture is to have a DHCPv6 relay agent function located in
    the ISP's Layer 3 customer edge device and a separate, centralized
    DHCPv6 server infrastructure.  <xref target="RFC8415" format="default"/> describes
    the functionality of a DHCPv6 relay, and <xref target="RFC8415" sectionFormat="of" section="19.1.3"/> mentions
    this deployment scenario, but it does not provide details for all of
    the functional requirements that the relay needs to fulfill to
    operate deterministically in this deployment scenario.</t>
      <t>A DHCPv6 relay agent for prefix delegation is a function commonly
    implemented in routing devices, but implementations vary in 
    their functionality and client/server interworking. This can
    result in operational problems such as messages not being forwarded 
    by the relay or unreachability of the delegated prefixes. This 
    document provides a set of requirements for devices implementing a 
    relay function for use with prefix delegation.
      </t>
      <t>The mechanisms for a relay to inject routes (including aggregated 
    ones) on its network-facing interface based on prefixes learned 
    from a server via DHCP prefix delegation (DHCP-PD) are out of scope of the document.</t>
      <t>Multi-hop DHCPv6 relaying is not affected. The requirements 
    in this document are solely applicable to the DHCP relay agent 
    co-located with the first-hop router to which the DHCPv6 client 
    requesting the prefix is connected, so no changes to any
    subsequent relays in the path are needed.</t>
    </section>
    <section numbered="true" toc="default">
      <name>Terminology</name>
      <section numbered="true" toc="default">
        <name>General</name>
        <t>This document uses the terminology defined in <xref target="RFC8415" format="default"/>. However, when defining the functional 
        elements for prefix delegation, <xref target="RFC8415" sectionFormat="comma" section="4.2"/> defines the term "delegating router" as:
        </t>
<blockquote>The router that acts as a DHCP server and responds to requests for delegated prefixes.</blockquote>
        <t>

        This document is concerned with deployment scenarios in which 
        the DHCPv6 relay and DHCPv6 server functions are separated, so 
        the term "delegating router" is not used. Instead, a new term 
        is introduced to describe the relaying function:

        </t>
        <dl newline="true" spacing="normal">
          <dt>Delegating relay:</dt>
          <dd>A delegating relay acts as an
            intermediate device, forwarding DHCPv6 messages containing
            IA_PD and IAPREFIX options between the client and server. The
            delegating relay does not implement a DHCPv6 server 
            function. The delegating relay is also responsible for 
            routing traffic for the delegated prefixes.
          </dd>
        </dl>
        <t>Where the term "relay" is used on its own within this document, 
        it should be understood to be a delegating relay unless 
        specifically stated otherwise.
        </t>
        <t>In CableLabs DOCSIS environments, the Cable Modem Termination 
        System (CMTS) would be considered a delegating relay with 
        respect to Customer Premises Devices (CPEs) (<xref target="DOCSIS_3.1"/>, Section 5.2.7.2).  A Broadband 
        Network Gateway (BNG) in a DSL-based access network may be a 
        delegating relay if it does not implement a local DHCPv6 server 
        function (<xref target="TR-092"/>, Section 4.10).
        </t>
        <t><xref target="RFC8415" format="default"/> defines the "DHCP server" (or 
        "server") as:
        </t>
<blockquote>A node that responds to requests from clients.  It may or
            may not be on the same link as the client(s).  Depending on 
            its capabilities, if it supports prefix delegation it may 
            also feature the functionality of a delegating router.
</blockquote>
        <t>
        This document serves the deployment cases where a DHCPv6 server 
        is not located on the same link as the client (necessitating the 
        delegating relay). The server supports prefix delegation and is 
        capable of leasing prefixes to clients, but it is not responsible 
        for other functions required of a delegating router, such as 
        managing routes for the delegated prefixes.
        </t>
        <t>The term "requesting router" has previously been used to 
        describe the DHCP client requesting prefixes for use. This 
        document adopts the terminology of <xref target="RFC8415" format="default"/> and 
        uses "DHCP client" or "client" interchangeably for this element.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Topology</name>
        <t>The following diagram shows the deployment topology relevant 
        to this document.
        </t>
        <figure anchor="topology_overview">
          <name>Topology Overview</name>
          <artwork align="center" name="" type="" alt=""><![CDATA[
+
|             ------- uplink ------>
|                                       _    ,--,_
|   +--------+       +------------+   _(  `'      )_    +--------+
+---+   PD   |-------| Delegating |--(   Operator   )---| DHCPv6 |
|   | Client |       |    relay   |   `(_ Network_)'    | server |
|   +--------+       +----------- +      `--'`---'      +--------+
|
|             <----- downlink ------
+                 (client facing)
Client
Network
        ]]></artwork>
        </figure>
        <t>The client requests prefixes via the downlink interface of the 
        delegating relay.  The resulting prefixes will be used for 
        addressing the client network.  The delegating relay is 
        responsible for forwarding DHCP messages, including prefix 
        delegation requests and responses between the client and server.  
        Messages are forwarded from the delegating relay to the server 
        using multicast or unicast via the operator uplink interface.
        </t>
        <t>The delegating relay provides the operator's Layer 3 edge 
        towards the client and is responsible for routing traffic to 
        and from clients connected to the client network using addresses 
        from the delegated prefixes.
        </t>
      </section>
      <section numbered="true" toc="default">
	<name>Requirements Language</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
      </section>
    </section>
    <section anchor="relay_problems" numbered="true" toc="default">
      <name>Problems Observed with Existing Delegating Relay Implementations</name>
      <t>The following sections of the document describe problems that 
      have been observed with delegating relay implementations in 
      commercially available devices.
      </t>
      <section numbered="true" toc="default">
        <name>DHCP Messages Not Being Forwarded by the Delegating Relay</name>

        <t>Delegating relay implementations have been observed not to 
        forward messages between the client and server. This generally 
        occurs if a client sends a message that is unexpected by the 
        delegating relay.  For example, the delegating relay already 
        has an active PD lease entry for an existing client on a port. 
        A new client is connected to this port and sends a Solicit 
        message. The delegating relay then drops the Solicit messages 
        until either it receives a DHCP Release message from the 
        original client or the existing lease times out. This causes
        a particular problem when a client device needs to be replaced 
        due to a failure.
        </t>
        <t>In addition to dropping messages, in some cases, the delegating
        relay will generate error messages and send them to the client, 
        e.g., "NoBinding" messages being sent in the event that the 
        delegating relay does not have an active delegated prefix lease.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Delegating Relay Loss of State on Reboot</name>
        <t>For proper routing of client traffic, the delegating relay 
        requires a corresponding routing table entry for each active 
        prefix delegated to a connected client.  A delegating relay 
        that does not store this state persistently across reboots 
        will not be able to forward traffic to the client's delegated 
        leases until the state is reestablished through new DHCP 
        messages.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Multiple Delegated Prefixes for a Single Client</name>
        <t>DHCPv6 <xref target="RFC8415" format="default"/> allows a client to include more 
       than one instance of OPTION_IA_PD in messages in order to request 
       multiple prefix delegations by the server.  If configured for 
       this, the server supplies one (or more) instance of 
       OPTION_IAPREFIX for each received instance of OPTION_IA_PD, each 
       containing information for a different delegated prefix.
        </t>
        <t>In some delegating relay implementations, only a single 
       delegated prefix per DHCP Unique Identifier (DUID) is supported. In those cases, only one 
       IPv6 route for one of the delegated prefixes is installed, 
       meaning that other prefixes delegated to a client are 
       unreachable.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Dropping Messages from Devices with Duplicate MAC Addresses and DUIDs</name>
        <t>It is an operational reality that client devices with 
        duplicate Media Access Control (MAC) addresses and/or DUIDs exist and have been 
        deployed. In some networks, the operational costs of locating 
        and swapping out such devices are prohibitive.
        </t>
        <t>Delegating relays have been observed to restrict forwarding 
        client messages originating from one client DUID to a single 
        interface. In this case, if the same client DUID appears from a 
        second client on another interface while there is already an 
        active lease, messages originating from the second client are 
        dropped, causing the second client to be unable to obtain a 
        prefix delegation.
        </t>
        <t>It should be noted that in some access networks, the MAC 
        address and/or DUID are used as part of device identification 
        and authentication. In such networks, 
enforcing uniqueness of the MAC address and/or DUID is a necessary function and is not considered a problem.
        </t>
      </section>
      <section numbered="true" toc="default">

        <name>Forwarding Loops between Client and Relay</name>
        <t>If the client loses information about an active prefix 
        lease it has been delegated while the lease entry and 
        associated route are still active in the delegating relay, 
        then the relay will forward traffic to the client. The 
        client will return this traffic to the relay, which is the client's default 
        gateway (learned via a Router Advertisement (RA)). The loop will continue until 
        either the client is successfully reprovisioned via DHCP or 
        the lease ages out in the relay.
        </t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Requirements for Delegating Relays</name>
      <t>To resolve the problems described in 
     <xref target="relay_problems" format="default"/> and to preempt other undesirable 
     behavior, the following <xref target="genreq" format="none">section</xref> of the document describes a set 
     of functional requirements for the delegating relay.
      </t>
      <t>In addition, relay implementers are reminded that 
      <xref target="RFC8415" format="default"/> makes it clear that relays <bcp14>MUST</bcp14> forward
      packets that either contain message codes it may not understand (<xref target="RFC8415" sectionFormat="of" section="19"/>) or options that it does not understand (<xref target="RFC8415" sectionFormat="of" section="16"/>).</t>
      <section numbered="true" toc="default" anchor="genreq">
        <name>General Requirements</name>
	<ol type="G-%d:">
	  <li>The delegating relay <bcp14>MUST</bcp14> forward messages
            bidirectionally between the client and server without 
            changing the contents of the message.</li>

          <li>The relay <bcp14>MUST</bcp14> allow for multiple prefixes 
            to be delegated for the same client IA_PD. These delegations 
            may have different lifetimes.
          </li>
          <li>The relay <bcp14>MUST</bcp14> allow for multiple prefixes 
            (with or without separate IA_PDs) to be delegated to a 
            single client connected to a single interface, identified 
            by its DHCPv6 Client Identifier (DUID).
          </li>
          <li>A delegating relay may have one or more 
            interfaces on which it acts as a relay, as well as one or 
            more interfaces on which it does not
            (for example, in an ISP, it might act as a relay on all 
            southbound interfaces but not on the northbound 
            interfaces).  The relay <bcp14>SHOULD</bcp14> allow the same client 
            identifier (DUID) to have active delegated prefix leases on 
            more than one interface simultaneously unless client DUID 
            uniqueness is necessary for the functioning or security of 
            the network.  This is to allow client devices with duplicate 
            DUIDs to function on separate broadcast domains.
          </li>

          <li>The maximum number of simultaneous prefixes
            delegated to a single client <bcp14>MUST</bcp14> be configurable.
          </li>

          <li>The relay <bcp14>MUST</bcp14> implement a mechanism to 
            limit the maximum number of active prefix delegations on a 
            single port for all client identifiers and IA_PDs. This 
            value <bcp14>MUST</bcp14> be configurable.
          </li>

          <li>It is <bcp14>RECOMMENDED</bcp14> that delegating relays 
            support at least 8 active delegated leases per client device 
            and use this as the default limit.
          </li>
          <li>The delegating relay <bcp14>MUST</bcp14> update the lease 
            lifetimes based on the client's reply messages it forwards to 
            the client and only expire the delegated prefixes when the 
            valid lifetime has elapsed.
          </li>
          <li>On receipt of a Release message from the 
            client, the delegating relay <bcp14>MUST</bcp14> expire the active leases 
            for each of the IA_PDs in the message.
          </li>
	</ol>
      </section>
      <section numbered="true" toc="default">
        <name>Routing Requirements</name>
	<ol type="R-%d:">
          <li>The relay <bcp14>MUST</bcp14> maintain a local routing 
            table that is dynamically updated with leases and the 
            associated next hops as they are delegated to clients. When 
            a delegated prefix is released or expires, the associated 
            route <bcp14>MUST</bcp14> be removed from the relay's routing table.
          </li>

          <li>The delegating relay's routing entry <bcp14>MUST</bcp14>
            use the same prefix length for the delegated prefix as
            given in the IA_PD.
          </li>

          <li>The relay <bcp14>MUST</bcp14> provide a mechanism to 
            dynamically update ingress filters permitting ingress 
            traffic sourced from client delegated leases and blocking 
            packets from invalid source prefixes.  This is to implement 
            anti-spoofing as described in <xref target="BCP38" format="default"/>. The 
            delegating relay's ingress filter entry <bcp14>MUST</bcp14> use the same 
            prefix length for the delegated prefix as given in the 
            IA_PD.
          </li>

          <li>The relay <bcp14>MAY</bcp14> provide a mechanism to 
            dynamically advertise delegated leases into a routing 
            protocol as they are learned. If such a mechanism is 
            implemented, when a delegated lease is released or expires, 
            the delegated route <bcp14>MUST</bcp14> be withdrawn from the routing 
            protocol.  The mechanism by which the routes are inserted 
            and deleted is out of the scope of this document.
          </li>

          <li>
            <t>To prevent routing loops, the relay <bcp14>SHOULD</bcp14> 
            implement a configurable policy to drop potential looping 
            packets received on any DHCP-PD client-facing interfaces.
            </t>
            <t>
            The policy <bcp14>SHOULD</bcp14> be configurable on a per-client or 
            per-destination basis.
            </t>
            <t>
            Looping packets are those with a destination address in a 
            prefix delegated to a client connected to that interface, 
            as follows:
            </t>
            <ul spacing="normal">
              <li>For point-to-point links, when the 
            packet's ingress and egress interfaces match.</li>
              <li>For multi-access links, when the packet's ingress and 
            egress interface match, and the source link-layer and 
            next-hop link-layer addresses match.</li>
            </ul>
            <t>
            An ICMPv6 Type 1, Code 6 (Destination 
            Unreachable, reject route to destination) error message <bcp14>MAY</bcp14>
            be sent as per <xref target="RFC4443" sectionFormat="comma" section="3.1"/>.  
            The ICMP policy <bcp14>SHOULD</bcp14> be configurable.
            </t>
          </li>
        </ol>
      </section>
      <section anchor="service_continuity" numbered="true" toc="default">
        <name>Service Continuity Requirements</name>
	<ol type="S-%d:">
          <li>
            <t>To preserve active client prefix 
           delegations across relay restarts, the relay <bcp14>SHOULD</bcp14> 
           implement at least one of the following:
            </t>
            <ul spacing="normal">
              <li>Implement DHCPv6 Bulk Leasequery as defined in 
                <xref target="RFC5460" format="default"/>.
              </li>
              <li>Store active prefix delegations in persistent storage 
                so they can be reread after the reboot.
              </li>
            </ul>
          </li>

          <li>If a client's next-hop link-local address 
            becomes unreachable (e.g., due to a link-down event on the 
            relevant physical interface), routes for the client's 
            delegated prefixes <bcp14>MUST</bcp14> be retained by the delegating relay 
            unless they are released or removed due to expiring DHCP 
            timers. This is to reestablish routing for the delegated 
            prefix if the client next hop becomes reachable without the 
            delegated prefixes needing to be relearned.
          </li>

          <li>The relay <bcp14>SHOULD</bcp14> implement DHCPv6 Active Leasequery as defined in <xref target="RFC7653" format="default"/> to keep 
            the local lease database in sync with the DHCPv6 server.
          </li>
        </ol>
      </section>
      <section anchor="opreqs" numbered="true" toc="default">
        <name>Operational Requirements</name>
	<ol type="O-%d:">
          <li>The relay <bcp14>SHOULD</bcp14> implement an interface 
            allowing the operator to view the active delegated prefixes. 
            This <bcp14>SHOULD</bcp14> provide information about the delegated lease 
            and client details such as the client identifier, next-hop 
            address, connected interface, and remaining lifetimes.
          </li>

          <li>The relay <bcp14>SHOULD</bcp14> provide a method for the 
            operator to clear active bindings for an individual lease, 
            client, or all bindings on a port.
          </li>

          <li>To facilitate troubleshooting of 
            operational problems between the delegating relay and other 
            elements, it is <bcp14>RECOMMENDED</bcp14> that a time synchronization 
            protocol be used by the delegating relays and DHCP servers.
          </li>
        </ol>
      </section>
    </section>

  <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>This document does not add any new security considerations 
      beyond those mentioned in <xref target="RFC8213" sectionFormat="of" section="4"/> 
      and <xref target="RFC8415" sectionFormat="of" section="22"/>.
      </t>
      <t>If the delegating relay implements <xref target="BCP38" format="default"/> 
      filtering, then the filtering rules will need to be dynamically 
      updated as delegated prefixes are leased.
      </t>
      <t><xref target="RFC8213" format="default"/> describes a method for securing traffic 
    between the relay agent and server by sending DHCP messages over an 
    IPsec tunnel.  It is <bcp14>RECOMMENDED</bcp14> that this be implemented by the 
    delegating relay.</t>
      <t>Failure to implement requirement G-6 may have specific security 
    implications, such as a resource depletion attack on the relay.</t>
      <t>The operational requirements in <xref target="opreqs" format="default"/>
      may introduce additional security considerations. It is 
      <bcp14>RECOMMENDED</bcp14> that the operational security practices described
      in <xref target="RFC4778" format="default"/> be implemented.
      </t>
    </section>
  </middle>

 <back>

    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
    <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4443.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4778.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5460.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7653.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8213.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8415.xml"/>
      </references>
      <references>
        <name>Informative References</name>
<referencegroup anchor="BCP38" target="https://www.rfc-editor.org/info/bcp38">
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2827.xml"/>
</referencegroup>
        <reference anchor="DOCSIS_3.1" target="https://www.cablelabs.com/specification/CM-SP-MULPIv3.1">
          <front>
            <title>MAC and Upper Layer Protocols Interface Specification</title>
            <author>
              <organization>CableLabs</organization>
            </author>
            <date month="January" year="2017"/>
          </front>
<seriesInfo name="Version" value="10"/>
<seriesInfo name="DOCSIS" value="3.1"/>
        </reference>

        <reference anchor="TR-092" target="https://www.broadband-forum.org/download/TR-092.pdf">
          <front>
            <title>Broadband Remote Access Server (BRAS) Requirements 
          Document</title>
            <author>
              <organization>Broadband Forum</organization>
            </author>
            <date month="August" year="2004"/>
     </front>
<seriesInfo name="Technical Report" value="TR-092"/>
        </reference>
      </references>
    </references>
    <section anchor="Acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>The authors of this document would like to thank <contact fullname="Bernie Volz"/>, 
      <contact fullname="Ted Lemon"/>, and <contact fullname="Michael Richardson"/> for their valuable comments.
      </t>
    </section>
 </back>
</rfc>
