RObust Header Compression (ROHC): A Profile for TCP/IP (ROHC-TCP)
obsoleted by
- rfc-6846 — RObust Header Compression (ROHC): A Profile for TCP/IP (ROHC-TCP)
Extracted elements (31)
Context replication (IR-CR) was introduced specifically to reduce overhead for short-lived TCP connections. Simultaneous or near-simultaneous TCP flows often share IP sub-context, TCP fields, and context values; replicating from an existing validated base context is faster and more efficient than transmitting a full IR packet for each new flow.
Scaled encoding of the TCP Sequence Number uses the payload size as the implicit scaling factor (no explicit transmission needed), because the payload size is already inferable from the compressed packet length. Scaled encoding of the TCP Acknowledgment Number requires an explicit ack_stride field because the opposite-direction payload size may not be available at the compressor.
The IPv4 header checksum is compressed to zero bits (inferred_ip_v4_header_checksum) because when nearly all IP header fields are compressed away and decompression is already verified by a per-packet CRC over the reconstructed header, the additional per-hop checksum provides no incremental value and can be recomputed at the decompressor side.
When the ECN control field is set, ECN bits from all IP headers—not just the innermost—are included in the irregular chain. This accommodates the ECN 'full-functionality option' of RFC 3168, under which ECN markings on inner IP headers are propagated to outer tunnel headers; the acknowledged tradeoff is one extra octet per outer header when limited-functionality ECN is used.
ROHC-TCP assumes that if a feedback channel is used at least once for a specific context, it will be used for the entire duration of compression for that context. If the feedback channel disappears after being established, compression should be restarted.
The ROHC-TCP FEEDBACK-2 mechanism is unsuitable when the LSB-encoded MSN bits could wrap around within one round-trip time. In such high-throughput or very-short-RTT cases, unidirectional operation—where the compressor periodically sends larger context-updating packets without relying on decompressor feedback—is more appropriate.
A compressed list of TCP options that is part of the dynamic chain (in IR or IR-DYN packets) must have all its list items present; all X-bits in the XI list MUST be set.
A compressor MUST NOT assign either sequential (NBO) or sequential byte-swapped IP-ID behavior to tunneling (outer) IP headers; sequential IP-ID behavior may only be assigned to the innermost IP header, which is the only one with a sufficiently close correlation to the MSN.
Both the compressor and decompressor MUST use the fixed item-table mappings for TCP options list compression: NOP=0, EOL=1, MSS=2, WSCALE=3, TIMESTAMP=4, SACK-PERMITTED=5, SACK=6, Generic options=7-15.
If an index without an accompanying item is received and the decompressor has no context entry for that index, the header MUST be discarded and a NACK SHOULD be sent.
If field X in the uncompressed packet changes value, the compressor MUST use a packet type that contains an encoding for field X until it has gained confidence that the decompressor has received at least one packet containing the new value. The compressor SHOULD choose the smallest compressed format that fulfills this optimistic-approach condition.
In the No Context (NC) state, only IR and IR-CR packets carrying static field information may be decompressed; all other packet types MUST NOT be decompressed and MUST NOT be delivered to upper layers. Once a packet is successfully validated, the decompressor MUST transit to the FC state.
In the Static Context (SC) state, only IR/IR-DYN packets (CRC-8 protected) or CO packets protected by a 7-bit CRC may be decompressed; other packet types MUST NOT be decompressed and MUST NOT be delivered to upper layers.
On reception of a NACK, the compressor SHOULD assume only the static context is valid and re-send all dynamic information via IR or IR-DYN. On reception of a STATIC-NACK, the compressor SHOULD assume no valid context and re-send all static and dynamic information via IR.
Once a feedback channel is established for a specific ROHC-TCP context, the decompressor is REQUIRED to continue sending NACKs or STATIC-NACKs for as long as the context is associated with profile 0x0006, per the state-specific logic in Section 5.3.1.
The compressor MUST NOT use scaled encoding when scaling_factor is zero. If the residue or scaling_factor changes, the compressor MUST NOT use scaled encoding until it is confident the decompressor has received the new value(s).
The MSN SHOULD be initialized to a random value. The compressor should only initialize a new MSN for the initial IR or IR-CR packet for a CID whose context is not already associated with this profile; otherwise the MSN continues to increment monotonically across flows.
The Reserved bits in the compressed list header and in 8-bit XI items MUST be set to zero; otherwise, the decompressor MUST discard the packet. Similarly, the 4-bit Padding field MUST be set to zero when present.
Until a decompressor feedback channel is established, the compressor SHOULD periodically move to a lower compression state and send IR and/or IR-DYN packets to prevent desynchronization. Once the feedback channel is established, the compressor MAY stop performing periodic refreshes.
When decompressing an IR or IR-DYN packet, the decompressor MUST validate header integrity using CRC-8. If validation fails, the packet MUST NOT be delivered to upper layers.
When decompressing CO packets, the decompressor MUST validate the outcome using CRC verification. Any corrective repair attempt MUST also be validated via CRC; if verification still fails, the packet MUST NOT be delivered to upper layers and the context MUST NOT be updated.
ROHC-TCP defines four IP-ID behaviors for the IPv4 Identification field: sequential in network byte order (NBO), sequential byte-swapped, random (RND), and constant zero. The compressor monitors the IP-ID across packets to identify the best-matching behavior and selects encoding methods accordingly.
ROHC-TCP uses four header chain types: the static chain (IR only), the dynamic chain (IR and IR-DYN, includes compressed TCP options list), the replicate chain (IR-CR only, absent fields are copied from the base context), and the irregular chain (CO packets only, per-packet changing fields including TCP option irregular items).
TCP options are compressed using a list compression scheme with a 16-entry item table. Each option type has a reserved index (NOP=0 through SACK=6, Generic=7-15) and an encoding method (e.g., tcp_opt_ts, tcp_opt_sack). Structure changes trigger a compressed list in the base header; content-only changes for stable-structure options are handled via the irregular chain.
The Master Sequence Number (MSN) is a ROHC-TCP control field created by the compressor and incremented by one for each packet sent. It is not derived from any TCP header field. It serves two purposes: differentiating packets for feedback acknowledgment, and inferring the values of incrementing fields such as IP-ID. The full 16-bit MSN is sent in IR/IR-DYN packets; an LSB-encoded subset is carried in CO packets.
IANA assigned profile identifier 0x0006 to the ROHC-TCP profile defined in this document, within the ROHC profile identifier registry established by RFC 4995. This identifier appears in the Profile field of IR, IR-DYN, and IR-CR packets.
ROHC-TCP inherits the security considerations of the ROHC framework (RFC 4995). The CRC mechanisms in compressed packets are intended for decompression error detection, not cryptographic integrity; an attacker able to inject packets could potentially desynchronize a compression context. Links carrying ROHC-TCP traffic should be secured at another layer if integrity protection is required.
The decompressor operates in three states: No Context (NC), Static Context (SC), and Full Context (FC). It starts in NC; any successful decompression immediately moves it to FC. Repeated CRC failures cause downward transitions: FC→SC on context damage, SC→NC on static context damage.
The compressed TCP options list begins with a 1-octet header (3-bit Reserved, 1-bit PS, 4-bit count m), followed by m XI items (4-bit each if PS=0, 8-bit each if PS=1), a 4-bit Padding field if PS=0 and m is odd, then variable-length items for each XI with X=1. Each XI encodes a 1-bit presence flag X and a table Index.
The IR-CR packet format: optional Add-CID, type octet (11111100), CID octets, Profile=0x06, 1-octet CRC-8, 1-octet with B flag and 7-bit CRC7, optional Base CID field (1 octet for small CIDs, 1-2 octets for large CIDs, present only if B=1), variable-length replicate chain, and payload.
The IR packet format: optional Add-CID octet, IR type octet (11111101), 0-2 CID octets, 1-octet Profile=0x06, 1-octet CRC-8 over entire IR header, variable-length static chain, variable-length dynamic chain, and payload. The x bit in the IR type octet MUST be set to one for IR (and zero for IR-CR).