<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<rfc ipr="trust200902" docName="draft-li-idr-bgpls-sr-policy-composite-path-08" category="std">
    <?rfc toc="yes"?>
    <?rfc sortrefs="yes"?>
    <front>
        <title abbrev="SR Policy Composite Path in BGP-LS">
            Signaling Composite Candidate Path of SR Policy using BGP-LS
        </title>
        <author initials="C." surname="Lin" fullname="Changwang Lin">
            <organization>New H3C Technologies</organization>
            <address>
                <email>linchangwang.04414@h3c.com</email>
            </address>
        </author>

        <author initials="W." surname="Cheng" fullname="Weiqiang Cheng">
            <organization>China Mobile</organization>
            <address>
                <email>chengweiqiang@chinamobile.com</email>
            </address>
        </author>

        <author initials="Z." surname="Ali" fullname="Zafar Ali">
            <organization>Cisco Systems, Inc</organization>
            <address>
                <email>zali@cisco.com</email>
            </address>
        </author>

        <author initials="A." surname="MahendraBabu" fullname="Aravind Babu MahendraBabu">
            <organization>Cisco Systems, Inc</organization>
            <address>
                <email>aramahen@cisco.com</email>
            </address>
        </author>

        <date month="October" day="20" year="2025" />

        <area>General</area>
        <workgroup>Network Working Group</workgroup>
        <keyword>Segment Routing</keyword>
        <keyword>SR Policy</keyword>
        <keyword>BGP-LS</keyword>
        <abstract>
            <t>Segment Routing is a source routing paradigm that explicitly indicates the forwarding path for packets at the ingress node. An SR Policy is associated with one or more candidate paths, and each candidate path is either dynamic, explicit or composite. This document specifies the extensions to BGP Link State (BGP-LS) to carry composite candidate path information in the advertisement of an SR policy.</t>
        </abstract>
    </front>

    <middle>
        <section title="Introduction" toc="include">
            <t>As described in <xref target="RFC9552"></xref>, BGP Link State (BGP-LS) provides a mechanism by which link-state and TE information can be collected from networks and shared with external components using the BGP routing protocol.</t>
            <t>Segment routing (SR) <xref target="RFC8402"></xref> is a source routing paradigm that explicitly indicates the forwarding path for packets at the ingress node. The ingress node steers packets into a specific path according to the Segment Routing Policy (SR Policy) as defined in <xref target="RFC9256"></xref>.</t>
            <t>An SR Policy is associated with one or more candidate paths. A composite candidate path acts as a container for grouping of SR Policies. As described in section 2.2 in <xref target="RFC9256"></xref>, the composite candidate path construct enables combination of SR Policies, each with explicit candidate paths and/or dynamic candidate paths with potentially different optimization objectives and constraints, for a load-balanced steering of packet flows over its constituent SR Policies.</t>
            <t><xref target="I-D.jiang-idr-sr-policy-composite-path"></xref> defines extensions for BGP to distribute SR policies carrying composite candidate path information. While as defined in Section 3.6 of <xref target="I-D.ietf-pce-multipath"></xref>,  PCEP signals the Composite Candidate Path.</t>
            <t><xref target="I-D.draft-ietf-idr-bgp-ls-sr-policy"></xref> describes a mechanism to collect the SR policy information that is locally available in a node and advertise it into BGP-LS updates. This document extends it to provide some extra information to carry composite candidate path information in the BGP-LS advertisement.</t>
         </section>

        <section title="Terminology" toc="include">
            <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> <xref target="RFC8174"></xref> when, and only when, they appear in all capitals, as shown here.</t>
        </section>

        <section title="BGP-LS Extensions for Composite Candidate Path" toc="default">
            <t><xref target="RFC9552"></xref> defines the BGP-LS NLRI that can be a Node NLRI, a Link NLRI or a Prefix NLRI.  The corresponding BGP-LS attribute is a Node Attribute, a Link Attribute or a Prefix Attribute. <xref target="I-D.draft-ietf-idr-bgp-ls-sr-policy"></xref> describes a mechanism to collect the SR Policy information that is locally available in a node and advertise it into BGP Link State (BGP-LS) updates. This section defines a new sub-TLV which is carried in the optional non-transitive BGP Attribute "LINK_STATE Attribute" defined in <xref target="RFC9552"></xref>.</t>

            <section title="Composite Candidate Path TLV" toc="default">
                <t>Segment Routing Policy (SR Policy) architecture is specified in <xref target="RFC9256"></xref>. A SR Policy can comprise of one or more candidate paths, and each candidate path is either dynamic, explicit or composite. A composite candidate path can comprise of one or more constituent SR policies. The endpoints of the constituent SR Policies and the parent SR Policy MUST be identical, and the colors of each of the constituent SR Policies and the parent SR Policy MUST be different.</t>
                <t>The Composite Candidate Path TLV is used to report the constituent SR policy(s) of a composite candidate path. Only a single instance
   of this TLV is advertised for a given candidate path.  If multiple
   instances are present, then the first valid (i.e., not determined to
   be malformed as per section 8.2.2 of [RFC9552]) one is used and the
   rest are ignored.The TLV has following format:</t>
                <figure>
                    <artwork>
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              Type             |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RESERVED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             Color                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             Weight                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Sub-TLVs (variable)                     //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                    </artwork>
                </figure>
                <t>
                    where:
                    <list style="symbols">
                        <t>Type: to be assigned by IANA.</t>
                        <t>Length: the total length of the value field not including Type and Length fields.</t>
                        <t>Reserved: 32 bits reserved and MUST be set to 0 on transmission and MUST be ignored on receipt.</t>
                        <t>Color: 4 octets that indicates the color of the constituent SR Policy.</t>
                        <t>Weight: 4 octet field that indicates the weight associated with the SID-List for weighted load-balancing. Refer Section 2.2 and 2.11 of <xref target="RFC9256"></xref>.</t>
                        <t>Sub-TLVs: variable and contains any other optional attributes
      associated with the Composite Candidate Path. Currently, the sub-TLV only defines the Per-Flow Forwarding Class TLV.</t>
                    </list>
                </t>
            </section>
			
           <section title="Per-Flow Forwarding Class TLV" toc="default">
<t>Per-Flow Candidate Path builds on top of the concept of the Composite Candidate Path.
Each Path in a Per-Flow Candidate Path is assigned a 3-bit forward class value, 
which allows Quality of Service (QoS) classified traffic to be steered depending on the forward class.
The Per-Flow Forwarding Class TLV is an optional sub-TLV of the Composite Candidate Path TLV.Only a single instance of this sub-TLV is
   advertised for a given candidate path.  If multiple instances are
   present, then the first valid (i.e., not determined to be malformed
   as per section 8.2.2 of [RFC9552]) one is used and the rest are
   ignored. </t>
                <figure>
                    <artwork>
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              Type             |             Length            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Reserved                       | FC  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                    </artwork>
                </figure>
                <t>
                    where:
                    <list style="symbols">
                    <t>Type (16 bits): TBD1 for "PER-FLOW-FORWARD-CLASS" TLV.</t>
                    <t>Length (16 bits): 4.</t>
                    <t>Reserved: This field MUST be set to zero on transmission and MUST be
                       ignored on receipt.</t>
                    <t>FC (3 bits): Forward class value that is given by the QoS classifier to
                       traffic entering the given Candidate Path. Different classes of traffic
                       that enter the given Candidate Path can be differentially steered into
                       different Colors.</t>
                    </list>
                </t>
            </section>
        </section>
  
 
        <section title="Operations" toc="default">
            <t>The document does not bring new operation beyond the description of operations defined in <xref target="RFC9552"></xref> and <xref target="I-D.draft-ietf-idr-bgp-ls-sr-policy"></xref>. The existing operations defined in <xref target="RFC9552"></xref> and <xref target="I-D.draft-ietf-idr-bgp-ls-sr-policy"></xref> can apply to this document directly.</t>
            <t>Typically but not limit to, the BGP-LS messages carrying composite candidate path information along with the SR policy are distributed to a controller.</t>
            <t>After configuration, the composite candidate path information will be advertised by BGP update messages. The operation of advertisement is the same as defined in <xref target="RFC9552"></xref> and <xref target="I-D.draft-ietf-idr-bgp-ls-sr-policy"></xref>, as well as the reception.</t>
        </section>

        <section title="Security Considerations">
            <t>Procedures and protocol extensions defined in this document do not affect the security considerations discussed in <xref target="I-D.draft-ietf-idr-bgp-ls-sr-policy"></xref>.</t>
        </section>

        <section title="IANA Considerations">
            <t>This document defines a new TLV in the BGP-LS Link Descriptor and Attribute TLVs:</t>
            <texttable align="left" style="full">
                <ttcol>Value</ttcol>
                <ttcol>Description</ttcol>
                <ttcol>Reference</ttcol>
                <c>TBA</c>
                <c>Composite Candidate Path TLV</c>
                <c>This document</c>
                <c>TBA</c>
                <c>Per-Flow Forwarding Class TLV</c>
                <c>This document</c>
            </texttable>
        </section>
    </middle>

    <back>
        <references title="Normative References">
            <reference anchor="I-D.draft-ietf-idr-bgp-ls-sr-policy" target="https://datatracker.ietf.org/doc/html/draft-ietf-idr-bgp-ls-sr-policy-17">
			  <front>
				<title>Advertisement of Segment Routing Policies using BGP Link-State</title>
				<author fullname="Stefano Previdi" initials="S." surname="Previdi">
				  <organization>Huawei Technologies</organization>
				</author>
				<author fullname="Ketan Talaulikar" initials="K." surname="Talaulikar">
				  <organization>Cisco Systems</organization>
				</author>
				<author fullname="Jie Dong" initials="J." surname="Dong">
				  <organization>Huawei Technologies</organization>
				</author>
				<author fullname="Hannes Gredler" initials="H." surname="Gredler">
				  <organization>RtBrick Inc.</organization>
				</author>
				<author fullname="Jeff Tantsura" initials="J." surname="Tantsura">
				  <organization>Microsoft</organization>
				</author>
				<date day="10" month="September" year="2025"/>
				<abstract>
				  <t>This document describes a mechanism to collect the Segment Routing Policy information that is locally available in a node and advertise it into BGP Link-State (BGP-LS) updates. Such information can be used by external components for path computation, re-optimization, service placement, network visualization, etc.</t>
				</abstract>
			  </front>
			  <seriesInfo name="Internet-Draft" value="draft-ietf-idr-bgp-ls-sr-policy-17"/>
			</reference>
            <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
                <front>
                <title>
                Key words for use in RFCs to Indicate Requirement Levels
                </title>
                <author initials="S." surname="Bradner" fullname="S. Bradner">
                <organization/>
                </author>
                <date year="1997" month="March"/>
                <abstract>
                <t>
                In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.
                </t>
                </abstract>
                </front>
                <seriesInfo name="BCP" value="14"/>
                <seriesInfo name="RFC" value="2119"/>
                <seriesInfo name="DOI" value="10.17487/RFC2119"/>
            </reference>
            <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
                <front>
                <title>
                Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words
                </title>
                <author initials="B." surname="Leiba" fullname="B. Leiba">
                <organization/>
                </author>
                <date year="2017" month="May"/>
                <abstract>
                <t>
                RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.
                </t>
                </abstract>
                </front>
                <seriesInfo name="BCP" value="14"/>
                <seriesInfo name="RFC" value="8174"/>
                <seriesInfo name="DOI" value="10.17487/RFC8174"/>
            </reference>
            <reference anchor="RFC8402" target="https://www.rfc-editor.org/info/rfc8402">
                <front>
                <title>Segment Routing Architecture</title>
                <author initials="C." surname="Filsfils" fullname="C. Filsfils" role="editor">
                <organization/>
                </author>
                <author initials="S." surname="Previdi" fullname="S. Previdi" role="editor">
                <organization/>
                </author>
                <author initials="L." surname="Ginsberg" fullname="L. Ginsberg">
                <organization/>
                </author>
                <author initials="B." surname="Decraene" fullname="B. Decraene">
                <organization/>
                </author>
                <author initials="S." surname="Litkowski" fullname="S. Litkowski">
                <organization/>
                </author>
                <author initials="R." surname="Shakir" fullname="R. Shakir">
                <organization/>
                </author>
                <date year="2018" month="July"/>
                <abstract>
                <t>
                Segment Routing (SR) leverages the source routing paradigm. A node steers a packet through an ordered list of instructions, called "segments". A segment can represent any instruction, topological or service based. A segment can have a semantic local to an SR node or global within an SR domain. SR provides a mechanism that allows a flow to be restricted to a specific topological path, while maintaining per-flow state only at the ingress node(s) to the SR domain.
                </t>
                <t>
                SR can be directly applied to the MPLS architecture with no change to the forwarding plane. A segment is encoded as an MPLS label. An ordered list of segments is encoded as a stack of labels. The segment to process is on the top of the stack. Upon completion of a segment, the related label is popped from the stack.
                </t>
                <t>
                SR can be applied to the IPv6 architecture, with a new type of routing header. A segment is encoded as an IPv6 address. An ordered list of segments is encoded as an ordered list of IPv6 addresses in the routing header. The active segment is indicated by the Destination Address (DA) of the packet. The next active segment is indicated by a pointer in the new routing header.
                </t>
                </abstract>
                </front>
                <seriesInfo name="RFC" value="8402"/>
                <seriesInfo name="DOI" value="10.17487/RFC8402"/>
            </reference>
            <?rfc include='reference.RFC.9256'?>
        </references>
        <references title="Informative References">    
        <reference anchor="RFC9552" target="https://www.rfc-editor.org/info/rfc9552">
                <front>
                <title>
                Distribution of Link-State and Traffic Engineering Information Using BGP
                </title>
                <author initials="K" surname="Talaulikar" fullname="Ketan Talaulikar">
                <organization/>
                </author>  
                <date year="2024" month="January"/>
                <abstract>
    <t>
	In many environments, a component external to a network is called
   upon to perform computations based on the network topology and the
   current state of the connections within the network, including
   Traffic Engineering (TE) information.  This is information typically
   distributed by IGP routing protocols within the network.
    </t>
	<t>
   This document describes a mechanism by which link-state and TE
   information can be collected from networks and shared with external
   components using the BGP routing protocol.  This is achieved using a
   BGP Network Layer Reachability Information (NLRI) encoding format.
   The mechanism applies to physical and virtual (e.g., tunnel) IGP
   links.  The mechanism described is subject to policy control.
</t>
 <t>
   Applications of this technique include Application-Layer Traffic
   Optimization (ALTO) servers and Path Computation Elements (PCEs).
</t>
<t>
   This document obsoletes RFC 7752 by completely replacing that
   document.  It makes some small changes and clarifications to the
   previous specification.  This document also obsoletes RFC 9029 by
   incorporating the updates that it made to RFC 7752.
   </t>
                </abstract>
                </front>
                <seriesInfo name="RFC" value="9552"/>
                <seriesInfo name="DOI" value="10.17487/RFC9552"/>
            </reference>
        <?rfc include='reference.I-D.ietf-pce-multipath'?>
		<?rfc include='reference.I-D.jiang-idr-sr-policy-composite-path'?>
		</references>

    </back>
</rfc>