<?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-lz-bess-srv6-service-capability-06"
      ipr="trust200902"
      obsoletes=""
      updates=""
      submissionType="IETF"
      xml:lang="en"
      tocInclude="true"
      tocDepth="4"
      symRefs="true"
      sortRefs="true"
      version="3">

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

 <front>


   <title abbrev="SRv6-based BGP Service Capability">SRv6-based BGP Service Capability</title>
    <seriesInfo name="Internet-Draft" value="draft-lz-bess-srv6-service-capability-06"/>


   <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="Zhang Zheng" surname="Zhang">
      <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>zhang.zheng@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
   <author fullname="Eduard Metz" surname="Metz">
      <organization>KPN</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city></city>
          <region/>
          <code/>
          <country>Netherlands</country>
        </postal>
        <phone></phone>
        <email>etmetz@gmail.com</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
	   <author fullname="Yisong Liu" surname="Liu">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city></city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <phone></phone>
        <email>liuyisong@chinamobile.com</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

	
    <date year="2024"/>

   <!-- Meta-data Declarations -->

    <area>Routing</area>
    <workgroup>BESS Working Group</workgroup>
    <keyword>SRv6</keyword>
    <keyword>BGP</keyword>
	<keyword>VPN</keyword>


   <abstract>
	<t>
	<xref target="RFC9252"></xref> specifies that implementations MUST provide a mechanism to control advertisement of SRv6-based BGP service routes on a per neighbor and per service basis. This document provides analysis on the problems that may be encountered if the SRv6-based service routes are received by the MPLS-only PEs. Some currently used SRv6-based service routes advertisement controlling methods by configuration or network planning are also described. And this document proposes an automatic advertisement controlling method for SRv6-based service routes by defining a new Capability Code for SRv6-based BGP service capability.
	 </t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
  <t><xref target="RFC9252"></xref> defines procedures and messages for SRv6-based services. When an egress PE is enabled for BGP Services over SRv6 data plane, it signals one or more SRv6 Service SIDs enclosed in SRv6 Service TLV(s) within the BGP Prefix-SID Attribute<xref target="RFC8669"></xref> attached to MP-BGP NLRIs. In other words, instead of defining new AFI/SAFIs for SRv6-based service routes, existing AFI/SAFIs of MPLS-based service routes are re-used for SRv6-based service routes.</t>
  <t>As specified in <xref target="RFC9252"></xref>, there're two options to encode SRv6 service SIDs in the route advertisement:</t>
  	<ul spacing="normal">
        <li>The first option is to encode the whole SRv6 Service SID in the SRv6 Service TLV and set the MPLS Label field(s) of the corresponding NLRI to Implicit NULL.</li>
        <li>The second option, which is referred to as the Transposition Scheme, is to put the function and/or the argument part of the SRv6 SID in the MPLS Label field of the NLRI and to encode the locator part of the SID in the SRv6 Service TLV.</li>		
     </ul>
	 
	 <t>However, <xref target="RFC8669"></xref> specifies that unknown TLVs in the BGP Prefix attribute MUST be ignored and propagated unmodified. If SRv6-based service routes are received by PEs that are only capable of MPLS-based services, the PEs may discard SRv6 Services TLV in the BGP Prefix attribute and process these routes wrongly, which may leads to service failure and/or abnormal extra traffic flows in the network. </t>
	 <t>To avoid these problems, <xref target="RFC9252"></xref> specifies that implementations MUST provide a mechanism to control advertisement of SRv6-based BGP service routes on a per neighbor and per service basis.</t>
	 
	 
	 <t>This document provides analysis on the problems that may be encountered in the MPLS and SRv6 co-existence scenario if the SRv6-based service routes are received by the MPLS-only PEs. Some currently used SRv6-based service routes advertisement controlling methods by configuration or network planning are also described. And this document proposes an automatic advertisement controlling method for SRv6-based service routes by defining a new Capability Code <xref target="RFC5492"></xref> for SRv6-based BGP service capability.</t>
    </section>

      <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> <xref target="RFC8174" format="default"></xref> when, and only when, they appear in all capitals, as shown here.</t>
      </section>	
	
    <section numbered="true" toc="default">
        <name>the Co-existence Scenario</name>	
	<t>In the progress of network upgrading, some of the legacy devices that only support MPLS/SR-MPLS will coexist with the new devices capable of SRv6 for a long time.</t>
	
	<section numbered="true" toc="default">
        <name>Possible Problems for MPLS-only PEs receiving SRv6 Service Routes</name>
		<figure>
		<name>the Co-existence Scenario</name>
        <artwork align="left" name=""><![CDATA[
                    +-----+
    ................|S-RR |..................
    :               +-----+                 :
    :                                       :
    :                                       :
    :                                       :
    :                                       :
    :        +----------------+             :   
    :        |                |-------PE2...:
   PE1-------|    Backbone    |             :
             |                |-------PE3...:
             +----------------+
	  
           ]]></artwork>
     </figure>
	<t>As shown in Figure 1, PE1 is a legacy device that only supports MPLS-based services, PE2 supports both MPLS-based and SRv6-based services, and PE3 is an SRv6-only device. S-RR is a service route reflector that supports both MPLS and SRv6. On PE2, a SRv6 service SID sid-1 and a MPLS VPN route label label-1 are assigned for overlay service 1. On PE3, only SRv6-based service is enabled and configured for overlap service 2.</t>

	<t>On PE2,the SRv6 service SID and a MPLS VPN route label for the service 1 are advertised in separate UPDATE messages. ADD-PATH[RFC7911] is used to avoid path hiding. S-RR reflects both SRv6-VPN route and MPLS-VPN route to PE1. Since PE1 only supports MPLS, it may discard the SRv6 Service TLV(s) in the BGP Prefix attribute and treat the SRv6-based route as a MPLS-based route for service 1, then there're two MPLS-based routes for the same service 1 on PE1.</t>
	<t>Depending on whether the Transposition Scheme is used, the following two scenarios are described separately.</t>
	  	<ul spacing="normal">
        <li><t>Scenario 1, the Transposition Scheme is used, the function and/or argument part of sid-1 is encoded in the MPLS Label field of the NLRI of the SRv6-based service route. Then PE1 may choose the route which is originally the SRv6-based route and use the label field in the NLRI of this route as MPLS VPN label for packet encapsulation. </t>
		<t>Unless the allocation of SRv6 SIDs and MPLS labels on PE2 is aligned to ensure compatibility, the interpretation of the function and/or argument of the SRv6 SID (sid-1 in the example) will lead to incorrect forwarding of the traffic. In the example above, on PE2 the packets may 1) be sent to the wrong service instance, in case the sid-1 function and/or argument value corresponds to an existing MPLS label, or 2) be dropped, in case the value of sid-1 does not correspond to an allocated MPLS label.</t>
		</li>
        <li><t>Scenario 2, the entire sid-1 is encoded in the SRv6 Services TLV and the MPLS Label field of the corresponding NLRI is set to Implicit NULL. The SRv6 Services TLV in the UPDATE messages is discarded by PE1, and from PE1's aspect, it has received a MPLS service route with an Implicit NULL label. </t>
		<t>It should be noticed that how to deal with the MPLS-based route with an Implicit NULL label is not standardized, different vendors may have different processing procedures which are unpredictable, e.g, set the route to invalid, send the packet to service 1 without the service route label or something else.</t></li>		
     </ul>
	
	<t>On PE3, only SRv6 service SID sid-2 is configured for service 2. If the service routes from PE3 are received by PE1, the problems are similar.</t> 
		<ul spacing="normal">
        <li>If the Transposition Scheme is used, PE1 may discard the SRv6 Service TLV(s) in the BGP Prefix attribute and treat the function and/or argument part of SRv6 service SID as a MPLS VPN route label. PE1 may 1) not send packets to PE2 since there's no LSP between PE1 and PE3 2) send packets encapsulated in IPv6 to PE3 if there's route to PE3.</li>
        <li>If the Transposition Scheme is not used and the label field in the NLRI is Implicit NULL, how PE1 deals with this route is unpredictable.</li>		
     </ul>
	</section>
	
	
		<section numbered="true" toc="default">
        <name>Some Current Methods for SRv6 Route Advertisement Controlling</name>
	<t><xref target="RFC9252"></xref> specifies that implementations MUST provide a mechanism to control advertisement of SRv6-based BGP service routes on a per neighbor and per service basis.</t>
	<t>This can be done by configuration. First the network operator must obtain whether the PEs in the network are capable of SRv6-based services.
Then the operator should config on PEs or route reflectors based on each PE's capability, the configuration is per neighbor.</t>

		<ul spacing="normal">
        <li>If there's a service route reflector, configurations on S-RR should ensure that the SRv6 service routes would not be reflected to MPLS-only legacy devices.</li>
        <li>If there's no route reflector in the network, which neighbors can the SRv6 service routes be advertised to should be specified when configuring SRv6 services on the PEs.</li>		
     </ul>

	<t>The above method may be feasible in small-scale networks, but are not applicable to large-scale networks. The main reasons are:</t>
	<ul spacing="normal">
        <li>The per neighbor configuration needs to be changed with the device capability. When a PE is upgraded to support SRv6-based services or rolled back to an older version that only supports MPLS, the configuration on its neighbors or the RR should be changed to add this PE to or exclude it from the advertisement of SRv6-based BGP service routes. Although this may be done automatically by the network management system, it is still not a easy job in a large-scale network and is not flexible enough.</li>
        <li>The additional steps of device capability acquisition and capability based configuration increase the fault probability and troubleshooting difficulty. If the service from PE1 to PE2 fails, the operator needs to confirm the capability for SRv6-based service of the two devices, and then check the configuration on PE3 or RR to make sure that the SRv6-based service route is not advertised to PE1.</li>
		<li>There is no standard solution for the network operator to obtain the PE's capability for SRv6-based services. If there are devices from multiple vendors in the network, there may be interconnection problems.</li>		
     </ul>

	<figure>
		<name>the Co-existence Example Topology 2</name>
        <artwork align="left" name=""><![CDATA[
                 +-----+
 +---------------|S-RR1|-----------------+
 |               +-----+                 |
 |                                       |
 |                                       |
 |                                       |
 |                                       |
 |        +----------------+             |   
PE1-------|                |-------PE2---+
          |    Backbone    |             |
PE4-------|                |-------PE3-+ |  
 |        +----------------+           | |
 |                                     | |
 |                                     | |
 |                                     | |
 |               +-----+               | |
 +---------------|S-RR2|---------------+-+
                 +-----+                 
			 
           ]]></artwork>
     </figure>

	<t>Some may implement service-RRs separately for MPLS and SRv6 when building the network. As shown in figure 2, S-RR1 is for MPLS service routes only and S-RR2 is for SRv6 service routes only. For MPLS-only PEs like PE1, they would only connect to S-RR1 and the situation is similar for SRv6-only PEs(e.g,PE3 and PE4). In this case, the configuration work is less than the scenario above, but, </t>
	<ul spacing="normal">
        <li>the configuration is at least required on dual-capability devices like PE2 to control the SRv6-based routes being advertised to the correct RR(i.e, S-RR2),</li>
        <li>the configuration on the PEs also needs to be changed to connect to the right S-RR if the PEs' capabilities of SRv6-based service routes change due to device upgrade.</li>		
     </ul>
	</section>	
    </section>	
	
	
	<section numbered="true" toc="default">
	<name>SRv6-based BGP Service Capability</name>
	<t>The basic idea is, if the BGP speaker can obtain the capability for SRv6-based services of its peers, the advertisement of SRv6-based BGP service routes can be automatically controlled.</t>
	<t><xref target="RFC5492"></xref> defines the "Capabilities Optional Parameter".  A BGP speaker can include a Capabilities Optional Parameter in a BGP OPEN message. This allows BGP speakers to communicate capabilities. The Capabilities Optional Parameter is a triple that includes a one-octet Capability Code, a one-octet Capability length, and a variable-length Capability Value.</t>
	<t>This document defines a Capability Code for SRv6-based BGP service capability. If a BGP speaker has not sent the SRv6-based BGP service capability in its BGP OPEN message on a particular BGP session, or if it has not received the SRv6-based BGP service capability in the BGP OPEN message from its peer on that BGP session, that BGP speaker MUST NOT send on that session any UPDATE message that includes the SRv6 service TLVs. Like any other BGP capabilities, if the capability for SRv6-based services is enabled or removed, an established session needs to be reset to resend the OPEN message.</t>
	<t>In this way, the advertisement of SRv6-based BGP service routes is controlled without per neighbor or per-service configuration, which makes it easier to implement and manage in the network. In the co-existence scenario, the SRv6-based service routes would only be exchange between devices that support it based on this capability. There would be no UPDATE message that includes the SRv6 service TLV received by legacy devices.</t>	
	<t>PEs attached to the network, as BGP speakers, SHOULD indicate their ability to advertise and receive SRv6 based service routes through the SRv6 based BGP service capability. If service route reflectors are used in the network deploying SRv6-based services, they MUST support the SRv6-based BGP service capability if there're PEs in the network supporting this capability.</t>
	
</section>
	
	
	
	
	
<section numbered="true" toc="default">
	<name>IANA Considerations</name>

	<t>This document defines a new Capability Codes option, named "SRv6 Service Capability" with an assigned value  &lt;TBD1&gt; to indicate that a BGP speaker supports SRv6-based services. The length of this capability is 1.</t>
	
</section>

	

<section numbered="true" toc="default">
	<name>Security Considerations</name>
	<t>This extension to BGP does not change the underlying security issues inherent in <xref target="RFC5492"></xref> and <xref target="RFC9252"></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.RFC.5492.xml"?>
		<?rfc include="reference.RFC.8174.xml"?>		
      </references>
      <references>
        <name>Informative References</name>
		<?rfc include="reference.RFC.8669.xml"?>
		<?rfc include="reference.RFC.9252.xml"?>
      </references>
    </references>


 </back>
</rfc>
