[Search] [txt|pdf|bibtex] [Tracker] [WG] [Email] [Nits]

Versions: 00 01                                                         
Network Working Group                           J. Schoenwaelder, Editor
Internet-Draft                                           TU Braunschweig
Expires December 1999                                       20 June 1999

                        SNMP Payload Compression

               <draft-irtf-nmrg-snmp-compression-00.txt>

Status of this Memo

   This document is an Internet-Draft and is in full conformance with
   all provisions of Section 10 of RFC 2026. Internet-Drafts are working
   documents of the Internet Engineering Task Force (IETF), its areas,
   and its working groups. Note that other groups may also distribute
   working documents as Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time. It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html

   Distribution of this document is unlimited. Please send comments to
   the Network Management Research Group <nmrg@ibr.cs.tu-bs.de>.

Copyright Notice

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

Abstract

   This memo defines a mechanism for lossless compression of SNMP
   payloads. Compression is especially useful when retrieving large
   amounts of data or when SNMP encryption is used.

J. Schoenwaelder                                                [Page 1]


Internet-Draft          SNMP Payload Compression               June 1999

   Table of Contents

   1 Introduction .................................................    3
   2 Requirements and Alternatives ................................    3
   2.1 Compression as an SNMPv3 Encryption Algorithm ..............    3
   2.2 Indicating Compression in the msgFlags .....................    4
   2.3 Compression as a new PDU type ..............................    4
   3 Acknowledgments ..............................................    6
   4 References ...................................................    6
   5 Editor's Address .............................................    6
   6 Full Copyright Statement .....................................    7

J. Schoenwaelder                                                [Page 2]


Internet-Draft          SNMP Payload Compression               June 1999

1.  Introduction

   This memo defines a mechanism for lossless compression of SNMP
   payloads. Compression is useful when retrieving large amounts of
   management data since the BER encoding used by SNMP is not very space
   efficient and the data tends to have a high degree of redundancy.

   SNMP payload compression is especially useful when SNMP encryption is
   used. Encrypting the SNMP payload causes the data to be random in
   nature, rendering compression at lower protocol layers (e.g., IP
   Payload Compression Protocol [2]) ineffective. If both compression
   and encryption are required, compression MUST be applied before
   encryption.

   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 [1].

2.  Requirements and Alternatives

   A solution for SNMP payload compression has to satisfy the following
   requirements:

   - Compression must happen before encryption if compression is used
     together with encryption. Compression is most useful if there are
     regular pattern in the data. It is the nature of encryption
     algorithms to destroy any regular pattern and hence encrypted data
     does not compress very well.

   - SNMP payload compression should support multiple compression
     algorithms. This means that communicating SNMP engines must be able
     to find agreement on the compression algorithm they are using.
     Instead of carrying compression algorithm identifier in every
     protocol message, it seems more effective to indicate compression
     algorithms in a MIB module (similar to authentication or encryption
     algorithms in SNMPv3).

2.1.  Compression as an SNMPv3 Encryption Algorithm

   The basic idea behind the first alternative is to treat compression
   as an SNMPv3 encryption algorithm. This has the following advantages
   / disadvantages:

   +  No change required to the SNMPv3 specifications.

   -  Support of N encryption algorithms and M compression algorithms
      leads to N*M possible combinations.

J. Schoenwaelder                                                [Page 3]


Internet-Draft          SNMP Payload Compression               June 1999

   -  Compression requires authentication since there is no noAuthPriv
      security level.

   +  Compression of the complete ScopedPDU.

   -  Does not work with older versions of SNMP (SNMPv1, SNMPv2c).

2.2.  Indicating Compression in the msgFlags

   To avoid some of the drawbacks of the previous approach, one can
   treat compression independent of encryption by allocating an unused
   bit in the msgFlags [3] to indicate whether compression is used or
   not. However, RFC 2572 [3] says in section 6.4:

      The remaining bits in msgFlags are reserved, and MUST be set to
      zero when sending a message and SHOULD be ignored when receiving
      a message.

   Similarly, RFC 2572 [3] specifies in section 7.1 step 7) and in
   section 7.2 step 5) that other bits msgFlags are set to zero or
   ignored. This means that this alternative can not be supported by an
   implementation which is compliant to RFC 2572 [3].

   In summary, this approach has the following advantages /
   disadvantages:

   -  Not strictly compliant to the current SNMPv3 specifications.

   +  Combination of M compression and N encryption algorithms possible
      without having to define N*M algorithms.

   +  Compression can be used with or without encryption or
      authentication.

   +  Compression of the complete ScopedPDU.

   -  Does not work with older versions of SNMP (SNMPv1, SNMPv2c).

2.3.  Compression as a new PDU type

   The third alternative is to restrict compression to PDUs rather than
   ScopedPDUs and to introduce a new PDU type for compressed payloads.
   RFC 1157 [4] defines the SNMPv1 message header as follows:

       Message ::= SEQUENCE {
           version   INTEGER { version-1(0) },
           community OCTET STRING,

J. Schoenwaelder                                                [Page 4]


Internet-Draft          SNMP Payload Compression               June 1999

           data      ANY  -- e.g., PDUs if trivial authentication
                          -- is being used
       }

   Similarly, RFC 2572 [3] defines the ScopedPDU as follows:

       ScopedPDU ::= SEQUENCE {
           contextEngineID  OCTET STRING,
           contextName      OCTET STRING,
           data             ANY -- e.g., PDUs as defined in RFC 1905
       }

   This means that a new PDU could be defined which holds the compressed
   version of a PDU:

       CompressedPDU ::= [42] IMPLICIT OCTET STRING
                          -- contains a compressed PDU

   Its important to analyze how a compliant SNMP implementation behaves
   when it receives an unknown PDU type. From a formal point of view,
   any PDU which is a valid BER serialization of an ASN.1 type must be
   accepted since the data portion is of the ASN.1 type ANY. In
   practice, most SNMP implementations will only recognize the PDU types
   defined in the SNMP specifications.

   The SNMPv3 message processing model [3] defines in section 7.2 step
   7) that parse errors while decoding the ScopedPDU cause the packet to
   be discarded after incrementing snmpInASNParseErrs. Even an
   implementation which is capable to decode arbitrary PDUs will have
   problems to determine the pduType as defined in section 7.2 step 9).
   This basically means that a compliant SNMPv3 engine will simply
   discard compressed PDUs.

   The SNMPv1 specification [4] defines in section 4.1 second step (4)
   that parse errors while decoding the PDU will cause the SNMP engine
   to drop the PDU. Hence, it can be expected that most implementations
   will simply drop a compressed PDU.

   In summary, this approach has the following advantages /
   disadvantages:

   -  Not strictly compliant to the current SNMPv3 specifications.

   +  Combination of M compression and N encryption algorithms possible
      without having to define N*M algorithms.

   +  Compression can be used with or without encryption or
      authentication.

J. Schoenwaelder                                                [Page 5]


Internet-Draft          SNMP Payload Compression               June 1999

   -  Compression of the PDU rather than the ScopedPDU.

   +  Works with every version of SNMP.

3.  Acknowledgments

   This document is the result of discussions of the Network Management
   Research Group (NMRG). Special thanks go to the following
   participants for their comments and contributions:

   Luca Deri, Jean-Philippe Martin-Flatin, Aiko Pras, Ron Sprenkels,
   Bert Wijnen.

4.  References

[1]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
     Levels", BCP 14, RFC 2119, March 1997.

[2]  Shacham, A., Monsour, R., Pereira, R. and M. Thomas, "IP Payload
     Compression Protocol (IPComp)", RFC 2393, December 1998.

[3]  Case, J., Harrington, D., Presuhn, R. and B. Wijnen, "Message
     Processing and Dispatching for the Simple Network Management
     Protocol (SNMP)", RFC 2572, April 1999.

[4]  Case, J., Fedor, M., Schoffstall, M. and J. Davin, "A Simple
     Network Management Protocol (SNMP)", RFC 1157, May 1990.

5.  Editor's Address

     Juergen Schoenwaelder
     TU Braunschweig
     Bueltenweg 74/75
     38106 Braunschweig
     Germany

     Phone: +49 531 391-3283
     EMail: schoenw@ibr.cs.tu-bs.de

J. Schoenwaelder                                                [Page 6]


Internet-Draft          SNMP Payload Compression               June 1999

6.  Full Copyright Statement

   Copyright (C) The Internet Society (1999). 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.

J. Schoenwaelder                                                [Page 7]