|
|
Real-time Transport Protocol (RTP) is a protocol used for carrying packetized audio and video traffic over an IP network. RTP is described in RFC 1889. RTP is not intended for data traffic, which uses TCP or UDP. RTP provides end-to-end network transport functions intended for applications with real-time requirements, such as audio, video, or simulation data over multicast or unicast network services.
The minimal 12 bytes of the RTP header, combined with 20 bytes of IP header and 8 bytes of UDP header, create a 40-byte IP/UDP/RTP header, as shown in Figure 55. The RTP packet has a payload of approximately 20 to 150 bytes for audio applications that use compressed payloads. It is very inefficient to transmit the IP/UDP/RTP header without compressing it.

The RTP header compression feature compresses the IP/UDP/RTP header in an RTP data packet from 40 bytes to approximately 2 to 5 bytes, as shown in Figure 55. It is a hop-by-hop compression scheme similar to RFC 1144 for TCP header compression. Using RTP header compression can benefit both telephony voice and multicast backbone (MBONE) applications running over slow links.
Enabling compression on both ends of a low-bandwidth serial link can greatly reduce the network overhead if there is a lot of RTP traffic on that slow link. This compression is beneficial especially when the RTP payload size is small (for example, compressed audio payloads of 20-50 bytes). Although the MBONE-style RTP traffic has higher payload sizes, compact encodings like Compressed Encoding for Linear Prediction (CELP) can also help considerably.
This feature is implemented on the following platforms:
You must have configured a serial line that uses either Frame Relay, HDLC, or PPP encapsulation, or an ISDN interface.
To configure RTP header compression, perform the following tasks. The first task is required; the remaining are optional.
You can compress the IP/UDP/RTP headers of RTP traffic to reduce the size of your packets, making audio or video communication more efficient. You must enable compression on both ends of a serial connection.
To enable RTP header compression for serial encapsulations HDLC or PPP, perform the following task in interface configuration mode:
| Task | Command |
|---|---|
Enable RTP header compression. | ip rtp header-compression [passive] |
If you include the passive keyword, the software compresses outgoing RTP packets only if incoming RTP packets on the same interface are compressed. If you use the command without the passive keyword, the software compresses all RTP traffic.
| Task | Command |
|---|---|
Enable RTP header compression on the physical interface and all the interface maps will inherit it. Subsequently, all maps will perform RTP/IP header compression. | frame-relay ip rtp header-compression [passive] |
Enable RTP header compression only on the particular map specified. | frame-relay map ip ip-address dlci [broadcast] rtp header-compression [active | passive] |
Enable both RTP and TCP header compression on this link. | frame-relay map ip ip-address dlci [broadcast] compress |
By default, the software supports a total of 16 RTP header compression connections on an interface. To change that number, perform the following task in interface configuration mode:
| Task | Command |
|---|---|
Specify the total number of RTP header compression connections supported on an interface. |
To clear RTP header compression structures and statistics, perform the following task in EXEC mode:
| Task | Command |
|---|---|
clear ip rtp header-compression [type number] |
To display RTP header compression statistics, perform the following tasks in EXEC mode:
| Task | Command |
|---|---|
show ip rtp header-compression [type number] [detail] | |
Display Frame Relay RTP header compression statistics. | show frame-relay ip rtp header-compression [interface type number] |
The following example enables RTP header compression for a serial, ISDN, or asynchronous interface. For ISDN, you also need a broadcast dialer map.
interface serial 0 :or interface bri 0 ip rtp header-compression encapsulation ppp ip rtp compression-connections 25
The following example is for Frame Relay encapsulation. It enables RTP header compression on the specified map.
interface serial 0 ip address 1.0.0.2 255.0.0.0 encapsulation frame-relay no keepalive clockrate 64000 frame-relay map ip 1.0.0.1 17 broadcast rtp header-compression
This section documents the following new and revised commands:
type number | (Optional) Interface type and number. |
EXEC
This command first appeared in Cisco IOS Release 11.2 F.
If this command is used without an interface type and number, it clears all RTP header compression structures and statistics.
The following example clears RTP header compression structures and statistics for serial interface 0:
clear ip rtp header-compression serial 0
active | (Optional) Compresses all outgoing RTP packets. This is the default. |
passive | (Optional) Compresses the outgoing RTP/UDP/IP header only if an incoming packet had a compressed header. |
Disabled.
If the command is configured, active is the default keyword.
Interface configuration
This command first appeared in Cisco IOS Release 11.2 F.
When this command is used on the physical interface, all the interface maps inherit the command; that is, all maps will perform IP/UDP/RTP header compression.
The following example enables RTP header compression for all Frame Relay maps on a physical interface:
frame-relay ip rtp header-compression
show frame-relay ip rtp header-compression
ip-address | IP address of the destination or next hop. |
dlci | DLCI number. |
broadcast | (Optional) Forwards broadcasts to the specified IP address. |
Disabled
Interface configuration
This command first appeared in Cisco IOS Release 11.2 F.
The following example enables both RTP and TCP header compression on serial interface 1:
interface serial 1 encapsulation frame-relay ip address 131.108.175.110 255.255.255.0 frame-relay map ip 131.108.175.220 180 compress
show frame-relay ip rtp header-compression
ip-address | IP address of the destination or next hop. |
dlci | DLCI number. |
active | (Optional) All outgoing RTP packets are compressed. This is the default. |
passive | (Optional) Compresses the outgoing RTP/UDP/IP header only if an incoming packet had a compressed header. |
Disabled.
If the command is configured, active is the default keyword.
Interface configuration
This command first appeared in Cisco IOS Release 11.2 F.
When this command is configured, the specified maps inherit RTP header compression. You can have multiple Frame Relay maps, with and without RTP header compression.
The following example enables RTP header compression on serial interface 1:
interface serial 1 encapsulation frame-relay ip address 131.108.175.110 255.255.255.0 frame-relay map ip 131.108.175.220 180 rtp header-compression
show frame-relay ip rtp header-compression
To specify the total number of RTP header compression connections that can exist on an interface, use the ip rtp compression-connections interface configuration command. To restore the default value, use the no form of this command.
ip rtp compression-connections number
number | Number of connections the cache supports, in the range from 3 to 256. The default is 16 connections. |
16 connections
Interface configuration
This command first appeared in Cisco IOS Release 11.2 F.
The following example changes the number of RTP header compression connections supported to 24:
interface serial 0 encapsulation ppp ip rtp header-compression ip rtp compression-connections 24
passive | (Optional) Compresses outgoing RTP packets only if incoming RTP packets on the same interface are compressed. |
Disabled
Interface configuration
This command first appeared in Cisco IOS Release 11.2 F.
If you use this command without the passive keyword, the software compresses all RTP traffic.
You can compress IP/UDP/RTP headers to reduce the size of your packets. This is especially useful for RTP, since RTP payload can be as small as 20 bytes, and the uncompressed header is 40 bytes.
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.
This feature can compress unicast or multicast RTP packets, and hence 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.
The following example enables RTP header compression on serial interface 0 and limits the number of RTP header compression connections to 10:
interface serial 0 encapsulation ppp ip rtp header-compression ip rtp compression-connections 10
clear ip rtp header-compression
ip rtp compression-connections
show ip rtp header-compression
To show Frame Relay's RTP header compression statistics, use the show frame-relay ip rtp header-compression EXEC command.
show frame-relay ip rtp header-compression [interface type number]
interface type number | (Optional) Interface type and number. |
EXEC
This command first appeared in Cisco IOS Release 11.2 F.
The following is sample output from the show frame-relay ip rtp header-compression command:
Router# show frame-relay ip rtp header-compression
DLCI 17 Link/Destination info: ip 165.3.3.2
Interface Serial0:
Rcvd: 0 total, 0 compressed, 0 errors
0 dropped, 0 buffer copies, 0 buffer failures
Sent: 6000 total, 5998 compressed,
227922 bytes saved, 251918 bytes sent
1.90 efficiency improvement factor
Connect: 16 rx slots, 16 tx slots, 2 long searches, 2 misses
99% hit ratio, five minute miss rate 0 misses/sec, 0 max
Table 63 describes the significant fields in the display.
| Field | Description |
|---|---|
Interface Serial0 | Type and number of interface. |
Rcvd: total | Number of packets received on the interface. |
compressed | Number of packets with compressed header. |
errors | Number of errors. |
dropped | Number of dropped packets. |
buffer copies | Number of buffers that had to be copied. |
buffer failures | Number of failures in allocating buffers. |
Sent: total | Total number of packets sent. |
compressed | Number of packets sent with compressed header. |
bytes saved | Total savings in bytes due to compression. |
bytes sent | Total bytes sent after compression. |
efficiency improvement factor | Compression efficiency. |
Connect: rx slots | Total number of receive slots. |
tx slots | Total number of transmit slots. |
long searches | Searches that needed more than one lookup. |
misses | Number of new states that were created. |
hit ratio | Number of times existing states were revised. |
five minute miss rate | Average miss rate. |
max | Maximum miss rate. |
frame-relay ip rtp header-compression
frame-relay map ip compress
frame-relay map ip rtp header-compression
show ip rtp header-compression
To show RTP header compression statistics, use the show ip rtp header-compression EXEC command.
show ip rtp header-compression [type number] [detail]
type number | (Optional) Interface type and number. |
detail | (Optional) Displays details of each connection. |
EXEC
This command first appeared in Cisco IOS Release 11.2 F.
The following is sample output from the show ip rtp header-compression command:
Router# show ip rtp header-compression RTP/UDP/IP header compression statistics: Interface Serial1: Rcvd: 0 total, 0 compressed, 0 errors 0 dropped, 0 buffer copies, 0 buffer failures Sent: 430 total 429 compressed, 15122 bytes saved, 139318 bytes sent 1.10 efficiency improvement factor Connect: 16 rx slots, 16 tx slots, 1 long searches, 1 misses 99% hit ratio, five minute miss rate 0 misses/sec, 0 max.
Table 64 describes the significant fields in the display.
| Field | Description |
|---|---|
Interface Serial1 | Type and number of interface. |
Rcvd: total | Number of packets received on the interface. |
compressed | Number of packets with compressed header. |
errors | Number of errors. |
dropped | Number of dropped packets. |
buffer copies, | Number of buffers that had to be copied. |
buffer failures | Number of failures in allocating buffers. |
Sent: total | Total number of packets sent. |
compressed | Number of packets sent with compressed header. |
bytes saved | Total savings in bytes due to compression. |
bytes sent | Total bytes sent after compression. |
efficiency improvement factor | Compression efficiency. |
Connect: rx slots | Total number of receive slots. |
tx slots | Total number of transmit slots. |
long searches | Searches that needed more than one lookup. |
misses | Number of new states that were created. |
hit ratio | Number of times existing states were revised. |
five minute miss rate | Average miss rate. |
max. | Maximum miss rate. |
This section describes the following debug commands related to RTP header compression:
Use the debug ip rtp header-compression EXEC command to display events specific to RTP header compression. Use the no form of this command to disable debugging output.
[no] debug ip rtp header-compressionFigure 56 shows sample debug ip rtp header-compression output.
Router# debug ip rtp header-compression RHC BRI0: rcv compressed rtp packet RHC BRI0: context0: expected sequence 0, received sequence 0 RHC BRI0: rcv compressed rtp packet RHC BRI0: context0: expected sequence 1, received sequence 1 RHC BRI0: rcv compressed rtp packet RHC BRI0: context0: expected sequence 2, received sequence 2 RHC BRI0: rcv compressed rtp packet RHC BRI0: context0: expected sequence 3, received sequence 3
Table 65 describes the significant fields in the sample output.
| Field | Description |
|---|---|
context 0 | Compression state for a connection 0. |
expected sequence | RTP header compression link sequence (expected). |
received sequence | RTP header compression link sequence (actually received). |
Use the debug ip rtp packets EXEC command to display a detailed dump of packets specific to RTP header compression. Use the no form of this command to disable debugging output.
[no] debug ip rtp packetsFigure 57 shows sample debug ip rtp packets output.
Router# debug ip rtp packets
RTP packet dump:
IP: source: 171.68.8.10, destination: 224.2.197.169, id: 0x249B, ttl: 9,
TOS: 0 prot: 17,
UDP: source port: 1034, destination port: 27404, checksum: 0xB429,len: 152
RTP: version: 2, padding: 0, extension: 0, marker: 0,
payload: 3, ssrc 2369713968,
sequence: 2468, timestamp: 85187180, csrc count: 0
Table 66 describes the significant fields in the sample output.
| Field | Description |
|---|---|
id | IP identification. |
ttl | IP time to live (TTL). |
len | Total UDP length. |
debug ip rtp header-compression
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Fri Jun 18 11:54:32 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.