Deploying Qos Project Voice
Deploying Qos Project Voice
Tim Szigeti
Technical Marketing Engineer
Technology and Systems Marketing: QoS
Cisco Central Development Organization
10/5/04
Necessity Luxury
Security
Quality of
Service
High Availability
Voice Voice
Realtime Interactive-Video
Video Streaming Video
Call Signaling Call Signaling Call Signaling
IP Routing
Network Control
Network Management
NMS-2T30
9681_05_2004_c2 © 2004 Cisco Systems, Inc. All rights reserved. 7
Voice QoS Requirements
End-to-End Latency
Hello? Hello?
Avoid the
“Human Ethernet”
CB Zone
Satellite Quality
High Quality Fax Relay, Broadcast
PSTN
IP WAN
Propagation
CODEC Queuing Serialization and Network Jitter Buffer
Fixed
(6.3 µs/Km) +
G.729A: 25 ms Variable Variable Network Delay 20–50 ms
(Variable)
Voice
Reconstructed Voice Sample
3
Circuit-Switched Packet-Switched
Networks Networks
IP WAN/VPN
IP VPN Link Provisioned
PSTN
for 2 VoIP Calls
Physical
Trunks
Third Call Cisco No Physical
Rejected Router/ Call
Gateway Manager Limitation on IP Links
PBX STOP
If 3rd Call Accepted,
Voice Quality of All
Calls Degrades
30pps
“P” and “B” Frames
128–256 Bytes
15pps
32Kbps
1025–1500 Bytes
37% 65–128 Bytes
1%
129–256 Bytes
513–1024 Bytes 34%
20%
257–512 Bytes
8%
IP07 QoS © 2004 Cisco Systems, Inc. All rights reserved. 13
Data QoS Requirements
Application Differences
512–1023 253–511
Bytes Bytes
1024–1518
Bytes
128–252 65–127
Bytes Bytes
NMS-2T30
9681_05_2004_c2 © 2004 Cisco Systems, Inc. All rights reserved. 16
Business Security Threat Evolution
Expanding Scope of Theft and Disruption
Global
Impact
Scope of Damage
Regional
Networks Next Gen
Infrastructure
Hacking, Flash
Multiple
Networks 3rd Gen Threats,
Multi-Server Massive Worm
2nd Gen DoS, DDoS, Driven DDoS,
Individual Blended Threat Negative
Macro Viruses, (Worm+ Virus+
Networks Trojans, Email,
Payload Viruses,
Trojan), Turbo Worms and
Single Server Worms, Trojans
Individual 1st Gen DoS, Limited Widespread
Boot Viruses Targeted System
Computer
Hacking Hacking
W32/ W32/
Apache/ MS-SQL Blaster MyDoom
sadmind/IIS Code Red NIMDA mod_ssl Slammer W32/Sobig W32/Bagel
Sasser
May ’01 May ’01 Sep ’01 Jul ’02 Jan ’03 Aug ’03 Jan ’04 April ’04
http://www.symantec.com/press/2003/n031001.html
IP07 QoS © 2004 Cisco Systems, Inc. All rights reserved. 20
Types of DoS Attacks
Spoofing vs. Slamming
• Imposter attack
Pretends to be a legitimate service but maliciously
intercepts/misdirects client requests
• Flooding attack
Exponentially generates and propagates traffic
until service resources (servers and/or network)
are overwhelmed
1—The Enabling
Vulnerability
2—Propagation
Mechanism
3—Payload
Si
System
Under Attack
Si Si Infected
Source
Core
Si
Routers
Distribution Overloaded
Access Network Links High CPU
End Systems Overloaded Instability
Overloaded High Packet Loss Loss of Mgmt
High CPU Mission Critical
Applications Applications Impacted
Impacted
• QoS Overview
• Classification Tools
• Scheduling Tools
• Policing and Shaping Tools
• Link-Specific Tools
Delay- Packet
Delay
(Latency) Variation Loss
(Jitter)
TAG
Pream. SFD DA SA Type PT Data FCS
4 Bytes
Ethernet Frame
Three Bits Used for CoS
(802.1p User Priority)
PRI CFI VLAN ID 802.1Q/p
Header
CoS Application
7 Reserved
• 802.1p user priority field also
6 Routing
called Class of Service (CoS)
5 Voice
• Different types of traffic are
4 Video
assigned different CoS values
3 Call Signaling
• CoS 6 and 7 are reserved for
network use 2 Critical Data
1 Bulk Data
0 Best Effort Data
IP07 QoS © 2004 Cisco Systems, Inc. All rights reserved. 28
Classification Tools
IP Precedence and DiffServ Code Points
Version ToS
Byte Len ID Offset TTL Proto FCS IP SA IP DA Data
Length
IPv4 Packet
7 6 5 4 3 2 1 0
Standard IPv4
IP Precedence Unused
DiffServ Code Point (DSCP) IP ECN DiffServ Extensions
TCP/UDP
Frame Segment Data Payload
IP Packet
ToS/ Source Dest Src Dst
NBAR PDLM DATA
DSCP IP IP Port Port
MAC/CoS
DE/CLP/MPLS EV 98 Supported Protocols
Overflow
CIR
CBS EBS
No No
B<Tc B<Te
PIR CIR
PBS CBS
No No
B<Tp B<Tc
Voice 1 1 1 11
1 1 1 1 1 1 1 1 1 1 1 1 1
Video 1 1 1 1 2 12
3
1 1 1 1 1 1 13
Data
Bandwidth
100% Utilization
Time
Tail Drop
TAIL
WREDDROP
Queue
3 3
1 01 2 1 2 0 2 0 3 2 1 3
0
3
0
3
100%
50%
Average
0 Queue
Begin Begin Begin Size
Dropping Dropping Dropping
AF13 AF12 AF11 Max Queue
Length
(Tail Drop)
Version ToS
Byte Len ID Offset TTL Proto FCS IP SA IP DA Data
Length
IPv4 Packet
7 6 5 4 3 2 1 0
DiffServ Code Point (DSCP) ECT CE
Traffic Shaping Limits the Transmit Rate to a Value Lower than Line Rate
NMS-2T30
9681_05_2004_c2 © 2004 Cisco Systems, Inc. All rights reserved. 42
Voice QoS Requirements
Provisioning for Voice
• Latency ≤ 150 ms
One-Way
Voice
• Jitter ≤ 30 ms Requirements
• Loss ≤ 1%
• 17–106 kbps guaranteed
priority bandwidth per call
• 150 bps (+ Layer 2 overhead) • Smooth
guaranteed bandwidth for
• Benign
Voice-Control traffic per call
• Drop sensitive
• CAC must be enabled
• Delay sensitive
• UDP priority
• Latency ≤ 150 ms
One-Way
Video
• Jitter ≤ 30 ms Requirements
• Loss ≤ 1%
• Minimum priority bandwidth
guarantee required is:
Video-stream + 20%
• Bursty
e.g. a 384 kbps stream would
require 460 kbps of priority • Greedy
bandwidth • Drop sensitive
• CAC must be enabled • Delay sensitive
• UDP priority
Police
Throttle Scavenger
(when Congested)
System Si
Under
Si
Attack Si
Infected
Source
Core
Si
L3 Classification L2
Application
IPP PHB DSCP CoS
Routing 6 CS6 48 6
Voice 5 EF 46 5
Video Conferencing 4 AF41 34 4
Streaming Video 4 CS4 32 4
Mission-Critical Data 3 - 25 3
Call Signaling 3 AF31 Î CS3* 26 Î 24 3
Best Effort
≥ 25% Real-Time
≤ 33%
Scavenger/Bulk
≤ 5%
Critical Data
Voice 18%
Best Effort
25%
Best Effort
Scavenger ≥ 25% Real-Time
1% ≤ 33% Interactive Video
Scavenger/ 15%
Bulk 5%
Streaming-Video Internetwork-
Control
Network Management Call-Signaling
WAN Aggregator
Campus
Distribution/Core
Queuing/Dropping/
Switches Shaping/Link-Efficiency Policies
for Campus-to-Branch Traffic
WAN Aggregator
WAN
Branch Router
Branch
Switch
WAN
P Routers
CE Router
PE Router PE Router CE Router
MPLS VPN
PE-to-CE Queuing/Shaping/LFI
Required
Optional
NMS-2T30
9681_05_2004_c2 © 2004 Cisco Systems, Inc. All rights reserved. 63
QoS is the measure of transmission quality Policing tools can complement marking
and service availability of a network (or
internetworks). The transmission quality of
QoS Tools tools by marking metering flows
and marking-down out-of-contract traffic.
the network is determined by the following Classification can be done at Layers 2-7:
factors: Latency, Jitter and Loss.
L2 Frame L3 IP Packet L4 TCP/UDP Segment L7 Data Payload
The (Locally-Defined) Mission-Critical class is intended for a subset The Scavenger class is based on an Internet 2 draft that defines a
of Transactional Data applications that contribute most significantly “less-than-Best Effort” service. In the event of link congestion,
to the business objectives (this is a non-technical assessment). this class will be dropped the most aggressively.
Transactional Mission-Critical
usually only traverse the WAN/VPN in the Branch-to-Campus traffic may not be
Campus-to-Branch direction and therefore correctly marked on the Branch Access NBAR extensions allow for custom Packet
do not require provisioning in the Branch- Data Language Modules (PDLMs) to be
Layer switch.
to-Campus direction on the Branch defined for future worms.
router’s WAN edge. These switches – which are usually lower-
Where is QoS required on Branch
end switches – may or may not have the
Bandwidth for such unidirectional capabilities to classify and mark application routers? Classification & Marking +
LLQ/CBWFQ/WRED/
application classes can be reassigned to traffic. Therefore, classification and Shaping/LFI/cRTP Policies for
NBAR Worm Policing
Policies for
other critical classes, as shown in the marking may need to be performed on the Branch-to-Campus Traffic Branch-to-Campus Traffic
following diagram. Notice that no Branch router’s LAN edge (in the ingress
Branch Router Branch
Streaming Video class is provisioned and direction). Switch
WAN/ DVLAN
the bandwidth allocated to it (on the VPN
Campus side of the WAN link) is Furthermore, Branch routers offer the
VVLAN
reallocated to the Mission-Critical and ability to use NBAR to classify and mark WAN Edge LAN Edge
Transactional Data classes. traffic flows that require stateful packet Optional: DSCP-to-CoS Mapping Policies for
IP07 QoS inspection.
© 2004 Cisco Systems, Inc. All rights reserved. szigeti@cisco.com 2004 Campus-to-Branch Traffic 70
QoS design for an enterprise subscribing to a
MPLS VPN requires a major paradigm shift
QoS Design for Example enterprise subscriber
DSCP Remarking Diagram and
from private-WAN QoS design. MPLS VPN Subscribers CE Edge Bandwidth Allocation Diagram.
This is because with private-WAN design, MPLS VPN service Enterprise
DSCP
Service Provider
Applications Classes of Service
the enterprise principally controlled QoS. providers offer classes of
The WAN Aggregator (WAG) provisioned service to enterprise Routing CS6
QoS for not only Campus-to-Branch traffic, subscribers. Voice EF REALTIME
EF
but also for Branch-to-Branch traffic 35%
(which was homed through the WAG). Interactive-Video AF41 Î CS5 CS5
Admission criteria for
WAG Branch these classes is the DSCP Streaming Video CS4 Î AF21
CS6
markings of enterprise Mission-Critical Data DSCP 25 Î AF31 AF31
CRITICAL
20%
traffic. Thus, enterprises CS3
WAN Call Signaling AF31/CS3 Î CS5
may have to remark
application traffic to gain Transactional Data AF21 Î CS3 AF21 VIDEO
15%
Branch admission into the required Network Management CS2
CS2
However, due to the any-to-any/full-mesh service provider class. BULK 5%
AF11/CS1
nature of MPLS VPNs, Branch-to-Branch Bulk Data AF11
traffic is no longer homed through the WAG. Some best practices to Scavenger CS1 Î 0 BEST EFFORT
25%
While Branch-to-MPLS VPN QoS is consider when assigning Best Effort 0
controlled by the enterprise (on their enterprise traffic to service
Customer-Edge – CE – routers), provider classes of service Enterprise
Voice 15%
MPLS VPN-to-Branch QoS is controlled by include: Applications
the service provider (on their Provider Edge – • Don’t put Voice and
PE – routers). Interactive-Video into the Best Effort
24%
Branch CE
Central CE Realtime class on slow-speed
MPLS Best
Best Effort
Effort 25%
25% Realtime
(≤ 768 kbps) CE-to-PE links 35% Interactive-
Video
VPN • Don’t put Call-Signaling Scavenger 15%
Service Provider
1%
into the Realtime class on Bulk 5% Classes of Service
slow-speed CE-to-PE links Bulk 5%
Service Provider PE Routers Video
Video
Branch CE • Don’t mix TCP Net Mgmt 15%
15%
Critical
Critical
20%
20%
applications with UDP 2% Call
Therefore, to guarantee end-to-end QoS, Signaling
applications within a single 5%
enterprises must co-manage QoS with their
service provider class
MPLS VPN service providers; their policies Streaming-Video Routing 3%
(whenever possible); UDP 13%
must be both consistent and Mission-Critical Data 12%
applications may dominate
complementary. Transactional Data 5%
IP07 QoS the class when congested
© 2004 Cisco Systems, Inc. All rights reserved. 71 2004
szigeti@cisco.com
In order to support enterprise-subscriber QoS Design for MPLS VPN Service providers can mark at Layer 2
voice, video and data networks, service
providers must include QoS provisioning Service Providers (MPLS EXP) or at Layer 3 (DSCP).
within their MPLS VPN service offerings.
RFC 3270 presents three modes of MPLS/DiffServ marking for service providers:
This is due to the any-to-any/full-mesh 1) Uniform Mode: SP can remark customer DSCP values
nature of MPLS VPNs, where enterprise 2) Pipe Mode: SP does not remark customer DSCP values (SP uses independent MPLS
subscribers depend on their service EXP markings); final PE-to-CE policies are based on service provider’s markings
providers to provision Provider-Edge (PE) 3) Short Pipe Mode (shown below): SP does not remark customer DSCP values (SP uses
to Customer-Edge (CE) QoS policies independent MPLS EXP markings); final PE-to-CE policies are based on customer’s
consistent with their CE-to-PE policies. markings
Unshaded Areas
Shaded Area represents Service Provider DiffServ Domain represent Customer
DiffServ Domain
In addition to these PE-to-CE policies, 3) Assume a policer remarks
out-of-contract traffic’s
service providers will likely implement top-most MPLS label to 6) PE-to-CE policies
ingress policers on their PEs to identify MPLS EXP 0 MPLS VPN are based on
Customer-Markings
whether traffic flows are in- or out-of-
contract. Optionally, service providers may Provider (P)
Routers
also provision QoS policies within their core CE Router
CE Router
networks, using Differentiated Services PE Router PE Router
and/or MPLS Traffic Engineering (TE).
Optional: Core DiffServ or DSCP AF31 MPLS EXP 4 DSCP AF31
MPLS EXP 0
MPLS TE Policies
1) Packet initially MPLS EXP 4 MPLS EXP 0 7) Original customer-
PE Ingress DSCP AF31
Policing and marked to DSCP AF31 MPLS EXP 4 marked DSCP
MPLS VPN DSCP AF31 5) Topmost label Is values are preserved
Re-Marking
DSCP AF31 popped and
2) MPLS EXP values MPLS EXP value is
are set independently 4) Topmost label copied to
from DSCP values is marked down underlying label
by a policer
CE Router PE Router CE Router Direction of Packet Flow
PE Router
Required
P Routers PE-to-CE
Optional
LLQ/CBWFQ/WRED/
Shaping/LFI Service providers can guarantee service levels within their core by:
In order to guarantee end-to-end QoS, 1) Aggregate Bandwidth Overprovisioning: adding redundant links when
enterprises must co-manage QoS with utilization hits 50% (simple to implement, but expensive and inefficient)
their MPLS VPN service providers; 2) Core DiffServ policies: simplified DiffServ policies for core links
their policies must be both consistent 3) MPLS TE: TE provides granular policy-based control over traffic flows
within the core
and complementary.
IP07 QoS © 2004 Cisco Systems, Inc. All rights reserved. 72 szigeti@cisco.com 2004
IPSec VPNs achieve network segregation QoS Design for
and privacy via encryption. IPSec VPNs
are built by overlaying a point-to-point IPSec VPNs 2) Encryption/Decryption Delays
mesh over the Internet using Layer 3-
encrypted tunnels. Encryption/ decryption A marginal time element for encryption and decryption should be factored into the end-
is performed at these tunnel endpoints and to-end delay budget for realtime applications, such as VoIP. Typically these processes
the protected traffic is carried across the require 2-10 ms per hop, but may be doubled in the case of spoke-to-spoke VoIP calls that
shared network. are homed through a central VPN headend hub.
End-
End-to-
to-End Delay (Must Be < 150 ms)
The additional bandwidth required to
encrypt and authenticate a packet needs to 3) Anti-Replay Interactions
be factored into account when
provisioning QoS policies. Anti-Relay is a standards-defined mechanism to protect IPSec VPNs from hackers. If
packets arrive outside of a 64-byte window, then they are considered hacked and are
This is especially important for VoIP, dropped prior to decryption. QoS queuing policies may re-order packets such that they
where IPSec could more than double the fall outside of the Anti-Replay window. Therefore, IPSec VPN QoS policies need to be
size of a G.729 voice packet, as shown properly tuned to minimize Anti-Replay drops.
below. Outside
Window
G.729 VoIP
IP UDP RTP
60 Bytes Voice 64 Packet Sliding Window
Hdr Hdr Hdr 64 Packet Sliding Window
Æ
1 2 4 64 65 66 67
IPSec ESP ESP GRE IP GRE IP UDP RTP ESP ESP 3
Hdr Hdr IV Hdr Hdr Hdr Voice Pad/NH Auth
Hdr
Anti-Replay
20 4 20 8 12 20 12 Drop
20 8 8 2–257
IP07ESP
IPSec QoS
Tunnel Mode G.729 VoIP - 136
© 2004 Bytes
Cisco Systems, Inc. All rights reserved. 73 2004
szigeti@cisco.com
Q&A
NMS-2T30
9681_05_2004_c2
IP07 QoS © 2004 Cisco Systems, Inc. All rights reserved. 74
REFERENCES
NMS-2T30
9681_05_2004_c2 © 2004 Cisco Systems, Inc. All rights reserved. 75
Solution Reference Network Design Guides
Enterprise QoS Design Guide
http://www.cisco.com/go/srnd
http://www.cisco.com/go/srnd
http://www.cisco.com/go/srnd
• Classification Tools
http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123cgcr/qos_vcg.htm#1000913
• Link-Specific Tools
http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123cgcr/qos_vcg.htm#1001728
• Code Red
http://www.cisco.com/en/US/products/hw/routers/ps359/
products_tech_note09186a00800fc176.shtml
• Nimda
http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/
products_tech_note09186a0080110d17.shtml
• SQL Slammer
http://www.cisco.com/en/US/netsol/ns340/ns394/ns171/ns128/
networking_solutions_white_paper09186a00801cd7f5.shtml
• DCOM/W32/Blaster
http://www.cisco.com/en/US/netsol/ns340/ns394/ns171/ns128/
networking_solutions_white_paper09186a00801b2391.shtml
• Sasser
http://www.cisco.com/application/pdf/en/us/guest/netsol/ns441/
c664/cdccont_0900aecd800f613b.pdf
• NBAR Custom PDLM (Cisco IOS 12.3(4)T Documentation)
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t8/dtnbarad.htm
• AutoQoS VoIP for the Cisco Catalyst 6500 (Cisco Catalyst OS)
http://www.cisco.com/univercd/cc/td/doc/product/lan/cat6000/sw_8_3/confg_gd/autoqos.htm
ftp://ftpeng.cisco.com/szigeti/NW2004
9-hr Techtorial (450 slides)
Detailed designs and configs
LAN
Catalyst 2950
Catalyst 3550
Catalyst 2970/3750
Catalyst 4500
Catalyst 6500
WAN/Branch
Leased Lines
Frame Relay
ATM
ATM-to-FR SIW
ISDN
NBAR for Worm Policing
VPN
MPLS
IPSec (Site-to-Site)
IPSec (Teleworker)
http://www.ciscopress.com/title/1587051761
ISBN: 1587051761
Publish Date: Nov 9/04
LAN
Catalyst 2950
Catalyst 3550
Catalyst 2970/3560/3750
Catalyst 4500
Catalyst 6500
WAN/Branch
Leased Lines
Frame Relay
ATM
ATM-to-FR SIW
ISDN
NBAR for Worm Policing
VPN
MPLS (for Enterprise Subscribers)
MPLS (for Service Providers)
IPSec (Site-to-Site)
IPSec (Teleworker)
IP07 QoS © 2004 Cisco Systems, Inc. All rights reserved. 88
NMS-2T30
9681_05_2004_c2 © 2004 Cisco Systems, Inc. All rights reserved. 89