<?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-xu-pce-sr-sfc-05" ipr="trust200902">
  <front>
    <title abbrev="">PCEP Extensions for Unifed Source Routing-based
    SFC</title>

    <author fullname="Xiaohu Xu" initials="X.X." surname="Xu">
      <organization>Huawei</organization>

      <address>
        <!--
       <postal>
         <street></street>
-->

        <!-- Reorder these if your country does things differently -->

        <!--
         <city>Soham</city>

         <region></region>

         <code></code>

         <country>UK</country>
       </postal>

       <phone>+44 7889 488 335</phone>
-->

        <email>xuxiaohu@huawei.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="JIanjie You" initials="J.Y." surname="You">
      <organization/>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>jianjie.you@gmail.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Siva Sivabalan" initials="S.S" surname="Sivabalan">
      <organization>Cisco</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>msiva@cisco.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Himanshu Shah" initials="H.S." surname="Shah">
      <organization>Ciena</organization>

      <address>
        <!--
       <postal>
         <street></street>
-->

        <!-- Reorder these if your country does things differently -->

        <!--
         <city>Soham</city>

         <region></region>

         <code></code>

         <country>UK</country>
       </postal>

       <phone>+44 7889 488 335</phone>
-->

        <email>hshah@ciena.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="Luis M. Contreras" initials="L.M." surname="Contreras">
      <organization>Telefonica I+D</organization>

      <address>
        <postal>
          <street>Ronda de la Comunicacion, s/n</street>

          <street>Sur-3 building, 3rd floor</street>

          <city>Madrid,</city>

          <code>28050</code>

          <country>Spain</country>
        </postal>

        <email>luismiguel.contrerasmurillo@telefonica.com</email>

        <uri>http://people.tid.es/LuisM.Contreras/</uri>
      </address>
    </author>

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

      <address>
        <postal>
          <street/>
        </postal>

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

    <author fullname="Shaowen Ma" initials="S.M." surname="Ma">
      <organization>Juniper</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>mashaowen@gmail.com</email>

        <uri/>
      </address>
    </author>

    <date month="" year="2017"/>

    <area>Routing Area</area>

    <workgroup>PCE Working Group</workgroup>

    <keyword>Sample</keyword>

    <keyword>Draft</keyword>

    <abstract>
      <t>MPLS-SPRING (a.k.a., MPLS Segment Routing) could be leveraged to
      realize a unified source routing mechanism across MPLS, IPv4 and IPv6
      data planes by using a unified source routing instruction set while
      preserving backward compatibility with MPLS-SPRING. More specifically,
      the source routing instruction set information contained in a source
      routed packet could be uniformly encoded as an MPLS label stack no
      matter the underlay is IPv4, IPv6 or MPLS. The unified source routing
      mechanism could be leveraged to realize a transport-independent service
      function chaining by encoding the service function path information or
      service function chain information as an MPLS label stack. This document
      describes extensions to the Path Computation Element Protocol (PCEP)
      that allow a PCE to compute and instantiate service function paths in
      the unifed source routing based service function chaining context. The
      extensions specified in this document are applicable to both the
      stateless PCE model and the stateful PCE model.</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>Service Function Chaining <xref target="RFC7665"/> provides a
      flexible way to construct services. When applying a particular Service
      Function Chain (SFC) to the traffic classified by the Classifier, the
      traffic needs to be steered through an ordered set of Service Function
      Forwarders (SFF) and Service Functions (SF) in the network. This ordered
      set of SFFs and SFs in the network, referred to as a Service Function
      Path (SFP), is an instantiation of the SFC in the network. For example,
      as shown in Figure 1, an SFP corresponding to the SFC of {SF1, SF3} can
      be expressed as {SFF1, SF1, SFF2, SF3}.</t>

      <t><figure>
          <artwork align="center"><![CDATA[            +-------+
         +--+  PCE  |
         |  +-------+
         |
         |
         |
         |   +-------------------------------------------------+
         |   |                                MPLS-SR Netowrks |
         |   |         +-----+   +-----+                       |
         |   |         | SF1 |   | SF2 |                       |
         |   |         +--+--+   +--+--+                       |
         |   |            |         |                          |
         |   |         ^  |         |                          |
         |   |      (2)|  +---+ +---+                          |
         |   |         +--+   | |                              |
        ++---------+      |   | |          +--------------+    |
        |    +----+|      V   | |          |   +-----+    |    |
        |    |PCC || (1)  +---+-+----+ (3) |   | SF3 |    |    |
    --> |SFC +----+|----> |   SFF1   |---->|   +-----+    |---->
    ----+Classifier+------+          +-----+    SFF2      +--------
        +----------+      +----------+     +--------------+    |
             |                                                 |
             +-------------------------------------------------+

             Figure 1: PCE-based Service Function Chaining in MPLS-SR Network]]></artwork>
        </figure></t>

      <t>MPLS-SPRING (a.k.a., MPLS Segment Routing) could be leveraged to
      realize a unified source routing mechanism across MPLS, IPv4 and IPv6
      data planes by using a unified source routing instruction set while
      preserving backward compatibility with MPLS-SPRING as descried in <xref
      target="I-D.xu-mpls-unified-source-routing-instruction"/>. More
      specifically, the source routing instruction set information contained
      in a source routed packet could be uniformly encoded as an MPLS label
      stack no matter the underlay is IPv4, IPv6 or MPLS. The unified source
      routing mechanism in turn could be leveraged to realize a
      transport-independent service function chaining by encoding the service
      function path information or service function chain information as an
      MPLS label stack as described in <xref
      target="I-D.xu-mpls-service-chaining"/>.</t>

      <t>This document describes extensions to the Path Computation Element
      Protocol (PCEP) that allow a PCE to compute and instantiate service
      function paths in the MPLS source routing based service function
      chaining context. More specifically, the PCC provides an ordered list of
      SF IDs to the PCE and indicates to the PCE that what type SFs and paths
      are requested (e.g., an SFP, or a compact SFP, or an SR-specific SFP, or
      a compact SR-specific SFP) through the path computation request message,
      and then the PCE responds with a corresponding path through the path
      computation response message. The extensions specified in this document
      are applicable to both the stateless PCE model <xref target="RFC5440"/>
      and the stateful PCE model <xref
      target="I-D.ietf-pce-stateful-pce"/>.</t>
    </section>

    <section anchor="Teminology" title="Terminology">
      <t>This memo makes use of the terms defined in <xref target="RFC5440"/>,
      <xref target="I-D.ietf-pce-segment-routing"/> and <xref
      target="I-D.xu-mpls-service-chaining"/>. In addition, this memo defines
      the following two additional terms:</t>

      <t><list>
          <t>Compact SFP: An ordered list of SFFs.</t>

          <t>SR-specific SFP: An ordered list of node SIDs (representing SFFs)
          and Service Function SIDs.</t>

          <t>Compact SR-specific SFP: An ordered list of node SIDs
          (representing SFFs).</t>
        </list></t>
    </section>

    <section anchor="Advertising"
             title="PCEP Message Extensions for MPLS Source Routing-based SFC">
      <t/>

      <section title="PCReq Message">
        <t>This document does not specify any changes to the PCReq message
        format. This document requires the PATH-SETUP-TYPE TLV <xref
        target="I-D.ietf-pce-lsp-setup-type"/> to be carried in the RP Object
        in order for a PCC to request a particular type of path. Four new Path
        Setup Types need to be defined for MPLS source routing-based SFC (see
        Section 4.2). This document also requires the Include Route Object
        (IRO) to be carried in the PCReq message in order for a PCC to specify
        an SFC. A new IRO sub-object type needs to be defined for SF (see
        Section 4.3).</t>
      </section>

      <section title="PCRep Message">
        <t>This document defines the format of the PCRep message carrying an
        SFP. The message is sent by a PCE to a PCC in response to a previously
        received PCReq message, where the PCC requested an SFP. The format of
        the SFC-specific PCRep message is defined as follows:</t>

        <figure>
          <artwork><![CDATA[           <PCRep Message>::=<Common Header>
                             <response-list>
              Where:
               <response-list>::=<response>[<response-list>]
               <response>::=<RP>
                            [<NO-PATH>]
                            [<path-list>]
               Where:
                <path-list>::=<SR-SFC-ERO>[<path-list>]
]]></artwork>
        </figure>

        <t>The RP and NO-PATH Objects are defined in <xref target="RFC5440"/>.
        The &lt;SR-SFC- ERO&gt; object contains an SFP and is defined in
        Section 4.4.</t>
      </section>

      <section title="PCUpd Message">
        <t>This document defines the format of the PCUpd message carrying an
        SFP update. The message is sent forwardly by a PCE to a PCC to update
        an previously computed SFP.</t>

        <t>The format of the PCUpd message is defined as follows:</t>

        <t><figure>
            <artwork><![CDATA[
           <PCUpd Message>::=<Common Header>
                             <udpate-request-list>
           Where:
            <udpate-request-list>::=<udpate-request>[<udpate-request-list>]
            <udpate-request>::=<SRP><path-list>
            Where:
             <path-list>::=<SR-SFC-ERO>[<path-list>]
]]></artwork>
          </figure></t>
      </section>

      <section title="PCRpt Message">
        <t>PCPRpt message sent from a PCC to PCE as a respond to a PCUpd
        message or in an unsolicited manner (e.g., during state
        synchronization).</t>

        <t>The format of the PCUpd message is defined as follows:</t>

        <figure>
          <artwork><![CDATA[              <PCUpd Message>::=<Common Header>
                                <state-report-list>
              Where:
               <state-report-list>::=<state-report>[<state-report-list>]
               <state-report>::=[<SRP>]<path-list>
               Where:
                <path-list>::=<SR-SFC-ERO>[<path-list>]]]></artwork>
        </figure>

        <t/>
      </section>
    </section>

    <section title="Object Formats">
      <t/>

      <section title="OPEN Object">
        <t>This document defines a new optional TLV for use in the OPEN
        Object.</t>

        <section title="SR-SFC PCE Capability TLV">
          <t>The SR-SFC-PCE-CAPABILITY TLV is an optional TLV for use in the
          OPEN Object to negotiate SR-SFC capability on the PCEP session. The
          format of the SR-SFC-PCE-CAPABILITY TLV is shown in the following
          Figure 2:</t>

          <figure>
            <artwork><![CDATA[     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Type=TBD              |       Length=4                |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |          Reserved             |  Flags        |      MSD      |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Figure 2: SR-SFC-PCE-CAPABILITY TLV Format]]></artwork>
          </figure>

          <t>The code point for the TLV type is to be defined by IANA. The TLV
          length is 4 octets. The 32-bit value is formatted as follows. The
          "Maximum SID Depth" (1 octet) field (MSD) specifies the maximum
          number of SIDs that a PCC is capable of imposing on a packet. The
          "Flags" (1 octet) and "Reserved" (2 octets) fields are currently
          unused, and MUST be set to zero and ignored on receipt.</t>

          <section title="Negotiating SR-SFC Capability">
            <t>The SR-SFC capability TLV is contained in the OPEN object. By
            including the TLV in the OPEN message to a PCE, a PCC indicates
            its support for SFPs. By including the TLV in the OPEN message to
            a PCC, a PCE indicates that it is capable of computing SFPs.</t>
          </section>
        </section>
      </section>

      <section title="RP/SRP Object">
        <t>In order to setup an SFP, the RP or SRP object MUST carry a PATH-
        SETUP-TYPE TLV specified in <xref
        target="I-D.ietf-pce-lsp-setup-type"/>. This document defines four new
        Path Setup Types (PST) for SR-SFC as follows: <list>
            <t>PST = 2: The path is an SFP.</t>

            <t>PST = 3: The path is a compact SFP.</t>

            <t>PST = 4: The path is an SR-specific SFP.</t>

            <t>PST = 5: The path is a compact SR-specific SFP.</t>
          </list></t>
      </section>

      <section title="Include Route Object">
        <t>The IRO (Include Route Object) MUST be carried within PCReq
        messages to indicate a particular SFC. Furthermore, the IRO MAY be
        carried in PCRep messages. When carried within a PCRep message with
        the NO-PATH object, the IRO indicates the set of service functions
        that cause the PCE to fail to find a path. This document defines a new
        sub-object type for the SR-SFC as follows:</t>

        <figure>
          <artwork><![CDATA[    Type       Sub-object

    5          Service Function ID]]></artwork>
        </figure>
      </section>

      <section title="SR-SFC-ERO Object">
        <t>Generally speaking, an SR-SFC-ERO object consists of one or more
        ERO subobjects described in the following sub-sections to represent a
        particular type of service function path. In the ERO subobject, each
        SID is associated with an identifier that represents either an SFF or
        an SF. This identifier is referred to as the 'Node or Service
        Identifier' (NSI). As described later, an NSI can be represented in
        various formats (e.g., IPv4 address, IPv6 address, SF identifier,
        etc). Specifically, in the SFP case, the NSI of every ERO subobject
        contained in the SR-SFC-ERO object represents an SFF or an SF while
        the SID of each ERO subobject is set to null. In the compact SFP case,
        the NSI of every ERO subobject contained in the SR-SFC-ERO object only
        represents an SFF meanwhile the SID of every ERO subobject is set to
        null. In the SR-specific SFP, the NSI of every ERO subobject contained
        in the SR-SFC-ERO object represents an SFF or an SF while the SID of
        every ERO subject MUST NOT be null. In the compact SR-specific SFP,
        the NSI of every ERO subobject contained in the SR-SFC-ERO object
        represents an SFF meanwhile the SID of every ERO subobject MUST NOT be
        null.</t>

        <section title="SR-SFC-ERO Subobject">
          <t>An SR-SFC-ERO subobject (as shown in Figure 3) consists of a
          32-bit header followed by the SID and the NSI associated with the
          SID. The SID is a 32-bit or 128 bit number. The size of the NSI
          depends on its respective type, as described in the following
          sub-sections.</t>

          <figure>
            <artwork><![CDATA[      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |L|    Type     |    Length     |  NSIT   |  Flags    |P|F|S|C|M|
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     //         SID (variable:4 or 16 octets)                       //
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     //              NSI (variable)                                 //
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Figure 3: SR-SFC-ERO Subobject Format]]></artwork>
          </figure>

          <t><list>
              <t>'L' Flag: indicates whether the subobject represents a
              loose-hop in the explicit route [RFC3209]. If this flag is
              unset, a PCC MUST not overwrite the SID value present in the
              SR-SFC-ERO subobject. Otherwise, a PCC MAY expand or replace one
              or more SID value(s) in the received SR-SFC-ERO based on its
              local policy.</t>

              <t>Type: is the type of the SR-SFC-ERO Subobject. This document
              defines the SR-SFC-ERO Subobject type. A new code point will be
              requested for the SR-SFC-ERO Subobject from IANA.</t>

              <t>Length: contains the total length of the subobject in octets,
              including the L, Type and Length fields. Length MUST be at least
              4, and MUST be a multiple of 4.</t>

              <t>NSI Type (NSIT): indicates the type of NSI associated with
              the SID. The NSI-Type values are described later in this
              document.</t>

              <t>Flags: is used to carry any additional information pertaining
              to SID. Currently, the following flag bits are defined: <list>
                  <t>M: When this bit is set, the SID value represents an MPLS
                  label stack entry as specified in [RFC5462], where only the
                  label value is specified by the PCE. Other fields (TC, S,
                  and TTL) fields MUST be considered invalid, and PCC MUST set
                  these fields according to its local policy and MPLS
                  forwarding rules.</t>

                  <t>C: When this bit as well as the M bit are set, then the
                  SID value represents an MPLS label stack entry as specified
                  in [RFC5462], where all the entry's fields (Label, TC, S,
                  and TTL) are specified by the PCE. However, a PCC MAY choose
                  to override TC, S, and TTL values according its local policy
                  and MPLS forwarding rules.</t>

                  <t>S: When this bit is set, the SID value in the subobject
                  body is null. In this case, the PCC is responsible for
                  choosing the SID value, e.g., by looking up its Traffic
                  Engineering Database (TED) using node/service identifier in
                  the subobject body.</t>

                  <t>F: When this bit is set, the NSI value in the subobject
                  body is null.// When will the NSI value is null?</t>

                  <t>P: When this bit is set, the SID value represents an IPv6
                  address.</t>
                </list></t>

              <t>SID: is the 4-octect or 16-octect Segment Identifier.</t>

              <t>NSI: contains the NSI associated with the SID. Depending on
              the value of NSIT, the NSI can have different format as
              described in the following sub-section.</t>
            </list></t>
        </section>

        <section title="NSI Associated with SID">
          <t>This document defines the following NSIs:</t>

          <t><list>
              <t>'IPv4 Node ID': is specified as an IPv4 address. In this
              case, NSIT and Length are 1 and 12 respectively.</t>

              <t>'IPv6 Node ID': is specified as an IPv6 address. In this
              case, NSIT and Length are 2 and 24 respectively.</t>

              <t>'Service Function ID': is specified as an SF ID. In this
              case, NSIT and Length are TBD.</t>
            </list></t>
        </section>

        <section title="SR-SFC-ERO Processing">
          <t>TBD</t>
        </section>
      </section>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>TBD.</t>

      <!---->
    </section>

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

      <section title="PCEP Objects">
        <t>IANA is requested to allocate an ERO subobject type (recommended
        value= 6) for the SR-SFC-ERO subobject.</t>
      </section>

      <section title="PCEP-Error Object">
        <t>TBD</t>
      </section>

      <section title="PCEP TLV Type Indicators">
        <t>This document defines the following new PCEP TLV:</t>

        <figure>
          <artwork><![CDATA[
    Value     Meaning                  Reference

    27        SR-SFC-PCE-CAPABILITY    This document]]></artwork>
        </figure>
      </section>

      <section title="New Path Setup Type">
        <t>This document defines the following four new setup types for the
        PATH-SETUP-TYPE TLV:</t>

        <figure>
          <artwork><![CDATA[     Value   Description                             Reference

     2       The path is an SFP.                     This document

     3       The path is a compact SFP.              This document

     4       The path is an SR-specific SFP.         This document

     5       The path is a compact SR-specific SFP.  This document

]]></artwork>
        </figure>
      </section>

      <section title="New IRO Sub-object Type">
        <t>This document defines a new IRO sub-object type for SFC as
        follows:</t>

        <figure>
          <artwork><![CDATA[    Type       Sub-object

    5          Service Function ID]]></artwork>
        </figure>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not introduce any new security considerations.</t>
    </section>
  </middle>

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

      <?rfc include="reference.RFC.5440"?>

      <?rfc include="reference.I-D.ietf-pce-stateful-pce"?>
    </references>

    <references title="Informative References">
      <?rfc include="reference.I-D.xu-mpls-service-chaining"?>

      <?rfc include="reference.I-D.xu-mpls-unified-source-routing-instruction"?>

      <?rfc include="reference.I-D.ietf-pce-segment-routing"?>

      <?rfc include="reference.I-D.ietf-spring-segment-routing-mpls"?>

      <?rfc include="reference.I-D.ietf-pce-lsp-setup-type"?>

      <?rfc include="reference.RFC.7665"?>
    </references>
  </back>
</rfc>
