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

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>


<rfc xmlns:xi="http://www.w3.org/2001/XInclude" 
ipr="trust200902" 
docName="draft-ietf-opsawg-rfc7125-update-07" 
number="9565"
category="std" 
consensus="true" 
submissionType="IETF" 
obsoletes="7125"
updates="" 
tocInclude="true" 
sortRefs="true" 
symRefs="true" 
version="3"
xml:lang="en">

  <front>
    <title abbrev="tcpControlBits IPFIX Information Element">An Update to the tcpControlBits IP Flow Information Export (IPFIX) Information Element</title>
    <seriesInfo name="RFC" value="9565"/>
    <author fullname="Mohamed Boucadair">
      <organization>Orange</organization>
      <address>
        <postal>
          <city>Rennes</city>
          <code>35000</code>
          <country>France</country>
        </postal>
        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>

    <date year="2024" month="March"/>

    <area>Operations and Management</area>
    <workgroup>OPSAWG</workgroup>

    <keyword>IPFIX</keyword>
    <keyword>TCP</keyword>
    <keyword>Measurement</keyword>
    <keyword>Export</keyword>
    <keyword>Observability</keyword>
    <abstract>

<t>RFC 7125 revised the tcpControlBits IP Flow Information Export
   (IPFIX) Information Element that was originally defined in RFC 5102
   to reflect changes to the TCP header control bits since RFC 793.
   However, that update is still problematic for interoperability
   because some flag values have subsequently been deprecated.</t>
      <t>This document removes stale information from the IANA
   "IPFIX Information Elements" registry and avoids future conflicts with the authoritative
   IANA "TCP Header Flags" registry.</t>
      <t>This document obsoletes RFC 7125.</t>
    </abstract>
  </front>
  <middle>
    <?line 59?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>TCP defines a set of control bits (also known as "flags") for
   managing connections (<xref section="3.1" sectionFormat="of" target="RFC9293"/>). The "TCP
   Header Flags" registry was initially set by <xref target="RFC3168"/>, but it was
   populated with only TCP control bits that were defined in <xref target="RFC3168"/>.
   <xref target="RFC9293"/> fixed that by moving that registry to be listed as a
   subregistry under the "Transmission Control Protocol (TCP)
   Parameters" registry <xref target="TCP-FLAGS"/>, adding bits that had previously been specified
   in <xref target="RFC0793"/>, and removing the NS (Nonce Sum) bit per <xref target="RFC8311"/>.
   Also, <xref section="6" sectionFormat="of" target="RFC9293"/> introduces "Bit Offset" to ease referencing each
   header flag's offset within the 16-bit aligned view of the TCP header
   (Figure 1 of <xref target="RFC9293"/>). <xref target="TCP-FLAGS"/> is thus settled as the
   authoritative reference for the assigned TCP control bits.</t>
          <t indent="3">Note: The bits in offsets 0 through 3 are not header flags, but the TCP segment Data Offset field.</t>
      <t><xref target="RFC7125"/> revised the tcpControlBits IP Flow Information Export
   (IPFIX) Information Element that was originally defined in
   <xref target="RFC5102"/> to reflect changes to the TCP control bits since
   <xref target="RFC0793"/>.  However, that update is still problematic for
   interoperability because a value was deprecated since then (<xref section="7" sectionFormat="of" target="RFC8311"/>),
   and, therefore, <xref target="RFC7125"/> risks deviating from the
   authoritative "TCP Header Flags" registry <xref target="TCP-FLAGS"/>.</t>
      <t>This document fixes that problem by removing stale information from
   the "IPFIX Information Elements" registry <xref target="IPFIX"/> and avoiding future conflicts with the
   authoritative "TCP Header Flags" registry <xref target="TCP-FLAGS"/>. The update in this document also
   enhances observability. For example, network operators can identify
   packets that are observed with unassigned TCP flags set and,
   therefore, identify which applications in the network should be upgraded
   to reflect the changes to TCP flags that were introduced, e.g., in <xref target="RFC8311"/>.</t>
      <t>The main changes from <xref target="RFC7125"/> are listed in <xref target="changes"/>.</t>
    </section>
    <section anchor="terminology">
      <name>Terminology</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
      "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
      NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
      "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
      "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are
      to be interpreted as described in BCP&nbsp;14 <xref target="RFC2119"/> <xref
      target="RFC8174"/> when, and only when, they appear in all capitals, as
      shown here.</t>
<t>This document uses the terms defined in <xref target="RFC7011" section="2" sectionFormat="of"/>.</t>
    </section>
    <section anchor="revised-tcpcontrolbits-information-element">
      <name>Revised tcpControlBits Information Element</name>
      <dl>
        <dt>ElementID:</dt>
        <dd>
          <t>6</t>
        </dd>
        <dt>Name:</dt>
        <dd>
           <t>tcpControlBits</t>
        </dd>
        <dt>Abstract Data Type:</dt>
        <dd>
          <t>unsigned16</t>
        </dd>
        <dt>Data Type Semantics:</dt>
        <dd>
          <t>flags</t>
        </dd>
        <dt>Status:</dt>
        <dd>
           <t>current</t>
        </dd>
        <dt>Description:</dt>
        <dd>
          <t>TCP control bits observed for the packets of this Flow.
This information is encoded as a bit field; each TCP control
bit has a corresponding bit in that field. A bit is set to 1 if any
observed packet of this Flow has the corresponding TCP control bit
set to 1. The bit is cleared to 0 otherwise.</t>
          <t>Per <xref target="RFC9293"/>, the assignment of TCP control bits is
managed by IANA via the "TCP Header Flags" registry <xref target="TCP-FLAGS"/>.
Implementers can retrieve the current TCP control bits from that registry, 
which is authoritative for them.</t>
          <t>As the most significant 4 bits of octets 12 and 13 (counting from
zero) of the TCP header <xref target="RFC9293"/> are used to encode the TCP data
offset (header length), the corresponding bits in this Information
Element <bcp14>MUST</bcp14> be reported by the Exporter with a value of zero and <bcp14>MUST</bcp14> be ignored
by the Collector. Use the tcpHeaderLength Information Element to
encode this value.</t>
          <t>All TCP control bits (including those unassigned) <bcp14>MUST</bcp14> be exported
as observed in the TCP headers of the packets of this Flow.</t>
          <t>If exported as a single octet with reduced-size encoding (<xref section="6.2" sectionFormat="of" target="RFC7011"/>), this
Information Element covers the low-order octet of this field (i.e.,
bit offset positions 8 to 15) <xref target="TCP-FLAGS"/>. A Collector receiving this Information Element
with reduced-size encoding must not assume anything about the
content of the four bits with bit offset positions 4 to 7.</t>
          <t>Exporting Processes exporting this Information Element on behalf
of a Metering Process that is not capable of observing any of the
flags with bit offset positions 4 to 7 <bcp14>SHOULD</bcp14> use reduced-size encoding,
and only export the least significant 8 bits of this Information
Element.</t>
          <t>Note that previous revisions of this Information Element's
definition specified that flags with bit offset positions 8 and 9 must be exported as
zero, even if observed.  Collectors should therefore not assume
that a value of zero for these bits in this Information Element
indicates the bits were never set in the observed traffic,
especially if these bits are zero in every Flow Record sent by a
given Exporter.</t>
          <t>Note also that the "TCP Header Flags" registry <xref target="TCP-FLAGS"/> indexes the bit offset from the most significant
bit of octet 12 to the least significant bit of octet 13 in the TCP header,
but the tcpControlBits is encoded as a regular unsigned 16-bit integer.</t>
        </dd>
        <dt>Units:</dt>
        <dd/>
        <dt>Range:</dt>
        <dd/>
        <dt>Additional Information:</dt>
        <dd>
          <t>See the assigned TCP control bits in the "TCP Header Flags" registry <xref target="TCP-FLAGS"/>.</t>
        </dd>
        <dt>Reference:</dt>
        <dd>
          <t><xref target="RFC9293"/>, RFC 9565</t>
        </dd>
        <dt>Revision:</dt>
        <dd>
          <t>2</t>
        </dd>
      </dl>
    </section>
    <section anchor="an-example">
      <name>An Example</name>
      <t><xref target="ex"/> shows an example of a tcpControlBits Information Element set to 0x92, where MSB indicates the most significant bit and LSB indicates the least significant bit. This Information Element is used to report TCP control bits for a Flow
that has CWR (Congestion Window Reduced), ACK, and SYN flag bits set (that is, bit offset positions 8, 11, and 14).</t>
      <figure anchor="ex">
        <name>An Example of the tcpControlBits Information Element</name>
        <artwork align="center"><![CDATA[
MSB                           LSB
                     1
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0|0|0|0|0|0|0|0|1|0|0|1|0|0|1|0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>IANA has updated the "tcpControlBits" entry of the "IPFIX Information Elements" registry <xref target="IPFIX"/>
   to echo the details provided in <xref target="revised-tcpcontrolbits-information-element"/>.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>Because the setting of TCP control bits may be misused in some
   Flows (e.g., Distributed Denial-of-Service (DDoS) attacks), an Exporter
   has to report all observed control bits even if no meaning is associated
   with a given TCP flag. This document uses a stronger requirements language
   compared to <xref target="RFC7125"/>.</t>
      <t>This document does not add new security considerations to those already
   discussed for IPFIX in <xref target="RFC7011"/>.</t>
    </section>
  </middle>
  <back>

    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>

        <reference anchor="TCP-FLAGS" target="https://www.iana.org/assignments/tcp-parameters/">
          <front>
            <title>TCP Header Flags</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9293.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7011.xml"/>

      </references>

      <references anchor="sec-informative-references">
        <name>Informative References</name>

        <reference anchor="IPFIX" target="https://www.iana.org/assignments/ipfix/">
          <front>
            <title>IPFIX Information Elements</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3168.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.0793.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8311.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7125.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5102.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9487.xml"/>

      </references>
    </references>

<section anchor="changes">
      <name>Changes from RFC 7125</name>
      <ul spacing="normal">
        <li>
          <t>Cleaned up the description of the tcpControlBits Information Element by removing mentions of stale flag bits, referring to the flag bits by their bit offset position, and relying upon the IANA "TCP Header Flags" registry.</t>
        </li>
        <li>
          <t>Removed the table of TCP flag bits from the description of the tcpControlBits Information Element.</t>
        </li>
        <li>
          <t>Added the reference  <xref target="TCP-FLAGS"/> to the Additional Information field of the tcpControlBits Information Element.</t>
        </li>
        <li>
          <t>Used strong normative language for exporting observed flags.</t>
        </li>
        <li>
          <t>Updated the references of the tcpControlBits Information Element.</t>
        </li>
        <li>
          <t>Bumped the revision of the tcpControlBits Information Element.</t>
        </li>
        <li>
          <t>Replaced obsolete RFCs (e.g., <xref target="RFC0793"/>).</t>
        </li>
        <li>
          <t>Added an example section (<xref target="an-example"/>).</t>
        </li>
      </ul>
    </section>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>This document was triggered by a discussion in the opsawg working group between the author and the
   authors of <xref target="RFC9487"/>.</t>
      <t>Thanks to <contact fullname="Christian Jacquenet"/>, <contact fullname="Thomas Graf"/>, and <contact fullname="Benoît Claise"/> for the
   review and comments.</t>
      <t>Thanks to <contact fullname="Michael Scharf"/> for the tsvart review, <contact fullname="Ketan Talaulikar"/> for the rtgdir review,
   and <contact fullname="Elwyn Davies"/> for the genart review.</t>
      <t>Thanks to <contact fullname="Rob Wilton"/> for the AD review.</t>
      <t>Thanks to <contact fullname="Tim Bray"/> for the artart review and <contact fullname="Shawn Emery"/> for the secdir review.</t>
      <t>Thanks to <contact fullname="Éric Vyncke"/> and <contact fullname="Paul Wouters"/> for the comments in the IESG review.</t>
      <section numbered="false" anchor="acknowledgments7125">
        <name>Acknowledgments from RFC 7125</name>
          <t>Thanks to <contact fullname="Andrew Feren"/>, <contact fullname="Lothar Braun"/>, <contact fullname="Michael Scharf"/>, and <contact fullname="Simon
 Josefsson"/> for comments on the revised definition.  This work is
 partially supported by the European Commission under grant agreement
 FP7-ICT-318627 mPlane; this does not imply endorsement by the
 Commission.</t>
      </section>
    </section>
    <section numbered="false" anchor="contributors">
      <name>Contributors</name>
      <t>The authors of <xref target="RFC7125"/> are as follows:</t>
      <contact fullname="Brian Trammell">
        <organization/>
      </contact>
      <contact fullname="Paul Aitken">
        <organization/>
      </contact>
    </section>
  </back>
</rfc>
