<?xml version='1.0' encoding='UTF-8'?>
<rfc
      xmlns:xi="http://www.w3.org/2001/XInclude"
      category="std"
      docName="draft-liu-opsawg-ipfix-mpls-mna-00"
      ipr="trust200902"
      submissionType="IETF"
      xml:lang="en"
      tocInclude="true"
      tocDepth="4"
      symRefs="true"
      sortRefs="true"
      version="3">

  <front>
    <title abbrev="IPFIX MPLS MNA">Export of MPLS Network Action (MNA) Information in IPFIX</title>
    <seriesInfo name="Internet-Draft" value="draft-liu-opsawg-ipfix-mpls-mna-00"/>
    <author fullname="Yao Liu" surname="Liu">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <country>China</country>
        </postal>
        <email>liu.yao71@zte.com.cn</email>
      </address>
    </author>
    <date year="2025"/>
    <area>OPS</area>
    <workgroup>OPSAWG</workgroup>
    <keyword>IPFIX</keyword>
    <keyword>MPLS</keyword>
    <keyword>MNA</keyword>
    <abstract>
      <t>This document introduces new IPFIX IEs for exporting MPLS Network Action (MNA) information in IPFIX, covering both in-stack and post-stack MNAs.</t>
    </abstract>
  </front>
  
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>  	
	<t>MPLS Network Actions (MNAs), as introduced in <xref target="RFC9789"/>, are used to indicate actions that impact the forwarding or other processing (such as monitoring) of the packet along the Label Switched Path (LSP) of the packet and to transfer any additional data needed for these actions.</t>
	<t>Two types of MNAs solutions are defined:</t>
	<ul spacing="normal">
		<li>MNA Sub-Stack Solution/In-stack Solution: as in <xref target="I-D.ietf-mpls-mna-hdr"/>, it is used to carry Network Actions and Ancillary Data in the MPLS label stack. In-stack actions and ancillary data are contained in a Network Action Sub-Stack (NAS), which is recognized by a new base Special Purpose Label (bSPL).</li>
		<li>Post-Stack MNA Solution: as in <xref target="I-D.ietf-mpls-mna-ps-hdr"/>, it is for carrying Network Actions and Ancillary Data after the MPLS label stack. The Post-Stack MPLS Header (PSMH) consists of two main parts: 
Post-Stack MPLS Header (PSMH) Type and Post-Stack Network Action Encoding.</li>
		</ul>
		
				
	<t>When monitoring a traffic flow with MPLS MNA encoding, the following information may be required by the network operator.</t>
		<ul spacing="normal">
		<li>What's the content of the MNAs carried in the MPLS label stack ?</li>
		<li>What's the content of the MNAs carried after the MPLS label stack ?</li>
		</ul>
	<t>In the existing IPFIX mechanism, mplsLabelStackSection(IE 316)  can be used to carry a series of n octets from the MPLS label stack of a sampled packet, starting sectionOffset(IE 409) octets into the MPLS label stack, and mplsPayloadPacketSection(IE 317) carries a series of n octets from the MPLS payload of a sampled packet, starting sectionOffset(IE 409) octets into the MPLS payload.</t>
	<t>If mplsLabelStackSection(IE 316) and mplsPayloadPacketSection(IE 317) are used to carry the MNA information, additional procedures are required at the network analyzer to parse the mplsLabelStackSection or the mplsPayloadPacketSection information to see if there's any MNA information carried in it and what's the detailed MNA information. And this would bring extra complexity in the network analyzer.</t>
	<t>This document introduces new IPFIX IEs for exporting MNA information in IPFIX, covering both in-stack and post-stack MNAs.</t>
	  </section>

<section numbered="true" toc="default">
        <name>Terminology</name>
		<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" format="default"></xref> <xref target="RFC8174" format="default"></xref> when, and only when, they appear in all capitals, as shown here.</t>
		<t>This document makes use of the terms defined in <xref target="RFC7011" format="default"></xref> and <xref target="RFC9789" format="default"></xref>.</t>
		<t>The following terms are used as defined in <xref target="RFC7011" format="default"></xref>:</t>	
		<ul spacing="normal">
		<li>IPFIX</li>
		<li>IPFIX Information Elements</li>
		<li>Metering Process</li>
		<li>Template</li>
		<li>Collector</li>
		<li>IPFIX Device</li>		
		</ul>
		<t>The following terms are used as defined in <xref target="RFC9789" format="default"></xref>:</t>	
		<ul spacing="normal">
		<li>MPLS Network Action (MNA)</li>
		<li>Label Stack Entry (LSE)</li>
		<li>Ancillary Data (AD)</li>
		<li>Network Action Sub-Stack (NAS)</li>
		<li>Post-Stack Data</li>		
		</ul>

	
	</section> 

	
	<section numbered="true" toc="default">
	<name>IPFIX IEs for MNA</name>
	<t>This section defines several Encapsulation Layer IEs for MPLS MNAs. Section 3.1 defines IEs for MNAs carried in the MPLS label stack (in-Stack MNA) and section 3.2 defines IEs for MNAs carried after the bottom of the MPLS label stack (post-Stack MNA).</t>
	
	<section numbered="true" toc="default">
	<name>IPFIX IEs for In-Stack MNAs</name>
	
		<section numbered="true" toc="default">
		<name>mplsMnaSubStack</name>
		<dl newline="false" indent="3" spacing="normal" >
          <dt>Name:</dt>
          <dd>
            <t>mplsMnaSubStack</t>
          </dd>
          <dt>ElementID:</dt>
          <dd >
            <t>TBD1</t>
          </dd>
          <dt>Description:</dt>
          <dd>
            <t indent="0">The MNA Sub-Stack in the MPLS label stack with the MNA Sub-Stack Indicator excluded. This Information Element has a variable length. Multiple mplsMnaSubStack IEs can be specified within a single Template since multiple MPLS Network Action Sub-Stacks (NASes) may appear in a label stack as described in section 3 of <xref target="I-D.ietf-mpls-mna-hdr"/>.</t> 
          </dd>
          <dt>Abstract Data Type:</dt>
          <dd>
            <t indent="0" >octetArray</t>
          </dd>
          <dt>Data Type Semantics:</dt>
          <dd>
            <t indent="0">default</t>
          </dd>
		  <dt>Additional Information:</dt>
          <dd>
            <t indent="0">See <xref target="I-D.ietf-mpls-mna-hdr"/>.</t>
          </dd>
          <dt>Reference:</dt>
          <dd>
            <t indent="0" ><xref target="I-D.ietf-mpls-mna-hdr"/></t>
          </dd>
        </dl>
</section>

<section numbered="true" toc="default">
<name>mplsMnaLseFormatB</name>
		<dl newline="false" indent="3" spacing="normal" >
          <dt>Name:</dt>
          <dd>
            <t>mplsMnaLseFormatB</t>
          </dd>
          <dt>ElementID:</dt>
          <dd >
            <t>TBD2</t>
          </dd>
          <dt>Description:</dt>
          <dd>
            <t indent="0"> The LSE Format B carried in the MPLS Network Action Sub-Stack(NAS). As defined in section 5 of <xref target="I-D.ietf-mpls-mna-hdr"/>, the second LSE in a NAS MUST be a Format B LSE. This LSE contains an initial opcode plus additional fields that describe the NAS. The size of this Information Element is 3 octets. </t>
			<t indent="0">If multiple mplsMnaLseFormatB Information Elements are specified within a single Template, then they apply to the mplsMnaSubStack Information Elements in order: the first  mplsMnaLseFormatB applies to the first mplsMnaSubStack, the second to the second, and so on. Note that the "closest" mplsMnaLseFormatB and mplsMnaSubStack Information Elements within a given Template are not necessarily related. If there are fewer mplsMnaLseFormatB Information Elements than mplsMnaSubStack Information Elements, then subsequent mplsMnaSubStack Information Elements have no LSE Format B information in this template. If there are more mplsMnaLseFormatB Information Elements than the number of mplsMnaSubStack Information Elements, then the additional mplsMnaLseFormatB Information Elements are meaningless.
			</t> 
          </dd>
          <dt>Abstract Data Type:</dt>
          <dd>
            <t indent="0" >octetArray</t>
          </dd>
          <dt>Data Type Semantics:</dt>
          <dd >
            <t indent="0">default</t>
          </dd>
		  <dt>Additional Information:</dt>
          <dd>
            <t indent="0">See section 4.2 in <xref target="I-D.ietf-mpls-mna-hdr"/> for the definition of LSE Format B.</t>
          </dd>
          <dt>Reference:</dt>
          <dd>
            <t indent="0" >This document.</t>
          </dd>
        </dl>
	</section>


	</section>

	<section numbered="true" toc="default">
	<name>IPFIX IEs for Post-Stack MNAs</name>
	
		<section numbered="true" toc="default">
		<name>mnaPostStackMplsHeaderSection</name>

		<dl newline="false" indent="3" spacing="normal" >
          <dt>Name:</dt>
          <dd>
            <t>mnaPostStackMplsHeaderSection</t>
          </dd>
          <dt>ElementID:</dt>
          <dd >
            <t>TBD3</t>
          </dd>
          <dt>Description:</dt>
          <dd>
            <t indent="0">The Post-Stack MPLS Header encoded after the Bottom of the MPLS label stack. This Information Element has a variable length. </t> 
          </dd>
          <dt>Abstract Data Type:</dt>
          <dd>
            <t indent="0" >octetArray</t>
          </dd>
          <dt>Data Type Semantics:</dt>
          <dd>
            <t indent="0">default</t>
          </dd>
		  <dt>Additional Information:</dt>
          <dd>
            <t indent="0">See section 3 of <xref target="I-D.ietf-mpls-mna-ps-hdr"/>.</t>
		  </dd>
          <dt>Reference:</dt>
          <dd>
            <t indent="0" >This document.</t>
          </dd>
        </dl>
</section>	
	<section numbered="true" toc="default">
	<name>mnaPostStackMplsHeaderType</name>
		<dl newline="false" indent="3" spacing="normal" >
          <dt>Name:</dt>
          <dd>
            <t>mnaPostStackMplsHeaderType</t>
          </dd>
          <dt>ElementID:</dt>
          <dd >
            <t>TBD4</t>
          </dd>
          <dt>Description:</dt>
          <dd>
            <t indent="0">This IE carries the Post-Stack MPLS Header Type defined in section 3.2.1 of <xref target="I-D.ietf-mpls-mna-ps-hdr"/>. The Post-Stack MPLS Header type is the top-header for all the Post-Stack Network Actions that are encoded in the PSMH for each scope. The size of this Information Element is 4 octets. </t> 
          </dd>
          <dt>Abstract Data Type:</dt>
          <dd>
            <t indent="0" >octetArray</t>
          </dd>
          <dt>Data Type Semantics:</dt>
          <dd >
            <t indent="0">default</t>
          </dd>
		  <dt>Additional Information:</dt>
          <dd>
            <t indent="0">See section 3.2.1 of <xref target="I-D.ietf-mpls-mna-ps-hdr"/>.</t>
			</dd>
          <dt>Reference:</dt>
          <dd>
            <t indent="0" >This document.</t>
          </dd>
        </dl>
	</section>
	</section>

</section>

	
<section numbered="true" toc="default">
	<name>Operational Considerations</name>
<t>For the in-stack MNAs, as specified in <xref target="I-D.ietf-mpls-mna-hdr"/>, the presence of the MNA Sub-Stack Indicator is indicated by the MNA Sub-Stack Indicator which is a Base Special-Purpose MPLS Label with value TBA. To generate Flow Records with the in-Stack MNA IEs included, the metering process MUST understand the MNA Sub-Stack Indicator. If the Base Special-Purpose MPLS Label with value TBA is absent in the label stack, when the in-Stack MNA IEs appear in the template record, the corresponding field in the data record is RECOMMENDED to set to all zeros.</t>

<t>For the post-stack MNAs, since the presence of the Post-Stack MPLS Header is indicated by the P-bit in the LSE Format B <xref target="I-D.ietf-mpls-mna-ps-hdr"/> which is carried in the label stack following the MNA Sub-Stack Indicator, the metering process MUST understand the MNA Sub-Stack Indicator and the P-bit in the LSE Format B. Only when the P-bit is set SHOULD the metering process capture the post-stack MNA information after the bottom of the stack.</t>

</section>


<section numbered="true" toc="default">
	<name>Security Considerations</name>
		<t>There are no additional security considerations regarding allocation of these new IPFIX IEs compared to <xref target="RFC7012" format="default"></xref>.</t>
</section>	

<section numbered="true" toc="default">
	<name>IANA Considerations</name>
		<t>This document requests IANA to create new IEs under the "IPFIX Information Elements" registry <xref target="RFC7012" format="default"></xref> available at <xref target="IANA-IPFIX" format="default" sectionFormat="of" derivedContent="IANA-IPFIX"/>.</t>		
<table anchor="iana-mna">
		<name>IPFIX Information Elements Registry</name>
		<thead>
		<tr>
		<td>Element ID</td><td>Name</td><td>Reference</td>
		</tr>
		</thead>
		<tbody>
		<tr>
		<td>TBD1</td><td>mplsMnaSubStack</td><td>This document</td>
		</tr>
		</tbody>
		<tbody>
		<tr>
		<td>TBD2</td><td>mplsMnaLseFormatB</td><td>This document</td>
		</tr>
		</tbody>
		<tbody>
		<tr>
		<td>TBD3</td><td>mnaPostStackMplsHeaderSection</td><td>This document</td>
		</tr>
		</tbody>
		<tbody>
		<tr>
		<td>TBD4</td><td>mnaPostStackMplsHeaderType</td><td>This document</td>
		</tr>
		</tbody>		
	</table>		
	

	</section>



	
  </middle>
  <!--  *****BACK MATTER ***** -->

 <back>
  <references>
    <name>References</name>
    <references>
      <name>Normative References</name>
      
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-mna-hdr.xml"/>	
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-mna-ps-hdr.xml"/>	  
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7011.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7012.xml"/>

      <reference anchor="IANA-IPFIX" target="https://www.iana.org/assignments/ipfix">
        <front>
          <title>IP Flow Information Export (IPFIX) Entities</title>
          <author><organization>IANA</organization></author>
          <date/>
        </front>
      </reference>
    </references>

    <references>
      <name>Informative References</name>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9789.xml"/>
    </references>
  </references>



 </back>
</rfc>
