<?xml version="1.0" encoding="US-ASCII"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.29 (Ruby 3.2.3) -->
<rfc category="std" consensus="true"
     docName="draft-ls-ipsecme-ipcomp-exclude-transport-layer-03"
     ipr="trust200902" sortRefs="true" submissionType="IETF" symRefs="true"
     tocInclude="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.28.1 -->

  <front>
    <title abbrev="IPComp excluding L4">IP Payload Compression excluding
    transport layer</title>

    <seriesInfo name="draft-ls-ipsecme-ipcomp-exclude-transport-layer-02"
                value="draft-ls-ipsecme-ipcomp-exclude-transport-layer-02"/>

    <author fullname="Cheng Li" initials="C." surname="Li">
      <organization>Huawei Technologies</organization>

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

        <email>c.l@huawei.com</email>
      </address>
    </author>

    <author fullname="Guangming Zeng" initials="G." role="editor"
            surname="Zeng">
      <organization>Huawei Technologies</organization>

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

        <email>zengguanming@huawei.com</email>
      </address>
    </author>

    <author fullname="Meng Zhang" initials="M." surname="Zhang">
      <organization>Huawei Technologies</organization>

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

        <email>zhangmeng6@huawei.com</email>
      </address>
    </author>

    <author fullname="Xiaobo Ding" initials="X." surname="Ding">
      <organization>Huawei Technologies</organization>

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

        <email>mirroryuri.ding@huawei.com</email>
      </address>
    </author>

    <date year="2026"/>

    <area>Internet</area>

    <workgroup>IP Security Maintenance and Extensions</workgroup>

    <keyword>next generation</keyword>

    <abstract>
      <?line 68?>

      <t>IP Payload Compression Protocol (IPComp) is used for compressing the
      IP payload in transmission to increase communication performance. The
      IPComp is applied to the payload of the IP datagram, starting with the
      first octet immediately after the IP header in IPv4, and the first octet
      after the excluded IPv6 Extension headers. However, transport layer
      information such as source port and destination port are useful in many
      network functions in transmission.</t>

      <t>This document defines extensions of IP payload compression protocol
      (IPComp) to support compressing the payload excluding the transport
      layer information, to enable network functions using transport layer
      information (e.g., ECMP) working together with the payload compression.
      This document also defines an extension of IPComp to indicate the
      payload is not compressed to solve the out-of-order problems between the
      compressed and uncompressed packets.</t>
    </abstract>

    <note removeInRFC="true">
      <name>About This Document</name>

      <t>The latest revision of this draft can be found at <eref
      target="https://VMatrix1900.github.io/ipcomp-exclude-transport-layer/draft-ls-6man-ipcomp-exclude-transport-layer.html"/>.
      Status information for this document may be found at <eref
      target="https://datatracker.ietf.org/doc/draft-ls-ipsecme-ipcomp-exclude-transport-layer/"/>.</t>

      <t>Discussion of this document takes place on the IP Security
      Maintenance and Extensions Working Group mailing list (<eref
      target="mailto:ipsec@ietf.org"/>), which is archived at <eref
      target="https://mailarchive.ietf.org/arch/browse/ipsec/"/>. Subscribe at
      <eref target="https://www.ietf.org/mailman/listinfo/ipsec/"/>.</t>

      <t>Source for this draft and an issue tracker can be found at <eref
      target="https://github.com/VMatrix1900/ipcomp-exclude-transport-layer"/>.</t>
    </note>
  </front>

  <middle>
    <?line 75?>

    <section anchor="introduction">
      <name>Introduction</name>

      <t>The IP Payload Compression Protocol (IPComp) <xref target="RFC3173"/>
      is defined to compress the IP payload in transmission in order to
      increase the communication performance between a pair of communicating
      nodes, provided the nodes have sufficient computation power and the
      communication is over slow or congested links.</t>

      <t>In IP version 4, the compression is applied to the payload of the IP
      datagram, starting at the first octet following the IP header, and
      continuing through the last octet of the datagram. In the IPv6 context,
      IPComp is viewed as an end-to-end payload, and is not applied to IPv6
      extension headers such as hop-by-hop, routing, and fragmentation
      extension headers<xref target="RFC8200"/>. The compression is applied
      starting at the first IP Header Option field that does not carry
      information that must be examined and processed by nodes along a
      packet's delivery path, if such an IP Header Option field exists, and
      continues to the ULP payload of the IP datagram. Therefore, the
      transport layer information such as source port and destination port is
      compressed. When IPComp is used, the Next Header field of IP header is
      set to 108, IPComp Datagram. The IPComp header contains the original
      Next Header and the Compress Parameter Index(CPI) is inserted between
      the IP header and the compressed payload.</t>

      <t>There are many network functions which needs the transport layer
      information to work. For example, flow-based ECMP, Carrier Grade Network
      Translation (CGNAT), Access Control List (ACL) may require source and
      destination port to identify the transport layer flow. Some Firewall
      (FW), Deep Packet Inspection (DPI) also need to inspect the transport
      layer information. If IPComp compressed those transport layer
      information, the nodes along the packet's delivery path can not obtain
      the source port and destination port. Therefore the IPComp is not
      compatible with the network functions requiring the transport layer
      information which makes it harder to deploy.</t>

      <t>This document defines an extension of IPComp to support compressing
      the payload excluding the first 4 bytes of transport layer header which
      contains source port and destination port. In this way, the IPComp can
      coexist with many network functions which requires these information.
      This document also defines an extension to explicitly indicate the
      payload is uncompressed to solve the out-of-order processing between the
      compressed and uncompressed packets.</t>
    </section>

    <section anchor="terminology">
      <name>Terminology</name>

      <t>This document leverages the terms defined in <xref
      target="RFC3173"/>. The reader is assumed to be familiar with this
      terminology.</t>

      <section anchor="requirements-language">
        <name>Requirements Language</name>

        <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>
      </section>
    </section>

    <section anchor="problem-statement">
      <name>Problem Statement</name>

      <t>Currently, the IPComp will compress all the IP payload which includes
      the transport layer information. If a layer 4 load balancer is deployed
      along the IPComp packet delivery path, then the load balancer can not
      obtain the source port and destination port to identify a flow without
      decompressing it first. In other words, the network functions which
      requires the transport layer information would also need to act as the
      decompression node of IPComp. This incompatibility makes the deployment
      of IPComp harder.</t>
    </section>

    <section anchor="extensions-to-ipcomp">
      <name>Extensions to IPComp</name>

      <t>This section defines two extensions of IPComp. The first extension is
      used to indicate the first four bytes of transport layer header which
      contains the source port and destination is excluded from the
      compression. The second extension indicates that the payload is not
      compressed.</t>

      <section anchor="four-bytes-exclusion-extension">
        <name>Four-bytes Exclusion Extension</name>

        <t>This extension is used to indicate that the first four bytes of the
        transport layer header is excluded from the compression. The packet
        format using this extension is shown in <xref
        target="IPComp-exclusion-layout"/>(Demonstrated using IPv6
        packet):</t>

        <figure anchor="IPComp-exclusion-layout">
          <name>Packet format when using Four-bytes Exclusion Extension</name>

          <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| Traffic Class |           Flow Label                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Payload Length        |  Next Header  |   Hop Limit   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                                                               +
|                                                               |
+                         Source Address                        +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                                                               +
|                                                               |
+                      Destination Address                      +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Next Header  |     Flags     |  Compression Parameter Index  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       Source Port             |       Destination Port        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                                                             //
//                       Compressed Payload                    //
//                                                             //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>

        <t>To accomplish that there are two options to extend IPComp. The
        first option is to change the CPI field. Currently the CPI field
        identifies a particular compression algorithm. The defined CPI value
        can be found at <xref target="CPI-IANA"/>. We can define new CPI
        values to indicate the same compression algorithm with different
        compression range as shown in <xref target="iana-CPI-table"/>.</t>

        <table anchor="iana-CPI-table">
          <name>CPI with exclusion range Registry Entries</name>

          <thead>
            <tr>
              <th align="left">Value</th>

              <th align="left">Transform ID</th>

              <th align="left">References</th>
            </tr>
          </thead>

          <tbody>
            <tr>
              <td align="left">0</td>

              <td align="left">RESERVED</td>

              <td align="left">
                <xref target="RFC2407"/>
              </td>
            </tr>

            <tr>
              <td align="left">1</td>

              <td align="left">IPCOMP_OUI</td>

              <td align="left">
                <xref target="RFC2407"/>
              </td>
            </tr>

            <tr>
              <td align="left">2</td>

              <td align="left">IPCOMP_DEFLATE</td>

              <td align="left">
                <xref target="RFC2407"/>
              </td>
            </tr>

            <tr>
              <td align="left">3</td>

              <td align="left">IPCOMP_LZS</td>

              <td align="left">
                <xref target="RFC2407"/>
              </td>
            </tr>

            <tr>
              <td align="left">4</td>

              <td align="left">IPCOMP_LZJH</td>

              <td align="left">
                <xref target="RFC3051"/>
              </td>
            </tr>

            <tr>
              <td align="left">TBD</td>

              <td align="left">IPCOMP_OUI with four bytes exclusion</td>

              <td align="left">This document</td>
            </tr>

            <tr>
              <td align="left">TBD</td>

              <td align="left">IPCOMP_DEFLATE with four bytes exclusion</td>

              <td align="left">This document</td>
            </tr>

            <tr>
              <td align="left">TBD</td>

              <td align="left">IPCOMP_LZS with four bytes exclusion</td>

              <td align="left">This document</td>
            </tr>

            <tr>
              <td align="left">TBD</td>

              <td align="left">IPCOMP_LZJH with four bytes exclusion</td>

              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>

        <t>The second option is to change the Flags field. Currently, the
        Flags field is zero and ignored by the receiving node. We can
        introduce a bit to indicate whether the first four bytes is excluded
        from the compression range or not.</t>

        <t>Which option is more suitable will be determined based on the
        discussion in the working group.</t>
      </section>

      <section anchor="uncompressed-payload-extension">
        <name>Uncompressed Payload Extension</name>

        <t>Currently, if the total size of a compressed payload and the IPComp
        header is not smaller than the size of the original payload, the IP
        datagram will be sent in the original non-compressed form without the
        IPComp header. In the receiving node, the packet with the IPComp
        header will go through the decompression co-processor first while the
        packet without the IPComp header will be forwarded directly. Going
        through different packet process path will cause the out-of-order of
        packets within the same flow, reducing the transport performance.</t>

        <t>To solve the out-of-order packets within the same IPComp-enabled
        flow, we propose to add IPComp header no matter whether the packet
        within the IPComp-enabled flow is sent compressed or not. To indicate
        a packet is sent uncompressed, a new CPI value(TBD) is used. In this
        way, since all packets within the IPComp-enabled flow have IPComp
        header, they will go through the same process path and be processed in
        order. For uncompressed packet, the Next Header in the IPComp Header
        is copied into the Next Header in the IP header, and the IPComp Header
        is removed.</t>
      </section>
    </section>

    <section anchor="iana-considerations">
      <name>IANA Considerations</name>

      <t>This document require to add new CPI values in <eref
      target="https://www.iana.org/assignments/ikev2-parameters/ikev2-parameters.xhtml">IKEv2
      Notification IPCOMP Transform IDs (Value 16387)</eref>.</t>
    </section>

    <section anchor="security-considerations">
      <name>Security Considerations</name>

      <t>The security requirements and mechanisms described in <xref
      target="RFC3173"/> also apply to this document.</t>

      <t>This document does not introduce any new security considerations.</t>
    </section>
  </middle>

  <back>
    <references anchor="sec-combined-references">
      <name>References</name>

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

        <reference anchor="RFC2407">
          <front>
            <title>The Internet IP Security Domain of Interpretation for
            ISAKMP</title>

            <author fullname="D. Piper" initials="D." surname="Piper"/>

            <date month="November" year="1998"/>

            <abstract>
              <t>This document defines the Internet IP Security DOI (IPSEC
              DOI), which instantiates ISAKMP for use with IP when IP uses
              ISAKMP to negotiate security associations. [STANDARDS-TRACK]</t>
            </abstract>
          </front>

          <seriesInfo name="RFC" value="2407"/>

          <seriesInfo name="DOI" value="10.17487/RFC2407"/>
        </reference>

        <reference anchor="RFC3051">
          <front>
            <title>IP Payload Compression Using ITU-T V.44 Packet
            Method</title>

            <author fullname="J. Heath" initials="J." surname="Heath"/>

            <author fullname="J. Border" initials="J." surname="Border"/>

            <date month="January" year="2001"/>

            <abstract>
              <t>This document describes a compression method based on the
              data compression algorithm described in International
              Telecommunication Union (ITU-T) Recommendation V.44. This
              document defines the application of V.44 Packet Method to the
              Internet Protocol (IP) Payload Compression Protocol (RFC 2393).
              This memo provides information for the Internet community.</t>
            </abstract>
          </front>

          <seriesInfo name="RFC" value="3051"/>

          <seriesInfo name="DOI" value="10.17487/RFC3051"/>
        </reference>

        <reference anchor="RFC3173">
          <front>
            <title>IP Payload Compression Protocol (IPComp)</title>

            <author fullname="A. Shacham" initials="A." surname="Shacham"/>

            <author fullname="B. Monsour" initials="B." surname="Monsour"/>

            <author fullname="R. Pereira" initials="R." surname="Pereira"/>

            <author fullname="M. Thomas" initials="M." surname="Thomas"/>

            <date month="September" year="2001"/>

            <abstract>
              <t>This document describes a protocol intended to provide
              lossless compression for Internet Protocol datagrams in an
              Internet environment. [STANDARDS-TRACK]</t>
            </abstract>
          </front>

          <seriesInfo name="RFC" value="3173"/>

          <seriesInfo name="DOI" value="10.17487/RFC3173"/>
        </reference>

        <reference anchor="RFC8200">
          <front>
            <title>Internet Protocol, Version 6 (IPv6) Specification</title>

            <author fullname="S. Deering" initials="S." surname="Deering"/>

            <author fullname="R. Hinden" initials="R." surname="Hinden"/>

            <date month="July" year="2017"/>

            <abstract>
              <t>This document specifies version 6 of the Internet Protocol
              (IPv6). It obsoletes RFC 2460.</t>
            </abstract>
          </front>

          <seriesInfo name="STD" value="86"/>

          <seriesInfo name="RFC" value="8200"/>

          <seriesInfo name="DOI" value="10.17487/RFC8200"/>
        </reference>

        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement
            Levels</title>

            <author fullname="S. Bradner" initials="S." surname="Bradner"/>

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

            <abstract>
              <t>In many standards track documents several words are used to
              signify the requirements in the specification. These words are
              often capitalized. This document defines these words as they
              should be interpreted in IETF documents. This document specifies
              an Internet Best Current Practices for the Internet Community,
              and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>

          <seriesInfo name="BCP" value="14"/>

          <seriesInfo name="RFC" value="2119"/>

          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>

        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key
            Words</title>

            <author fullname="B. Leiba" initials="B." surname="Leiba"/>

            <date month="May" year="2017"/>

            <abstract>
              <t>RFC 2119 specifies common key words that may be used in
              protocol specifications. This document aims to reduce the
              ambiguity by clarifying that only UPPERCASE usage of the key
              words have the defined special meanings.</t>
            </abstract>
          </front>

          <seriesInfo name="BCP" value="14"/>

          <seriesInfo name="RFC" value="8174"/>

          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>

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

        <reference anchor="CPI-IANA"
                   target="https://www.iana.org/assignments/isakmp-registry/isakmp-registry.xhtml#isakmp-registry-11">
          <front>
            <title>IPSEC IPCOMP Transform Identifiers</title>

            <author>
              <organization/>
            </author>

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

<section title="Contributors" anchor="contributors">
  <t>The following individuals contributed significantly to this document:</t>

  <contact fullname="Han Shi" initials="H." surname="Shi">
    <organization>Huawei Technologies</organization>
    <address>
      <postal>
        <country>China</country>
      </postal>
      <email>shihang9@huawei.com</email>
    </address>
  </contact>
</section>

  </back>

</rfc>
