In addition to the queuing methods mentioned previously, Cisco routers also support several forms of compression. Compression increases the efficiency of WAN links by making packets smaller, reducing the amount of bandwidth they use. This compression comes at a cost of increased processor usage on the routers on either side of the WAN link. The supported types of compression are
In addition, a hardware compression card is available on some Cisco devices. The exam does not cover hardware-compression features. Link CompressionLink compression, also called per-interface compression, involves compressing both the header portion and the data portion of the packet. Although link compression is Layer 3 protocol independent, it is not encapsulation independent. You may use link compression when using PPP or LAPB encapsulation utilizing either Predictor or STAC compression, which are explained later in this chapter. If using High-Level Data Link Control (HDLC) encapsulation, you may only use STAC compression.
PredictorPredictor compression attempts to predict a sequence of characters by examining a sequence in a dictionary. Predictor then looks at the next string of bits in the data portion to see whether there is a match. If there is a match, then the new character sequence replaces the old. If it does not match, Predictor starts the process again with the next set of characters. STACAn offshoot of one of the first desktop compression algorithms, STAC was developed by STAC Electronics, and is a Lempel-Ziv compression algorithm. STAC examines data strings for redundant characters and replaces them with a smaller token. For example, if a data string contains the characters 2345678 several times, STAC can replace that string with the notation @3. This notation, being smaller than the original string, reduces bandwidth usage. The notation is converted back to the original string on the other side of the WAN. MPPCThe MPPC protocol allows Cisco routers to communicate with Microsoft clients using a compressed data stream. When enabled on an access server interface, this protocol allows the client to gain increased bandwidth. This type of compression is highly recommended for corporate dial-in customers where the clients must dial an 800 number and are using a Microsoft operating system. Use the following command to configure point-to-point software compression for an LAPB, PPP, or HDLC link: Router(config-if)#compress < predictor | stac | mppc > Using a lossless compression algorithm, an algorithm that exactly recreates the original data streams without degradation, routers can reliably transport data across a WAN. If you are using PPP encapsulation across a point-to-point, you can use the following interface configuration command instead of the compress command: Router(config-if)#ppp compress < predictor | stac > Payload CompressionSometimes known as per-virtual circuit compression, payload compression compresses only the data portion of the data stream, leaving the header intact. This process, which keeps the header readable to all devices, is primarily used in networks that can't guarantee that a packet will always cross a particular point-to-point link. Payload compression is well suited for switched and cell-based networking topologies, such as Frame Relay, X.25, Switched Multimegabit Data Service (SMDS), and ATM. You can use the frame-relay payload-compress command to enable STAC compression on a Frame Relay point-to-point interface or subinterface. Payload compression is also effective with packets where the data portion is at least 80% of the entire packet and the packet is crossing slow links. Header CompressionHeader compression is primarily used in situations where the payload of the packet is much smaller than the header. TCP/IP header compression only works on the TCP/IP protocol, and the primary usage is on packets with small payloads, such as Telnet, while crossing slow WAN links. TCP/IP header compression leaves the Layer 2 portion of the packet uncompressed; it compresses only the TCP/IP headers. Use the following command: Router(config-if)# ip tcp header-compression <passive> If you use the passive option, the router only compresses outgoing packets when it receives an incoming packet that is compressed. Modem CompressionIn dial environments, compression can occur in the modem. If you decide to allow the modem to handle compression, then do not enable compression on the router interface. Two common modem compression standards are Microcom Networking Protocol 5 (MNP5) and the International Telecommunication Union Telecommunication Standardization (ITU-T) V.42bis. MNP5 and V.42bis offer up to two times and four times compression, respectively. The two specifications are not compatible. The modems at both ends of the connection negotiate the standard to use. CPU Cycles Versus MemoryThe amount of memory that a router needs depends on a number of factors. How many circuits are attached? How many and what kinds of access lists are running? Even when running a single Layer 3 protocol, the memory and CPU usage can vary widely, especially if more than one routing protocol is running. Thus, it is almost impossible to say how much of a hit a router will receive if you run compression on an interface. You will find that, in general, Predictor uses more memory than STAC does and that payload compression uses more memory than link compression. The flip side is that link compression uses more CPU time than payload compression does. In general, the most important factor for determining how compression will affect your router is how many packets are being compressed. The more packets you have that are being compressed and decompressed, the larger performance hit your router will take. |