home *** CD-ROM | disk | FTP | other *** search
/ Internet Core Protocols / Oreilly-InternetCoreProtocols.iso / RFCs / rfc2393.txt < prev    next >
Encoding:
Text File  |  1999-10-14  |  20.8 KB  |  564 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         A. Shacham
  8. Request for Comments: 2393                                         Cisco
  9. Category: Standards Track                                     R. Monsour
  10.                                                                    Hi/fn
  11.                                                               R. Pereira
  12.                                                                 TimeStep
  13.                                                                M. Thomas
  14.                                                       AltaVista Internet
  15.                                                            December 1998
  16.  
  17.  
  18.                 IP Payload Compression Protocol (IPComp)
  19.  
  20. Status of this Memo
  21.  
  22.    This document specifies an Internet standards track protocol for the
  23.    Internet community, and requests discussion and suggestions for
  24.    improvements.  Please refer to the current edition of the "Internet
  25.    Official Protocol Standards" (STD 1) for the standardization state
  26.    and status of this protocol.  Distribution of this memo is unlimited.
  27.  
  28. Copyright Notice
  29.  
  30.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  31.  
  32. Abstract
  33.  
  34.    This document describes a protocol intended to provide lossless
  35.    compression for Internet Protocol datagrams in an Internet
  36.    environment.
  37.  
  38. 1. Introduction
  39.  
  40.    IP payload compression is a protocol to reduce the size of IP
  41.    datagrams.  This protocol will increase the overall communication
  42.    performance between a pair of communicating hosts/gateways ("nodes")
  43.    by compressing the datagrams, provided the nodes have sufficient
  44.    computation power, through either CPU capacity or a compression
  45.    coprocessor, and the communication is over slow or congested links.
  46.  
  47.    IP payload compression is especially useful when encryption is
  48.    applied to IP datagrams.  Encrypting the IP datagram causes the data
  49.    to be random in nature, rendering compression at lower protocol
  50.    layers (e.g., PPP Compression Control Protocol [RFC-1962])
  51.    ineffective.  If both compression and encryption are required,
  52.    compression MUST be applied before encryption.
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Shacham, et. al.            Standards Track                     [Page 1]
  59.  
  60. RFC 2393                         IPComp                    December 1998
  61.  
  62.  
  63.    This document defines the IP payload compression protocol (IPComp),
  64.    the IPComp packet structure, the IPComp Association (IPCA), and
  65.    several methods to negotiate the IPCA.
  66.  
  67.    Other documents shall specify how a specific compression algorithm
  68.    can be used with the IP payload compression protocol.  Such
  69.    algorithms are beyond the scope of this document.
  70.  
  71. 1.1. Specification of Requirements
  72.  
  73.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  74.    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  75.    document are to be interpreted as described in RFC 2119 [RFC-2119].
  76.  
  77. 2. Compression Process
  78.  
  79.    The compression processing of IP datagrams has two phases:
  80.    compressing of outbound IP datagrams ("compression") and
  81.    decompressing of inbound datagrams ("decompression").  The
  82.    compression processing MUST be lossless, ensuring that the IP
  83.    datagram, after being compressed and decompressed, is identical to
  84.    the original IP datagram.
  85.  
  86.    Each IP datagram is compressed and decompressed by itself without any
  87.    relation to other datagrams ("stateless compression"), as IP
  88.    datagrams may arrive out of order or not arrive at all.  Each
  89.    compressed IP datagram encapsulates a single IP payload.
  90.  
  91.    Processing of inbound IP datagrams MUST support both compressed and
  92.    non-compressed IP datagrams, in order to meet the non-expansion
  93.    policy requirements, as defined in section 2.2.
  94.  
  95.    The compression of outbound IP datagrams MUST be done before any IP
  96.    security processing, such as encryption and authentication, and
  97.    before any fragmentation of the IP datagram.  In addition, in IP
  98.    version 6 [RFC-2460], the compression of outbound IP datagrams MUST
  99.    be done before the addition of either a Hop-by-Hop Options header or
  100.    a Routing Header, since both carry information that must be examined
  101.    and processed by possibly every node along a packet's delivery path,
  102.    and therefore MUST be sent in the original form.
  103.  
  104.    Similarly, the decompression of inbound IP datagrams MUST be done
  105.    after the reassembly of the IP datagrams, and after the completion of
  106.    all IP security processing, such as authentication and decryption.
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Shacham, et. al.            Standards Track                     [Page 2]
  115.  
  116. RFC 2393                         IPComp                    December 1998
  117.  
  118.  
  119. 2.1. Compressed Payload
  120.  
  121.    The compression is applied to a single array of octets, which are
  122.    contiguous in the IP datagram.  This array of octets always ends at
  123.    the last octet of the IP packet payload.  Note: a contiguous array of
  124.    octets in the IP datagram may be not contiguous in physical memory.
  125.  
  126.    In IP version 4 [RFC-0791], the compression is applied to the upper
  127.    layer protocol (ULP) payload of the IP datagram.  No portion of the
  128.    IP header or the IP header options is compressed.
  129.  
  130.    In the IPv6 context, IPComp is viewed as an end-to-end payload, and
  131.    MUST not apply to hop-by-hop, routing, and fragmentation extension
  132.    headers.  The compression is applied starting at the first IP Header
  133.    Option field that does not carry information that must be examined
  134.    and processed by nodes along a packet's delivery path, if such IP
  135.    Header Option field exists, and continues to the ULP payload of the
  136.    IP datagram.
  137.  
  138.    The size of a compressed payload, generated by the compression
  139.    algorithm, MUST be in whole octet units.
  140.  
  141.    As defined in section 3, an IPComp header is inserted immediately
  142.    preceding the compressed payload.  The original IP header is modified
  143.    to indicate the usage of the IPComp protocol and the reduced size of
  144.    the IP datagram.  The original content of the Next Header (IPv6) or
  145.    protocol (IPv4) field is stored in the IPComp header.
  146.  
  147.    The decompression is applied to a single contiguous array of octets
  148.    in the IP datagram.  The start of the array of octets immediately
  149.    follows the IPComp header and ends at the last octet of the IP
  150.    payload.  If the decompression process is successfully completed, the
  151.    IP header is modified to indicate the size of the decompressed IP
  152.    datagram, and the original next header as stored in the IPComp
  153.    header.  The IPComp header is removed from the IP datagram and the
  154.    decompressed payload immediately follows the IP header.
  155.  
  156. 2.2. Non-Expansion Policy
  157.  
  158.    If the total size of a compressed ULP payload and the IPComp header,
  159.    as defined in section 3, is not smaller than the size of the original
  160.    ULP payload, the IP datagram MUST be sent in the original non-
  161.    compressed form.  To clarify:  If an IP datagram is sent non-
  162.    compressed, no IPComp header is added to the datagram.  This policy
  163.    ensures saving the decompression processing cycles and avoiding
  164.    incurring IP datagram fragmentation when the expanded datagram is
  165.    larger than MTU.
  166.  
  167.  
  168.  
  169.  
  170. Shacham, et. al.            Standards Track                     [Page 3]
  171.  
  172. RFC 2393                         IPComp                    December 1998
  173.  
  174.  
  175.    Small IP datagrams are likely to expand as a result of compression.
  176.    Therefore, a numeric threshold should be applied before compression,
  177.    where IP datagrams of size smaller than the threshold are sent in the
  178.    original form without attempting compression.  The numeric threshold
  179.    is implementation dependent.
  180.  
  181.    An IP datagram with payload that has been previously compressed tends
  182.    not to compress any further.  The previously compressed payload may
  183.    be the result of external processes, such as compression applied by
  184.    an upper layer in the communication stack, or by an off-line
  185.    compression utility.  An adaptive algorithm should be implemented to
  186.    avoid the performance hit.  For example, if the compression of i
  187.    consecutive IP datagrams of an IPCA fails, the next k IP datagrams
  188.    are sent without attempting compression.  If the next j datagrams are
  189.    also failing to compress, the next k+n datagrams are sent without
  190.    attempting compression.  Once a datagram is compressed successfully,
  191.    the normal process of IPComp restarts.  Such an adaptive algorithm,
  192.    including all the related thresholds, is implementation dependent.
  193.  
  194.    During the processing of the payload, the compression algorithm MAY
  195.    periodically apply a test to determine the compressibility of the
  196.    processed data, similar to the requirements of [V42BIS].  The nature
  197.    of the test is algorithm dependent.  Once the compression algorithm
  198.    detects that the data is non-compressible, the algorithm SHOULD stop
  199.    processing the data, and the payload is sent in the original non-
  200.    compressed form.
  201.  
  202. 3. Compressed IP Datagram Header Structure
  203.  
  204.    A compressed IP datagram is encapsulated by modifying the IP header
  205.    and inserting an IPComp header immediately preceding the compressed
  206.    payload.  This section defines the IP header modifications both in
  207.    IPv4 and IPv6, and the structure of the IPComp header.
  208.  
  209. 3.1. IPv4 Header Modifications
  210.  
  211.    The following IPv4 header fields are set before transmitting the
  212.    compressed IP datagram:
  213.  
  214.       Total Length
  215.  
  216.          The length of the entire encapsulated IP datagram, including
  217.          the IP header, the IPComp header and the compressed payload.
  218.  
  219.       Protocol
  220.  
  221.          The Protocol field is set to 108, IPComp Datagram, [RFC-1700].
  222.  
  223.  
  224.  
  225.  
  226. Shacham, et. al.            Standards Track                     [Page 4]
  227.  
  228. RFC 2393                         IPComp                    December 1998
  229.  
  230.  
  231.       Header Checksum
  232.  
  233.          The Internet Header checksum [RFC-0791] of the IP header.
  234.  
  235.    All other IPv4 header fields are kept unchanged, including any header
  236.    options.
  237.  
  238. 3.2. IPv6 Header Modifications
  239.  
  240.    The following IPv6 header fields are set before transmitting the
  241.    compressed IP datagram:
  242.  
  243.       Payload Length
  244.  
  245.          The length of the compressed IP payload.
  246.  
  247.       Next Header
  248.  
  249.          The Next Header field is set to 108, IPComp Datagram, [RFC-
  250.          1700].
  251.  
  252.    All other IPv6 header fields are kept unchanged, including any non-
  253.    compressed header options.
  254.  
  255.    The IPComp header is placed in an IPv6 packet using the same rules as
  256.    the IPv6 Fragment Header.  However if an IPv6 packet contains both an
  257.    IPv6 Fragment Header and an IPComp header, the IPv6 Fragment Header
  258.    MUST precede the IPComp header in the packet.
  259.  
  260. 3.3.  IPComp Header Structure
  261.  
  262.    The four-octet header has the following structure:
  263.  
  264.    0                   1                   2                   3
  265.    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
  266.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  267.    |  Next Header  |     Flags     | Compression Parameter Index |
  268.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  269.  
  270.    Next Header
  271.  
  272.         8-bit selector.  Stores the IPv4 Protocol field or the IPv6 Next
  273.         Header field of the original IP header.
  274.  
  275.    Flags
  276.  
  277.         8-bit field.  Reserved for future use.  MUST be set to zero.
  278.         MUST be ignored by the receiving node.
  279.  
  280.  
  281.  
  282. Shacham, et. al.            Standards Track                     [Page 5]
  283.  
  284. RFC 2393                         IPComp                    December 1998
  285.  
  286.  
  287.    Compression Parameter Index (CPI)
  288.  
  289.         16-bit index.  The CPI is stored in network order.  The values
  290.         0-63 define well-known compression algorithms, which require no
  291.         additional information, and are used for manual setup.  The
  292.         values themselves are identical to IPCOMP Transform identifiers
  293.         as defined in [SECDOI].  Consult [SECDOI] for an initial set of
  294.         defined values and for instructions on how to assign new values.
  295.         The values 64-255 are reserved for future use.  The values
  296.         256-61439 are negotiated between the two nodes in definition of
  297.         an IPComp Association, as defined in section 4.  Note: When
  298.         negotiating one of the well-known algorithms, the nodes MAY
  299.         select a CPI in the pre-defined range 0-63.  The values
  300.         61440-65535 are for private use among mutually consenting
  301.         parties.  Both nodes participating can select a CPI value
  302.         independently of each other and there is no relationships
  303.         between the two separately chosen CPIs.  The outbound IPComp
  304.         header MUST use the CPI value chosen by the decompressing node.
  305.         The CPI in combination with the destination IP address uniquely
  306.         identifies the compression algorithm characteristics for the
  307.         datagram.
  308.  
  309. 4. IPComp Association (IPCA) Negotiation
  310.  
  311.    To utilize the IPComp protocol, two nodes MUST first establish an
  312.    IPComp Association (IPCA) between them.  The IPCA includes all
  313.    required information for the operation of IPComp, including the
  314.    Compression Parameter Index (CPI), the mode of operation, the
  315.    compression algorithm to be used, and any required parameter for the
  316.    selected compression algorithm.  The IPComp mode of operation is
  317.    either a node-to-node policy where IPComp is applied to every IP
  318.    packet between the nodes, or an ULP session based policy where only
  319.    selected ULP sessions between the nodes are using IPComp.  For each
  320.    IPCA, a different compression algorithm may be negotiated in each
  321.    direction, or only one direction may be compressed.  The default is
  322.    "no IPComp compression".
  323.  
  324.    The IPCA is established by dynamic negotiations or by manual
  325.    configuration.  The dynamic negotiations SHOULD use the Internet
  326.    Security Association and Key Management Protocol [ISAKMP], where
  327.    IPSec is present.  The dynamic negotiations MAY be implemented
  328.    through a different protocol.
  329.  
  330. 4.1. Use of ISAKMP
  331.  
  332.    For IPComp in the context of IP Security, ISAKMP provides the
  333.    necessary mechanisms to establish IPCA.  IPComp Association is
  334.    negotiated by the initiator using a Proposal Payload, which would
  335.  
  336.  
  337.  
  338. Shacham, et. al.            Standards Track                     [Page 6]
  339.  
  340. RFC 2393                         IPComp                    December 1998
  341.  
  342.  
  343.    include one or more Transform Payloads.  The Proposal Payload would
  344.    specify a compression protocol in the protocol id field and each
  345.    Transform Payload would contain the specific compression method(s)
  346.    being offered to the responder.
  347.  
  348.    In the Internet IP Security Domain of Interpretation (DOI), IPComp is
  349.    negotiated as the Protocol ID PROTO_IPCOMP.  The compression
  350.    algorithm is negotiated as one of the defined IPCOMP Transform
  351.    Identifiers.
  352.  
  353. 4.2. Use of Non-ISAKMP Protocol
  354.  
  355.    The dynamic negotiations MAY be implemented through a protocol other
  356.    than ISAKMP.  Such protocol is beyond the scope of this document.
  357.  
  358. 4.3. Manual Configuration
  359.  
  360.    Nodes may establish IPComp Associations using manual configuration.
  361.    For this method, a limited number of Compression Parameters Indexes
  362.    (CPIs) is designated to represent a list of specific compression
  363.    methods.
  364.  
  365. 5. Security Considerations
  366.  
  367.    When IPComp is used in the context of IPSec, it is believed not to
  368.    have an effect on the underlying security functionality provided by
  369.    the IPSec protocol; i.e., the use of compression is not known to
  370.    degrade or alter the nature of the underlying security architecture
  371.    or the encryption technologies used to implement it.
  372.  
  373.    When IPComp is used without IPSec, IP payload compression potentially
  374.    reduces the security of the Internet, similar to the effects of IP
  375.    encapsulation [RFC-2003].  For example, IPComp may make it difficult
  376.    for border routers to filter datagrams based on header fields.  In
  377.    particular, the original value of the Protocol field in the IP header
  378.    is not located in its normal positions within the datagram, and any
  379.    transport layer header fields within the datagram, such as port
  380.    numbers, are neither located in their normal positions within the
  381.    datagram nor presented in their original values after compression.  A
  382.    filtering border router can filter the datagram only if it shares the
  383.    IPComp Association used for the compression.  To allow this sort of
  384.    compression in environments in which all packets need to be filtered
  385.    (or at least accounted for), a mechanism must be in place for the
  386.    receiving node to securely communicate the IPComp Association to the
  387.    border router.  This might, more rarely, also apply to the IPComp
  388.    Association used for outgoing datagrams.
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Shacham, et. al.            Standards Track                     [Page 7]
  395.  
  396. RFC 2393                         IPComp                    December 1998
  397.  
  398.  
  399. 6. References
  400.  
  401.    [RFC-0791] Postel, J., Editor, "Internet Protocol", STD 5, RFC 791,
  402.               September 1981.
  403.  
  404.    [RFC-1700] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2,
  405.               RFC 1700, October 1994.  Or see:
  406.               http://www.iana.org/numbers.html
  407.  
  408.    [RFC-2460] Deering, S., and R. Hinden, "Internet Protocol, Version 6
  409.               (IPv6) Specification", RFC 2460, December 1998.
  410.  
  411.    [RFC-1962] Rand, D., "The PPP Compression Control Protocol (CCP)",
  412.               RFC 1962, June 1996.
  413.  
  414.    [RFC-2003] Perkins, C., "IP Encapsulation within IP", RFC 2003,
  415.               October 1996.
  416.  
  417.    [RFC-2119] Bradner, S., "Key words for use in RFCs to Indicate
  418.               Requirement Levels", BCP 14, RFC 2119, March 1997.
  419.  
  420.    [ISAKMP]   Maughan, D., Schertler, M., Schneider, M., and J. Turner,
  421.               "Internet Security Association and Key Management Protocol
  422.               (ISAKMP)", RFC 2408, November 1998.
  423.  
  424.    [SECDOI]   Piper, D., "The Internet IP Security Domain of
  425.               Interpretation for ISAKMP", RFC 2407, November 1998.
  426.  
  427.    [V42BIS]   CCITT, "Data Compression Procedures for Data Circuit
  428.               Terminating Equipment (DCE) Using Error Correction
  429.               Procedures", Recommendation V.42 bis, January 1990.
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Shacham, et. al.            Standards Track                     [Page 8]
  451.  
  452. RFC 2393                         IPComp                    December 1998
  453.  
  454.  
  455. Authors' Addresses
  456.  
  457.    Abraham Shacham
  458.    Cisco Systems
  459.    170 West Tasman Drive
  460.    San Jose, California 95134
  461.    United States of America
  462.  
  463.    EMail: shacham@cisco.com
  464.  
  465.  
  466.    Robert Monsour
  467.    Hi/fn Inc.
  468.    2105 Hamilton Avenue, Suite 230
  469.    San Jose, California 95125
  470.    United States of America
  471.  
  472.    EMail: rmonsour@hifn.com
  473.  
  474.  
  475.    Roy Pereira
  476.    TimeStep Corporation
  477.    362 Terry Fox Drive
  478.    Kanata, Ontario K2K 2P5
  479.    Canada
  480.  
  481.    EMail: rpereira@timestep.com
  482.  
  483.  
  484.    Matt Thomas
  485.    AltaVista Internet Software
  486.    30 Porter Road
  487.    Littleton, Massachusetts 01460
  488.    United States of America
  489.  
  490.    EMail: matt.thomas@altavista-software.com
  491.  
  492. Working Group
  493.  
  494.    The IP Payload Compression Protocol (IPPCP) working group can be
  495.    contacted through its chair:
  496.  
  497.    Naganand Dorswamy
  498.    Bay Networks
  499.  
  500.    EMail: naganand@baynetworks.com
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Shacham, et. al.            Standards Track                     [Page 9]
  507.  
  508. RFC 2393                         IPComp                    December 1998
  509.  
  510.  
  511. Full Copyright Statement
  512.  
  513.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  514.  
  515.    This document and translations of it may be copied and furnished to
  516.    others, and derivative works that comment on or otherwise explain it
  517.    or assist in its implementation may be prepared, copied, published
  518.    and distributed, in whole or in part, without restriction of any
  519.    kind, provided that the above copyright notice and this paragraph are
  520.    included on all such copies and derivative works.  However, this
  521.    document itself may not be modified in any way, such as by removing
  522.    the copyright notice or references to the Internet Society or other
  523.    Internet organizations, except as needed for the purpose of
  524.    developing Internet standards in which case the procedures for
  525.    copyrights defined in the Internet Standards process must be
  526.    followed, or as required to translate it into languages other than
  527.    English.
  528.  
  529.    The limited permissions granted above are perpetual and will not be
  530.    revoked by the Internet Society or its successors or assigns.
  531.  
  532.    This document and the information contained herein is provided on an
  533.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  534.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  535.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  536.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  537.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Shacham, et. al.            Standards Track                    [Page 10]
  563.  
  564.