Professional Documents
Culture Documents
Introducing QoS
QoS Issues
QoS and Voice Traffic
QoS for Unified Communications Networks
QoS Requirements
Methods for Implementing QoS Policy
QoS Models
PSTN
Campus
Campus Backbone
Backbone WAN
Campus Campus
Backbone WAN Backbone
Traffic characteristics
Technology Problem example
Constant small-packet voice flow
Telephony “I cannot understand you; your
competes with bursty data flow
voice is breaking up.”
Critical traffic must get priority
Teleconferencing “The picture is very jerky. Voice is
Voice and video are time-sensitive not synchronized.”
Call Center “Please hold while my screen
Brief outages not acceptable refreshes.”
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-5
Quality Issues in Converged Networks
IP IP IP IP
Bottleneck
Bandwidth maximum = minimum of (10 Mb/s, 256 kb/s, 512 kb/s, 100 Mb/s) = 256 kb/s
Bandwidth available = bandwidth maximum/flows
cRTP data
Compress
the header.
IP TCP data
Advanced Queuing
Compress the payload.
Stacker
Compressed Packet Predictor Weighted Fair Queuing (WFQ)
Class-Based Weighted Fair Queuing (CBWFQ)
IP IP IP IP
Delay = P1 + Q1 + P2 + Q2 + P3 + Q3 + P4 = X ms
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-9
Types of Delay
Processing Delay: The time to take the packet from the input interface, examine it,
and put it into the output queue
Queuing Delay: The time a packet is held in the output queue
Serialization Delay: The time to place the “bits on the wire”
Propagation Delay: The time it takes to transmit a packet
Forwarding Serialization
Bandwidth
IP IP IP IP IP IP IP IP IP IP IP IP IP
Processing Queuing
Delay Delay
Propagation Delay
cRTP data
Compress
the header.
Tail drops occur when the output queue is full. These are common drops,
which happen when a link is congested.
Many other types of drops exist, usually the result of router congestion,
that are uncommon and may require a hardware upgrade (input drop,
ignore, overrun, frame errors).
Forwarding
IP IP IP IP IP IP IP IP IP IP
Tail Drop
IP Data
Dropper Advanced Queuing
Consistent,
Predictable Performance
Network audit
– Identify traffic on the
network
Network
Business audit Statistics
– Determine how each type
of traffic is important for
Service
business
Provider
Service levels required
– Determine required
response time
Differentiated IP Services
Application Mission-
Guaranteed
Traffic Critical
Traffic
Classification
E-Commerce, Transactional Guaranteed Delivery
Web Browsing
Service
Provider
Traditional method
Nonmodular
interface Multilink1
Cannot separate ip address 10.1.61.1 255.255.255.0
traffic classification ip tcp header-compression iphc-format
from policy definitions load-interval 30
custom-queue-list 1
Used to augment or
ppp multilink
fine-tune newer
ppp multilink fragment-delay 10
AutoQoS method
ppp multilink interleave
multilink-group 1
ip rtp header-compression iphc-format
!
AutoQoS AutoQoS
CLI MQC
VoIP Enterprise
Ease of use Poor Easier Simple Simple
Ability to
OK Very good Very good Very good
fine-tune
Time to
Longest Average Shortest Shortest
deploy
Modularity Poor Excellent Excellent Excellent
DiffServ Model
DSCP Encoding
DiffServ Per-Hop Behaviors
DiffServ Class Selector
DiffServ QoS Mechanisms
Cisco QoS Baseline Model
BA 1 BA 2
Voice Voice Voice FTP from A to B FTP from A to B FTP from A to B
DSCP 46 DSCP 46 DSCP 46 DSCP 22 DSCP 22 DSCP 22
Host A
Host B
Traffic Flow
Classify and
Match DSCP Match DSCP Match DSCP
mark with
and select per- and select per- and select per-
DSCP at
hop-behavior. hop-behavior. hop-behavior.
network edge.
DS field: The IPv4 header ToS octet or the IPv6 traffic class octet, when
interpreted in conformance with the definition given in RFC 2474
DSCP: The first six bits of the DS field, used to select a PHB (forwarding
and queuing method)
ToS Header
Version IHL Len ID Flags Offset TTL Proto SA DA
Byte Checksum
0 1 2 3 4 5 6 7
0 1 2 3 4 5
1 0 1 1 1 0 DSCP
EF PHB:
– Ensures a minimum departure rate
– Guarantees bandwidth (the class is guaranteed an amount
of bandwidth with prioritized forwarding)
– Polices bandwidth (excess traffic is dropped)
DSCP value 101110:
– Looks like IP precedence 5 to non-DiffServ devices
– Bits 0 to 2: 101 = 5 (same bits as for IP precedence)
– Bits 3 to 4: 11 (same bits as drop probability, fixed value in EF PHB)
– Bit 5: Just 0
0 1 2 3 4 5
1 0 1 1 1 0 DSCP
No Drop
5 Probability
0
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-47
Assured Forwarding PHB
AF PHB:
– Guarantees bandwidth
– Allows access to extra bandwidth, if available
Four standard classes (af1, af2, af3, and af4)
DSCP value range: aaadd0
– Where aaa is a binary value of the class
– Where dd is drop probability
0 1 2 3 4 5
1 0 0 1 1 0 DSCP
aaa dd 0
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-48
Assured Forwarding PHB (Cont.)
0 0 1 0 1 0 DSCP = AF11
Class Value
AF1 001 dd 0
Drop
AF2 010 dd 0 Probability Value
AF
Value
(dd)
AF3 011 dd 0
Low 01 AF11
AF4 100 dd 0 Medium 10 AF12
High 11 AF13
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-49
Assured Forwarding PHB (Cont.)
Drop
Class AF1 Class AF2 Class AF3 Class AF4
Probability
Low drop AF11 AF21 AF31 AF41
probability 001010 010010 011010 100010
Decimal: 10 Decimal: 18 Decimal: 26 Decimal: 34
Medium drop AF12 AF22 AF32 AF42
probability 001100 010100 011100 100100
Decimal: 12 Decimal: 20 Decimal: 28 Decimal: 36
0 1 2 3 4 5
x x x 0 0 0 DSCP
IP Precedence
IPv4 IP Precedence
Class
Selector
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-52
DiffServ QoS
Mechanisms
Mission-Critical
Transactional
Transactional
Transactional
Transactional
Transactional
IP
IP
IP IP
Service
Provider
Input Output
Interface Interface
Voice
33 11
1Voice
33
Mission-Critical Mission-Critical
111
Transactional
33 11
Transactional
Service
Provider
Input Output
Interface Interface
Voice Marked
Mission-Critical Mission-Critical Queue (40% bandwidth)
Packets
Transactional
Transactional Queue (20% bandwidth)
Service
Provider
Input Output
Interface Interface
Service
Provider
Input Output
Interface Interface
Voice 121
IP
IP
IP IP
Service
Provider
Input Output
Interface Interface
Voice 121
Mission-Critical
Mission-Critical 199 UNDER LIMIT AGAIN
Mission-Critical (Use Buffered Packets)
Service
Provider
Input Output
Interface Interface
2 or 4 Bytes 20 Bytes
Service
Provider
Input Output
Interface Interface
Service
Provider
Input Output
Interface Interface
Service
Provider
Input Output
Interface Interface
Classify Congestion
Management
(As close to the Mark (Always)
source as possible) Mark
Congestion (High-speed to
Avoidance low-speed links or
aggregation points)
Shaping
(Coming from a Policing Policing
higher-speed link or
aggregation) Compression
Fragmentation (Low-speed
and Interleaving WAN links)
Network IP Routing
Control Network Mgmt
Critical
Data Critical Data Mission Critical
Critical Data
Transactional
Bulk Data Bulk Data
Best Best Effort Best Effort Best Effort
Effort Scavenger Scavenger Scavenger
Model selection based on enterprise requirements
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-68
Quality of Service
1 2 3
Class Map Policy Map Service Policy
One class map can use another class map for classification.
Nested class maps allow generic template class maps to be
used in other class maps.
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-78
Configuring Classification with MQC (Cont.)
router(config-cmap)#
match not match-criteria
The not keyword inverts the condition.
router(config-cmap)#
match any
The any keyword can be used to match all packets.
router(config-cmap)#
match access-group {number | name} [name]
Attaches an ACL to a class map.
class-map Well-known-services
match access-group 100
class-map All-services
match any
access-list 100 permit tcp any any lt 1024
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-79
Configuring Classification Using Input
Interface and RTP Ports
router(config-cmap)#
match input-interface interface-name
All packets received through the selected input interface are matched
by this class map.
router(config-cmap)#
match ip rtp starting-port-number port-range
Matches UDP packets with source or destination port numbers
within the specified range.
Range is between the starting port (values from 2000 to 65535) and
the sum of the starting port and the port-range (values from 0 to
16383).
router(config)#
policy-map policy-map-name
Creates a policy map and enters policy map configuration mode
router(config-pmap-c)#
set cos cos-value
set ip precedence ip-precedence-value
set [ip] dscp ip-dscp-value
set mpls experimental mpls-experimental-value
Marks packets in traffic class using CoS, IP precedence, DSCP, or MPLS
EXP
CoS option available for interfaces with ISL/802.1Q encapsulation
router(config-if)#
service-policy {input | output} policy-map-name
Associates the policy map to an input or output interface
class-map RTP_subnet_10_1_1
match access-group 100
!
!
policy-map Set-EF-PHB
class RTP_subnet_10_1_1
set dscp ef
!
access-list 100 permit udp 10.1.1.0 0.0.0.255 range 8766 35000
any range 8766 35000
!
interface FastEthernet 0/0
service-policy input Set-EF-PHB
Class1 Class2
Step 1 class-map Class1 class-map Class2
match access-group 100 match access-group 101
Policy1
policy-map Policy1
class Class1
Step 3
priority 100 Interface1
Step 2 class Class2
interface GigabitEthernet 0/0/1/9
bandwidth 8
service-policy output Policy1
class class-default
Grandparent
Child Policy Parent Policy
Policy
Modification of the place where you apply the Interface1 Interface2 Interface3
policy: If you want to apply a policy on a different
interface.
Class Customer-Control-in
Classification statistics (packets/bytes) (rate - kbps)
Matched : 0/0 0
Transmitted : N/A
Total Dropped : N/A
Class Customer-Real-Time-in
Classification statistics (packets/bytes) (rate - kbps)
Matched : 10/1180 0
Transmitted : N/A
Total Dropped : N/A
Class class-default
Classification statistics (packets/bytes) (rate - kbps)
Matched : 38/3384 0
Transmitted : N/A
Total Dropped : N/A
GigabitEthernet0/0/1/0 direction output: Service Policy not installed
Trust Boundary
Trust Boundary?
Trust Boundary?
can (and by default – Voice: ToS or DSCP
does) reclassify
CoS = 5
CoS but not DSCP
ToS = 5
DSCP = EF
– PC:
Reclassify
CoS = 0
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-101
Configuring Trust Boundary
switch(config-if)#
mls qos trust [cos [pass-through dscp] | dscp]
mls qos trust device cisco-phone
Configures the port to trust state on an interface
If CoS is trusted:
– CoS is used to select the ingress and egress queues
– No pass-through DSCP:
DSCP modified according to the CoS-to-DSCP mapping
– Pass-through DSCP:
Original DSCP retained from ingress to egress
If DSCP is trusted, the DSCP field is retained.
– CoS modified according to the DSCP-to-CoS map
– For non-IP packets CoS set to 0, and DSCP-to-CoS map not applied
device cisco-phone enables the Cisco Discovery Protocol trusted boundary
feature.
– Otherwise, disables the trusted setting on the switch port to prevent misuse of
the priority queue
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-102
Trust Boundary Configuration Example
mls qos
Traffic sent from the IP interface Fastethernet0/1
description To Phone1
phone to the switch is switchport mode access
trusted to ensure that mls qos trust cos
mls qos trust device cisco-phone
voice traffic is properly switchport voice vlan 110
switchport access vlan 10
prioritized. interface Fastethernet0/16
description To Distribution Switch
switchport mode trunk
mls qos trust dscp
COS = 0 COS = 7
Ethernet Header
Data
(802.1Q/ISL)
Ethernet
Label EXP S TTL
Header
CoS 5 = PQ
Service
Provider
CoS 5 = PQ
Service
Provider
2950
Packet flow
switch(config)#
mls qos map cos-dscp dscp1...dscp8
Defines eight DSCP values that correspond to CoS values 0 to 7
Mapping performed only on ports that trust incoming CoS
switch(config)#
mls qos map dscp-cos dscp-list to cos
Maps dscp-list (up to 13 DSCP values) to the corresponding CoS
value (range from 0 to 7)
mls qos
mls cos map cos-dscp 0 10 18 26 34 46 48 56
!
interface Fastethernet0/1
switchport mode trunk
mls qos trust cos
!Map to DSCP using the mapping table
!
interface Fastethernet0/2
switchport mode access
mls qos cos 1
!Untagged frames get CoS=1 instead of default 0
mls qos trust cos
!Packets from IP phone are mapped using CoS-DSCP table
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-111
Link Speeds and
QoS Implications
Fragment Size
Configuration steps:
Enable MLP on an interface (using a multilink group interface)
Enable MLP interleaving on the multilink interface
Specify maximum fragment size by setting the maximum delay
on the multilink interface
router(config-if)#
ppp multilink interleave
Enables interleaving of frames with fragments
router(config-if)#
ppp multilink fragment delay delay
Configures maximum fragment delay in milliseconds or microseconds
Router calculates the maximum fragment size from the interface bandwidth
and the maximum fragment delay
Fragment size = interface bandwidth * max fragment delay
Default maximum fragment delay is 30 ms
Serial 0/0
WAN
Encapsulation PPP
interface Multilink1
ip address 172.22.130.1 255.255.255.252
ppp multilink
ppp multilink group 1
ppp multilink fragment delay 10
ppp multilink interleave
bandwidth 128
service-policy output llq-policy
!
interface Serial0/0
no ip address
encapsulation ppp
ppp multilink
ppp multilink group 1
6 20 8 12 20 6 2 20
46 20 8 20
Overhead = 46 / (46 + 20) = 70% Overhead = 8 / (8 + 20) = 29%
Delay = (46 + 20) / 64 kb/s * 8 = 8 ms Delay = (8 + 20) / 64 kb/s * 8 = 3.5 ms
Bandwidth = (46 + 20) * 50 * 8 = 26.4 kb/s Bandwidth = (8 + 20) * 50 * 8 = 11.2 kb/s
2 voice sessions / 64 kb/s 5 voice sessions / 64 kb/s
router(config-pmap-c)#
compression header ip [rtp | tcp ]
Enables RTP or TCP IP header compression:
– In a policy map
– For a specific traffic class
If the rtp or tcp option is not specified, both RTP and TCP
header compressions are configured.
The number of concurrent compressed connections is
automatically determined based on interface bandwidth.
Can be used at any level in the policy map hierarchy
configured with MQC.
Serial 0/0
WAN
Encapsulation PPP
class-map voip
match protocol rtp
!
policy-map cust1
class voip
priority 384
compression header ip rtp
!
<output omitted>
!
interface serial0/0
service-policy output cust1
<output omitted>
IP IP IP IP IP
IP IP IP IP IP
1000 Mb/s
HQ
1 Mb/s 2 Mb/s
WAN
Chokepoint
Remote
IP IP IP IP IP
1000 Mb/s
1000 Mb/s
Chokepoint
Congestion:
– Hardware queue is full
– Hardware queue always FIFO
No congestion:
– Packets bypass software queue and go directly into hardware queue
Hardware Hardware
queue full? No Queue (TxQ)
Yes
Software
Queue
BW
Sub-If .1 Add/Drop Queue 1
Interface
Shaper Hardware
Queue
BW
Sub-If .2 Add/Drop Queue 2
MQC Policy
3
1
2
Transmit, drop, or
Classify Policer mark, then transmit
the packets.
3
1
2
Buffer
Classify Shaper exceeding
packets.
Traffic
Time Time
Policing Shaping
Number of tokens
Outgoing Packet sufficient for Hardware
packet size? Queue
Interface
Token Bucket
700
Bytes
Conform
Transmit
Token Bucket
200
Bytes
Remain
Exceed
3300 Bytes
300
00 By
By tes
30
tes Drop
0
By
tes
Token bucket
Bc
Bc Be
Packet of No No
B < TC B < TE
Size B
Yes Yes
Conform Exceed Violate
Tp Tc
Packet No No
B > Tp B > Tc
of Size B
Yes Yes
Violate Exceed Conform
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-143
Configuring Class-Based
Policing
Feature Description
Configuration MQC
method
Implementations Single or dual token bucket, single or dual rate
Conditions Conform, exceed, violate
Actions Drop, set (remark), transmit
Multiactions Applying two or more set parameters as a conform
or exceed or violate action
router(config-pmap-c)#
police {cir cir} [bc conform-burst] {pir pir} [be peak-
burst] [conform-action action] [exceed-action action]
[violate-action action]
Specifies both the CIR and the PIR for two-rate traffic
policing
CIR = committed information rate (b/s)
PIR = peak information rate (b/s)
The Bc and Be keywords and their associated arguments
(conform-burst and peak-burst, respectively) are optional.
– bc default: 1500 bytes or CIR / 32, whichever is higher
– be default: Equal to Bc
Fast 0/0
Police incoming traffic
www.456.com from the web servers.
class-map www.123.com
match source-address mac 000d.dddf.0480
!
class-map www.456.com
match source-address mac 000d.dddc.ad21
!
policy-map ServerFarm
class www.123.com
police 512000 conform-action transmit exceed-action drop
class www.456.com
police 256000 conform-action transmit exceed-action drop
!
interface FastEthernet 0/0
service-policy input ServerFarm
Fast 0/0
Police incoming traffic
www.456.com from the web servers.
class-map www.123.com
match source-address mac 000d.dddf.0480
!
class-map www.456.com
match source-address mac 000d.dddc.ad21
!
policy-map ServerFarm
class www.123.com
police 512000 conform-action set-prec-transmit 4 exceed-action
set-prec-transmit 3 violate-action drop
class www.456.com
police 256000 conform-action set-prec-transmit 4 exceed-action
set-prec-transmit 3 violate-action drop
!
interface FastEthernet 0/0
service-policy input ServerFarm
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-148
Class-Based Shaping
router(config-pmap-c)#
shape {average | peak} average-bit-rate [Bc] [Be]
shape {average | peak} percent [Bc] [Be]
Configures shaper in b/s or percent
Recommended to omit the Bc and Be to let Cisco IOS
Software select optimal values
Shaping to 16 kb/s
Serial 0/0
IP WAN
Serial 0/1
Shaping to 32 kb/s
class-map Shape
match protocol citrix
!
policy-map ShapeAvg
class Shape
shape average 16000 Cisco IOS Software calculated values:
! Bc = Be = 8000 bits, Tc = 500 ms
policy-map ShapePeak
class Shape
shape peak 16000 Peak rate = Avg. rate * (1 + Be / Bc)
! = 16000 * (1 + 8000 / 8000)
interface Serial0/0
= 32000 b/s
service-policy output ShapeAvg
!
interface Serial0/1
service-policy output ShapePeak
Child
Policy Map
Shape policy-map child-cbwfq
cust1 384 kb/s class subclass-x
bandwidth percent 50
class subclass-y
bandwidth percent 20
class subclass-z
subclass-x subclass-y subclass-z bandwidth percent 10
!
50% 20% 10% policy-map shape-all
class class-default
Parent shape average 384000
service-policy child-cbwfq
Policy Map
!
interface Serial 0/0
service out cust-policy
CBWFQ:
Mechanism that is used to guarantee bandwidth to classes
– Each class has a reserved queue
– Each class can perform WRED to avoid congestion
– Each class gets more than reserved bandwidth when there is no
congestion
Unused bandwidth allocated proportionally to guarantees
LLQ:
Adds priority queue to CBWFQ for real-time traffic
High-priority class:
– Low-latency propagation of packets
– Guaranteed bandwidth
– Policing to guaranteed bandwidth when congestion occurs
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—6-156
LLQ Architecture
Priority BW Priority
class? Policing Queue
Interface
CBWFQ Hardware
Queue
Tail Drop BW
Class1? Queue 1
(WRED)
CBWFQ
Schedule
r
Class Tail Drop Default BW
default? (WRED) Queue
router(config-pmap-c)#
bandwidth {bw-kbps | remaining percent percentage |
percent percentage}
Allocates a fixed amount of bandwidth to a class, in kb/s or percent of the configured
(or default) interface bandwidth—CBWFQ portion of LLQ system
Remaining percent allocates a percentage of available bandwidth
class-map voip
match ip precedence 5
!
class-map mission-critical
match ip precedence 3 4
!
class-map transactional
match ip precedence 1 2
!
policy-map Policy1
class voip
priority percent 10
class mission-critical
bandwidth percent 30
random-detect
class transactional
bandwidth percent 20
random-detect
class class-default
fair-queue
random-detect