📄 rfc1979.txt
字号:
Network Working Group J. Woods
Request for Comments: 1979 Proteon, Inc.
Category: Informational August 1996
PPP Deflate Protocol
Status of This Memo
This memo provides information for the Internet community. This memo
does not specify an Internet standard of any kind. Distribution of
this memo is unlimited.
Abstract
The Point-to-Point Protocol (PPP) [1] provides a standard method for
transporting multi-protocol datagrams over point-to-point links.
The PPP Compression Control Protocol [2] provides a method to
negotiate and utilize compression protocols over PPP encapsulated
links.
This document describes the use of the PPP Deflate compression
protocol for compressing PPP encapsulated packets.
Table of Contents
1. Introduction ...................................... 2
1.1 Licensing ................................... 2
2. PPP Deflate Packets ............................... 3
2.1 Packet Format ............................... 6
3. Configuration Option Format ....................... 8
SECURITY CONSIDERATIONS .................................. 9
REFERENCES ............................................... 9
ACKNOWLEDGEMENTS ......................................... 9
CHAIR'S ADDRESS .......................................... 10
AUTHOR'S ADDRESS ......................................... 10
Woods Informational [Page 1]
RFC 1979 PPP Deflate August 1996
1. Introduction
The 'deflate' compression format[3], as used by the PKZIP and gzip
compressors and as embodied in the freely and widely distributed
zlib[4] library source code, has the following features:
- an apparently unencumbered encoding and compression
algorithm, with an open and publically-available
specification.
- low-overhead escape mechanism for incompressible data. The
PPP Deflate specification offers options to reduce that
overhead further.
- heavily used for many years in networks, on modem and other
point-to-point links to transfer files for personal computers
and workstations.
- easily achieves 2:1 compression on the Calgary corpus[5]
using less than 64KBytes of memory on both sender and
receive.
1.1. Licensing
The zlib source is widely and freely available, subject to the
following copyright:
(C) 1995 Jean-Loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you
use this software in a product, an acknowledgment in the
product documentation would be appreciated but is not
required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
Woods Informational [Page 2]
RFC 1979 PPP Deflate August 1996
3. This notice may not be removed or altered from any source
distribution.
Jean-Loup Gailly Mark Adler
gzip@prep.ai.mit.edu madler@alumni.caltech.edu
If you use the zlib library in a product, we would appreciate
*not* receiving lengthy legal documents to sign. The sources are
provided for free but without warranty of any kind. The library
has been entirely written by Jean-Loup Gailly and Mark Adler; it
does not include third-party code.
The deflate format and compression algorithm are based on Lempel-Ziv
LZ77 compression; extensive research has been done by the GNU Project
and the Portable Network Graphics working group supporting its patent
free status.
2. PPP Deflate Packets
Before any PPP Deflate packets may be communicated, PPP must reach
the Network-Layer Protocol phase, and the CCP Control Protocol must
reach the Opened state.
Exactly one PPP Deflate datagram is encapsulated in the PPP
Information field, where the PPP Protocol field contains 0xFD or
0xFB. 0xFD is used when the PPP multilink protocol is not used or
"above" multilink. 0xFB is used "below" multilink, to compress
independently on individual links of a multilink bundle.
The maximum length of the PPP Deflate datagram transmitted over a PPP
link is the same as the maximum length of the Information field of a
PPP encapsulated packet.
Only packets with PPP Protocol numbers in the range 0x0000 to 0x3FFF
and neither 0xFD nor 0xFB are compressed. Other PPP packets are
always sent uncompressed. Control packets are infrequent and should
not be compressed for robustness.
Padding
PPP Deflate packets require the previous negotiation of the Self-
Describing-Padding Configuration Option [6] if padding is added to
packets. If no padding is added, than Self-Describing-Padding is
not required.
Woods Informational [Page 3]
RFC 1979 PPP Deflate August 1996
Reliability and Sequencing
PPP Deflate requires the packets to be delivered in sequence. It
relies on Reset-Request and Reset-Ack LCP packets or on
renegotiation of the Compression Control Protocol [2] to indicate
loss of synchronization between the transmitter and receiver. The
LCP FCS detects corrupted packets and the normal mechanisms
discard them. Missing or out of order packets are detected by the
sequence number in each packet. The packet sequence number ought
to be checked before decoding the packet.
Instead of transmitting a Reset-Request packet when detecting a
sequence error, the receiver MAY momentarily force CCP to drop out
of the Opened state by transmitting a new CCP Configure-Request.
This method is more expensive than using Reset-Requests.
When the receiver first encounters an unexpected sequence number
it SHOULD send a Reset-Request LCP packet as defined in the
Compression Control Protocol. When the transmitter sends the
Reset-Ack or when the receiver receives a Reset-ACK, they must
reset the sequence number to zero, clear the compression
dictionary, and resume sending and receiving compressed packets.
The receiver MUST discard all compressed packets after detecting
an error and until it receives a Reset-Ack. This strategy can be
thought of as abandoning the transmission of one "file" and
starting the transmission of a new "file."
The transmitter must clear its compression history and respond
with a Reset-Ack each time it receives a Reset-Request, because it
cannot know if previous Reset-Acks reached the receiver. The
receiver need not do anything to its history when it receives a
Reset-Ack, because the transmitter will simply not refer to any
prior history ('deflate' is a sliding-window compressor).
When the link is busy, one decompression error is usually followed
by several more before the Reset-Ack can be received. It is
undesirable to transmit Reset-Requests more frequently than the
round-trip-time of the link, because redundant Reset-Requests
cause unnecessary compression dictionary clearing. The receiver
MAY transmit an additional Reset-Request each time it receives a
compressed or uncompressed packet until it finally receives a
Reset-Ack, but the receiver ought not transmit another Reset-
Request until the Reset-Ack for the previous one is late. The
receiver MUST transmit enough Reset-Request packets to ensure that
the transmitter receives at least one. For example, the receiver
might choose to not transmit another Reset-Request until after one
second (or, of course, a Reset-Ack has been received and
decompression resumed).
Woods Informational [Page 4]
RFC 1979 PPP Deflate August 1996
Data Expansion
'Deflate', as used in this standard, expands incompressible data
by approximately 14-18 bytes (8 bytes worst-case at the 'deflate'
level, two further bytes for the 'deflate' end-of-block and the
zero-length synchronization block header, two bytes of sequence
number, and two bytes to account for adding the PPP Protocol Field
to the transmitted data unit).
The BSD Compress draft proposal[7] describes an escape mechanism
for incompressible data that trades off a layering violation for
the irritating complications of variable and potentially
unpredictable effective MRU lengths. That direct escape mechanism
(and much of the text of its description) is used here as well.
If an incompressible data packet does not fit within the MRU of
the link, the packet MUST be sent in its original form without CCP
encapsulation; PPP packets with significant data expansion that do
not exceed the MRU of the link SHOULD be sent in their original
form without CCP encapsulation. In both of these cases, the
transmitter must increment the sequence number, as future
encapsulated packets will depend on the correct reception of some
number of unencapsulated packets.
When a PPP packet is received with PPP Protocol numbers in the
range 0x0000 to 0x3FFF, (except, of course, 0xFD and 0xFB) it is
assumed that the packet would have caused expansion. The packet
is locally added to the compression history. (Given the
definition of the 'deflate' format, a convenient method of doing
this is to locally "decompress" a stored-block header of the
appropriate length, followed by the actual data block; or the data
can simply be appended to the receiver's history, depending on
implementation details.)
Sending incompressible packets in their native encapsulation
avoids maximum transmission unit complications. If uncompressed
packets could be larger than their native form, then it would be
necessary for the upper layers of an implementation to treat the
PPP link as if it had a smaller MTU, to ensure that compressed
incompressible packets are never larger than the negotiated PPP
MTU.
Using native encapsulation for incompressible packets complicates
the implementation. The transmitter and the receiver must start
putting information into the compression dictionary starting with
the same packets, without relying upon seeing a compressed packet
for synchronization. The first few packets after clearing the
dictionary are usually incompressible, and so are likely to sent
Woods Informational [Page 5]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -