Usage Guidelines
Compressing Headers
You can compress IP/User Datagram Protocol (UDP)/RTP headers to reduce the size of your packets. Compressing headers is especially useful for RTP because RTP payload size can be as small as 20 bytes, and the uncompressed header is 40 bytes.
The passive Keyword
By default, the iprtpheader-compression command compresses outgoing RTP traffic. If you specify the passive keyword, outgoing RTP traffic is compressed only if incoming RTP traffic on the same interface is compressed. If you do not specify the passive keyword, all outgoing RTP traffic is compressed.
The passive keyword is ignored on PPP interfaces. PPP interfaces negotiate the use of header-compression, regardless of whether the passive keyword is specified. Therefore, on PPP interfaces, the passive keyword is replaced by the IPHC format, the default format for PPP interfaces.
The iphc-format Keyword
The iphc-format keyword indicates that the IPHC format of header compression that will be used. For PPP and HDLC interfaces, when the iphc-format keyword is specified, TCP header compression is also enabled. For this reason, the iptcpheader-compression command appears in the output of the showrunning-config command. Since both RTP header compression and TCP header compression are enabled, both UDP packets and TCP packets are compressed.
The iphc-format keyword includes checking whether the destination port number is even and is in the ranges of 16,385 to 32,767 (for Cisco audio) or 49,152 to 65,535 (for Cisco video). Valid RTP packets that meet the criteria (that is, the port number is even and is within the specified range) are compressed using the compressed RTP packet format. Otherwise, packets are compressed using the less-efficient compressed non-TCP packet format.
The iphc-format keyword is not available for interfaces that use Frame Relay encapsulation.
Note |
The header compression format (in this case, IPHC) must be the same at both ends of the network. That is, if you specify the iphc-format keyword on the local router, you must also specify the iphc-format keyword on the remote router.
|
The ietf-format Keyword
The ietf-formatkeyword indicates that the IETF format of header compression will be used. For HDLC interfaces, theietf-formatkeyword compresses only UDP packets. For PPP interfaces, when the ietf-format keyword is specified, TCP header compression is also enabled. For this reason, the iptcpheader-compression command appears in the output of the showrunning-config command. Since both RTP header compression and TCP header compression are enabled, both UDP packets and TCP packets are compressed.
With the ietf-format keyword, any even destination port number higher than 1024 can be used. Valid RTP packets that meet the criteria (that is, the port number is even and is higher than 1024) are compressed using the compressed RTP packet format. Otherwise, packets are compressed using the less-efficient compressed non-TCP packet format.
The ietf-format keyword is not available for interfaces that use Frame Relay encapsulation.
Note |
The header compression format (in this case, IETF) must be the same at both ends of the network. That is, if you specify the ietf-formatkeyword on the local router, you must also specify the ietf-format keyword on the remote router.
|
Support for Serial Lines
RTP header compression is supported on serial lines using Frame Relay, HDLC, or PPP encapsulation. You must enable compression on both ends of a serial connection.
Unicast or Multicast RTP Packets
This command can compress unicast or multicast RTP packets, and, hence, multicast backbone (MBONE) traffic can also be compressed over slow links. The compression scheme is beneficial only when you have small payload sizes, as in audio traffic.
Custom or Priority Queueing
When you use theiprtpheader-compression command and configure custom or priority queueing on an encapsulated HDLC or Frame Relay interface, the compressed packets may go to the default queue instead of the user-defined queue, which results in protocol flaps (loss of keepalives). Therefore, we recommend that you use the Modular Quality of Service (QoS) Command-Line Interface (CLI) (MQC) model for configuring QoS features.
Examples
The following example enables RTP header compression on the Serial1/0 interface and limits the number of RTP header compression connections to 10. In this example, the optional iphc-format keyword of theiprtpheader-compressioncommand is specified.
Router> enable
Router# configure terminal
Router(config)# interface Serial1/0
Router(config-if)# encapsulation ppp
Router(config-if)# ip rtp header-compression iphc-format
Router(config-if)# ip rtp compression-connections 10
Router(config-if)# end
The following example enables RTP header compression on the Serial2/0 interface and limits the number of RTP header compression connections to 20. In this example, the optional ietf-format keyword of theiprtpheader-compressioncommand is specified.
Router> enable
Router# configure terminal
Router(config)# interface Serial2/0
Router(config-if)# encapsulation ppp
Router(config-if)# ip rtp header-compression ietf-format
Router(config-if)# ip rtp compression-connections 20
Router(config-if)# end
In the following example, RTP header compression is enabled on the Serial1/0 interface and the optional periodic-refresh keyword of theiprtpheader-compressioncommand is specified:
Router> enable
Router# configure terminal
Router(config)# interface Serial1/0
Router(config-if)# encapsulation ppp
Router(config-if)# ip rtp header-compression iphc-format periodic-refresh
Router(config-if)# ip rtp compression-connections 10
Router(config-if)# end