RFC 3241

Robust Header Compression (ROHC) over PPP

๐Ÿ“… published May 2002, from ietf

๐ŸŽ€ Robust Header Compression (ROHC) over PPP ๐ŸŽ€

Network Working Group ยท Request for Comments: 3241 ยท Category: Standards Track ๐Ÿ“œ Author: C. Bormann, TZI/Uni Bremen ๐Ÿง‘โ€๐Ÿ’ป ยท Date: April 2002 ๐Ÿ“… Updates: 1332 ๐Ÿ”„ (this is the big one, bestie, so pay attention!)


Status of this Memo ๐Ÿ“Œ

okay so this doc is an Internet standards track protocol for the Internet community, and it literally asks everyone for discussion and suggestions for improvements ๐Ÿซถ. If you want to know where this protocol stands in the official lineup, check the current edition of the "Internet Official Protocol Standards" (STD 1) ๐Ÿ“š. And the distribution of this memo is unlimited, so share it with everyone ๐Ÿ’–.

Copyright (C) The Internet Society (2002). All Rights Reserved. ๐Ÿ”’

Abstract โœจ

so basically this document describes an option for negotiating the use of robust header compression (ROHC) on IP datagrams sent over the Point-to-Point Protocol (PPP) ๐Ÿฆ‹. It adds extensions to the PPP Control Protocols for IPv4 and IPv6, so both flavours of IP get the glow-up ๐Ÿ’….

1. Introduction ๐ŸŒธ

Robust Header Compression (ROHC) as defined in [RFC3095] can compress both IPv4 and IPv6 datagrams, and it can also handle packets wrapped in multiple IP headers ๐Ÿง. The first version of ROHC is mostly focused on squishing the packet headers in RTP streams, but it also handles other UDP flows ๐ŸŽ€. The really iconic part is that it's a framework, so new header compression mechanisms can be plugged in as new profiles ๐Ÿ”Œ. And the plan is for future profiles to compress TCP transport protocol headers too ๐Ÿ‘‘.

Now, for compression of IP datagrams over a PPP link to even happen, each end of the link has to agree on a set of configuration parameters for it ๐Ÿค. PPP handles negotiating link parameters for network layer protocols with a family of network control protocols (NCPs) ๐Ÿงš. There's a separate NCP for IPv4 and one for IPv6, so this document defines configuration options that go into both NCPs to negotiate the compression scheme ๐Ÿ’œ.

ROHC doesn't require the link layer to tell you what kinds of datagrams are inside its frames ๐Ÿ™…โ€โ™€๏ธ. But ROHC has two basic header types: small-CID headers (zero or one bytes identify the compression context) and large-CID headers (one or two bytes are used for this) ๐Ÿ“. To keep PPP packets self-describing, this document defines two new values for the PPP Data Link Layer Protocol Field, one for small-CID ROHC packets and one for large-CID ROHC packets ๐ŸŒˆ. This also dodges a sneaky problem: if PPP negotiated which format to use separately in IPCP and IPV6CP, the two negotiations could come out with different answers ๐Ÿ˜ญ. A PPP ROHC sender can send packets in either small-CID or large-CID format at any time, which means the LARGE_CIDS parameter from [RFC3095] is not used ๐Ÿ™ˆ. Any PPP ROHC receiver MUST be able to process both small-CID and large-CID ROHC packets, so there's no negotiation needed for this ๐Ÿ’….

ROHC assumes the link layer delivers packets in sequence, and PPP normally doesn't reorder packets ๐Ÿ“ฆ. If you use reordering mechanisms like multiclass multilink PPP [RFC2686], be careful that packets sharing the same compression context don't get reordered ๐Ÿซฃ. (Fun twist: in certain cases, reordering might be fine for ROHC, like inside a sequence of packets that don't change the decompression context โœจ.)

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 ๐Ÿ“–. These are the capitalised rule-words, so when you see them in caps, they're load-bearing, babe ๐Ÿ”ฅ.

2. Configuration Option ๐Ÿงฉ

This document specifies a new compression protocol value for the IPCP IP-Compression-Protocol option as specified in [RFC1332] ๐ŸŽ‰. The new value and its associated option format are described in section 2.1 ๐Ÿฆ‹.

The option format is structured so it can be extended later on for future ROHC changes ๐ŸŒฑ.

It's worth repeating [RFC1332], section 4, because it's giving clarity: "The IP-Compression-Protocol Configuration Option is used to indicate the ability to receive compressed packets. Each end of the link must separately request this option if bi-directional compression is desired." ๐Ÿ’ฌ In other words, the option describes what the decompressor on the peer's side (the receiving side) can do, for whichever peer sent the Configure-Request ๐Ÿง .

NOTE: The rules for link and network layer parameter negotiation for PPP in [RFC1661], [RFC1331], [RFC1332] don't prohibit multiple instances of one configuration option, but they do say that a configuration option's spec has to explicitly allow multiple instances. From the current spec of the IPCP IP-Compression-Protocol configuration option [RFC1332], you can infer it only selects a single compression protocol at any time ๐Ÿ™ƒ. That made sense back when only one header compression scheme existed. Then IP header compression [RFC2507, RFC2509] showed up, and that didn't really change things, since RFC 2507 basically superseded RFC 1144 ๐Ÿคทโ€โ™€๏ธ. But with ROHC, it may now very well be desirable to use RFC 2507 TCP compression together with RFC 3095 RTP/UDP compression ๐Ÿ’….

So this document now updates RFC 1332 by explicitly allowing multiple instances of the IP-Compression-Protocol configuration option to be sent, each with a different IP-Compression-Protocol value ๐Ÿ”„. Each type of compression protocol can independently set up its own parameters ๐Ÿฆ‹.

This change is believed not to cause significant harm in existing PPP implementations ๐Ÿ™. They would most likely Configure-Nak or Configure-Reject the duplicate option, or they might just accept the one option they understand ๐Ÿคž. To help interoperability, the peer implementing this specification SHOULD react to a Configure-Nak or Configure-Reject by reducing the number of options it offers to one ๐Ÿซถ.

2.1. Configuration Option Format ๐Ÿ“

Both the network control protocol for IPv4, IPCP [RFC1332], and the IPv6 NCP, IPV6CP [RFC2472], can be used to negotiate IP Header Compression parameters for their respective protocols ๐Ÿงš. The configuration option format is the same for both IPCP and IPV6CP ๐Ÿ’–.

Description

This NCP configuration option is used to negotiate parameters for Robust Header Compression โœจ. The option format is summarised below, and the fields are transmitted from left to right ๐Ÿ‘€.

Figure 1: Robust Header Compression (ROHC) Option

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |    IP-Compression-Protocol    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            MAX_CID            |             MRRU              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           MAX_HEADER          |          suboptions...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Here's the field-by-field breakdown ๐Ÿฐ:

  • Type: 2
  • Length: >= 10. The length may be increased if extra parameters are indicated by additional suboptions ๐Ÿ“.
  • IP-Compression-Protocol: 0003 (hex) ๐ŸŽฏ
  • MAX_CID: a two-octet field that indicates the maximum value of a context identifier ๐Ÿ†”. Suggested value: 15. MAX_CID must be at least 0 and at most 16383 (the value 0 implies having one context) ๐Ÿ”ข.
  • MRRU: a two-octet field that indicates the maximum reconstructed reception unit (see [RFC3095], section 5.1.1) ๐Ÿ“ฆ. Suggested value: 0.
  • MAX_HEADER: the largest header size in octets that may be compressed ๐Ÿ“š. Suggested value: 168 octets.

The value of MAX_HEADER should be large enough that at least the outer network layer header can be compressed ๐ŸŒท. To squeeze out more compression efficiency, MAX_HEADER should be set large enough to cover common combinations of network and transport layer headers ๐Ÿ’….

NOTE: The four ROHC profiles defined in RFC 3095 don't have a MAX_HEADER parameter. So the MAX_HEADER parameter defined by this document has no effect in those profiles. Other profiles (e.g., ones based on RFC 2507) can use the parameter by explicitly referencing it ๐Ÿค“.
  • suboptions: zero or more suboptions. Each suboption has a type field, a length field, and zero or more parameter octets, as defined by the suboption type ๐Ÿงƒ. The length field tells you the length of the whole suboption, including the type and length fields themselves ๐Ÿ“.

Figure 2: Suboption

             0                   1                   2
             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            |     Type      |    Length     |  Parameters...
            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

2.2. PROFILES Suboption ๐ŸŒŸ

The set of profiles to be enabled is up for negotiation ๐Ÿ—ณ๏ธ. Most initial implementations of ROHC implement profiles 0x0000 to 0x0003. This is the one that's a must, babe: this option MUST be supplied ๐Ÿ’€. So the PROFILES suboption in section 2.2 is never optional.

Description

This suboption defines the set of profiles supported by the decompressor ๐Ÿง .

Figure 3: PROFILES suboption

             0                   1                   2
             0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            |     Type      |    Length     |  Profiles...
            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  • Type: 1
  • Length: 2n+2
  • Value: n octet-pairs in ascending order, each octet-pair specifying a ROHC profile supported ๐ŸŽ€.

3. Multiple Network Control Protocols ๐Ÿ‘ฏโ€โ™€๏ธ

ROHC can compress both IPv6 and IPv4 datagrams ๐Ÿฆ‹. Both IPCP and IPV6CP can negotiate option parameter values for ROHC ๐Ÿค. The ROHC capability that gets negotiated as a whole applies to compressing packets where the outer header is an IPv4 header, and to packets where it's an IPv6 header, respectively ๐Ÿงฉ. For example, an outer IPv6 header MUST NOT be sent if the ROHC IP-Compression-Protocol option wasn't negotiated for IPV6CP ๐Ÿ™…โ€โ™€๏ธ. That's a hard no, bestie.

Offering a specific ROHC capability in a Configure-Request in either IPCP or IPV6CP means the capability is provided for the entire ROHC channel formed by the PPP link ๐ŸŒˆ. When the option has been negotiated with different values in IPCP and IPV6CP, the result is that the set of parameter values for the entire ROHC channel is the logical union of the two values ๐Ÿงฎ. That means the maximum for MAX_CID, MRRU, or MAX_HEADER, plus the logical union of the suboptions ๐Ÿ’ซ. For the PROFILES suboption, the logical union is the union of the two sets of profiles ๐Ÿ“. The unified values stay valid parameter values for the ROHC channel even when either of the NCPs gets taken down ๐Ÿ”’, so they don't just vanish.

Note that each new suboption for this option must define the meaning of "logical union", if the concept applies ๐Ÿ“. (Every new suboption has to explain what "logical union" means for it, periodt ๐Ÿ’….)

3.1. Sharing Context Identifier Space ๐ŸŽ€

Okay so, for compressing and decompressing IPv4 and IPv6 datagram headers, the context identifier space is shared ๐Ÿซถ. The parameter values get negotiated separately, but sharing the space gets messy when those values are different ๐Ÿ˜ญ. Since all the compressed packets share one CID space, the compression engine has to hand out context identifiers from a common pool ๐ŸŽ€. For compressed packets, the decompressor has to look at the context state to figure out which parameters to use for decompression. It's giving multitasking ๐Ÿ’…

In particular, the context identifier space is shared between ROHC small-CID packets and ROHC large-CID packets. From the point of view of the ROHC framework, the PPP NCP instances for IPCP and IPV6CP together make up exactly one ROHC channel ๐Ÿฆ‹. Its feedback is destined for the ROHC channel defined by the NCP instances for IPCP and IPV6CP in the reverse direction on the same PPP link.

Now, taking down either NCP while the other is still open means the contexts of the channel stay active โœจ. To avoid race conditions, the same is true if both NCPs get taken down and then one or more of them is reopened ๐Ÿ™ˆ. Taking down LCP destroys the channel, though ๐Ÿ’€. Reopening LCP and then one or more of IPCP and IPV6CP restarts ROHC with all contexts in no-context state. Main character energy for the LCP, honestly ๐Ÿ‘‘.


4. Demultiplexing of Datagrams ๐Ÿงš

The ROHC specification [RFC3095] defines a single header format for all the different types of compressed headers, with a variant for small CIDs and a variant for large CIDs ๐ŸŒธ. Two PPP Data Link Layer Protocol Field values get specified below.

ROHC small-CIDs

The frame contains a ROHC packet with small CIDs as defined in [RFC3095].

Value: 0003 (hex)

ROHC large-CIDs

The frame contains a ROHC packet with large CIDs as defined in [RFC3095].

Value: 0005 (hex)

Note that this implies that all CIDs within one ROHC packet MUST be of the same size, as indicated by the Data Link Layer Protocol field, either small or large. In particular, embedded feedback MUST have a CID of the same size as indicated by the Protocol field value. For piggybacking feedback, a compressor must be able to control the feedback CID size used by the associated decompressor, ensure that all CIDs are of the same size, and indicate this size with the appropriate Protocol Field value. Very organized, very iconic ๐Ÿ—‚๏ธโœจ.

To make CID interpretation unambiguous when ROHC segmentation is used, all packets that contribute to a segment MUST be sent with the same Data Link Layer Protocol Field value, either 0003 or 0005. That value then also applies to the CID size in the reconstructed unit. A unit reconstructed out of packets with Protocol field values that differ MUST be discarded. No mixing and matching, bestie ๐Ÿšซ๐Ÿซถ.


5. ROHC Usage Considerations ๐ŸŒˆ

Certain considerations are required for any ROHC-over-X protocol. This section describes how some of these are handled for ROHC over PPP ๐Ÿฆ‹.

5.1. Uncompressed profile

There is no need for the ROHC uncompressed profile in ROHC over PPP, because uncompressed packets can always be sent using the PPP protocol demultiplexing method ๐Ÿ™Œ. So no consideration was given to locking down one of the context numbers for the uncompressed profile (see [RFC3095] section 5.1.2). Note, however, that according to the ROHC specification, profile 0x0000 must not be rejected [RFC3095], so it MUST be implemented by all receivers ๐Ÿ”ฅ. Non-negotiable, periodt.

5.2. Parameter selection

For each of the ROHC channel parameters MAX_CID and MRRU, the value is the maximum of the respective values negotiated for the IPCP and IPv6CP instances, if any ๐Ÿ“Š. The ROHC channel parameter FEEDBACK_FOR is set implicitly to the reverse direction on the same PPP link (see "Sharing Context Identifier Space" above) ๐Ÿ”. The ROHC channel parameter LARGE_CIDS is not used. Instead, the PPP protocol ID on the packet is used (see "Demultiplexing of Datagrams" above) ๐ŸŽฏ.

A number of parameters for ROHC must be set correctly for good compression on a specific link ๐Ÿง . E.g., the parameters k_1, n_1, k_2, n_2 in section 5.3.2.2.3 of [RFC3095] need to be set based on the error characteristics of the underlying links. As PPP links are usually run with a strong error detection scheme [RFC1662], k_1 = n_1 = k_2 = n_2 = 1 is usually a good set of values ๐Ÿ’–.

Note that in any case k values need to be set low enough relative to n values to allow for the limited ability of the CRC to detect errors. I.e., the CRC will succeed for about 1/8 of the packets even in case of context damage, so k/n should be significantly less than 7/8. Bestie, this is the part where the math gets real ๐Ÿ˜ญ๐Ÿงฎ.

6. Security Considerations ๐Ÿ’€

Negotiation of the option defined here imposes no additional security considerations beyond those that otherwise apply to PPP [RFC1661]. Phew ๐Ÿ˜ฎโ€๐Ÿ’จ.

The security considerations of ROHC [RFC3095] apply. Read that spec, it's serious business ๐Ÿ”’.

The use of header compression can, in rare cases, cause the misdelivery of packets. If necessary, confidentiality of packet contents should be assured by encryption ๐Ÿ”. This is not a drill ๐Ÿšจ.

Encryption applied at the IP layer (e.g., using IPSEC mechanisms) precludes header compression of the encrypted headers. Compression of the outer IP header and authentication/security headers is still possible, as described in [RFC3095] ๐Ÿงฉ. For RTP packets, full header compression is possible if the RTP payload is encrypted by itself, without encrypting the UDP or RTP headers, as described in [RFC1889]. This method is appropriate when the UDP and RTP header information need not be kept confidential ๐Ÿซ . Choose your fighter, and choose wisely ๐ŸฅŠ.


7. IANA considerations ๐Ÿ“‹

The ROHC suboption identifier is a non-negative integer ๐Ÿ”ข. Following the policies outlined in [RFC2434], the IANA policy for assigning new values for the suboption identifier shall be Specification Required. That means values and their meanings must be documented in an RFC or in some other permanent and readily available reference, in sufficient detail that interoperability between independent implementations is possible ๐Ÿ“š. The range 0 to 127 is reserved for IETF standard-track specifications. The range 128 to 254 is available for other specifications that meet this requirement (such as Informational RFCs) ๐ŸŒŸ. The value 255 is reserved for future extensibility of the present specification ๐Ÿ”ฎ.

The following suboption identifiers are already allocated:

Suboption   Document       Usage
identifier

1           RFC3241        Profiles

The RFC 3006 compressibility hint [RFC3006] for ROHC is 0x0003pppp, where 0xpppp is the profile assumed ๐ŸŽ.

(Note that the PPP protocol identifier values 0003 and 0005 were taken from a previously reserved space that exhibits inefficient transparency in the presence of asynchronous control character escaping, as it is considered rather unlikely that ROHC will be used over links with highly populated ACCMs ๐Ÿค“.)


8. Acknowledgments ๐Ÿซถ

The present document borrows heavily from [RFC2509]. Iconic sourcing, honestly ๐Ÿ™‡โ€โ™€๏ธ.

The author would like to thank Pete McCann and James Carlson for clarifying the multiple option instance issue. Craig Fox gets a shoutout for helping with some PPP arcana ๐Ÿง™โ€โ™€๏ธ, and Lars-Erik Jonsson for supplying some final clarifications ๐Ÿ’œ.


9. References ๐Ÿ“š

9.1. Normative References

  • [RFC1332] McGregor, G., "The PPP Internet Protocol Control Protocol (IPCP)", RFC 1332, May 1992.
  • [RFC1661] Simpson, W., Ed., "The Point-To-Point Protocol (PPP)", STD 51, RFC 1661, July 1994.
  • [RFC2472] Haskin, E. and E. Allan, "IP Version 6 over PPP", RFC 2472, December 1998.
  • [RFC3006] Davie, B., Casner, S., Iturralde, C., Oran, D. and J. Wroclawski, "Integrated Services in the Presence of Compressible Flows", RFC 3006, November 2000.
  • [RFC3095] Bormann, C., Burmeister, C., Degermark, M., Fukushima, H., Hannu, H., Jonsson, L-E., Hakenberg, R., Koren, T., Le, K., Liu, Z., Martensson, A., Miyazaki, A., Svanbro, K., Wiebke, T., Yoshimura, T. and H. Zheng, "RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed", RFC 3095, July 2001.

9.2. Informative References

  • [RFC1144] Jacobson, V., "Compressing TCP/IP Headers for Low-Speed Serial Links", RFC 1144, February 1990.
  • [RFC1889] Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson, "RTP: A Transport Protocol for real-time applications", RFC 1889, January 1996.
  • [RFC2434] Alvestrand, H. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.
  • [RFC2507] Degermark, M., Nordgren, B. and S. Pink, "IP Header Compression", RFC 2507, February 1999.
  • [RFC2509] Engan, M., Casner, S. and C. Bormann, "IP Header Compression over PPP", RFC 2509, February 1999.
  • [RFC2686] Bormann, C., "The Multi-Class Extension to Multi-Link PPP", RFC 2686, September 1999.

10. Author's Address ๐Ÿ’Œ

Carsten Bormann
Universitaet Bremen FB3 TZI
Postfach 330440
D-28334 Bremen, GERMANY

Phone: +49.421.218-7024
Fax:   +49.421.218-7000
EMail: cabo@tzi.org

Copyright (C) The Internet Society (2002). All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement ๐ŸŒธ

Funding for the RFC Editor function is currently provided by the Internet Society. Thank you for reading, bestie ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from