<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?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" docName="draft-agrawal-bess-bgp-srv6-mpls-interworking-01"
     ipr="trust200902">
  <front>
    <title>BGP extensions for SRv6 and MPLS interworking</title>

    <author fullname="Swadesh Agrawal" initials="S." role="editor" surname="Agrawal">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>swaagraw@cisco.com</email>
      </address>
    </author>
    
    <author fullname="Dhananjaya Rao" initials="D." surname="Rao">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>dhrao@cisco.com</email>
      </address>
    </author>
    
    <author fullname="Zafar ALI" initials="Z." surname="Ali">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>zali@cisco.com</email>
      </address>
    </author>

    <author fullname="Clarence Filsfils" initials="C." surname="Filsfils">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>cfilsfil@cisco.com</email>
      </address>
    </author>
    
    <author fullname="Daniel Voyer" initials="D." surname="Voyer">
      <organization>Bell Canada</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country>Canada</country>
        </postal>

        <email>daniel.voyer@bell.ca</email>
      </address>
    </author>

    <author fullname="Gaurav dawra" initials="G." surname="Dawra">
      <organization>LinkedIn</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country>USA</country>
        </postal>

        <email>gdawra.ietf@gmail.com</email>
      </address>
    </author>

    <author fullname="Zhenbin Li" initials="Z." surname="Li">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

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

        <email>lizhenbin@huawei.com</email>
      </address>
    </author>


    <date year=""/>

    <area>Routing</area>

    <workgroup>BESS WorkGroup</workgroup>

    <abstract>
      <t>This document define the BGP protocol extensions required to provide interworking
      between SRv6 and SR-MPLS/MPLS for SRv6 deployment. 
      </t>
    </abstract>
  </front>
  
  

  <middle>
    <section title="Introduction">
    
      <t>The deployment of SRv6 into existing networks require SRv6 to interwork with 
      SR-MPLS/MPLS. Draft <xref target="I-D.agrawal-spring-srv6-mpls-interworking"/> 
      describes SRv6 and MPLS interworking architecture in multi domain network where 
      each domain run SRv6 or MPLS data plane independently. Specifically section 7.1.2 
      of draft details BGP inter-domain routing procedures to advertise PE locators or PE 
      loopbacks address across such network with next hop self at domain border routers. 
      When performing next hop self on domain border router and further propagation, 
      draft proposes to allocate and signal additional upstream data plane specific 
      information. This document extract the BGP protocol extensions proposed in 
      <xref target="I-D.agrawal-spring-srv6-mpls-interworking"/> to signal SRv6 SID 
      with BGP SAFI 4 or SAFI 1 advertisements. This is done to independently state 
      BGP protocol extensions and future applicability of them for other use cases.
      </t>
      
      <section anchor="REQ" 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"/> <xref target="RFC8174"/> when, and only
        when, they appear in all capitals, as shown here.</t>
      </section>
    </section>
    
    <section title="SRv6 SID advertisement in BGP update for PE address">
      <t><xref target="RFC9252"/> extended BGP Prefix SID Attribute (PFA) to signal 
      SRv6 SID in "SRv6 L3 Service" and "SRv6 L2 Service" TLVs for layer 3 and layer 
      2 services. This document introduces new "SRv6 tunnel for label route" TLV for 
      safi 4 <xref target="RFC8277"/> and extends usage of "SRv6 L3 Service" TLV for 
      SAFI 4.</t>
      
      <section anchor="SRv6LRT" title="SRv6 tunnel for label route TLV">
        <t><xref target="RFC8669"/> introduced Prefix-SID attribute with TLV type 1 for 
        label index and TLV type 3 for Originator SRGB for AFI=1/2 and SAFI 4 (BGP LU). 
        This document introduces a new TLV called "SRv6 tunnel for label route" of the 
        BGP Prefix-SID Attribute to signal SRv6 SIDs along with MPLS label bound to prefix 
        in NLRI. Behavior that may be encoded but not limited to is End.DTM. "SRv6 tunnel 
        for label route" TLV signals "AND" semantics i.e.  push label signaled in NLRI and 
        perform H.Encaps.M with DA as SRv6 SID signaled in TLV. 
        This document limits the usage of this new TLV to AFI=1/2 SAFI 4. The usage of 
        this TLV for other AFI/SAFI is out of scope of this document.</t> 

        <t>"SRv6 tunnel for label route" TLV is encoded exactly like SRv6 Service TLVs in 
        Prefix-SID Attribute <xref target="RFC9252"/> with following 
        modification:
          <list style="symbols">
          <t>TLV Type (1 octet): This field is assigned values from the IANA registry 
          "BGP Prefix-SID TLV Types".  It is set to 7 for "SRv6 tunnel for label route" TLV.
          </t>
          <t>No transposition scheme is allowed i.e. transposition length MUST be 0 
          in SRv6 SID Structure Sub-Sub-TLV.</t>
          </list>
        </t>
      
        <t>Please refer to section 7.1.2.2.1 of 
        <xref target="I-D.agrawal-spring-srv6-mpls-interworking"/>
        for usage of "SRv6 tunnel for label route" TLV and overall procedures along with 
        control and forwarding state</t>  
      </section>
    
      <section title="SRv6 SID bound to prefix in NLRI">
        <t>Bound the SRv6 SID of DPM behavior to PE loopback address carried in NLRI of 
        BGP update of SAFI 1 or SAFI 4. Receiving node perform H.Encaps, where destination 
        of IPv6 header is set to SRv6 SID for traffic destined to address in NLRI.</t>
        
        <t>Please refer to section 7.1.2.2.2 of 
        <xref target="I-D.agrawal-spring-srv6-mpls-interworking"/>
        for overall procedures when SRv6 SID is bound to PE address.</t>
      
        <t>This document proposes below 2 options to advertise SRv6 SID bound to prefix 
        in NLRI</t>
        
          <section title="Address in NLRI is only bound to SRv6 SID">
          <t>Address in NLRI is only bound to SRv6 SID by advertising node. In this case, 
          SAFI 4 cannot be used to advertise PE loopback across SRv6 domain as label is 
          required in NLRI <xref target="RFC8277"/>. Therefore SRv6 SID with End.DPM 
          behavior bound to prefix in NLRI is advertised in SAFI 1 as per 
          section 5.3 and 5.4 of <xref target="RFC9252"/>. To distinguish from global 
          internet routes on receiver, local policy matching PE loopback addresses or BGP 
          community/extended community attached to such advertisement may be used. 
          Such policy on receiver helps to allocate MPLS label and advertise route further 
          upstream in SAFI 4 in MPLS domain for PE addresses with next hop self.
          <xref target="SIGNALSAFI1"/> shows BGP update example through SRv6 domain.
          
       <figure anchor="SIGNALSAFI1" title="SRv6 SID bound to NLRI of SAFI 1">
         <artwork><![CDATA[                                       
          +-----+                +-----+  RD:V/v via 10   +-----+
   .......|S-RR1|<...............|S-RR2|<.................|S-RR3| <..
   :      +-----+                +-----+                  +-----+   :             
   :                                                                :
   :                                                                : 
+--:-------------------+----------------------+---------------------:-+
|  :                   |                      |                     : |
|  :                   |                      |                     : |
|  :       SAFI 4      |       SAFI 1         |      SAFI 4         : |
|  : <-E10,Label via 4 |   <-E10 via 7        |  <-E10,0x3 via E10  : |
|  :                   |   SRv6 SID=B7:E10::  |                     : |
|----+               +---+                  +---+                +----|    
| E1 |               | 4 |                  | 7 |                |E10 |
|----+               +---+                  +---+                +----|
|                      |                      |                       |
|                      |                      |                       |
|                      |                      |                       |
|                      |                      |                       |
|        MPLS          |        SRv6          |       MPLS            |
+----------------------+----------------------+-----------------------+
iPE                   iBR                    eBR                     ePE

<----------LI---------><----------C----------><-----------LE---------->       
          ]]></artwork>
        </figure></t>
          </section>
        
          <section title="MPLS label and SRv6 SID bound to prefix in NLRI">
          <t>Advertise MPLS label and SRv6 SID bound to prefix in NLRI. RFC 8669 
          introduced Prefix-SID attribute with TLV type 1 for label index and TLV type 3 
          for Originator SRGB for AFI=1/2 and SAFI 4 (BGP LU). This document extends the 
          BGP Prefix-SID attribute [RFC8669] to carry "SRv6 L3 Service TLV" defined 
          in <xref target="RFC9252"/> with AFI=1/2 and SAFI 4. TLV is encoded exactly 
          like SRv6 Service TLVs in Prefix-SID Attribute without transposition. Such an 
          update can be processed by both legacy MPLS ABR and SRv6 capable ABR and 
          use relevant encapsulation. For example, in
          <xref target="SIGNALSAFI4"/> node 4 being SRv6 capable chooses SRv6 
          encapsulation and node 44 being legacy continue MPLS encapsulation.
       
       <figure anchor="SIGNALSAFI4" title="SRv6 SID bound to NLRI of SAFI 4">
         <artwork><![CDATA[                                       
          +-----+                +-----+  RD:V/v via 10   +-----+
   .......|S-RR1|<...............|S-RR2|<.................|S-RR3| <..
   :      +-----+                +-----+                  +-----+   :             
   :                                                                :
   :                                                                : 
+--:-------------------+----------------------+---------------------:-+
|  :                   |                      |                     : |
|  :                 +---+                    |                     : |
|  :                 | 4 |                    |                     : |
|  :     SAFI 4      +---+    SAFI 4          |      SAFI 4         : |
|  : <-E10,Label via 4 |  <-E10,Label via 7   |   <-E10,0x3 via E10 : |
|----+                 |  SRv6 SID=B7:E10:: +---+                +----|    
| E1 |                 |                    | 7 |                |E10 |
|----+               +---+                  +---+                +----|
|                    |44 |                    |                       |
|                    +---+                    |                       |
|                      |                      |                       |
|                      |                      |                       |
|        MPLS          |        SRv6/MPLS     |       MPLS            |
+----------------------+----------------------+-----------------------+
iPE                   iBR                    eBR                     ePE

<----------LI---------><----------C----------><-----------LE---------->       
          ]]></artwork>
        </figure></t>
        </section>   
      </section>
      
      <section title="Propogation of SRv6 SID in BGP update for PE address">
        <t>A BGP speaker receiving updates with PE address in NLRI and Prefix-SID 
        Attribute with "SRv6 tunnel for label route" TLV or "SRv6 L3 Service" TLV observe the 
        following rules when advertising the route to other peers:
        <list style="symbols">
        <t>If the nexthop is unchanged, the TLVs, including any unrecognized Types of 
        Sub-TLV and Sub-Sub-TLV, SHOULD be propagated further. In addition, all Reserved 
        fields in the TLV or Sub-TLV or Sub-Sub-TLV MUST be propagated unchanged.</t>

        <t>If the nexthop is modified, the TLV and associated sub-TLVs/Sub-Sub-TLVs 
        SHOULD be updated based on local policy. For example, if upstream is MPLS domain, 
        then TLVs carrying SRv6 SID should be removed and local MPLS label bound to 
        address in NLRI is sent in SAFI 4.</t>
        </list>
      </t>  
      </section>
    </section>
    
     

    <section anchor="IANA" title="IANA Considerations">
      <section title="BGP Prefix-SID TLV Types registry">
        <t>This document introduce a new TLV Type of the BGP Prefix-SID attribute. 
        IANA is requested to assign Type value in the registry 
        "BGP Prefix-SID TLV Types" as follows<figure>
            <artwork><![CDATA[    Value     Type                             Reference
    ----------------------------------------------------------
    TBD       "SRv6 tunnel for label route" TLV     <this document>]]></artwork>
          </figure>
        </t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to acknowledge Stephane Litkowski and Ketan Talaulikar
      for review and comments.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
       <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?>
       
       <?rfc include='reference.RFC.8174.xml'?>
       
       <?rfc include='reference.RFC.4364.xml'?>
       
       <?rfc include='reference.RFC.7432.xml'?>
       
       <?rfc include='reference.RFC.3032.xml'?>
       
       <?rfc include='reference.RFC.4023.xml'?>
       
       <?rfc include='reference.RFC.8664.xml'?>
       
       <?rfc include='reference.RFC.8402.xml'?>
       
       <?rfc include='reference.RFC.8277.xml'?>
       
       <?rfc include='reference.RFC.9252.xml'?>
       
       <?rfc include='reference.RFC.8669.xml'?>
       
       <?rfc include='reference.I-D.ietf-spring-segment-routing-policy.xml'?>
       
       <?rfc include='reference.I-D.agrawal-spring-srv6-mpls-interworking.xml'?>
              
       <?rfc include='reference.RFC.8986.xml'?>
    </references>
    <references title="Informative References">        
        <?rfc include='reference.I-D.ietf-mpls-seamless-mpls.xml'?>
    </references>
  </back>
</rfc>
