<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<rfc
      xmlns:xi="http://www.w3.org/2001/XInclude"
      category="std"
      docName="draft-lp-idr-sr-path-protection-03"
      ipr="trust200902"
      obsoletes=""
      updates=""
      submissionType="IETF"
      xml:lang="en"
      tocInclude="true"
      tocDepth="4"
      symRefs="true"
      sortRefs="true"
      version="3">

 <!-- ***** FRONT MATTER ***** -->

 <front>


   <title abbrev="BGP Extensions for Segment List">BGP Extensions of SR Policy for Segment List Identification and Protection</title>
    <seriesInfo name="Internet-Draft" value="draft-lp-idr-sr-path-protection-03"/>


   <author fullname="Yao Liu" surname="Liu">
      <organization>ZTE</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <phone></phone>
        <email>liu.yao71@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
   <author fullname="Shaofu Peng" surname="Peng">
      <organization>ZTE</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <phone></phone>
        <email>peng.shaofu@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>	
	
    <date year="2022"/>

   <!-- Meta-data Declarations -->

   <area>Routing</area>
    <workgroup>IDR WG</workgroup>
    <!-- WG name at the upperleft corner of the doc,
        IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>SR Policy</keyword>
    <keyword>Path Protection</keyword>
    <keyword>Segment List</keyword>
    <!-- Keywords will be incorporated into HTML output
        files in a meta tag but they have no effect on text or nroff
        output. If you submit your draft to the RFC Editor, the
        keywords will be used for the search engine. -->

   <abstract>
	<t>
This document proposes extensions of BGP to provide identification and protection information of segment lists within a candidate path when delivering SR policy.
And it also extends BGP-LS to provide some extra information of the segment list in the advertisement.
	 </t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
	  
	    <t>Segment Routing <xref target="RFC8402"></xref> allows a headend node to steer a packet flow along any path. <xref target="I-D.ietf-spring-segment-routing-policy"></xref> details the concept of SR Policy and steering into an 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. </t>
  <t>Candidate path can be used for path protection, that is, the lower preference candidate path may be designated as the backup for a specific or all (active) candidate path(s). Backup candidate path provide protection only when all the segment lists in the active CP are invalid.</t>
  <t>If a candidate path is associated with a set of Segment-Lists, each Segment-List is associated with weight for weighted load balancing. </t>
  <t>The protection mechanism for SR Policy is not flexible enough. For example, there're three segment lists(SL1, SL2, SL3) in candidate path 1, it may be desired that SL1 and SL2 are the primary path, SL3 are the backup path for SL1 and will be active only when SL1 fails. </t>
  
  <t><xref target="I-D.ietf-pce-multipath"></xref> proposes extensions to PCEP to specify the protection relationship between segment lists in the candidate path.</t>

  <t><xref target="I-D.ietf-idr-segment-routing-te-policy"></xref> specifies BGP extensions for the advertisement of SR Policies and each candidate path is carried in an NLRI. This document proposes extensions of BGP in order to provide identification and protection information of segment lists when delivering SR policy. </t>
  <t><xref target="I-D.ietf-idr-te-lsp-distribution"></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 document also extends it to provide some extra information of the segment list in a candidate path in the BGP-LS advertisement.</t>
	  
      <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
       "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
       document are to be interpreted as described in <xref target="RFC2119" format="default"></xref>.</t>
      </section>
    </section>
	
      <section numbered="true" toc="default">
        <name>BGP Extensions for Advertising Segment List</name>
		<section numbered="true" toc="default">
			<name>Extensions of Segment List sub-TLV</name>
		<t>Segment List sub-TLV is introduced in <xref target="I-D.ietf-idr-segment-routing-te-policy"></xref> and it includes the elements of the paths (i.e., segments).</t>
		<t>This document introduces a one-bit flag in the RESERVED field.</t>
		
		<figure anchor="flag">
		<name>Segment List sub-TLV</name>
        <artwork align="center" name=""><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |             Length            |B|  RESERVED   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   //                           sub-TLVs                          //
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	  
           ]]></artwork>
      </figure>
		<t>B-Flag(Backup Flag): one bit. When set to 0, it indicates that the segment list acts as the active member in the candidate path. When set to 1, it indicates that the segment list acts as the backup path in the candidate path.</t>
		<t>Using segment lists for path protection can be compatible with using candidate paths. When a path fails, the backup segment list within the same candidate path is used preferentially for path protection. If the backup list is also invalid, then other candidate path can be enabled for protection.</t>

		</section>		
		
		<section numbered="true" toc="default">
			<name>List Identifier Sub-TLV</name>	
		<t>This document introduces a new sub-sub-tlv of Segment List sub-TLV, where, </t>
		<figure>
		<name>List Identifier Sub-TLV</name>
        <artwork align="center" name=""><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |           RESERVED            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      List Identifier                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~                      Optional sub-TLVs                        ~
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	  
           ]]></artwork>
      </figure>
		<ul spacing="normal">
        <li>Type: 1 octet. TBD.</li>
        <li>Length: 1 octet, specifies the length of the value field not including Type and Length fields.</li>
        <li>RESERVED: 2 octet of reserved bits. SHOULD be unset on transmission and MUST be ignored on receipt. </li>
		<li>List Identifier: 4 octets. It is the identifier of the corresponding segment list, so that the segment list can be operated according to the specified Segment List identifier.</li>
		<li>This sub-TLV is optional and it MUST NOT appear more than once inside the Segment List sub-TLV.</li>
		</ul>				


		<section numbered="true" toc="default">
			<name>List Protection Sub-TLV</name>	
		<t>The List Protection Info sub-TLV is an optional sub-TLV of List Identifier sub-TLV, where:</t>
		<figure>
		<name>List Protection Info Sub-TLV</name>
        <artwork align="center" name=""><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |           RESERVED            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Backup  List ID 1                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          ...                                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   
   |                    Backup  List ID N                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
	  
           ]]></artwork>
      </figure>
		<ul spacing="normal">
        <li>Type: 1 octet. TBD.</li>
		<li>Length: 1 octet, specifies the length of the value field not including Type and Length fields.</li>
		<li>RESERVED: 2 octet of reserved bits. SHOULD be unset on transmission and MUST be ignored on receipt.</li>
		<li>Backup List ID: 4 octets. It is the List Identifier of the backup segment list that protects this segment list. If there're multiple backup paths, the list ID of each path should be included in the TLV.</li>
		</ul>
		<t>As defined in <xref target="I-D.ietf-idr-segment-routing-te-policy"></xref>, the SR Policy encoding structure is as follows:</t>
        <artwork align="left"><![CDATA[
      SR Policy SAFI NLRI: <Distinguisher, Policy-Color, Endpoint>
      Attributes:
         Tunnel Encaps Attribute (23)
            Tunnel Type: SR Policy
                Binding SID
                Preference
                Priority
                Policy Name
                Explicit NULL Label Policy (ENLP)
                Segment List
                    Weight
                    Segment
                    Segment
                    ...
                Segment List
                    ...
                ...
	  
           ]]></artwork>

		<t>The new SR Policy encoding structure with List Identifier sub-TLV is shown as below:</t>
        <artwork align="left"><![CDATA[
	SR Policy SAFI NLRI: <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
                 List Identifier
                   List Protection Info
                 Weight
                 Segment
                 Segment
                 ...
             Segment List
                 ...
             ...
	  
           ]]></artwork>	
		

	  
		</section>		
		</section>
		
</section>	  
	
    
	
<section numbered="true" toc="default">
<name>BGP-LS Extensions for Distributing Segment List States</name>
	<t><xref target="I-D.ietf-idr-te-lsp-distribution"></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. The SR Policy information includes status of the candidate path, e.g, whether the candidate path is administrative shut or not.</t>
	<t>SR Segment List TLV is defined in <xref target="I-D.ietf-idr-te-lsp-distribution"></xref> to to report the SID-List(s) of a candidate path. Figure 4 shows the flags in SR Segment List TLV.</t>
		<figure>
		<name>Flag Field of SR Segment List TLV</name>
			<artwork align="center" ><![CDATA[
       0                   1
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |D|E|C|V|R|F|A|T|M|S|B|         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           ]]></artwork>		   
		</figure>
	<t>The D,E,C,V,R,F,A,M flags are defined in <xref target="I-D.ietf-idr-te-lsp-distribution"></xref>.</t>
	<t>This document introduces two new flags, where,</t>
	<ul spacing="normal">
        <li>S-Flag : Indicates the segment list is in administrative shut state when set.</li>
		<li>B-Flag : Indicates the segment list is the backup path within the candidate path when set, otherwise it is the active path.</li>
     </ul>

	
</section>	

	
<section numbered="true" toc="default">
	<name>IANA Considerations</name>

	<section numbered="true" toc="default">
	<name>New Registry: Flag Field of Segment List sub-TLV</name>	
	<t>This document introduces a one-bit flag field in the Segment List sub-TLV <xref target="I-D.ietf-idr-segment-routing-te-policy"></xref> for the Backup Flag (B-Flag).</t>
   
	</section>

	
	<section numbered="true" toc="default">
	<name>Existing Registry: BGP Tunnel Encapsulation Attribute sub-TLVs</name>

	<t>This document defines a new sub-TLV in the registry "SR Policy List Sub-TLVs" <xref target="I-D.ietf-idr-segment-routing-te-policy"></xref> to be assigned by IANA:</t>
	
        <artwork align="left"><![CDATA[
        Codepoint   Description                           Reference
        -------------------------------------------------------------
        TBD         List Identifier Sub-TLV               This document
           ]]></artwork>


		


	</section>	
	
	<section numbered="true" toc="default">
	<name>New Registry: List Identifier Sub-TLVs</name>	
	<t>This document requests the creation of a new registry called "List Identifier Sub-TLVs" under the "BGP Tunnel Encapsulation" registry. Following initial Sub-TLV codepoint are assigned by this document.</t>
        <artwork align="left"><![CDATA[
        Codepoint   Description                           Reference
        -------------------------------------------------------------
        TBD         List Protection Sub-TLV               This document
           ]]></artwork>	

   
	</section>
	
	<section numbered="true" toc="default">
	<name>Existing Registry: Flag Field of SR Segment List TLV</name>
	<t>This document requests bit 9 and bit 10 in the flag field of  "SR Segment List TLV" <xref target="I-D.ietf-idr-te-lsp-distribution"></xref> under the "BGP-LS Node Descriptor, Link Descriptor, Prefix Descriptor, and Attribute TLVs" registry.</t>

        <artwork align="left"><![CDATA[
       Bit     Description                                Reference
      ------------------------------------------------------------------
        9     Administrative Shut State Flag(S-Flag)      This document
       10     Backup Path State Flag(B-Flag)              This document
           ]]></artwork>


	</section>	   
	
</section>

	

<section numbered="true" toc="default">
	<name>Security Considerations</name>
		<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> and <xref target="I-D.ietf-idr-te-lsp-distribution"></xref>.</t>
</section>	
	
	
  </middle>
  <!--  *****BACK MATTER ***** -->

 <back>

   <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
		<?rfc include="reference.RFC.2119.xml"?>		
		<?rfc include="reference.I-D.ietf-spring-segment-routing-policy.xml"?>
		<?rfc include="reference.I-D.ietf-idr-segment-routing-te-policy.xml"?>
		<?rfc include="reference.I-D.ietf-idr-te-lsp-distribution.xml"?>
      </references>
      <references>
        <name>Informative References</name>
		<?rfc include="reference.RFC.8402.xml"?>
		<?rfc include="reference.I-D.ietf-pce-multipath.xml"?>
      </references>
    </references>


 </back>
</rfc>
