<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rfc [
 <!ENTITY nbsp    "&#160;">
 <!ENTITY zwsp   "&#8203;">
 <!ENTITY nbhy   "&#8209;">
 <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" docName="draft-ietf-spring-dhc-distribute-srv6-locator-dhcp-16" number="10038" category="std" ipr="trust200902" obsoletes="" consensus="true" updates="" xml:lang="en" symRefs="true" sortRefs="true" tocInclude="true" version="3">

  <front> 
    <title abbrev="Distribute SRv6 Locator by DHCP">Distributing the Segment Routing over IPv6 (SRv6) Locator Using DHCPv6</title>
    <seriesInfo name="RFC" value="10038"/>
    <author initials="W." surname="Cheng" fullname="Weiqiang Cheng" role="editor">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>chengweiqiang@chinamobile.com</email>
      </address>
    </author>
    <author initials="R." surname="Han" fullname="Ruibo Han">
      <organization>China Mobile</organization>
      <address>
       <postal>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>hanruibo@chinamobile.com</email>
      </address>
    </author>
    <author initials="C." surname="Lin" fullname="Changwang Lin" role="editor">
      <organization>New H3C Technologies</organization>
      <address>
        <postal>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>linchangwang.04414@h3c.com</email>
      </address>
    </author>
    <author initials="D." surname="Voyer" fullname="Daniel Voyer">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <city>Montreal</city>
          <country>Canada</country>
        </postal>
        <email>davoyer@cisco.com</email>
      </address>
    </author>
    <author initials="G." surname="Zhang" fullname="Geng Zhang">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>zhanggeng@chinamobile.com</email>
      </address>
    </author>
    <date year="2026" month="August"/>
    <area>RTG</area>
    <workgroup>spring</workgroup>

<keyword>SRv6 Locator</keyword>
<keyword>IA_SRV6_LOCATOR</keyword>
<keyword>OPTION_IA_SRV6_LOCATOR</keyword>
<keyword>OPTION_IALOCATOR</keyword>
<keyword>IA Locator</keyword>
<keyword>IA_PD</keyword>
<keyword>NoSRv6LocatorAvail</keyword>
<keyword>BRAS</keyword>
<keyword>CPE</keyword>

    <abstract>
      <t>
   In an SRv6 network, each SRv6 Segment Endpoint Node must be assigned
   an SRv6 Locator, and segment identifiers (SIDs) are generated within the address
   space of this SRv6 Locator. This document describes a method for
   assigning SRv6 Locators to SRv6 Segment Endpoint Nodes through
   the Dynamic Host Configuration Protocol for IPv6 (DHCPv6).</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   The Segment Routing (SR) architecture <xref target="RFC8402" format="default"/> specifies how a node
   can steer a packet using an ordered list of instructions called
   "segments".  These segments are identified using segment identifiers
   (SIDs).</t>
      <t>
   SR can be instantiated on the IPv6 data plane using either 
   the Segment Routing Header (SRH) defined in <xref target="RFC8754" format="default"/> 
   or compressed segment lists defined in <xref target="RFC9800" format="default"/>. 
   SR instantiation on the IPv6 data plane is referred to as SRv6.</t>
      <t>
   <xref target="RFC8986" format="default"/> introduces the SRv6 Network Programming concept
   and specifies the base set of SRv6 behaviors.
    </t>
      <t>
   In an SRv6 network, each SRv6 Segment Endpoint Node must be assigned
   an SRv6 Locator, and SIDs are generated within the address
   space of this SRv6 Locator. This document describes a method for
   assigning SRv6 Locators to SRv6 Segment Endpoint Nodes through
   the Dynamic Host Configuration Protocol for IPv6 (DHCPv6).</t>
      <section anchor="sect-1.1" 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="sect-2" numbered="true" toc="default">
      <name>Terminology</name>
      <t>
   This document leverages the terms defined in <xref target="RFC9915" format="default"/> and <xref target="RFC8986" format="default"/>. The reader is assumed to be familiar with
   this terminology.</t>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>Motivation</name>
      <t>
   As shown in <xref target="fig1"/>, in the IP backbone network, access network
   devices are deployed for access users in different regions. This
   deployment assumes that all of the relevant components in <xref target="fig1"/>
   are part of a single trusted SR domain. The Customer Premises Equipment (CPE) 
   must be managed by the operator providing services or by a trusted partner. 
   If the CPE is located within the customer premises, it must ensure that 
   the device itself and its ports are under the same operator's administrative domain; 
   otherwise, security risks may arise.</t>
      <t>
   CPEs for access users are connected to the local metropolitan area
   network (MAN) in various ways. CPEs are responsible for assigning
   addresses to access users by requesting DHCPv6 Prefix Delegation
   (PD) from a DHCPv6 server, as specified in <xref section="6.3" target="RFC9915"/>. 
   <xref target="RFC7084" format="default"/> and <xref target="RFC7368" format="default"/> describe such use in detail.
   The DHCPv6 server is usually enabled on or relayed
   by the Broadband Remote Access Server (BRAS).</t>
      <t>
   After the DHCPv6 server allocates any delegated prefix, the BRAS will add a
   network route corresponding to the delegated prefix to a local routing
   table and distribute the network route to the upstream routers.</t>
<figure anchor="fig1">
  <name>Telecom IPv6 Network</name>
         <artwork name="" type="" align="left" alt=""><![CDATA[
                            Metropolitan Area Network
                         +---------------------------+
                         |                           |
+------+     +------+    |  +-----+        +-------+ |
|Host1 +-----+ CPE1 +----+--+BRAS1+--------+Router1| |
+------+     +------+    |  +-----+        +---+---+ |
                         |                     |     |
                         +---------------------+-----+
                                               |
                                      +--------+-------------+
                                      |                      |
                                      |   Backbone Network   |
                                      |                      |
                                      +--------+-------------+
                                               |
                         +---------------------+-----+
                         |                     |     |
+------+     +------+    |  +-----+         +--+----+|
|Host2 +-----+ CPE2 +----+--+BRAS2+---------+Router2||
+------+     +------+    |  +-----+         +-------+|
                         +---------------------------+]]></artwork>
</figure>
      <t>
   In this network, operators hope to achieve interconnection between
   access users through CPE-to-CPE SRv6 tunnels. Taking the service
   traffic from Host1 to Host2 as an example, CPE1 is the SRv6 ingress
   node and CPE2 is the SRv6 egress node. The SRv6 Locator should be
   configured on the CPEs. Other devices within the operator's network
   learn the SRv6 Locator routes of the CPEs.</t>
      <t>
   At the same time, SRv6 policies need to be configured on CPEs to
   steer the service traffic between CPEs to the specified SRv6
   forwarding path. The SRv6 policy can be manually configured statically
   (via command-line interface (CLI), the Network Configuration Protocol (NETCONF), YANG, APIs, etc.).</t>
      <t>
   This document proposes a method for allocating SRv6 Locators to CPE
   via DHCPv6 and distributing SRv6 Locator routes using the DHCPv6 workflow. 
   This approach simplifies network operation and maintains consistency with 
   existing IPv6 address allocation mechanisms already deployed in such networks.
    </t>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>DHCPv6 Extensions</name>
      <section anchor="sect-4.1" numbered="true" toc="default">
        <name>Identity Association for SRv6 Locator Option</name>
        <t>
   The Identity Association for SRv6 Locator (IA_SRV6_LOCATOR) option
   is used to carry an IA_SRV6_LOCATOR, the parameters associated with
   the IA_SRV6_LOCATOR, and the SRv6 Locator associated with the
   IA_SRV6_LOCATOR.</t>
        <t>
   The IA_SRV6_LOCATOR option can be carried in DHCPv6 Solicit,
   Advertise, Request, Reply, Renew, Release, and Rebind messages.</t>
        <dl newline="true" spacing="normal" indent="0">
          <dt>The format of the IA_SRV6_LOCATOR option is:</dt>
          <dd/>
        </dl>
<figure anchor="fig2">
  <name>Identity Association for SRv6 Locator Option Format</name>
        <artwork name="" type="" align="left" alt=""><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     OPTION_IA_SRV6_LOCATOR    |           Option-Len          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           IAID (4 octets)                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              T1                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                              T2                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   .                                                               .
   .                     IA_SRV6_LOCATOR-Options                   .
   .                                                               .
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
</figure>
<t>Where:</t>

<dl spacing="normal" newline="false">
  <dt>Option-Code:</dt><dd>OPTION_IA_SRV6_LOCATOR (149), the option code for the
  Identity Association for SRv6 Locator option.</dd>
  <dt>Option-Len:</dt><dd>12 + the length of the IA_SRV6_LOCATOR-Options field in
  octets.</dd>
  <dt>IAID:</dt><dd>The unique identifier for this IA_SRV6_LOCATOR. The IAID
  <bcp14>MUST</bcp14> be unique among the identifiers for all of this client's
  IA_SRV6_LOCATORs. The number space for IA_SRV6_LOCATOR IAIDs is separate
  from the number space for other IA option types. A 4-octet field containing
  an unsigned integer.</dd>
  <dt>T1:</dt><dd>The time interval after which the client should contact the
  server from which the SRv6 Locators in the IA_SRV6_LOCATOR were obtained to
  extend the lifetimes of the SRv6 Locators to the IA_SRV6_LOCATOR. T1 is a
  time duration relative to the message reception time expressed in units of
  seconds. A 4-octet field containing an unsigned integer.</dd>
  <dt>T2:</dt><dd>The time interval after which the client should contact any
  available server to extend the lifetimes of the SRv6 Locators assigned to
  the IA_SRV6_LOCATOR. T2 is a time duration relative to the message reception
  time expressed in units of seconds. A 4-octet field containing an unsigned
  integer.</dd>
  <dt>IA_SRV6_LOCATOR-Options:</dt><dd>Options associated with this
  IA_SRV6_LOCATOR. A variable-length field (12 octets less than the value in
  the Option-Len field).</dd>
</dl>
        <t>
   The IA_SRV6_LOCATOR-Options field encapsulates those options that
   are specific to this IA_SRV6_LOCATOR.  For example, all of the IA
   Locator options (see <xref target="sect-4.2" format="default"/>) carrying the SRv6 Locators
   associated with this IA_SRV6_LOCATOR are in the IA_SRV6_LOCATOR-Options
   field.</t>
   
        <t>
   An IA_SRV6_LOCATOR option may only appear in the options area of a
   DHCP message. A DHCP message may contain multiple IA_SRV6_LOCATOR
   options (though each must have a unique IAID).</t>
        <t>
   The status of any operations involving this IA_SRV6_LOCATOR is
   indicated in a Status Code option (see <xref section="21.13" target="RFC9915"/>) in the IA_SRV6_LOCATOR-Options field.</t>
        <t>
   Note that an IA_SRV6_LOCATOR has no explicit "lifetime" or "lease length" of its own. When the valid lifetimes of all of the SRv6
   Locators in an IA_SRV6_LOCATOR have expired, the IA_SRV6_LOCATOR can
   be considered as having expired. The T1 and T2 fields are included to
   give the server explicit control over when a client should contact
   the server about a specific IA_SRV6_LOCATOR.</t>
        <t>
   In a message sent by a client to a server, the T1 and T2 fields
   <bcp14>SHOULD</bcp14> be set to 0. The server <bcp14>MUST</bcp14> ignore any values in these
   fields in messages received from a client.</t>
        <t>
   In a message sent by a server to a client, the client <bcp14>MUST</bcp14> use the
   values in the T1 and T2 fields for the T1 and T2 timers, unless
   values in those fields are 0. The values in the T1 and T2 fields are
   the number of seconds until T1 and T2.</t>
        <t>
   The server selects the T1 and T2 times to allow the client to extend
   the lifetimes of any SRv6 Locators in the IA_SRV6_LOCATOR before the
   lifetimes expire, even if the server is unavailable for some short
   period of time. Recommended values for T1 and T2 are 0.5 and 0.8
   times the shortest preferred lifetime of the SRv6 Locators in the
   IA_SRV6_LOCATOR that the server is willing to extend, respectively.
   If the time at which the SRv6 Locators in an IA_SRV6_LOCATOR are to
   be renewed is to be left to the discretion of the client, the server
   sets T1 and T2 to 0. The client <bcp14>MUST</bcp14> follow the rules defined in
   <xref target="RFC9915" section="14.2"/>.</t>
        <t>
   If a client receives an IA_SRV6_LOCATOR with T1 greater than T2 and
   both T1 and T2 are greater than 0, the client discards the
   IA_SRV6_LOCATOR option and processes the remainder of the message as
   though the server had not included the IA_SRV6_LOCATOR option.</t>
      </section>
      <section anchor="sect-4.2" numbered="true" toc="default">
        <name>IA Locator Option</name>
        <t>
   The IA Locator option is used to specify an SRv6 Locator associated
   with an IA_SRV6_LOCATOR. The IA Locator option <bcp14>MUST</bcp14> be encapsulated
   in the IA_SRV6_LOCATOR-Options field of an IA_SRV6_LOCATOR option
   (see <xref target="sect-4.1" format="default"/>). The terms "Locator Block" and "Locator Node"
   correspond to the B and N parts, respectively, of the SRv6 Locator
   that is defined in <xref target="RFC8986" section="3.1"/>.</t>
<figure anchor="fig3">
  <name>IA Locator Option Format</name>
        <artwork name="" type="" align="left" alt=""><![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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |     OPTION_IALOCATOR          |           Option-Len          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                      Preferred-lifetime                       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                        Valid-lifetime                         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  Algorithm    |                  Reserved                     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
  |    LB-Len     |    LN-Len     |   Fun-Len     |    Arg-Len    |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
  .                         SRv6-Locator                          .
  .                      (up to 16 octets)                        .
  .                                                               .
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  .                                                               .
  .                       IALocator-Options                       .
  .                                                               .
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
</figure>
<t>Where:</t>
<dl spacing="normal" newline="false">
  <dt>Option-Code:</dt><dd>OPTION_IALOCATOR (150), the option code for
  the IA Locator option.</dd>
  <dt>Option-Len:</dt><dd>16 + the length of SRv6-Locator + the length of
  the IALocator-Options field in octets.</dd>
  <dt>Preferred-lifetime:</dt><dd>The preferred lifetime for the SRv6 Locator
  in the option, expressed in units of seconds. A value of 0xffffffff
  represents "infinity" (see <xref target="RFC9915" section="7.7"/>). A
  4-octet field containing an unsigned integer.</dd>
  <dt>Valid-lifetime:</dt><dd>The valid lifetime for the SRv6 Locator in the
  option, expressed in units of seconds. A value of 0xffffffff represents
  "infinity". A 4-octet field containing an unsigned integer.</dd>
  <dt>Algorithm:</dt><dd>A 1-octet unsigned integer. The algorithm associated
  with the SRv6 Locator from which the SID is allocated.  Algorithm values are
  defined in the "IGP Algorithm Types" registry <xref target="RFC8665"
  format="default"/>. See also <xref target="RFC9350" format="default"/>.</dd>
  <dt>Reserved:</dt><dd>A 3-octet unsigned integer. <bcp14>MUST</bcp14> be set to zero and ignored when received.</dd>
  <dt>LB-Len:</dt><dd>SRv6 SID Locator Block (LB) length in bits. A 1-octet
  unsigned integer.</dd>
  <dt>LN-Len:</dt><dd>SRv6 SID Locator Node (LN) length in bits. A 1-octet
  unsigned integer.</dd>
  <dt>Fun-Len:</dt><dd>SRv6 SID function (FUNCT) length in bits. A 1-octet
  unsigned integer.</dd>
  <dt>Arg-Len:</dt><dd>SRv6 SID arguments (ARG) length in bits. A 1-octet
  unsigned integer.</dd>
  <dt>SRv6-Locator:</dt><dd>0-16 octets. This field encodes the SRv6 Locator.
  The SRv6 Locator is encoded in the minimal number of octets for the SRv6 SID
  Locator length that is LB-Len plus LN-Len. Trailing bits <bcp14>MUST</bcp14>
  be set to zero and ignored when received.</dd>
  <dt>IALocator-Options:</dt><dd>Options associated with this SRv6 Locator. A
  variable-length field (determined by subtracting the length of
  SRv6-Locator from Option-Len minus 12). The status code
  NoSRv6LocatorAvail indicates the server has no locators available to assign
  to the IA_SRV6_LOCATOR(s).</dd>
</dl>
        <t>
   The SRv6 SID Locator length (LOC-Len) is LB-Len plus LN-Len.
       </t>
        <t>
   The sum of LB-Len, LN-Len, Fun-Len, and Arg-Len <bcp14>MUST NOT</bcp14> exceed 128 bits. 
   The sum of LB-Len and LN-Len <bcp14>MUST NOT</bcp14> be zero. If either of these conditions are violated, 
   the IA_SRV6_LOCATOR option <bcp14>MUST</bcp14> be marked as invalid, and the remainder of 
   the message <bcp14>SHOULD</bcp14> be processed as if the packet did not include this option.</t>
        <t>
   The values in the Preferred-lifetime and Valid-lifetime fields are
   the number of seconds remaining in each lifetime. The value of
   0xffffffff for the preferred lifetime or the valid lifetime is taken
   to mean "infinity" and should be used carefully. The details about
   the use of lifetime values for assigned SRv6 Locators are the same
   as the ones specified for PD in 
   <xref target="RFC9915" section="18.2.10.1"/>.</t>
        <t>
   An IA Locator option may appear only in an IA_SRV6_LOCATOR option.
   More than one IA Locator option can appear in a single
   IA_SRV6_LOCATOR option.</t>
        <t>
   The status of any operations involving this IA_SRV6_LOCATOR option
   is indicated in a Status Code option (see <xref target="RFC9915" section="21.13"/>) in the IALocator-Options field.</t>
      </section>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>Process of Assigning the SRv6 Locator</name>
      <section anchor="sect-5.1" numbered="true" toc="default">
        <name>Procedure of the SRv6 Locator</name>
        <t>
   Consistent with the PD mechanism <xref target="RFC9915" format="default"/>, 
   the DHCPv6 client obtains an SRv6 Locator via DHCPv6. The key
   message exchanges involved are Solicit, Request, Advertise, and
   Reply. Once the DHCPv6 server assigns an SRv6 Locator to the DHCPv6 client, it
   automatically adds the associated SRv6 Locator routes.</t>
        <t>
   <xref target="fig4"/> illustrates the process of SRv6 Locator allocation through
   DHCPv6.</t>
<figure anchor="fig4">
  <name>SRv6 Locator Exchange</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
            DHCPv6 Client    DHCPv6 Server
                  v               v
                  |               |
                  |               |
     ____________ |\              |
     ____________ | +-----------+ |
                  |   Solicit    \|
                  | EmptyIALocator|
                  |               |
                  |              /|
                  |  +----------+ |
                  | /  Advertise  |
                  |/   IALocator  |
                  |               |
                  |\              |
                  | +-----------+ |
                  |    Request   \|
                  |    IALocator  |
                  |              /|
                  |  +----------+ |
                  | /  Reply      |
                  |/  IALocator   |
     End of       |               |
     4-message    |               |
     exchange     |               |  Issue Locator route locally
  Use Locator to  |               |  Distribute Locator route
  alloc SRv6 SID  |               |]]></artwork>
</figure>
        <t>
   As specified in <xref target="RFC9915" section="18.2.1"/>, the DHCPv6
   client sends a Solicit message containing an IA_SRV6_LOCATOR option
   to request a locator. The client may include its preferred locator
   value within the IA_SRV6_LOCATOR option.</t>
        <t>
   The DHCPv6 server processes the Solicit message, assigns a locator to the
   client, and returns the allocated locator in an Advertise message
   with the IA_SRV6_LOCATOR option.</t>
        <t>
   As specified in <xref target="RFC9915" section="18.2.2"/>, upon
   receiving the Advertise message, the client accepts the assigned locator
   and sends a Request message with the IA_SRV6_LOCATOR option to
   confirm the requested locator.</t>
        <t>
   The server processes the Request message, confirms the locator
   assignment, and responds with a Reply message containing the
   IA_SRV6_LOCATOR option with the allocated locator.</t>
        <t>
   As described in <xref target="RFC9915" section="18.2.4"/>, the client
   periodically sends a Renew message with the IA_SRV6_LOCATOR option
   to refresh the lease. The server processes the Renew message,
   updates the lease, and replies with a Reply message containing the
   IA_SRV6_LOCATOR option.</t>
        <t>
   As described in <xref target="RFC9915" section="18.2.5"/>, if the
   client does not receive a Reply message before the T2 timer expires,
   it sends a Rebind message with the IA_SRV6_LOCATOR option to attempt
   lease renewal.</t>
        <t>
   If the server responds with a Reply message, the client retains its
   allocated locator.</t>
        <t>
   If no response is received, the client considers the lease expired
   and restarts the process by sending a new Solicit message.</t>
        <t>
   As described in <xref target="RFC9915" section="18.2.7"/>, if the
   client is about to go offline, it sends a Release message with the
   IA_SRV6_LOCATOR option to relinquish the locator.</t>
        <t>
   Upon receiving a valid Release message, and when the SRv6 Locator in the message is valid, 
   the server <bcp14>MUST</bcp14> remove the lease and free the locator, making it available for allocation 
   to other clients. For detailed processing procedures, refer to 
   <xref target="RFC9915" section="18.3.7"/>.</t>
      </section>
      <section anchor="sect-5.2" numbered="true" toc="default">
        <name>DHCPv6 Client Behavior</name>
        <t>
   A client uses the Solicit message to discover DHCPv6 servers
   configured to assign leases or return other configuration parameters
   on the link to which the client is attached.</t>
        <t>
   A client uses Request, Renew, Rebind, Release, and Decline messages
   during the normal lifecycle of SRv6 Locator assignment.</t>
        <t>
   In a message sent by a client to a server, the Preferred-lifetime
   and Valid-lifetime fields <bcp14>SHOULD</bcp14> be set to 0. The server <bcp14>MUST</bcp14> ignore
   any received values in these lifetime fields.</t>
        <t>
   The client <bcp14>MUST NOT</bcp14> send an IA_SRV6_LOCATOR option with 0 in the
   LB-Len or LN-Len fields. The client <bcp14>MAY</bcp14> send non-zero values in
   the LB-Len and LN-Len fields and the unspecified value (::) in
   the SRv6-Locator field to indicate a preference for the size of
   the SRv6 Locator to be assigned. The LOC-Len (LB-Len + LN-Len) hint
   provided by a client is similar to the prefix-length hint in an
   IA_PD. Clients and servers are expected to follow the guidance
   provided in <xref target="RFC8168" format="default"/>.</t>
        <t>
   The client <bcp14>MUST</bcp14> discard any SRv6 Locators for which the preferred
   lifetime is greater than the valid lifetime.</t>
        <t>
   The process of requesting an SRv6 Locator is the same as that of
   requesting prefixes. When requesting an SRv6 Locator, the DHCPv6
   client sends a Request message carrying the IA_SRV6_LOCATOR option
   to the DHCPv6 server.</t>

        <t>
   Upon the receipt of a valid Reply message with the IA_SRV6_LOCATOR
   option in response to a Solicit with a Rapid Commit option, Request,
   Renew, or Rebind message, the client <bcp14>MUST</bcp14> process the Reply message
   according to the requirements of <xref target="RFC9915" section="18.2.10"/>
   and configure the assigned SRv6 Locator in the client
   device automatically.</t>
   
   <t>DHCP allows a client to obtain multiple addresses as specified in
        <xref target="RFC9915" section="6.5"/>. The same
        principle applies to SRv6 Locator assignment. In scenarios requiring
        multiple allocations (e.g., when multiple SRv6 Locators are needed for
        distinct services, such as best-effort and low-latency traffic, each
        with a different algorithm), the allocation policy between the DHCPv6
        client and DHCPv6 server <bcp14>MUST</bcp14> remain consistent. After obtaining the
        SRv6 Locator assigned by the DHCPv6 server, how to assign local SRv6
        SIDs based on this SRv6 Locator, how to use multiple assigned SRv6
        Locators, and how to advertise these SRv6 SIDs to the rest of the
        network are not within the scope of this document. However, and
        consistent with the guidance in <xref section="16"
        target="RFC7227" />, the client <bcp14>MUST NOT</bcp14> make any assumption about
        the ordering of locators or infer any service logic from these locators. </t>     
	   
	   <t>
   The client uses the SRv6 Locators and associated information from 
   any IAs that do not contain a Status Code option with the 
   NoSRv6LocatorAvail status code. The client <bcp14>MAY</bcp14> include the IAs for which it received the 
   NoSRv6LocatorAvail status code, with no SRv6 Locators, in subsequent Renew 
   and Rebind messages sent to the server, to retry obtaining the SRv6 Locators for these IAs.
       </t>
        <t>
   To extend the preferred and valid lifetimes for the assigned SRv6
   Locators or obtain new assigned SRv6 Locators, the client sends a
   Renew/Rebind message to the server with the IA_SRV6_LOCATOR option as
   specified in Sections <xref target="RFC9915" sectionFormat="bare" section="18.2.4"/> and <xref target="RFC9915" sectionFormat="bare" section="18.2.5"/> of <xref target="RFC9915" format="default"/>.</t>
        <t>
   If the client no longer uses the SRv6 Locator, the client can
   actively send a Release message to notify the server to reclaim the SRv6
   Locator and delete the corresponding SRv6 Locator. The client <bcp14>MUST</bcp14>
   include options containing the IAs for the SRv6 Locators it is
   releasing in the IA_SRV6_LOCATOR-Options field of the IA_SRV6_LOCATOR option.</t>
        <t>
   A client can explicitly request multiple SRv6 Locator prefixes by
   sending multiple IA_SRV6_LOCATOR options. A client can send multiple
   IA_SRV6_LOCATOR options in its initial transmissions.
   Alternatively, it can send an extra Request message with additional
   new IA_SRV6_LOCATOR options (or include them in a Renew message).</t>
        <t>
   DHCP allows a client to request new SRv6 Locators to be assigned by
   sending additional new IA_SRV6_LOCATOR options. However, a typical
   operator usually prefers to assign a single, larger prefix. In most
   deployments, it is <bcp14>RECOMMENDED</bcp14> that the client request a larger SRv6
   Locator in its initial transmissions rather than request additional
   SRv6 Locators later on.</t>
      </section>
      <section anchor="sect-5.3" numbered="true" toc="default">
        <name>DHCPv6 Server Behavior</name>
        <t>
   When the server receives a valid Request message or a valid Solicit
   message with a Rapid Commit option, the server creates the bindings
   for that client according to the server's policy and configuration
   information and records the IAs and other information requested by
   the client.</t>
        <t>
   The DHCPv6 server treats the SRv6 Locator as the prefix of the prefix
   pool. Upon the receipt of the IA_SRV6_LOCATOR option, the server
   searches the SRv6 Locator prefix pool and allocates appropriate SRv6
   Locators for the client.</t>
        <t>
   If there is an assignable SRv6 Locator, the server creates the SRv6
   Locator binding entry for that client according to the server's
   policy and configuration information and constructs a Reply message
   that includes an IA_SRV6_LOCATOR option with the SRv6 Locator
   information (including LB-Len, LN-Len, Fun-Len, and Arg-Len)
   assigned to the client.</t>
        <t>
   The IA_SRV6_LOCATOR option is filled with the SRv6 Locator
   information assigned to the client. The IA_SRV6_LOCATOR option
   populates the LB-Len, LN-Len, Fun-Len, and Arg-Len fields.</t>
        <t>
   Upon receiving a Release message from the client or when the SRv6
   Locator lease expires, the server reclaims the SRv6 Locator prefix
   resource and deletes the corresponding binding entry.</t>
        <t>
   For any IA_SRV6_LOCATOR option in the Request message to which the
   server cannot assign any SRv6 Locators, the server <bcp14>MUST</bcp14> return the
   IA_SRV6_LOCATOR option in the Reply message with no SRv6 Locator
   prefixes in the IA_SRV6_LOCATOR and with a Status Code option
   containing status code NoSRv6LocatorAvail in the IA_SRV6_LOCATOR.</t>
        <t>
   After receiving a DHCP message with multiple IA_SRV6_LOCATOR options
   at the same time, whether the server can assign multiple SRv6
   Locators to the client depends on the server policy, which is out of
   scope for this document. Note that the configuration behavior of the
   server and client <bcp14>SHOULD</bcp14> be consistent (e.g., "clients and servers
   assign a single locator unless explicitly configured").</t>
      </section>
      <section anchor="sect-5.4" numbered="true" toc="default">
        <name>DHCPv6 Relay Agent Behavior</name>
        <t>
   The allocation of SRv6 Locators to clients that reside on a different 
   link from the server requires a DHCPv6 relay agent. A DHCPv6 relay agent 
   forwards messages containing IA_SRV6_LOCATOR options in the same way as 
   it would relay addresses (i.e., per Sections <xref target="RFC9915" sectionFormat="bare" section="19.1.1"/> and <xref target="RFC9915" sectionFormat="bare" section="19.1.2"/> of 
   <xref target="RFC9915" format="default"/>).</t>
<figure anchor="fig5">
  <name>SRv6 Locator Exchange Through DHCPv6 Relay</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
     +-------------+       +------------+       +-------------+
     +DHCPv6 Client+-------+DHCPv6 Relay+-------+DHCPv6 Server|
     +-------------+       +------+-----+       +-------------+
                                  |
                                  |
                           +------+-----+
                           |  Backbone  |
                           |  Network   |
                           +------------+]]></artwork>
</figure>
      </section>
	       <section anchor="sect-5.5" numbered="true" toc="default">
        <name>Advertisement of the SRv6 Locator Route</name>
        <t>
   This section describes the processing of SRv6 Locator routes.</t>
        <t>
   As shown in <xref target="fig5"/>, when a DHCPv6 Relay or DHCPv6 server receives 
   an SRv6 Locator allocation request from a client, it <bcp14>MAY</bcp14> assign an 
   SRv6 Locator to the client and install a corresponding SRv6 Locator route locally. 
   The next hop of this route <bcp14>SHOULD</bcp14> point to the requesting client. 
   Through this route, the DHCPv6 Relay or DHCPv6 server can access the Host under the DHCPv6 client, 
   while the DHCPv6 Relay or DHCPv6 server <bcp14>MAY</bcp14> then advertise this route via traditional routing protocols
   (e.g., an IGP) to allow other routers to learn it.</t>
   <t>SRv6 Locators with an Algorithm value of zero can be advertised 
   as normal IP prefix reachability information. Conversely, SRv6 Locators with a non-zero 
   Algorithm value <bcp14>MUST</bcp14> be advertised using the Locators TLV as defined in <xref target="RFC9352" format="default"/> 
   and <xref target="RFC9513" format="default"/>.
   </t>
        <t>
   Upon receiving an SRv6 Locator release request from the client,
   the DHCPv6 Relay or DHCPv6 server <bcp14>MUST</bcp14> release the allocated SRv6 Locator, remove the local SRv6
   Locator route, and withdraw the previously advertised SRv6 Locator
   route via traditional routing protocols.</t>
<figure anchor="fig6">
  <name>Advertisement of the SRv6 Locator Route</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
DHCPv6 Client-------(DHCPv6 Relay/DHCPv6 Server)-------------Router
Alloc Locator  -->  Add SRv6 Locator route
                    Advertise SRv6 Locator route -->
Release Locator-->  Del SRv6 Locator route
                    Withdraw SRv6 Locator route  -->]]></artwork>
</figure>
      </section>
    </section>
	 <section anchor="sect-6" numbered="true" toc="default">
      <name>Operational Considerations</name>
      <t>This section outlines some operational considerations for assigning SRv6 Locators through DHCPv6.</t>
	  
	  <t>The SRv6 Locator can be used to allocate SIDs with SR Endpoint Behaviors 
         as defined in <xref target="RFC8986" format="default"/> and also to allocate 
        SIDs with the NEXT and REPLACE flavors defined in <xref target="RFC9800" format="default"/>. 
		Operators can allocate corresponding SIDs based on the LB and LN lengths of the 
		SRv6 Locator, as well as local policies. </t>
		
	  <t>When processing the SRv6 Locator defined in this document, if an error occurs in packet processing, 
	  SRv6 Locator allocation fails, or lease aging is handled, the DHCPv6 client and DHCPv6 server 
	  <bcp14>SHOULD</bcp14> log or record these SRv6 Locators as required by local policy.
	  </t>
		
      <t><xref target="RFC8987" section="4.4"/> provides necessary functional
        requirements for operating DHCPv6 relays with PD. 
		These requirements also apply to the allocation of SRv6 Locators in DHCPv6 Relay scenarios.</t>
	  <t>Routing Stability is an additional operational consideration. Network operators may advertise an aggregated route rather than individual 
	  prefixes in certain deployments to optimize Routing Information Base (RIB) performance. 
	  The withdrawal of specific routes triggered by address releases may lead to a reduction 
	  in advertised routes. An alternative approach is to implement a policy that governs 
	  this behavior. In such cases, delegating routers will discard packets destined for 
	  specific prefixes that are not "delegated" on the customer-facing interface.</t>
    </section>

    <section anchor="sect-8" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
   IANA has assigned the following DHCPv6 option codes in the
   "Option Codes" registry at
   <eref brackets="angle" target="https://www.iana.org/assignments/dhcpv6-parameters"/>:</t>

<table>
  <thead>
    <tr>
      <th>Value</th>
      <th>Description</th>
      <th>Client ORO</th>
      <th>Singleton Option</th>
      <th>Reference</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>149</td>
      <td>OPTION_IA_SRV6_LOCATOR</td>
      <td>No</td>
      <td>No</td>
      <td>RFC 10038</td>
    </tr>
    <tr>
      <td>150</td>
      <td>OPTION_IALOCATOR</td>
      <td>No</td>
      <td>No</td>
      <td>RFC 10038</td>
    </tr>
  </tbody>
</table>

      <t>
   IANA has also assigned the following DHCPv6
   status code in the "Status Codes" registry at <eref brackets="angle" target="http://www.iana.org/assignments/dhcpv6-parameters"/>:</t>

<table>
  <thead>
    <tr>
      <th>Code</th>
      <th>Name</th>
      <th>Reference</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>23</td>
      <td>NoSRv6LocatorAvail</td>
      <td>RFC 10038</td>
    </tr>
  </tbody>
</table>

    </section>
    <section anchor="sect-9" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   See <xref target="RFC9915" section="22"/> and
   <xref target="RFC7227" section="23"/> for the DHCP security considerations. 
   See <xref target="RFC8200" format="default"/> for
   the IPv6 security considerations.</t>
      <t>
   As discussed in <xref target="RFC9915" section="22"/>, "DHCP lacks
   end-to-end encryption between clients and servers; thus, hijacking,
   tampering, and eavesdropping attacks are all possible as a result."</t>
      <t>
	In some network environments, it is possible to secure the communication
	between clients and servers, as
   discussed in <xref target="RFC9915" section="22"/>.</t>
      <t>
   If not all parties use this mechanism to obtain an SRv6 Locator from
   the DHCPv6 server, there is the possibility of the same SRv6 Locator
   being used by more than one device. Note that this issue could exist
   on these networks even if DHCP were not used to obtain the SRv6
   Locator. A potential mitigation is to partition the available
   address prefixes, ensuring that different allocation mechanisms draw
   from non-overlapping pools.</t>
      <t>
   Server implementations <bcp14>SHOULD</bcp14> consider configuration options to
   limit the maximum number of SRv6 Locators to allocate (both in a
   single request and in total) to a client.  However, note that this
   does not prevent a bad client actor from pretending to be many
   different clients and consuming all available SRv6 Locators.</t>
       <t>
   The SR domain is a trusted domain, as defined in Sections
   <xref target="RFC8402" sectionFormat="bare" section="2"/> and <xref target="RFC8402" sectionFormat="bare" section="8.2"/> of <xref target="RFC8402" format="default"/>. Having such a well-defined trust boundary is necessary in
   order to operate SRv6-based services for internal traffic while
   preventing any external traffic from accessing or exploiting the
   SRv6-based services. Care and rigor in IPv6 address allocation for
   use for SRv6 SID allocations and network infrastructure addresses,
   as distinct from IPv6 addresses allocated for end users and systems
   (as illustrated in <xref target="RFC8754" section="5.1"/>), 
   can provide the clear distinction between internal and external address space that is
   required to maintain the integrity and security of the SRv6 domain.</t>
      <t>
   When assigning SRv6 Locators to SRv6 Segment Endpoint Nodes using
   DHCPv6 as specified in this document, DHCPv6 clients and DHCPv6 servers <bcp14>MUST</bcp14>
   operate within a single trusted SR domain. As a border node device, a DHCPv6 client 
   may reside in customer premises, while the DHCPv6 server is located within the provider network. 
   Although they belong to the same trusted SR domain, the DHCPv6 client <bcp14>MUST</bcp14> implement 
   appropriate traffic filtering capabilities on both its internal and external interfaces, 
   as required by <xref target="RFC8754" section="5.1"/>.</t>
    </section>

  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7227.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8168.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8200.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8402.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8665.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8754.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8986.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8987.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9350.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9352.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9513.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9800.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9915.xml"/>
       </references>
       <references>
        <name>Informative References</name>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7084.xml"/>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7368.xml"/>
       </references>   
    </references>

    <section anchor="sect-10" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>
   The authors would like to thank <contact fullname="Gunter Van de Velde"/>,
   <contact fullname="Ketan Talaulikar"/>, <contact fullname="Mohamed
   Boucadair"/>, <contact fullname="Chongfeng Xie"/>, <contact fullname="Joel
   Halpern"/>, <contact fullname="Robert Raszuk"/>, <contact fullname="Aihua
   Liu"/>, <contact fullname="Cheng Li"/>, <contact fullname="Xuewei Wang"/>,
   <contact fullname="Hao Li"/>, <contact fullname="Junjie Wang"/>, <contact
   fullname="Mengxiao Chen"/>, <contact fullname="Fang Gao"/>, <contact
   fullname="Aijun Wang"/>, <contact fullname="Xinxin Yi"/>, <contact
   fullname="Shenchao Xu"/>, <contact fullname="Yisong Liu"/>, <contact
   fullname="Xueshun Wang"/>, <contact fullname="Min Xiao"/>, <contact
   fullname="Liyan Gong"/>, <contact fullname="Linda Dunbar"/>, <contact
   fullname="Quan Xiong"/>, <contact fullname="Adrian Farrel"/>, and <contact
   fullname="Bernie Volz"/> for their comments on this document.</t>
    </section>

    <section numbered="false" anchor="contributors" toc="default">
      <name>Contributors</name>

<contact fullname="Yuanxiang Qiu">
  <organization>New H3C Technologies</organization>
  <address>
    <email>qiuyuanxiang@h3c.com</email>
  </address>
</contact>

    </section>
  </back>
</rfc>
