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

<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<rfc
      xmlns:xi="http://www.w3.org/2001/XInclude"
      category="std"
      docName="draft-liu-opsawg-ipfix-path-segment-01"
      ipr="trust200902"
      obsoletes=""
      updates=""
      submissionType="IETF"
      xml:lang="en"
      tocInclude="true"
      tocDepth="4"
      symRefs="true"
      sortRefs="true"
      version="3">

 <!-- ***** FRONT MATTER ***** -->

 <front>


   <title abbrev="IPFIX for PSID">Export of Path Segment Identifier Information in IPFIX</title>
    <seriesInfo name="Internet-Draft" value="draft-liu-opsawg-ipfix-path-segment-01"/>
   <author fullname="Yao Liu" surname="Liu">
      <organization>ZTE</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <phone></phone>
        <email>liu.yao71@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
   <author fullname="Zhenqiang Li" surname="Li">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city></city>
          <region/>
          <code/>
          <country></country>
        </postal>
        <phone></phone>
        <email>lizhenqiang@chinamobile.com</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
   <author fullname="Yisong Liu" surname="Liu">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city></city>
          <region/>
          <code/>
          <country></country>
        </postal>
        <phone></phone>
        <email>liuyisong@chinamobile.com</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>	
   <author fullname="Changwang Lin" surname="Lin">
      <organization>New H3C Technologies</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city></city>
          <region/>
          <code/>
          <country></country>
        </postal>
        <phone></phone>
        <email>linchangwang.04414@h3c.com</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>	
    <date year="2025"/>

   <!-- Meta-data Declarations -->

   <area>OPS</area>
    <workgroup>OPSAWG</workgroup>
    <!-- WG name at the upperleft corner of the doc,
        IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

   <keyword>IPFIX</keyword>
   <keyword>SR</keyword>
   <keyword>path segment</keyword>
    <!-- Keywords will be incorporated into HTML output
        files in a meta tag but they have no effect on text or nroff
        output. If you submit your draft to the RFC Editor, the
        keywords will be used for the search engine. -->

   <abstract>
      <t>This document introduces a new IPFIX Information Element to identify the Path Segment Identifier(PSID) in the SRH for SRv6 path identification purpose. </t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
	  <t><xref target="RFC9487"></xref> introduces new IP Flow Information Export (IPFIX) Information Elements (IEs) to identify a set of information related to Segment Routing over IPv6 (SRv6). For the SRv6 segment list, two IPFIX IPv6 SRH IEs are defined in <xref target="RFC9487"></xref>, srhSegmentIPv6BasicList (elementID:496) and srhSegmentIPv6ListSection (elementID:497), both encoding the Segment List in the SRH starting from Segment List[0].</t>
<t>When monitoring a traffic flow in an SR network, a typical use case is to answer the following questions:</t>
		<ul spacing="normal">
		<li>How many packets are steered into an certain SR path ?</li>
		<li>Which SR Policy or candidate path or segment list this SR path belongs to ?</li>
		</ul>
<t>To answer these questions, when exporting the flow record using IPFIX messages, the SR path information needs to be included.</t>

<t>An SRv6 path could be identified by the content of a segment list in IPFIX using IE496 or IE497, but the segment list is not always the best key identifier due to the following reasons:</t>
		<ul spacing="normal">
		<li>When a segment list contains many SIDs, the size of IPFIX message (especially the data record) would be large, making the collecting and analyzing of flow records inefficient.</li>
		<li>In the cases that different SRv6 policies use the same segment list for traffic steering, it is difficult to distinguish the traffic flow of different SRv6 policies.</li>
		<li>An SRv6 path may not be identified by the segment list carried by the SRH in reduced mode <xref target="RFC8754"></xref> as the first SID is not present in the SRH.</li>
		</ul>

<t>Path Segment is a type of Segment Routing (SR) segment, and a Path Segment Identifier (PSID) is used to identify an SR path.
PSID in SRv6 networks is defined in <xref target="I-D.ietf-spring-srv6-path-segment"></xref>. In SRH, the PSID appears as the last entry in the segment list.</t>

<t>This document introduces a new IPFIX Information Element to identify the Path Segment Identifier(PSID) in the SRH for SRv6 path identification purpose.</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>, <xref target="RFC8402" format="default"></xref>, and <xref target="RFC8754" 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 Record</li>
		<li>Data Record</li>
		<li>Collector</li>		
		</ul>
		<t>The following terms are used as defined in <xref target="RFC8402" format="default"></xref>:</t>	
		<ul spacing="normal">
		<li>Segment Routing (SR)</li>
		<li>Segment List</li>
		<li>SRv6</li>	
		</ul>
		<t>The following terms are used as defined in <xref target="RFC8754" format="default"></xref>:</t>	
		<ul spacing="normal">
		<li>SRH</li>
		<li>Last Entry</li>
		</ul>
		
      </section>

	

	
<section numbered="true" toc="default">
	<name>IANA Considerations</name>
		<t>This document requests IANA to create one new IE 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>
		
		  <artwork align="center" name=""><![CDATA[
     +-------+--------------------------------+
     |Element|              Name              |
     |   ID  |                                |
     +-------+--------------------------------+
     | TBD1  |      srhPSID                   |
     +-------+--------------------------------+
	  
           ]]></artwork>
		
		
		  <dl spacing="compact" newline="false" indent="3">
            <dt>ElementID:</dt>
            <dd>TBD1</dd>
            <dt>Name:</dt>
            <dd>srhPSID</dd>
            <dt>Abstract Data Type:</dt>
            <dd>ipv6Address</dd>
            <dt>Data Type Semantics:</dt>
            <dd>default</dd>
            <dt>Description:</dt>
            <dd>The 128-bit IPv6 address that represents an SRv6 PSID.</dd>
            <dt>Additional Information:</dt>
            <dd>Specified in Section 3 of <xref target="I-D.ietf-spring-srv6-path-segment"></xref>.</dd>
            <dt>Reference:</dt>
            <dd>This document</dd>
          </dl>
		

	</section>


	
<section numbered="true" toc="default">
	<name>Operational Considerations</name>
	<t>As specified in <xref target="I-D.ietf-spring-srv6-path-segment"></xref>, the P-flag in the SRH is set to indicate the presence of PSID. In order to generate Flow Records with PSID included, the metering process MUST understand the P-flag. Only when the P-flag is set SHOULD the metering process capture the last entry in the SRH to get the PSID. If the P-flag in the packet is unset, when the srhPSID appears in the template record, the corresponding field in the data record is RECOMMENDED to set to all zero.</t>
	<t>After decoding the IPFIX messages to get the flow record with PSID included in it at the collector, the collector might process the flow record locally or send it to an analyzer for further analysis purpose. In order to recognize the SR path, the analysis node SHOULD be aware of which SR path the PSID identifies. How to get this information the is out of the scope of this document.</t>
	<t>The IE srhPSID can be used together with srhSegmentIPv6BasicList or srhSegmentIPv6ListSection. As in [I-D.ietf-spring-srv6-path-segment] section 3, the PSID allocate metering is depending on the use case, including:</t>
	<ul spacing="normal">
		<li>each segment list may have its own PSID with different value;</li>
		<li>the same PSID may be used for some or all the segment list under a Candidate path;</li>
		<li>the same PSID may be used for some or all Candidate Path within an SRv6 policy.</li>	
	</ul>		
	<t>So if srhPSID and srhSegmentIPv6BasicList/srhSegmentIPv6ListSection appear together, the srhPSID MAY be used to identify an SR Policy or candidate path, and the information carried in srhSegmentIPv6BasicList/srhSegmentIPv6ListSection shows the detailed segment list belonging to this SR Policy or candidate path. This document does not limit how to use srhPSID and the detail is out of scope.</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>
		<t>Other security considerations for SRv6 PSID described in <xref target="I-D.ietf-spring-srv6-path-segment"></xref> apply to this document. </t>
</section>	
	
	
  </middle>
  <!--  *****BACK MATTER ***** -->

 <back>

   <references>
      <name>References</name>
      <references>
        <name>Normative References</name>

		<?rfc include="reference.RFC.2119.xml"?>
		<?rfc include="reference.RFC.8174.xml"?>
	  	<?rfc include='reference.I-D.ietf-spring-srv6-path-segment.xml'?>			
		<?rfc include="reference.RFC.7012.xml"?>
		<?rfc include="reference.RFC.8754.xml"?>
 		<?rfc include="reference.RFC.8402.xml"?>
		<?rfc include="reference.RFC.7011.xml"?> 
		<reference anchor="IANA-IPFIX" target="https://www.iana.org/assignments/ipfix" quoteTitle="true" derivedAnchor="IANA-IPFIX">
          <front>
            <title>IP Flow Information Export (IPFIX) Entities</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
            <date/>
          </front>
        </reference>
	  
      </references>
      <references>
        <name>Informative References</name>
		<?rfc include="reference.RFC.9487.xml"?>

      </references>
    </references>


 </back>
</rfc>
