Summary
- IPComp compresses each IP datagram independently and losslessly. A receiver must accept both compressed and original packets under the same relationship because packet loss and reordering rule out dependence on a previous datagram.
- The non-expansion rule is decisive: when compressed payload plus the four-octet IPComp header is not smaller than the original payload, the sender must transmit the original form without any IPComp header.
- A CPI is a directional, destination-scoped lookup value chosen by the decompressor, not a credential or global algorithm identity. Negotiation establishes capability; only packet and endpoint evidence shows whether compression ran, succeeded and helped.
An agreement with an empty place on the wire
Most protocols announce themselves. Agree on a feature, and its marker shows up on the wire. IPComp broke that reflex on purpose. Two nodes could hold a perfectly valid IPComp Association while a packet slipped between them in plain, ordinary form — no protocol number 108, no IPComp header, nothing to see.
The absence was not a stumble. It was the rule. When compression could not pay for its own overhead, the packet was required to travel naked. The association described how a receiver would decompress a packet that arrived compressed. It never ordered every eligible payload to become one.
That is the quiet radicalism of IPComp: compression is not a property of a tunnel. It is a relationship between an algorithm and the specific bytes offered on one attempt. A repetitive payload shrinks. A small control packet grows. A payload an application already squeezed burns CPU and emerges no shorter. No configuration, however careful, can predict the fate of every future datagram.
Compression had to happen before secrecy made it pointless
RFC 2393 introduced IPComp in December 1998, and its motivation sat right next to IPsec. Encryption makes data look random; once a payload is scrambled, a lower layer has little repeated structure left to strip. If you want both compression and secrecy, compression must go first.
The processing order followed. Outbound compression runs before authentication or encryption and before fragmentation. Inbound decompression waits until fragments are reassembled and IP security processing has authenticated and decrypted the packet. The compressor sees the original payload; the decompressor sees it only after the surrounding armor has done its work.
The outer IP header is not swallowed indiscriminately. In IPv4, compression begins after that header. In an IPsec tunnel, the inner IP header belongs to the outer payload and can therefore be compressed. In IPv6, headers that intermediate nodes must examine stay outside the compressed region. When a Fragment Header and IPComp coexist, fragmentation remains earlier in the received chain.
It was a small specification in the useful sense: it fixed the order and the visible boundary, then left local machinery free to decide whether an individual input deserved transformation.
Every datagram carried its own proof
IPComp is stateless across datagrams. Each packet is compressed and decompressed by itself. A decompressor needs no dictionary carried forward from a previous packet, because that packet may be late or may never arrive. Reconstruction cannot depend on delivery history.
The design puts a hard ceiling on what one result says about the next. A beautiful ratio on packet 41 gives the compressor no license to assume packet 42 will shrink. Recent failures may serve as a performance hint, but a hint cannot rewrite the receiver's wire contract.
RFC 3173 therefore lets an adaptive implementation stop trying for several packets after consecutive failures, then test again later. It also permits an algorithm-specific compressibility test to halt work early. The counts, thresholds and backoff are local choices, not universal constants stamped into the IPComp header.
RFC 2394 supplies a concrete DEFLATE example. Based on informal tests, it recommends not attempting buffers below 90 bytes. It does not make 90 a universal IPComp boundary, and it defines no additional compressibility test. A different algorithm, processor, link or traffic mix can justify a different local threshold.
The non-expansion rule made omission normative
The central comparison includes the protocol's own cost. IPComp does not ask whether the compressed payload alone is shorter. It asks whether that payload plus the four-octet IPComp header is smaller than the original payload. If not, the sender must transmit the original, uncompressed datagram — and add no IPComp header at all.
The rule protects two scarce resources at once. It avoids spending decompression cycles on a non-saving result. And it avoids turning an original packet that fit below the path MTU into a larger one that must fragment merely because an optimization was attempted.
This creates an unusual evidentiary boundary. Protocol 108 proves that an IPComp-form packet is being declared at that point in the header chain. Its absence on one packet proves none of the reasons for omission. The payload may have been below a threshold, skipped by an adaptive counter, judged incompressible, compressed unsuccessfully, or excluded by session policy. A capture alone cannot recover which local branch was taken.
Nor does a size reduction prove benefit. Fewer bytes may cost more CPU or latency than a fast link saves. A compression ratio does not identify content type, user value or congestion relief. The protocol guarantees lossless reconstruction and non-expansion on the wire — not a universal performance improvement.
Four octets restored dispatch and selected local context
When compression does win, IPv4 Protocol or IPv6 Next Header becomes 108. The inserted four-octet header carries three things: the original Next Header value, one reserved Flags octet, and a 16-bit Compression Parameter Index.
The saved Next Header is essential. After decompression, the receiver removes IPComp, restores the original dispatch value and places the reconstructed payload where the original payload belonged. The result is not a new application protocol. It is the old packet's payload, recovered after a conditional transformation.
The CPI is equally easy to overread. Values 0 through 63 identify well-known transforms; a negotiated range and a private-use range provide other namespaces. But the field is not a global name. Each node can choose its inbound CPI independently, and an outbound packet uses the CPI chosen by the node that will decompress it. CPI together with the destination address selects the relevant compression characteristics.
The same numeric CPI can therefore mean different things in another destination context. Even a well-known CPI can become insufficient to distinguish two associations between the same nodes when their lifetimes or adaptive counters differ. RFC 3173 recommends negotiated-range values when association uniqueness matters. A number on the wire is a lookup input, not a full account of how that state was authorized or maintained.
No default algorithm meant no invisible common law
Before two nodes use IPComp, they establish an IPComp Association containing the CPI, mode, algorithm and required parameters. The policy can cover every packet between two nodes or only selected sessions. The two directions are separate and may choose different algorithms.
There is no default compression algorithm. There is also no algorithm every IPComp implementation must support. Interoperability comes from an explicit common choice, not from an assumption that the word "compression" implies DEFLATE or any other transform.
RFC 3173 replaced the original specification mainly to clarify negotiation in the IKE/IPsec setting. Later IKEv2 kept the boundary: a requester may offer more than one compression algorithm, but a response accepts at most one. An implementation must not compress with an algorithm that was not offered and accepted.
IKEv2 also makes the lifetime legible. The virtual compression association has no independent life outside the ESP or AH Child SA that contains it. When that Child SA disappears, the compression association disappears and receives no separate Delete payload. Yet compression negotiation remains separate from negotiation of cryptographic parameters. Sharing a lifetime does not make CPI an encryption key or an integrity proof.
Compression changed what an intermediary could see
Without IPsec, IPComp can reduce a border device's ability to filter or account by inner protocol fields. The original Protocol value has moved into the IPComp header, and transport fields such as ports are inside compressed bytes. A router that does not share the IPComp Association cannot simply inspect them in their original positions.
That is not a claim that IPComp encrypts data. Compression is not confidentiality. It is a parsing and authority problem: a middlebox may no longer possess the state needed to recover the fields its policy depends on. If an environment requires every packet to be filtered or accounted for, RFC 3173 says the relevant association must be communicated securely to the filtering device.
The operational record should therefore separate six facts: capability was configured, an association was negotiated, a packet was selected for an attempt, the result earned an IPComp header, the receiver found the right association, and decompression restored the original payload. Collapsing those into "compression enabled" hides both valid omissions and real failures.
The lasting achievement of IPComp was not merely stuffing smaller payloads into IP. It made an optimization answerable to each packet. Common agreement supplied a safe way to read a compressed result. Running bytes kept the right to say that compression was not worth doing this time.
Sources
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






