Configure CTCP (TCP/IP header compression protocol)
Change
CTCP maximum connection number
Display
CTCP compression information
This chapter mainly explains how to configure TCP/IP header compression protocol (CTCP) on serial links using PPP. For detailed command information, see the command description of TCP/IP header compression.
CTCP configuration procedure consists of the following steps.
Change
CTCP maximum connection number
Display
CTCP compression information
NOTE: CTCP must be configured on both ends of a serial link, or CTCP will not work.
Currently, our CTCP only supports serial links encapsulated as
PPP, Frame Relay, HDLC. We need to configure CTCP under the following
conditions:
On low speed serial links
On serial links that need to save bandwidth
On a link that has a lot of communications such as TELNET, almost
every keystroke of the client needs a TCP packet to carry. Suppose that IP and
TCP headers don’t
have any option, the total number of bytes that are needed is 40, and the
payload is only 1 byte, resulting in very low efficiency.
If the same packet is carried by CTCP, the header will have only 4
bytes (TCP/IP header compression specifications of rfc2507) or 3 bytes (TCP/IP
header compression specifications of rfc1144).
To enable CTCP on link layers encapsulating PPP, you can use the
following command: (both ends of a link should be configured)
Command |
Function |
ip
tcp header-compression [{ cisco-format | iphc-format | passive}] |
Enable CTCP |
Among the optional parameters, “Cisco-format” is the default value, which means that if CTCP is applied to a PPP link, and the format of CTCP is IPHC, IPCP option will adopt Cisco’s packet format, otherwise, it will adopt RFC1144’s IPCP packet format; “passive” means that header compression begins only on receiving CTCP packets sending from the other end, and if it is applied to a PPP link, and the format of CTCP is IPHC, IPCP option will adopt Cisco’s packet format, otherwise, it will adopt RFC1144’s IPCP packet format; “iphc-format” means that if CTCP is applied to a PPP link, IPCP option will adopt RFC2509’s packet format, but if the PPP of the other end only supports RFC1144’s CTCP format, it will adopt RFC1144 ‘s IPCP format likewise. But if CTCP is applied to FR and HDLC links, “Cisco-format “ means using CTCP complied with RFC1144, “iphc-format” means CTCP complied with RFC2507, and “passive” means that the CTCP format used by this end is determined by the format of CTCP packet sent from the other end.
Change CTCP
maximum connection number
Command |
|
ip tcp compression-connections number |
Configure the maximum connection number of local CTCP |
CTCP maintains a structure locally to save connection information for every TCP connection; if the connection number is set too low, there won’t be enough structures to handle all TCP connections that are established simultaneously, which will affect the compression effectiveness.
Display CTCP
compression information
Command |
|
show ip tcp header-compression [type
number] [detail] |
Display CTCP information |
The above command needs to be configured in the global mode.
Command |
|
debug
ip tcp header-compression |
Display the incoming and outgoing CTCP packet information |
The above command needs to be used in the global mode.
The following example shows how to configure CTCP command on serial links encapsulating PPP:
Router_config#interface serial 1/2
Router_config_s1/2#ip tcp header-compression
Router_config_s1/2#ip tcp compression-connections 25
Router_config_s1/2#encapsulation ppp
Router_config_s1/2#