<?xml version='1.0' encoding='UTF-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     version="3"
     ipr="trust200902"
     submissionType="IETF"
     category="std"
     xml:lang="en"
     tocInclude="true"
     tocDepth="3"
     symRefs="true"
     sortRefs="true"
     docName="draft-liu-idr-bgp-ls-sr-policy-spray-state-00">

  <front>
    <title abbrev="BGP-LS SR Policy Spray Flag">
      BGP-LS Extension for SR Policy Packet Spray State
    </title>
    <seriesInfo name="Internet-Draft" value="draft-liu-idr-bgp-ls-sr-policy-spray-state-00"/>
    <author fullname="Yao Liu" surname="Liu">
      <organization>ZTE Corporation</organization>
      <address>
        <email>liu.yao71@zte.com.cn</email>
      </address>
    </author>

    <date year="2026"/>

    <area>Routing</area>
    <workgroup>IDR</workgroup>

    <keyword>BGP-LS</keyword>
    <keyword>SR Policy</keyword>
    <keyword>Packet Spray</keyword>
    <keyword>Candidate Path</keyword>

    <abstract>
      <t>This document proposes an extension to BGP-LS that allows a headend node, when reporting SR Policy state information via BGP-LS, to carry a new state flag at the candidate path level. This flag indicates whether the candidate path is currently being used for packet spraying. The information can be consumed by external controllers for path optimization, operations management or other purposes.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro">
      <name>Introduction</name>
      <t>Segment Routing (SR) architecture provides flexible traffic engineering forwarding mechanisms through SR Policy <xref target="RFC9256"/>. An SR Policy consists of one or more candidate paths, and each candidate path may contain one or more segment lists. As in <xref target="RFC9256"/>, only one candidate path is selected as the active path for each SR Policy, and traffic is load-balanced across the multiple segment lists of the active candidate path based on their respective weights.</t>
      <t><xref target="RFC9857"/> defines the mechanism for advertising SR Policies via BGP-LS, in which the SR Candidate Path State TLV is used to report the operational status and attributes at the candidate path level.</t>
      <t>Based on local policy, a headend node may decide to enable packet spraying across the multiple segment lists of an active candidate path. External controllers may need to be aware of this operational state for path optimization, troubleshooting or other purposes.</t>
      <t>This document extends the SR Candidate Path State TLV <xref target="RFC9857"/> by allocating a new PS-Flag (Packet Spray Flag). This flag is used by the headend to report whether the candidate path is being used for packet spraying.</t>
    </section>

    <section anchor="requirements-language">
      <name>Requirements Language</name>
      <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 anchor="bgp-ls-extensions">
      <name>BGP-LS Extensions</name>
      <t>This document allocates 1 bit from the reserved bits of the Flags field in the SR Candidate Path State TLV (Type 1202) as the PS-Flag (Packet Spray Flag).</t>
      <ul spacing="normal">
        <li>When the PS-Flag is set to 1, it indicates that the candidate path is currently being used for packet spraying. The headend has decided, based on local policy, to perform packet spraying across the multiple segment lists of this candidate path.</li>
        <li>When the PS-Flag is set to 0, it indicates that the candidate path is currently not being used for packet spraying, or the headend does not support this extension.</li>
      </ul>
      <t>How the headend decides whether to enable packet spraying on a candidate path is out of the scope of this document.</t>

      <section anchor="headend-rules">
        <name>Headend Advertisement Rules</name>
        <t>When advertising SR Policy state via BGP-LS, the headend node SHOULD set the PS-Flag according to the following rules:</t>
        <ul spacing="normal">
          <li><strong>Active candidate path only:</strong> The PS-Flag is meaningful only when the candidate path is currently the active candidate path (i.e., the A-Flag is set). For non-active candidate paths, the PS-Flag SHOULD be set to 0.</li>
          <li><strong>Multiple segment lists only:</strong> If the active candidate path contains only one segment list, packet spraying is not possible, and the PS-Flag SHOULD be set to 0.</li>
          <li>If the active candidate path contains multiple segment lists and the headend has enabled packet spraying, the PS-Flag SHOULD be set to 1.</li>
        </ul>
      </section>

      <section anchor="receiver-rules">
        <name>Receiver Processing Rules</name>
        <t>Upon receiving a BGP-LS UPDATE containing an SR Candidate Path State TLV, the receiver (e.g., a controller) SHOULD process the PS-Flag according to the following rules:</t>
        <ul spacing="normal">
          <li><strong>Validity check -- A-Flag:</strong> The receiver SHOULD first check the A-Flag of the candidate path. If the A-Flag is 0 (i.e., the candidate path is not active), the receiver SHOULD ignore the PS-Flag.</li>
          <li><strong>Validity check -- segment list count:</strong> If the number of segment lists is less than 2, the receiver SHOULD ignore the PS-Flag.</li>
          <li>If the receiver finds that the PS-Flag is set to 1 but the candidate path's A-Flag is 0 or the segment list count is less than 2, the receiver MAY log the event for trouble shooting purpose.</li>
        </ul>
        <t>If a headend's spraying state flaps frequently, the PS-Flag will cause corresponding BGP-LS updates to be generated. Implementations SHOULD apply update throttling or dampening mechanisms to avoid excessive BGP-LS update churn.</t>
      </section>
    </section>

    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document requests a bit in the flag field of "SR Candidate Path State TLV" <xref target="RFC9857"/> under the "BGP-LS Node Descriptor, Link  Descriptor, Prefix Descriptor, and Attribute TLVs" registry.</t>

<table anchor="iana-flags">
  <name>New Flag Allocation for SR Candidate Path State TLV</name>
  <thead>
    <tr>
      <th>Bit</th>
      <th>Description</th>
      <th>Reference</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>TBA</td>
      <td>PS-Flag: The CP is being used for packet spraying</td>
      <td>This document</td>
    </tr>
  </tbody>
</table>    
	  

	  
    </section>

    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>Procedures and protocol extensions defined in this document do not affect the security considerations discussed in <xref target="RFC9857"/>.</t>
      <t>The setting of the PS-Flag may indirectly expose the headend node's local policy information (e.g., whether spraying is enabled). Operators SHOULD assess the risk of such information disclosure according to their own security policies and use appropriate measures to protect such information.</t>
    </section>
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9857.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9256.xml"/>

      </references>
    </references>
  </back>
</rfc>