<?xml version="1.0" encoding="US-ASCII"?>

<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc comments="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>

<rfc number="8596" category="info" submissionType="IETF" consensus="yes">

  <front>
    <title abbrev="MPLS for the SFC NSH">MPLS Transport Encapsulation for the
 Service Function Chaining (SFC) Network Service Header (NSH)</title>

    <author initials="A." surname="Malis" fullname="Andrew G. Malis">
      <organization>Futurewei</organization>
      <address>
        <email>agmalis@gmail.com</email>
      </address>
    </author>

    <author initials="S." surname="Bryant" fullname="Stewart Bryant">
      <organization>Futurewei</organization>
      <address>
        <email>stewart.bryant@gmail.com</email>
      </address>
    </author>

    <author initials="J." surname="Halpern" fullname="Joel M. Halpern">
      <organization>Ericsson</organization>
      <address>
        <email>joel.halpern@ericsson.com</email>
      </address>
    </author>

    <author initials="W." surname="Henderickx" fullname="Wim Henderickx">
      <organization>Nokia</organization>
      <address>
        <email>wim.henderickx@nokia.com</email>
      </address>
    </author>

    <date year="2019" month="June"/>

    <abstract>
<t>This document describes how to use a Service Function Forwarder (SFF)
 Label (similar to a pseudowire label or VPN label) to indicate the
 presence of a Service Function Chaining (SFC) Network Service Header
 (NSH) between an MPLS label stack and the NSH original packet/frame.
 This allows SFC packets using the NSH to be forwarded between
 SFFs over an MPLS network.  The label is also used to select between
 multiple SFFs in the destination MPLS node.
</t>
    </abstract>

  </front>

  <middle>

<section anchor="introduction" title="Introduction">

<t>As discussed in <xref target="RFC8300"/>, a number of transport
encapsulations for the Service Function Chaining (SFC) Network Service Header
(NSH) already exist, such as Ethernet, UDP, GRE, and others.</t>

<t>This document describes an MPLS transport encapsulation for the NSH and how
to use a Service Function Forwarder (SFF) <xref target="RFC7665"/> Label to
indicate the presence of the NSH in the MPLS packet payload. This allows SFC
packets using the NSH to be forwarded between SFFs in an MPLS transport
network, where MPLS is used to interconnect the network nodes that contain one
or more SFFs. The label is also used to select between multiple SFFs in the
destination MPLS node.</t>

<t>From an SFC perspective, this encapsulation is equivalent to other
transport encapsulations of packets using the NSH. This can be illustrated by
adding an additional line to the example of a next-hop
SPI&nbsp;/&nbsp;SI-to-network ("SPI" and "SI" stand for "Service Path
Identifier" and "Service Index") overlay network locator mapping in
Table&nbsp;1 of <xref target="RFC8300"/>:</t>

<figure><artwork><![CDATA[
  +------+------+---------------------+-------------------------+
  | SPI  | SI   | Next Hop(s)         | Transport Encapsulation |
  +------+------+---------------------+-------------------------+
  | 25   | 220  | Label 5467          | MPLS                    |
  +------+------+---------------------+-------------------------+

              Table 1: Extension to Table 1 in RFC 8300
]]></artwork></figure>

<t>SFF Labels are similar to other service labels at the bottom of an MPLS
label stack that denote the contents of the MPLS payload being other than a
normally routed IP packet, such as a Layer 2 pseudowire, an IP packet that is
routed in a VPN context with a private address, or an Ethernet virtual private
wire service.</t>

<t>This informational document follows well-established MPLS procedures and
does not require any actions by IANA or any new protocol extensions.</t>

<t>Note that using the MPLS label stack as a replacement for the SFC NSH,
covering use cases that do not require per-packet metadata, is described
in <xref target="RFC8595"/>.</t>

<section anchor="terminology" title="Terminology">

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

</section>
</section>

<section anchor="mpls-encapsulation-using-an-sff-label" title="MPLS Encapsulation Using an SFF Label">

<t>The encapsulation is a standard MPLS label stack <xref target="RFC3032"/>
with an SFF Label at the bottom of the stack, followed by an NSH as defined by
<xref target="RFC8300"/> and the NSH original packet/frame.</t>

<t>Much like a pseudowire label, an SFF Label MUST be allocated by the
downstream receiver of the NSH from its per-platform label space, since the
meaning of the label is identical, independent of which incoming interface it
is received from <xref target="RFC3031"/>.</t>

<t>If a receiving node supports more than one SFF (i.e., more than one SFC
forwarding instance), then the SFF Label can be used to select the proper SFF,
by having the receiving node advertise more than one SFF Label to its upstream
sending nodes as appropriate.</t>

<t>The method used by the downstream receiving node to advertise SFF Labels to
the upstream sending node is out of scope for this document. That said, a
number of methods are possible, such as via a protocol exchange, or via a
controller that manages both the sender and the receiver using the
Network Configuration Protocol (NETCONF) / YANG, BGP,
the Path Computation Element Communication Protocol (PCEP), etc. One such
BGP&nbhy;based method has already been defined and is documented in
<xref target="BGP-NSH-SFC"/>. This does not constrain the further definition
of other such advertisement methods in the future.</t>

<t>While the SFF Label will usually be at the bottom of the label stack, there
may be cases where there are additional label stack entries beneath it. For
example, when an Associated Channel Header (ACH) is carried that applies to
the SFF, a Generic Associated Channel Label (GAL) <xref target="RFC5586"/>
will be in the label stack below the SFF. Similarly, an Entropy Label
Indicator / Entropy Label (ELI/EL) <xref target="RFC6790"/> may be carried
below the SFF in the label stack. This is identical to the situation with VPN
labels.</t>

<t>This document does not define the setting of the Traffic Class (TC) field <xref
target="RFC5462"/> (formerly known as the Experimental Use (EXP) bits <xref
target="RFC3032"/>) in the SFF Label.</t>

<section anchor="mpls-label-stack-construction-at-the-sending-node" title="MPLS Label Stack Construction at the Sending Node">

<t>When one SFF wishes to send an SFC packet with an NSH to another SFF over an
MPLS transport network, a label stack needs to be constructed by the MPLS node
that contains the sending SFF in order to transport the packet to the
destination MPLS node that contains the receiving SFF. The label stack is
constructed as follows:</t>

<t><list style="numbers">
  <t>Push zero or more labels that are interpreted by the destination MPLS
  node on to the packet, such as the GAL <xref target="RFC5586"/>
  (see <xref target="OAMConsid" />).  The TTL for
  these labels is set according to the relevant standards that define these
  labels.</t>
  <t>Push the SFF Label to identify the desired SFF in the receiving MPLS
  node. The TTL for this MPLS label MUST be set to 1 to avoid
  mis-forwarding.</t>
  <t>Push zero or more additional labels such that (a) the resulting label
  stack will cause the packet to be transported to the destination MPLS node,
  and (b) when the packet arrives at the destination node, either:
  <list style="symbols">
      <t>the SFF Label will be at the top of the label stack (this is
      typically the case when penultimate hop popping is used at the
      penultimate node), or</t>
      <t>as a part of normal MPLS processing, the SFF Label becomes the top
      label in the stack before the packet is forwarded to another node and
      before the packet is dispatched to a higher layer.</t>
    </list></t>
</list></t>

<t><list>
    <t>The TTL for these labels is set by configuration or set to the
    defaults for normal MPLS operation in the network.</t>
</list></t>

</section>
<section anchor="sff-label-processing-at-the-destination-node" title="SFF Label Processing at the Destination Node">

<t>The destination MPLS node performs a lookup on the SFF Label to retrieve
the next-hop context between the SFF and SF, e.g., to retrieve the destination
Media Access Control (MAC) address in the case where native Ethernet
encapsulation is used between the SFF and SF. How the next-hop context is
populated is out of scope for this document.</t>

<t>The receiving SFF SHOULD check that the received SFF Label has a TTL of 1
upon receipt.  Any other values indicate a likely error condition and SHOULD
result in discarding the packet.</t>

<t>The receiving MPLS node then pops the SFF Label (and any labels beneath it)
so that the destination SFF receives the SFC packet with the NSH at the top
of the packet.</t>

</section>
</section>

<section anchor="equal-cost-multipath-ecmp-considerations" title="Equal-Cost Multipath (ECMP) Considerations">

<t>As discussed in <xref target="RFC4928"/> and <xref target="RFC7325"/>,
there are ECMP considerations for payloads carried by MPLS.</t>

<t>Many existing routers use deep packet inspection to examine the payload of
an MPLS packet. If the first nibble of the payload is equal to 0x4 or 0x6,
these routers (sometimes incorrectly, as discussed in <xref
target="RFC4928"/>) assume that the payload is IPv4 or IPv6, 
respectively and, as a result, perform ECMP load balancing based on (presumed)
information present in IP/TCP/UDP payload headers or in a combination of MPLS
label stack and (presumed) IP/TCP/UDP payload headers in the packet.</t>

<t>For SFC, ECMP may or may not be desirable. To prevent ECMP when it is not
desired, the NSH Base Header was carefully constructed so that the NSH could
not look like IPv4 or IPv6 based on its first nibble. See Section 2.2 of <xref
target="RFC8300"/> for further details. Accordingly, the default behavior for
MPLS-encapsulated SFC is to not use ECMP
other than by using entropy derived from the MPLS label stack.
This results in all packets going to the same SF taking the same
path regardless of the use of ECMP in the network.</t>

<t>If ECMP is desired when SFC is used with an MPLS transport network, there
are two possible options: entropy labels <xref target="RFC6790"/> and
flow&nbhy;aware transport <xref target="RFC6391"/> labels. A recommendation
regarding choosing between these options, and their proper placement in the
label stack, is left for future study.</t>

</section>
<section anchor="OAMConsid" title="Operations, Administration, and Maintenance (OAM) Considerations">

<t>OAM at the SFC layer is handled by SFC-defined mechanisms <xref
target="RFC8300"/>. However, OAM may be required at the MPLS transport
layer. If so, then standard MPLS-layer OAM mechanisms such as the GAL <xref target="RFC5586"/> may be used at the transport label layer.</t>

</section>
<section anchor="iana-considerations" title="IANA Considerations">

<t>This document has no IANA actions.</t>

</section>
<section anchor="security-considerations" title="Security Considerations">

<t>This document describes a method for transporting SFC packets using the NSH
over an MPLS transport network.  It follows well-established MPLS procedures
in widespread operational use.  It does not define any new protocol elements or
allocate any new code points, and it is no more or less secure than carrying
any other protocol over MPLS. To the MPLS network, the NSH and its contents
are simply an opaque payload.</t>

<t>In addition, the security considerations in <xref target="RFC8595"/> also
apply to this document.</t>

</section>

  </middle>

  <back>

    <references title='Normative References'>

<reference  anchor='RFC2119' target='https://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
<date year='1997' month='March' />
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>

<reference  anchor='RFC3031' target='https://www.rfc-editor.org/info/rfc3031'>
<front>
<title>Multiprotocol Label Switching Architecture</title>
<author initials='E.' surname='Rosen' fullname='E. Rosen'><organization /></author>
<author initials='A.' surname='Viswanathan' fullname='A. Viswanathan'><organization /></author>
<author initials='R.' surname='Callon' fullname='R. Callon'><organization /></author>
<date year='2001' month='January' />
</front>
<seriesInfo name='RFC' value='3031'/>
<seriesInfo name='DOI' value='10.17487/RFC3031'/>
</reference>

<reference  anchor='RFC3032' target='https://www.rfc-editor.org/info/rfc3032'>
<front>
<title>MPLS Label Stack Encoding</title>
<author initials='E.' surname='Rosen' fullname='E. Rosen'><organization /></author>
<author initials='D.' surname='Tappan' fullname='D. Tappan'><organization /></author>
<author initials='G.' surname='Fedorkow' fullname='G. Fedorkow'><organization /></author>
<author initials='Y.' surname='Rekhter' fullname='Y. Rekhter'><organization /></author>
<author initials='D.' surname='Farinacci' fullname='D. Farinacci'><organization /></author>
<author initials='T.' surname='Li' fullname='T. Li'><organization /></author>
<author initials='A.' surname='Conta' fullname='A. Conta'><organization /></author>
<date year='2001' month='January' />
</front>
<seriesInfo name='RFC' value='3032'/>
<seriesInfo name='DOI' value='10.17487/RFC3032'/>
</reference>

<reference  anchor='RFC5462' target='https://www.rfc-editor.org/info/rfc5462'>
<front>
<title>Multiprotocol Label Switching (MPLS) Label Stack Entry: &quot;EXP&quot; Field Renamed to &quot;Traffic Class&quot; Field</title>
<author initials='L.' surname='Andersson' fullname='L. Andersson'><organization /></author>
<author initials='R.' surname='Asati' fullname='R. Asati'><organization /></author>
<date year='2009' month='February' />
</front>
<seriesInfo name='RFC' value='5462'/>
<seriesInfo name='DOI' value='10.17487/RFC5462'/>
</reference>

<reference  anchor='RFC7665' target='https://www.rfc-editor.org/info/rfc7665'>
<front>
<title>Service Function Chaining (SFC) Architecture</title>
<author initials='J.' surname='Halpern' fullname='J. Halpern' role='editor'><organization /></author>
<author initials='C.' surname='Pignataro' fullname='C. Pignataro' role='editor'><organization /></author>
<date year='2015' month='October' />
</front>
<seriesInfo name='RFC' value='7665'/>
<seriesInfo name='DOI' value='10.17487/RFC7665'/>
</reference>

<reference  anchor='RFC8174' target='https://www.rfc-editor.org/info/rfc8174'>
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author initials='B.' surname='Leiba' fullname='B. Leiba'><organization /></author>
<date year='2017' month='May' />
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='8174'/>
<seriesInfo name='DOI' value='10.17487/RFC8174'/>
</reference>

<reference  anchor='RFC8300' target='https://www.rfc-editor.org/info/rfc8300'>
<front>
<title>Network Service Header (NSH)</title>
<author initials='P.' surname='Quinn' fullname='P. Quinn' role='editor'><organization /></author>
<author initials='U.' surname='Elzur' fullname='U. Elzur' role='editor'><organization /></author>
<author initials='C.' surname='Pignataro' fullname='C. Pignataro' role='editor'><organization /></author>
<date year='2018' month='January' />
</front>
<seriesInfo name='RFC' value='8300'/>
<seriesInfo name='DOI' value='10.17487/RFC8300'/>
</reference>

<!-- draft-ietf-mpls-sfc (RFC 8595) -->
<reference anchor="RFC8595" target="https://www.rfc-editor.org/info/rfc8595">
<front>
<title>An MPLS-Based Forwarding Plane for Service Function Chaining</title>
<author initials='A' surname='Farrel' fullname='Adrian Farrel'>
    <organization />
</author>
<author initials='S' surname='Bryant' fullname='Stewart Bryant'>
    <organization />
</author>
<author initials='J' surname='Drake' fullname='John Drake'>
    <organization />
</author>
<date month='June' year='2019' />
</front>
<seriesInfo name="RFC" value="8595"/>
<seriesInfo name="DOI" value="10.17487/RFC8595"/>
</reference>

    </references>

    <references title='Informative References'>

<reference  anchor='RFC4928' target='https://www.rfc-editor.org/info/rfc4928'>
<front>
<title>Avoiding Equal Cost Multipath Treatment in MPLS Networks</title>
<author initials='G.' surname='Swallow' fullname='G. Swallow'><organization /></author>
<author initials='S.' surname='Bryant' fullname='S. Bryant'><organization /></author>
<author initials='L.' surname='Andersson' fullname='L. Andersson'><organization /></author>
<date year='2007' month='June' />
</front>
<seriesInfo name='BCP' value='128'/>
<seriesInfo name='RFC' value='4928'/>
<seriesInfo name='DOI' value='10.17487/RFC4928'/>
</reference>

<reference  anchor='RFC5586' target='https://www.rfc-editor.org/info/rfc5586'>
<front>
<title>MPLS Generic Associated Channel</title>
<author initials='M.' surname='Bocci' fullname='M. Bocci' role='editor'><organization /></author>
<author initials='M.' surname='Vigoureux' fullname='M. Vigoureux' role='editor'><organization /></author>
<author initials='S.' surname='Bryant' fullname='S. Bryant' role='editor'><organization /></author>
<date year='2009' month='June' />
</front>
<seriesInfo name='RFC' value='5586'/>
<seriesInfo name='DOI' value='10.17487/RFC5586'/>
</reference>

<reference  anchor='RFC6391' target='https://www.rfc-editor.org/info/rfc6391'>
<front>
<title>Flow-Aware Transport of Pseudowires over an MPLS Packet Switched Network</title>
<author initials='S.' surname='Bryant' fullname='S. Bryant' role='editor'><organization /></author>
<author initials='C.' surname='Filsfils' fullname='C. Filsfils'><organization /></author>
<author initials='U.' surname='Drafz' fullname='U. Drafz'><organization /></author>
<author initials='V.' surname='Kompella' fullname='V. Kompella'><organization /></author>
<author initials='J.' surname='Regan' fullname='J. Regan'><organization /></author>
<author initials='S.' surname='Amante' fullname='S. Amante'><organization /></author>
<date year='2011' month='November' />
</front>
<seriesInfo name='RFC' value='6391'/>
<seriesInfo name='DOI' value='10.17487/RFC6391'/>
</reference>

<reference  anchor='RFC6790' target='https://www.rfc-editor.org/info/rfc6790'>
<front>
<title>The Use of Entropy Labels in MPLS Forwarding</title>
<author initials='K.' surname='Kompella' fullname='K. Kompella'><organization /></author>
<author initials='J.' surname='Drake' fullname='J. Drake'><organization /></author>
<author initials='S.' surname='Amante' fullname='S. Amante'><organization /></author>
<author initials='W.' surname='Henderickx' fullname='W. Henderickx'><organization /></author>
<author initials='L.' surname='Yong' fullname='L. Yong'><organization /></author>
<date year='2012' month='November' />
</front>
<seriesInfo name='RFC' value='6790'/>
<seriesInfo name='DOI' value='10.17487/RFC6790'/>
</reference>

<reference  anchor='RFC7325' target='https://www.rfc-editor.org/info/rfc7325'>
<front>
<title>MPLS Forwarding Compliance and Performance Requirements</title>
<author initials='C.' surname='Villamizar' fullname='C. Villamizar' role='editor'><organization /></author>
<author initials='K.' surname='Kompella' fullname='K. Kompella'><organization /></author>
<author initials='S.' surname='Amante' fullname='S. Amante'><organization /></author>
<author initials='A.' surname='Malis' fullname='A. Malis'><organization /></author>
<author initials='C.' surname='Pignataro' fullname='C. Pignataro'><organization /></author>
<date year='2014' month='August' />
</front>
<seriesInfo name='RFC' value='7325'/>
<seriesInfo name='DOI' value='10.17487/RFC7325'/>
</reference>

<!-- draft-ietf-bess-nsh-bgp-control-plane (I-D Exists) -->
<reference anchor='BGP-NSH-SFC'>
<front>
<title>BGP Control Plane for NSH SFC</title>
<author initials='A' surname='Farrel' fullname='Adrian Farrel'>
    <organization />
</author>
<author initials='J' surname='Drake' fullname='John Drake'>
    <organization />
</author>
<author initials='E' surname='Rosen' fullname='Eric Rosen'>
    <organization />
</author>
<author initials='J' surname='Uttaro' fullname='Jim Uttaro'>
    <organization />
</author>
<author initials='L' surname='Jalil' fullname='Luay Jalil'>
    <organization />
</author>
<date month='May' year='2019' />
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-bess-nsh-bgp-control-plane-11' />
</reference>

    </references>

<section anchor="acknowledgements" title="Acknowledgements" numbered="no">

<t>The authors would like to thank Jim Guichard, Eric Rosen, Med Boucadair,
Alexander (Sasha) Vainshtein, Jeff Tantsura, Anoop Ghanwani, John Drake, Loa Andersson,
Carlos Pignataro, Christian Hopps, and Benjamin Kaduk for their reviews and
comments.

</t>

</section>

  </back>

</rfc>
