For example, place the voice data of the UDP port number between 16 384 and 32 767 in the strict priority queue. The bandwidth reserved for the strict priority queue is 50 kbps.
R1 (config-if) # ip rtp priority 16384 16383 50 // apply directly on the Interface
Principle: (Real Time Protocol, RTP)
RTP priority queue is strictly used for voice data priority queues, and WFQ is used for other data. The RTP priority queue recognizes the voice data based on the port number. The voice data uses an even number.
The RTP priority queue has considered RTP Header Compression (including IP, UDP, and RTP), but does not include the overhead of L2 frames. Therefore, when allocating bandwidth to the RTP priority queue, you only need to use the bandwidth occupied by the standard voice stream. The second-layer overhead occupies 25% of the reserved bandwidth.
Comparison with LLQ:
LLQ cannot identify the even port number. It can only include one port number range. In this case, the control data is put into LLQ. If both the voice data and the control data are put into LLQ on the low-speed link, the speech quality may be reduced.
The RTP priority queue does not need to consider which port numbers are used for voice data. You can write the entire port number range. This is incomparable to LLQ.
Both RTP and LLQ can be applied to the same interface at the same time, but RTP takes precedence over LLQ.
Example:
R1 (config) # policy-map llqpolicy
R1 (config-pmap) # class voice
R1 (config-pmap-c) # priority 50
R1 (config) # int s2/2
R1 (config-if) # ip rtp priority 16384 2000 40 // apply RTP priority queue
R1 (config-if) # service-policy output llqpolicy // The application LLQ priority queue is placed at the exit of s2/2.
If the data packet matches the port defined by the class voice and ip rtp priority commands, the data can only get 40 kbps of bandwidth.
If only the data of class voice is matched, the bandwidth can be 50 kbps.