Header and Payload Compression
Header Compression (RTP,TCP)
Header compression works by creating a context on both sides of a connection for each TCP/RTP data stream. The context contains header information for the stream so that data doesn’t need to be sent with every packet. For RTP, you can also send full headers periodically to refresh information. Header compression is only available for TCP and RTP.
Interface level Header Compression
PPP, HDLC
To enable header compression,use:
When using the passive keyword, compression will be used only for destinations that send compressed headers. Otherwise, all outgoing traffic will be compressed. Periodic refreshes means sending full headers from time to time, but this is available only for RTP The total number of context can be configured with:
Take into account that one context is used for each directions, so a bidirectional communication will use twice as much contexts if configured on both sides. Additional settings can be made with:
To see the status of header compression, use:
Frame Relay
On Frame Relay interfaces, TCP Header compression is only available on interfaces where the encapsulation used is cisco, not ietf. Header compression can be configured per interface or subinterface, using commands that start with frame-relay ip {rtp|tcp} header-compression.
When you configure on a multilink (sub)interface, header compression applies to all DLCIs. You can specifically disable compression on some DLCIs, using:
If you only want to enable on some DLCIs, use:
Class Based Header Compression
You can also configure header compression inside an outgoing policy for traffic matched by a class defintion. You should use the following command to enable header compression:
IPHC Profile
Another option is to use IPHC Profiles. First define the profile:
Then set compression options:
In the end apply the profile per interface:
To verifu, use:
Payload compression is available on serial interfaces and it depends on the type of encapsulation. Most payload compression techniques are based on the Stacker or the Predictor algorithm: Stacker algorithm tries to replace big chunks of data with index in a dictionary. It requires less memory and more CPU, it is more efficient, but less faster. Predictor algorithm tries to predict the next character. It requires more memory and less CPU, it is less efficient but is faster. When determining QoS byte counts, legacy QoS uses the data before compression, while the more modern MQC uses the data after compression. To monitor compression, use:
Payload compression options differ based on the encapsulation used:
HDLC
PPP
Frame Relay
Per interface or subinterface:
Per VC:
Last updated