<?xml version="1.0" encoding="UTF-8"?>
<rfc category="std" docName="draft-lin-opsawg-ipfix-quic-header-02" submissionType="IETF"
ipr="trust200902" consensus="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude">
  <!-- category values: std, bcp, info, exp, and historic
    ipr values: full3667, noModification3667, noDerivatives3667
    you can add the attributes updates="NNNN" and obsoletes="NNNN"
    they will automatically be output with "(if approved)" -->

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

  <front>

    <title abbrev="Export of QUIC Information in IPFIX">
    Export of QUIC Information in IP Flow Information Export (IPFIX)</title>
    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Changwang Lin" initials="C."
            surname="Lin">
      <organization>New H3C Technologies</organization>

      <address>
        <postal>
          <street>8 Yongjia North Road</street>
          <!-- Reorder these if your country does things differently -->

          <city>Beijing</city>

          <region>Haidian District</region>

          <code>100094</code>

          <country>China</country>
        </postal>

        <email>linchangwang.04414@h3c.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="Yisong Liu" initials="Y."
            surname="Liu">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street>32 Xuanwumen West Street</street>
          <!-- Reorder these if your country does things differently -->

          <city>Beijing</city>

          <region>Xicheng District</region>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>liuyisong@chinamobile.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

  <author fullname="Yao Liu" initials="Y."
            surname="Liu">
      <organization>ZTE</organization>

      <address>
        <postal>
          <city>Nanjing</city>

          <country>China</country>
        </postal>

        <email>liu.yao71@zte.com.cn</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date year="2025" />

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>Network Working Group</workgroup>

    <keyword>IPFIX </keyword>
    <keyword>QUIC</keyword>

<abstract>
<t>
	This document introduces new IP Flow Information Export (IPFIX) Information Elements
  to identify a set of QUIC related and unencrypted information, which contained in QUIC Header
  that traffic is being forwarded along with.
</t>

</abstract>

  </front>

  <middle>

<section anchor="Introduction" title="Introduction">
<t>
	QUIC Packets are carried in UDP datagrams and exchanged for communication of QUIC
  endpoints <xref target="RFC9000"/>. A QUIC packet normally consists of a QUIC Header and a QUIC Payload.
</t>
<t>
  QUIC Header is divided into Long Header and Short Header. Long Headers
  are used for packets that are sent prior to the establishment of 1-RTT keys.
  The Long Header contains an 8-bit Public Flag, a 32-bit QUIC Version,
  a variable-length Destination Connection ID,
  a variable-length Source Connection ID and Type-Specific field which
  has different content based on the Packet type.
  The Packet types that use the Long Header contain Version Negotiation Packet, Initial Packet,
   0-RTT Packet, Handshake Packet and Retry Packet. Once 1-RTT keys are available,
  a sender switches to sending 1-RTT packets using the Short Header.
  The Short Header includes an 8-bit Public Flag,
  a variable-length Destination Connection ID and a Packet Number.
</t>
<t>
  QUIC packets provide varying levels of cryptographic protection depending on their type <xref target="RFC9000"/>.
  While the entire QUIC Payload MUST be encrypted, only certain fields in the QUIC Header are protected.
  For details on QUIC's packet protection mechanisms, refer to Section 5 of <xref target="RFC9001"/>.
</t>
<t>
  This document specifies several new IPFIX Information Elements (IEs) within
  the "IPFIX Information Elements" registry <xref target="RFC7012"/> for purposes of getting QUIC related information.
  These IEs are used to export the unencrypted parameters of QUIC Header in QUIC packet.
</t>
</section>
<section anchor="Terminology" 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"/> and <xref target="RFC9000"/>.
  </t>
  <t>
    The following terms are used as defined in <xref target="RFC7011"/>:
  </t>
  <t>
    <list style="symbols">
    <t>IPFIX</t>
    <t>IPFIX Information Elements</t>
    </list>
  </t>
  <t>
    The following terms are used as defined in <xref target="RFC9000"/>:
  </t>
  <t>
    <list style="symbols">
    <t>QUIC</t>
    <t>Endpoint</t>
    <t>Server</t>
    <t>QUIC packet</t>
    <t>Connection ID</t>
    </list>
  </t>
</section>
<section anchor="New IPFIX QUIC Information Elements" title="New IPFIX QUIC Information Elements">
<t>
  This section specifies the new IPFIX QUIC IEs.
  <list style="hanging">
    <t hangText="quicHeaderFlag"><vspace blankLines="0"/>
      8-bit flag defined in the QUIC Header (Section 17.2 and 17.3 of <xref target="RFC9000"/>),
      as the first byte of QUIC Packet. Base on the first four bits of the Long Header flag
      and the first three bits of the Short Header flag, the QUIC Packet Type can be obtained.
    </t>
    <t hangText="quicVersion"><vspace blankLines="0"/>
      32-bit QUIC Version that is in use or negotiation in QUIC Long Header Packets during connection establishment.
      For Version Negotiation Packet, This Version is used to indicate the Supported Version,
      because the Version field of a Version Negotiation Packet MUST be set to 0x00000000.
    </t>
    <t hangText="quicDestinationConnectionID"><vspace blankLines="0"/>
      The Destination Connection ID included in the Long Header or Short Header of QUIC Packet.
      The Destination Connection ID is chosen by the recipient of the packet and is used to
      provide consistent routing. Since the length of the Destination Connection ID is not included
      in 1-RTT Packet (Short Header), the Destination Connection ID of a 1-RTT Packet could be obtained
      by matching only if when the Destination Connection ID is known and preconfigured on the device.
    </t>
    <t hangText="quicSourceConnectionID"><vspace blankLines="0"/>
      The Source Connection ID included by the Long Header of QUIC Packet.
      The Source Connection ID is used to set the Destination Connection ID used by the peer during connection establishment.
    </t>
  </list>
</t>
</section>

<section anchor="Sample Use Cases" title="Sample Use Cases">
<t>
	The IPFIX IEs listed in the Section 3, forwardingStatus (89) <xref target="RFC7270"/>
  and some existing counter information <xref target="IANA-IPFIX"/> provide answers to
  the following questions (amongst others).
</t>
<t>
  <list style="symbols">
  <t>How many packets are forwarded or dropped using QUIC in a network?</t>
  <t>If dropped, for which reasons?</t>
  <t>What is the type of QUIC packet?</t>
  <t>What is the QUIC version that is in use or negotiation?</t>
  <t>What is the Destination or Source Connection ID of QUIC packet?</t>
  <t>Have all the QUIC packets been fully received?</t>
  </list>
</t>
</section>

<section anchor="Security Considerations" title="Security Considerations">
<t>
	There exists no extra security considerations regarding allocation of these
  new IPFIX IEs compared to <xref target="RFC7012"/>.
</t>
</section>

<section anchor="IANA Considerations" title="IANA Considerations">
  <section anchor="New IPFIX QUIC IEs" title="New IPFIX QUIC Information Elements">
    <t>
      This document requests IANA to add new IPFIX QUIC IEs to the
      "IPFIX Information Elements" registry <xref target="RFC7012"/> available at <xref target="IANA-IPFIX"/>.
    </t>
    <t>
      Table 1 lists the new IPFIX QUIC IEs:
    </t>
    <t><figure>
      <artwork align="center" name="Table 1"><![CDATA[
    +============+=============================+===============+
    | Element ID | Name                        | Reference     |
    +============+=============================+===============+
    | TBD1       | quicHeaderFlag              | This document |
    +------------+-----------------------------+---------------+
    | TBD2       | quicVersion                 | This document |
    +------------+-----------------------------+---------------+
    | TBD3       | quicDestinationConnectionID | This document |
    +------------+-----------------------------+---------------+
    | TBD4       | quicSourceConnectionID      | This document |
    +------------+-----------------------------+---------------+

 Table 1: New QUIC IEs in the "IPFIX Information Elements" Registry]]></artwork>
    </figure></t>
    <section anchor="IANAquicHeaderFlag" title="quicHeaderFlag">
      <dl>
        <dt>Name:</dt><dd>quicHeaderFlag</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD1</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>The 8-bit flag defined in the QUIC Header (Section 17.2 and 17.3 of <xref target="RFC9000"/>).
            The meanings of the flag are provided in the first byte of the QUIC Header Packet <xref target="RFC9000"/>.</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>See RFC9000 for the QUIC Header first byte specification.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANAquicVersion" title="quicVersion">
      <dl>
        <dt>Name:</dt><dd>quicVersion</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD2</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>32-bit unsigned integer defining the number of Version, which is in use
            and negotiation. Its values are provided in the "QUIC Versions" IANA registry.</dd>
      </dl>

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

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

      <dl>
        <dt>Additional Information:</dt>
        <dd>See the assignments in the "QUIC Versions" IANA registry at
            https://www.iana.org/assignments/quic/quic.xhtml#quic-versions.
            See also RFC9000 for the QUIC Versions specification.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANAquicDestinationConnectionID" title="quicDestinationConnectionID">
      <dl>
        <dt>Name:</dt><dd>quicDestinationConnectionID</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD3</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>The Destination Connection ID as defined in Section 7.2 of <xref target="RFC9000"/>
            as a series of octets in IPFIX. In QUIC version 1, this value MUST NOT exceed 20 bytes.</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>See Section 7.2 of <xref target="RFC9000"/> for more details
            about The Destination Connection ID.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
    <section anchor="IANAquicSourceConnectionID" title="quicSourceConnectionID">
      <dl>
        <dt>Name:</dt><dd>quicSourceConnectionID</dd>
      </dl>

      <dl>
        <dt>ElementID:</dt><dd>TBD4</dd>
      </dl>

      <dl>
        <dt>Description:</dt>
        <dd>The Source Connection ID as defined in Section 7.2 of <xref target="RFC9000"/>
            as a series of octets in IPFIX. In QUIC version 1, this value MUST NOT exceed 20 bytes.</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>See Section 7.2 of <xref target="RFC9000"/> for more details about The Source Connection ID.</dd>
      </dl>

      <dl>
        <dt>Reference:</dt><dd>[this document]</dd>
      </dl>
    </section>
  </section>
</section>
<section anchor="Operational Considerations" title="Operational Considerations">
  <t>
    The quicDestinationConnectionID can be used to track flow path consistency,
    but the Destination Connection ID in the Short Header Packet lacks a length indication,
    making it difficult to match on intermediate devices. Therefore,
    the Destination Connection ID or its length must be preconfigured on the intermediate devices.
  </t>
</section>

<!-- <section anchor="Acknowledgements" title="Acknowledgements">
<t>
	The author would like to thank xxx for his valuable input.
</t>
</section> -->

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
  <references title="References">
    <references title="Normative References">
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7011.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7012.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9001.xml"/>
    </references>
    <references title="Informative References">
        <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>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7270.xml"/>
    </references>
  </references>
  </back>
</rfc>
