<?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-spring-srv6-mpls-interworking-00"
     ipr="trust200902">
  <front>
    <title>SRv6 and MPLS interworking</title>

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

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>swaagraw@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>SPRING</workgroup>

    <keyword>interworking</keyword>

    <keyword>Segment Routing</keyword>

    <abstract>
      <t>This document describes SRv6 and MPLS/SR-MPLS interworking and co-existence 
      procedures.</t>

    </abstract>

    <note title="Requirements Language">
      <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">RFC 2119</xref>.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Many of the deployments require SRv6 insertion in the brownfield networks. 
      The incremental deployment of SRv6 into existing networks require SRv6 to
      interwork and co-exist with SR-MPLS/ MPLS.</t>

      <t>There are various SRv6 and SR-MPLS/ MPLS interworking scenarios possible.
      They can be classified into the following four categories.
       
       <list style="symbols">
       		<t>SRv6 over SR MPLS/ MPLS (6oM)</t>
			<t>SR MPLS/ MPLS over SRv6 (Mo6)</t>
			<t>SRv6 to SR-MPLS/ MPLS (6toM)</t>
			<t>SR-MPLS/ MPLS to SRv6 (Mto6)</t>
		</list>	
      </t>

      <t>These scenarios cover various cascading of SRv6/ MPLS network, e.g., 
      SR-MPLS/MPLS &lt;-&gt; SRv6 &lt;-&gt; SR-MPLS/MPLS &lt;-&gt; SRv6 &lt;-&gt; SR-MPLS/MPLS, etc. 
      The draft addresses all these possible interworking scenarios.</t>

      <t>In addition, the draft also addresses migration and coexistence of 
      the SRv6 and SR-MPLS/ MPLS. Co-existence means a network that supports 
      both SRv6 and MPLS in a given domain. This may be a transient state when 
      brownfield SR-MPLS/ MPLS network upgrades to SRv6 (migration) or permanent 
      state when some devices are not capable of SRv6 but supports native IPv6 
      and SR-MPLS/ MPLS.</t>
      
      <section title="Terminology">
        <t>SID: A Segment Identifier which represents a specific segment in
        segment routing domain.  The SID type used in this document is IPv6
        address (also referenced as SRv6 Segment or SRv6 SID).</t>
        <t>Node k has a classic IPv6 loopback address Ak::/128.</t>
         
        <t>A SID at node k with locator block B and function F is represented by B:k:F::
        </t>

        <t>A SID list is represented as &lt;S1, S2, S3&gt; where S1 is the first SID
        to visit, S2 is the second SID to visit and S3 is the last SID to
        visit along the SR path.</t>

        <t>(SA,DA) (S3, S2, S1; SL) represents an IPv6 packet with:</t>

        <t>-IPv6 header with source address SA, destination addresses DA and
        SRH as next-header</t>

        <t>-SRH with SID list &lt;S1, S2, S3&gt; with SegmentsLeft = SL</t>

        <t>Note the difference between the &lt;&gt; and () symbols: &lt;S1, S2, S3&gt;
        represents a SID list where S1 is the first SID and S3 is the last
        SID to traverse.  (S3, S2, S1; SL) represents the same SID list but
        encoded in the SRH format where the rightmost SID in the SRH is the
        first SID and the leftmost SID in the SRH is the last SID.  When
        referring to an SR policy in a high-level use-case, it is simpler
        to use the &lt;S1, S2, S3&gt; notation.  When referring to an
        illustration of the detailed packet behavior, the (S3, S2, S1; SL)
        notation is more convenient.</t>

        <t>domain: Without loss of the generality, domain is assumed to be instantiated 
        by a single IGP instance or a network within IGP if there is clear 
        separation of data plane.</t>

      </section>
    </section>

    <section title="Interworking Procedures">
      <t>This documents refers to interworking as a stitching of SRv6 domain and 
      SR-MPLS/ MPLS domain. Special stitching procedures are performed on routers 
      which acts as border between such domains. Border routers need to support 
      both SRv6 and SR-MPLS/ MPLS. Interworking is applicable when SRv6 domains 
      are deployed and need to interop with existing SR-MPLS/ MPLS backbones or 
      access networks.</t>

      <t>This draft proposes two ways to stitch heterogeneous domains: a controller
      based solution and a BGP signaling based approach. The PCE based solution is
      applicable to both best effort as well as deployments where tight SLA guarantees 
      are required (e.g., ODN like deployments scenarios). The BGP signaling covers 
      the best effort case. Specifically, the draft proposes the following two ways
      to stitch heterogeneous domains end to end:
        <list style="symbols">
        <t>Stitching using a Controller: An SDN based approach like Multi-Domain 
        On Demand Nexthop (ODN) case for SLA contract end to end across heterogeneous 
        domains. Path Computation Element (PCE) can act like the controller. 
        These procedures can be used when overlay prefixes have SLA requirement 
        signaled through a color community. These procedures can also be used for
        the best effort services.</t>

        <t>Stitching using BGP Inter-Domain Routing. BGP 3107 procedures advertising 
        PE locators/Loopbacks for best effort end to end connectivity. These 
        procedures are applicable in deployments where an SDN controller is not 
        deployed. These procedures can be used when overlay prefixes don't have 
        SLA requirement</t>
        </list></t>

      <t>In summary the draft covers the following SRv6/ MPLS interworking scenarios.
      <vspace blankLines="0" />
       -	Carrying SRv6 over SR-MPLS (controller stitches domains).
      <vspace blankLines="0" />
       -	Carrying SRv6 over SR-MPLS (BGP stitches domains).
      <vspace blankLines="0" />
       -	Carrying SR-MPLS over SRv6 (controller stitches domains).
      <vspace blankLines="0" />
       -	Carrying SR-MPLS over SRv6 (BGP stitches domains).
       <vspace blankLines="0" />
       -	SRv6 to SR-MPLS translation (controller stitches domains).
       <vspace blankLines="0" />
       -	SRv6 to SR-MPLS translation (BGP stitches domains).
       <vspace blankLines="0" />
       -	SR-MPLS to SRv6 translation (controller stitches domains).
       <vspace blankLines="0" />
       -    SR-MPLS to SRv6 translation (BGP stitches domains).
       <vspace blankLines="0" />
       -    Cascaded domains (controller stitches domains).
       <vspace blankLines="0" />
       -    Cascaded domains (BGP stitches domains).
      </t>
      
      <t>While the number of interworking scenarios is large, the few building blocks
      outlines in this draft address all of them. For the same reasons, without the 
      loss of generality, the building blocks are illustrated using the SRv6 over 
      SR-MPLS example of Figure 1 but the procedure equally applies to the other 
      deployment scenarios.</t>
      
      <figure anchor="fig_6oM">
           <preamble></preamble>
           <artwork>
                  2                       5                       8
               *     *                 /     \                 *     *  
            *           *           /           \           *           *
         *                 *     /                 \     *                 *
      1         SRv6          4         MPLS          7         SRv6          10
         *      IGP1       *     \      IGP2       /     *      IGP3       *
            *             *         \           /           *           *
               *     *                 \     /                 *     *
                  3                       6                       9

           </artwork>
           <postamble>Example Network Scenario(6oM)</postamble>
       </figure>
    </section>

    <section title="Building blocks 
    for domain stitching">
      <section title="Stitching heterogenous domains using a Controller">
        <t>This procedure provides a best-effort path as well as a path that satisfies 
        the Service Level Agreement (SLA), across multiple domains. A PCE may act as 
        an SDN controller. In that case, based on the SLA, the PCE computes and 
        programs end to end path. The PCE is also aware of interworking requirement at 
        border nodes, as each domain feeds topological information to the controller 
        through BGP LS feeds. Intermediate domain of different data plane type is 
        represented by Binding SID (BSID) of head end type in SID list. The intermediate 
        domain BSID is programmed at domain entry border node with SID list through 
        domain and exit node SID as last segment. In summary, an intermediate 
        heterogenous domain is replaced by a BSID of the data plane nature of headend. 
        The procedure work for all of deployment model mentioned above.</t>
      
        <section title="Illustration">

          <t>The procedure is illustrated using the example of Figure 1. </t>

          <t>When a service prefix (e.g., vpn or evpn) is received on head end with 
          SLA (color extended community), the head- end (Node 1) node requests a PCE 
          for a path to egress node that can satisfy the SLA. This is because Node 1 
          does not know how to compute the traffic engineered path through the 
          multi-domain network to node 10. Node 1 requests SR PCE to compute a path 
          to node 10 providing optimization objective, constraints(eg: low latency). 
          The PCE computes low latency path via node 2, 5 and 8. The PCE identifies 
          the end-to-end path is not consistent data plane and kicks in interworking 
          procedures at the border node(4). It programs a policy at 4 that "Stitches" 
          domains using SRv6 End.BM BSID.The PCE installs SRv6 End.BM BSID at node 4 
          with segments are node 5, 7. SR PCE responds back to node 1 with SRv6 
          segments via node 2, End.BM at node 4, node 8 and node 10. 
          </t>

          <t>The data plan operations for the above-mentioned interworking example are 
          described in the following:
          
            <list style="symbols">
            <t>Node 1 performs SRv6 function T.Encaps.Red with VPN service SID and 
            SRv6 Policy (BLUE,10):
            <vspace blankLines="0" />
            Packet leaving node 1 IPv6 ((A:1::, B:2:E::)
                                        (B:10::DT4, B:8:E::, B:4:BM-BLUE-7:: ; SL=3))
            </t>
            <t>Node 2 performs End function
            <vspace blankLines="0" />
            Packet leaving node 2 IPv6 ((A:1::, B:4:BM-BLUE-7::)
                                        (B:10::DT4, B:8:E::, B:4:BM-BLUE-7:: ; SL=2))
            </t>
            <t>Node 4 performs End.BM function
            <vspace blankLines="0" />
            Packet leaving node 4 MPLS (16005,16007,2)((A:1::, B:8:E::)
                                        (B:10::DT4, B:8:E::, B:4:BM-BLUE-7-:: ; SL=1))
            </t>
            <t>Node 7 performs a native ipv6 lookup on due PHP behavior for 16007
            <vspace blankLines="0" />
            Packet leaving node 7 IPv6 ((A:1::, B:8:E::)
                                        (B:10::DT4, B:8:E::, B:4:BM-BLUE-7:: ; SL=1))
            </t>
            <t>Node 8 performs End(PSP) function
            <vspace blankLines="0" />
            Packet leaving node 8 IPv6 ((A:1::, B:10::DT4))
            </t>
            <t>Node 10 performs End.DT function and lookups IP in vrf and 
            send traffic to CE.</t>
            </list>
          </t>
        </section>
      </section>
      
      <section title="Stitching heterogenous domains usin BGP inter domain routing">
      <t>For providing services across domains, edge node locators need to be reachable.
      </t>

      <t>-Locators are advertised by edge nodes in the BGP ipv6 unicast address family
       (AFI=2,Safi=1) to border nodes. These locators are also advertised in its local 
       IGP domain.</t> 
      <t>-On border nodes these prefixes are like any IPv6 global prefixes. These will be 
       advertised in BGP IPv6 LU[AFI=2/SAFI=4] session using 3107 procedures in label 
       core. It could be summary prefix for all locators in that domain.</t>
      <t>-Remote domain border router advertising locator over SRv6 domain need to attach 
      SRv6 SID in prefix SID attribute. SRv6 SID in this case will be End function of 
      advertising border node.</t>
      <t>-Ingress node learns remote locators over BGP ipv6 address family[AFI=2, SAFI=1]. 
      These locators have prefix SID attribute containing SRv6 SID. This SRv6 SID is End 
      function of advertising border node and helps to tunnel traffic to border node in 
      remote domain.</t>
      <t>-If locators are leaked into remote IGP and no tunneling of traffic will be needed 
       in remote domain. Hence attaching SRv6 SID on remote border nodes can be avoided.
      </t>

      <t>These procedures work for any of deployment model mentioned above. Below are 
      some important aspects for Mo6, 6toM, Mto6
      <vspace blankLines="0" />
      -Loopback address are advertised in BGP label unicast session to border node when 
       advertised from MPLS domain. These are also advertised in local IGP.
      <vspace blankLines="0" />
      -Border nodes advertises prefix over SRv6 domain in BGP IPv4/IPv6 session. 
       It attaches prefix SID attribute with SRv6 SID. This SRv6 SID maps to label 
       received in prefix update.
      -Remote border node allocates local label to advertise prefix in MPLS domain to 
       ingress node. This local label maps to received SRv6 SID in prefix sid attribute
       of prefix.
      </t> 
      </section>
      
      <section title="6toM and Mto6 considerations">
      <t>For 6toM and Mto6  BGP inter domain or ODN multi domain stitching will work 
      if SRv6 edge nodes are capable of handling vpn/service label. In 6toM scenario, 
      ingress node should be able to encap vpn label and then perform T.Encap function 
      with SRv6 SID associated with prefix nexthop. In Mto6 case, traffic will be 
      received with SRv6 SID and vpn label below it on egress PE. So egress SRv6 capable 
      node should be able to process vpn labels after decapsulating SRv6 SID and when 
      next header is 137 in IPv6 header.</t>
      
      <t>Service information encoded by SRv6 PE will be in SRv6 Service SID and MPLS PE 
      will be vpn label/service label or just IP payload for internet. If SRv6 PE do not 
      support vpn label, then we need some special handling to translate SRv6 service 
      SID to vpn label and vice versa at border nodes. This will be detailed in future
      versions</t>
      </section>
    </section>
    
    <section title="FRR handling">
    <t>Failure within domain are taken care by existing FRR(TILFA, rLFA, LFA etc) 
    mechanisms.</t>
    <t>Failure of border nodes are to be addressed in a future version of the document.
    </t>
    </section>
    
    <section title="Migration and co-existence">
    <t>These procedures would be detailed in a future revision</t>
    </section>
    
    <section title="BGP based services interworking and migration">
    <t>SRv6-based VPN (SRv6-VPN)/EVPN service information is encoded in SRv6 SIDs 
    specifically END.DT*/END.DX*/END.DT2. MPLS-based VPN service information is 
    encoded in labels. This requires special consideration during Migration and 
    Interworking. Will be discussed more detail in future versions</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>None</t>
    </section>

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

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t/>
    </section>
  </middle>

  <back>
    <references title="Normative References">
       <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?>
    </references>
  </back>
</rfc>
