<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<rfc ipr="trust200902" docName="draft-li-idr-sr-policy-composite-path-04" category="std">
    <?rfc toc="yes"?>
    <?rfc sortrefs="yes"?>
    <front>
        <title abbrev="BGP SR Policy Composite Candidate Path">
            BGP Extensions of SR Policy for Composite Candidate Path
        </title>

        <author initials="H." surname="Li" fullname="Hao Li">
            <organization>New H3C Technologies</organization>
            <address>
                <email>lihao@h3c.com</email>
            </address>
        </author>

        <author initials="M." surname="Chen" fullname="Mengxiao Chen">
            <organization>New H3C Technologies</organization>
            <address>
                <email>chen.mengxiao@h3c.com</email>
            </address>
        </author>

        <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="Jiang" fullname="Wenying Jiang">
            <organization>China Mobile</organization>
            <address>
                <email>jiangwenying@chinamobile.com</email>
            </address>
        </author>
        
        <author initials="W." surname="Cheng" fullname="Weiqiang Cheng">
            <organization>China Mobile</organization>
            <address>
                <email>chengweiqiang@chinamobile.com</email>
            </address>
        </author>

        <date month="March" day="1" year="2023" />

        <area>General</area>
        <workgroup>Network Working Group</workgroup>
        <keyword>Segment Routing</keyword>
        <keyword>SR Policy</keyword>
        <keyword>BGP</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. A candidate path is either dynamic, explicit or composite. This document defines extensions to BGP to distribute SR policies carrying composite candidate path information.  So that composite candidate paths can be installed when the SR policy is applied.</t>
        </abstract>
    </front>

    <middle>
        <section title="Introduction" toc="include">
            <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>. In order to distribute SR policies to the headend, <xref target="I-D.ietf-idr-segment-routing-te-policy"></xref> specifies a mechanism by using BGP.</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.draft-jiang-spring-parent-sr-policy-use-cases"></xref> describes some use cases for SR policy group composite candidate path.</t>
            <t>This document defines extensions to Border Gateway Protocol (BGP) to distribute SR policies carrying composite candidate path information. So that composite candidate paths can be installed when the SR policy is applied.</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="Constituent SR Policy Attributes in SR Policy" toc="default">
            <figure>
                <preamble>As defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"></xref>, the SR policy encoding structure is as follows:</preamble>
                <artwork>
SR Policy SAFI NLRI: &lt;Distinguisher, Policy-Color, Endpoint>
    Attributes:
        Tunnel Encaps Attribute (23)
            Tunnel Type: SR Policy
                Binding SID
                SRv6 Binding SID
                Preference
                Priority
                Policy Name
                Policy Candidate Path Name
                Explicit NULL Label Policy (ENLP)
                Segment List
                    Weight
                    Segment
                    Segment
                    ...
                ...
                </artwork>
            </figure>
            <t>As described in section 2.2 in <xref target="RFC9256"></xref>, 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. Therefore a constituent SR Policy is referenced only by color in the composite candidate path since its headend and endpoint are identical to the parent SR policy.</t>
            <figure>
                <preamble>SR policy with composite candidate path information is expressed as below:</preamble>
                <artwork>
SR Policy SAFI NLRI: &lt;Distinguisher, Policy-Color, Endpoint>
    Attributes:
        Tunnel Encaps Attribute (23)
            Tunnel Type: SR Policy
                Binding SID
                SRv6 Binding SID
                Preference
                Priority
                Policy Name
                Policy Candidate Path Name
                Explicit NULL Label Policy (ENLP)
                Segment List
                    Weight
                    Segment
                    Segment
                    ...
                Constituent SR Policy
                    Weight
                ...
                </artwork>
            </figure>

            <section title="Constituent SR Policy Sub-TLV" toc="default">
                <t>The Constituent SR Policy sub-TLV encodes a single composite path towards the endpoint. The Constituent SR Policy sub-TLV is an optional sub-TLV of BGP Tunnel Encapsulation Attribute, and MAY appear multiple times in the SR Policy encoding. The ordering of Constituent SR Policy sub-TLVs does not matter. The Constituent SR Policy sub-TLV MAY contain a Weight sub-TLV.</t>
                <t>Since a candidate path is either dynamic, explicit or composite, the Constituent SR Policy sub-TLV and the Segment List sub-TLV SHOULD NOT appear in the same candidate path.</t>
                <figure>
                    <preamble>The Constituent SR Policy sub-TLV has the following format:</preamble>
                    <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                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            sub-TLVs                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                    </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: 2 octet of reserved bits. SHOULD be set to zero on transmission and MUST be ignored on receipt.</t>
                        <t>Color: 4-octet value identifying the constituent SR policy.</t>
                        <t>sub-TLVs currently defined:
                            <list style="symbols">
                                <t>An optional single Weight sub-TLV which is defined in section 2.4.4.1 in <xref target="I-D.ietf-idr-segment-routing-te-policy"></xref>. According to <xref target="RFC9256"></xref>, the fraction of flows steered into each constituent SR Policy is equal to the relative weight of each constituent SR Policy.</t>
                            </list>
                        </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="I-D.ietf-idr-segment-routing-te-policy"></xref>. The existing operations defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"></xref> can apply to this document directly.</t>
            <t>Typically but not limit to, the SR policies carrying composite candidate path information are configured by a controller.</t>
            <t>After configuration, the SR policies carrying path composite candidate path information will be advertised by BGP update messages.  The operation of advertisement is the same as defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"></xref>, as well as the receiption.</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.ietf-idr-segment-routing-te-policy"></xref>.</t>
        </section>

        <section title="IANA Considerations">
            <t>This document defines a new Sub-TLV in registries "SR Policy List Sub-TLVs" <xref target="I-D.ietf-idr-segment-routing-te-policy"></xref>:</t>
            <texttable align="left" style="full">
                <ttcol>Value</ttcol>
                <ttcol>Description</ttcol>
                <ttcol>Reference</ttcol>
                <c>TBA</c>
                <c>Constituent SR Policy Sub-TLV</c>
                <c>This document</c>
            </texttable>
        </section>
    </middle>

    <back>
        <references title="Normative References">
            <reference anchor="I-D.ietf-idr-segment-routing-te-policy">
                <front>
                <title>Advertising Segment Routing Policies in BGP</title>
                <author initials="S" surname="Previdi" fullname="Stefano Previdi">
                <organization/>
                </author>
                <author initials="C" surname="Filsfils" fullname="Clarence Filsfils">
                <organization/>
                </author>
                <author initials="K" surname="Talaulikar" fullname="Ketan Talaulikar">
                <organization/>
                </author>
                <author initials="P" surname="Mattes" fullname="Paul Mattes">
                <organization/>
                </author>
                <author initials="E" surname="Rosen" fullname="Eric Rosen">
                <organization/>
                </author>
                <author initials="D" surname="Jain" fullname="Dhanendra Jain">
                <organization/>
                </author>
                <author initials="S" surname="Lin" fullname="Steven Lin">
                <organization/>
                </author>
                <date month="July" day="27" year="2022"/>
                <abstract>
                <t>
                This document defines a new BGP SAFI with a new NLRI in order to advertise a candidate path of a Segment Routing (SR) Policy. An SR Policy is a set of candidate paths, each consisting of one or more segment lists. The headend of an SR Policy may learn multiple candidate paths for an SR Policy. Candidate paths may be learned via a number of different mechanisms, e.g., CLI, NetConf, PCEP, or BGP. This document specifies the way in which BGP may be used to distribute SR Policy candidate paths. New sub-TLVs for the Tunnel Encapsulation Attribute are defined for signaling information about these candidate paths.
                </t>
                </abstract>
                </front>
                <seriesInfo name="Internet-Draft" value="draft-ietf-idr-segment-routing-te-policy-20"/>
                <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-idr-segment-routing-te-policy-20.txt"/>
            </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>
        </references>
        <references title="Informative References">
            <reference anchor="RFC9256" target="https://www.rfc-editor.org/info/rfc9256">
                <front>
                <title>Segment Routing Policy Architecture</title>
                <author initials="C" surname="Filsfils" fullname="Clarence Filsfils">
                <organization/>
                </author>
                <author initials="K" surname="Talaulikar" fullname="Ketan Talaulikar">
                <organization/>
                </author>
                <author initials="D" surname="Voyer" fullname="Daniel Voyer">
                <organization/>
                </author>
                <author initials="A" surname="Bogdanov" fullname="Alex Bogdanov">
                <organization/>
                </author>
                <author initials="P" surname="Mattes" fullname="Paul Mattes">
                <organization/>
                </author>
                <date month="July" year="2022"/>
                <abstract>
                <t>
                Segment Routing (SR) allows a headend node to steer a packet flow along any path. Intermediate per-flow states are eliminated thanks to source routing. The headend node steers a flow into an SR Policy. The header of a packet steered in an SR Policy is augmented with an ordered list of segments associated with that SR Policy. This document details the concepts of SR Policy and steering into an SR Policy.
                </t>
				<t>
				This document updates RFC 8402 as it details the concepts of SR Policy and steering into an SR Policy.
				</t>
                </abstract>
                </front>
                <seriesInfo name="RFC" value="9256"/>
                <seriesInfo name="DOI" value="10.17487/RFC9256"/>
            </reference>
            <reference anchor="I-D.draft-jiang-spring-parent-sr-policy-use-cases">
                <front>
                <title>Use Cases for Parent SR Policy</title>
                <author initials="W" surname="Jiang" fullname="Wenying Jiang">
                <organization/>
                </author>
                <author initials="W" surname="Cheng" fullname="Weiqiang Cheng">
                <organization/>
                </author>
                <author initials="C" surname="Lin" fullname="Changwang Lin">
                <organization/>
                </author>
                <author initials="Y" surname="Qiu" fullname="Yuanxiang Qiu">
                <organization/>
                </author>
                <date month="January" day="4" year="2023"/>
                <abstract>
                <t>
                Segment Routing (SR) allows a headend node to steer a packet flow along any path. Intermediate per-flow states are eliminated thanks to source routing. The headend node steers a flow into an SR Policy. The header of a packet steered in an SR Policy is augmented with an ordered list of segments associated with that SR Policy. This document details the concepts of SR Policy and steering into an SR Policy.
                </t>
                </abstract>
                </front>
                <seriesInfo name="Internet-Draft" value="draft-jiang-spring-parent-sr-policy-use-cases-01"/>
                <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-jiang-spring-parent-sr-policy-use-cases-01.txt"/>
            </reference>
        </references>

    </back>
</rfc>