<?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-ietf-spring-mpls-path-segment-02"
     ipr="trust200902">
  <front>
    <title abbrev="Path Segment in SR-MPLS">Path Segment in MPLS Based Segment
    Routing Network</title>

    <author fullname="Weiqiang Cheng" initials="W." surname="Cheng">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>chengweiqiang@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Han Li" initials="H." surname="Li">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>lihan@chinamobile.com</email>
      </address>
    </author>

    <author fullname="Mach(Guoyi) Chen" initials="M." surname="Chen">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>mach.chen@huawei.com</email>
      </address>
    </author>

    <author fullname="Rakesh Gandhi " initials="R." surname="Gandhi">
      <organization>Cisco Systems, Inc.</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

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

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

    <author fullname="Royi Zigler" initials="R." surname="Zigler">
      <organization>Broadcom</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>royi.zigler@broadcom.com</email>
      </address>
    </author>

    <date day="26" month="February" year="2020"/>

    <area>Routing Area</area>

    <workgroup>SPRING Working Group</workgroup>

    <abstract>
      <t>A Segment Routing (SR) path is identified by an SR segment list. Only
      the complete segment list can identify the end-to-end SR path, and
      a sub-set of segments from the segment list cannot distinguish one SR path from
      another as they may be partially congruent. SR path
      identification is a pre-requisite for various use-cases such as
      Performance Measurement (PM), bidirectional paths correlation, and
      end-to-end 1+1 path protection.</t>

      <t>In SR for MPLS data plane (SR-MPLS), the segment identifiers are
      stripped from the packet through label popping as the packet transits
      the network. This means that when a packet reaches the egress of the SR
      path, it is not possible to determine on which SR path it traversed the
      network.</t>

      <t>This document defines a new type of segment that is referred to as
      Path Segment, which is used to identify an SR path in an SR-MPLS
      network. When used, it is inserted by the ingress node of the SR path
      and immediately follows the last segment identifier in the segment list
      of the SR path. The Path Segment will not be popped off until it reaches
      the egress node of the SR path. The Path Segment then can be used by
      the egress node to implement SR path identification and correlation.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>Segment Routing (SR) <xref target="RFC8402"/> is a source routed
      forwarding method that allows to directly encode forwarding instructions
      (called segments) in each packet, hence it enables steering traffic
      through a network without the per-flow states maintained on the transit
      nodes. Segment Routing can be instantiated on an MPLS data plane or an
      IPv6 data plane. The former is called SR-MPLS <xref target="RFC8660"/>,
      the latter is called SRv6 <xref target="RFC8402"/>. SR-MPLS leverages
      the MPLS label stack to construct an SR path.</t>

      <t>In an SR-MPLS network, when a packet is transmitted along an SR path,
      the labels in the MPLS label stack will be swapped or popped. So that no
      label or only the last label (e.g. Explicit-Null label) may be left in
      the MPLS label stack when the packet reaches the egress node. Thus, the
      egress node cannot determine along which SR path the packet came.</t>

      <t>However, to support various use-cases in SR-MPLS networks, 
      like end-to-end 1+1 path
      protection (Live-Live case) <xref target="RFC4426"/>, 
      bidirectional path <xref target="RFC5654"/>, or
      Performance Measurement (PM) <xref target="RFC7799"/>, 
      the ability to implement path
      identification on the egress node is a pre-requisite.</t>

      <t>Therefore, this document introduces a new segment type that is
      referred to as the Path Segment. A Path Segment is defined to uniquely
      identify an SR path in an SR-MPLS network in the context of the egress
      node. It is normally used by the egress nodes for path identification
      hence to support various use-cases including SR path
      PM, end-to-end 1+1 SR path protection, and bidirectional SR paths
      correlation.</t>

      <section title="Requirements Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
        NOT&ldquo;, "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
        "MAY", and "OPTIONAL" in this document are to be interpreted as
        described in <xref target="RFC2119"/> <xref target="RFC8174">
        </xref> when, and only when, they appear in all capitals, as shown
        here.</t>
      </section>

      <section title="Abbreviations">
        <t>DM: Delay Measurement.</t>

        <t>LM: Loss Measurement.</t>

	<t>MPLS: Multiprotocol Label Switching.</t>

	<t>MSD: Maximum SID Depth.</t>

        <t>PM: Performance Measurement.</t>

        <t>PSID: Path Segment ID.</t>

        <t>SID: Segment ID.</t>

        <t>SL: Segment List.</t>

        <t>SR: Segment Routing.</t>

        <t>SR-MPLS: Segment Routing instantiated on MPLS data plane.</t>
      </section>
    </section>

    <section title="Path Segment">
      <t>A Path Segment is a single label that is assigned from the Segment
      Routing Local Block (SRLB) or Segment Routing Global Block (SRGB) or dynamic MPLS label pool of the
      egress node of an SR path. It means that the Path Segment is unique in
      the context of the egress node of the SR path. When a Path Segment is
      used, the Path Segment MUST be inserted at the ingress node and MUST
      immediately follow the last label of the SR path, in other words, inserted 
      after the routing segment (adjacency/node/prefix segment) pointing to the egress node.</t>
 
      <t>The Path Segment may be used to identify an SR-MPLS Policy, its
      Candidate-Path (CP), or a SID List (SL) <xref
      target="I-D.ietf-spring-segment-routing-policy"/> terminating on an
      egress node depending on the use-case.</t>

      <t>The value of the TTL field in the MPLS label stack entry containing
      the Path Segment MUST be set to the same value as the TTL of the last
      label stack entry for the last segment in the SR path. If the Path
      Segment is the bottom label, the S bit MUST be set.</t>

      <t>Normally, the intermediate nodes will not see the Path Segment label
      and do not know how to process it. A Path Segment presenting to an
      intermediate node is an error condition.</t>

      <t>A Path Segment can be used in the case of Penultimate Hop Popping (PHP), where some labels are 
      be popped off at the penultimate hop of an SR path, but the Path Segment
      MUST NOT be popped off until it reaches at the egress node.</t>

      <t>The egress node MUST pop the Path Segment. The egress node MAY use
      the Path Segment for further processing. For example, when performance
      measurement is enabled on the SR path, it can trigger packet counting or
      timestamping.</t>

      <t>In some deployments, service labels may be added after the Path Segment 
      label in the MPLS label stack. In this case, the egress node MUST be capable
      of processing more than one label. The additional processing required 
      can have an impact on forwarding performance.</t>

      <t>Generic Associated Label (GAL) is used for Operations, 
      Administration and Maintenance (OAM) 
      in MPLS networks <xref target="RFC5586"/>. When GAL is used, it MUST be
      added at the bottom of the label stack after the Path Segment label.</t>
 
      <t>Entropy label and Entropy Label Indicator (ELI) as described in  
      <xref target="RFC8662"/>
      for SR-MPLS path, can be placed before or after
      the Path Segment label in the MPLS label stack.</t>

      <t>The SR path computation needs to know the Maximum SID
      Depth (MSD) that can be imposed at each node/link of a given SR path <xref
      target="RFC8664"/>.
      This ensures that the SID stack depth of a
      computed path does not exceed the number of SIDs the node is capable
      of imposing. The MSD used for path computation MUST include the Path Segment label.</t>

      <t>The label stack with Path Segment is shown in Figure 1:</t>

      <t><figure>
          <artwork>            +--------------------+
            |       ...          |
            +--------------------+
            |      Label 1       |
            +--------------------+
            |      Label 2       |
            +--------------------+
            |       ...          |
            +--------------------+
            |      Label n       |
            +--------------------+
            |     Path Segment   |
            +--------------------+
            |       ...          |
            +--------------------+
            ~       Payload      ~
            +--------------------+

   Figure 1: Label Stack with Path Segment

</artwork>
        </figure>Where:</t>

      <t><list style="symbols">
          <t>The Labels 1 to n are the segment label stack used to direct how
          to steer the packets along the SR path.</t>

          <t>The Path Segment identifies the SR path in the context of the
          egress node of the SR path.</t>
        </list></t>
    </section>

    <section title="Path Segment Allocation">
      <t>Several ways can be used to allocate the Path Segment.</t>

      <t>One way is to set up a communication channel (e.g., MPLS Generic
      Associated Channel (G-ACh)) <xref target="RFC5586"/> between the ingress
      node and the egress node, and the ingress node of the SR path can
      directly send a request to the egress node to allocate a Path
      Segment.</t>

      <t>Another way is to leverage a centralized controller (e.g., SDN
      controller) to assign the Path Segment. In this case, the controller
      MUST make sure (e.g., by some capability discovery mechanisms outside
      the scope of this document) that the egress node knows the Path Segment
      and it can process it, as well as the label does not collide with 
      any label allocation done by the egress node.</t>

      <t>Path Computation Element Protocol (PCEP) based Path Segment
      allocation for SR Policy is defined in <xref
      target="I-D.ietf-pce-sr-path-segment"/>. Also, BGP based Path Segment
      allocation for SR Policy is defined in <xref
      target="I-D.li-idr-sr-policy-path-segment"/>.</t>
    </section>

    <section title="Nesting of Path Segments">
      <t>Binding SID (BSID) <xref target="RFC8402"/> can be used for SID list
      compression. With BSID, an end-to-end SR path can be split into several
      sub-paths, each sub-path is identified by a BSID. Then an end-to-end SR
      path can be identified by a list of BSIDs, therefore, it can provide
      better scalability.</t>

      <t>BSID and Path SID (PSID) can be combined to achieve both sub-path and
      end-to-end path monitoring. A reference model for such a combination in
      (Figure 2) shows an end-to-end path (A-&gt;D) that spans three domains
      (Access, Aggregation and Core domain) and consists of three sub-paths,
      one in each sub-domain (sub-path (A-&gt;B), sub-path (B-&gt;C) and
      sub-path (C-&gt;D)). Each sub-path is allocated a BSID. For nesting the
      sub-paths, each sub-path is allocated a PSID. Then, the SID list of the
      end-to-end path can be expressed as &lt;BSID1, BSID2, ..., BSIDn,
      e-PSID&gt;, where the e-PSID is the PSID of the end-to-end path. The SID
      list of a sub-path can be expressed as &lt;SID1, SID2, ...SIDn,
      s-PSID&gt;, where the s-PSID is the PSID of the sub-path.</t>

      <t>Figure 2 shows the details of the label stacks when PSID and BSID are
      used to support both sub-path and end-to-end path monitoring in a
      multi-domain scenario.</t>

      <t><figure>
          <artwork>         /--------\       /--------\       /--------\
       /            \   /            \   /            \
     A{    Access    }B{  Aggregation }C{     Core     }D
       \            /   \            /   \            / 
         \--------/       \--------/       \--------/
       Sub-path(A-&gt;B)    Sub-path(B-&gt;C)   Sub-path(C-&gt;D)
    |&lt;---------------&gt;|&lt;--------------&gt;|&lt;--------------&gt;|
                          E2E Path(A-&gt;D)
    |&lt;-------------------------------------------------&gt;|

 +------------+  
 ~A-&gt;B SubPath~  
 +------------+  +------------+ 
 |s-PSID(A-&gt;B)|  ~B-&gt;C SubPath~
 +------------+  +------------+  
 | BSID(B-&gt;C) |  |s-PSID(B-&gt;C)|  
 +------------+  +------------+  +------------+
 | BSID(C-&gt;D) |  | BSID(C-&gt;D) |  ~C-&gt;D SubPath~
 +------------+  +------------+  +------------+  +------------+
 |e-PSID(A-&gt;D)|  |e-PSID(A-&gt;D)|  |e-PSID(A-&gt;D)|  |e-PSID(A-&gt;D)|
 +------------+  +------------+  +------------+  +------------+

             Figure 2: Nesting of Path Segments
</artwork>
        </figure></t>
    </section>

    <section title="Path Segment for Performance Measurement">
      <t>As defined in <xref target="RFC7799"/>, performance measurement can
      be classified into Passive, Active, and Hybrid measurement.</t>

      <t>For Passive performance 
      measurement, path identification at the measuring points is the
      pre-requisite. Path Segment can be used by the measuring points (e.g.,
      the ingress and egress nodes of the SR path or a centralized controller) to
      correlate the packet counts and timestamps from the ingress and
      egress nodes for a specific SR path, then packet loss and delay can be
      calculated for the end-to-end path, respectively.</t>

      <t>Path Segment can also be used for Active performance measurement 
      for an SR path in SR-MPLS networks for 
      collecting packet counters and timestamps from the egress node using probe messages 
      <xref target="I-D.gandhi-mpls-rfc6374-sr"/> and <xref
      target="I-D.gandhi-spring-twamp-srpm"/>.</t>

      <t>Path Segment can also be used for In-situ OAM for SR-MPLS 
      to identify the SR Path associated with the in-situ data fields in the data
      packets on the egress node <xref target="I-D.gandhi-mpls-ioam-sr"/>.</t>

      <t>Path Segment can also be used for In-band PM for SR-MPLS to identify the 
      SR Path associated with the collected performance metrics 
      <xref target="I-D.cheng-mpls-inband-pm-encapsulation"/>.</t>

    </section>

    <section title="Path Segment for Bidirectional SR Path">
      <t>In some scenarios, for example, mobile backhaul transport networks,
      there are requirements to support bidirectional paths, and the path is
      normally treated as a single entity. The both directions of the path have
      the same fate, for example, failure in one direction will result in
      switching traffic at both directions.
      MPLS supports this by introducing the concepts of co-routed
      bidirectional LSP and associated bidirectional LSP <xref target="RFC5654"/>. </t>

      <t>In the current SR architecture, an SR path is a unidirectional
      path <xref target="RFC8402"/>. In order to support
      bidirectional SR paths, a straightforward way is to bind two unidirectional
      SR paths to a single bidirectional SR path. Path Segments can then be used to
      identify and correlate the traffic for the two unidirectional SR paths at both ends
      of the bidirectional path.</t>

      <t><xref target="I-D.ietf-pce-sr-bidir-path"/> defines procedures on how to use PCEP
      for SR Policy to initiate a bidirectional SR path. Also, <xref
      target="I-D.li-idr-sr-policy-path-segment"/> defines procedures on how to use BGP 
      for SR Policy to initiate a bidirectional SR path.</t>
    </section>

    <section title="Path Segment for End-to-end Path Protection">
      <t>For end-to-end 1+1 path protection (i.e., Live-Live case), the egress
      node of the path needs to know the set of paths that constitute the
      primary and the secondaries, in order to select the primary path packets
      for onward transmission, and to discard the packets from the secondaries
      <xref target="RFC4426"/>.</t>

      <t>To do this in Segment Routing, each SR path needs a path identifier
      that is unique at the egress node. For SR-MPLS, this can be the
      Path Segment label allocated by the egress node.</t>

      <t>There then needs to be a method of binding this SR path identifiers
      into equivalence groups such that the egress node can determine for
      example, the set of packets that represent a single primary path.
      It is obvious that this equivalence group can be instantiated in the
      network by an SDN controller using the Path Segments of the SR paths.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not introduce additional security requirements and
      mechanisms other than the ones described in <xref
      target="RFC8402"/>.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document does not require any IANA actions.</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.8660'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.li-idr-sr-policy-path-segment'?>

      <?rfc include='reference.I-D.ietf-pce-sr-path-segment'?>

      <?rfc include='reference.I-D.ietf-pce-sr-bidir-path'?>

      <?rfc include='reference.I-D.gandhi-spring-twamp-srpm'?>

      <?rfc include='reference.I-D.gandhi-mpls-ioam-sr'?>

      <?rfc include='reference.I-D.gandhi-mpls-rfc6374-sr'?>

      <?rfc include='reference.I-D.ietf-spring-segment-routing-policy'?>

      <?rfc include='reference.I-D.cheng-mpls-inband-pm-encapsulation'?>

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

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

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

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

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

      <?rfc include='reference.RFC.7799'?>
    </references>

    <section anchor="Acknowledgements" numbered="no" title="Acknowledgements">
      <t>The authors would like to thank Adrian Farrel, Stewart Bryant, Shuangping Zhan,
      Alexander Vainshtein, Andrew G. Malis, Ketan Talaulikar, Shraddha Hegde, and Loa Andersson for their
      review, suggestions and comments to this document.</t>

      <t>The authors would like to acknowledge the contribution from Alexander
      Vainshtein on "Nesting of Path Segments".</t>
    </section>

    <section numbered="no" title="Contributors">
      <t>The following people have substantially contributed to this
      document:</t>

     <t><figure>
        <artwork><![CDATA[ Cheng Li
 Huawei Technologies

 EMail: chengli13@huawei.com


 Lei Wang
 China Mobile

 Email: wangleiyj@chinamobile.com


 Aihua Liu
 ZTE Corp

 Email: liu.aihua@zte.com.cn


 Greg Mirsky
 ZTE Corp

 Email: gregimirsky@gmail.com
    
]]></artwork>
        </figure></t>

    </section>
  </back>
</rfc>
