<?xml version="1.0" encoding="UTF-8"?>

<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.13 -->
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902"
     docName="draft-ietf-mpls-sfl-framework-11" number="8957" obsoletes=""
     updates="" submissionType="IETF" category="std" consensus="true"
     xml:lang="en" tocInclude="true" sortRefs="true" symRefs="true"
     version="3"> 

<!-- xml2rfc v2v3 conversion 3.3.0 -->
  <front>
    <title abbrev="MPLS FL">Synonymous Flow Label Framework</title>
    <seriesInfo name="RFC" value="8957"/>
    <author initials="S." surname="Bryant" fullname="Stewart Bryant">
      <organization>Futurewei Technologies Inc.</organization>
      <address>
        <email>sb@stewartbryant.com</email>
      </address>
    </author>

    <author initials="M." surname="Chen" fullname="Mach(Guoyi) Chen">
      <organization>Huawei</organization>
      <address>
        <email>mach.chen@huawei.com</email>
      </address>
    </author>
    <author initials="G." surname="Swallow" fullname="George Swallow">
      <organization>Southend Technical Center</organization>
      <address>
        <email>swallow.ietf@gmail.com</email>
      </address>
    </author>
    <author initials="S." surname="Sivabalan" fullname="Siva Sivabalan">
      <organization>Ciena Corporation</organization>
      <address>
        <email>ssivabal@ciena.com</email>
      </address>
    </author>
    <author initials="G." surname="Mirsky" fullname="Gregory Mirsky">
      <organization>ZTE Corp.</organization>
      <address>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>
    <date year="2021" month="January"/>
    <area>Routing</area>
    <workgroup>MPLS</workgroup>
    <keyword>MPLS</keyword>
    <keyword>Flow</keyword>
    <keyword>Label</keyword>
    <abstract>
      <t>RFC 8372 ("MPLS Flow Identification Considerations") describes the
      requirement for introducing flow identities within the MPLS
      architecture.  This document describes a method of accomplishing this by
      using a technique called "Synonymous Flow Labels" in which labels that
      mimic the behavior of other labels provide the identification service.
      These identifiers can be used to trigger per-flow operations on the
      packet at the receiving label switching router.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" toc="default">
      <name>Introduction</name>
      <t><xref target="RFC8372" format="default"/> ("MPLS Flow Identification
      Considerations") describes the requirement for introducing 
flow identities within the MPLS architecture.
This document describes a method of providing the required identification by using a
technique called "Synonymous Flow Labels (SFLs)" in
which labels that mimic the behavior of other MPLS labels provide the
identification service.  These identifiers can be used to trigger
per-flow operations on the packet at the receiving label switching
router.</t>
    </section>
    <section anchor="requirements-language" numbered="true" toc="default">
      <name>Requirements Language</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL 
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", 
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" 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 anchor="SFL" numbered="true" toc="default">
      <name>Synonymous Flow Labels</name>
      <t>An SFL is defined to be a label that causes exactly the same
behavior at the egress Label Edge Router (LER) as the label it
replaces, except that it also causes one or more additional actions that have
been previously agreed between the peer LERs to be executed 
on the packet.  There are many possible additional actions, such as
measuring the number of received packets in a flow,
triggering an IP Flow Information Export (IPFIX) <xref target="RFC7011"
format="default"/> capture, triggering other types of deep packet 
inspection, or identifying the packet source.  For example, in
a Performance Monitoring (PM) application, the agreed action could be
recording the receipt of the packet by incrementing a packet
counter.  This is a natural action in many MPLS implementations, and
where supported, this permits the implementation of high-quality
packet loss measurement without any change to the packet-forwarding
system.</t>
      <t>To illustrate the use of this technology, we start by  considering
the case where there is an <tt>application</tt> label in the MPLS label stack.
As a first example, let us consider a
pseudowire (PW) <xref target="RFC3985" format="default"/> on which it is desired to make
packet loss measurements. Two labels, synonymous with the PW labels, are obtained
from the egress terminating provider edge (T-PE). By alternating
between these SFLs and using them in place of the PW label, the PW
packets may be batched for counting without any impact on the PW
forwarding behavior <xref target="RFC8321" format="default"/> (note that
strictly only one SFL is needed in 
this application, but that is an optimization that is a matter for
the implementor). The method of obtaining these additional
labels is outside the scope of this text; however,
one control protocol that provides a method of obtaining SFLs  is described in
<xref target="I-D.bryant-mpls-sfl-control" format="default"/>.</t>
      <t>Next, consider an MPLS application that is multipoint to point, such as
a VPN.  Here, it is necessary to identify a packet batch from a
specific source.  This is achieved by making the SFLs source
specific, so that batches from one source are marked differently from
batches from another source.  The sources all operate independently
and asynchronously from each other, independently coordinating with
the destination.  Each ingress LER is thus able to establish its own SFL
to identify the subflow and thus enable PM per flow.</t>
      <t>Finally, we need to consider the case where there is no MPLS
application label such as occurs when sending IP over a Label Switched Path
(LSP), i.e., there is a single label in the MPLS label stack.  In 
this case, introducing an SFL that was synonymous with the LSP label
would introduce network-wide forwarding state.  This would not be
acceptable for scaling reasons. Therefore, we have no choice but to
introduce an additional label.  Where penultimate hop popping (PHP)
is in use, the semantics of this additional label can be similar to
the LSP label.  Where PHP is not in use, the semantics are similar to
an MPLS Explicit NULL <xref target="RFC3032" format="default"/>.  In both of
these cases, the label has the additional semantics of the SFL.</t>
      <t>Note that to achieve the goals set out above, SFLs need to be
allocated from the platform label table.</t>
    </section>
    <section anchor="user-service-traffic-in-the-data-plane" numbered="true" toc="default">
      <name>User Service Traffic in the Data Plane</name>
      <t>As noted in <xref target="SFL" format="default"/>, it is necessary to
      consider two cases:</t> 
      <ol spacing="normal" type="1">
	<li>Application label is present</li>
        <li>Single-label stack</li>
      </ol>
      <section anchor="ALP" numbered="true" toc="default">
        <name>Application Label Present</name>
        <t><xref target="Figure1" format="default"/> shows the case in which
	both an LSP label and an application 
label are present in the MPLS label stack.  Traffic with no SFL
function present runs over the <tt>normal</tt> stack, and SFL-enabled flows
run over the SFL stack with the SFL used to indicate the packet
batch.</t>
        <figure anchor="Figure1">
          <name>Use of Synonymous Labels in a Two-Label MPLS Label Stack</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
 +-----------------+          +-----------------+
 |      LSP        |          |      LSP        |
 |     Label       |          |     Label       |
 |  (May be PHPed) |          |  (May be PHPed) |
 +-----------------+          +-----------------+
 |                 |          |                 |
 |  Application    |          | Synonymous Flow |
 |     Label       |          |     Label       |
 +-----------------+ <= BoS   +-----------------+ <= Bottom of Stack
 |                 |          |                 |
 |   Payload       |          |   Payload       |
 |                 |          |                 |
 +-----------------+          +-----------------+

"Normal" Label Stack         Label Stack with SFL
]]></artwork>
        </figure>
        <t>At the egress LER, the LSP label is popped (if present). Then, the
	SFL is processed executing both the synonymous function and the
	corresponding application function.</t> 
        <section anchor="TTLandTC" numbered="true" toc="default">
          <name>Setting TTL and the Traffic Class Bits</name>
          <t>The TTL and the Traffic Class bits <xref target="RFC5462"
	  format="default"/> in the SFL label stack entry (LSE) would 
normally be set to the same value as would have been set in the label
that the SFL is synonymous with.  However, it is recognized that, if there
is an application need, these fields in the SFL LSE
<bcp14>MAY</bcp14> be set to some other value.  An 
example would be where it was desired to cause the SFL to trigger an
action in the TTL expiry exception path as part of the label action.</t>
        </section>
      </section>
      <section anchor="SLS" numbered="true" toc="default">
        <name>Single-Label Stack</name>
        <t><xref target="Figure2" format="default"/> shows the case in which
	only an LSP label is present in the 
MPLS label stack.  Traffic with no SFL function present runs over the
"normal" stack, and SFL-enabled flows run over the SFL stack with the
SFL used to indicate the packet batch.  However, in this case, it is
necessary for the ingress Label Edge Router (LER) to first push the SFL and
	then to push the LSP label.</t>
        <figure anchor="Figure2">
          <name>Use of Synonymous Labels in a Single-Label MPLS Label Stack</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
                              +-----------------+
                              |      LSP        |
                              |     Label       |
                              |  (May be PHPed) |
 +-----------------+          +-----------------+
 |      LSP        |          |                 | <= Synonymous with
 |     Label       |          | Synonymous Flow |    Explicit NULL
 |  (May be PHPed) |          |     Label       |
 +-----------------+ <= BoS   +-----------------+ <= Bottom of Stack
 |                 |          |                 |
 |   Payload       |          |   Payload       |
 |                 |          |                 |
 +-----------------+          +-----------------+

"Normal" Label Stack         Label Stack with SFL
]]></artwork>
        </figure>
        <t>At the receiving Label Switching Router (LSR), it is necessary to
	consider two cases:</t> 
        <ol spacing="normal" type="1">
	  <li>Where the LSP label is still present</li>
          <li>Where the LSP label is penultimate hop popped</li>
        </ol>
        <t>If the LSP label is present, it is processed exactly as it would
        normally be processed, and then it is popped.  This reveals the SFL,
        which, in the case of the measurements defined in <xref
        target="RFC6374" format="default"/>, is simply counted and then
        discarded.  In this respect, the processing of the SFL is synonymous
        with an MPLS Explicit NULL.  As the SFL is the bottom of stack, the IP
        packet that follows is processed as normal.</t>
        <t>If the LSP label is not present due to PHP action in the upstream
LSR, two almost equivalent processing actions can take place.
The SFL can be treated either 1) as an LSP label that was not PHPed and the
additional associated SFL action is taken when the label is
processed or 2) as an MPLS Explicit NULL with
associated SFL actions.  From the perspective of the measurement
system described in this document, the behavior of the two approaches is 
indistinguishable; thus, either may be implemented.</t>
        <section anchor="setting-ttl-and-the-traffic-class-bits" numbered="true" toc="default">
          <name>Setting TTL and the Traffic Class Bits</name>
          <t>The TTL and the Traffic Class considerations described in <xref
	  target="TTLandTC" format="default"/> apply.</t> 
        </section>
      </section>
      <section anchor="aggregation-of-sfl-actions" numbered="true" toc="default">
        <name>Aggregation of SFL Actions</name>
        <t>There are cases where it is desirable to aggregate an SFL action
against a number of labels, for example, where it is desirable to
have one counter record the number of packets received over a group
of application labels or where the number of labels used by a single
application is large and the resultant increase in the number of
allocated labels needed to support the SFL actions may
become too large to be viable.  In these circumstances, it would be
necessary to introduce an additional label in the stack to act as an
aggregate instruction.  This is not strictly a synonymous action in
that the SFL is not replacing an existing label but is somewhat
similar to the single-label case shown in <xref target="SLS" format="default"/>, and the same
signaling, management, and configuration tools would be applicable.</t>
        <figure anchor="Figure3">
          <name>Aggregate SFL Actions</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
                              +-----------------+
                              |      LSP        |
                              |     Label       |
                              |  (May be PHPed) |
 +-----------------+          +-----------------+
 |      LSP        |          |                 |
 |     Label       |          |   Aggregate     |
 |  (May be PHPed) |          |      SFL        |
 +-----------------+          +-----------------+
 |                 |          |                 |
 |  Application    |          |  Application    |
 |     Label       |          |     Label       |
 +-----------------+ <=BoS    +-----------------+ <= Bottom of Stack
 |                 |          |                 |
 |   Payload       |          |   Payload       |
 |                 |          |                 |
 +-----------------+          +-----------------+

"Normal" Label Stack         Label Stack with SFL
]]></artwork>
        </figure>
        <t>The aggregate SFL is shown in the label stack depicted in <xref
	target="Figure3" format="default"/> as 
preceding the application label; however, the choice of position
before or after the application label will be application specific.
In the case described in <xref target="ALP" format="default"/>, by definition, the SFL has the
full application context.  In this case, the positioning will depend
on whether the SFL action needs the full context of the application
to perform its action and whether the complexity of the application
will be increased by finding an SFL following the application label.</t>
      </section>
    </section>
    <section anchor="equal-cost-multipath-considerations" numbered="true" toc="default">
      <name>Equal-Cost Multipath Considerations</name>
      <t>The introduction of an SFL to an existing flow may cause that flow to take
a different path through the network under conditions of Equal-Cost
Multipath (ECMP).  This, in turn, may invalidate certain uses of
the SFL, such as performance measurement applications.  Where this is
a problem, there are two solutions worthy of consideration:</t>
      <ol spacing="normal" type="1">
	<li>The operator <bcp14>MAY</bcp14> elect to always run with the SFL
	in place in the MPLS label stack.</li>
        <li>The operator can elect to use entropy labels <xref target="RFC6790"
	format="default"/> in a network that fully supports
	this type of ECMP. If this approach is adopted, the intervening MPLS
	network <bcp14>MUST NOT</bcp14> load balance on any packet field other
	than the entropy label. Note that this is stricter than the text in
	<xref target="RFC6790" sectionFormat="of" section="4.3"/>.</li> 
      </ol>
    </section>
    <section anchor="privacy" numbered="true" toc="default">
      <name>Privacy Considerations</name>
      <t>IETF concerns on pervasive monitoring are described in <xref
      target="RFC7258" format="default"/>.  The inclusion of originating
      and/or flow information in a packet provides more identity information
      and hence potentially degrades the privacy of the communication to an
      attacker in a position to observe the added identifier.  Whilst the
      inclusion of the additional granularity does allow greater insight into
      the flow characteristics, it does not specifically identify which node
      originated the packet unless the attacker can inspect the network at the
      point of ingress or inspect the control protocol packets.  This privacy
      threat may be mitigated by encrypting the control protocol packets by
      regularly changing the synonymous labels or by concurrently using a
      number of such labels, including the use of a combination of those
      methods.  Minimizing the scope of the identity indication can be useful
      in minimizing the observability of the flow characteristics. Whenever
      IPFIX or other deep packet inspection (DPI) technique is used, their
      relevant privacy considerations apply.</t>
    </section>
    <section anchor="security-considerations" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>There are
no new security issues associated with the MPLS data plane.  Any
control protocol used to request SFLs will need to ensure the
legitimacy of the request, i.e., that the requesting node is authorized
to make that SFL request by the network operator.</t>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>

<displayreference target="I-D.bryant-mpls-sfl-control" to="MPLS-SFL-CONTROL"/>

    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5462.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3032.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6790.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3985.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8372.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6374.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7258.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8321.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7011.xml"/>

        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.bryant-mpls-sfl-control.xml"/>
      </references>
    </references>
    <section anchor="contributors" numbered="false" toc="default">
      <name>Contributors</name>
<contact fullname="Zhenbin Li">
  <organization>Huawei</organization>
  <address>
    <postal/>
  <email>lizhenbin@huawei.com</email>
  </address>
</contact>
    </section>
  </back>

</rfc>
