<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="3"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-zhou-mna-flow-id-00" ipr="trust200902">
  <front>
    <title abbrev="MNA Flow ID">A General Flow ID for MPLS Network
    Action</title>

    <author fullname="Tianran Zhou" initials="T." surname="Zhou">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <city>Beijing</city>

          <country>China</country>
        </postal>

        <email>zhoutianran@huawei.com</email>
      </address>
    </author>

    <author fullname="Haoyu Song" initials="H." surname="Song">
      <organization>Futurewei Technologies</organization>

      <address>
        <postal>
          <city>Santa Clara</city>

          <region>CA</region>

          <country>United States of America</country>
        </postal>

        <email>haoyu.song@futurewei.com</email>
      </address>
    </author>

    <area>RTG</area>

    <workgroup>MPLS</workgroup>

    <!---->

    <abstract>
      <t>This document specifies a general flow ID as an in-stack data item
      for MPLS network action. The flow ID can be used by multiple network
      actions which require to identify flows.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="Intro" title="Introduction">
      <t>Many MNAs affiliate to specific flows or exhibit different behavior
      to different flows. For example, the network operator may apply certain
      OAM on a number of selected flows and collect per flow data. However, in
      MPLS networks, the labels are used to identify paths but not flows. If
      multiple flows sharing the same path require the same MNA, the LSR may
      need to differentiate the flows and execute the action on a per-flow
      basis.</t>

      <t>The flow information can be extracted from the L3/L4 header in the
      MPLS payload by deep packet inspection, which incurs significant
      processing overhead. Alternatively, each flow-based MNA may carry its
      own unique identifier to differentiate the flows. However, this approach
      has several issues.</t>

      <t>First, one packet may have multiple MNAs that require a flow
      identification. There will be obvious data redundancy if each MNA
      carries its own flow identifier. Second, limited by the MNA ISD encoding
      and size, the flow identifier may have to be tailored to a sub-optimal
      size, resulting in poor scalability. Third, A customized flow identifier
      per MNA may cause network management difficulties and waste network
      resources.</t>

      <t>Therefore, it is desired to have a General Flow Identifier (GFI)
      which can be shared by all the MNAs relying on it. In this draft, we
      propose a new ISD item for GFI using the encoding format described in
      <xref target="I-D.ietf-mpls-mna-hdr"/>. We also list the possible use
      cases which can use the GFI.</t>

      <section title="Terminology and Acronyms">
        <t>The following terminology and acronyms are used in this
        document.</t>

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

        <t><list style="hanging">
            <t hangText="GFI -">General Flow Identifier</t>

            <t hangText="MNA -">MPLS Network Action</t>

            <t hangText="ISD -">In Stack Data</t>
          </list></t>
      </section>
    </section>

    <section title="GFI Encoding">
      <t>As shown in <xref target="fig:gfi"/>, an Opcode is assigned for GFI
      and the encoding of GFI takes the LSE Format C as specified in <xref
      target="I-D.ietf-mpls-mna-hdr"/>, in which the GFI uses the 20-bit data
      field.</t>

      <t><figure anchor="fig:gfi" title="GFI ISD Encoding">
          <artwork align="center"><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   OC(TBD)   |             GFI               |S|  GFI  |   0   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
        </figure></t>

      <t/>

      <t/>
    </section>

    <section title="Use Cases">
      <t>The GFI can have multiple possible use cases:</t>

      <t><list style="hanging">
          <t hangText="IOAM-DEX:"><xref target="RFC9326">IOAM-DEX</xref> is
          used as a trigger for collecting <xref target="RFC9197">IOAM
          data</xref> locally or exporting it to a receiving entity (or
          entities). The Flow ID in the IOAM-DEX Option-Type is an optional
          field representing the flow identifier. The Flow ID can be used to
          correlate the exported data of the same flow from multiple nodes and
          from multiple packets.</t>

          <t hangText="PBT-M:">An on-path telemetry method using
          packet-marking, referred to as <xref
          target="I-D.song-ippm-postcard-based-telemetry">PBT-M</xref>, does
          not carry the telemetry data in user packets but sends the telemetry
          data through a dedicated packet. The MPLS encoding of PBT-M
          described in <xref target="I-D.song-mpls-flag-based-opt"/> can take
          advantage of the GFI to help correlate the postcards and identify
          the flow under test.</t>

          <t hangText="AM:">The <xref target="RFC9341">Alternate
          Marking</xref>technique described in <xref
          target="I-D.song-mpls-flag-based-opt"/> can use GFI to identify the
          flow under test.</t>

          <t hangText="Entropy:">The GFI can be used as an entropy label for
          load balancing on multiple paths.</t>

          <t hangText="DetNet:"><xref target="RFC8964">RFC8964</xref> defines
          the MPLS dataplane for Deterministic Networking. A DetNet "service"
          label is used between DetNet nodes that implement the DetNet service
          sub-layer functions. An S-Label is used to identify a DetNet flow at
          the DetNet service sub-layer at a receiving DetNet node. Within MNA
          architecture, the GFI can be used as the S-Lable.</t>
        </list></t>
    </section>

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

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requires a new option code assigned to indicate
      GFI.</t>
    </section>

    <section anchor="Acknowledgments" title="Acknowledgments">
      <t>The comments and suggestions of the following are gratefully
      acknowledged:</t>

      <t><list style="none">
          <t>TBD</t>
        </list></t>
    </section>
  </middle>

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

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

      <?rfc include='reference.I-D.ietf-mpls-mna-hdr'?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.9341'?>

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

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

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

      <?rfc include='reference.I-D.song-ippm-postcard-based-telemetry'?>

      <?rfc include='reference.I-D.song-mpls-flag-based-opt'?>
    </references>
  </back>
</rfc>
