<?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-bonica-spring-srv6-end-dtm-11"
     ipr="trust200902">
  <front>
    <title abbrev="SR-MPLS/SRv6 Interworking">SR-MPLS / SRv6 Transport
    Interworking</title>

    <author fullname="Shraddha Hegde" initials="S." surname="Hegde">
      <organization>Juniper Networks</organization>

      <address>
        <postal>
          <street>Embassy Business Park</street>

          <city>Bangalore</city>

          <region>KA</region>

          <code>560093</code>

          <country>India</country>
        </postal>

        <email>shraddha@juniper.net</email>
      </address>
    </author>

    <author fullname="Parag Kaneriya " initials="P." surname="Kaneriya">
      <organization>Juniper Networks</organization>

      <address>
        <postal>
          <street>Elnath-Exora Business Park Survey</street>

          <city>Bangalore</city>

          <region>Karnataka</region>

          <code>560103</code>

          <country>India</country>
        </postal>

        <email>pkaneria@juniper.net</email>
      </address>
    </author>

    <author fullname="Ron Bonica" initials="R." surname="Bonica">
      <organization>Juniper Networks</organization>

      <address>
        <postal>
          <street/>

          <city>Herndon</city>

          <code>20171</code>

          <region>Virginia</region>

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

        <email>rbonica@juniper.net</email>
      </address>
    </author>

    <author fullname="Peng Shaofu" initials="P." surname="Shaofu">
      <organization>ZTE Corporation</organization>

      <address>
        <postal>
          <street/>

          <country>Peoples Republic of China</country>
        </postal>

        <email>peng.shaofu@zte.com.cn</email>
      </address>
    </author>

    <author fullname="Greg Mirsky" initials="G." surname="Mirsky">
      <organization>ZTE Corporation</organization>

      <address>
        <postal>
          <street/>

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

        <email>gregimirsky@gmail.com</email>
      </address>
    </author>

    <author fullname="Zheng Zhang" initials="Z." surname="Zhang">
      <organization>ZTE Corporation</organization>

      <address>
        <postal>
          <street/>

          <country>Peoples Republic of China</country>
        </postal>

        <email>zhang.zheng@zte.com.cn</email>
      </address>
    </author>

    <author fullname="Bruno Decraene" initials="B." surname="Decraene">
      <organization>Orange</organization>

      <address>
        <postal>
          <street/>

          <country>France</country>
        </postal>

        <email>bruno.decraene@orange.com</email>
      </address>
    </author>

    <author fullname="Daniel Voyer" initials="D." surname="Voyer">
      <organization>Bell Canada</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

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

    <author fullname="Swadesh Agarwal" initials="S." surname="Agarwal">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

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

    <date day="1" month="January" year="2024"/>

    <area>Routing Area</area>

    <workgroup>SPRING Working Group</workgroup>

    <keyword>Segment Routing</keyword>

    <keyword>IPv6</keyword>

    <abstract>
      <t>This document describes procedures for interworking between an
      SR-MPLS transit domain and an SRv6 transit domain. Each domain contains
      Provider Edge (PE) and Provider (P) routers. Area Border Routers (ABR)
      provide connectivity between domains.</t>

      <t>The procedures described in this document require the ABR to carry a
      route to each PE router. However, they do not required the ABR to carry
      service (i.e., customer) routes. In that respect, these procedures
      resemble L3VPN Interprovider Option C.</t>

      <t>Procedures described in this document support interworking for global
      IPv4 and IPv6 service prefixes. They do not support interworking for VPN
      services prefixes where the SR-MPLS domain uses MPLS service labels.</t>
    </abstract>
  </front>

  <middle>
    <section title="Overview">
      <t><xref target="RFC8402">Segment Routing (SR)</xref> allows source
      nodes to steer packets through SR paths. It can be implemented over
      <xref target="RFC8200">IPv6 </xref> or <xref target="RFC3031">MPLS
      </xref>. When SR is implemented over IPv6, it is called <xref
      target="RFC8986">SRv6</xref>. When SR is implemented over MPLS, it is
      called <xref target="RFC8660">SR-MPLS</xref>.</t>

      <t>This document describes procedures for interworking between an
      SR-MPLS transit domain and an SRv6 transit domain. Each domain contains
      Provider Edge (PE) and Provider (P) routers. Area Border Routers (ABR)
      provide connectivity between domains.</t>

      <t>The procedures described in this document require the ABR to carry a
      route to each PE router. However, they do not required the ABR to carry
      service (i.e., customer) routes. In that respect, these procedures
      resemble <xref target="RFC4364">L3VPN Interprovider Option C
      </xref>.</t>

      <t>Procedures described in this document support interworking for global
      IPv4 and IPv6 service prefixes. They do not support interworking for VPN
      services prefixes where the SR-MPLS domain uses MPLS service labels.</t>
    </section>

    <section anchor="ReqLang" 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 <xref
      target="RFC2119">BCP 14</xref> <xref target="RFC8174"/> when, and only
      when, they appear in all capitals, as shown here.</t>
    </section>

    <section anchor="topo" title="Reference Topology">
      <t/>

      <figure align="center" anchor="Usecase"
              title="Interworking Between SR Domains">
        <artwork align="center"><![CDATA[
----------------------- SR Path 1 -------------------------->

<---------------------- SR Path 2 --------------------------

 ------       ------       ------       ------       ------
| PE   |     |  P   |     | ABR  |     |  P   |     | PE   |
|Node 1| --- |Node 2| --- |Node 3| --- |Node 4| --- |Node 5|
 ------       ------       ------       ------       ------

 Seg. A       Seg. B       Seg. C       Seg. D       Seg. E       
 
<---------- SRv6 Domain ---------->
                         <--------- SR-MPLS Domain --------->
]]></artwork>
      </figure>

      <t><xref target="Usecase"/> depicts interworking between an SR-MPLS
      domain and an SRv6 domain. The SRv6 domain contains PE Node 1 and P Node
      2. The SR-MPLS domain contains P Node 4 and PE node 5. Both domains
      contain ABR Node 3.</t>

      <t>Nodes 1 and 2 MUST support SRv6 but are NOT REQUIRED to support
      SR-MPLS. Nodes 4 and 5 MUST support SR-MPLS but are NOT required to
      support SRv6. Node 3 MUST support both SRv6 and SR-MPLS. It must also
      support interworking procedures.</t>

      <t>Network operators configure a loopback interface on Nodes 1 through
      5. These are called Loopback1 through Loopback5. They also configure 2
      additional loopback interfaces on PE Node 5. These are called
      Loopback5.IPv4 and Loopback5.IPv6.</t>

      <t>Each node instantiates an SR Segment (i.e., Segment A through Segment
      E). SR Path 1 begins on PE Node 1 and ends on PE Node 5. It visits Nodes
      2, 3, 4, and 5, executing the instructions associated with Segments B,
      C, and D. SR Path 2 begins on PE Node 5 and ends on PE Node 1. It visits
      Nodes 4, 3, 2, and 1, executing the instructions associated with
      Segments D, C, B and A.</t>

      <t/>
    </section>

    <section title="Forwarding Plane">
      <t><figure align="center" anchor="F-6-2-mpls"
          title="Encapsulation: SRv6 To SR-MPLS">
          <artwork align="center"><![CDATA[
   ----------------------- SR Path 1 -------------------------->

     ------       ------       ------       ------       ------
    | PE   |     |  P   |     | ABR  |     |  P   |     | PE   |
    |Node 1| --- |Node 2| --- |Node 3| --- |Node 4| --- |Node 5|
     ------       ------       ------       ------       ------
 
      Seg. A       Seg. B       Seg. C       Seg. D       Seg. E
            
       IPv6:          IPv6:           SR-MPLS:         SR-MPLS:         
        SA: Node 1     SA: Node 1      Seg. D           Exp. Null
        DA: Seg. B     DA: Seg. C      Exp. Null       Payload
       SRH:           SRH:            Payload    
        SL:  1         SL: 0
        SID: Seg. C    SID: Seg. C
       Payload       Payload

]]></artwork>
        </figure><xref target="F-6-2-mpls"/> depicts the forwarding plane as a
      packet traverses SR Path 1, from Node 1 to Node 5. In this example, PE
      Node 1 receives an IPv4 packet.</t>

      <t>PE Node 1 encapsulates the IPv4 packet in an SRv6 header. The SRv6
      header contains an IPv6 header and a <xref target="RFC8754">Segment
      Routing Header (SRH)</xref>. The Destination Address in the IPv6 header
      is a Segment Identifier (SID) that represents Segment B. Segment B is an
      END instruction instantiated on P Node 2. The SRH contains a Segments
      Left field and one SID. The Segments Left field is equal to 1 and the
      SID represents Segment C, and <xref target="processing">END.DM</xref>
      instruction instantiated on ABR Node 3.</t>

      <t>PE Node 1 forwards the packet to P Node 2. When P Node 2 receives the
      packet, it processed the END instruction. It decrements the Segments
      Left field in the SRH and copies the SID from the SRH to the Destination
      Address field of the IPv6 header. It then forwards the packet to ABR
      Node 3.</t>

      <t>When ABR Node 3 receives the packet, it processes the END.DM
      instruction. It removes the SRv6 header and replaces it with an SR-MPLS
      label stack that contains two entries. The top entry represents a prefix
      SID instantiated on P Node 4. The bottom entry is an Explicit Null
      instruction (i.e., MPLS label 0), instantiated on PE Node 5.</t>

      <t>ABR Node 3 then forwards the packet to P Node 4. P Node 4 processes
      the prefix SID, removing the top entry from the SR-MPLS label stack and
      forwarding the packet to PE Node 5. PE Node 5 processes the Explicit
      Null instruction, removing the remaining SR-MPLS label stack entry and
      processing the payload.</t>

      <t><figure align="center" anchor="F-mpls-2-6"
          title="Encapsulation: SR-MPLS to IPv6">
          <artwork align="center"><![CDATA[
   <----------------------- SR Path 2 --------------------------

     ------       ------       ------       ------       ------
    | PE   |     |  P   |     | ABR  |     |  P   |     | PE   |
    |Node 1| --- |Node 2| --- |Node 3| --- |Node 4| --- |Node 5|
     ------       ------       ------       ------       ------

      Seg. A       Seg. B       Seg. C       Seg. D       Seg. E
            
       IPv6:          IPv6:           SR-MPLS:         SR-MPLS:         
        SA: Node 3     SA: Node 3      Seg. C           Seg. D
        DA: Seg. A      DA: Seg. B    Payload           Seg. C
       SRH:           SRH:                             Payload
        SL:  0         SL: 1
        SID: Seg. A    SID: Seg. A
       Payload       Payload

]]></artwork>
        </figure> <xref target="F-mpls-2-6"/> depicts the forwarding plane as
      a packet traverses SR Path 2, from Node 5 to Node 1. In this example, PE
      Node 5 receives an IPv4 packet.</t>

      <t>PE Node 5 encapsulates the IPv4 packet in an SR-MPLS label stack that
      contains two entries. The top entry represents a prefix SID instantiated
      on P Node 4. The bottom entry is a binding SID instantiated on ABR Node
      3.</t>

      <t>PE Node 5 then forwards the packet to P Node 4. P Node 4 processes
      the prefix SID, removing the top entry from the SR-MPLS label stack and
      forwarding the packet to ABR Node 3. ABR Node 3 processes binding SID,
      removing the remaining SR-MPLS label stack entry and replacing it with
      an SRv6 header. The SRv6 header contains an IPv6 header and an SRH. The
      Destination Address in the IPv6 header is a Segment Identifier (SID)
      that represents Segment B. Segment B is an END instruction instantiated
      on P Node 2. The SRH contains a Segments Left field and one SID. The
      Segments Left field is equal to 1 and the SID represents Segment A, an
      END.DT46 instruction instantiated on PE Node 1. That instruction causes
      the packet to be forwarded using the main IP forwarding table, not a VPN
      forwarding table.</t>

      <t>ABR Node 3 forwards the packet to P Node 2. When P Node 2 receives
      the packet, it processed the END instruction. It decrements the Segments
      Left field in the SRH and copies the SID from the SRH to the Destination
      Address field of the IPv6 header. It then forwards the packet to PE Node
      1. PE Node 1 processes its END.DT46 instruction, removing the SRv6
      header and processing the payload.</t>

      <section anchor="processing" title="END.DM Processing">
        <t>The End.DM SID MUST be the last segment in a SR Policy. Its
        arguments are associated with an SR-MPLS label stack.</t>

        <t>When Node N receives a packet destined to S and S is a locally
        instantiated End.DM SID, Node N executes the following procedure:</t>

        <t/>

        <figure>
          <artwork><![CDATA[
   S01. When an IPv6 Routing Header is processed {
   S02.   If (Segments Left != 0) {
   S03.      Send an ICMP Parameter Problem to the Source Address,
                Code 0 (Erroneous header field encountered),
                Pointer set to the Segments Left field,
                interrupt packet processing and discard the packet.
   S04.   }
   S05.   Proceed to process the next header in the packet
   S06. }


   When processing the Upper-layer header of a packet matching a FIB
   entry locally instantiated as an End.DM SID, N executes the following 
   procedure:

   S01. Decapsulate the packet (i.e., remove the outer IPv6 Header and all 
        its extension headers)
   S02. Push the SR-MPLS label stack that is associated with the END.DM 
        arguments. Set the MPLS Traffic Class and TTL values to reflect 
        the Traffic Class and Hop count values received in the IPv6 header.
   S03. Submit the packet to the MPLS FIB lookup for transmission to the 
        new destination]]></artwork>
        </figure>
      </section>
    </section>

    <section title="Control Plane">
      <t><figure align="center" anchor="BGP" title="BGP NLRI Exchange">
          <artwork align="center"><![CDATA[
<------------------- Customer Routes (iBGP) -------------->
                           
<-- PE and ABR Routes (iBGP) -> 
                             <-- PE and ABR Routes(BGP-LU) ->
 ------       ------       ------       ------       ------
| PE   |     |  P   |     | ABR  |     |   P  |     | PE   |
|Node 1| --- |Node 2| --- |Node 3| --- |Node 4| --- |Node 5|
 ------       ------       ------       ------       ------

<---------- SRv6 Domain ---------->
                         <--------- SR-MPLS Domain --------->
]]></artwork>
        </figure></t>

      <t>In the <xref target="BGP"/>, PE Node 1 and PE Node 5 exchange
      customer <xref target="RFC4271">Network Layer Reachability Information
      (NLRI)</xref> using either a direct BGP session or a <xref
      target="RFC4456">route reflector</xref>. All customer routes exchanged
      between PE Node 1 and PE Node 5 belong to the general routing instance.
      They cannot belong to a VPN.</t>

      <t>PE Node 1 exchanges loopback routes with ABR Node 3, using either a
      direct BGP session or a route reflector. Likewise, ABR Node 3 exchanges
      loopback with PE Node 5, using either a direct BGP session or a route
      reflector.</t>

      <t>PE Node 1 and ABR Node 3 bind SIDs to the loopback routes that they
      exchange, as described in <xref target="I-D.ietf-bess-srv6-services"/>.
      PE Node 5 and ABR Node 3 bind labels to the loopback routes that they
      exchange, as described in <xref target="RFC8277"/>.</t>

      <t>Both domains use an IGP to distribute link state information and
      establish connectivity within the domain.</t>

      <section anchor="path1Pro"
               title="Signaling SR Paths That Originate In The SRv6 Domain">
        <t>PE Node 5 advertises an IPv4 customer route to PE Node 1 using BGP
        as follows:</t>

        <t><list style="symbols">
            <t>IPv4 Prefix</t>

            <t>Next-hop: Loopback5.IPv4</t>
          </list></t>

        <t>This causes PE Node 1 to resolve the customer route through its
        route to Loopback5.IPv4. The following paragraphs describe how PE Node
        1 acquires a route to Loopback5.IPv4.</t>

        <t>PE Node 5 advertises Loopback5.IPv4 to ABR Node 3 using BGP Labeled
        Unicast (BGP-LU) as follows:</t>

        <t><list style="symbols">
            <t>Prefix: Loopback5.IPv4</t>

            <t>Next-hop: Loopback5</t>

            <t>Color Community: Color to distinguish between paths between ABR
            Node 3 and PE Node 5</t>

            <t>MPLS Label: Explicit Null (0)</t>
          </list></t>

        <t>Now, ABR Node 3 resolves its route to Loopback5.IPv4 through its
        IGP route to Loopback5. Therefore, when forwarding traffic bound for
        Loopback5.IPv4, it imposes:</t>

        <t><list style="symbols">
            <t>An SR-MPLS label stack associated with the IGP route to
            Loopback5</t>

            <t>An additional Explicit Null label</t>
          </list></t>

        <t>ABR Node 3 advertises Loopback5.IPv4 to PE Node 1 using BGP as
        follows:</t>

        <t><list style="symbols">
            <t>Prefix: Loopback5.IPv4</t>

            <t>Next-hop: Loopback3</t>

            <t>Color Community: Color to distinguish between paths between ABR
            Node 3 and PE Node 1</t>

            <t>SID: SID C (i.e., an END.DM SID instantiated on ABR Node 3)</t>
          </list>Now, PE Node 1 resolves its route to Loopback5.IPv4 through
        its IGP route to Loopback3. Therefore, when forwarding traffic bound
        for Loopback5.IPv4, it imposes an SRv6 header that includes the
        following SIDs:</t>

        <t><list style="symbols">
            <t>SIDS associated with the IGP route to Loopback3</t>

            <t>SID C</t>
          </list></t>
      </section>

      <section anchor="Path2Pro"
               title="Signaling SR Paths That Originate In The SR-MPLS Domain">
        <t>PE Node 1 advertises an IPv4 customer route to PE Node 5 using BGP
        as follows:</t>

        <t><list style="symbols">
            <t>IPv4 Prefix</t>

            <t>Next-hop: Loopback1</t>
          </list>This causes PE Node 5 to resolve the customer route through
        its route to Loopback1. The following paragraphs describe how PE Node
        5 acquires a route to Loopback1.</t>

        <t>PE Node 1 advertises Loopback1 to ABR Node 3 using BGP as
        follows:</t>

        <t><list style="symbols">
            <t>Prefix: Loopback1</t>

            <t>Next-hop: Loopback1</t>

            <t>Color Community: Color to distinguish between paths between ABR
            Node 3 and PE Node 1</t>

            <t>SID: SID A (i.e., An END.DT46 SID instantiation on PE Node 1.
            This instruction causes a packet to be forwarded using the main IP
            forwarding table, not a VPN forwarding table.)</t>
          </list>Now, ABR Node 3 resolves its route to Loopback1 through its
        IGP route to Loopback1. Therefore, when forwarding traffic bound for
        Loopback1, it imposes an SRv6 header that includes:</t>

        <t><list style="symbols">
            <t>SIDS associated with the IGP route to Loopback1</t>

            <t>SID A</t>
          </list>ABR Node 3 advertises Loopback1 to PE Node 5 using BGP-LU as
        follows:</t>

        <t><list style="symbols">
            <t>Prefix: Loopback1</t>

            <t>Next-hop: Loopback3</t>

            <t>Color Community: Color to distinguish between paths between ABR
            Node 3 and PE Node 5</t>

            <t>MPLS Label: A binding label that represents the SRv6 path
            between ABR Node 3 and PE Node 5</t>
          </list>Now, PE Node 5 resolves its route to Loopback1 through its
        IGP route to Loopback3. Therefore, when forwarding traffic bound for
        Loopback1, it imposes:</t>

        <t><list style="symbols">
            <t>An SR-MPLS label stack associated with the IGP route to
            ABR3</t>

            <t>An additional label representing a binding SID. The binding SID
            maps to the SRv6 path between ABR Node 3 and PE Node 5</t>
          </list></t>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>The authors will request an early allocation from the "SRv6 Endpoint
      Behaviors" sub-registry of the "Segment Routing Parameters"
      registry.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>Because SR inter-working requires co-operation between inter-working
      domains, this document introduces no security consideration beyond those
      addressed in <xref target="RFC8402"/>, <xref target="RFC8754"/> and
      <xref target="RFC8986"/>.</t>
    </section>

    <section anchor="contributors" title="Contributors">
      <t>1.Ketan Talaulikar</t>

      <t>Cisco Systems</t>

      <t>ketant.ietf@gmail.com</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>Thanks to Melchior Aelmans, Takuya Miyasaka and Jeff Tantsura for
      their comments.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.8200'?>

      <?rfc include='reference.RFC.2119'?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.8402'?>

      <?rfc include='reference.RFC.8754'?>

      <?rfc include='reference.RFC.8660'?>

      <?rfc include='reference.RFC.8986'?>

      <?rfc include='reference.RFC.4364'?>

      <?rfc include='reference.RFC.8277'?>

      <?rfc include='reference.RFC.4271'?>

      <?rfc include='reference.RFC.4456'?>

      <?rfc include='reference.I-D.ietf-bess-srv6-services'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.3031'?>

      <?rfc include='reference.I-D.hegde-spring-mpls-seamless-sr'?>
    </references>
  </back>
</rfc>
