<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="2"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-decraene-spring-srv6-vlsid-07" ipr="trust200902">
	<front>
		<title abbrev="vSID: SRv6 variable length SID">SRv6 vSID: Network Programming extension for variable length SIDs</title>

		<author fullname="Bruno Decraene" initials="B." surname="Decraene">
			<organization>Orange</organization>

			<address>
				<email>bruno.decraene@orange.com</email>
			</address>
		</author>

		<author fullname='Robert Raszuk' initials='R' surname='Raszuk'>
			<organization>NTT Network Innovations</organization>
			<address>
				<postal>
					<street>940 Stewart Dr</street>
					<city>Sunnyvale</city>
					<region>CA</region>
					<code>94085</code>
					<country>USA</country>
				</postal>
				<email>robert@raszuk.net</email>
			</address>
		</author>


		<author fullname="Zhenbin Li" initials="Z." surname="Li">
			<organization>Huawei Technologies</organization>

			<address>
				<email>lizhenbin@huawei.com</email>
			</address>
		</author>


		<author fullname="Cheng Li" initials="C." surname="Li">
			<organization>Huawei Technologies</organization>

			<address>
				<email>chengli13@huawei.com</email>
			</address>
		</author>



		<date year="2022" />

		<abstract>
			<t>This document proposes an extension to Segment Routing IPv6 (SRv6) Network Programming to allow for SRv6 Segment Identifier (SID) of smaller variable length. The use of smaller SRv6 SID reduces the size the SRv6 Header (SRH). This reduces the overhead for both the traffic volume and the network processor. It is a straightforward extension to the SRv6 Network Programming
   model and its SRH encapsulation.</t>
		</abstract>


	</front>

	<middle>
		<section anchor="Introduction" title="Introduction">

			<t>The Segment Routing (SR) architecture is defined <xref target="RFC8402">RFC 8402</xref>.
			</t>
			<t>IPv6 Segment Routing Header (SRH) is defined <xref target="RFC8754">RFC 8754</xref>.
			</t>
			<t>SRv6 Network Programming is defined <xref target="RFC8986">RFC 8986</xref>.
			</t>
			<t>The reader is expected to be familiar with the three above documents which define Segment Routing over the IPv6 data-plane (SRv6).</t>
			<t>SRv6 is flexible and powerful, but in some uses cases, when a large number of SIDs are required, the size of the SRH/SID may be seen as too large both for some dataplane processors and traffic overhead.</t>
			<t>The goal of this document is to propose a solution which reduces the size of the SRv6 header when a high number of SIDs is required with minimal changes to the SRv6 architecture, signaling, SRH and data plane processing.</t>
			<t>This document extends SRH and SRv6 Network Programming to allow for SIDs of variable length, from 1 up to 128 bits. In a way, this is a generalization of SRv6 for any (v)SID length, where 128-bits SIDs is a special case.</t>

			<section anchor="Language" title="Requirements Language">
				<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">RFC 2119</xref>
					<xref target="RFC8174">RFC 8174</xref> when, and only when, they appear in all capitals, as shown here.</t>
			</section>

		</section>


		<section anchor="Overview" title="Overview">

			<t>In a nutshell, SRv6 variable length SIDs (SRv6 vSIDs) proposes to:<list style="symbols">
				<t>define one SRv6 SIDs prefix dedicated to SRv6 vSIDs and called SRv6 vSIDs prefix;</t>
				<t>define the vSID as the SRv6 SID minus the vSIDs prefix: SRv6 SID:= SRv6 vSIDs prefix + SRv6 vSID;</t>
				<t>encode, in the Segment List of the SRH, only the vSIDs.</t>
			</list>
			<vspace blankLines="1"/>
		</t>

		<t>In other words, 128-bits SRv6 SIDs are kept unchanged for signaling, configuration and SR policies. In the data plane, this proposal compresses the encoding of SRv6 SIDs in the SRH by not encoding the SRv6 vSIDs prefixes which are redundant across vSIDs.</t>
		<t>The use of the destination address in the IPv6 header is unchanged. The IPv6 destination address still contains the current/next 128-bits SRv6 SID. As a consequence, the IPv6 destination address already indicates the SRv6 vSID prefix and there is no extend the SRH to carry it.</t>

		<t>In a way, this is similar to SR-MPLS <xref target="RFC8660">RFC 8660</xref>:			<list style="symbols">
				<t>For SR-MPLS: SR-MPLS Label:=      SRGB        + Index</t>
				<t>For SRv6 vSID:  SRv6 SID := SRv6 vSID prefix + SRv6 vSID</t>
			</list>
			<vspace blankLines="1"/>
		</t>

		<t>One difference compared to SR-MPLS is that lowest bits of the SRv6 vSID prefix are zero which allows for an easier operation in the data plane. Indeed,the addition of the vSID may be replaced by a copy of the vSID bits. Another difference is that the motivation to offset to a zero base index/vSID is different.</t>

		<t>Except for the Segment List using (shorter) vSIDs, the format of the SRH is unchanged. The length of the vSIDs is defined to be 128 bits minus the length of the vSIDs prefix. It is variable but its length does not need to be encoded in the SRH header. Indeed the vSIDs length only needs to be known by the SR Segment Endpoint Node processing it. As per section 4.3 of <xref target="RFC8754">RFC 8754</xref>, the SR node identifies its local SID by performing a longest-prefix-match lookup on the packet IPv6 destination address. This identifies the SID and its properties, such as the SR endpoint behavior but also the length of the vSIDs.</t>

	</section>

	<section anchor="SRv6_vSID" title="SRv6 Variable Length SIDs">



		<t>An SRv6 vSID deployment choose one length 'L' of vSIDs and an associated SRv6 vSIDs prefix.</t>

		<figure anchor="vSID_Figure" title='SRv6 SID:= SRv6 vSIDs prefix + SRv6 vSID'>
			<artwork>
  0 (bits)                                vSIDs                128
                                         Length 

  +--------------------------------------------------------------+
  |                      SRv6 SID                                | 
  +--------------------------------------------------------------+

  +--------------------------------------------------------------+
  |       SRv6 vSIDs prefix                 |      vSID          | 
  +--------------------------------------------------------------+
			</artwork>
		</figure>

		<t>An SRv6 vSID deployment may use multiple SRv6 vSIDs prefixes. Each prefix may have its own vSIDs length.</t>

		<t>As per section 3.1 of <xref target="RFC8986">RFC 8986</xref>, an SRv6 SID can be represented as 'B:N:FUNCT:ARG'. Where 'B' is the SRv6 SID prefix, N is the identifier of the parent node N, FUNCT is the function of the SID of length 128-S.</t>

		<t>For SRv6 vSIDs, the SRv6 prefix is 'B' of length LB as advertised in the SRv6 SID Structure Sub-Sub-TLV defined in <xref target="I-D.ietf-lsr-isis-srv6-extensions"></xref>. The vSID length for vSIDs of this block is computed as 128 - LB. The vSID includes 'N:FUNCT:ARG'.</t>

		<t>In order to simplify implementations, the length of the vSIDs MUST be a multiple of 8-bits, up to 128 bits included, in order to provide octet alignment in the SRH Segment List. However this specifications is written to work for any bit granularity from 1 to 128 bits. This allows for a future document to define a new profile with a higher granularity (e.g. 1 bit, 4 bits, 16 bits, or an integer fraction 128-bits) depending on hardware capabilities and flexibility requirements. To allow some implementations to be further simplified, a specific profile 'Profile-32' is created restricting the vSID length to be 32-bits.</t>

		<section anchor="SRH_vSID" title="Encoding vSIDs in the SRH">

			<t>As per section 2 of <xref target="RFC8754">RFC 8754</xref>, the Segment Routing Header (SRH) is defined as follows:
				<figure anchor="SRH_Figure" title='SRH with 128-bits SRv6 SID'>
					<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    
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Last Entry   |     Flags     |              Tag              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |            Segment List[0] (128 bits IPv6 address)            |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                                                               |
                               ...
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |            Segment List[n] (128 bits IPv6 address)            |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 //                                                             //
 //         Optional Type Length Value objects (variable)       //
 //                                                             //
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
					</artwork>
				</figure>
			</t>


			<t>When vSIDs are used, there are encoded in the Segment List of the Segment Routing Header (SRH).</t>
			<t>vSIDs are encoded back to back using their native length. There is no padding between SIDs and there is no specific alignment of the SID.</t>
			<t>In a SRH, all vSIDs MUST have the same vSIDs length 'L' and the same SRv6 vSIDs prefix.</t>
			<t>If the Segment List[n] does not end on a octet boundary, then padding bits MUST be added up to the next octet boundary. Those padding bits MUST be set to 0 when sent and ignored on receipt.</t>
			<t>TLVs starts on next octet boundary.</t>
			<t>As defined in <xref target="RFC8754">RFC 8754</xref>, padding TLVs are used to pad the SRH to a multiple of 8 octets. As vSIDs may be of any size, not necessarily a multiple of 8 octets, the support of padding TLVs are REQUIRED.</t>

			<t>The fields 'Segments Left' and 'Last Entry" keep their meaning but refers to vSIDs of length L.</t>

			<t>The following diagram illustrates an example of SRH with vSIDs of sixteen bits:
				<figure anchor="SRH_vSID_Figure" title='SRH with SRv6 vSIDs with 16-bits vSIDs'>
					<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    
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | Next Header   |  Hdr Ext Len  | Routing Type  | Segments Left |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Last Entry   |     Flags     |              Tag              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |    Segment List[0]            |    Segment List[1]            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |           .....                            .....              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |    Segment List[n]            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 //                                                             //
 //         Optional Type Length Value objects (variable)       //
 //                                                             //
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
					</artwork>
				</figure>
			</t>


		</section>


		<section anchor="SRv6_NP" title="SRv6 vSIDs Network Programming">
			<t>This section defines a flavor for Endpoint behaviors. It defined below using the "End" Endpoint behavior but is applicable to all SID behaviors.</t>
			<t>The processing takes as an argument the length L of the vSIDs. This length L is a property of the vSID and is given as a result of the lookup on the IPv6 destination address which identifies the SRv6 SID and its properties. The properties include the Endpoint behavior and the length L of the vSIDs.</t>

			<t>When N receives a packet whose IPv6 DA is S and S is a local vSID of length L, the lines S08 and S14 of the End processing which were, as per section 4.1 of <xref target="RFC8986">RFC 8986</xref>:
			</t>

			<t>   S08.   max_LE = (Hdr Ext Len / 2) - 1</t>

			<t> [...] </t>

			<t>   S14.   Update IPv6 DA with Segment List[Segments Left]</t>

			<t>are replaced by the following:</t>

			<t>   S08.   max_LE = (Hdr Ext Len * 64 / L) - 1</t>

			<t> [...] </t>

			<t>   S14.   Copy Segment List[Segments Left] from the SRH to the L lowest order bits of the destination address of the IPv6 header.</t>

			<t>Note: S14. Taking into consideration that the Segment List is a list of vSIDs of length L bits</t>

		</section>

	</section>

	<section anchor="Benefits" title="Benefits">
		<t>SRv6 vSID is believed to have the following benefits:<list style="symbols">
			<t>Aligned with SRv6: SR architecture, SRv6 Network Programming.</t>
			<t>Reduced SID hence reduced header length.</t>
			<t>Flexible SID length, to accommodate for various deployment models, network sizes, SRv6 usages.<list style="symbols">
				<t>A typical vSIDs length could be 32 bits. Compared to SR-MPLS (which has a 20 bits SID) it is larger and more scalable. Compared to SRv6 (which has a 128 bits SID) it's four times more compact.</t>
				<t>Other SID length are possible: 16 bits would be 8 times more compact than SRv6 SID and 2 times more compact the SR-MPLS shim header and large enough for most deployments; 8 bits would be 16 (respectively 4) more compact than SRv6 SID (respectively SR-MPLS shim header) and could fit some specific deployments (e.g. local adjacency SID only).</t>
			</list>
			<vspace blankLines="0"/>
		</t>
		<t>Using SRv6 header (SRH) with no additional fields.</t>
		<t>No requirement for additional IPv6 addressing space: a /64 per router is more than enough. A /96 per router is the typical requirement.</t>
	</list>
	<vspace blankLines="0"/>
</t>


</section>

<section anchor="Illustrations" title="Illustrations">


<t>This section illustrates the usage of SRv6 vSIDs through two examples. The first example uses global segments with a vSIDs locator been globally routable. The second example uses local segments only with a vSIDs locator commom to all SR end nodes hence not been able to locate a specific SR end node. Global and local segments are defined as per <xref target="RFC8402">RFC 8402</xref> section 2.</t>


<section anchor="Global" title="Global vSIDs">

	<t>In this example vSIDs are used for global SIDs and are used alone without 128-bits SRv6 SIDs.</t>
	<t>The SR domain has the following characteristics:<list style="symbols">
		<t>1 000 SR endpoints nodes;</t>
		<t>network diameter is 10;</t>
		<t>vSIDs are chosen to be 32-bits long;</t>
		<t>each SRv6 node is allocated a /108 to allocate its vSIDs from. This allows for 4 096 (2^^12) locators 1 million (2^^20) local functions on each SR node;</t>
		<t>the SR domain and the SRv6 vSIDs prefix is allocated: 2001:DB8::/96;</t>
		<t>node N is allocated 2001:DB8:0:0:0:0:N/108;</t>
	</list>
	<vspace blankLines="0"/>
</t>

<t>Some metrics of this SR domain:<list style="symbols">
	<t>An SR policy encoding a strictly routed path using only Adjacency SIDs would need ten 32-bits vSIDs resulting in a total of 40 octets in the SRH. In contrast the use of 128-bits SRv6 SIDs would require 160 octets;</t>
	<t>An SR policy using strictly routed path using four (node) SIDs would need four 32-bits vSIDs resulting in a total of 16 octets in the SRH. In contrast the use of 128-bits SRv6 SIDs would require 64 octets and the use of 20-bits SR-MPLS SID would require 16 octets;</t>
	<t>The IGP advertises 1 000 SRv6 locators to be installed in the IPv6 FIB of all IGP nodes (as per regular SRv6 and SR-MPLS);</t>
	<t>The IPv6 address space is one /108 per SR node for a total of one /96 for the whole SR domain.</t>
</list>
<vspace blankLines="0"/>
</t>


</section>
<section anchor="Local" title="Local vSIDs">

<t>If SRv6 vSIDs only identifies local segments, with no needs for global segments, there is no need for a global route toward a node hence the 'N' may have a size of zero. This may be interesting for a deployment using both 128-bits SRv6 SIDs and very short SRv6 vSIDs. Such SRv6 vSIDs could be used when a strictly routed path is needed and encoded as a list of adjacency SIDs. Given that the number of local adjacency SIDs is independent of the size of the SR domain, and typically below 255, one could use 8-bits vSIDs which would allow encoding 16 vSIDs within a single 128-bits SRv6 SID hence provides a very effective SRH compression.</t>

<t>In this example vSIDs are used only for local SIDs, such as adjacency SIDs. vSIDs are used in complement with 128-bits SRv6 SIDs.</t>
<t>The SR domain has the following caracteristics:<list style="symbols">
<t>10 000 SR endpoints nodes;</t>
<t>network diameter is 30;</t>
<t>SRv6 SIDs:<list style="symbols">
	<t>each SRv6 node is allocated a /64 to allocate its 128-bits SIDs from;</t>
	<t>SRv6 prefix: 2001:DB8::/48  (i.e., 65535 /64, allowing for growth or multiple SR routing algorithms);</t>
	<t>node N is allocated 2001:DB8:0:N/64;</t>
</list>
<vspace blankLines="0"/>
</t>
<t>SRv6 vSIDs<list style="symbols">
<t>local vSIDs are chosen to be 8-bits in length. They are used for adjacency SIDs hence allow for 255 Adjacency SIDs per node;</t>
<t>SRv6 vSIDs prefix is allocated 2001:DB8:0:FFFF::/120;</t>
</list>
<vspace blankLines="0"/>
</t>
</list>
<vspace blankLines="0"/>
</t>

<t>Some metrics of this SR domain:<list style="symbols">
<t>An SR policy encoding a strictly routed path using only adjacency SIDs would need thirty 8-bits vSIDs resulting in a total of 32 octets in the SRH. In contrast the use of 128-bits SRv6 SIDs would require 480 octets and the use of 20-bits SR-MPLS SID would require 120 octets;</t>
<t>The IGP advertises 10 000 SRv6 locators to be installed in the IPv6 FIB of all IGP nodes (as per regular SRv6 or SR-MPLS);</t>
<t>The IPv6 address space is one /64 per SR node for a total of one /48 for the whole SR domain.</t>
</list>
<vspace blankLines="0"/>
</t>


</section>

</section>


<section anchor="Extensions" title="Optional extensions">


<section anchor="Larger_vSIDs" title="A node requiring a larger vSIDs length.">
<t>One SR Endpoint node may need a larger vSIDs space. This may especially be the case when at the same time:<list style="symbols">
<t>the vSIDs Length is chosen to be small in order to optimize for the size of the SRH header. Indeed, for topological/routing instructions, the number of SIDs in the SRH may be high in some use cases, up to the network diameter, calling for small vSIDs.</t>
<t>one vSID is a service instruction and the number of service SIDs may be high, requiring a SID longer than a vSIDs Length.</t>
</list>
<vspace blankLines="1"/>
</t>

<t>This section defines two solutions to increase the vSIDs length on a node requiring a vSIDs space larger than other nodes.</t>

<section anchor="Shorter_Locators" title="Allocating a shorter locator to a node.">
<t>In order to increase the vSIDs length on a node, a simple option is to allocate multiple locators of a larger locator to this node, within the SRv6 vSIDs prefix. As per <xref target="RFC8986">RFC 8986</xref>, a locator may be represented as B:N where B is the SRv6 SID block (IPv6 subnet allocated for SRv6 SIDs by the operator) and N is the
   identifier of the parent node instantiating the SID. Following this format, multiple node identifiers Ns may be allocated to a node. Allocating 'k' identifiers increase the vSIDs space of that node by 'k'.</t>

</section>

<section anchor="Combining_vSIDs" title="Combining k vSIDs to identify a behavior.">
<t>When an SR Endpoint node needs more SIDs than allowed by the vSIDs Length, it MAY combine two (resp. N) vSIDs of length L to effectively benefit from a vSID of length 2*L (resp. N*L). This is a local choice of this SR Endpoint. Nothing specific is required in the SRH which only contains those 2 (resp. N) SIDs instead of a single one.</t>
<t>Note that when two vSIDs are combined, the first vSID may be seen as having the role of a "Context SID" identifying a context specific SID space/table, with the second SID been looked up in this context specific table. This is similar to the Context-Specific Label space defined in the section 3 of <xref target="RFC5331">RFC 5331</xref>.
</t>

<t>This section defines the extension to SRv6 Network Programming allowing for a SID behavior "End.DT6" to be encoded with 'k' vSID. This is equally applicable to others SID behaviors.</t>
<t>The processing takes as an argument the vSIDs length 'L', and the number of vSIDs 'k'. 'L' and 'k' are a property of the vSID and are given as a result of the lookup of the IPv6 destination address which identifies the SRv6 SID and its properties. The properties include the Endpoint behavior, the length L of the vSIDs and the number 'k' of vSIDs used to encode this behavior in the SRH.</t>

<t>When N receives a packet destined to S and S is a local End.DT6 SID encoded with 'k' vSIDs, N does the following processing:</t>

<t>When N receives a packet whose IPv6 DA is S and S is a local End.DT6 vSID of length L and encoded with 'k' vSIDs the line S02 of the End.DT6 processing which was, as per section 4.6 of <xref target="RFC8986">RFC 8986</xref>:
</t>

<t>   S02.   If (Segments Left != 0) {</t>
<t>is replaced by the following:</t>

<t>   S02.   If (Segments Left != k - 1) {</t>

<t>When processing the Upper-layer header of a packet, the lines S04-S05 which were:</t>

<t>S04. Remove the outer IPv6 Header with all its extension headers</t>
<t>S05. Set the packet's associated FIB table to T</t>


<t>are replaced by the following:</t>

<t>S04a. Read the k-1 next vSIDs</t>
<t>S04b. Remove the outer IPv6 Header with all its extension headers</t>
<t>S05.  Set the packet's associated FIB table to the one identified by the concatenation of the k-1 next vSIDs</t>


</section>
</section>

<section anchor="Inter-AS" title="Inter Routing Domains with the End.XvPS behavior">
<t>Some SRv6 traffic may need to cross multiple routing domains, such as differents Autonomous Systems (ASes) or different routing areas. Different routing domains may use different addressing schema making it difficult to find a common SRv6 vSIDs prefix.</t>
<t>This section defines an optional solution and SID behavior allowing for the use of different SRv6 vSIDs prefixes between routing domains.</t>
<t>The solution requires a new SID behavior, called "Endpoint with cross-connect to an array of layer-3 adjacencies and SRv6 vSIDs Prefix Swap" (End.XvPS for short) allowing for this transition of SRv6 vSIDs prefix between two routing domains.</t>
<t>End.XvPS is a variant of End.X, performing both "End.X Layer-3 Cross-Connect" and the translation of the SRv6 vSIDs prefix between the two routing domains.</t>
<t>The processing takes as an argument the vSIDs length L and the prefix P2 of the SRv6 vSIDs prefix in the second domain. Those two parameters are a property of the (received) vSID and are given as a result of the lookup on the IPv6 destination address which identifies the SRv6 SID and its properties.</t>

<t>When N receives a packet whose IPv6 DA is S and S is a End.XvPS SID behavior, with a local vSID length L, and a remote/next SRv6 vSIDs prefix P2, 
		the line S14 of the End processing which was, as per section 4.1 of <xref target="RFC8986">RFC 8986</xref>:
</t>

<t>   S14.   Update IPv6 DA with Segment List[Segments Left]</t>

<t>is replaced by the following:</t>

<t>   S14.   Copy Segment List[Segments Left] from the SRH to the L lowest order bits of the destination address of the IPv6 header and copy the SRv6 vSIDs prefix P2 to the 128-L highest order bits of the destination address.</t>

<t></t>
<t>Note: the way the SRv6 vSIDs prefix P2 of the next routing domain is known is out of scope of this document. As examples, they could be learnt via configuration or using a signaling protocol either with the peer domain of with a central controler (e.g. PCE).</t>

<t>When End.XvPS SID behavior is used, the restriction on the SRH is relaxed and becomes: in a SRH, all vSID MUST have the same vSID length 'L' and within a routing domain, the same SRv6 vSID prefix.Between routing domaines, separated with the End.XvPS behavior, SRv6 vSID prefixes may be different.</t>

</section>

<section anchor="NSIDs" title="NSIDs flavor">
<t>The NSIDs flavors is a variant of the End, End.X and End.XvPS behaviors.</t>
<t>The NSIDs flavors copy N vVSID from the SRH to the IPv6 destination address.</t>

<t>When N receives a packet whose IPv6 DA is S and S is a NSIDs flavor, with a local vSID length L, and a local paramater N, 
		the lines S09, S13 and S14 of the End processing which was, as per section 4.1 of <xref target="RFC8986">RFC 8986</xref>:
</t>

<t>   S09.   If ((Last Entry &gt;  max_LE) or (Segments Left &gt; Last Entry+1)) {</t>

<t>   S13.   Decrement Segments Left by 1</t>
<t>   S14.   Update IPv6 DA with Segment List[Segments Left]</t>

<t>are replaced by the following:</t>

<t>   S09.   If ((Last Entry > max_LE) or (Segments Left > Last Entry+1)) or (Segments Left &lt; = N){ </t>

<t>   S13.   Decrement Segments Left by N</t>
<t>   S14.   Copy N Segments List[Segments Left+N-1]...List[Segments Left] from the SRH to the N*L lowest order bits of the destination address of the IPv6 header.</t>




<t>Note that if N=128/L, a complete IPv6 address is copied. This is useful when the next SR node is an SRv6 PE requiring its 128-bits SIDs in the IPv6 destination address. This is also useful for inter domain scenarios where both domains use unrelated address spaces and hence use two different SRv6 vSIDs prefixes.</t>


</section>

</section>


<section anchor="Security_Consideration" title="Security Considerations">
<t>This document does not change the security considerations of SRv6. Please refers to <xref target="RFC8402">RFC 8402</xref>,  
<xref target="RFC8754">RFC 8754</xref> and <xref target="RFC8986">RFC 8986</xref> for existing security consideration.</t>
</section>

<section anchor="Acknowledgements" title="Acknowledgements">
<t>This document has been inspired by the work of the SPRING WG and in particular the work done in <xref target="I-D.filsfils-spring-net-pgm-extension-srv6-usid"></xref> and <xref target="I-D.li-spring-compressed-srv6-np"></xref>. The authors would like to acknowledge the authors of these two documents.</t>
<t>The authors would like to thank Joel Halpern and Francois Clad for their review and comments.</t>
</section>

<section anchor="Contributors" title="Contributors">
<t>Daniel Voyer</t>
<t>Bell Canada</t>
<t>Canada</t>
<t>Email: daniel.voyer@bell.ca</t>

</section>


<section anchor="authors-notes" title="Changes / Authors Notes">
<t>[RFC Editor: Please remove this section before publication]</t>
<t>00: Initial version.</t>
<t>01:<list style="symbols">
<t>Removal of the vSID Size TLV; addition of the IS-IS extension; addition of the SR header length check in the pseudo code.</t>
<t>Addition of the IS-IS extension;</t>
<t>Addition of the SR header length check in the pseudo code.</t>
</list>
<vspace blankLines="0"/>
</t>
<t>02:<list style="symbols">
<t>Change of terminology (VLSID changed to vSID);</t>
<t>Swapping the two examples in section 'Illustrations'.;</t>
<t>Addition of two solutions to provide more vSID space to some nodes in section 'Node requiring a larger vSID length';</t>
<t>Addition of a solution for crossing routing domains using different SRv6 vSID prefixes and/or different vSID length;</t>
</list>
<vspace blankLines="0"/>
</t>
<t>03:<list style="symbols">
<t>Minor updates in section 'Inter Routing Domains'</t>
</list>
<vspace blankLines="0"/>
</t>
<t>04:<list style="symbols">
<t>Creating of a profile only supporting vSID of length 32-bits.</t>
<t>Addition of the NSIDs flavor.</t>
</list>
<vspace blankLines="0"/>
</t>
<t>05:<list style="symbols">
<t>Editorial changes.</t>
<t>Removal of the IGP signaling extension. The size of the SRv6 block is advertised in the existing SRv6 SID Structure Sub-Sub-TLV.</t>
</list>
<vspace blankLines="0"/>
</t>
<t>06-07: refresh.</t>
</section>


</middle>

<back>
<references title="Normative References">
<?rfc include="reference.RFC.2119"?>
<?rfc include="reference.RFC.8174"?>
<?rfc include="reference.RFC.8402"?>
<?rfc include="reference.RFC.8754"?>
<?rfc include="reference.RFC.8986"?>
<?rfc include="reference.I-D.ietf-lsr-isis-srv6-extensions"?>
</references>
<references title="Informative References">
<?rfc include="reference.I-D.filsfils-spring-net-pgm-extension-srv6-usid"?>
<?rfc include="reference.I-D.li-spring-compressed-srv6-np"?>
<?rfc include="reference.RFC.5331"?>
<?rfc include="reference.RFC.8660"?>
</references>



</back>
</rfc>
