<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-opsawg-ipfix-gtpu-09"
     ipr="trust200902">
  <front>
    <title
    abbrev="IPFIX support for GTP-U">Export&nbsp;of&nbsp;GTP-U&nbsp;Information&nbsp;in
    IP&nbsp;Flow&nbsp;Information&nbsp;Export&nbsp;(IPFIX)</title>

    <author fullname="Daniel Voyer" initials="D" surname="Voyer">
      <organization>Cisco Systems</organization>

      <address>
        <email>davoyer@cisco.com</email>
      </address>
    </author>

    <author fullname="Sriram Gopalakrishnan" initials="S"
            surname="Gopalakrishnan">
      <organization>Cisco Systems</organization>

      <address>
        <postal>
          <country>India</country>
        </postal>

        <email>sriragop@cisco.com</email>
      </address>
    </author>

    <author fullname="Thomas Graf" initials="T" surname="Graf">
      <organization>Swisscom</organization>

      <address>
        <email>thomas.graf@swisscom.com</email>
      </address>
    </author>

    <author fullname="Vyasraj Satyanarayana" initials="V" surname="Satyanarayana">
      <organization>HPE</organization>

      <address>
        <email>vyasraj.satyanarayana@hpe.com</email>
      </address>
    </author>

    <author fullname="Cristian Staicu" initials="C" surname="Staicu">
      <organization>Bell Canada</organization>

      <address>
        <email>cristian.staicu@bell.ca</email>
      </address>
    </author>

    <date year=""/>

    <area>Operations and Management</area>

    <workgroup>Operations</workgroup>

    <abstract>
      <t>This document introduces IP Flow Information Export (IPFIX) Information
      Elements to report information contained in the Generic Packet Radio
      Service Tunneling Protocol(GTP) User Plane header such as Tunnel Endpoint
      Identifier, and data contained in its session container extension
      header.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="Introduction" title="Introduction">
      <t>A dedicated header, called GPRS Tunneling Protocol (GTP) Header, is
      defined by 3GPP for the GTP User Plane (GTP-U) 
      <xref target="TS.29281"/> traffic of 
      mobile subscribers.</t>

      <t>This document specifies eight IPFIX Information Elements (IEs) <xref
      target="RFC7012"/> to export GTP-U information.</t>

      <t>Specifically, these IEs are used to export the GTP-U Tunnel Endpoint
      Identifier (TEID), QoS Flow Identifier (QFI), and PDU Type from the PDU
      Session Container extension header.</t>

      <t>Some examples are provided in Appendix A.</t>
    </section>

    <section anchor="notation" title="Terminology">
      <t>This document makes use of the terms defined in <xref
      target="RFC7011"/></t>

      <t><list style="symbols">
          <t>IPFIX</t>

          <t>IPFIX Information Element</t>

          <t>Template</t>

          <t>Template Record</t>

          <t>Options Template</t>

          <t>Options Template Record</t>

          <t>Data Record</t>

          <t>Data Set</t>
        </list></t>

      <t>This document uses the term "User Plane" as used by 3GPP GTP-U in
      <xref target="TS.29281"/>.</t>

      <t>The document uses the following abbreviations:</t>

      <t><list style="symbols">
          <t>IE: Information Element</t>

          <t>GTP: GPRS Tunneling Protocol</t>

          <t>GTP-U: GTP User Plane</t>

          <t>GTP-C: GTP Control Plane</t>

          <t>PDU: Protocol Data Unit</t>

          <t>TEID: Tunnel Endpoint Identifier</t>

          <t>UPF: User Plane Function</t>

          <t>QFI: QoS Flow Identifier</t>
        </list></t>
    </section>

    <section anchor="IE" title="IPFIX GTP-U Information Elements">
      <t>This section defines IPFIX IEs corresponding to various fields in the
      GTP-U header. When the corresponding field is not present in the
      observed packet, or when 3GPP specifications state that the field shall
      not be interpreted, an Exporting Process SHOULD use a Template that omits
      the corresponding IE. If operational constraints require use of a fixed
      Template, the Exporting Process MUST export a value of zero for that IE,
      and the Collecting Process MUST treat that value in this context as
      "field not available". Reserved bits in exported gtpuQFI and
      gtpuPduType values MUST be set to zero by the Exporting Process and MUST
      be ignored by the Collecting Process.<list style="hanging">
          <t hangText="gtpuFlags"><vspace blankLines="0"/> 
          8-bit flags field indicating the version of GTP-U header,
          protocol type, and presence of extension header, sequence number and
          N-PDU number defined in Section 5.1 of the 3GPP specification <xref
          target="TS.29281"/>. The bits are exported as observed.</t>

          <t hangText="gtpuMsgType"><vspace blankLines="0"/> 8-bit field
          which indicates the type of the GTP-U message as mentioned in
          section 6.1 of 3GPP specification <xref target="TS.29281"/>.</t>

          <t hangText="gtpuTEid"><vspace blankLines="0"/> 32-bit tunnel
          endpoint identifier field unambiguously identifies a tunnel
          endpoint in the receiving GTP-U
          protocol entity for a given UDP/IP endpoint.</t>

          <t hangText="gtpuSequenceNum"><vspace blankLines="0"/> 16-bit
          sequence number field defined in the GTP-U. This field is
          interpreted based on the sequence number flag value from
          gtpuFlags.</t>

          <t hangText="gtpuQFI"><vspace blankLines="0"/> 6-bit QoS flow
          identifier field defined in PDU Session Container
          extension header of GTP-U. This may be used to
          determine the QoS flow and QoS profile which are associated with the
          received packet. The presence of this extension header is
          interpreted based on the extension header flag value from
          gtpuFlags.</t>

          <t hangText="gtpuPduType"><vspace blankLines="0"/> 4-bit PDU type field
          defined in PDU Session Container extension header of GTP-U. This field
          indicates the structure of the PDU session user plane frame.
          The presence of this extension header is
          interpreted based on the extension header flag value from
          gtpuFlags.</t>

          <t hangText="gtpuTotalHdrLength"><vspace blankLines="0"/> 8-bit field
          indicating the total length of the GTP-U header which includes mandatory 
          fields and all the optional headers as defined in Sections 5.1 and 5.2 of the 3GPP
          specification <xref target="TS.29281"/>. This IE is derived from
          the observed packet header and does not export the GTP-U Length field
          defined in Section 5.1 of <xref target="TS.29281"/>.</t>

          <t hangText="gtpuHeaderSection"><vspace blankLines="0"/> This Information
          Element carries a series of n octets from the GTP-U header mandatory fields
          and all the following optional headers if any, defined in Section 5 of the 3GPP
          specification <xref target="TS.29281"/> as a series of octets in IPFIX.</t>
        </list></t>
    </section>

    <section anchor="Sample-Use-Cases" title="Sample Use Cases">
      <t>The GTP-U related IPFIX IEs are helpful in order to 
      identify the transport performance of PDU Sessions, e.g.,
      with specific QoS class within a network slice  
      (refer to <xref target="RFC9889"/>)
      or within a group of network
      slices hosted on the same User Plane Function (UPF). </t>

      <t>For example, when a set of UPFs are
      deployed per 5G slice, the slice is identified first using a list of
      gNodeB IP addresses composing the slice and a list of IP addresses of UPFs
      dedicated for the slice. The gNodeB and the UPF form the
      tunnel endpoints. The traffic for each individual PDU Session per
      direction is identified using the GTP-U TEID, GTP-U PDU Type together with
      the above mentioned IP tunnel endpoints. Furthermore, the traffic for a specific
      QoS class within a PDU Session per traffic direction is identified using the
      combination of GTP-U TEID, GTP-U PDU Type, and GTP-U QFI attributes. It
      is possible that for a single PDU session there might be multiple IP flows
      with different GTP-U QFI but with same GTP-U TEID.</t>

      <t>In another scenario when multiple 5G slices share the same
      UPF, each slice is identified using a separated list of
      gNodeB IPv4 or IPv6 addresses per slice. If an Uplink Classifier
      (refer to section 3.1 of <xref target="TS.23501"/>)
      is deployed there is an addition of a GTP-U tunnel
      between the Intermediate/Uplink-Classifier UPF and the final UPF. This
      brings a challenge for identifying the end-to-end path for a certain PDU
      Session - the GTP-U PDU Type and GTP-U QFI attributes from the
      gNodeB and Intermediate/Uplink-Classifier UPF tunnel will be the same on
      the Intermediate/Uplink-Classifier and final UPF tunnels, however the
      GTP-U TEIDs will be different since on each tunnel.</t>

      <t>The use of the IPFIX GTP-U IEs is to identify either a particular PDU 
      Session on a particular slice (using GTP-U TEID in combination with the gNodeB
      and the UPF IP addresses) or all the IP traffic flows for a 3GPP QoS flow 
      on a slice (using GTP-U QFI in combination with the gNodeB and the UPF IP addresses) 
      or a 3GPP QoS flow for a particular PDU Session on a slice (using both GTP-U TEID 
      and GTP-U QFI in combination with the gNodeB and UPF IP addresses).</t>

      <t>Additionally, exporting GTP-U IEs together with the transportChecksum IE 503 
      registered in the IANA IPFIX registry <xref target="IANA-IPFIX"/> can
      help detect misbehaving nodes, particularly when using GTP-U over IPv6.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>IANA has registered the following IEs in the
      "IPFIX Information Elements" registry
      available at <xref target="IANA-IPFIX"/>.</t>

      <t>Table 1 lists the GTP-U IEs:</t>

      <t><figure>
          <artwork><![CDATA[

     +-------+-------------------+
     |Element| Name              |
     |       |                   |
     |   ID  |                   |
     |       |                   |
     +-------+-------------------+
     | 505   | gtpuFlags         |
     |       |                   |
     +-------+-------------------+
     | 506   | gtpuMsgType       |
     |       |                   |
     +-------+-------------------+
     | 507   | gtpuTEid          |
     |       |                   |
     +-------+-------------------+
     | 508   | gtpuSequenceNum   |
     |       |                   |
     +-------+-------------------+
     | 509   | gtpuQFI           |
     |       |                   |
     +-------+-------------------+
     | 510   | gtpuPduType       |
     |       |                   |
     +-------+-------------------+
     | TBD1  | gtpuTotalHdrLength|
     |       |                   |
     +-------+-------------------+
     | TBD2  | gtpuHeaderSection |
     |       |                   |    
     +-------+-------------------+

  Table 1: GTP-U IEs in the "IPFIX Information Elements" Registry
     ]]></artwork>
        </figure></t>

    <t>IANA is requested to update the references for the existing GTP-U
    Information Elements listed in Table 1 to point to this RFC.  IANA is
    also requested to allocate two new Information Element IDs for
    gtpuTotalHdrLength and gtpuHeaderSection in the "IPFIX Information
    Elements" registry.</t>

      <section anchor="IANAgtpuFlags" title="gtpuFlags">
        <dl>
          <dt>Name:</dt>

          <dd>gtpuFlags</dd>
        </dl>

        <dl>
          <dt>ElementID:</dt>

          <dd>505</dd>
        </dl>

        <dl>
          <dt>Description:</dt>

          <dd>8-bit flags field indicating the version of GTP-U header,
          protocol type, and presence of extension header, sequence number and
          N-PDU number defined in Section 5.1 of the 3GPP specification <xref
          target="TS.29281"/>. The bits are exported as observed.
          <t>The basic encoding is 8 bits. The layout of the encoding is as
          follows:</t>
          <t><figure>
            <artwork><![CDATA[

          MSB -   0     1     2     3    4    5    6    7   - LSB
                +----+----+----+----+----+----+----+----+
                | Version(3b) | PT | 0  | E  | S  | PN |
                +----+----+----+----+----+----+----+----+

          ]]></artwork>
          </figure></t>
          <t>Examples:</t>
              <t>value : 0x34</t>
              <t>binary: 00110100</t>
              <t>decode: Version=1, PT=1, spare=0, E=1, S=0, PN=0</t>
              <t></t>
              <t>value : 0x36</t>
              <t>binary: 00110110</t>
              <t>decode: Version=1, PT=1, spare=0, E=1, S=1, PN=0</t>
          </dd>
        </dl>

        <dl>
          <dt>Abstract Data Type:</dt>

          <dd>unsigned8</dd>
        </dl>

        <dl>
          <dt>Data Type Semantics:</dt>

          <dd>flags</dd>
        </dl>

        <dl>
          <dt>Additional Information:</dt>

          <dd>Refer to Section 5.1 of <xref target="TS.29281"/>.</dd>
        </dl>

        <dl>
          <dt>Reference:</dt>

          <dd>[RFC-to-be]</dd>
        </dl>
      </section>

      <section anchor="IANAgtpuMsgType" title="gtpuMsgType">
        <dl>
          <dt>Name:</dt>

          <dd>gtpuMsgType</dd>
        </dl>

        <dl>
          <dt>ElementID:</dt>

          <dd>506</dd>
        </dl>

        <dl>
          <dt>Description:</dt>

          <dd>8-bit field which indicates the type of the GTP-U message
          as mentioned in Section 6.1 of the 3GPP specification
          <xref target="TS.29281"/>.</dd>
        </dl>

        <dl>
          <dt>Abstract Data Type:</dt>

          <dd>unsigned8</dd>
        </dl>

        <dl>
          <dt>Data Type Semantics:</dt>

          <dd>identifier</dd>
        </dl>

        <dl>
          <dt>Additional Information:</dt>

          <dd>Refer to Section 6.1 of the 3GPP specification <xref
          target="TS.29281"/>.</dd>
        </dl>

        <dl>
          <dt>Reference:</dt>

          <dd>[RFC-to-be]</dd>
        </dl>
      </section>

      <section anchor="IANAgtpuTEid" title="gtpuTEid">
        <dl>
          <dt>Name:</dt>

          <dd>gtpuTEid</dd>
        </dl>

        <dl>
          <dt>ElementID:</dt>

          <dd>507</dd>
        </dl>

        <dl>
          <dt>Description:</dt>

          <dd>32-bit tunnel endpoint identifier field
          unambiguously identifies a tunnel endpoint in the receiving GTP-U
          protocol entity for a given UDP/IP endpoint.</dd>
        </dl>

        <dl>
          <dt>Abstract Data Type:</dt>

          <dd>unsigned32</dd>
        </dl>

        <dl>
          <dt>Data Type Semantics:</dt>

          <dd>identifier</dd>
        </dl>

        <dl>
          <dt>Additional Information:</dt>

          <dd>Refer to Section 5.1 of the 3GPP specification <xref
          target="TS.29281"/>.</dd>
        </dl>

        <dl>
          <dt>Reference:</dt>

          <dd>[RFC-to-be]</dd>
        </dl>
      </section>

      <section anchor="IANAgtpuSequenceNum" title="gtpuSequenceNum">
        <dl>
          <dt>Name:</dt>

          <dd>gtpuSequenceNum</dd>
        </dl>

        <dl>
          <dt>ElementID:</dt>

          <dd>508</dd>
        </dl>

        <dl>
          <dt>Description:</dt>

          <dd>16-bit
          sequence number field defined in the GTP-U. This field is
          interpreted based on the sequence number flag value from
          gtpuFlags. When the S flag is not set, this IE is not meaningful and
          is exported as specified in <xref target="IE"/>.</dd>
        </dl>

        <dl>
          <dt>Abstract Data Type:</dt>

          <dd>unsigned16</dd>
        </dl>

        <dl>
          <dt>Data Type Semantics:</dt>

          <dd>identifier</dd>
        </dl>

        <dl>
          <dt>Additional Information:</dt>

          <dd>Refer to Section 5.1 of the 3GPP specification <xref
          target="TS.29281"/>.</dd>
        </dl>

        <dl>
          <dt>Reference:</dt>

          <dd>[RFC-to-be]</dd>
        </dl>
      </section>

      <section anchor="IANAgtpuQFI" title="gtpuQFI">
        <dl>
          <dt>Name:</dt>

          <dd>gtpuQFI</dd>
        </dl>

        <dl>
          <dt>ElementID:</dt>

          <dd>509</dd>
        </dl>

        <dl>
          <dt>Description:</dt>

          <dd>6-bit QoS flow identifier field defined in PDU Session Container
          extension header of GTP-U. This may be used to
          determine the QoS flow and QoS profile which are associated with the
          received packet. The presence of this extension header is
          interpreted based on the extension header flag value from
          gtpuFlags. When the PDU Session Container extension header is not
          present, this IE is not meaningful and is exported as specified in
          <xref target="IE"/>. The two most significant bits are reserved,
          MUST be exported as zero, and MUST be ignored on receipt.
          <t>The basic encoding is 8 bits. The layout of basic encoding is as
          follows:</t>
          <t><figure>
            <artwork><![CDATA[

          MSB -   0     1    2    3    4    5    6    7   - LSB
                +----+----+----+----+----+----+----+----+
                |Reserved |       6 bit QFI value       |
                +----+----+----+----+----+----+----+----+

          ]]></artwork>
          </figure></t>
          <t>Examples:</t>
              <t>value : 0x08</t>
              <t>binary: 00001000</t>
              <t>decode: 001000 - QFI value</t>
              <t></t>
              <t>value : 0x3e</t>
              <t>binary: 00111110</t>
              <t>decode: 111110 - QFI value</t>
          </dd>
        </dl>

        <dl>
          <dt>Abstract Data Type:</dt>

          <dd>unsigned8</dd>
        </dl>

        <dl>
          <dt>Data Type Semantics:</dt>

          <dd>identifier</dd>
        </dl>

        <dl>
          <dt>Additional Information:</dt>

          <dd>Refer to Section 5.5.3.3 of the 3GPP specification <xref
          target="TS.38415"/> and Section 5.7.1.1 of the 3GPP specification
          <xref target="TS.23501"/>. The reserved bits in the exported
          octet are set to zero.</dd>
        </dl>

        <dl>
          <dt>Reference:</dt>

          <dd>[RFC-to-be]</dd>
        </dl>
      </section>

      <section anchor="IANAgtpuPduType" title="gtpuPduType">
        <dl>
          <dt>Name:</dt>

          <dd>gtpuPduType</dd>
        </dl>

        <dl>
          <dt>ElementID:</dt>

          <dd>510</dd>
        </dl>

        <dl>
          <dt>Description:</dt>

          <dd>4-bit PDU type field defined in PDU Session Container extension
          header of GTP-U. This field indicates the
          structure of the PDU session user plane frame.
          The presence of this extension header is
          interpreted based on the extension header flag value from
          gtpuFlags. When the PDU Session Container extension header is not
          present, this IE is not meaningful and is exported as specified in
          <xref target="IE"/>. The four most significant bits are reserved,
          MUST be exported as zero, and MUST be ignored on receipt.
          <t>The basic encoding is 8 bits. The layout of basic encoding is as
          follows:</t>
          <t><figure>
            <artwork><![CDATA[

          MSB -   0     1    2    3    4    5    6    7   - LSB
                +----+----+----+----+----+----+----+----+
                |     Reserved      |  4 bit PDU Type   |
                +----+----+----+----+----+----+----+----+

          ]]></artwork>
          </figure></t>
          <t>Examples:</t>
              <t>value : 0x01</t>
              <t>binary: 00000001</t>
              <t>decode: 0001 - PDU Type value</t>
          </dd>
        </dl>

        <dl>
          <dt>Abstract Data Type:</dt>

          <dd>unsigned8</dd>
        </dl>

        <dl>
          <dt>Data Type Semantics:</dt>

          <dd>identifier</dd>
        </dl>

        <dl>
          <dt>Additional Information:</dt>

          <dd>Refer to Section 5.5.3 of the 3GPP specification <xref
          target="TS.38415"/>. The reserved bits in the exported octet are
          set to zero.</dd>
        </dl>

        <dl>
          <dt>Reference:</dt>

          <dd>[RFC-to-be]</dd>
        </dl>
      </section>
      
      <section anchor="IANAgtpuTotalHdrLength" title="gtpuTotalHdrLength">
        <dl>
          <dt>Name:</dt>

          <dd>gtpuTotalHdrLength</dd>
        </dl>

        <dl>
          <dt>ElementID:</dt>

          <dd>TBD1</dd>
        </dl>

        <dl>
          <dt>Description:</dt>

          <dd>8-bit field indicating the total length in octets of the observed
          GTP-U header, including the mandatory 8-octet header and any
          optional fields and extension headers defined in Sections 5.1 and 5.2
          of the 3GPP specification <xref target="TS.29281"/>. This IE is
          derived from the observed packet header and does not export the
          GTP-U Length field defined in Section 5.1 of <xref
          target="TS.29281"/>.</dd>
        </dl>

        <dl>
          <dt>Abstract Data Type:</dt>

          <dd>unsigned8</dd>
        </dl>

        <dl>
          <dt>Data Type Semantics:</dt>

          <dd>quantity</dd>
        </dl>

        <dl>
          <dt>Additional Information:</dt>

          <dd>Refer to Sections 5.1 and 5.2 of <xref target="TS.29281"/>.</dd>
        </dl>

        <dl>
          <dt>Reference:</dt>

          <dd>[RFC-to-be]</dd>
        </dl>
      </section>

      <section anchor="IANAgtpuHeaderSection" title="gtpuHeaderSection">
        <dl>
          <dt>Name:</dt>

          <dd>gtpuHeaderSection</dd>
        </dl>

        <dl>
          <dt>ElementID:</dt>

          <dd>TBD2</dd>
        </dl>

        <dl>
          <dt>Description:</dt>

          <dd>This Information Element carries a series of n octets from
          the observed GTP-U header, including the mandatory header and any
          optional fields and extension headers defined in Sections 5.1 and 5.2
          of the 3GPP specification <xref target="TS.29281"/>, as a series
          of octets in IPFIX.</dd>
        </dl>

        <dl>
          <dt>Abstract Data Type:</dt>

          <dd>octetArray</dd>
        </dl>

        <dl>
          <dt>Data Type Semantics:</dt>

          <dd>default</dd>
        </dl>

        <dl>
          <dt>Additional Information:</dt>

          <dd>Refer to Section 5 of <xref target="TS.29281"/>.</dd>
        </dl>

        <dl>
          <dt>Reference:</dt>

          <dd>[RFC-to-be]</dd>
        </dl>
      </section>

    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to thank Benoit Claise, Ketan Talaulikar, Dhananjay Patki,
      Paul Aitken, Shraddha Hegde, Chongfeng Liu, and Mahesh Jethanandani for their reviews and valuable comments.</t>
    </section>

    <section anchor="Contributors" title="Contributors">
      <contact fullname="Kandhla Chandi">
        <organization showOnFrontPage="true">Bell Canada</organization>

        <address>
          <email>kandhla.chandi@bell.ca</email>
        </address>
      </contact>

      <contact fullname="Ralu Johny">
        <organization showOnFrontPage="true">Cisco</organization>

        <address>
          <email>rjohny@cisco.com</email>
        </address>
      </contact>
    </section>

    <section anchor="Implementation" title="Implementation Status">
      <t>Note to the RFC-Editor: Please remove this section before
      publishing.</t>

      <section anchor="Cisco" title="Cisco IOS XR">
        <t>Cisco implemented the following IEs as part of a test
        implementation in the IOS XR platform. This implementation currently
        covers six of the eight IEs defined in this document; it does not yet
        cover gtpuTotalHdrLength or gtpuHeaderSection:</t>

        <t><list style="symbols">
            <t>gtpuFlags</t>

            <t>gtpuMsgType</t>

            <t>gtpuTEid</t>

            <t>gtpuSequenceNum</t>

            <t>gtpuQFI</t>

            <t>gtpuPduType</t>
          </list></t>
      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The IEs described in this document export GTP user plane information on
      how packets are being forwarded in a 3GPP network. In particular, TEIDs,
      QFIs, PDU types, and raw header sections can enable correlation of
      traffic with individual PDU sessions and, depending on deployment, with
      subscriber activity. Implementations and operators therefore SHOULD treat
      this data as sensitive network telemetry.</t>

      <t>Applications and operators using the IEs described in this document
      must evaluate the sensitivity of this information in their
      implementation context, and apply the data-at-rest storage guidance in
      Section 11.8 of <xref target="RFC7011"/> as appropriate.</t>

      <t>Operators SHOULD restrict access to these exported IEs, apply retention 
      limits appropriate to sensitive operational telemetry, and avoid exporting 
      gtpuHeaderSection unless required by the operational use case.</t>
    </section>

    <section anchor="Operational" title="Operational Considerations">
      <t>The IPFIX IEs defined in this document require
      extraction of fields from packets.  There may exist older devices in
      the network that do not support extensions defined in this document. For
      those devices <xref target="RFC7133"/> defines dataLinkFrameSection which
      is a useful mechanism to export the packet header as a fallback scenario.
      However, when dataLinkFrameSection is used, Flow aggregation as per 
      <xref target="RFC7015"/> can't be applied. This document will serve as a
      guideline to extract the necessary fields from the GTP-U header for the
      above scenarios.</t>
    </section>
  </middle>

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

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

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

      <reference anchor="TS.29281" derivedAnchor="TS.29281" quoteTitle="true">
        <front>
          <title>General Packet Radio System (GPRS) Tunnelling Protocol User
          Plane (GTPv1-U)</title>

          <author>
            <organization showOnFrontPage="true">3GPP</organization>
          </author>

          <date month="October" year="2022"/>
        </front>

        <seriesInfo name="3GPP TS" value="29.281"/>

        <refcontent>Version 17.4.0</refcontent>
      </reference>

      <reference anchor="TS.38415" derivedAnchor="TS.38415" quoteTitle="true">
        <front>
          <title>NG-RAN; PDU Session User Plane Protocol)</title>

          <author>
            <organization showOnFrontPage="true">3GPP</organization>
          </author>

          <date month="February" year="2024"/>
        </front>

        <seriesInfo name="3GPP TS" value="38.415"/>

        <refcontent>Version 17.1.0</refcontent>
      </reference>

      <reference anchor="TS.23501" derivedAnchor="TS.23501" quoteTitle="true">
        <front>
          <title>5G; System architecture for the 5G System (5GS)</title>

          <author>
            <organization showOnFrontPage="true">3GPP</organization>
          </author>

          <date month="January" year="2024"/>
        </front>

        <seriesInfo name="3GPP TS" value="23.501"/>

        <refcontent>Version 17.11.0</refcontent>
      </reference>
    </references>

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

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

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

          <author/>

          <date/>
        </front>
      </reference>
      
      <reference anchor="RFC9889" target="https://www.rfc-editor.org/info/rfc9889">
        <front>
          <title>A Realization of Network Slices for 5G Networks Using Current IP/MPLS Technologies</title>

          <author fullname="Krzysztof G. Szarkowicz" role="editor">
            <organization>HPE</organization>
          </author>
          <author fullname="Richard Roberts" role="editor">
            <organization>Nokia</organization>
          </author>
          <author fullname="Julian Lucek">
            <organization>HPE</organization>
          </author>
          <author fullname="Mohamed Boucadair" role="editor">
            <organization>Orange</organization>
          </author>
          <author fullname="Luis M. Contreras">
            <organization>Telefonica</organization>
          </author>

          <date month="November" year="2025"/>
        </front>
        <seriesInfo name="RFC" value="9889"/>
      </reference>
    </references>

    <section anchor="Encoding-Example" title="IPFIX Encoding Examples">
      <t>In this section, an example is provided to show IPFIX encoding format
      for the GTP-U introduced IEs. Template definition and data set
      corresponding to an observed GTP-U header is illustrated below.</t>

      <t><figure>
          <artwork><![CDATA[

          Observed GTP-U Header:
          Flags = 0x34, Message Type = 0xff, GTP-U Length = 0x0064,
          TEID = 0x00000001, Sequence Number = 0x0000,
          N-PDU Number = 0x00,
          Next Extension Header Type = 0x85 (PDU Session Container),
          PDU Session Container bytes = 0x01 0x10 0x08 0x00,
          PDU Type = 1, QFI = 8, gtpuTotalHdrLength = 16

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

      <section anchor="Three-Observed-SRH-Headers-and-their-routing-protocol"
               title="Template Record">
        <section anchor="Template-Record-and-Data-Set-with-BasicList"
                 title="Template Record and Data Set">
          <t>Sample template consisting of the GTP-U IEs:</t>

          <t><figure>
              <artwork><![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 = 40             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Template ID = 256        |      Field Count = 8          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|  gtpuFlags = 505            |      Field Length = 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|  gtpuMsgType = 506          |      Field Length = 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|  gtpuSequenceNum = 508      |      Field Length = 2         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|  gtpuTEid = 507             |      Field Length = 4         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|  gtpuQFI = 509              |      Field Length = 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|  gtpuPduType = 510          |      Field Length = 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|  gtpuTotalHdrLength = TBD1  |      Field Length = 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|  gtpuHeaderSection = TBD2   |      Field Length = 0xFFFF    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

        Figure 1: Sample Template Record

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

          <t>In this example, the Template ID is 256, which will be used in
          the Data Record.</t>

          <t>The data set is represented as follows:</t>

          <figure>
            <artwork><![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 = 256          |           Length = 32         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | gtpuFlags     |  gtpuMsgType  |   gtpuSequenceNum= 0x0000     |
   | = 0x36        |  = 0xff       |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   gtpuTEid = 0x00000001                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | gtpuQFI = 8   | gtpuPduType   |  gtpuTotalHdr |  Length = 36  |
   |               | = 0           |  Length = 16  |               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x34            0xff           0x00             0x64     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x00            0x00           0x00             0x01     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x05            0x01           0xd0             0x85     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x01            0x10           0x08             0x00     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x45            0x00           0x00             0x5c     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x03            0xec           0x00             0x00     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x40            0x01           0x7a             0x88     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x0a            0xd4           0xe1             0x49     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x08            0x08           0x08             0x08     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


           Figure 2: Data Set Encoding Format

   The gtpuHeaderSection octets in this example are:
   0x34 0xff 0x00 0x64 0x00 0x00 0x00 0x01
   0x05 0x01 0xd0 0x85 0x01 0x10 0x08 0x00
   0x45 0x00 0x00 0x5c 0x03 0xec 0x00 0x00
   0x40 0x01 0x7a 0x88 0x0a 0xd4 0xe1 0x49
   0x08 0x08 0x08 0x08 

           ]]></artwork>
          </figure>
        </section>
      </section>
    </section>
  </back>
</rfc>
