CCNP4v5.0

QOS
Lecture 3 - Encapsulating Voice Packets for Transport
© 2006 Cisco Systems, Inc. All rights reserved.
Voice Transport in Circuit-Switched Networks
 Analog phones connect to CO switches.
 CO switches convert between analog and digital.
 After call is set up, PSTN provides:
End-to-end dedicated circuit for this call (DS-0)
Synchronous transmission with fixed bandwidth and very low, constant delay
© 2006 Cisco Systems, Inc. All rights reserved.
Voice Transport in VoIP Networks
 Analog phones connect to voice gateways.
 Voice gateways convert between analog and digital.
 After call is set up, IP network provides:
Packet-by-packet delivery through the network
Shared bandwidth, higher and variable delays
© 2006 Cisco Systems, Inc. All rights reserved.
Jitter
 Voice packets enter the network at a constant rate.
 Voice packets may arrive at the destination at a
different rate or in the wrong order.
 Jitter occurs when packets arrive at varying rates.
 Since voice is dependent on timing and order, a
process must exist so that delays and queuing issues
can be fixed at the receiving end.
 The receiving router must:
Ensure steady delivery (delay)
Ensure that the packets are in the right order
© 2006 Cisco Systems, Inc. All rights reserved.
VoIP Protocol Issues
 IP does not guarantee reliability, flow control, error
detection or error correction.
 IP can use the help of transport layer protocols TCP or
UDP.
 TCP offers reliability, but voice doesn’t need it…do not
retransmit lost voice packets.
 TCP overhead for reliability consumes bandwidth.
 UDP does not offer reliability. But it also doesn’t offer
sequencing…voice packets need to be in the right
order.
 RTP, which is built on UDP, offers all of the functionality
required by voice packets.
© 2006 Cisco Systems, Inc. All rights reserved.
Protocols Used for VoIP
Feature
Voice
Needs
TCP
Reliability
No
Yes
Reordering
Yes
Timestamping
Yes
No
Overhead
As little as
possible
Contains
unnecessary
information
Multiplexing
Yes
© 2006 Cisco Systems, Inc. All rights reserved.
Yes
Yes


UDP
No

RTP
No

No
Yes

No
Yes

Low
Yes


Low

No
Voice Encapsulation
 Digitized voice is encapsulated into RTP, UDP, and IP.
 By default, 20 ms of voice is packetized into a single IP
packet.
© 2006 Cisco Systems, Inc. All rights reserved.
Voice Encapsulation Overhead
 Voice is sent in small packets at high packet rates.
 IP, UDP, and RTP header overheads are enormous:
For G.729, the headers are twice the size of the payload.
For G.711, the headers are one-quarter the size of the payload.
 Bandwidth is 24 kbps for G.729 and 80 kbps for G.711, ignoring
Layer 2 overhead.
© 2006 Cisco Systems, Inc. All rights reserved.
RTP Header Compression
 Compresses the IP, UDP, and RTP headers
 Is configured on a link-by-link basis
 Reduces the size of the headers substantially
(from 40 bytes to 2 or 4 bytes):
4 bytes if the UDP checksum is preserved
2 bytes if the UDP checksum is not sent
 Saves a considerable amount of bandwidth
© 2006 Cisco Systems, Inc. All rights reserved.
cRTP Operation
Condition
Action
The change is
predictable.
The sending side tracks the predicted
change.
The predicted change The sending side sends a hash of the
is tracked.
header.
The receiving side
predicts what the
constant change is.
The receiving side substitutes the original
stored header and calculates the
changed fields.
There is an
unexpected change.
The sending side sends the entire header
without compression.
© 2006 Cisco Systems, Inc. All rights reserved.
When to Use RTP Header Compression
 Use cRTP:
Only on slow links (less than 2 Mbps)
If bandwidth needs to be conserved
 Consider the disadvantages of cRTP:
Adds to processing overhead
Introduces additional delays
 Tune cRTP—set the number of sessions to be
compressed (default is 16).
© 2006 Cisco Systems, Inc. All rights reserved.
Factors Influencing Encapsulation Overhead
and Bandwidth
Factor
Description
Packet rate
– Derived from packetization period (the
period over which encoded voice bits are
collected for encapsulation)
Packetization size
(payload size)
– Depends on packetization period
IP overhead
(including UDP and RTP)
– Depends on the use of cRTP
Data-link overhead
– Depends on protocol
(different per link)
Tunneling overhead (if
used)
– Depends on protocol (IPsec, GRE, or
MPLS)
© 2006 Cisco Systems, Inc. All rights reserved.
– Depends on codec bandwidth
(bits per sample)
Bandwidth Implications of Codecs
 Codec bandwidth is for voice
information only.
Codec
Bandwidth
 No packetization overhead is
included.
G.711
64 kbps
G.726 r32
32 kbps
G.726 r24
24 kbps
G.726 r16
16 kbps
G.728
16 kbps
G.729
8 kbps
© 2006 Cisco Systems, Inc. All rights reserved.
How the Packetization Period Impacts VoIP
Packet Size and Rate
 High packetization period results in:
Larger IP packet size (adding to the payload)
Lower packet rate (reducing the IP overhead)
© 2006 Cisco Systems, Inc. All rights reserved.
VoIP Packet Size and Packet Rate Examples
Codec and
Packetization Period
G.711
20 ms
G.711
30 ms
G.729
20 ms
G.729
40 ms
Codec bandwidth
(kbps)
64
64
8
8
Packetization size
(bytes)
160
240
20
40
IP overhead
(bytes)
40
40
40
40
VoIP packet size
(bytes)
200
280
60
80
Packet rate
(pps)
50
33.33
50
25
© 2006 Cisco Systems, Inc. All rights reserved.
Data-Link Overhead Is Different per Link
Data-Link
Protocol
Ethernet
Frame
Relay
MLP
Ethernet Trunk
(802.1Q)
Overhead
[bytes]
18
6
6
22
© 2006 Cisco Systems, Inc. All rights reserved.
Security and Tunneling Overhead
 IP packets can be secured by IPsec.
 Additionally, IP packets or data-link frames can be
tunneled over a variety of protocols.
 Characteristics of IPsec and tunneling protocols are:
The original frame or packet is encapsulated into another
protocol.
The added headers result in larger packets and higher
bandwidth requirements.
The extra bandwidth can be extremely critical for voice packets
because of the transmission of small packets at a
high rate.
© 2006 Cisco Systems, Inc. All rights reserved.
Extra Headers in Security and Tunneling
Protocols
Protocol
Header Size (bytes)
IPsec transport mode
30–53
IPsec tunnel mode
50–73
L2TP/GRE
24
MPLS
4
PPPoE
8
© 2006 Cisco Systems, Inc. All rights reserved.
Example: VoIP over IPsec VPN
 G.729 codec (8 kbps)
 20-ms packetization period
 No cRTP
 IPsec ESP with 3DES and SHA-1, tunnel mode
© 2006 Cisco Systems, Inc. All rights reserved.
Total Bandwidth Required for a VoIP Call
 Total bandwidth of a VoIP call, as seen on the link, is important for:
Designing the capacity of the physical link
Deploying Call Admission Control (CAC)
Deploying QoS
© 2006 Cisco Systems, Inc. All rights reserved.
Total Bandwidth Calculation Procedure
 Gather required packetization information:
Packetization period (default is 20 ms) or size
Codec bandwidth
 Gather required information about the link:
cRTP enabled
Type of data-link protocol
IPsec or any tunneling protocols used
 Calculate the packetization size or period.
 Sum up packetization size and all headers and trailers.
 Calculate the packet rate.
 Calculate the total bandwidth.
© 2006 Cisco Systems, Inc. All rights reserved.
Bandwidth Calculation Example
© 2006 Cisco Systems, Inc. All rights reserved.
Quick Bandwidth Calculation
Total packet size
—————————
Total bandwidth requirement
=
Payload size
————————————————
Nominal bandwidth requirement
Total packet size = All headers + payload
Parameter
Value
Layer 2 header
6 to 18 bytes
IP + UDP + RTP headers
40 bytes
Payload size (20-ms sample interval)
20 bytes for G.729, 160 bytes for G.711
Nominal bandwidth
8 kbps for G.729, 64 kbps for G.711
Example: G.729 with Frame Relay:
Total bandwidth requirement =
(6 + 40 + 20 bytes) * 8 kbps
—————————————
20 bytes
© 2006 Cisco Systems, Inc. All rights reserved.
= 26.4 kbps
VAD Characteristics
 Detects silence (speech pauses)
 Suppresses transmission of “silence patterns”
 Depends on multiple factors:
Type of audio (for example, speech or MoH)
Level of background noise
Other factors (for example, language, character of speaker, or
type of call)
 Can save up to 35 percent of bandwidth
© 2006 Cisco Systems, Inc. All rights reserved.
VAD Bandwidth-Reduction Examples
Data-Link
Overhead
Ethernet
Frame Relay Frame Relay MLPP
18 bytes
6 bytes
6 bytes
6 bytes
IP overhead
no cRTP
cRTP
no cRTP
cRTP
40 bytes
4 bytes
40 bytes
2 bytes
G.711
G.711
G.729
G.729
64 kbps
64 kbps
8 kbps
8 kbps
20 ms
30 ms
20 ms
40 ms
160 bytes
240 bytes
20 bytes
40 bytes
Bandwidth
without VAD
87.2 kbps
66.67 kbps
26.4 kbps
9.6 kbps
Bandwidth with
VAD (35%
reduction)
56.68 kbps
43.33 kbps
17.16 kbps
6.24 kbps
Codec
Packetization
© 2006 Cisco Systems, Inc. All rights reserved.
Enterprise Voice Implementations
 Components of enterprise voice networks:
Gateways and gatekeepers
Cisco Unified CallManager and IP phones
© 2006 Cisco Systems, Inc. All rights reserved.
Deploying CAC
 CAC artificially limits the number of concurrent voice calls.
 CAC prevents oversubscription of WAN resources caused by too much voice traffic.
 CAC is needed because QoS cannot solve the problem of voice call
oversubscription:
QoS gives priority only to certain packet types (RTP versus data).
QoS cannot block the setup of too many voice calls.
Too much voice traffic results in delayed voice packets.
© 2006 Cisco Systems, Inc. All rights reserved.
Example: CAC Deployment
 IP network (WAN) is only designed for two concurrent voice calls.
 If CAC is not deployed, a third call can be set up, causing poor
quality for all calls.
 When CAC is deployed, the third call is blocked.
© 2006 Cisco Systems, Inc. All rights reserved.
Voice Gateway Functions on a Cisco Router
 Connects traditional telephony devices to VoIP
 Converts analog signals to digital format
 Encapsulates voice into IP packets
 Performs voice compression
 Provides DSP resources for conferencing and
transcoding
 Supports fallback scenarios for IP phones (Cisco
SRST)
 Acts as a call agent for IP phones (Cisco Unified
CallManager Express)
 Provides DTMF relay and fax and modem support
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco Unified CallManager Functions
Call processing
Dial plan administration
Signaling and device control
Phone feature administration
Directory and XML services
Programming interface to external applications
© 2006 Cisco Systems, Inc. All rights reserved.
Cisco IP Communicator
Example: Signaling and Call Processing
© 2006 Cisco Systems, Inc. All rights reserved.
Enterprise IP Telephony Deployment Models
Deployment Model
Single site
Characteristics
– Cisco Unified CallManager cluster at the single site
– Local IP phones only
Multisite with centralized
call processing
– Cisco Unified CallManager cluster only at a single
site
– Local and remote IP phones
Multisite with distributed call
processing
– Cisco Unified CallManager clusters at multiple sites
Clustering over WAN
– Single Cisco Unified CallManager cluster distributed
over multiple sites
– Local IP phones only
– Usually local IP phones only
– Requirement: Round-trip delay between any pair of
servers not to exceed 40 ms
© 2006 Cisco Systems, Inc. All rights reserved.
Single Site
 Cisco Unified CallManager
servers, applications, and DSP
resources are located at the
same physical location.
 IP WAN is not used for voice.
 PSTN is used for all external
calls.
Note: Cisco Unified
CallManager cluster can be
connected to various places
depending on the topology.
© 2006 Cisco Systems, Inc. All rights reserved.
Multisite with Centralized Call Processing
 Cisco Unified CallManager servers and applications are located at the central site
while DSP resources are distributed.
 IP WAN carries data and voice (signaling for all calls, media only for intersite calls).
 PSTN access is provided at all sites.
 CAC is used to limit the number of VoIP calls, and AAR is used if WAN bandwidth
is exceeded.
 Cisco SRST is located at the remote branch.
Note: Cisco Unified CallManager cluster can be connected to various places depending on
the topology.
© 2006 Cisco Systems, Inc. All rights reserved.
Multisite with Distributed Call Processing
 Cisco Unified CallManager servers, applications, and DSP resources are located at
each site.
 IP WAN carries data and voice for intersite calls only (signaling and media).
 PSTN access is provided at all sites; rerouting to PSTN is configured if IP WAN is
down.
 CAC is used to limit the number of VoIP calls, and AAR is used if WAN bandwidth
is exceeded.
Note: Cisco Unified CallManager cluster can be connected to various places, depending on
the topology.
© 2006 Cisco Systems, Inc. All rights reserved.
Clustering over WAN
 Cisco Unified CallManager servers of a single cluster are distributed among multiple sites while
applications and DSP resources are located at each site.
 Intracluster communication (such as database synchronization) is performed over
the WAN.
 IP WAN carries data and voice for intersite calls only (signaling and media).
 PSTN access is provided at all sites; rerouting to PSTN is performed if IP WAN is down.
 CAC is used to limit the number of VoIP calls; AAR is used if WAN bandwidth is exceeded.
Note: Cisco Unified CallManager cluster can be connected to various places, depending on the topology.
© 2006 Cisco Systems, Inc. All rights reserved.
Basic Cisco IOS VoIP Voice Commands
© 2006 Cisco Systems, Inc. All rights reserved.
Voice-Specific Commands
router(config)#
dial-peer voice tag type
 Use the dial-peer voice command to enter the dial peer subconfiguration mode.
router(config-dial-peer)#
destination-pattern telephone_number
 The destination-pattern command, entered in dial peer subconfiguration mode,
defines the telephone number that applies to the dial peer.
© 2006 Cisco Systems, Inc. All rights reserved.
Voice-Specific Commands (Cont.)
router(config-dial-peer)#
port port-number
 The port command, entered in POTS dial peer subconfiguration mode, defines the
port number that applies to the dial peer. Calls that are routed using this dial peer are
sent to the specified port.
router(config-dial-peer)#
session target ipv4:ip-address
 The session target command, entered in VoIP dial peer subconfiguration mode,
defines the IP address of the target VoIP device that applies to the dial peer.
© 2006 Cisco Systems, Inc. All rights reserved.