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

<!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-muti-layer-02"
      ipr="trust200902"
      obsoletes=""
      updates="RFC7011"
      submissionType="IETF"
      xml:lang="en"
      tocInclude="true"
      tocDepth="4"
      symRefs="true"
      sortRefs="true"
      version="3">

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

 <front>
   <title abbrev="IPFIX MultiLayer">Export of Multiple Encapsulation Layer Information in IPFIX</title>
    <seriesInfo name="Internet-Draft" value="draft-liu-opsawg-ipfix-muti-layer-02"/>
   <author fullname="Yao Liu" surname="Liu">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city></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="Taoran Zhou" surname="Zhou">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city></city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <phone></phone>
        <email>zhou.taoran@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
    </author>	
	
    <date year="2026"/>

   <!-- 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>Multiple Layer Encapsulation</keyword>
   <keyword>IP-in-IP</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 analyzes the requirements and problems when monitoring flows with multi-layer network encapsulations. This document aims to solve this problem by updating RFC7011 and introducing new IPFIX IEs for encapsulation layer indication.</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>  	
	<t>A packet may have multi-layer network encapsulations, and each layer may use the same or different network encapsulation headers. e.g, IP in IP encapsulation <xref target="RFC2003" format="default"></xref>, which is an IP tunneling mechanism that encapsulates one IP packet in another IP packet, typical IP-in-IP scenario includes IPv4-in-IPv4, IPv6-in-IPv6, IPv4-in-IPv6 and IPv6-in-IPv4.</t>
	<t>With the deployment of SRv6, the appearance of packets with IPv4-in-IPv6 or IPv6-in-IPv6 encapsulation becomes more and more common in the network. And there may be more than two network encapsulation layers in one packet as analyzed in section 3.1.</t>	
	<t>When monitoring a traffic flow with multiple encapsulations, e.g IP-in-IP, a typical use case is to answer the following questions:</t>
		<ul spacing="normal">
		<li>Which tunnel are the packets steered into (e.g, identified by the outmost IP header) ?</li>
		<li>What are the details of the inner packet (e.g, identified by the innermost IP header) ?</li>
		</ul>
	<t>However, based on the existing IPFIX mechanisms, it is not easy to differentiate between IEs of different encapsulation layers.</t>
	<t>This document aims to solve this problem by updating <xref target="RFC7011" format="default"></xref> and introducing new IPFIX IEs for encapsulation layer indication.</t>
	<t>[Editor's Note]This version provides two alternative options to indicate the encapsulation layer information for discussion.</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>Template</li>
		<li>Collector</li>
		<li>IPFIX Device</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>
		<li>BSID</li>		
		</ul>
		<t>The following terms are used as defined in <xref target="RFC8754" format="default"></xref>:</t>	
		<ul spacing="normal">
		<li>SRH</li>
		</ul>	
      </section>


	<section numbered="true" toc="default">
	<name>Use Cases and Requirements</name>
	
		<section numbered="true" toc="default">
	<name>Use Cases</name>
<t>There may be more than two network encapsulation layers in one packet. As shown in the figure below.	</t>

		  <artwork align="center" name=""><![CDATA[
+---+  +---+  +---+  +---+  +---+  +---+
|PE1|--|R1 |--|T1 |--|R2 |--|R3 |--|PE2|
+-+-+  +---+  +---+  +---+  +---+  +---+
  |                                  |
+-+-+                              +-+-+
|CE1|                              |CE1|
+---+                              +---+
           ]]></artwork>
		
	
<t>CE1 sends IPv6 packets to CE2.</t>
<t>Packet leaving CE1: IPv6&lt;SA=CE1,DA=CE2></t>
<t>PE1 performs SRv6 function H.Encaps with SRv6 Policy, and the corresponding SID list is &lt;SID-R1,SID-T1,SID-PE2&gt;, wherein SID-T1 is a BSID initiated on node T1.</t> 
<t>Packet leaving PE1: IPv6&lt;SA=PE1,DA=SID-R1&gt;&lt;SID-R1,SID-T1,SID-PE2&gt;IPv6&lt;SA=CE1,DA=CE2></t>
<t>When the packet arrives at T1, based on BSID SID-T1 , T1 performs End.B6.Encaps <xref target="RFC8986" format="default"></xref> and encapsulate the third IPv6 header onto the packet with the corresponding SID list &lt;SID-R2,SID-R3&gt;.</t>
<t>Packet leaving T1:IPv6&lt;SA=T1,DA=R2&gt;&lt;SID-R2,SID-R3&gt;IPv6&lt;SA=PE1,DA=SID-PE2>lt;SID-R1,SID-T1,SID-PE2&gt;IPv6&lt;SA=CE1,DA=CE2&gt;</t>
<t>So the packet observed at node R2 has three IPv6 headers in it.</t>
<t>Based on different goals of the network monitor, the data collection scenario may include one of the following:</t>
		<ul spacing="normal">
		<li>The network monitor wants to collect the information of the outmost SRH and the inner SRH of the same packet. </li>
		<li>The network monitor only wants to collect the information of the outmost IPv6 header.</li>
		<li>The network monitor only wants to collect the information of the innermost IPv6 header.</li>
		<li>The network monitor wants to collect the SA of the outmost IPv6 header (i.e., the starting point of the tunnel) and the DA of the innermost IPv6 header(i.e., the final destination of the packet)</li>

		</ul>



	</section> 
	
	
		<section numbered="true" toc="default">
	<name>Requirements</name>
<t> Based on the scenarios described in section 3.1, the information collection requirements in IPFIX for multi-layer encapsulated packets include:</t>

		<ul spacing="normal">
		<li>Req-a: Collecting the same fields from both the outer and inner packet headers at the same time.</li>
		<li>Req-b: Collecting only the fields from the inner packet header.</li>
		<li>Req-c: Collecting only the fields from the outer packet header</li>
		<li>Req-d: Collecting different fields from the outer and inner packet headers at the same time.</li>

		</ul>

<t>For Req-a, <xref target="RFC7011" format="default"></xref> specifies that, if an Information Element is required more than once in a Template, the different occurrences of this Information Element SHOULD follow the logical order of their treatments by the Metering Process, but it can not be guaranteed that all the implementations follow this rule since there is not a "MUST" in the specification in <xref target="RFC7011" format="default"></xref>. </t> 
 
			   
		   	</section> 
	
	
	
	</section> 

<section numbered="true" toc="default">
	<name>Updates to RFC 7011</name>
<t>This document updates section 8 of <xref target="RFC7011" format="default"></xref> by specifying mandatory rules when an Information Element is required more than once in a Template. The rules are:</t>
<t>If an Information Element is required more than once in a Template,
 the different occurrences of this Information Element MUST follow the logical order of their treatments by the Metering Process. For example, if a selected packet goes through two hash functions, and if the two hash values are sent within a single Template, the first occurrence of the hash value must belong to the first hash function in the Metering Process. For example, when exporting the two source IP addresses of an IPv4-in-IPv4 packet, the first sourceIPv4Address Information Element occurrence must be the IPv4 address of the outer header, while the second occurrence must be the address of the inner header. Collecting Processes MUST properly handle Templates with multiple identical Information Elements. </t>
</section>	
	
	
	  <section numbered="true" toc="default">
	<name>IPFIX IEs for Encapsulation Layer Information</name>
	
	<t>In the following subsections, two options are provided for encapsulation layer indication:</t>
		<ul spacing="normal">
		<li>Option 1: New IEs are defined as the layer separators. The meaning of the IEs of Header Fields (in other words, which encapsulation layer these IEs belongs to), depends on the appearance and the content of the "layer separator" IEs.</li>
		<li>Option 2: A new IE using the data type "subTemplateMultiList" <xref target="RFC6313" format="default"></xref> is defined to carry the multiple encapsulation packet header fields as the structured data. This method avoids the dependencies between IEs. </li>
		</ul>
	
	  <section numbered="true" toc="default">
	<name>IPFIX Encapsulation Layer Information Option 1</name>	
	
	<t>This section defines several Encapsulation Layer IEs for network encapsulation layer indication. When there is no need to differentiate between these IEs in this document, they will be collectively referred to as "encapsulation layer IE".</t>
	
<section numbered="true" toc="default">
<name>encapLayerTop</name>
		<t>A new IE "encapLayerTop" is defined in this section to indicate which IEs in the IPFIX messages belongs to the outmost network encapsulation layer.</t>
		<dl newline="false" indent="3" spacing="normal" >
          <dt>Name:</dt>
          <dd>
            <t>encapLayerTop</t>
          </dd>
          <dt>ElementID:</dt>
          <dd >
            <t>TBD1</t>
          </dd>
          <dt>Description:</dt>
          <dd>
            <t indent="0">A 16-bit identifier indicating that the IEs  that follow immediately after it till the next Encapsulation Layer IE belong to the outmost network encapsulation layer (e.g, from the outmost Ethernet header to the first IP header). If there's not any other Encapsulation Layer IE exists in the Template, it means that all the IEs following encapLayerTop belong to the outmost network encapsulation layer. This IE has a fixed value of 0xFFFF.</t> 
          </dd>
          <dt>Abstract Data Type:</dt>
          <dd>
            <t indent="0" >unsigned16</t>
          </dd>
          <dt>Data Type Semantics:</dt>
          <dd >
            <t indent="0">identifier</t>
          </dd>
          <dt>Reference:</dt>
          <dd>
            <t indent="0" >This document.</t>
          </dd>
        </dl>
</section>

<section numbered="true" toc="default">
<name>encapLayer2</name>
		<t>A new IE "encapLayer2" is defined in this section to indicate which IEs in the IPFIX messages belongs to the second network encapsulation layer.</t>
		<dl newline="false" indent="3" spacing="normal" >
          <dt>Name:</dt>
          <dd>
            <t>encapLayer2</t>
          </dd>
          <dt>ElementID:</dt>
          <dd >
            <t>TBD2</t>
          </dd>
          <dt>Description:</dt>
          <dd>
            <t indent="0">A 16-bit identifier indicating that the IEs  that follow immediately after it till the next Encapsulation Layer IE belong to the second network encapsulation layer. If there's not any other Encapsulation Layer IE exists in the Template, it means that all the IEs following encapLayer2 belong to the second network encapsulation layer.
This IE has a fixed value of 0xFFFF.</t> 
          </dd>
          <dt>Abstract Data Type:</dt>
          <dd>
            <t indent="0" >unsigned16</t>
          </dd>
          <dt>Data Type Semantics:</dt>
          <dd >
            <t indent="0">identifier</t>
          </dd>
          <dt>Reference:</dt>
          <dd>
            <t indent="0" >This document.</t>
          </dd>
        </dl>
</section>

<section numbered="true" toc="default">
<name>encapLayer3</name>
		<t>A new IE "encapLayer3" is defined in this section to indicate which IEs in the IPFIX messages belongs to the third network encapsulation layer.</t>
		<dl newline="false" indent="3" spacing="normal" >
          <dt>Name:</dt>
          <dd>
            <t>encapLayer3</t>
          </dd>
          <dt>ElementID:</dt>
          <dd >
            <t>TBD3</t>
          </dd>
          <dt>Description:</dt>
          <dd>
            <t indent="0">A 16-bit identifier indicating that the IEs  that follow immediately after it till the next Encapsulation Layer IE belong to the third network encapsulation layer. If there's not any other Encapsulation Layer IE exists in the Template, it means that all the IEs following encapLayer3 belong to the third network encapsulation layer.
This IE has a fixed value of 0xFFFF. </t> 
          </dd>
          <dt>Abstract Data Type:</dt>
          <dd>
            <t indent="0" >unsigned16</t>
          </dd>
          <dt>Data Type Semantics:</dt>
          <dd >
            <t indent="0">identifier</t>
          </dd>
          <dt>Reference:</dt>
          <dd>
            <t indent="0" >This document.</t>
          </dd>
        </dl>
</section>
</section>

	  <section numbered="true" toc="default">
	<name>IPFIX for Encapsulation Layer Information Option 2</name>	
<t>A new IE "multiLayerEcapFields" is defined in this section as shown below. This IE supports to carry the header fields for packets with multiple layers of encapsulation. </t>
		<dl newline="false" indent="3" spacing="normal" >
          <dt>Name:</dt>
          <dd>
            <t>multiLayerEcapFields</t>
          </dd>
          <dt>ElementID:</dt>
          <dd >
            <t>TBA1</t>
          </dd>
          <dt>Description:</dt>
          <dd>
           <!--  <t indent="0"> -->
					<ul spacing="normal">
		<li>An IPFIX Information Element that denotes that the header fields of different encapsulation layers will be exported. Each top-level element in a subTemplateMultiList Information Element carries a Template ID, Length, and zero or more Data Records corresponding to the Template ID. The "ordered" structured data type semantic <xref target="RFC6313" format="default"></xref> is used. The Length field of this subTemplateMultiList is encoded in three bytes even though it may be less than 255 octets.</li>
		<li>The template IDs from top to bottom carried in the IE correspond to encapsulation layers of the packet flow, starting from the outermost layer. For example, the data record of the template whose template ID is carried in the first list element belongs to the outmost network encapsulation layer, the data record of the template whose template ID is carried in the second list element belongs to the second network encapsulation layer, and the data record of the template whose template ID is carried in the third list element belongs to the third network encapsulation layer.</li>
		<li>If not all of the encapsulation layers are required to be exported, e.g., only the information of layer 1 and layer 3 need to be exported, the template ID in the data record and the corresponding length field MUST be set to 0 to indicate the absence of the information of this layer.</li>
		</ul>
 
          </dd>
          <dt>Abstract Data Type:</dt>
          <dd>
            <t indent="0" >subTemplateList</t>
          </dd>
          <dt>Data Type Semantics:</dt>
          <dd >
            <t indent="0">list</t>
          </dd>
          <dt>Reference:</dt>
          <dd>
            <t indent="0" >This document.</t>
          </dd>
        </dl>

<t>An example of the encoding of the IE "multiLayerEcapFields" is shown below for a traffic flow with IPv6-in-IPv6-in-IPv6 encapsulation, where the destination address of the outmost IPv6 header and the source address of the innermost IPv6 header are required to be exported, while the information of the second IPv6 header is not needed.</t>

	 <figure>  
		<name>Encoding multiLayerEcapFields, Template for Flow Record</name>
        <artwork align="center" name=""><![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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |          Set ID = 2           |          Length = 12          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |       Template ID = 300       |         Field Count = 1       |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0| IE = multiLayerEcapFields   |     Field Length=65535        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	  
           ]]></artwork>
      </figure>
 		
	 <figure>  
		<name>Template for the outmost IPv6 header </name>
        <artwork align="center" name=""><![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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |          Set ID = 3           |          Length = 12          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |       Template ID = 301       |         Field Count = 1       |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0|IE=destinationIPv6Address(28)|        Field Length = 16      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	  
           ]]></artwork>
      </figure>

	 <figure>  
		<name>Template for the third IPv6 header </name>
        <artwork align="center" name=""><![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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |          Set ID = 4           |          Length = 12          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |       Template ID = 302       |         Field Count = 1       |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0| IE = sourceIPv6Address(27)  |        Field Length = 16      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	 
           ]]></artwork>
      </figure>	
	  
	 <figure>  
		<name>Encoding multiple-layer headers, Data Set</name>
        <artwork align="center" name=""><![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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |          Set ID = 300         |           Length = N          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |      255      |      List Length= 44         |    semantic    |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Top  templateId=301           |        Length = 16            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                     IPv6 DA                                   |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                     IPv6 DA(continued)                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                     IPv6 DA(continued)                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                     IPv6 DA(continued)                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Second  templateId=0          |        Length = 0             |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+	 
     | Third  templateId=302         |        Length = 16            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                     IPv6 SA                                   |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                     IPv6 SA(continued)                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                     IPv6 SA(continued)                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                     IPv6 SA(continued)                        |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
           ]]></artwork>
      </figure>	  
		
 </section>




</section>	
	
<section numbered="true" toc="default">
	<name>Operational Considerations</name>
	
<t>It should be noticed that the layer information on different exportors may be different, since the networking context might be different from each 
exporter and each exporter only knows the layer information locally.</t>

<section numbered="true" toc="default">
	<name>Operational Considerations for Option 1</name>

<t>To generate Flow Records with IEs for encapsulation layer included, the metering process SHOULD recognize the encapsulation layer of the corresponding fields in the packet. This is mainly based on local implementation and the details are out of the scope of this document.</t>
<t>The order of the IEs in the Template Records MUST be guaranteed when using  encapLayerTop/encapLayer2/encapLayer3, that is, the IEs belonging to each encapsulation layer MUST immediately follow the corresponding encapsulation layer IE.</t>
<t>Each encapsulation layer IE SHALL NOT appear more than once in a Template. If there's more than one encapsulation layer IE of the same type in the Template, the Collecting Process MUST ignore the Template and the Collecting Process SHOULD log the error.</t>	
<t>As in <xref target="RFC5012" format="default"></xref>, the Information Elements are derived from fields of packets or from packet treatment. For IEs that are not related with header fields, whether they are covered by scope of the encapsulation layer IE, they SHOULD be processed following the existing specifications. </t>
<t>For IEs of Header Fields that are not in the scope of encapsulation layer IE, e.g, there're IEs of Header Fields in the Template before the appearance of Encapsulation Layer IEs, they SHOULD be processed properly based on the default behavior of the Collector, how the Collector would process them is out of the scope of this document.</t>
<t>Currently only three IEs are defined to meet the traffic monitoring requirements for packets of no more than three layers. If in the future , there're packets with four or five or more encapsulation layers in the network and the packet header information of each layer is required to be exported, more new IEs such as encapLayer4/encapLayer5 MAY be needed</t>

</section>

<section numbered="true" toc="default">
	<name>Operational Considerations for Option 2</name>
<t>Beside the templateId 0, if the templateId used by the multiLayerEcapFields IE in the data record doesn't exist, the collector SHOULD ingore the encapsulation layer this templateId represents and log an error, and it is RECOMMENDED to process the information of other layers normally. </t>

<t>For IEs of Header Fields that are not included the multiLayerEcapFields IE, they SHOULD be processed properly based on the default behavior of the Collector, how the Collector would process them is out of the scope of this document.</t>

<t>As in <xref target="RFC5012" format="default"></xref>, the Information Elements are derived from fields of packets or from packet treatment. For IEs that are not related with header fields, whether they are included in the encapsulation layer IE, they SHOULD be processed following the existing specifications. </t>
	
</section>
</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>For option 1, 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>
		
		  <artwork align="center" name=""><![CDATA[
     +-------+--------------------------------+
     |Element|      Name       |  Reference   |
     |   ID  |                 |              |
     +-------+-----------------+--------------+
     | TBD1  | encapLayerTop   |This document |
     +-------+-----------------+--------------+
     | TBD2  |  encapLayer2    |This document |
     +-------+-----------------+--------------+
     | TBD3  |  encapLayer3    |This document |
     +-------+-----------------+--------------+	  
           ]]></artwork>


<t>For option 2, 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>
		
		  <artwork align="center" name=""><![CDATA[
     +-------+-----------------------------------+
     |Element|      Name          |  Reference   |
     |   ID  |                    |              |
     +-------+--------------------+--------------+
     | TBA1  |multiLayerEcapFields|This document |
     +-------+--------------------+--------------+ 
           ]]></artwork>		   
		

	</section>

	<section numbered="true" toc="default">
	<name>Acknowledgements</name>
		<t>The authors would like to thank Benoit Claise and Thomas Graf for their helpful comments and suggestions.

</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.RFC.7012.xml"?>
		<?rfc include="reference.RFC.8754.xml"?>
 		<?rfc include="reference.RFC.8402.xml"?>
		<?rfc include="reference.RFC.7011.xml"?>
		<?rfc include="reference.RFC.6313.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.2003.xml"?>
		<?rfc include="reference.RFC.8986.xml"?>
		<?rfc include="reference.RFC.5012.xml"?>		
      </references>
    </references>


 </back>
</rfc>
