<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4443 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4443.xml">
<!ENTITY RFC5460 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5460.xml">
<!ENTITY RFC7513 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7513.xml">
<!ENTITY RFC7653 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7653.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8213 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8213.xml">
<!ENTITY RFC8415 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8415.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-dhc-dhcpv6-pd-relay-requirements-03" ipr="trust200902">

<front>
  <title abbrev="DHCPv6 PD Relay">DHCPv6 Prefix Delegating Relay Requirements</title>

  <author fullname="Ian Farrer" initials="I.F." surname="Farrer">
    <organization>Deutsche Telekom AG</organization>
    <address>
      <postal>
        <street>Landgrabenweg 151</street>
        <city>Bonn</city>
        <region>NRW</region>
        <code>53227</code>
        <country>DE</country>
      </postal>
      <email>ian.farrer@telekom.de</email>
    </address>
  </author>

  <author fullname="Naveen Kottapalli" initials="Naveen" surname="Kottapalli"> 
    <organization>Benu Networks</organization>
    <address>
      <postal>
        <street>300 Concord Road</street>
        <city>Billerica</city>
        <code>01821</code>
        <region>MA</region>
        <country>US</country>
      </postal>
      <email>naveen.sarma@gmail.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>
        <region>L</region>
        <country>CZ</country>
      </postal>
      <email>martin.hunek@tul.cz</email>
    </address>
  </author>

  <author fullname="Richard Patterson" initials="R.P." surname="Patterson">
    <organization>Sky UK Ltd</organization>
    <address>
      <postal>
        <street>1 Brick Lane</street>
        <city>London</city>
        <code>E1 6PU</code>
        <country>UK</country>
      </postal>
      <email>richard.patterson@sky.uk</email>
    </address>
  </author>

  <date month="November" year="2020"/>

  <area>Internet</area>

  <workgroup>DHC Work Group</workgroup>

  <keyword>Prefix Delegation</keyword>
  <keyword>DHCPv6 relay</keyword>
  <keyword>Delegating router</keyword>
  <keyword>Requesting router</keyword>

  <abstract>
    <t>This memo 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 memo provides necessary 
    functional requirements for operating DHCPv6 relays with Prefix 
    Delegation.</t>

    <t>It is recommended that any network operator that is using DHCPv6 
    prefix delegation with relays should ensure that these requirements 
    are followed on their networks.</t>
  </abstract>
</front>

<middle>
  <section title="Introduction">
    <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 separate, centralized DHCPv6 server infrastructure.
    <xref target="RFC8415"/> describes the functionality of a DHCPv6 
    relay and Section 19.1.3 mentions this deployment scenario, but does 
    not provide detail 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 inter-working. This can
    result in operational problems such as messages not being forwarded 
    by the relay or un-reachability 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-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 that the DHCPv6 client 
    requesting the prefix is connected to, so no changes to any
    subsequent relays in the path are needed.</t>
  </section>

  <section title="Terminology">
    <section title="General">
      <t>This document uses the terminology defined in <xref
        target="RFC8415"/>, however when defining the functional 
        elements for prefix delegation <xref target="RFC8415"/>, Section 
        4.2 defines the term 'delegating router' as:
        <list style="empty">
          <t>"The router that acts as a DHCP server and responds to 
            requests for delegated prefixes."
          </t>
        </list>

        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:

        <list style="hanging" hangIndent="17">
          <t hangText="Delegating relay">A delegating relay acts as an
            intermediate device, forwarding DHCPv6 messages containing
            IA_PD/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.
          </t>
        </list>
      </t>

      <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"/> defines the 'DHCP server', (or 
        'server') as:
        <list style="empty">
          <t>"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."
          </t>
        </list>
        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 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 <xref target="RFC8415"/> terminology and 
        uses 'DHCP client' or 'client' interchangeably for this element.
      </t>
    </section>

    <section title="Topology">
      <t>The following diagram shows the deployment topology relevant 
        to this document.
      </t>
      <figure align="center" anchor="topology_overview" title="Topology 
        overview">
        <artwork align="left"><![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 title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL 
        NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", 
        "MAY", and "OPTIONAL" in this document are to be interpreted as 
        described in BCP 14 <xref target="RFC2119"/> 
        <xref target="RFC8174"/> when, and only when, they appear in 
        all capitals, as shown here.</t>
      </section>
  </section>

  <section title="Problems Observed with Existing Delegating Relay 
    Implementations"
    anchor="relay_problems">
    <t>The following sections of the document describe problems that 
      have been observed with delegating relay implementations in 
      commercially available devices.
    </t>

    <section title="DHCP Messages not being Forwarded by the Delegating 
      Relay">
      <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 which is unexpected by the 
        delegating relay.  For example, the delegating router 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 it receives either 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 title="Delegating Relay Loss of State on Reboot">
       <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 
        which does not store this state persistently across reboots 
        will not be able to forward traffic to client's delegated 
        leases until the state is re-established through new DHCP 
        messages.
      </t>
    </section>

    <section title="Multiple Delegated Prefixes for a Single Client">
     <t><xref target="RFC8415"/> allows for 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-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 title="Dropping Messages from Devices with Duplicate MAC 
      addresses and DUIDs">
      <t>It is an unfortunate operational reality that client devices 
        with duplicate MAC addresses and/or DUIDs exist and have been 
        deployed. In this situation, 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 MAC address/DUID 
        uniqueness is a necessary function and not considered a problem.
      </t>
    </section>

    <section title="Forwarding Loops between Client and Relay">
      <t>If the client loses information about a prefix that it is 
        delegated while the lease entry and associated route is still 
        active in the delegating relay, then the relay will forward 
        traffic to the client which the client will return to the 
        relay (which is the client's default gateway (learned via 
        an RA)). The loop will continue until either the client is 
        successfully re-provisioned via DHCP, or the lease ages out 
        in the relay.
      </t>
    </section>
  </section>

  <section title="Requirements for Delegating Relays">
    <t>To resolve the problems described in 
     <xref target="relay_problems"/> and pre-empt other undesirable 
     behavior, the following section 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"/> makes it clear that relays MUST NOT drop
      (and hence not relay) packets that either contain message codes
      (Section 19 of <xref target="RFC8415"/>) it may not understand,
      or contain options that it does not understand (Section 19 of 
      <xref target="RFC8415"/>).</t>

    <section title="General Requirements">
      <t>
        <list style="hanging" hangIndent="8">
          <t hangText="G-1:">The delegating relay MUST forward messages
            bidirectionally between the client and server without 
            changing the contents of the message.
          </t>
<!--        <t hangText="G-2:">The relay MUST NOT discard messages because 
            it does not recognize the message codes (Section 19 of 
            <xref target="RFC8415"/> or contain options that it does not 
            understand (or instances of vendor options with unknown 
            enterprise-number values as described in
            Section 16 of <xref target="RFC8415"/>.-->
          <t hangText="G-2:">The relay MUST allow for multiple prefixes 
            to be delegated for the same client IA_PD. These delegations 
            may have different lifetimes.
          </t>
          <t hangText="G-3:">The relay MUST 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).
          </t>
          <t hangText="G-4:">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 SHOULD 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.
          </t>
          <!--
          <t hangText="G-6:">The relay up on detecting that the current
            lease information of any delegated prefix is no more valid,
            then the relay MUST deprecate the invalid prefixes as quick
            as possible so that the clients use a new prefix quickly.
          </t>-->
          <t hangText="G-5:">The maximum number of simultaneous prefixes
            delegated to a single client MUST be configurable.
          </t>
          <t hangText="G-6:">The relay MUST 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 MUST be configurable.
          </t>
          <t hangText="G-7:">It is RECOMMENDED that delegating relays 
            support at least 8 active delegated leases per client device 
            and use this as the default limit.
          </t>
          <t hangText="G-8:">The delegating relay MUST update the lease 
            lifetimes based on the Client Reply messages it forwards to 
            the client and only expire the delegated prefixes when the 
            valid lifetime has elapsed.
          </t>
          <t hangText="G-9:">On receipt of a Release message from the 
            client, the delegating relay MUST expire the active leases 
            for each of the IA_PDs in the message.
          </t>
        </list>
      </t>
    </section>

    <section title="Routing Requirements">
      <t>
        <list style="hanging" hangIndent="8">
          <t hangText="R-1:">The relay MUST 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 MUST be removed from the relay's routing table.
          </t>
          <t hangText="R-2:">The relay MUST 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"/>.
          </t>
          <t hangText="R-3:">The relay MAY provide a mechanism to 
            dynamically advertise delegated leases into a routing 
            protocol as they are learned. When a delegated lease is 
            released or expires, the delegated route MUST be withdrawn 
            from the routing protocol.  The mechanism by which the 
            routes are inserted and deleted is out of the scope of 
            this document.</t>
          <t hangText="R-4:">To prevent routing loops, the relay SHOULD 
            implement a configurable policy to drop potential looping 
            packets received on any DHCP-PD client facing interfaces.
            <vspace blankLines="1" />
            The policy SHOULD be configurable on a per-client or 
            per-destination basis.
            <vspace blankLines="1" />
            Looping packets are those with a destination address in a 
            prefix delegated to a client connected to that interface, 
            as follows:
           <list style="symbols">
            <t>For point-to-point links, when the 
            packet's ingress and egress interfaces match.</t>
            <t>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.</t>
            </list>
            An ICMPv6 Type 1, Code 6 (Destination 
            Unreachable, reject route to destination) error message MAY
            be sent as per <xref target="RFC4443"/>, section 3.1.  
            The ICMP policy SHOULD be configurable.
          </t>
          <t hangText="R-5:">The delegating relay's routing entry MUST
            use the same prefix length for the delegated prefix as
            given in the IA_PD.
          </t>
        </list>
      </t>
    </section>

    <section title="Service Continuity Requirements"
             anchor="service_continuity">
      <t>
        <list style="hanging" hangIndent="8">
          <t hangText="S-1:">In the event that the relay is restarted, 
           active client prefix delegations will be lost. This may 
           result in clients becoming unreachable. In order to mitigate 
           this problem, the relay SHOULD implement at least only 
           following:
             <list style="symbols">
              <t>Implement DHCPv6 bulk lease query as defined in 
                <xref target="RFC5460"/>.
              </t>

              <t>Store active prefix delegations in persistent storage 
                so they can be re-read after the reboot.
              </t>
            </list>
          </t>

          <t hangText="S-2:">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 MUST be retained by the delegating relay 
            unless they are released or removed due to expiring DHCP 
            timers. This is to re-establish routing for the delegated 
            prefix if the client next-hop becomes reachable without the 
            delegated prefixes needing to be re-learned.
          </t>
          
          <t hangText="S-3:">The relay SHOULD implement DHCPv6 active 
            lease query as defined in <xref target="RFC7653"/> to keep 
            the local lease database in sync with the DHCPv6 server.
          </t>
        </list>
      </t>
    </section>

    <section title="Operational Requirements">
      <t>
        <list style="hanging" hangIndent="8">
          <t hangText="O-1:">The relay SHOULD implement an interface 
            allowing the operator to view the active delegated prefixes. 
            This SHOULD provide information about the delegated lease 
            and client details such as client identifier, next-hop 
            address, connected interface, and remaining lifetimes.
          </t>

          <t hangText="O-2:">The relay SHOULD provide a method for the 
            operator to clear active bindings for an individual lease, 
            client or all bindings on a port.
          </t>

          <t hangText="O-3:">To facilitate troubleshooting of 
            operational problems between the delegating relay and other 
            elements, it is RECOMMENDED that a time synchronization 
            protocol is used by the delegating relays and DHCP servers.
          </t>
        </list>
      </t>
    </section>
  </section>

  <section anchor="Acknowledgements" title="Acknowledgements">
    <t>The authors of this document would like to thank Bernie Volz, 
      Ted Lemon, and Michael Richardson for their valuable comments.
    </t>
  </section>

   <!-- Possibly a 'Contributors' section ... -->

  <section anchor="IANA" title="IANA Considerations">
    <t>This memo includes no request to IANA.</t>
  </section>

  <section anchor="Security" title="Security Considerations">
     <t>This document does not add any new security considerations 
      beyond those mentioned in Section 22 of <xref target="RFC8213"/>.
     </t>

    <t>If the delegating relay implements <xref target="BCP38"/> 
      filtering, then the filtering rules will need to be dynamically 
      updated as delegated prefixes are leased.
    </t>

    <t><xref target="RFC8213"/> describes a method for securing traffic 
    between the relay agent and server by sending DHCP messages over an 
    IPsec tunnel.  In this case the IPsec tunnel is functionally the 
    server-facing interface and DHCPv6 message snooping can be carried 
    out as described. It is RECOMMENDED that this is implemented by 
    the delegating relay.</t>
  </section>
</middle>

 <!--  *****BACK MATTER ***** -->

 <back>
  <references title="Normative References">
    <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
    &RFC2119;
    &RFC5460;
    &RFC7653;
    &RFC8174;
    &RFC8415;
  </references>

  <references title="Informative References">
    &RFC4443;
    &RFC8213;

    <reference anchor="BCP38">
      <front>
        <title>Network Ingress Filtering: Defeating Denial of Service 
          Attacks which employ IP Source Address Spoofing
        https://tools.ietf.org/html/bcp38
        </title>

        <author>
          <organization>IETF</organization>
        </author>

        <date />
      </front>
      <seriesInfo name="RFC" value="2827"/>
      <seriesInfo name="BCP" value="38" />
    </reference>
    <reference anchor="DOCSIS_3.1"
        target="https://apps.cablelabs.com/specification/CM-SP-MULPIv3.">
      <front>
        <title>MAC and Upper Layer Protocols Interface Specification", 
          DOCSIS 3.1, January, 2017</title>
          <author>
            <organization abbrev="CL">CableLabs</organization>
          </author>
          <date />
        </front>
      </reference>
      <reference anchor="TR-092"
        target="https://www.broadband-forum.org/download/TR-092.pdf">
      <front>
        <title>Broadband Remote Access Server (BRAS) Requirements 
          Document, August, 2004</title>
          <author>
            <organization abbrev="BBF">Broadband Forum</organization>
          </author>
          <date />
        </front>
      </reference>
 </references>

  <!-- Change Log
   v00 2019-05-7  IF   Initial version 
   2020-02-20 IF - Name change after adoption and typo fixes 
   2020-03-27 IF - Updates after Bernie's review 
   2020-08-19 IF - Updates after Ted Lemon's review 
   2020-10-10 IF - WGLC updates included. Cleanup for publication-->

 </back>
</rfc>
