<?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-08"
     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>danvoyerwork@gmail.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>Juniper Networks</organization>

      <address>
        <email>vyasraj@juniper.net</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 the 3GPP for use of user Plane (GTP User (GTP-U)) 
      <xref target="TS.29281"/> (latest reference being Release 19) traffic of 
      mobile subscribers.</t>

      <t>This document specifies six 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 makes use of following terms from <xref
      target="RFC6459"/>:</t>

      <t><list style="symbols">
          <t>User Plane</t>
        </list></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</t>

          <t>GTP-C: GTP Control</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.<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 Section 5 of the 3GPP
          specification <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="I-D.ietf-teas-5g-ns-ip-mpls"/>)
      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 transportChecksum IE would 
      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 these entries as indicated in the following
    subsections.</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 basic encoding is as
          follows:</t>
          <t><figure>
            <artwork><![CDATA[

          MSB -   0     1    2    3    4    5    6    7   - LSB
                +----+----+----+----+----+----+----+----+
                |           8 bit flags value           |
                +----+----+----+----+----+----+----+----+

          ]]></artwork>
          </figure></t>
          <t>Examples:</t>
              <t>value : 0x34</t>
              <t>binary: 00110100</t>
              <t>decode: 00110100 - Flags value</t>
              <t></t>
              <t>value : 0x30</t>
              <t>binary: 00110000</t>
              <t>decode: 00110000 - Flags value</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 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
          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.</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.
          <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"/>.</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.
          <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"/>.</dd>
        </dl>

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

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

          <dd>gtpuHeaderLength</dd>
        </dl>

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

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

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

          <dd>8-bit field indicating the total header length of the GTP-U which
          includes mandatory fields and all the optional headers as defined in
          Section 5 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 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 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</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 and Shraddha Hegde 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:</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>There exist no extra security considerations regarding allocation of
      these IPFIX IEs compared to <xref target="RFC7012"/>.</t>

      <t>The IEs described in this document export GTP user plane data information
      on how packets are being forwarded in a 3GPP network. 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>
    </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'?>

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

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

      <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.6459'?>

      <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="I-D.ietf-teas-5g-ns-ip-mpls">
      <front>
          <title>A Realization of Network Slices for 5G Networks Using
          Current IP/MPLS Technologies</title>

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

          <date day="5" month="December" year="2024"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-teas-5g-ns-ip-mpls-18"/>
      </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 = 0x36, Message Type = 0xff, TEID = 0x01,
          Sequence number = 0x0000,
          Next extension header type = 0x85 (PDU Session container),
          PDU Type = 0, QFI = 8

       ]]></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 = 16  | 
   |               | = 0           |  Length = 16  |               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x36            0xff           0x00             0x8a     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x00            0x00           0x00             0x01     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x00            0x00           0x00             0x85     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      0x01            0x10           0x08             0x00     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


           Figure 2: Data Set Encoding Format

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