Configuring TCP/IP Header Compression over Frame Relay
An average TCP/IP packet typically includes a 40-byte header. However, once the TCP connection is established, the header information becomes redundant for the subsequent data transmissions. With TCP/IP header compression, the size of the header can be reduced from its initial 40 bytes to a smaller size, between 3 and 18 bytes. The average size of a compressed header is about 10 bytes. The TCP/IP header compression algorithm condenses the TCP/IP headers but leaves the data payload in the packet completely uncompressed. This greatly reduces the overhead in the TCP/IP traffic transported over the Frame Relay network for common TCP services such as Telnet, rlogin, and XWindows. Statistics have shown that an average of a 50 percent improvement in the throughput can be obtained with Telnet traffic over a 64-kbps line. The compression ratios for other traffic types are largely dependent on the nature of the data.
It is important to note that TCP/IP header compression is a hop-by-hop compression scheme. The TCP/IP header must be replaced at each node, or hop, for routing or switching to be possible. The compression and decompression processing at each hop adds latency and also considerably increases the processing load of the CPU.
Active Versus Passive TCP/IP Header Compression
The Cisco IOS software allows TCP/IP header compression over Frame Relay to work in active or passive mode. When active compression mode is selected, all outgoing packets are subjected to TCP/IP header compression. On the other hand, passive compression mode subjects an outgoing TCP/IP packet to header compression only if a packet had a compressed TCP/IP header when it was received. The active compression mode is the default mode on Cisco routers.
TCP/IP header compression on a Cisco router requires the Cisco Frame Relay encapsulation to be used. The IETF Frame Relay encapsulation cannot be used with TCP/IP header compression over Frame Relay on the Cisco IOS software. An error message is generated by the Cisco IOS software whenever this is attempted, as shown in Example 15-4.
Example 15-4. Error Message When Using IETF Encapsulation with TCP/IP Header Compression over Frame Relay
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router (config)#interface serial2/0
Router (config-if)#encapsulation frame-relay ietf
Router (config-if)#frame-relay ip tcp header-compression
%Interface is set for IETF encapsulation! IP
%header compression is supported only over CISCO
%encapsulation!
Configuring TCP/IP Header Compression over Frame Relay
To configure TCP/IP header compression over Frame Relay on a Cisco router, perform the following configurations, beginning in the global configuration mode:
Step 1. Enter the interface configuration mode of the router for the physical interface, the multipoint logical subinterface, or the point-to-point logical subinterface. Frame Relay encapsulation for either the default Cisco or ietf mode must be configured on the main interface. To configure TCP/IP Header Compression on the main interface, Cisco Frame Relay encapsulation must be configured.
Step 2. On the main interface or subinterface, TCP/IP header compression over Frame Relay can be enabled with the frame-relay ip tcp header-compression [passive] interface configuration command. The default compression mode is the active mode. This command can be used on physical interfaces or logical subinterfaces. When this command is configured, the applied TCP/IP header compression characteristics are inherited by all DLCIs created under the main interface or subinterface.
Step 3. TCP/IP header compression over Frame Relay can be enabled explicitly with the frame-relay map ip protocol-address dlci [broadcast] cisco tcp header-compression [active | passive] interface configuration command. This command should be used when you need to use IETF encapsulation on the main interface as a whole, but a specific DLCI needs to use Cisco encapsulation and TCP/IP header compression. This command can be used when TCP/IP header compression needs to be configured on a specific DLCI, but it is not required on other DLCIs created under the main interface. Note that only IP protocol can be used with TCP/IP header compression.
Step 4. (optional) To remove or disable TCP/IP header compression, two commands can be used. The no frame-relay ip tcp header-compression interface configuration command effectively disables TCP/IP header compression on all DLCIs not explicitly configured for TCP header compression. Then the frame-relay map ip ip-address dlci nocompress interface configuration command can be used to disable TCP/IP header compression only on a specified DLCI.
Step 5. (optional) To specify the maximum number of TCP/IP header compression connections that can exist on a Frame Relay interface, the frame-relay ip tcp compression-connections interface configuration command is used. There is no default value associated with the maximum number of allowed TCP/IP header compression connections over Frame Relay. The ip tcp compression-connections number interface configuration command for PPP or HDLC interfaces, however, has a default value of 32 allowed connections.
Example 15-5 shows a configuration example for TCP/IP header compression on a Cisco router.
Example 15-5. Configuration Example of TCP/IP Header Compression on a Cisco Router
interface Serial2/3
ip address 172.16.1.1 255.255.255.0
encapsulation frame-relay
frame-relay map ip 172.16.1.3 101 broadcast nocompress
frame-relay map ip 172.16.1.2 100 broadcast
frame-relay ip tcp header-compression
!
interface Serial2/3.200 multipoint
ip address 192.168.1.1 255.255.255.0
frame-relay map ip 192.168.1.2 300 CISCO tcp header-compression passive
The configuration example in Example 15-5 shows that TCP/IP header compression is explicitly configured for DLCI 100 under the main interface using active compression mode (default). This is inherited by all DLCIs created under the main interface. However, the nocompress keyword is used with the frame-relay map command for DLCI 101 to explicitly disable TCP/IP header compression for this specific DLCI. TCP/IP header compression with passive compression mode is applied to DLCI 200 on the multipoint subinterface. More configuration examples are provided in the "Verifying and Monitoring Frame Relay Compressions on Cisco Routers" section found later in this chapter.



