<?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-19"
     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>cristis0@gmail.com</email>
      </address>
    </author>

    <date year=""/>

    <area>Operations and Management</area>

    <workgroup>Operations</workgroup>

    <abstract>
      <t>This document specifies 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>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>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>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"/> and the term "Uplink Classifier" as used in 
      <xref target="TS.23501"/>.</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>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. The GTP-U header includes a mandatory header and optional fields and 
      extension headers.

      <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 5.1 of the 3GPP specification <xref target="TS.29281"/>.</t>

          <t hangText="gtpuTEid"><vspace blankLines="0"/> 32-bit tunnel
          endpoint identifier field defined in Section 5.1 of the 3GPP specification
          <xref target="TS.29281"/>. This 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 Section 5.1 of the 3GPP specification
          <xref target="TS.29281"/>. This field is
          interpreted based on the sequence number flag value from gtpuFlags. The sequence number is 
          meaningful only when the S (Sequence Number) flag in the observed GTP-U header 
          is set to 1. When the S flag is set to 0, the Exporting Process MUST export a value
          of zero for this IE if it is included in the Template. The Collecting Process MUST 
          interpret the sequence number only when the S flag is set to 1.</t>

          <t hangText="gtpuQFI"><vspace blankLines="0"/> 6-bit QoS flow identifier field 
          defined in PDU Session Container extension header of GTP-U <xref target="TS.29281"/>. This may be used to
          determine the QoS flow and QoS profile which are associated with the
          received packet.  The E (Extension Header) bit in the gtpuFlags IE indicates
          the presence of extension headers but does not necessarily indicate the presence
          of a PDU Session Container extension header. The Exporting Process MUST parse the 
          GTP-U extension-header chain to locate a valid PDU Session Container extension 
          header before exporting a meaningful value for this Information Element. 
          When the Exporting Process cannot identify a valid PDU Session Container extension header 
          in the observed GTP-U header, it MUST export a value of zero for this IE if it is included 
          in the Template. The two most significant bits MUST be exported as zero and MUST be ignored on receipt.</t>

          <t hangText="gtpuPduType"><vspace blankLines="0"/> 4-bit PDU type field defined in 
          PDU Session Container extension header of GTP-U <xref target="TS.29281"/>. This field indicates the
          structure of the PDU session user plane frame.
          The E (Extension Header) bit in the gtpuFlags IE indicates
          the presence of extension headers but does not necessarily indicate the presence
          of a PDU Session Container extension header. The Exporting Process MUST parse the 
          GTP-U extension-header chain to locate a valid PDU Session Container extension 
          header before exporting a meaningful value for this Information Element.
          When the Exporting Process cannot identify a valid PDU Session Container extension header 
          in the observed GTP-U header, it MUST export a value of zero for this IE if it is included 
          in the Template. The four most significant bits MUST be exported as zero and MUST be ignored on receipt.</t>

          <t hangText="gtpuTotalHdrLength"><vspace blankLines="0"/> 16-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 as defined
          in Sections 5.1 and 5.2 of the 3GPP specification <xref target="TS.29281"/>.
          This IE is computed 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 the complete observed GTP-U header 
          as a contiguous sequence of n octets, beginning at the first octet of 
          the mandatory header and including all optional fields and extension 
          headers, if present, as defined in Sections 5.1 and 5.2
          of the 3GPP specification <xref target="TS.29281"/>.</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
      gNB (refer to section 4 of <xref target="TS.38300"/>)
       IP addresses composing the slice and a list of IP addresses of UPFs
      dedicated for the slice. The gNB 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 GTP-U 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
      gNB IPv4 or IPv6 addresses per slice. If an Uplink Classifier
      (refer to section 5.6.4.2 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
      gNB 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 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 gNB
      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 gNB 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 gNB 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 identify GTP-U endpoints that transmit UDP packets with a zero checksum over IPv6.
      As specified in <xref target="TS.29281"/>, UDP zero-checksum operation is permitted only 
      when the peer GTP-U endpoint and the path between the endpoints support it. Such packets 
      may otherwise be discarded by the receiving endpoint or intermediate IPv6 devices. 
      The exported information can help operators identify the affected GTP-U traffic and 
      investigate potential interoperability issues.</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       |
     |       |                   |
     +-------+-------------------+

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

      <t>Table 2 lists the GTP-U IEs to be registered:</t>

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

     +-------+-------------------+
     |Element| Name              |
     |       |                   |
     |   ID  |                   |
     |       |                   |
     +-------+-------------------+
     | TBD1  | gtpuTotalHdrLength|
     |       |                   |
     +-------+-------------------+
     | TBD2  | gtpuHeaderSection |
     |       |                   |    
     +-------+-------------------+

  Table 2: GTP-U IEs to be registered 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 and
    update their descriptions.  IANA is also requested to allocate two 
    new Information Element IDs listed in Table 2 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   | PT |  * | E  | S  | PN |
                +----+----+----+----+----+----+----+----+

          ]]></artwork>
          </figure></t>
          <t> Version is the 3-bit GTP-U protocol version field defined in Section 
          5.1 of the 3GPP specification <xref target="TS.29281"/></t>
          <t>PT means Protocol Type Flag</t>
          <t>E means Extension Header Flag</t>
          <t>S means Sequence Number Flag</t>
          <t>PN means N-PDU Number Flag</t>
          <t>(*) indicates the spare bit in the GTP-U header defined in Section 5.1 of the 
          3GPP specification <xref target="TS.29281"/>.</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 5.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 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="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 defined in Section 5.1 
          of the 3GPP specification <xref target="TS.29281"/>. This 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 Section 5.1 
          of the 3GPP specification <xref target="TS.29281"/>. This field is
          interpreted based on the sequence number flag value from gtpuFlags. The sequence number is 
          meaningful only when the S (Sequence Number) flag in the observed GTP-U header 
          is set to 1. When the S flag is set to 0, the Exporting Process MUST export a value
          of zero for this IE if it is included in the Template. The Collecting Process MUST 
          interpret the sequence number only when the S flag is set to 1.</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 <xref target="TS.29281"/>. This may be used to
          determine the QoS flow and QoS profile which are associated with the
          received packet.  The E (Extension Header) bit in the gtpuFlags IE indicates
          the presence of extension headers but does not necessarily indicate the presence
          of a PDU Session Container extension header. The Exporting Process MUST parse the 
          GTP-U extension-header chain to locate a valid PDU Session Container extension 
          header before exporting a meaningful value for this Information Element. 
          When the Exporting Process cannot identify a valid PDU Session Container extension 
          header in the observed GTP-U header, it MUST export a value of zero for this IE 
          if it is included in the Template. The two most significant bits
          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
                +----+----+----+----+----+----+----+----+
                |    0    |       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"/>.</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 <xref target="TS.29281"/>. This field indicates the
          structure of the PDU session user plane frame.
          The E (Extension Header) bit in the gtpuFlags IE indicates
          the presence of extension headers but does not necessarily indicate the presence
          of a PDU Session Container extension header. The Exporting Process MUST parse the 
          GTP-U extension-header chain to locate a valid PDU Session Container extension 
          header before exporting a meaningful value for this Information Element. 
          When the Exporting Process cannot identify a valid PDU Session Container extension 
          header in the observed GTP-U header, it MUST export a value of zero for this IE 
          if it is included in the Template. The four most significant bits
          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
                +----+----+----+----+----+----+----+----+
                |       0           |  4 bit PDU Type   |
                +----+----+----+----+----+----+----+----+

          ]]></artwork>
          </figure></t>
          <t>Example:</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"/>.</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>16-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 as defined in Sections 5.1 and 5.2
          of the 3GPP specification <xref target="TS.29281"/>. This IE is
          computed 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>unsigned16</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 the complete observed GTP-U header 
          as a contiguous sequence of n octets, beginning at the first octet of 
          the mandatory header and including all optional fields and extension 
          headers, if present, as defined in Sections 5.1 and 5.2
          of the 3GPP specification <xref target="TS.29281"/>.</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
      about packet forwarding in a 3GPP network. In particular, TEIDs,
      QFIs, PDU types, and GTP-U header sections can enable correlation of
      traffic with individual PDU sessions and, depending on deployment, with
      subscriber activity. Implementations and operators therefore MUST treat
      this data as sensitive network telemetry data.</t>

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

      <t>Operators MUST restrict access to these exported IEs, apply retention 
      limits appropriate to sensitive operational telemetry, and MUST NOT export 
      gtpuHeaderSection unless required by the operational use case. An Exporting 
      Process MUST NOT include octets beyond the observed GTP-U header in
      gtpuHeaderSection.</t>

      <t>Exporting Processes and Collecting Processes that exchange the Information 
      Elements defined in this document SHOULD use the secure transport mechanisms 
      specified in Section 11 of <xref target="RFC7011"/> to provide confidentiality, integrity, 
      and peer authentication, particularly when exporting gtpuHeaderSection.</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>
      <t>When 3GPP specifications indicate that a GTP-U field is not to be interpreted, 
      an Exporting Process can use a Template that omits the corresponding IE. If the IE 
      is included in the Template, the Exporting Process follows the rules specified in 
      the corresponding IE definition for representing values that are not meaningful.</t>
      <t>When gtpuQFI or gtpuPduType is exported with a value of zero, 
      the Collecting Process cannot determine solely from that value or the E flag 
      whether the PDU Session Container extension header was present. Applications 
      requiring this distinction need additional information, such as the observed 
      GTP-U header exported using gtpuHeaderSection.</t>
    </section>
  </middle>

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

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

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

      <?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>

      <reference anchor="TS.38300" derivedAnchor="TS.38300" quoteTitle="true">
        <front>
          <title>NR; NR and NG-RAN Overall description; Stage-2</title>

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

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

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

        <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 = 0x37, Message Type = 0xff, GTP-U Length = 0x0064,
          TEID = 0x208c1180, Sequence Number = 0x0501,
          N-PDU Number = 0x0a,
          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 = 2         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |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 = 33         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | gtpuFlags     |  gtpuMsgType  |   gtpuSequenceNum= 0x0501     |
   | = 0x37        |  = 0xff       |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   gtpuTEid = 0x208c1180                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | gtpuQFI = 8   | gtpuPduType   |  gtpuTotalHdrLength = 16      |
   |               | = 1           |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | VarLength     |      0x37            0xff           0x00      | 
   |   = 16        |                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x64            0x20            0x8c           0x11      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x80            0x05            0x01           0x0a      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x85            0x01            0x10           0x08      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x00     |
   +-+-+-+-+-+-+-+-+
           Figure 2: Data Set Encoding Format

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