Download Voice

Document related concepts

Cracking of wireless networks wikipedia , lookup

CAN bus wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

I²C wikipedia , lookup

Deep packet inspection wikipedia , lookup

Project 25 wikipedia , lookup

IEEE 1355 wikipedia , lookup

Quality of service wikipedia , lookup

Real-Time Messaging Protocol wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
Paketový přenos hlasu
Jaroslav Martan
Cisco Systems
[email protected]
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
1
Obsah
• Výhody paketového přenosu hlasu
• Kódování a komprese
• Voice over Frame Relay
• Voice over ATM
• Voice over IP
• Problémy paketového přenosu
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
2
Data Is Overtaking Voice
Evolution from TDM-based
transport to packets/cells
or a combination
Relative
Load
Data Is 23x
Voice Traffic
30
25
20
Data
15
10
Data Is 5x
Voice Traffic
5
0
1990
Voice
1995
2000
2005
Year
Source: Electronicast
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
3
TDM Transport Efficiency
Types of Traffic
Utilization
Voice
PBX
Wasted Bandwidth
Legacy
50–60%
LAN
Video
Single WAN Link
Time Slot Assignments
• Wasted bandwidth
• No congestion
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
4
Packet Transport Efficiency
Types of Traffic
Voice
Utilization
Legacy
90–95%
LAN
Video
PBX
Q
U
E
U
E
Cells/Frames/Packets
Individual Packets
• High bandwidth efficiency
• Congestion management
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
5
Voice Network Transport
• Voice Network Transport is
typically TDM circuit-based:
T1/E1
DS3/E3
SONET (OC-3, OC-12, etc.)
• But can also be packet-based:
ATM
Frame Relay
IP
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
6
Planning and Implementation
• Today
Tie-line replacement
Toll-bypass
Off Premise Extension (OPX)
Router key system replacement
Small office IP phone system (< 100 users)
• Tomorrow
Virtual call centers
Campus IP phone system (> 1000 users)
Enhanced integrated data/voice applications
Unified messaging
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
7
Voice Transport Mechanisms
Layer 3—VoIP
Layer 2—VoFR, VoATM
• Operates in heterogeneous
network (ubiquitous)
• Requires rigid homogenous
network or L2 gateways
• Connectionless (requires
sequence numbers)
• Connection oriented
(frames arrive in order)
• “Soft” QoS
• “Hard” QoS
• Layer 2 and 3 overhead
• Layer 2 overhead
• Standards-based H.323
(MGCP coming)
• Standards based
(FRF.11/12, ATM AAL1/2/5)
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
8
Obsah
• Výhody paketového přenosu hlasu
• Kódování a komprese
• Voice over Frame Relay
• Voice over ATM
• Voice over IP
• Problémy paketového přenosu
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
9
Voice Compression
• Objective: reduce bandwidth consumption
Compression algorithms are optimized for voice
Unlike data compression: these are “loose”
• Drawbacks/tradeoffs
Quantization distortion
Tandem switching degradation
Delay (echo)
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
10
Voice Compression Technologies
Unacceptable
Business
Quality
Toll
Quality
*
64
PCM (G.711)
(Cellular)
Bandwidth
(Kbps)
*
32
ADPCM 32 (G.726)
*
24
16
ADPCM 24 (G.726)
*
*
ADPCM 16 (G.726) LDCELP 16 (G.728)
8
0
*
* LPC 4.8
CS-ACELP 8 (G.729)
Quality
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
11
Speech-Coding Schemes
• Waveform coders
Non-linear approximation
of the actual waveform
Examples: PCM, ADPCM
• Vocoders
Synthesized voice
Example: LPC
• Hybrid coders
Linear waveform approximation
with synthesized voice
Example: CELP
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
12
Digitizing Voice: PCM
Waveform Encoding Review
• Nyquist Theorem: sample at twice the
highest frequency
Voice frequency range: 200-3400 Hz
Sampling frequency = 8000/sec (every 125µs)
Bit rate: (2 x 4 kHz) x 8 bits per sample
= 64,000 bits per second (DS-0)
• By far the most commonly used method
CODEC
PCM
= DS-0
64 Kbps
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
13
Voice Compression—CELP
• Code excited linear predictive
• Very high voice quality at low-bit rates,
processor intensive, use of DSPs
• G.728: LD-CELP—16 Kbps
• G.729: CSA-CELP—8 Kbps
G.729a variant— “stripped down” 8 kbps
(with a noticeable quality difference)
to reduce processing load, allows two
voice channels encoded per DSP
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
14
Voice CODECs: Hybrid Coders
PCM Encoder
Filtering
111001001001011
Sampling
Sample
Quantizing
Frames
PCM
Decoder
Encoding
VocalCords
Throat
Nose
Mouth
Human
Speech
Model
401
0985_05f9_c1
Model
Parameters
Analysis
© 1999, Cisco Systems, Inc.
10110010
Parameters
Model
Parameters
Synthesis
15
Digital Speech Interpolation (DSI)
• Voice Activity Detection (VAD)
• Removal of voice silence
• Examines voice for power, change of
power, frequency and change of frequency
• All factors must indicate voice “fits into
the window” before cells are constructed
• Automatically disabled for fax/modem
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
16
Voice Activity Detection
- 31 dbm
B/W Saved
Voice
Activity
(Power
Level)
Hang Timer
No Voice
Traffic Sent
SID
SID Buffer
- 54 dbm
Pink Noise
Voice “Spurt”
Silence
Voice “Spurt”
Time
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
17
Bandwidth Requirements
Voice Band Traffic
Encoding/
Compression
G.711 PCM
A-Law/µ-Law
64 kbps (DS0)
G.726 ADPCM
16, 24, 32, 40 kbps
G.729 CS-ACELP
8 kbps
G.728 LD-CELP
16 kbps
G.723.1 CELP
401
0985_05f9_c1
Result
Bit Rate
© 1999, Cisco Systems, Inc.
6.3/5.3 kbps
Variable
18
Voice CODEC Cheat Sheet
Mean
Native
Encoding
Voice
Opinion Bit Rate
Compression
Quality
Score
Kbps
BW
Dual
DTMF
CPU
Comp
Music
on
Hold
G.711
PCM
4.1
64
A
D
A
A
A
A
G.726
ADPCM
3.85
32
B
C
B
B
B
B
G.728
LD-CELP
3.61
16
C
B
B
C
C
C
G.729
CS-ACELP
3.92
8
A
A
B
B
C
C
G.729a
CS-ACELP
3.7
8
B
A
C
C
B
D
G.723.1
ACELP
3.65
5.3
C
A
C
D
C
D
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
19
Obsah
• Výhody paketového přenosu hlasu
• Kódování a komprese
• Voice over Frame Relay
• Voice over ATM
• Voice over IP
• Problémy paketového přenosu
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
20
Packet Efficiency
Frame/Packet
OH
Payload
OH
4 Bytes
1488 Bytes
4 Bytes
Payload = 1488
OH
Cell 5 Bytes
Overhead = 8
Efficiency = 99.5%
Payload
48 Bytes
Payload = 48
Overhead = 5
Efficiency = 89.6%
• Small vs large packet sizes
• Fixed vs variable sized packets
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
21
VoFR Multiplexing Model
VoFR Service User
Data User
Data User
FRF.3.1
Multiprotocol
Encapsulation
FRF.3.1
Multiprotocol
Encapsulation
Frame Relay
Data Link Connection
17
Frame Relay
Data Link Connection
N
VoFR Service
SubChannel
1
(Voice)
SubChannel
2
(Voice)
SubChannel
3
(Data)
SubChannel
N
Voice/Data
Sub-Channel
Multiplexing
Frame Relay
Data Link Connection
16
Frame Relay Physical Interface
Source: Frame Relay Forum
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
22
FRF.11 Concept
• Extension of frame relay application
support for compressed voice
• Multiplexing of up to 255
sub-channels
• Support of multiple payloads
• Support of data sub-channel
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
23
FRF.11 Frame Format
FLAG
Frame Relay Header
FRF.11 Sub-Frame Header
Payload
FCS
FLAG
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
24
Voice and Data Encapsulation
Frame Relay
Frame
Sub Frame
Sub Frame
Sub Frame
Sub Frame
• Multi frames transport
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
25
Multiple Sub-Channel Payloads
in an FRF.11 Frame
Voice Payload
1
Voice Payload
Voice Payload
2
Sub-Frame 1
DLCI
Voice Payload
Voice Payload
Sub-Frame 2
Information Field
Frame
3
Data Payload
Voice Payload
Sub-Frame 3
CRC
4
Data Payload
Sub-Frame 1
DLCI
Information Field
CRC
Frame
Source: Frame Relay Forum
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
26
VoFR Services
VoFR Service User
Voice
Data
FAX
Faults Dialed FAX
Digits
Primary Payloads
Bits
(CAS
Signaling)
Silence
Information
Signaled Payloads
VoFR Service
Service Data Units
Frame Relay Service
Source:
Frame Relay Forum
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
www.cisco.com
27
Voice Payload Options
10 ms of voice
10 ms of voice
Small Payload
Low Delay
High Overhead
High PPS
High CPU Load
Original Voice Information
10 ms of voice
crc
10 ms of voice
3 Small Frames
crc
hdr
10 ms of voice
hdr
crc 10 ms of voice
hdr
Large Payload
High Delay
Low Overhead
Low PPS
Low CPU Load
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
crc
10 ms of voice
10 ms of voice
10 ms of voice
hdr
1 Large Frame
28
Network Design Options
Full Mesh of PVCs
Voice PVCs Go to
One Central Site
Site D
Site C
Site D
Site C
Site A
Site B
Site A
Site B
• Separate voice and data PVCs—Maximizes quality of service
• Combine voice and data on one PVC—Minimizes recurring costs
• Or use some combination
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
29
Data/Voice Over Frame Relay
VoFR Service User
Data User
Data User
FRF.3.1
Multiprotocol
Encapsulation
FRF.3.1
Multiprotocol
Encapsulation
Frame Relay
Data Link Connection
17
Frame Relay
Data Link Connection
N
VoFR Service
3600
2600
V
7200
Frame Relay
Carrier Network
V
SubChannel
1
(Voice)
7200
PVC
Carrying
Voice
7200
Central
Site
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
2500
Branch
Sites
3600
V
Frame Relay Physical Interface
High-Speed Access Port
at Central Sites (T1/E1)
Frame Relay
PVC (<64K CIR)
2500
SubChannel
N
Frame Relay
Data Link Connection
16
FRF.11/12
Frame Relay PVC
2600
V
SubChannel
3
(Data)
Voice/Data
Sub-Channel
Multiplexing
3600
V
SubChannel
2
(Voice)
2500
Low-Speed Access Port
at Branch Sites (64Kbps CIR)
30
Calculating VoFR Bandwidth
• Assumptions
• G.729 Codec at 8Kbps
• 50 PPS (using 2–10ms samples)
• 2 bytes of DLCI header
• 2 bytes of FRF.11 header
• 1 byte of sequence number
• 2 byte CRC
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
31
Calculating VoFR Bandwidth
• Voice payload calculation
20 Msec voice sample * 8 Kbps (for G.729)/
8 bits/byte = 20 bytes
Note: to derive the payload for G.711, substitute 64 kbps
= 160 bytes
• Packet size calculations
20 byte payload + 7 byte Header = 27 bytes
(Header = DLCI/FRF.11/seqn/CRC)
• Bandwidth calculations
27 b/voice packet * 8 bits/byte * 50 pps = 10.8 Kbps
per call
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
32
CIR Critical Factors
• PVC design
Full mesh vs star
Shared vs separate PVCs for voice and data
• Potential concurrent calls
Bandwidth per call
Switched through calls
• Pre-existing data environment
Utilization prior to adding voice
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
33
VoFR Summary
• FRF.11 standards-based voice
and function syntax
• FRF.12 standards-based
fragmentation for data, mitigates
delay and delay variation
• Proper PVC design for
network requirements
• Balance voice quality, delay,
bandwidth, CIR
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
34
References
• [1] FRF.3.1, R. Cherukuri (ed), Multiprotocol Encapsulation
Implementation Agreement, June 22–1995
• [2] FRF.9, D. Cantwell (ed), Data Compression Over Frame
Relay Implementation Agreement, January 22–1996
• [3] FRF.11.1 K. Rehbehn, R. Kocen, T. Hatala (eds),
Voice Over Frame Relay Implementation Agreement,
December 1998
• [4] FRF.12, A. Malis (ed), Frame Relay Fragmentation
Implementation Agreement, 1997
• [5] ITU Recommendation Q.922, ISDN Data Link Layer
Specification for Frame Mode Bearer Services, 1992
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
35
Web Sites
• Cisco
http://www.cisco.com—search on VoFR
• Frame Relay Forum
http://www.frforum.com/
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
36
Obsah
• Výhody paketového přenosu hlasu
• Kódování a komprese
• Voice over Frame Relay
• Voice over ATM
• Voice over IP
• Problémy paketového přenosu
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
37
Characteristics of ATM
Voice
Data
Video
Cells
• Uses small—fixed-sized cells
• Connection-oriented
• Supports multiple service types
• Applicable to LAN and WAN
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
38
ATM Cell
48 Byte
Payload
53 Bytes
ATM
Adaptation Layer
(AAL)
ATM Layer
5 Byte Header
Physical Layer
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
39
AAL Cell Tax
AAL-1 Cell Tax
AAL-2 Cell Tax
5 Byte
Header
5 Byte
Header
1 Byte
47 Byte
Payload
1–47 Byte
Payload
AAL-3/4 Cell Tax
AAL-5 Cell Tax
5 Byte
Header
5 Byte
Header
44 Byte
Payload
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
4 Bytes
1–48
Bytes
No Tax
48 Byte
Payload
40
CES Reference Model
CBR Service
Interface
ATM Network
PBX
PBX
CBR Equipment
CBR Equipment
ATM Access Interface
ATM CES
Interworking
Function
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
ATM CES
Interworking
Function
41
Structured vs Unstructured CES
Structured
Unstructured
Nx64
DS1
ATM Network
DS1
Nx64
• Intended to emulate pointto-point fractional DS1 or
E1 circuit
• Allows Nx64 Kbps independent
emulated circuits to share
one DS1
• Can be configured to minimize
ATM bandwidth
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
DS1
ATM Network
DS1
• Intended to emulate
point-to-point DS1 or E1 circuit
• Allows one 1.54 or 2.04 Mbps
emulated circuit per DS1
• Can be used with equipment
with non-standard framing
• Allows simple configuration
of service
42
Data/Voice Over ATM (AAL5)
V
Public ATM Network
V
V
Central Site
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
43
ATM AAL5 Voice and Data Cells
Data
Data
Voice
PKT
V
PBX
Voice
•
•
•
•
401
0985_05f9_c1
Data
PKT
Voice
PKT
Data
PKT
V
PBX
Voice
AAL 5 does not require convergence sub-layer
48 Byte payload available for voice/data
Voice payload = voice sample + padding = 48 bytes
5 byte ATM header
© 1999, Cisco Systems, Inc.
44
ATM AAL5 Voice Cells
53 Bytes
28 Byte
Padding
20 Byte Voice
Payload
ATM Layer
5 Byte Header
48 Bytes
• G.729 compression with 20 ms voice sample
• No AAL5 CS “cell tax”
• 28 Bytes “overhead” due to padding
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
45
VoATM Bandwidth
• Voice payload calculation
20 msec voice sample * 8 Kbps (for G.729)/8 bits/byte = 20 bytes
Note: to derive the payload for G.711, substitute 64 Kbps =
160 bytes
• Packet size calculations
20 byte payload + 28 byte pad +5 byte header = 53 bytes
• Bandwidth calculations
53 b/voice packet * 8 bits/byte * 50 pps = 21.2 Kbps per call
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
46
Frame Relay/ATM Interworking
Regional Office
Headquarters
256k
Cisco Frame Relay
MC3810
T1/E1
ATM
Cisco
MC3810
Service
Provider
T1/E1
Digital
PBX
PSTN
ISP
• Network interworking
FRF.5
Frame Relay encapsulation
• Service interworking compatible
FRF.8
Carrier compatible
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
47
VoATM—Summary
• ATM reference model
• Fixed size cells—Delay
• Service category—CBR, VBR, ABR
• Service criteria for QoS, SCR, CDVT
• Chose service for requirements—
Circuit emulation (AAL1) voice
over AAL5
• Combined networks
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
48
Web Sites
• Cisco
http://www.cisco.com
• ATM Forum
http://www.atmforum.com/
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
49
Obsah
• Výhody paketového přenosu hlasu
• Kódování a komprese
• Voice over Frame Relay
• Voice over ATM
• Voice over IP
• Problémy paketového přenosu
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
50
IP Ubiquity
H.323 Endpoint A
Voice
Token
Ring
Token
Ring
R1
ATM or
Frame Relay
FR or
ATM
R2
Ethernet
802.3
e
H.323 Endpoint B
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
IP
UDP RTP Voice
Packet
IP
UDP RTP Voice
Frame
IP
UDP RTP Voice
IP
UDP RTP Voice
IP
UDP RTP Voice
IP
UDP RTP Voice
IP
UDP RTP Voice
Voice
51
H.323—Multimedia Standard
for IP Networks
• The H.323 standard provides a foundation for audio,
video, and data communications across IP-based
networks, including the Internet
• Original standard approved in 1996 and H.323 V2 was
approved January 1998
• H.323 is an umbrella recommendation from the
International Telecommunications Union (ITU) that
sets standards for multimedia communications over
Local Area Networks (LANs) that do not provide a
guaranteed Quality of Service (QoS)
• H.323 is H.320 Recast for IP LAN
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
52
VoIP Uses ITU H.323
System
Control and
User Interface
Video
I/O
Equipment
Audio
I/O
Equipment
Video Codec
H.261, H263
Audio Codec
G.711, G.722,
G.723, G.723.1,
G.728, G.729
User Data
Applications
T.120
System Control
H.245
Control
Call Control
H.225.0
RAS Control
H.225.0
Session
Layer
and Above
Receive Path
Delay
H.225.0 Layer
LAN Stack
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
53
H.323 VoIP Layers
IP Layered Model
H.323 VoIP Model
User
Caller
Application
Presentation
Session
TCP
401
0985_05f9_c1
Email ID
E.164 Phone No.
Audio Codec
(G.711, G.729, G.723.1,..)
H.225, H.245, RTP, RTCP
UDP
UDP
Port Number
IP
IP Address
Data Link
Frame Relay DLCI,
802.3 MAC, ATM VPI/VCI
Physical
V.35, T1, T3
© 1999, Cisco Systems, Inc.
54
H.323—System Components
• H.323 defines four major
components for a network-based
communications system
Terminals
Gateways
Gatekeepers
Multipoint Control Units
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
55
H.323—System Components
H.323
MCU
H.323
Terminal
H.323
Terminal
Scope
of H.323
WAN
RSVP
H.323
Gatekeeper
H.323
Terminal
H.323
Gateway
PSTN
V.70
Terminal
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
H.324
Terminal
ISDN
Speech
Terminal
H.320
Terminal
Speech
Terminal
56
H.323 Generic Call Flow
TCP Connection
SETUP
H.323
CONNECT (H245 Address)
Q.931
TCP Connection
H.245 Messages
Open Logical Channels
(RTCP Address)
H.245
(RTCP and RTP Addresses)
(RTCP Address)
(RTCP and RTP
Addresses)
RTP Stream
RTP Stream
RTCP Stream
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
Media
57
RTP/RTCP—RFCs 1889/1890
• End-to-end network transport function
Payload type identification—voice, video, compression type
Sequence numbering
Time stamping
Delivery monitoring
• RTCP (Real-Time Control Protocol)
4 Bytes
V
E
R
CC
M
Payload
Type
Sequence Number
4 Bytes
RTP Timestamp
4 Bytes
Synchronization Source (SSRC) ID
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
58
H.323 Gateway
G.711 PCM
G.726 ADPCM
G.728 LD-CELP
G.729 CS-ACELP
G.729A CS-ACELP
G.723.1 ACELP
QoS IP
Network
G.711 PCM
Analog
L2 IP UDPRTP Voice
Gateway
Frame Relay
ATM
Ethernet
FDDI
Token Ring
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
PSTN
FXO
FXS
E&M
T1
PRI
59
Gatekeeper Functions
• Mandatory services:
Address translation
Admissions control
Bandwidth control
Zone management
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
• Optional services:
Call control signaling
Call authorization
Bandwidth
management and
reservation
Call management
Gatekeeper
management
information data
structure
Directory services
60
H.323—H.323 Direct Call Model
Services Plane
IN Service Logic
AAA,
Address Resolution
Service
Logic
OSS
Call Control Plane
Signaling and Call Control
Service Access Function
Switch-Based Service Logic
End to End Voice
Services
Call
Logic
Connection Plane
Connection Negotiation
Transcoding
Bearer Switching
Media Control: H.323
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
Switching
Logic
Billing
Net. Mgt.
Fault Mgt
Service
Provisioning
Cust.
Provisioning
H.323
61
H.323—Gatekeeper Routed
Call Model
Services Plane
Service
Logic
IN Service Logic
AAA, Directory Service
Address Resolution
IN/AIN—CTI APIs
Call Control Plane
Signaling and Call Control
Service Access Function
Switch-Based Service Logic
End to End Voice
Services
Call
Logic
OSS
GK to GK
Gatekeeper Protocol
Billing
Net. Mgt.
Fault Mgt.
Service
Provisioning
Cust.
Provisioning
Gatekeeper
H.225
H.245
RAS
RAS
Connection Plane
Connection Negotiation
Transcoding
Bearer Switching
Media Control: H.225, H.245
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
Switching
Logic
62
Gatekeeper Mandatory Services
• Address Translation
Translates H.323 aliases or E.164 addresses into IP
transport addresses (e.g. 10.1.1.1 port 1720)
• Admissions Control
Authorizes access to the H.323 network
• Bandwidth Control
Manages endpoint bandwidth requirements
• Zone Management
Provides the above functions to all terminals, gateways,
and MCUs that register to it
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
63
RAS Messages
• GRQ/GCF/GRJ (Discovery)
Unicast—Multicast, find a gatekeeper
• RRQ/RCF/RRJ (Registration)
Endpoint alias/IP address binding, endpoint
authentication
• ARQ/ACF/ARJ (Admission)
Destination Address Resolution, Call Routing
• LRQ/LCF/LRJ (Location)
Inter-gatekeeper communication
• DRQ/DCF/DRJ (Disconnect)
Get rid of call state
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
64
H.323 Message Exchange
Gatekeeper A
LRQ
Gatekeeper B
LCF
ACF
ACF
IP Network
ARQ
V
Gateway A
Phone A
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
H.225 (Q.931) Setup
H.225 (Q.931) Connect
H.245
RTP
ARQ
V
Gateway B
Phone B
65
LRQ Forwarding in Action
Directory-Gatekeeper
Directory-Gatekeeper
GK
LRQ
GK
LRQ
GK
LRQ
IP Network
LCF
GK
ACF
ARQ
V
Gateway A
ARQ
ACF
H.225 (Q.931) Setup
H.225 (Q.931) Connect
H.245
RTP
V
Gateway B Phone B
Phone A
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
66
H.323 Resources
• H.323 Standards
ftp://itu-t:[email protected]/
• VoIP Forum
ftp://ftp.imtc-files.org/imtc-site/VoIPAG/Incoming
• General Information
http://www.pulver.com
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
67
Intelligent Endpoints—SIP
SIP Goals
• To supports some or all of five facets
of establishing and terminating
multimedia communications:
User location
User capabilities
User availability
Call setup
Call handling
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
68
SIP Architectural Elements
• Clients
• Servers
Proxy
Redirect
User agent
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
69
SIP Call Flow—Proxy
cs.columbia.edu
?
4 Location Server
INVITEhgs@play
From: [email protected]
To: [email protected]
Call-ID: [email protected]
[email protected]
8 200 OK
2
Hgs@play
cs.tu-berlin.de
From: [email protected]
To: [email protected]
Call-ID: [email protected]
herring
1 [email protected]
3
6 200 OK
From: [email protected]
To: [email protected]
Call-ID: [email protected]
CONNNECTEDhgs@play
From: [email protected]
To: [email protected]
Call-ID: [email protected]
From: [email protected]
To: [email protected]
Call-ID: [email protected]
Lion
9 CONNECTEDherring@cs
columbia.edu
Call-ID: [email protected]
12 200 OK
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
7
Tune
Play
hgs
10
11 200 OK
70
SIP Call Flow—Redirect
cs.columbia.edu
?
[email protected]
4 302 Moved Temporarily
Location: [email protected]
From: [email protected]
To: [email protected]
Call-ID: [email protected]
2
Location Server
Hgs@play
cs.tu-berlin.de
From: [email protected]
To: [email protected]
Call-ID: [email protected]
herring
1 [email protected]
3
5 INVITEhgs@play
Lion
From: [email protected]
To: [email protected]
Call-ID: [email protected]
Tune
7 200 OK
6
From: [email protected]
To: [email protected]
Call-ID: [email protected]
8 [email protected]
Call-ID: [email protected]
Play
hgs
9 200 OK
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
71
SIP Resources
• SIP standard
ftp://ftp.ietf.org/internet-drafts/draft-ietfmmusic-sip-04.txt
• General SIP information
http://www.cs.columbia.edu/~hgs/sip/
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
72
SIP vs. H.323 Comparison
• Scope
SIP—Full-featured multimedia protocol
H.323—Full-featured video conferencing
• Status
SIP—Basic SIP ready for proposed standard
H.323—V3 in ITU approval cycle
• Interoperability
SIP—Initial bake-off, some interoperability
achieved
H.323—Demonstrated, but problematic
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
73
SIP vs. H.323 Comparison
• Call setup overhead
SIP—as little as one round trip
H.323—7 or 8 round-trips (2 in V2)
• Call control functions
SIP—Relies on existing protocols
H.323—Based on GK functions
• Control transport
SIP—UDP (multicast, firewalls)
401
0985_05f9_c1
H.323—TCP
© 1999, Cisco Systems, Inc.
74
Repeat: Voice Is Not A Network
• Voice is an Application
• Complete understanding of Voice
Application fundamentals helps us to
design and build better Networks
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
75
Packet Telephony
Architecture Choices
• Intelligent Network/Simple Endpoints
SS7, Gateway Control Protocol (SGCP/MGCP)
• Simple Network/Intelligent Endpoints
Session Initiation Protocol (SIP)
• Hybrid—Intelligent Network and Endpoints
H.323
• Layer 2 Access Networks Voice Carriage
VoFR (FRF11), VoATM
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
76
Obsah
• Výhody paketového přenosu hlasu
• Kódování a komprese
• Voice over Frame Relay
• Voice over ATM
• Voice over IP
• Problémy paketového přenosu
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
77
Data and Voice
Opposite Needs/Behavior
Data
Voice
• Bursty
• Smooth
• Greedy
• Benign
• Drop sensitive
• Drop insensitive
• Delay insensitive
• Delay sensitive
• TCP retransmits
• UDP best effort
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
78
TDM vs Frame vs Cell
TDM
Frame/Packet
Cell
• TDM—Constant delay, wasted bandwidth
• Frame/packet—Variable delay, highly efficient
• Cell—Improved delay, less efficient
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
79
Qos Terminology
Queuing / Scheduling
Policing
•
•
•
•
Limiting the packet rate
No buffering
Input and output mechanism
Drop policies for traffic that exceeds
rate
tail drop, RED, WRED
• CAR, Queue tail-drop
Traffic Shaping
•
•
•
•
Limiting the packet rate
Buffering to smooth traffic flow
Output mechanism
GTS, FRTS, ATM shaping
Call Admission Control
•
Disallow new traffic if insufficient
resources available
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
•
•
•
•
Queuing: Organize packets waiting to
go out on an interface
Scheduling: When interface is free decide which of the waiting packets
to send next
Nodal significance
CQ, PQ, WFQ, CBWFQ...
Tagging / Marking / Colouring
•
•
•
•
•
Set bits in packet header
Indication to guide priority and
queuing machanisms
Network significance
Can be changed/adjusted by any
network node
IP Precedence, DSCP
80
Voice over IP Protocols
VoIP Is Not Bound to H.323 (H.323 Is a Signaling Protocol)
Many Other Signaling Protocols—MGCP, SGCP, SIP, Etc.
Commonality—Voice Packets Ride on UDP/RTP
Voice Payload
G.711, G.729, G.723(.1)
Transport
RTP/UDP
Network
IP
Link
MLPPP/FR/ATM AAL1
Physical
–––
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
81
“Payload” Bandwidth
Requirements for Various Codecs
Encoding/Compressio
n
Resulting Bit
Rate
G.726 ADPCM
16, 24, 32, 40 kbps
G.727 E-ADPCM
16, 24, 32, 40 kbps
G.729 CS-ACELP
8 kbps
G.728 LD-CELP
16 kbps
G.723.1 CELP
6.3/5.3 kbps
G.711 PCM A-Law/u-Law
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
64 kbps (DS0)
82
VoIP Packet Format
VoIP Packet
Link
UDP
IP Header
Header
Header
X Bytes 20 Bytes 8 Bytes
RTP
Header
12 Bytes
Voice
Payload
X Bytes
• Payload size, PPS and BPS vendor implementation specific
• For example:
Not Including Link Layer Header or CRTP
Cisco Router at G.711
Cisco Router at G.729
Cisco IP Phone at G.711
Cisco IP Phone at G.723.1
= 160 Byte Voice Payload at 50 pps (80 kbps)
= 20 Byte Payload at 50 pps (24 kbps)
= 240 Byte Payload at 33 pps (74.6 kbps)
= 24 Byte Payload at 33 pps (17k bps)
Note—Link Layer Sizes Vary per Media
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
83
Voice Payload vs. Frame Rate
8K CS-ACELP, G.729xx
Voice Represented (msec)
Voice Payload (bytes)
Packet Rate (pps)
32K ADPCM, G.726
Voice Represented (msec)
Voice Payload (bytes)
Packet Rate (pps)
64K PCM, G.711
Voice Represented (msec)
Voice Payload (bytes)
Packet Rate (pps)
401
0985_05f9_c1
10 ms of voice is represented by 10 bytes of voice payload
10
10
100.00
20
20
50.00
30
30
33.33
40
40
25.00
50
50
20.00
60
60
16.67
10 ms of voice is represented by 40 bytes of voice payload
10
40
100.00
20
80
50.00
30
120
33.33
40
160
25.00
50
200
20.00
60
240
16.67
10 ms of voice is represented by 80 bytes of voice payload
5
40
200.00
10
80
100.00
15
120
66.67
20
160
50.00
25
200
40.00
30
240
33.33
BW-needed-per-call = #bytes-per-packet * 8 * pps
© 1999, Cisco Systems, Inc.
84
Various Link Layer Header Sizes
“Varying Bit Rates per Media”
Example—G.729 with 60 Byte Packet (Voice and IP Header)
at 50 pps (No RTP Header Compression)
Media
Link Layer
Header Size
Bit Rate
Ethernet
14 Bytes
29.6 kbps
PPP
6 Bytes
26.4 kbps
Frame Relay
4 Bytes
25.6 kbps
ATM
5 Bytes Per Cell
42.4 kbps
Note—For ATM a Single 60 Byte Packet Requires
Two 53 Byte ATM Cells
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
85
Domains of QoS Consideration
Requirement - “End to End” Quality of Service (QoS)
IP
Multilayer
Campus
Router
WAN
IP
IP
IP
IP
IP
Campus
401
0985_05f9_c1
Multilayer
Campus
Router
WAN Edge/Egress
WAN
Backbone
Avoiding Loss, Delay and Delay Variation (Jitter)
Strict Prioritization of Voice
© 1999, Cisco Systems, Inc.
86
Loss
Sources of Packet Loss—Congestion
IP
Multilayer
Campus
Router
WAN
IP
Multilayer
Campus
Router
IP
IP
IP
Edge/Egress
1. Congestion on WAN Link
2. Proper QoS Mechanisms Not Deployed
3. Campus Congestion Less Concerning
401
0985_05f9_c1
IP
© 1999, Cisco Systems, Inc.
WAN
1. Global WAN Congestion
2. Central to Remote Circuit Speed Mismatch
3. Remote Site to Central Site over Subscription
4. Improper PVC Design/Provisioning
87
Anatomy of a Carrier
Customer Premises
Equipment
Access
Lines
Inter-Node
Trunks
“The Cloud/Carrier”
Frame Relay, ATM
WAN Switch Fabric
Inter-Node Trunk Over Subscription
Often 3:1 or Higher
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
88
Where WAN Congestion
and Delay Can Occur
Router
WAN Switch
Access IGX/8400
T1
Ingress
T1 Queue
T1
Trunk
Queue
Trunk
Queue
Router
Egress 56
Queue
kbps
Ingress
Queue
Packets Arrive at
Greater than PIR or CIR
PIR = Peak Information Rate
401
0985_05f9_c1
Inter-Nodal Trunk
WAN Switch
IGX/8400 Access
56kbps
© 1999, Cisco Systems, Inc.
Global
Trunk Congestion
Egress Port Congestion
VC Over Subscription
89
Bursting—What Is Your
Guarantee? Options
Router
WAN Switch
Access IGX/8400
T1
Ingress
T1 Queue
Trunk
Queue
Shape to CIR—
No Bursting
Mark Data DE
(Discard Eligible)
The Safest
Only Drop Data
Upon Congestion
Not Popular
Data Gets Dropped 1st
Compared to Other
Subscribers
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
Inter-Nodal Trunk
WAN Switch
IGX/8400 Access
56kbps
Trunk
Queue
Router
Egress 56
Queue
kbps
Two PVC’s—Data + Voice
Active Traffic Management
Voice—Keep Below CIR
Data—Allow for Bursting
ABR, FECN/BECN,
ForeSight
Need DLCI Prioritization
at WAN Egress
Only Invoked when
congestion/Delays has
Already Occurred
90
Congestion Detection and Feedback
Effectiveness Depends on Round Trip Delay
Router
WAN Switch
Access IGX/8400
T1
Ingress
T1 Queue
Inter-Nodal Trunk
Trunk
Queue
ABR/
ABR/
Foresight Foresight
WAN Switch
IGX/8400 Access
56kbps
Router
Egress 56
Queue
Trunk
Queue
kbps
ABR/
Foresight
FECN/
BECN
ABR—Available Bit Rate
FECN/BECN Notification
Foresight/CLLM
Can Send a Rate Down
from Point of
Congestion
Requires Far End to
Reflect a FECN and Send
and BECN Back to Source
Indicating a Rate Down
Can Send a Rate Down
from Point of Congestion
401
0985_05f9_c1
Speeds up Rate Down Time
over FECN/BECN
Congestion Must Occur to Invoke,
Congestion Relief Can be as Long as One Round Trip Time
© 1999, Cisco Systems, Inc.
91
WAN Queuing and Buffering
Router
WAN Switch
Access IGX/8400
T1
Ingress
T1 Queue
Packets Arrive at Line Rate
Placed in Ingress Queue
Trunk
Queue
Inter-Nodal Trunk
WAN Switch
IGX/8400 Access
56kbps
Trunk
Queue
Router
Egress 56
Queue
kbps
Packets De-Queue at Line Rate
Packets Leak into Trunk at PIR—(Peak Information Rate)
Typically Lowest Access Rate—56 kbps
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
92
Delay
Sender
Receiver
PBX
Network
PBX
First Bit
Transmitted
Last Bit
Received
A
Processing
Delay
A
Network
Transit
Delay
t
Processing
Delay
End-to-End Delay
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
93
Delay—Fixed
Sources of Fixed Delay
IP
Multilayer
Campus
Router
WAN
IP
Multilayer
Campus
Router
IP
IP
IP
Edge/Egress
Codec Processing—Packetization (TX)
Serialization
De-Jitter Buffer
401
0985_05f9_c1
IP
© 1999, Cisco Systems, Inc.
WAN
Propagation Delay—6us per Km
Serialization Delay
94
Delay Variation—“Jitter”
Sender
Receiver
Network
B
A
C
Sender Transmits
t
A
D1
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
B
D2 = D1
C
D3 = D2
Sink Receives
t
95
Delay—Variable
Sources of Variable Delay
IP
Multilayer
Campus
Router
WAN
IP
Multilayer
Campus
Router
IP
IP
IP
Edge/Egress
Queuing Delay (Congestion)
De-Jitter Buffer
No or Improper Traffic Shaping Config
Large Packet Serialization on Slow Links
Variable Size Packets
Less Common in Campus
401
0985_05f9_c1
IP
© 1999, Cisco Systems, Inc.
WAN
Global WAN Congestion
Central to Remote Site Speed Mismatch
(Fast to Slow)
PVC Over Subscription (Remote to Central Site)
Bursting Above Committed Rates
96
Voice Delay Guidelines
One Way Delay
(msec)
Description
0–150
Acceptable for Most User Applications
150–400
Acceptable Provided That
Administrations Are Aware
of the Transmission Time Impact
on the Transmission Quality
of User Applications
400+
Unacceptable for General Network
Planning Purposes; However, It Is
Recognized That in Some Exceptional
Cases This Limit Will Be Exceeded
ITU’s G.114 Recommendation
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
97
Delay Budget Goal < 150 ms
Cumulative Transmission Path Delay
Avoid the “Human Ethernet”
CB Zone
Satellite Quality
Fax Relay, Broadcast
High Quality
0
100
200
300
400
500
600
700
800
Time (msec)
Delay Target
ITU’s G.114 “Recommendation” = 0–150 msec 1-Way Delay
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
98
An Example
• Assumptions:
We have eight trunks
We are going to use CS-ACELP that uses
8 Kbps per voice channel
Our uplink is 64 Kbps
Voice is using a high priority queue and
no other traffic is being used
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
99
Delay Calculation
Los
Coder Delay Queuing Delay
Angeles
25 ms
6 ms
Dejitter Buffer
50 ms
Munich
Propagation
Delay—32 ms
(Private Line Network)
Serialization Delay
3 ms
Fixed
Delay
Coder Delay G.729 (5 msec Look Ahead)
Coder Delay G.729 (10 msec per Frame)
Variable
Delay
5 msec
20 msec
Packetization Delay—Included in Coder Delay
21 msec
Max Queuing Delay 64 kbps Trunk
Serialization Delay 64 kbps Trunk
3 msec
Propagation Delay (Private Lines)
32 msec
Variable
Delay
Component
Network Delay (e.g., Public Frame Relay Svc)
Dejitter Buffer
401
0985_05f9_c1
Total
© 1999, Cisco Systems, Inc.
50 msec
110 msec
100
82
Variable Delay Calculation
• We have eight trunks, so in the worst case we will
have to wait for seven voice calls prior to ours
• To put one voice frame out on a 64Kbps link
takes 3msec
• 1 byte over a 64Kbps link takes 125 microseconds.
We have a 20 byte frame relay frame with 4 bytes of
overhead. 125 * 24 = 3000 usecs or 3 msec
• Does not factor in waiting for a possible data
packet or the impact of variable sized frames
• Assumes voice prioritization of frames
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
101
Large Packets on Slow Links
56 kbps Line
Real-Time MTU
Elastic Traffic MTU
214 ms Serialization Delay
for 1500 Byte Frame at 56 kbps
Large Packets “Freeze Out” Voice—Results in Jitter
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
102
Slow-Link Efficiency Tools
Fragmentation and Interleave
Not Needed on Links Greater than 768 kbps
Before
Real-Time MTU
Elastic Traffic MTU
214-ms Serialization Delay
for 1500-byte Frame at 56 kbps
After
Elastic MTU
Elastic MTU
Real-Time MTU
Elastic MTU
Solutions
401
0985_05f9_c1
Point to Point Links—MLPPP with Fragmentation and
Interleave
Frame Relay—FRF.12 (Voice and Data Can Use Single PVC)
ATM—(Voice and Data Need Separate VCs on Slow Links)
© 1999, Cisco Systems, Inc.
103
Fragment Size Matrix
Assuming 10 ms Blocking Delay per Fragment
Link
Speed
Fragment
Size
56 kbps
70
Bytes
64 kbps
80
Bytes
128 kbps
160
Bytes
256 kbps
512 kbps
320
Bytes
640
Bytes
768 kbps
1000
Bytes
1536 kbs
2000
Bytes
401
0985_05f9_c1
X
© 1999, Cisco Systems, Inc.
Fragment Size =
10 ms
Time for 1 Byte at BW
Example: 4 G.729 Calls on 128 kbps Circuit
Fragment Blocking Delay = 10 ms (160 bytes)
Q = (Pv*N/C) + LFI
Q = (480 bits*4/128000) + 10 ms = 25 ms
Worst Case Queuing Delay = 25 ms
Q = Worst Case Queuing Delay of Voice Packet in ms
Pv = Size of a Voice Packet in Bits (at Layer 1)
N = Number of Calls
C = Is the Link Capacity in bps
LFI = Fragment Size Queue Delay in ms
104
Fragmentation Frame Size Matrix
Real Time Packet Interval
Link
Speed
10ms
20ms
30ms
40ms
56kbps
70
Bytes
140
Bytes
210
Bytes
280
Bytes
350
Bytes
700
Bytes
1400
Bytes
64kbps
80
Bytes
160
Bytes
240
Bytes
320
Bytes
400
Bytes
800
Bytes
1600
Bytes
128kbps
160
Bytes
320
Bytes
480
Bytes
640
Bytes
800
Bytes
1600
Bytes
X
3200
Bytes
256kbps
320
Bytes
640
Bytes
960
Bytes
1280
Bytes
1600
Bytes
640
Bytes
1280
Bytes
1920
Bytes
2560
Bytes
X
X
6400
Bytes
X
6400
Bytes
512kbps
X
3200
Bytes
X
3200
Bytes
X
12800
Bytes
X
768kbps
1000
Bytes
2000
Bytes
3000
Bytes
4000
Bytes
5000
Bytes
10000
Bytes
20000
Bytes
1536kbs
2000
Bytes
X
X
4000
X
Bytes
X
X
6000
X
Bytes
X
8000
X
Bytes
50ms 100ms 200ms
X
10000
X
Bytes
X
20000
X
Bytes
X
X
X
40000
X
Bytes
X —Fragmentation not an issue due to BW + Interval Combination
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
105
When Is Fragmentation Needed?
Frame Size
1024
64
512
256
128
1
Bytes Bytes Bytes Bytes Bytes
Byte
1024
1500
14364
us
9128
ms
36512
ms
18256
ms
72 ms 144 ms
Bytes Bytes
Bytes Bytes Bytes Bytes
56 kbps
64 kbps
8 ms
16 ms
32 ms
64 ms
128 ms
187 ms
62.5 us
4 ms
8 ms
16 ms
32 ms
64 ms
93 ms
2 ms
4 ms
8 ms
16 ms
32 ms
8ms
31 us
4ms
15.5 us
512 kbps
2ms
768 kbps
10 us
1536 kbs
5 us
768kbps
214 ms
125 us
9ms
Link 128 kbps
Speed 256 kbps
1500
Bytes
1ms
10us
18ms
16ms
8ms
1 ms
4ms
36ms
32ms
16ms
2 ms
2ms
320 us
32ms
144ms 214ms
128ms 187ms
64ms
8 ms
46 ms
93ms
16 ms
23 ms
16ms
32ms
46ms
8ms
16ms
23ms
2.56 ms 5.12 ms 10.24 ms 15 ms
4ms
640 us
64ms
4 ms
8ms
640 us 1.28 ms
72ms
1.28 ms 2.56 ms 5.12 ms
7.5 ms
640us 1.28ms 2.56ms 5.12ms 10.24ms 15mss
• Depends on the queuing delay caused by large
640us 1.28ms 2.56ms 5.12ms
1536kbs
5usat a given
320us speed—fragmentation
frames
generally
7.5ms
not needed above 768 kbps
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
106
QoS Needs
• Campus
Bandwidth minimizes QoS issues
• WAN edge
QoS “starts” in the WAN—a must
• WAN considerations
Often forgotten or misunderstood—
a must
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
107
Three Classes of QoS Tools
VoIP
1
1
Router
V V V
3
Data
SNA
2
2
3
3
3
3
2
2
1
2
1
• Prioritization
Classification + Queuing
• Slow Link Efficiency
Link Fragmentation and Interleave (LFI )
Compression, Voice Activity Detection (VAD)
• Traffic Shaping
Speed Mismatches
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
108
VoIP Bandwidth Solution
Version
IHL
Type of Service
Identification
Time to Live
Total Length
Flags
Protocol
Fragment Offset
Header Checksum
Source Address
Destination Address
Options
V=2
P
Padding
Source Port
Destination Port
Length
Checksum
X
CC M
PT
Sequence Number
Timestamp
Synchronization Source (SSRC) Identifier
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
RTP Header
Compression
• 20 ms @ 8 kbps yields
20-byte payload
• IP header 20;
UDP header 8;
RTP header 12
2X payload!
• Header compression
40 bytes to 2 or 4 bytes
• Hop-by-Hop on
slow links <512 kbps
• CRTP—Compressed
Real-time Protocol
109
Send Fewer Packets
Link Efficiency
• VAD
“B” versions of G.729 contain a built-in IETF VAD algorithm,
no need to configure VAD
Rule-of-thumb: 30-35% reduction in BW - a more valid
assumption for larger pipes (T1 and above)
Depends on application (e.g. Music-on-Hold makes VAD 0%)
• Variable Payload Size
Specify #samples per packet
Changes the BW, delay and pps characteristics of the call
Usability depends on the delay budget of the network
values > default: decreases BW, and increases delay
values < default: increases BW, and decreases delay
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
110
Traffic Differentiation Mechanisms
IP Precedence and 802.1p
Layer 2
802.1Q/p
Data
PREAM. SFD
Packet
DA
Three Bits Used for CoS
(User Priority)
SA
TAG
4 Bytes
PT
DATA
FCS
Layer 3
IPV4
Version ToS
Len
Length 1 Byte
ID
offset
TTL Proto FCS IP-SA IP-DA
Data
Standard IPV4: Three MSB Called IP Precedence
(DiffServ Will Use Six D.S. Bits Plus Two for Flow Control)
• Layer 2 mechanisms are not assured end-to-end
• Layer 3 mechanisms provide end-to-end classification
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
111
IP Precedence
“Controlling WFQ’s De-queuing Behavior”
IP Packet
Data
Weight =
4096
(1 + IP Precedence)
IP Precedence
ToS Field
3 Bit
Precedence
Field
0
1
2
3
4
5
6
7
Weight
4096
2048
1365
1024
819
682
585
512
• IP Precedence
Not a QoS Mechanism turned on in the router
“In Band” QoS Signaling—Set in the End Point
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
112
Precedence to VC Mapping
Si
VC Bundle
VC1
VC2
VC3
VC4
ATM
Network
Assign to VC Based on:
Note:
IP Precedence
RSVP
Policy Routing
WAN QoS is Only as
Good as Specified ATM
VC Parameters
• VC bundle—multiple VCs for each IP adjacency
• Separate VC for each IP CoS
• WRED, WFQ, or CBWFQ runs on each VC queue
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
113
Queuing Overview
Prioritization - Queuing
• Queuing and scheduling significant when:
there is contention for BW, i.e. congestion
traffic shaping smoothing
share voice & data on same infrastructure
• Several sets of queues:
VC queues (FR, ATM)
Interface queues
Transmit ring queues (driver)
• Queuing method for voice much more significant on slow
access links (<2M)
• WFQ is inadequate to provide good voice quality under all
circumstances
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
114
Priority and Custom Queuing (PQ, CQ)
Prioritization - Queuing
PQ and CQ are not recommended for voice
CQ
PQ
• 4 Queues: High, Medium,
Normal, Low
• Packets classified by
protocol or interface
• FIFO within priority
• Absolute priority
scheduling
• Lower priority queues may
starve
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
• 16 Queues
• Packets classified by
protocol or interface
• FIFO within priority
• Weighted round robin
scheduling
• WRED and RSVP not
supported
• Guarantees BW per queue,
not delay
115
Weighted Fair Queuing (WFQ)
Prioritization - Queuing
24kbps flow gets
28kbps
(only needs 24kbps)
Router Queue Structure
24kbps Voice
flow
Processor
Dynamic Queue Per Flow
1
2
1
2
2
2
2
1
Dequeue
1
2
Classify
500kbps flow
2
500kbps flow gets
28kbps
2
2 2
1
2
1
2 1
56kbps
Line Speed
Transmit
Scheduling
Default on links 2meg or less
When congestion exists, traffic in queues shares
bandwidth based on the weights
“Not as effective when MANY flows”
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
116
Weighted Fair Queuing (WFQ)
Prioritization - Queuing
Before 12.0(5)T
Weight =
4096
(1 + IP Prec)
IP Prec
<12.0(5)T Weight
0
4096
1
2048
2
1365
3
1024
4
819
5
682
6
585
7
512
RSVP
4
RTP Reserve
128
RTP Priority
N/A
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
12.0(5)T and later
Weight =
32768
(1 + IP Prec)
>=12.0(5)T Weight
32768
16384
10923
8192
6554
5461
4681
4096
4
N/A
0
117
Weighted Fair Queuing (WFQ)
Prioritization - Queuing
2
Reserved queues
(RSVP and RTP Reserve)
2 2
3
...
IP Precedence 7
4 4
...
Weight:
• IP Precedence
• RSVP/RTP
Reserve
1 1
...
Q Classification:
• Source
address
• Dest address
• Source port
• Dest. Port
• IP Precedence
Dequeue
5 5
...
6
•
•
•
•
6 6
IP Precedence 0
(Best Effort/Hash queues)
Packets within the same weight are scheduled based on arrival time
Routing protocols and LMI bypass WFQ algorithm
ALL RSVP traffic queued at weight 4, not just voice
RSVP traffic at weight 128 until reservation succeeds, then 4
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
118
IP Precedence
Flow Bandwidth Calculation Example
(
Flow A BW =
Circuit
Flow A “Parts”
X
Bandwidth
Sum of all Flow “Parts”
)
Example A
Example B
56 kbps Link
56 kbps Link
2—VoIP Flows A+B at 24 kbps (IP Prec 0)
2—FTP Flows at 56 kbps (IP Prec 0)
2—VoIP Flows A+B at 24 kbps (IP Prec 5)
2—FTP Flows at 56 kbps (IP Prec 0)
14 kbps =
( 14 )
X 56 kbps
24 kbps =
6
)
( 14
X 56 kbps
14 kbps Not Suitable for a 24 kbps Flow
Example of Many Flows with WFQ and
Equal Precedence Flows
24 kbps Suitable for a 24 kbps Flow
Weighted “Fair” Queuing
WFQ Preferring IP Precedence
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
119
IP Precedence
No Admission Control
Moral of the Story: Know Your Environment,
Voice Traffic Patterns etc. Recommendations for
Certain Bandwidth’s to Follow
Example C
56 kbps Link
2—VoIP Flow’s at 24 kbps (IP Prec 5)
4—FTP Flows at 56 kbps (IP Prec 0)
21 kbps =
6
( 16)
X 56 kbps
21 kbps Not Suitable for a 24 kbps Flow
RTP Header Compression Would Help Since
it Would reduce VoIP Flow to 11.2 kbps
Also RSVP or CBWFQ
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
120
IP Precedence and WFQ
Prioritization - Queuing
Calculating given Flow BW based on IP Precedence under congestion
Flow A “Parts” (1 + IP Prec)
Sum of all Flow “Parts”
(
)
X Circuit BW = Flow A BW
Example A
Example B
Example C
56kbps link
56kbps link
56kbps link
2 VoIP Flows, 24K (IP Prec 0)
2 FTP Flows, 56K (IP Prec 0)
2 VoIP Flows, 24K (IP Prec 5)
2 FTP Flows, 56K (IP Prec 0)
2 VoIP Flows, 24K (IP Prec 5)
6 FTP Flows, 56K (IP Prec 0)
1
6
6
( 4 ) X 56kbps = 14K
( 14) X 56kbps = 24K
14kbps NOT suitable for a
24K VoIP flow
24K SUITABLE for a 24K
VoIP flow
18.6K NOT suitable for a
24K VoIP flow
No IP Precedence
With IP Precedence
More flows with IP
Precedence
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
( 18)
X 56kbps = 18.6K
121
Class-Based WFQ (CBWFQ)
Prioritization - Queuing
Class queues
1
1
...
2
Max: 63
(64 including the default class-queue)
2 2
3
De-queue
Default class-queue
OR
5
...
Classify
6
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
5
WFQ System
6 6
(unclassified traffic)
122
Prioritization Tools
“Protecting Voice from Data”
VoIP
(High)
1
1
Data
(Low)
2
2
Router
PQ
5
3
2
V
V
V
1
1
1
WAN
Circuit
Data
(Low)
3
3
3
3
Data
(Low)
4
4
4
4
WFQ
QoS Queuing Tools
IP RTP Priority (Point-to-Point Links + Frame Relay)
IP to ATM QoS (Multiple VCs or CBWFQ within VC)
Identifying and Giving Priority to Voice
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
123
Weighted RED
• WRED:
In the event packets
need to be dropped,
what class of packets
should be dropped
Packets Classified
as Blue Start Dropping
at a 50% Queue Depth.
Drop Rate Is Increased
as Queue Depth Is Increased
Packets Classified
as Gold Are Dropped
at 90% Queue Depth
WRED Benefit for VoIP:
Maintain Room in Queue, and if Packets Must be
Dropped “Avoid” Dropping Voice
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
124
WRED Congestion Avoidance
Maximize Data Goodput
Adjustable Drop Probabilities
(from “show interface”)
Queuing strategy: random early detection (RED)
mean queue depth: 56
drops: class random tail min-th max-th mark-prob
0
4356 0
20
40
1/10
Data
1
0
0
22
40
1/10
Flow
2
0
0
24
40
1/10
Prec = 0
3
0
0
26
40
1/10
4
0
0
28
40
1/10
5
0
0
30
40
1/10
6
0
0
33
40
1/10
Voice
7
0
0
35
40
1/10
Flow
0
0
37
40
1/10
Prec = 5 rsvp
Uncontrolled
Uncontrolled
Congestion
Congestion
Managed
Congestion
Managed
Congestion
• Accommodate burstiness
• “Less” drop probability for higher priority flows (VoIP)
• Does not protect against flows that do not react to drop
For example, extremely heavy UDP flow can overflow WRED queue
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
125
RSVP
Bandwidth Reservation
• IETF signaling protocol
Reservation of bandwidth and delay
• Flow can be signaled by end station or by router (static
reservation)
• For H.323 VoIP:
Effective as a BW reservations mechanism
Not effective as Call Admisions Control: RSVP signaling takes place
after call setup as port numbers need to be known
End Points Send Unicast Signaling Messages (RSVP PATH + RESV)
RSVP PATH Message
FXS
FXS
RSVP RESV Message
RSVP enabled router sees the PATH and
RESERVE messages and allocate the
appropriate queue space for the given flow
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
Non RSVP enabled
routers pass the VoIP
flow as best effort
126
WAN Provisioning/
Design Considerations
128 kbps
256 kbps
Remote Sites
512 kbps
T1
Frame Relay, ATM
768 kbps
T1
Central
Site
Central to Remote Speed Mismatch
Traffic Shaping—Prevents Delay or Loss in WAN—A Must
Remote to Central Over Subscription—Do Not
Add additional T1’s at Central Site, or
Traffic Shaping—from Remotes at Reduced Rate (< Line Rate)
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
127
Bursting Considerations
“Guidelines”
• Single PVC—limit bursting to committed rate (CIR)
The safest—you are guaranteed what you pay for
• Single PVC—mark data discard eligible
Your data gets dropped first upon network congestion
• Single PVC—utilize BECN’s, foresight or ABR
Only invoked when congestion has already occurred
Round trip delays—Congestion indication must get back to source
• Dual PVCs—one for voice and one for data
One for data (may burst), one for voice (keep below CIR)
Must Perform PVC prioritization in frame cloud (Cisco WAN gear does)
Fragmentation rules still apply for data PVC
Moral of the Story—“Know Your Carrier”
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
128
Traffic Shaping Overview
Traffic Shaping
• VoIP-over-serial:
needs no traffic shaping
BW is guaranteed at line speed
• VoIPovFR and VoFR:
Use FRTS - applicable per VC
GTS is applicable only per interface - does not have the desired
effect when voice and data PVCs exist on the interface
Set min-CIR equal to “voice bandwidth” + a little overhead to
ensure good voice quality under WAN congestion situations
On PVC carrying voice, shape strictly to CIR - don’t burst
• VoATM:
Use ATM traffic shaping
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
129
Traffic Shaping—When and Why?
Result:
128 kbps
Buffering which Will Cause Delay
and Eventually Dropped Packets
256 kbps
Remote
Sites
T1
512 kbps
Frame Relay, ATM
768 kbps
T1
Central
Site
1. Central to Remote-Site Speed Mismatch
2. To Avoid Remote to Central Site Over-Subscription
3. To Prohibit Bursting above Committed Rate
What Are You Guaranteed Above Your Committed Rate?
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
130
Understanding Shaping Parameters
Frame Relay
Traffic Shaping
“Average” Traffic Rate Out of an Interface
Challenge—Traffic Still Clocked Out at Line Rate
CIR (Committed Information Rate)
Average Rate over Time, Typically in Bits per Second
Bc (Committed Burst)
Amount Allowed to Transmit in an Interval, in Bits
Be (Excess Burst)
Amount Allowed to Transmit Above Bc per Second
Interval
Equal Integer of Tme Within 1 sec, Typically in ms. Number of Intervals per Second
Depends on Interval Length Bc and the Interval Are Derivatives of Each Other
Interval =
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
Bc
CIR
Example
125 ms =
8000 bits
64 kbps
131
Frame Relay Traffic Shaping
Traffic Shaping
Port speed
Rate
CIR
<Bc
=Bc >Bc
Time
• Frame relay traffic shaping shapes total PVC traffic to conform to CIR,
Bc and Be.
• It is possible to use access lists to mark some data streams as DE
Ensures that if the total PVC traffic exceeds the traffic contract (CIR/Bc) and
the carrier network tags or drops traffic to compensate, the data is dropped
and the voice is not affected
However, there is no mechanism which allows non-voice traffic to be marked
DE only when in excess of the traffic contract.
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
132
Example—Traffic Shaping in Action
High Volume Data Flow Towards a 128 kbps Line Rate Shaping to 64 kbps
Bc
CIR
Interval =
125 ms Interval =
8000 bits
64000 bps
Cisco Default Bc=1/8 CIR = 125 ms Interval
0
Bits per Interval of bits
Time at 128 kbps Rate
16000
bits
32000
bits
48000
bits
64000
bits
80000
bits
96000
bits
112000
bits
128,000
bits
Line Rate
128 kbps
Net Result:
8000 X 8 =
64 bkps
62.5 ms
0 ms
125 ms 250 ms 375 ms 500 ms 625 ms
When 8000 bits (Bc) Transmitted
Credits Are Exhausted and No More
Packet Flow in that Interval.
This Happens at the 62.5 ms Point
of the Interval.
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
75 0ms 875 ms 1000 ms
Time—1 Second
When a New Interval Begins Bc (8000 bit). Credits
Are Restored and Transmission May Resume.
Pause in Transmission Is 62.5 ms in the Case.
133
Bc setting Considerations for VoIP
Set Bc Lower if Line Rate to CIR Ratio Is High
Example: T1 Line Rate Shaping to 64 kbps
Bc = 8000
8000 Bc
125ms Interval =
64kbps CIR
Bc = 1000
1000 Bc
15ms Interval =
64kbps CIR
T1 can transmit 193,000 bits in 125 ms
T1 can transmit 23,000 bits in 15 ms
0
bits
193000
bits
Bits per increment
of time at 128kbps
0
bits
23000
bits
125 ms
Interval
Traffic Flow
Time
10 ms
120 ms
Traffic Flow
5 ms
0 ms 125 ms
At T1 Rate 8000 Bits (Bc)
Are Exhausted in 5 ms. Halting
Traffic Flow for that PVC
for the Rest of that Interval.
Even for Voice!
401
0985_05f9_c1
15 ms
Interval
© 1999, Cisco Systems, Inc.
120 ms of Potential Delay
for Voice Until New Interval
Begins and Bc Credits
Are Restored
Time
.6 ms
0 ms
15 ms
At T1 Rate 1000 Bits (Bc)
Still Are Exhausted in 5 ms.
Halting Traffic Flow for that PVC
for the Rest of that Interval.
Even for Voice!
10 ms of Potential Delay
for Voice Until New Interval
Begins and Bc Credits
Are Restored
134
High Speed WAN Backbone
Frame Relay/ATM Example
Frame Relay
ATM
• Prioritization
• Prioritization
IP-ATM CoS - with IP
Prec
• Link Efficiency
WFQ - With IP Prec
• Link Efficiency
FRF.12 if remote is low
speed
N/A
• Traffic Shaping
• Traffic Shaping
Shape to VC
Parameters
Frame Relay Traffic
Shaping
Burst with care
Shape to CIR or Burst
with care
Point to Point
• Prioritization
DWFQ/CBWFQ - with IP
Prec
• Link Efficiency
N/A
• Traffic Shaping
N/A
> 2 meg
7200
7500
High Speed
WAN
Headquarters
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
Regional Office
135
Low Speed WAN Edge: Pt-to-Pt
Low Speed Edge: <2M
Pt to Pt Considerations
• Prioritization
Central / Regional Office
PQ-WFQ/IP RTP Priority (if available)
7200 / 7500
WFQ/CBWFQ with IP Precedence
• Link Efficiency
MLPPP with Fragmentation and
Interleave
VAD (If Desired)
64 kbps
CRTP (If Desired)
• Traffic Shaping
N/A
3600
Branch Office
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
136
Low Speed WAN Edge: Frame Relay
Low Speed Edge: <2M
Remote Branch
Considerations
•
Central / Regional Office
Prioritization
PQ-WFQ/IP RTP Priority (if
available)
7200 / 7500
WFQ with IP Precedence
•
Central Site Considerations
•
WFQ with IP Precedence
•
FRF.12
T1
VAD (If Desired)
CRTP (If Desired)
Prioritization
PQ-WFQ/IP RTP Priority (if available)
Link Efficiency
Frame
Relay
•
Traffic Shaping
FRTS
Shape to CIR or Burst with care
128 kbps
FRF.12
PVCs to low speed remotes MUST
use FRF.12
Link Efficiency
3600
VAD (If Desired)
CRTP (If Desired)
•
Traffic Shaping
Branch Office
FRTS
Shape to CIR or at minimum remote’s line rate - Burst with care
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
137
Low Speed WAN Edge: ATM
ATM typically greater than T1
Central / Regional Office
Central Site + Remote Branch Considerations
• Prioritization
IP-ATM CoS with IP Precedence
7200 / 7500
• Link Efficiency
T1 and above “typically” not needed
• Traffic Shaping
Shape to VC Parameters
Burst with care
ATM
3600
Branch Office
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
138
Summary
• Voice traffic engineering principles
still apply
• Packet-based voice trunks can
provide efficiency with high quality if
properly engineered
• The biggest impact on voice quality
over a data network will be as a result
of the delay and delay variation
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
139
QoS Tools Categories
•
Prioritization
Purpose: Give priority treatment to real-time sensitive traffic
Queuing /Scheduling: WFQ, CBWFQ, IP RTP Priority (PQ-WFQ), WRED
Classification (Tagging, Marking, Colouring): IP Precedence, CAR, DSCP, IP RTP
Reserve, IP RTP Priority
•
Link/Bandwidth Efficiency
Purpose: Limit delay on slow links
Fragmentation & Interleaving (LFI): FRF.12, MLPPP, MTU Size
Compression: Header compression (CRTP), payload compression (codec)
Send Fewer Packets: Variable Size Payload, VAD
•
Traffic Shaping
Purpose: Smooth out speed mismatches
GTS, FRTS, ATM TS
•
Bandwidth Management
Purpose: Check/reserve/restrict bandwidth for certain flows
BW Reservation/Guarantee: RSVP, CBWFQ, IP RTP Priority
401
0985_05f9_c1
Call Admissions Control: RSVP, GK zone bandwidth, # ingress ports
© 1999, Cisco Systems, Inc.
140
VoIP Low Speed Link (<768 Kbps)
Challenges and Solutions
Challenge
Solutions
Congestion
Intelligent Queuing
Delay and Delay Jitter
WFQ, IP Precedence, RSVP,
Priority Queuing
Packet Residency
Interleaving
Slow Link Freeze-out by
Large Packets
FRF.12, MLPPP, IP MTU Size
Reduction, Faster Link
Bandwidth Consumption
Compression
Header Size on Low
Bandwidth Links
Codecs, RTP Header Compression,
Voice Activity Detection
WAN
Oversubscription, Bursting
401
0985_05f9_c1
© 1999, Cisco Systems, Inc.
Traffic Management
Router Traffic Shaping to CIR, High
Priority PVC, Data Discard Eligibility
141
403
0916_04F9_c2
© 1999, Cisco Systems, Inc.
142