<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [ 
        <!ENTITY rfc8402 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8402.xml'> 
		<!ENTITY I-D.ietf-spring-segment-routing-policy PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-spring-segment-routing-policy.xml'>
		<!ENTITY I-D.ietf-idr-segment-routing-te-policy PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-segment-routing-te-policy.xml'>
        <!ENTITY I-D.mirsky-6man-unified-id-sr PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.mirsky-6man-unified-id-sr.xml'>
        <!ENTITY I-D.ietf-spring-srv6-network-programming PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-spring-srv6-network-programming.xml'>
        <!ENTITY I-D.ietf-lsr-isis-srv6-extensions PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lsr-isis-srv6-extensions.xml'>	
        <!ENTITY I-D.ietf-bess-srv6-services PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-bess-srv6-services.xml'>

		]>
		

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" ipr="trust200902" docName="draft-liu-idr-segment-routing-te-policy-complement-00">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<front>
	<title abbrev="BGP for Unified SID">BGP Extensions for Unified SID in TE Policy</title>
 
	<author fullname="Liu Yao" initials="Yao" surname="Liu">
      <organization>ZTE Corporation</organization>  
      <address>
        <postal>
          <street>No. 50 Software Ave, Yuhuatai Distinct</street>
          
          <city>Nanjing</city>
          
          <region></region>
  
          <code></code>

          <country>China</country>
        </postal>

        <email>liu.yao71@zte.com.cn</email>
      </address>
    </author>

	<author fullname="Peng Shaofu" initials="Shaofu" surname="Peng">
      <organization>ZTE Corporation</organization>  
      <address>
        <postal>
          <street>No. 50 Software Ave, Yuhuatai Distinct</street>
          
          <city>Nanjing</city>
          
          <region></region>
  
          <code></code>

          <country>China</country>
        </postal>

        <email>peng.shaofu@zte.com.cn</email>
      </address>
    </author>
	
    <date year="2020"/>

    <area>Routing</area>

    <workgroup>IDR Working Group</workgroup>
   <keyword>BGP</keyword>
   
   <keyword>SEGMENT ROUTING </keyword>
   <keyword>SR POLICY </keyword>
	
	<abstract>
	<t>
This document defines extensions to BGP in order to advertise Unified SIDs in SR-TE policies. 
	 </t>
	</abstract>
</front>
 <!-- ***** MIDDLE MATTER ***** -->
<middle>
  <section anchor="intro" title="Introduction">
	<t>
Segment Routing [RFC8402] leverages the source routing paradigm.  An ingress node steers a packet through an ordered list of instructions,called segments.
	</t>
	<t>
	<xref target="I-D.ietf-spring-segment-routing-policy"/> details the concepts of SR Policy and steering into an SR Policy.
	</t>
	<t>
	<xref target="I-D.ietf-idr-segment-routing-te-policy"/> specifies the way to use BGP to distribute one or more of the candidate paths of an SR Policy to the headend of that policy.
	</t>
	<t>
	With increasing requirements for a shortened identifier in a segment routing network with the IPv6 data plane, <xref target="I-D.mirsky-6man-unified-id-sr"/> proposed an extension of SRH that enables the use of a shorter segment identifier, such as 32-bits Label format SID or 32-bits IP address format SID.
	</t>
	<t>
	This document defines extensions to BGP in order to advertise Unified SIDs in SR-TE policies.
	</t>
	<t>
	Firstly, we focus on how to carry 32-bits IP address format U-SID, other type of U-SID will be considered in future version.
	</t>
	<t>
	</t>
	</section>
	
	<section title="SR policy with Unified SID">
<t>
As discussed in <xref target="I-D.ietf-spring-srv6-network-programming"/>, the node with the SRv6 capability will maintain its local SID table. A Local SID is generally composed of two parts, that is, LOC:FUNCT, or may carry arguments at the same time, that is, LOC:FUNCT:ARGS.
</t>
<t>
FUNCT indicates the local function of the packet on the node that generates the LOC.ARGS may contain information related to traffic and services, or any other information required for executing the function.LOC indicates locator. In most cases, other nodes in the network can forward packets to the node that generates this LOC according to the corresponding routing table entries.
</t>
<t>
The controller plane protocol can also use B:N to represent an LOC, where B is SRv6 SID Locator Block and N to represent node N. In other words, the structure of a complete SID is B:N:FUNCT:ARGS. 
</t>
<t>
<xref target="I-D.ietf-lsr-isis-srv6-extensions"/> defines the extension of ISIS to support SRv6, and each node can announce the SID assigned by itself. In particular, SRv6 SID Structure Sub-Sub-TLV is defined and the specific structure of the corresponding SID is provided, including the length of SRv6 SID Locator Block, the length of SRv6 SID Locator Node, the length of SRv6 SID Function, and the length of SRv6 SID Arguments. 
</t>
<t>
Similarly, <xref target="I-D.ietf-bess-srv6-services"/> also provide the SID structure information for L3VPN or EVPN service related SID.
</t>
<t>
Thus, it can be seen that the existing control plane protocol reveals a very intuitive method to reduce the size of SRH. That is , under the specific address planning(the SIDs allocated by all SRv6 nodes are in the same SRv6 SID Locator Block), SRH only needs to store the difference between SIDs (N:FUNCT:ARGS), and does not need to contain the SRv6 SID Locator Block information. In a 128-bit classic SRv6 SID, the highest part is SRv6 SID Locator Block, and the following 32 bits are composed of SRv6 SID Locator Node, SRv6 SID Function and SRv6 SID Arguments, and the rest bits are zeros.
</t>
<t>
As for how to obtain the SRv6 SID Locator Block information during packet forwarding, there are two cases:
</t>
<t>
1)For the head-end node, when the node sends a packet along the segment list to the first segment, it already knows the 128-bit classical SID before truncaturing. The head node copies it directly to the DA of IPv6 Header, but the SRH carries the 32-bit truncatured SIDs.
</t>
<t>
2)For the transit node, it can obtain the SRv6 SID Locator Block information from the DA of the received IPv6 packet.
</t>
<t>
</t>
<t>
</t>

		<section title="BGP Extensions">
		<t>
		This document defines a new one-bit flag field in the segment-list sub-TLV <xref target="I-D.ietf-idr-segment-routing-te-policy"/> RESERVED field, where,
		</t>
		<t>
		T: Truncatured-Flag, when set, it indicates the presence of 32-bits IP address format U-SID(s) in the SR path
		</t>
		<t>
		</t>


<t>
		<figure align="left" title="Figure 1: T-Flag in Segment List sub-TLV">
          <artwork><![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            |T|   RESERVED  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   //                           sub-TLVs                          //
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
</t>
<t>
In this document, the Flags field of each segment sub-TLV(type B/I/J/K) <xref target="I-D.ietf-idr-segment-routing-te-policy"/> is extended to indicate the block length (BL) and non-block length (NBL) of a 128-bit SID.
</t>
<t>
Figure 2 uses the type B segment sub-TLV as an example to illustrate the extended LT field. Other types of segment sub-TLV are similar.
</t>
<t>
		<figure align="left" title="Figure 2: Length Type Field in Segment sub-TLV">
          <artwork><![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      | LT  | Flags     |   RESERVED  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   //                       SRv6 SID (16 octets)                  //
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
</t>
<t>
LT: Length Type, 3-bit field with the following values:
</t>
<t>
000 unknown
</t>
<t>
001 BL=96bits, NBL=32bits,
</t>
<t>
010 BL=64bits, NBL=32bits,
</t>
<t>
011 BL=32bits, NBL=32bits,
</t>
<t>
Other values are reserved for future use.
</t>
<t>
It should be noted that NBL represents the length of the Node:Func that is immediately followed the block.
</t>
</section>


		<section title="Head-end Processing">
<t>
Take the length of the short SID as 32 bits as an example. 
</t>
<t>
On the head-end node, if the SR-TE tunnel has enabled the SRv6 SID compression, and the compression mode is to use 32-bits IPv4 address U-SID , then it analyzes whether these SIDs are in the same block and whether the length of Node:Func does not exceed 32 bits based on the NBL length corresponding to each SID contained in the segment List received from the controller. 
</t>
<t>
If the above conditions are met, the head-end node uses a 32-bit short SID optimization SID List for SRH encapsulation.
</t>
<t>
Note that it can also be the responsibility of the controller to check if there could use IPv4 address U-SID for the entire SID list, especially for the inter-domain case. In this case the headend can simply follow the decision of the controller.
</t>	
		</section>
		</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"/>.</t>
	   </section>
		<section title="IANA Considerations">
		<t>TBD</t>
		</section>
  </middle>		
  <!--  *****BACK MATTER ***** -->
  <back>
    <references title='Normative References'>
&rfc8402;
&I-D.ietf-spring-segment-routing-policy;
&I-D.ietf-idr-segment-routing-te-policy;
&I-D.mirsky-6man-unified-id-sr;
&I-D.ietf-spring-srv6-network-programming;
&I-D.ietf-lsr-isis-srv6-extensions;
	</references>
   <references title="Informative References">
&I-D.ietf-bess-srv6-services;
   </references>
 </back>
 </rfc>
