Sunteți pe pagina 1din 1092

QoS

Implementing Cisco
Quality of Service
Volume 1
Version 2.3

Student Guide

Text Part Number: 97-2810-02












Student Guide 2009 Cisco Systems, Inc. All Rights Reserved.







































DISCLAIMER WARRANTY: THIS CONTENT IS BEING PROVIDED AS IS. CISCO MAKES AND YOU RECEIVE NO WARRANTIES IN
CONNECTION WITH THE CONTENT PROVIDED HEREUNDER, EXPRESS, IMPLIED, STATUTORY OR IN ANY OTHER PROVISION OF
THIS CONTENT OR COMMUNICATION BETWEEN CISCO AND YOU. CISCO SPECIFICALLY DISCLAIMS ALL IMPLIED
WARRANTIES, INCLUDING WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR
PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. This learning product may contain early release
content, and while Cisco believes it to be accurate, it falls subject to the disclaimer above.




Students, this letter describes important
course evaluation access information!
Welcome to Cisco Systems Learning. Through the Cisco Learning Partner Program,
Cisco Systems is committed to bringing you the highest-quality training in the industry.
Cisco learning products are designed to advance your professional goals and give you
the expertise you need to build and maintain strategic networks.
Cisco relies on customer feedback to guide business decisions; therefore, your valuable
input will help shape future Cisco course curricula, products, and training offerings.
We would appreciate a few minutes of your time to complete a brief Cisco online
course evaluation of your instructor and the course materials in this student kit. On the
final day of class, your instructor will provide you with a URL directing you to a short
post-course evaluation. If there is no Internet access in the classroom, please complete
the evaluation within the next 48 hours or as soon as you can access the web.
On behalf of Cisco, thank you for choosing Cisco Learning Partners for your
Internet technology training.
Sincerely,
Cisco Systems Learning

Table of Contents
Volume 1
Course Introduction 1
Overview 1
Learner Skills and Knowledge 2
Course Goal and Objectives 3
Course Flow 4
Additional References 5
Cisco Glossary of Terms 5
Your Training Curriculum 6
Your Training Curriculum 10
Introduction to QoS 1-1
Overview 1-1
Module Objectives 1-1
Understanding the Need for QoS 1-3
Overview 1-3
Objectives 1-3
Converged Networks 1-4
Converged Networks Quality Issues 1-6
Available Bandwidth 1-8
End-to-End Delay 1-10
Example: Effects of Delay 1-10
Packet Loss 1-14
Summary 1-17
Understanding QoS 1-19
Overview 1-19
Objectives 1-19
QoS Defined 1-20
QoS for Converged Networks 1-21
Example: Three Steps to Implementing QoS on a Network 1-21
QoS Requirements 1-22
QoS Traffic Classes 1-26
Example: Traffic Classification 1-26
QoS Policy 1-27
Example: Defining QoS Policies 1-27
Summary 1-30
Implementing QoS 1-31
Overview 1-31
Objectives 1-31
Methods for Implementing QoS Policy 1-32
Legacy CLI 1-34
Modular QoS CLI 1-35
AutoQoS VoIP and Enterprise 1-36
QoS Implementation Methods Compared 1-38
QoS Policy Manager 1-39
Network MIBs for Monitoring QoS 1-41
MIBs for Managing QoS 1-42
Summary 1-45
Module Summary 1-47
References 1-48
Module Self-Check 1-49
Module Self-Check Answer Key 1-51
ii Implementing Cisco Quality of Service (QoS) v2.3 2009 Cisco Systems, Inc.
The Building Blocks of QoS 2-1
Overview 2-1
Module Objectives 2-1
Identifying Models for Implementing QoS 2-3
Overview 2-3
Objectives 2-3
QoS Models 2-4
Best-Effort Model 2-5
IntServ Model 2-7
DiffServ Model 2-12
Summary 2-14
Understanding the Integrated Services Model 2-15
Overview 2-15
Objectives 2-15
Integrated Services Model 2-16
Components of RSVP 2-20
RSVP Interface Bandwidth Queuing 2-21
Enabling RSVP on an Interface 2-22
IntServ and DiffServ Integration 2-23
Summary 2-24
Understanding the Differentiated Services Model 2-25
Overview 2-25
Objectives 2-25
Differentiated Services Model 2-26
DSCP Encoding 2-28
Per-Hop Behaviors 2-31
Backward Compatibility Using the Class Selector 2-36
Summary 2-37
Identifying QoS Mechanisms 2-39
Overview 2-39
Objectives 2-39
QoS Mechanisms 2-40
Classification 2-41
Marking 2-42
Congestion Management 2-43
Congestion Avoidance 2-44
Policing and Shaping 2-45
Link Efficiency Mechanisms 2-47
Link Fragmentation and Interleaving 2-48
Applying QoS to Input and Output Interfaces 2-49
Summary 2-50
Module Summary 2-51
References 2-51
Module Self-Check 2-53
Module Self-Check Answer Key 2-55
2009 Cisco Systems, Inc. Implementing Cisco Quality of Service (QoS) v2.3 iii
Introduction to MQC and Cisco AutoQoS 3-1
Overview 3-1
Module Objectives 3-1
Introducing MQC 3-3
Overview 3-3
Objectives 3-3
Modular QoS CLI 3-4
Example: Advantages of Using MQC 3-4
Modular QoS CLI Components 3-5
Example: Configuring MQC 3-5
Class Maps 3-6
Configuring and Monitoring Class Maps 3-8
Example: Class Map Configuration 3-8
Example: Using the match Command 3-11
Example: Nested Traffic Class to Combine match-any and match-all Characteristics in One
Traffic Class 3-11
Policy Maps 3-15
Configuring and Monitoring Policy Maps 3-16
Example: Policy Map Example 3-19
Example: Hierarchical Policy Maps 3-21
Example: Hierarchical Policy-Map Configuration 3-22
Service Policy 3-27
Attaching Service Policies to Interfaces 3-28
Example: Complete MQC Configuration 3-29
Summary 3-30
Introducing Cisco AutoQoS VoIP 3-31
Overview 3-31
Objectives 3-31
Cisco AutoQoS VoIP 3-32
Cisco AutoQoS VoIP Router Platforms 3-36
Cisco AutoQoS VoIP Switch Platforms 3-37
Configuring Cisco AutoQoS VoIP 3-39
Example: Configuring the Cisco AutoQoS VoIP Feature on a High-Speed Serial Interface 3-42
Example: Using the Port-Specific Cisco AutoQoS Macro 3-46
Monitoring Cisco AutoQoS VoIP 3-48
Example: show auto qos and show auto qos interface 3-49
Automation with Cisco AutoQoS 3-57
Summary 3-58
Introducing Cisco AutoQoS for the Enterprise 3-59
Overview 3-59
Objectives 3-59
Cisco AutoQoS for the Enterprise 3-60
Cisco AutoQoS for the Enterprise Router Platforms 3-63
Configuring Cisco AutoQoS for the Enterprise 3-65
Example: Configuring the Cisco AutoQoS Discovery Feature on a
High-Speed Serial Interface 3-68
Example: Configuring the Cisco AutoQoS for the Enterprise Feature on a High-Speed Serial
Interface 3-68
Monitoring Cisco AutoQoS for the Enterprise 3-69
Example: show auto qos and show auto qos interface 3-70
Summary 3-73
Module Summary 3-75
References 3-76
Module Self-Check 3-77
Module Assessment Answer Key 3-78
iv Implementing Cisco Quality of Service (QoS) v2.3 2009 Cisco Systems, Inc.
Classification and Marking 4-1
Overview 4-1
Module Objectives 4-1
Understanding Classification and Marking 4-3
Overview 4-3
Objectives 4-3
Classification 4-4
Marking 4-5
Classification and Marking at the Data-Link Layer 4-6
Classification and Marking at the Network Layer 4-11
Mapping CoS to Network Layer QoS 4-12
QoS Service Class Defined 4-14
Example: Defining QoS Service Classes 4-15
Implementing a QoS Policy Using a QoS Service Class 4-16
Trust Boundaries 4-24
Summary 4-26
Using MQC for Classification 4-27
Overview 4-27
Objectives 4-27
MQC Classification Options 4-28
Configuring Classification with MQC 4-31
Monitoring Class Maps 4-44
Summary 4-45
Using MQC for Class-Based Marking 4-47
Overview 4-47
Objectives 4-47
Class-Based Marking Overview 4-48
MQC Marking Options 4-49
Configuring Class-Based Marking 4-51
Monitoring Class-Based Marking 4-61
Summary 4-64
Using NBAR for Classification 4-65
Overview 4-65
Objectives 4-65
Network-Based Application Recognition 4-66
NBAR Application Support 4-70
Packet Description Language Module 4-77
NBAR and Custom Protocols 4-79
Protocol Discovery 4-80
Configuring and Monitoring NBAR 4-83
Summary 4-107
Configuring QoS Preclassify 4-109
Overview 4-109
Objectives 4-109
QoS Issues with VPNs 4-110
ToS Byte Preservation 4-111
QoS Preclassify 4-113
Configuring QoS Preclassify 4-116
Monitoring QoS Preclassify 4-118
Summary 4-122
2009 Cisco Systems, Inc. Implementing Cisco Quality of Service (QoS) v2.3 v
Configuring QoS Policy Propagation via BGP 4-123
Overview 4-123
Objectives 4-123
QoS Policy Propagation via BGP 4-124
QoS and BGP Interaction 4-126
Cisco Express Forwarding 4-127
QPPB Configuration Tasks 4-131
Configuring QPPB 4-132
Example: Configuration 4-136
Example: Configuring QPPB 4-138
Summary 4-145
Configuring LAN Classification and Marking 4-147
Overview 4-147
Objectives 4-147
LAN-Based Classification and Marking 4-149
QoS Trust Boundaries 4-150
LAN Classification and Marking Platforms 4-153
Example: Configure Trust Settings on the Cisco Catalyst 2950 Series Switches 4-162
Example: QoS Mechanisms on the Cisco Catalyst 2950 Switch 4-163
Example: QoS Mechanisms on Cisco Catalyst 2960 Series Switches 4-164
Configuring LAN-Based Classification and Marking 4-175
Monitoring LAN-Based Classification and Marking 4-193
Summary 4-197
Understanding QoS in the Life of a Packet 4-199
Overview 4-199
Objectives 4-199
QoS and Packets 4-200
Life of a High-Priority VoIP Packet 4-201
Life of a Low-Priority FTP Packet 4-209
Summary 4-218
Module Summary 4-219
References 4-220
Module Self-Check 4-223
Module Self-Check Answer Key 4-225




























Table of Contents
Volume 2
Congestion Management 5-1
Overview 5-1
Module Objectives 5-1
Introducing Queuing 5-3
Overview 5-3
Objectives 5-3
Congestion and Queuing 5-4
Queuing Algorithms 5-7
First In First Out 5-9
Priority Queuing 5-10
Round Robin 5-11
Weighted Round Robin 5-12
Deficit Round Robin 5-14
Custom Queuing 5-19
Summary 5-21
Understanding Queuing Implementations 5-23
Overview 5-23
Objectives 5-23
Queuing Components 5-24
Hardware Queue (TxQ) Size 5-27
Congestion on Software Interfaces 5-29
Queuing Implementations in Cisco IOS Software 5-30
Summary 5-31
Configuring FIFO and WFQ 5-33
Overview 5-33
Objectives 5-33
FIFO Queuing 5-34
Weighted Fair Queuing 5-36
WFQ Classification 5-39
WFQ Insertion and Drop Policy 5-42
WFQ Scheduling 5-50
Benefits and Drawbacks of WFQ 5-51
Configuring WFQ 5-52
Monitoring WFQ 5-56
Summary 5-59
Configuring CBWFQ and LLQ 5-61
Overview 5-61
Objectives 5-61
CBWFQ and LLQ 5-62
Class-Based Weighted Fair Queuing 5-63
CBWFQ Architecture 5-64
CBWFQ Benefits 5-70
Configuring and Monitoring CBWFQ 5-71
Low-Latency Queuing 5-76
LLQ Architecture 5-78
LLQ Benefits 5-79
Configuring and Monitoring LLQ 5-82
Example: Calculating LLQ Bandwidth Required for VoIP 5-84
Summary 5-87
ii Implementing Cisco Quality of Service (QoS) v2.3 2009 Cisco Systems, Inc.
Configuring LAN Congestion Management 5-89
Overview 5-89
Objectives 5-89
Queuing on Catalyst Switches 5-90
Weighted Round Robin 5-99
Configuring CoS-to-Queue Mappings for PQ on Catalyst 2950 Switches 5-101
Configuring WRR on Catalyst 2950 Switches 5-102
Weighted Tail Drop 5-104
Configuring WTD on Catalyst 2960 Switches 5-106
Shaped Round Robin 5-111
Configuring SRR on Catalyst 2960 Switches 5-116
Monitoring Queuing on Catalyst 2950 and 2960 Switches 5-122
Summary 5-128
Module Summary 5-131
References 5-132
Module Self-Check 5-133
Module Self-Check Answer Key 5-135
Congestion Avoidance 6-1
Overview 6-1
Module Objectives 6-1
Introducing Congestion Avoidance 6-3
Overview 6-3
Objectives 6-3
Behavior of TCP Senders and Receivers 6-4
Example: Windowing in TCP 6-5
Congestion and TCP 6-6
Managing Interface Congestion with Tail Drop 6-9
Tail Drop Limitations 6-10
Summary 6-13
Introducing RED 6-15
Overview 6-15
Objectives 6-15
Random Early Detection 6-16
RED Profiles 6-17
RED Modes 6-19
TCP Traffic Before and After RED 6-20
Applying Congestion Avoidance 6-22
Summary 6-23
Configuring Class-Based Weighted RED 6-25
Overview 6-25
Objectives 6-25
Weighted Random Early Detection 6-26
WRED Profiles 6-30
Configuring CBWRED 6-35
Example: CBWFQ Using IP Precedence with CBWRED 6-41
Configuring DSCP-Based CBWRED 6-43
Example: CBWRED Using DSCP with CBWFQ 6-46
Monitoring CBWRED 6-48
Summary 6-49
2009 Cisco Systems, Inc. Implementing Cisco Quality of Service (QoS) v2.3 iii
Configuring Explicit Congestion Notification 6-51
Overview 6-51
Objectives 6-51
Explicit Congestion Notification 6-52
ECN Field Defined 6-54
ECN and WRED 6-55
Configuring ECN-Enabled WRED 6-58
Monitoring ECN-Enabled WRED 6-59
Summary 6-62
Module Summary 6-63
References 6-64
Module Self-Check 6-65
Module Self-Check Answer Key 6-69
Traffic Policing and Shaping 7-1
Overview 7-1
Module Objectives 7-1
Understanding Traffic Policing and Shaping 7-3
Overview 7-3
Objectives 7-3
Traffic Policing and Shaping Overview 7-4
Why Use Traffic Conditioners? 7-5
Example: Traffic Policing 7-7
Example: Traffic Shaping 7-8
Policing vs. Shaping 7-9
Measuring Traffic Rates 7-10
Example: Token Bucket as a Coin Bank 7-11
Single Token Bucket Class-Based Policing 7-12
Dual Token Bucket Class-Based Policing 7-13
Dual-Rate Token Bucket Class-Based Policing 7-15
Example: Dual-Rate Token Bucket as a Coin Bank 7-17
Class-Based Traffic Shaping 7-18
Cisco IOS Traffic Policing and Shaping Mechanisms 7-19
Applying Traffic Conditioners 7-21
Summary 7-24
Configuring Class-Based Policing 7-25
Overview 7-25
Objectives 7-25
Class-Based Policing Overview 7-26
Configuring Single-Rate Class-Based Policing 7-28
Example: Single Rate, Dual Token Bucket Class-Based Policing 7-32
Example: Multiaction Class-Based Policing 7-33
Configuring Dual-Rate Class-Based Policing 7-34
Example: Dual-Rate Class-Based Policing 7-37
Configuring Percentage-Based Class-Based Policing 7-38
Example: Configuring Percentage-Based Class-Based Policing 7-39
Monitoring Class-Based Policing 7-40
Summary 7-42
iv Implementing Cisco Quality of Service (QoS) v2.3 2009 Cisco Systems, Inc.
Configuring Class-Based Shaping 7-43
Overview 7-43
Objectives 7-43
Class-Based Shaping Overview 7-44
Traffic Shaping Methods 7-45
Configuring Class-Based Shaping 7-46
Example: Average Rate, Peak Rate 7-47
Example: Class-Based Shaping with CBWFQ 7-49
Example: Class-Based Shaping Hierarchical Policy Maps 7-50
Monitoring Class-Based Shaping 7-51
Summary 7-53
Configuring Class-Based Shaping on Frame Relay Interfaces 7-55
Overview 7-55
Objectives 7-55
Frame Relay Refresher 7-56
Frame Relay Congestion Control 7-57
Frame Relay Congestion Adaptation 7-58
FECN-to-BECN Propagation 7-59
Configuring Frame Relay Adaptive Class-Based Shaping 7-60
Example: Class-Based Shaping with Frame Relay Adaptation 7-61
Monitoring MQC-Based Frame Relay Traffic Shaping 7-62
Example: MQC-Based Frame Relay Traffic Shaping on Multipoint Main Interface 7-63
Summary 7-66
Frame Relay Voice-Adaptive Traffic Shaping and Fragmentation 7-67
Overview 7-67
Objectives 7-68
Frame Relay Voice-Adaptive Traffic Shaping and Fragmentation 7-69
Benefits in Deploying Frame Relay Voice-Adaptive Traffic Shaping 7-71
Prerequisites for Deploying Frame Relay Voice-Adaptive Traffic Shaping 7-72
Supported Platforms 7-73
Frame Relay Voice-Adaptive Traffic Shaping and Fragmentation Operation 7-74
Configuring the Frame Relay Voice-Adaptive Feature 7-75
Monitoring the Frame Relay Voice-Adaptive Feature 7-79
Summary 7-81
Module Summary 7-83
References 7-84
Module Self-Check 7-85
Module Self-Check Answer Key 7-87
Link Efficiency Mechanisms 8-1
Overview 8-1
Module Objectives 8-1
Understanding Link Efficiency Mechanisms 8-3
Overview 8-3
Objectives 8-3
Link Efficiency Mechanisms Overview 8-5
Example: Indexing Operations 8-7
L2 Payload Compression 8-8
Example: L2 Payload Compression Results 8-9
Header Compression 8-10
Example: Header Compression Results 8-11
Large Packets Freeze Out Voice on Slow WAN Links 8-12
Link Fragmentation and Interleaving 8-14
Applying Link Efficiency Mechanisms 8-15
Summary 8-17
2009 Cisco Systems, Inc. Implementing Cisco Quality of Service (QoS) v2.3 v
Configuring Class-Based Header Compression 8-19
Overview 8-19
Objectives 8-19
Header Compression Overview 8-20
Example: RTP Header Compression 8-20
Class-Based TCP Header Compression 8-21
Example: Class-Based TCP Header Compression 8-22
Class-Based RTP Header Compression 8-24
Example: Class-Based RTP Header Compression 8-25
Configuring Class-Based Header Compression 8-27
Example: Configuring Class-Based TCP Header Compression 8-28
Example: Configuring Class-Based RTP Header Compression 8-29
Monitoring Class-Based Header Compression 8-30
Summary 8-31
Configuring Link Fragmentation and Interleaving 8-33
Overview 8-33
Objectives 8-33
Fragmentation Options 8-34
Serialization Delay and Fragment Sizing 8-35
Example: Determining the Proper Fragment Size 8-36
Configuring MLP with Interleaving 8-37
Example: MLP with Interleaving 8-40
Monitoring MLP with Interleaving 8-41
FRF.12 Frame Relay Fragmentation 8-43
Configuring FRF.12 Frame Relay Fragmentation 8-45
Example: FRF.12 Frame Relay Fragmentation 8-46
Monitoring FRF.12 Frame Relay Fragmentation 8-48
Summary 8-50
Module Summary 8-51
References 8-52
Module Self-Check 8-53
Module Self-Check Answer Key 8-56































Table of Contents
Volume 3
QoS Best Practices 9-1
Overview 9-1
Module Objectives 9-1
Understanding Traffic Classification Best Practices 9-3
Overview 9-3
Objectives 9-3
Optimally Deploying QoS Within the Enterprise 9-4
Strategically Defining QoS Objectives 9-5
Analyzing Application Service-Level Requirements 9-7
Example: G.711 Voice Bearer Bandwidth Requirement Calculation 9-11
Example: Calculating the Bandwidth Requirement for a 384-kb/s Videoconference Stream 9-13
Example: QoS Requirements of the Major Applications Category 9-19
Designing the QoS Policies 9-20
Example: LLQ Example on the Enterprise WAN Edge Router 9-27
Enterprise-to-Service Provider QoS Class Mapping 9-28
Voice and Video 9-28
Call-Signaling 9-29
Mixing TCP with UDP 9-29
Marking and Re-Marking 9-30
Summary 9-36
Deploying End-to-End QoS 9-37
Overview 9-37
Objective 9-37
QoS Service Level Agreements 9-39
Deploying End-to-End QoS 9-45
Enterprise Campus QoS General Guidelines 9-47
Access Edge Trust Models 9-50
Untrusted PC + SoftPhone with Scavenger-Class QoS 9-53
Untrusted Server with Scavenger-Class QoS 9-54
Conditionally Trusted IP Phone Plus PC with Scavenger-Class QoS (Basic) Model 9-58
Conditionally Trusted IP Phone Plus PC with Scavenger-Class QoS (Advanced) Model 9-59
Branch Router QoS Design 9-71
WAN Edge QoS Design Considerations 9-73
QoS CPU Utilization 9-74
Bandwidth Provisioning for Best-Effort Traffic 9-74
Bandwidth Provisioning for Real-time Traffic 9-74
Serialization 9-75
IP RTP Header Compression Usage 9-75
Tx-ring Tuning 9-76
PAK_Priority 9-77
Link Speeds 9-78
Service Provider Backbone QoS Implementations 9-84
MPLS VPN QoS Design 9-92
Layer 2 Access (Link-Specific) QoS Design 9-94
Service Provider Service-Level Agreements 9-94
Enterprise-to-Service Provider Mapping Models 9-95
Service Provider-to-Enterprise Models 9-96
MPLS DiffServ Tunneling Modes 9-97
ii Implementing Cisco Quality of Service (QoS) v2.3 2009 Cisco Systems, Inc.
QoS Recommendation Summary 9-103
Hardware versus Software QoS 9-106
Classification and Marking Best Practices 9-106
Policing and Markdown Best Practices 9-107
Queuing and Dropping Best Practices 9-107
Strict-Priority Queuing Recommendations: The 33% LLQ Rule 9-107
Best-Effort Queuing Recommendation 9-107
Scavenger Class Queuing Recommendations 9-107
Summary 9-108
Providing QoS for Security 9-111
Overview 9-111
Objective 9-111
QoS Tools and Tactics for Security 9-112
Control Plane Policing 9-114
Data Plane Policing 9-117
NBAR Worm Policing 9-119
NBAR Versus Code Red 9-121
NBAR Versus SQL Slammer 9-122
Summary 9-124
Module Summary 9-125
References 9-126
Module Self-Check 9-127
Module Self-Check Answer Key 9-129









QOS
Course Introduction
Overview
Implementing Cisco Quality of Service (QoS) v2.3 provides learners with in-depth knowledge
of quality of service (QoS) requirements; conceptual models such as Best-Effort, Integrated
Services (IntServ), and Differentiated Services (DiffServ); and the implementation of QoS on
Cisco IOS platforms.
The curriculum covers the theory of QoS, design issues, and configuration of various QoS
mechanisms to facilitate the creation of effective QoS administrative policies. Case studies and
lab activities included in the course help learners apply the concepts that are mastered in
individual modules to real-life scenarios.
The course also gives learners design and usage rules for various advanced QoS features and
for the integration of QoS with underlying Layer 2 QoS mechanisms, allowing the learners to
design and implement efficient, optimal, and trouble-free multiservice networks.
2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Learner Skills and Knowledge
This subtopic lists the skills and knowledge that learners must possess to benefit fully from the
course. The subtopic also includes recommended Cisco learning offerings that learners should
first complete to benefit fully from this course.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33
Learner Skills and Knowledge
Interconnecting Cisco Network Devices (ICND)
OR
Cisco Certified Network Associate (CCNA)

2009 Cisco Systems, Inc. Course Introduction 3
Course Goal and Objectives
This topic describes the course goal and objectives.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34
Implementing Cisco Quality of Service (QoS) v2.3
To identify, describe, and correctly implement the
appropriate QoS mechanisms required to create an
effective administrative policy providing QoS
Course Goal

Upon completing this course, you will be able to meet these objectives:
Explain the need to implement QoS and methods for implementing and managing QoS
Identify and describe different models used for ensuring QoS in a network and explain key
QoS mechanisms used to implement the models
Explain the use of MQC and AutoQoS to implement QoS on the network
Classify and mark network traffic to implement a policy according to QoS requirements
Use Cisco QoS queuing mechanisms to manage network congestion
Use Cisco QoS congestion avoidance mechanisms to reduce the effects of congestion on
the network
Use Cisco QoS traffic policing and traffic-shaping mechanisms to effectively limit the rate
of network traffic
Use Cisco link efficiency mechanisms to improve the bandwidth efficiency of low-speed
WAN links
Select the most appropriate QoS mechanisms for providing QoS using Cisco best practices
in service provider and enterprise networks
4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Course Flow
This topic presents the suggested flow of the course materials.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35
Course Flow
Course
Introduction
A
M
P
M
Day 1 Day 2 Day 3 Day 4 Day 5
Lunch
Introduction
to QoS
Building Blocks
of QoS
Building Blocks
of QoS (Cont.)
Introduction
to Modular
QoS CLI and
AutoQoS
Introduction to
Modular QoS
CLI and
AutoQoS
(Cont.)
Classification
and Marking
Classification
and Marking
(Cont.)
Congestion
Management
(Cont.)
Congestion
Management
Congestion
Avoidance
Traffic
Policing and
Shaping
Link Efficiency
Mechanisms
QoS Best
Practices

The schedule reflects the recommended structure for this course. This structure allows enough
time for the instructor to present the course information and for you to work through the lab
activities. The exact timing of the subject materials and labs depends on the pace of your
specific class.
2009 Cisco Systems, Inc. Course Introduction 5
Additional References
This topic presents the Cisco icons and symbols used in this course, as well as information on
where to find additional technical references.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36
Cisco Icons and Symbols
Router
Termi nal
Server
100Base-T
Hub
Workgroup
Switch:
Color/Subdued
Network
Cloud,
White
PC
Network
Cloud,
Standard
Color
Camera
PC/Video
IP Phone
Multilayer Swi tch
File/
Application
Server

Cisco Glossary of Terms
For additional information on Cisco terminology, refer to the Cisco Internetworking Terms and
Acronyms glossary of terms at http://www.cisco.com/univercd/cc/td/doc/cisintwk/ita/index.htm.
6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Your Training Curriculum
This topic presents the training curriculum for this course.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37
www.cisco.com/go/certifications
Cisco Certifications
Cisco Career Certifications

You are encouraged to join the Cisco Certification Community, a discussion forum open to
anyone holding a valid Cisco Career Certification (such as Cisco CCIE

, CCNA

, CCDA

,
CCNP

, CCDP

, CCIP

, CCVP, or CCSP). It provides a gathering place for Cisco


certified professionals to share questions, suggestions, and information about Cisco Career
Certification programs and other certification-related topics. For more information, visit
www.cisco.com/go/certifications.
2009 Cisco Systems, Inc. Course Introduction 7
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38
CCIP
CCNA
Professional
Associate
Expert
Cisco Career Certifications: Cisco Certified
Internetwork Professional (CCIP)
Expand Your Professional Options and Advance Your
Career
Professional-level recognition in IP networking
www.cisco.com/go/certifications
IP Networking
Recommended Training Through
Cisco Learni ng Partners
Buil ding Scalable Cisco Inter networks
Implementing Cisco Quality of Service
Configuring BGP on Cisco Routers
Implementing Cisco MPLS
CCIE


8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39
CCVP
CCNA VOICE
Professional
Associate
Expert
Cisco Career Certifications: Cisco
Certified Voice Professional (CCVP)
Cisco Unified Communications Manager Path
Expand Your Professional Options and Advance Your
Career
Professional-level recognition in voice networking
www.cisco.com/go/certifications
Voice Networking
Recommended Training Through
Cisco Learni ng Partners
Cisco Voice over IP
AND
Cisco Voice over IP Fundamental s
Implementing Cisco Unified Communications
Manager
Qual ity of Service
Troubleshooting Cisco Unified
Communications Systems
CCIE

2009 Cisco Systems, Inc. Course Introduction 9
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.310
CCVP
CCNA VOICE
Professional
Associate
Expert
www.cisco.com/go/certifications
Voice Networking
Cisco Career Certifications: Cisco
Certified Voice Professional (CCVP)
Cisco Unified Call Manager Path
Expand Your Professional Options and Advance Your
Career
Professional-level recognition in voice networking
Recommended Training Through
Cisco Learni ng Partners
Cisco Voice over IP
AND
Cisco Voice over IP Fundamental s
Troubleshooting Cisco Unified
Communications Systems
Implementing Cisco Voice Gateways and
Gatekeepers
Cisco IP Telephony
Qual ity of Service
CCIE

10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Your Training Curriculum
This topic presents the training curriculum for this course.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.311
Cisco Specialist Certification Path
Enhance Your Cisco Certificationsand Validate Your
Areas of Expertise
Cisco Quality of Service Specialists
www.cisco.com/go/certifications
Cisco IP Telephony Design Specialist
Recommended Traini ng Through Cisco
Learning Partners
Prerequisite: Valid CCDA Certification
Cisco Lifecycl e Services for Advanced Unified
Communications
Cisco Unified Communi cations Archi tecture
and Design
Implementing Cisco Quality of Service

Cisco Specialist certifications demonstrate significant competency in specific technology areas,
solutions, or job roles. Individuals who have earned an associate-level career certification or
higher are eligible to become qualified in these focused areas. With one or more specialist
certifications, network professionals can better align their core expertise with current industry
needs. For more information on Cisco Specialist certifications, visit
www.cisco.com/go/certifications.
Module 1
Introduction to QoS
Overview
As user applications continue to drive network growth and evolution, demand to support
different types of traffic is also increasing. Different types of applications with differing
network requirements create a need for administrative policies mandating how individual
applications are to be treated by the network. Network traffic from business-critical
applications must be protected from other types of traffic. Requests from business-critical and
delay-sensitive applications must be serviced with priority. The employment and enforcement
of quality of service (QoS) policies within a network play an essential role in enabling network
administrators and architects to meet networked application demands. QoS is a crucial element
of any administrative policy that mandates how to handle application traffic on a network. This
module introduces the concept of QoS, explains key issues of networked applications, and
describes different methods for implementing QoS.
Module Objectives
Upon completing this module, you will be able to explain the need to implement QoS and
explain methods for implementing and managing QoS. This ability includes being able to meet
these objectives:
Identify problems that could lead to poor quality of service and provide solutions to those
problems
Explain the term QoS and the key steps to implementing QoS on a converged network
List methods for implementing QoS
1-2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 1
Understanding the Need for
QoS
Overview
Networks must provide secure, predictable, measurable, and, sometimes, guaranteed services.
Network administrators and architects can better achieve this performance from the network by
managing delay, delay variation (jitter), bandwidth provisioning, and packet loss parameters
with quality of service (QoS) techniques. This lesson introduces the concept of a converged
network, identifies four problems that could lead to poor quality of service, and describes
solutions to those problems.
Objectives
Upon completing this lesson, you will be able to identify problems that could lead to poor QoS
and the solutions to those problems. This ability includes being able to meet these objectives:
Describe a converged IP network supporting voice, video, and data traffic, and explain why
QoS was not important before networks converged
Describe the four key quality issues with converged networks: lack of bandwidth, end-to-
end delay (fixed and variable), variation of delay (jitter), and packet loss
Explain how a lack of bandwidth can adversely impact QoS in a network and ways to
effectively increase bandwidth on a link
Explain how end-to-end delay can adversely impact QoS in a network and ways to
effectively reduce delay
Explain how packet loss can adversely impact QoS in a network and ways to manage
packet loss so that QoS is not affected
1-4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Converged Networks
This topic describes a converged IP network supporting voice, video, and data traffic and
explains why QoS was not important before networks converged.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-2
Before Converged Networks
Traditional data traffic characteristics:
Bursty data flow
First-come, first-served access
Mostly not time-sensitive delays OK
Brief outages are survivable

Before networks converged, network engineering focused on connectivity. The rates at which
data came onto the network resulted in bursty data flows. Data, arriving in packets, tried to grab
as much bandwidth as it could at any given time. Access was on a first-come, first-served basis.
The data rate available to any one user varied depending on the number of users accessing the
network at any given time.
The protocols that have been developed have adapted to the bursty nature of data networks, and
brief outages are survivable. For example, when you retrieve email, a delay of a few seconds is
generally not noticeable. A delay of minutes is annoying, but not serious.
Traditional networks also had requirements for applications such as data, video, and systems
network architecture (SNA). Since each application had different traffic characteristics and
requirements, network designers deployed nonintegrated networks. These nonintegrated
networks were designed to carry a specific type of traffic: data network, SNA network, voice
network, and video network.
2009 Cisco Systems, Inc. Introduction to QoS 1-5
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-3
After Converged Networks
Converged traffic characteristics:
Constant small-packet voice flow competes with bursty data flow
Critical traffic must get priority
Voice and video are time-sensitive
Brief outages not acceptable

The figure illustrates a converged network in which voice, video, and data traffic use the same
network facilities. Merging these different traffic streams with dramatically differing
requirements can lead to a number of problems.
Although packets carrying voice traffic are typically very small, they cannot tolerate delay and
delay variation as they traverse the network. Voices will break up and words will become
incomprehensible.
On the other hand, packets carrying file transfer data are typically large and can survive delays
and drops. It is possible to retransmit part of a dropped data file, but it is not feasible to
retransmit a part of a voice conversation.
The constant, small-packet voice flow competes with bursty data flows. Unless some
mechanism mediates the overall flow, voice quality will be severely compromised at times of
network congestion. The critical voice traffic must get priority. Voice and video traffic is very
time-sensitive. It cannot be delayed and it cannot be dropped, or the resulting quality of voice
and video will suffer.
Finally, converged networks cannot fail. While a file transfer or email packet can wait until the
network recovers, voice and video packets cannot wait. Even a brief network outage on a
converged network can seriously disrupt business operations.
1-6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Converged Networks Quality Issues
This topic describes the four key quality issues with converged networks: lack of bandwidth,
end-to-end delay (fixed and variable), variation of delay (jitter), and packet loss.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-4
Converged Networks:
Quality Issues
Telephone Call: I cannot understand you; your voice is breaking up.
Teleconferencing: The picture is very jerky. Voice not synchronized.
Brokerage House: I needed that information two hours ago. Where is it?
Call Center: Please hold while my screen refreshes.

With inadequate preparation of the network, voice transmission is choppy or unintelligible.
Gaps in speech are particularly troublesome where pieces of speech are interspersed with
silence. In voice-mail systems, this silence is a problem. For example, when 68614 is dialed
and the gaps in speech are actually gaps in the tone, 68614 becomes 6688661144, because the
gaps in speech are perceived as pauses in the touch tones.
Poor caller interactivity is the consequence of delay and causes these problems:
Echo: Echo is caused by the signal reflecting the speaker voice from the far-end telephone
equipment back into the speaker ear.
Talker overlap: Talker overlap is caused when one-way delay becomes greater than 250
ms. When this delay occurs, the speech of one talker overlaps the speech of the other talker,
resulting in a walkie-talkie call mode.
Disconnected calls are the worst cases. If there are long gaps in speech, the parties will hang
up. If there are signaling problems, calls are disconnected. Such events are completely
unacceptable in voice communications, yet are quite common for an inadequately prepared data
network that is attempting to carry voice.
2009 Cisco Systems, Inc. Introduction to QoS 1-7
Multimedia streams, such as those used in IP telephony or videoconferencing, may be
extremely sensitive to delivery delays and may create unique QoS demands on the underlying
networks that carry them. When packets are delivered using the Best-Effort delivery model,
they may not arrive in order, in a timely manner, or at all. The result is unclear pictures, jerky
and slow movement, and sound that is out of synchronization with the image.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-5
Converged Networks:
Quality Issues (Cont.)
Lack of bandwidth: Multiple flows compete for a limited amount of
bandwidth.
End-to-end delay (fixed and variable): Packets have to traverse
many network devices and links that add up to the overall delay.
Variation of delay (jitter): Sometimes there is a lot of other traffic,
which results in more delay.
Packet loss: Packets may have to be dropped when a link is
congested.
Vi deo Lacking
Pr oper QoS

The four big problems facing converged enterprise networks are as follows:
Bandwidth capacity: Large graphics files, multimedia uses, and increasing use of voice
and video cause bandwidth capacity problems over data networks.
End-to-end delay (both fixed and variable): Delay is the time it takes for a packet to
reach the receiving endpoint after being transmitted from the sending endpoint. This period
of time is called the end-to-end delay, and consists of two components:
Fixed network delay: Two types of fixed delays are serialization and propagation
delays. Serialization is the process of placing bits on the circuit. The higher the
circuit speed, the less time it takes to place the bits on the circuit. Therefore, the
higher the speed of the link, the less serialization delay is incurred. Propagation
delay is the time it takes for frames to transit the physical media.
Variable network delay: Processing delay is a type of variable delay, and is the
time required by a networking device to look up the route, change the header, and
complete other switching tasks. In some cases, the packet also must be manipulated,
as, for example, when the encapsulation type or the hop count must be changed.
Each of these steps can contribute to the processing delay.
Variation of delay (also called jitter): Jitter is the delta, or difference, in the total end-to-
end delay values of two voice packets in the voice flow.
Packet loss: Loss of packets is usually caused by congestion in the WAN, resulting in
speech dropouts or a stutter effect if the playout side tries to accommodate by repeating
previous packets.
1-8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Available Bandwidth
This topic describes how a lack of bandwidth can adversely impact QoS in a network and
describes ways to effectively increase bandwidth on a link.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-6
Lack of Bandwidth
Maximum available bandwidth equals the bandwidth of the
weakest link.
Multiple flows are competing for the same bandwidth, resulting in
much less bandwidth being available to one single application.
BadVoice Due to
Lack of BW
Bandwidth max = min (10 Mb/s, 256 kb/s, 512 kb/s, 100 Mb/s) = 256 kb/s
Bandwidth avail = bandwidth max / flows

The figure illustrates an empty network with four hops between a server and a client. Each hop
is using different media with a different bandwidth. The maximum available bandwidth is equal
to the bandwidth of the weakest (slowest) link.
The calculation of the available bandwidth, however, is much more complex in cases where
multiple flows traverse the network. The calculation of the available bandwidth in the
illustration is an approximation.
2009 Cisco Systems, Inc. Introduction to QoS 1-9
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-7
Ways to Increase or Manage Available
Bandwidth
Upgrade the link: the best solution but also the most expensive.
Forward the important packets first.
Compress the payload of Layer 2 frames (it takes time).
Compress IP packet headers.

The best way to increase bandwidth is to increase the link capacity to accommodate all
applications and users, with some extra bandwidth to spare. Although this solution sounds
simple, increasing bandwidth is expensive and takes time to implement. There are often
technological limitations in upgrading to a higher bandwidth.
Another option is to classify traffic into QoS classes and prioritize traffic according to
importance. Voice and business-critical traffic should get sufficient bandwidth to support their
application requirements, voice should get prioritized forwarding, and the least important traffic
should get whatever unallocated bandwidth is remaining. A variety of mechanisms such as
these are available in Cisco IOS QoS Software to provide bandwidth guarantees:
Priority queuing (PQ) or custom queuing (CQ)
Modified deficit round robin (MDRR) (on Cisco 12000 Series routers)
Distributed type of service (ToS)-based and QoS group-based weighted fair queuing
(WFQ) (on Cisco 7x00 Series routers)
Class-based weighted fair queuing (CBWFQ)
Low-latency queuing (LLQ)
Optimizing link usage by compressing the payload of frames (virtually) increases the link
bandwidth. Compression, on the other hand, also increases delay because of the complexity of
compression algorithms. Using hardware compression can accelerate packet payload
compressions. Stacker and Predictor are two compression algorithms that are available in Cisco
IOS Software.
Another link efficiency mechanism is header compression. Header compression is especially
effective in networks in which most packets carry small amounts of data (that is, where
payload-to-header ratio is small). Typical examples of header compression are TCP header
compression and Real-Time Transport Protocol (RTP) header compression.
1-10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
End-to-End Delay
This topic describes how end-to-end delay can adversely impact QoS in a network and
describes ways to effectively reduce delay.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-8
End-to-End Delay
End-to-end delay equals a sum of all propagation, processing,
and queuing delays in the path.
In best-effort networks, propagation delay is fixed, processing and
queuing delays are unpredictable.
Bad Voice Due to
Delay Variation
Delay = P1 + Q1 + P2 + Q2 + P3 + Q3 + P4 = X ms

The figure illustrates the impact that a network has on the end-to-end delay of packets going
from one end of the network to the other. Each hop in the network adds to the overall delay
because of these factors:
Propagation delay is caused by the speed of light traveling in the media; for example, the
speed of light traveling in fiber optics or copper media.
Serialization delay is the time it takes to clock all the bits in a packet onto the wire. This is
a fixed value that is a function of the link bandwidth.
There are processing and queuing delays within a router, which can be caused by a wide
variety of conditions.
Propagation delay is generally ignored but it can be significant; for example, about 40 ms
coast-to-coast, over optical. Internet Control Message Protocol (ICMP) echo (ping) is one way
to measure the round-trip time of IP packets in a network.
Example: Effects of Delay
A customer has a router in New York and a router in San Francisco, each connected by a 128-
kbps WAN link. The customer sends a 66-byte voice frame across the link. To transmit the
frame (528 bits), it will take 4.125 ms to clock out (serialization delay). However, the last bit
will not arrive until 40 ms after it clocks out (propagation delay). The total delay equals 44.125
ms.
Now, change the circuit to a T1. To transmit the frame (528 bits), it will take 0.344 ms to clock
out (serialization delay). However, the last bit will not arrive until 40 ms after transmission
2009 Cisco Systems, Inc. Introduction to QoS 1-11
(propagation delay) for a total delay of 40.344 ms. In this case, the significant factor is
propagation delay. In the same situationbut for a link between Seattle and San Francisco
serialization delay remains the same and propagation delay drops to about 6 ms, making 528
bits take 10.125 ms (on a 128-kbps link), and a total delay of 6.344 (on a T1 link).
Both serialization and propagation delays must be taken into account in determining total delay.
1-12 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-9
Types of Delay
Processing Delay: The time it takes for a router to take the packet from an
input interface, examine it, and put it int o the output queue of the output
interface
Queuing Delay: The time a packet resides in the output queue of a router
Serialization Delay: The time it takes to place the bits on the wire
Propagation Delay: The time it takes to transmit a packet

In summary, there are four types of delay, as follows:
Processing delay: The time it takes for a router to take the packet from an input interface
and put the packet into the output queue of the output interface. The processing delay
depends on these factors:
CPU speed
CPU utilization
IP switching mode
Router architecture
Configured features on both input and output interfaces
Queuing delay: The time a packet resides in the output queue of a router. Queuing delay
depends on the number of and sizes of packets already in the queue, the bandwidth of the
interface, and the queuing mechanism.
Serialization delay: The time it takes to place a frame on the physical medium for
transport.
Propagation delay: The time it takes to transmit a packet, which usually depends on the
type of media interface.
2009 Cisco Systems, Inc. Introduction to QoS 1-13
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 10
Ways to Reduce Delay
Upgrade the link; the best solution but also the most expensive.
Forward the important packets first.
Compress the payload of Layer 2 frames (it takes time).
Compress IP packet headers.

Assuming that a router is powerful enough to make a forwarding decision rapidly, most
processing, queuing, and serialization delay is influenced by these factors:
Average length of the queue
Average length of packets in the queue
Link bandwidth
These approaches allow you to accelerate packet dispatching of delay-sensitive flows:
Increasing link capacity: Sufficient bandwidth causes queues to shrink so that packets do
not wait long before transmittal. More bandwidth reduces serialization time. This can be an
unrealistic approach because of the costs associated with the upgrade.
Prioritizing delay-sensitive packets: This is a more cost-effective approach. PQ, CQ,
strict-priority or alternate-priority queuing within the MDRR (on Cisco 12000 Series
routers), and LLQ each have preemptive queuing capabilities.
Compressing the payload: Payload compression reduces the size of packets, thereby
virtually increasing link bandwidth. Compressed packets are smaller and take less time to
transmit. Compression uses complex algorithms that take time and add to delay. This
approach is not used to provide low-delay propagation of packets.
Compressing the packet header: Header compression is not as CPU-intensive as payload
compression and you can use it with other mechanisms to reduce delay. Header
compression is especially useful for voice packets that have a bad payload-to-header ratio,
which you can improve by reducing the header of the packet (RTP header compression).
By minimizing delay, you can also reduce jitter (delay is more predictable).
1-14 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Packet Loss
This topic describes how packet loss can adversely impact QoS in a network and describes
ways to manage packet loss so that QoS is not affected.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 11
Packet Loss
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).
Bad Voice Due
to Packet Loss

The usual packet loss occurs when routers run out of buffer space for a particular interface
output queue. The figure illustrates a full interface output queue, which causes newly arriving
packets to be dropped. The term used for such drops is simply output drop or tail drop
(packets are dropped at the tail of the queue).
Routers might also drop packets for these other less common reasons:
Input queue drop: The main CPU is congested and cannot process packets (the input
queue is full).
Ignore: The router ran out of buffer space.
Overrun: The CPU is congested and cannot assign a free buffer to the new packet.
Frame errors: There is a hardware-detected error in a framecyclic redundancy check
(CRC), runt, giant.
2009 Cisco Systems, Inc. Introduction to QoS 1-15
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 12
Ways to Prevent Packet Loss
Upgrade the link; the best solution but also the most expensive.
Guarantee enough bandwidth to sensitive packets.
Prevent congestion by randomly dropping less important packets
before congestion occurs.

Packet loss is usually the result of congestion on an interface. Most applications that use TCP
experience slowdown because TCP adjusts to the network resources. Dropped TCP segments
cause TCP sessions to reduce their window sizes. There are some other applications that do not
use TCP and cannot handle drops.
You can follow these approaches to prevent drops of sensitive applications:
Increase link capacity to ease or prevent congestion.
Guarantee enough bandwidth and increase buffer space to accommodate bursts of fragile
applications. There are several mechanisms available in Cisco IOS QoS Software that can
guarantee bandwidth and provide prioritized forwarding to drop-sensitive applications,
such as these mechanisms:
Priority queuing (PQ)
Modified deficit round robin (MDRR) (on Cisco 12000 Series routers)
IP RTP priority
Class-based weighted fair queuing (CBWFQ)
Low latency queuing (LLQ)
Prevent congestion by dropping other packets before congestion occurs. You can use
weighted random early detection (WRED) to start dropping other packets before
congestion occurs.
1-16 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
These are some other mechanisms that you can use to prevent congestion:
Traffic shaping: Traffic shaping delays packets instead of dropping them and includes
generic traffic shaping, Frame Relay traffic shaping (FRTS), and class-based shaping.
Traffic policing: Traffic policing, including committed access rate (CAR) and class-based
policing, can limit the rate of less-important packets to provide better service to drop-
sensitive packets.
2009 Cisco Systems, Inc. Introduction to QoS 1-17
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 13
Summary
Traditional networks use a separate network for delay- and jitter-
sensitive voice traffic. The voice network is engineered to support
the required number of calls. For data traffic, protocols such as
TCP have been developed to adapt to the bursty nature of a data
network.
Converged networks that support voice, video, and data create
new requirements for managing network traffic. QoS meets those
requirements.
Converged networks suffer from different quality issues, including
lack of adequate bandwidth, end-to-end and variable delay, and
lost packets.
Lack of bandwidth causes networks to experience different types
of delay, including processing delay, queuing delay, serialization
delay, and propagation delay.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 14
Summary (Cont.)
End-to-end delay is the sum of all propagation, processing, and
queuing delays.
Packet loss can cause applications that use TCP to slow down.
Applications that do not use TCP, such as voice traffic, will
experience poor voice quality if the packet loss is too excessive.
Ways to increase the available bandwidth, and decrease the
delay and packet loss, include:
Increasing the link capacity
Using QoS mechanisms such as queuing, WRED, traffic
policing and shaping, and link efficiency mechanisms such as
payload and header compression


1-18 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 2
Understanding QoS
Overview
As networks increasingly converge to support voice, video, and data traffic, there is a growing
need for quality of service (QoS). Network administrators and architects must be able to
develop QoS systems to accommodate this new traffic. This lesson describes the basic concepts
and key terminology of QoS and the three key steps involved in implementing a QoS policy.
Objectives
Upon completing this lesson, you will be able to define QoS and describe the key steps for
implementing QoS on a converged network. This ability includes being able to meet these
objectives:
Define QoS with respect to traffic in a network
Explain the three key steps involved in implementing a QoS policy on a network
Describe how traffic is identified on a network and describe basic QoS requirements
Explain how to divide traffic into traffic classes
Describe how to define QoS policies after traffic classes have been defined
1-20 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Defined
This topic describes QoS with respect to traffic in a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-2
QoS Defined

QoS is the ability of the network to provide better or special service to selected users and
applications, to the detriment of other users and applications.
Cisco IOS QoS features enable you to control and predictably service a variety of networked
applications and traffic types, thus allowing you to take advantage of a new generation of
media-rich and mission-critical applications.
The goal of QoS is to provide better and more predictable network service by providing
dedicated bandwidth, controlled jitter and latency, and improved loss characteristics. QoS
achieves these goals by providing tools for managing network congestion, shaping network
traffic, using expensive wide-area links more efficiently, and setting traffic policies across the
network. QoS offers intelligent network services that, when correctly applied, help to provide
consistent, predictable performance.
2009 Cisco Systems, Inc. Introduction to QoS 1-21
QoS for Converged Networks
This topic describes the three key steps involved in implementing a QoS policy on a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-3
QoS for Converged Networks

There are three basic steps involved in implementing QoS on a network:
Step 1 Identify traffic and its requirements. Study the network to determine the type of
traffic running on the network and then determine the QoS requirements for the
different types of traffic.
Step 2 Group the traffic into classes with similar QoS requirements. For example, four
classes of traffic can be defined: voice, high priority, low priority, and browser.
Step 3 Define QoS policies that will meet the QoS requirements for each traffic class.
Example: Three Steps to Implementing QoS on a Network
In a typical network, voice will always require absolute minimal delay. Some data associated
with key applications will require very low delay (transaction-based data used in airline
reservations or online banking applications). Other types of data can tolerate a great deal of
delay (file transfers and email). Nonbusiness network surfing can also be delayed or even
prohibited.
A one-to-one mapping between traffic classes and QoS policies need not be made. For
example, three QoS policies could be implemented to meet the requirements of the four traffic
classes defined above:
NoDelay: Assign to voice traffic
BestService: Assign to high-priority traffic
Whenever: Assign to both the low-priority and browser traffic
1-22 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Requirements
This topic describes how traffic is identified on a network and describes elemental QoS
requirements.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-4
Step 1:
Identify Traffic and Its Requirements
Network audit
Identify traffic on the
network
Business audit
Determine how each type
of traffic is important for
business
Service levels required
Determine required
response time

The first step in implementing QoS is identifying the traffic on the network and determining
QoS requirements for the traffic.
The next step is determining the QoS problems of users. Measure the traffic on the network
during congested periods. Conduct CPU utilization assessment on each of their network devices
during busy periods to determine where problems might be occurring.
Next, determine the business model and goals, and obtain a list of business requirements, in
order to define the number of classes so that you can determine the business requirements for
each traffic class.
Finally, define the service levels required by different traffic classes in terms of response time
and availability. What is the impact on business if a transaction is delayed by two or three
seconds? Can file transfers wait until the network is quiescent?
2009 Cisco Systems, Inc. Introduction to QoS 1-23
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-5
QoS Traffic Requirements: Voice
Latency = 150 ms*
Jitter = 30 ms*
Loss = 1%*
17106 kb/s guaranteed
priority bandwidth
per call
150 b/s (+ Layer 2 overhead)
guaranteed bandwidth for
voice-control traffic per call
*One-way requirements

Voice traffic has extremely stringent QoS requirements. Voice traffic usually generates a
smooth demand on bandwidth and has minimal impact on other traffic as long as the voice
traffic is managed.
While voice packets are typically small (60 to 120 bytes), they cannot tolerate delay or drops.
The result of delays and drops are poor, and often unacceptable, voice quality. Because drops
cannot be tolerated, User Datagram Protocol (UDP) is used to package voice packets, because
TCP retransmit capabilities have no value.
Voice packets can tolerate no more than a 150-ms delay (one-way requirement) and less than 1
percent packet loss.
A typical voice call will require 17 to 106 kb/s of guaranteed priority bandwidth plus an
additional 150 b/s per call for voice-control traffic. Multiplying these bandwidth requirements
times the maximum number of calls expected during the busiest time period will provide an
indication of the overall bandwidth required for voice traffic.
1-24 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-6
QoS Requirements: Videoconferencing
Latency = 150 ms*
Jitter = 30 ms*
Loss = 1%*
Minimum priority bandwidth
guarantee required is:
Video stream + 20%
For example, a 384-kb/s
stream would require 460
kb/s of priority bandwidth
*One-way requirements

Videoconferencing applications also have stringent QoS requirements very similar to voice.
But videoconferencing traffic is often bursty and greedy in nature and, as a result, can impact
other traffic. Therefore, it is important to understand the videoconferencing requirements for a
network and to provision carefully for it.
The minimum bandwidth for a videoconferencing stream would require the actual bandwidth of
the stream (dependent upon the type of videoconferencing codec being used) plus some
overhead. For example, a 384-kb/s video stream would actually require a total of 460 kb/s of
priority bandwidth.
2009 Cisco Systems, Inc. Introduction to QoS 1-25
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-7
QoS Traffic Requirements: Data
Different applications have
different traffic characteristics.
Different versions of the same
application can have different
traf fic characteristics.
Classify data into relative-priority
model with no more than four to
five classes:
Mission-critical apps: Locally
defined critical applications
Transactional: Interactive
traf fic, preferred data service
Best-effort: Int ernet, email,
unspecified traffic
Less-than-best-effort
(Scavenger): Napster, Kazaa,
peer-to-peer applications

The QoS requirements for data traffic vary greatly. Different applications may make very
different demands on the network (for example, a human resources application versus an
automated teller machine application). Even different versions of the same application may
have varying network traffic characteristics.
While data traffic can demonstrate either smooth or bursty characteristics depending upon the
application, data traffic differs from voice and video in terms of delay and drop sensitivity.
Almost all data applications can tolerate some delay and generally can tolerate high drop rates.
Because data traffic can tolerate drops, the retransmit capabilities of TCP become important
and, as a result, many data applications use TCP.
In enterprise networks, important (business-critical) applications are usually easy to identify.
Most applications can be identified based on TCP or UDP port numbers. Some applications use
dynamic port numbers that, to some extent, make classifications more difficult. Cisco IOS
Software supports Network-Based Application Recognition (NBAR), which you can use to
recognize dynamic port applications.
It is recommended that data traffic be classified into no more than four to five classes, as
described in the graphic. There will still remain additional classes for voice and video.
1-26 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Traffic Classes
This topic describes how to divide traffic into traffic classes.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-8
Step 2:
Divide Traffic into Classes

After the majority of network traffic has been identified and measured, use the business
requirements to define traffic classes.
Because of its stringent QoS requirements, voice traffic will almost always exist in a class by
itself. Cisco has developed specific QoS mechanisms such as low-latency queuing (LLQ) that
ensure that voice always receives priority treatment over all other traffic.
After you define the applications with the most critical requirements, you can define the
remaining traffic classes using the business requirements.
Example: Traffic Classification
A typical enterprise might define five traffic classes as follows:
Voice: Absolute priority for VoIP traffic
Mission-critical: Small set of locally defined critical business applications
Transactional: Database access, transaction services, interactive traffic, preferred data
services
Best-effort: Internet, email
Scavenger (less-than-best-effort): Napster, Kazaa, and other point-to-point applications
2009 Cisco Systems, Inc. Introduction to QoS 1-27
QoS Policy
This topic describes how to define QoS policies after traffic classes have been defined.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-9
Step 3:
Define Policies for Each Traffic Class
Set minimum bandwidth
guarantee
Set maximum bandwidth
limits
Assign priorities to each class
Manage congestion

Finally, define a QoS policy for each traffic class, which involves these activities:
Set a minimum bandwidth guarantee
Set a maximum bandwidth limit
Assign priorities to each class
Use QoS technologies, such as advanced queuing, to manage congestion
Example: Defining QoS Policies
Using the traffic classes previously defined, you can determine QoS policies as follows:
Voice: Minimum bandwidth: 1 Mb/s. Use QoS marking to mark voice packets as priority
level 5; use LLQ to always give voice priority.
Mission-critical: Minimum bandwidth: 1 Mb/s. Use QoS marking to mark critical data
packets as priority level 4; use class-based weighted fair queuing (CBWFQ) to prioritize
critical class traffic flows.
Best-effort: Maximum bandwidth: 500 kb/s. Use QoS marking to mark these data packets
as priority level 2; use CBWFQ to prioritize best-effort traffic flows that are below
mission-critical and voice.
Scavenger: Maximum bandwidth: 100 kb/s. Use QoS marking to mark less-than-best-
effort (scavenger) data packets as priority level 0; use weighted random early detection
(WRED) to drop these packets whenever the network has a propensity for congestion.
1-28 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 10
QoS Policy
A network-wide definition
of the specific levels of
quality of service assigned
to different classes of
network traffic

A QoS policy is a network-wide definition of the specific levels of QoS assigned to different
classes of network traffic.
In a converged network, having a QoS policy is as important as having a security policy. A
written and public QoS policy allows users to understand and negotiate for QoS in the network.
2009 Cisco Systems, Inc. Introduction to QoS 1-29
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 11
QoS Policy (Cont.)
Align Network Resources with Business Priorities

The figure illustrates how a QoS policy could be defined for a network.
Enterprise resource planning (ERP) applications have a high QoS priority and must be available
all the time.
Video applications are guaranteed 100 KB/s of bandwidth, but can operate only between the
hours of 9:00 a.m. to 5:00 p.m. (0900 to 1700) on weekdays.
Voice traffic is guaranteed less than 150-ms delay in each direction but limited to the hours of
9:00 a.m. to 5:00 p.m. (0900 to 1700) on weekdays; toll calls are completely restricted to avoid
personal long-distance calls.
1-30 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 12
Summary
QoS is the ability of the network to provide better or special
service to users and applications.
Building QoS requires three steps: Identify requirements, classify
network traffic, and define network-wide policies for quality.
Voice, video, and data have very different QoS requirements to
run effectively on a network. These requirements affect how
voice, video, and data packets are identified.
Business requirements determine how to define traffic into traffic
classes, from highest priority to lowest priority.
A QoS policy is a network-wide definition of the specific levels of
QoS assigned to classes of network traffic.


Lesson 3
Implementing QoS
Overview
Cisco recommends using either the Modular QoS command-line interface (MQC) or Cisco
AutoQoS for implementing quality of service (QoS) in a network. The MQC offers a highly
modular way to fine-tune a network. AutoQoS offers an automated method for almost instantly
incorporating consistent voice QoS in a network of routers and switches. Network
administrators and architects benefit from using the CiscoWorks QoS Policy Manager (QPM).
CiscoWorks QPM provides centralized QoS design, administration, and traffic monitoring that
scales to large QoS deployments. This lesson explores in detail the four methods for
implementing and managing QoS.
Objectives
Upon completing this lesson, you will be able to list and describe methods for implementing
QoS. This ability includes being able to meet these objectives:
List four methods for implementing and managing a QoS policy: CLI, MQC, AutoQoS,
and QPM
Describe the CLI method for implementing QoS on a network
Describe the MQC method for implementing QoS on a network
Describe the use of Cisco AutoQoS for implementing QoS on a network
Explain the advantages and disadvantages of using each of the methods of implementing
QoS on a network
Describe the use of CiscoWorks QPM for managing QoS on a network
Describe the key MIBs that are used in monitoring QoS implementations
Describe key MIBs that are used for managing QoS policy on a network
1-32 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Methods for Implementing QoS Policy
This topic describes four different methods for implementing and managing a QoS policy.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-2
Methods for Implementing QoS Policy
CLI
MQC
AutoQoS VoIP (voice QoS)
AutoQoS for the Enterprise (voice, video, and data QoS)
QPM

Just a few years ago, the only way to implement QoS in a network was by using the command-
line interface (CLI) to individually configure QoS policies at each interface. This was a time-
consuming, tiresome, and error-prone task that involved cutting and pasting configurations
from one interface to another.
Cisco introduced the MQC in order to simplify QoS configuration by making configurations
modular. Using MQC, you can configure QoS in a building-block approach using a single
module repeatedly to apply policy to multiple interfaces.
Cisco AutoQoS represents innovative technology that simplifies the challenges of network
administration by reducing QoS complexity, deployment time, and cost to enterprise networks.
Cisco AutoQoS incorporates value-added intelligence in Cisco IOS Software and Cisco
Catalyst software to provision and assist in the management of large-scale QoS deployments.
AutoQoS is an intelligent macro that enables you to enter one or two simple AutoQoS
commands to enable all the appropriate features for the recommended QoS setting for an
application on a specific interface.
2009 Cisco Systems, Inc. Introduction to QoS 1-33
There are these two versions of AutoQoS:
AutoQoS VoIP: In its initial release, AutoQoS VoIP provided best-practice QoS
configuration for VoIP on both Cisco switches and routers. This was accomplished by
entering one global or interface command. Depending on the platform, the AutoQoS macro
would then generate commands into the recommended VoIP QoS configurations, along
with class maps and policy maps, and apply those to a router interface or switch port.
AutoQoS is available on both LAN and WAN Cisco Catalyst switches and Cisco IOS
routers. In its initial version, AutoQoS applied to VoIP deployments, until the release of a
new feature in AutoQoS, which is only applicable to the router platform and includes a
traffic discovery mechanism that detects not only VoIP traffic but video and data traffic as
well.
AutoQoS for the Enterprise: AutoQoS for the Enterprise relies on network-based
application recognition (NBAR) to gather statistics and detect ten traffic types, resulting in
the provisioning of class maps and policy maps for these traffic types. This feature deploys
best-practice QoS policies for voice, video, and data traffic, and is introduced in Cisco IOS
Software Release 12.3(7)T. These ten traffic types are detected as traffic crosses the WAN
interfaces.
AutoQoS for the Enterprise, combined with the AutoQoS VoIP command, allows a novice
network administrator to administer complex detailed QoS policies throughout the enterprise
network. AutoQoS for the Enterprise is only for Cisco IOS router platforms. The VoIP feature
for Cisco Catalyst switches does not change.
There are some major differences between AutoQoS VoIP and AutoQoS for the Enterprise.
AutoQoS VoIP does not detect traffic types nor does it use NBAR. AutoQoS VoIP only creates
QoS policy to provide priority of voice traffic. AutoQoS for the Enterprise, on the other hand,
uses a discovery mechanism or traffic data collection process that uses NBAR. The AutoQoS
VoIP macros use the NBAR statistics to create QoS polices.
You can more easily provision and manage successful QoS deployments by using Cisco
AutoQoS together with CiscoWorks QPM. Cisco AutoQoS provides QoS provisioning for
individual routers and switches, simplifying deployment and reducing human error.
CiscoWorks QPM provides centralized QoS design, administration, and traffic monitoring that
scales to large QoS deployments.
1-34 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Legacy CLI
This topic describes the CLI method for implementing QoS.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-3
Implementing QoS with CLI
Traditional method
Nonmodular
Cannot separate traffic
classification from policy
definitions
Used to augment or fine-tune
newer AutoQoS method










At one time, CLI was the only way to implement QoS in a network. It was a painstaking task,
involving copying one interface configuration and then pasting it into other interface
configurations. CLI took a lot of time and patience.
The original CLI method was nonmodularthere was no way to separate the classification of
traffic from the actual definition of policy. You had do both on every interface. The figure
illustrates an example of the complex configuration tasks involved in using CLI.
While CLI is not recommended for implementing QoS policy, it is still used to fine-tune QoS
implementations that have been generated using the Cisco AutoQoS macro.
2009 Cisco Systems, Inc. Introduction to QoS 1-35
Modular QoS CLI
This topic describes the MQC method for implementing QoS.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-4
Implementing QoS with MQC
A command syntax for
configuring QoS policy
Reduces configuration steps
and time
Configure policy, not raw
per-interface commands
Uniform CLI across major
Cisco IOS platforms
Uniform CLI structure for all
QoS features
Separates classification
engine from the policy











The MQC is a CLI structure that allows you to create traffic policies and then attach these
policies to interfaces. A traffic policy contains one or more traffic classes and one or more QoS
features. A traffic class is used to classify traffic; the QoS features in the traffic policy
determine how to treat the classified traffic.
The MQC offers significant advantages over the legacy CLI method for implementing QoS. By
using MQC, you can significantly reduce the time and effort it takes to configure QoS on a
complex network. Rather than configuring raw CLI commands interface by interface, you
develop a uniform set of traffic classes and QoS policies that can be applied on interfaces.
The use of the MQC allows the separation of traffic classification from the definition of QoS
policy. This enables easier initial QoS implementation and maintenance as new traffic classes
emerge and QoS policies for the network evolve.
1-36 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
AutoQoS VoIP and Enterprise
This topic describes the use of Cisco AutoQoS to implement QoS in a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-5
Implementing QoS with AutoQoS
AutoQoS VoIP supported both
in the LAN and WAN
environments
AutoQoS Enterprise supported
on WAN interfaces
Routers can deploy Enterprise
QoS policy treatment for voice,
video, and data traffic
Switches can deploy QoS
policy treatments for voice by a
single command
The [trust] option indicates
that the DSCP or CoS
markings of a packet are
relied upon for classification.



WAN
AutoQoS VoIP:
WAN
AutoQoS Enterprise:
Port

Depending on the platform, using Cisco AutoQoS VoIP or AutoQoS for the Enterprise, you can
implement the QoS features that support VoIP traffic and data traffic without an in-depth
knowledge of these underlying technologies:
PPP
Frame Relay
ATM
Service policies
Link efficiency mechanisms, such as link fragmentation and interleaving (LFI)
The deployment of AutoQoS simplifies QoS implementation, speeds up the provisioning of
QoS technology over a Cisco network, reduces human error, and lowers training costs.
2009 Cisco Systems, Inc. Introduction to QoS 1-37
The AutoQoS for the Enterprise feature, introduced in Cisco IOS Software Release 12.3(7)T,
provides another option for configuring AutoQoS on routers. This new feature allows you to
configure AutoQoS to discover data traffic across a router WAN interface before applying
AutoQoS VoIP. While previously you could apply AutoQoS VoIP on a WAN interface, this
new automated feature allows you to discover data traffic and build the QoS polices based on
data gathered during the discovery phase. Configuring switches to support AutoQoS VoIP has
not changed. This new feature applies only to router WAN interfaces, and the phases are
described as follows:
Phase 1 is the autodiscovery (data collection) phase and uses NBAR to detect network
applications as they arrive at an interface, collect data from the offered traffic, and perform
statistical analysis. The data collected is a representative sampling of the volume and type
of voice, video, and data on the customer network. The amount of time devoted to data
collection varies from network to network.
Phase 2 generates templates from the data collected during the autodiscovery phase and
installs the templates on the interface. These templates are used as the basis for creating the
class maps and policy maps for your network. After the class maps and policy maps are
created, they are installed on the interface. During this phase, the AutoQoS for the
Enterprise also assigns the appropriate bandwidth amounts and sets the appropriate
scheduling parameters for the network traffic.
You can use CiscoWorks QPM in conjunction with the AutoQoS for the Enterprise feature
to provide a centralized, web-based tool to cost-effectively manage and monitor network-
wide QoS policies. The AutoQoS VoIP feature, together with CiscoWorks QPM, eases
QoS implementation, provisioning, and management.
Note Cisco AutoQoS was introduced in Cisco IOS Software Release 12.2(15)T. AutoQoS
discovery was introduced in Cisco IOS Software Release 12.3(7)T.
1-38 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Implementation Methods Compared
This topic describes the advantages and disadvantages of using each of the methods of
implementing QoS on a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-6
Comparing Methods for Implementing QoS
CLI MQC
AutoQoS
VoIP
AutoQoS
Enterprise
Ease of Use Poor Easier Si mple Simple
Ability to
Fine-Tune
OK Very Good Very Good Very Good
Ti me to Deploy Longest Average Shortest Shortest
Modularity Poor Excel lent Excellent Excellent

Cisco recommends the use of MQC and AutoQoS VoIP when deploying voice over the LAN,
and AutoQoS for the Enterprise on router WAN interfaces.
While MQC is much easier to use than CLI, AutoQoS VoIP and AutoQoS for the Enterprise
can simplify the configuration of QoS. As a result, you can accomplish the fastest
implementation with AutoQoS.
MQC offers excellent modularity and the ability to fine-tune complex networks. AutoQoS
offers the fastest way to implement QoS, but has limited fine-tuning capabilities. When an
AutoQoS configuration has been generated, you must use CLI commands to fine-tune an
AutoQoS configuration if necessary. (On most networks, fine-tuning will not be necessary for
AutoQoS.)
2009 Cisco Systems, Inc. Introduction to QoS 1-39
QoS Policy Manager
This topic describes the use of CiscoWorks QPM to manage QoS on a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-7
QoS Policy Manager
Suite of management functions that allow network
administrators to fully leverage the Cisco intelligent IP
infrastructure, enable network-wide QoS, and obtain precise,
easy-to-understand QoS information with monitoring and
reporting.
Analysis of existing network
traffic to help you
determine the types of
polici es from which your
network mi ght benefit
Recommendations vi a
wizards, templates
Verification
Customization
QoS Analysis Baseline Analysis Provisioning
Historical and real-time
analyses of how your QoS
policies are affecting
network traffic
Historical and real-time
QoS repor ts that display
detailed QoS statistics

CiscoWorks QPM provides a scalable platform for defining, applying, and monitoring QoS
policy on a system-wide basis for Cisco devices, including routers and switches.
CiscoWorks QPM enables the baselining of profile network traffic, creates QoS policies at an
abstract level, controls the deployment of policies, and monitors QoS to verify intended results.
As a centralized tool, CiscoWorks QPM is used to monitor and provision QoS for groups of
interfaces and devices.
CiscoWorks QPM provides a web-based intuitive user interface to define QoS policies and
translates those policies into the device CLI commands.
CiscoWorks QPM allows for analyzing of traffic throughput by application or service class.
This analysis leverages that information to configure QoS policies to differentiate traffic and
define the QoS functions that are applied to each type of traffic flow.
By simplifying QoS policy definition and deployment, CiscoWorks QPM makes it easier to
create and manage end-to-end differentiated services in a network, thus making more efficient
and economical use of existing network resources. For example, policies can be deployed that
ensure that mission-critical applications always get the bandwidth required to run the business.
1-40 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-8
Cisco AutoQoS with CiscoWorks QPM
Use AutoQoS Enterprise to
configure routers
Use AutoQoS VoIP on
switches
Use QPM to manage
network-wide QoS for
multiple devices

Customers can more easily provision and manage successful QoS deployments using Cisco
AutoQoS together with CiscoWorks QPM. Cisco AutoQoS provides QoS provisioning for
individual routers and switches, simplifying deployment and reducing human error.
CiscoWorks QPM provides centralized QoS design, administration, and traffic monitoring that
scales to large QoS deployments.
2009 Cisco Systems, Inc. Introduction to QoS 1-41
Network MIBs for Monitoring QoS
This topic describes the key MIBs that are used to monitor QoS implementations.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-9
Network MIBs for Monitoring QoS
MIB: Management Information Base
An SNMP structure that describes the particular device being
monitored

A MIB is a Simple Network Management Protocol (SNMP) structure that describes the
particular device being monitored. Cisco provides many standards-based MIBs for use in
monitoring the status of devices on a network.
Advanced network management products, such as CiscoWorks QPM, use these MIBs to
generate statistics about the performance of the network. Specialized QoS MIBs enable
CiscoWorks QPM to graphically display key QoS information to aid in the management of
QoS policies on the network.
Note For more information on Cisco MIBs, refer to Network Management Software at this URL:
http://www.cisco.com/public/sw-center/sw-netmgmt.shtml
1-42 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
MIBs for Managing QoS
This topic describes the key MIBs that are used for managing QoS policy on a network.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 10
Class-Based QoS MIB (CBQoSMIB)
Provides read access to configuration and statistical information
for MQC-based QoS policies
Provides MQC configuration information and application statistics
Provides CBQoS statistics on a per-policy, per-interface, or PVC
basis
Allows monitoring of pre- and post-policy bit rates on a device

The Class-Based QoS MIB (CBQoSMIB) provides read access to QoS configurations. This
MIB also provides QoS statistics information based on the MQC, including information
regarding class map and policy map parameters.
This CBQoSMIB actually contains two MIBs: Cisco Class-Based QoS MIB and Cisco Class-
Based QoS Capability MIB.
2009 Cisco Systems, Inc. Introduction to QoS 1-43
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 11
QPM: Monitoring and Reporting
with CBQoSMIB

CiscoWorks QPM uses the information collected in the class-based MIB to build a number of
reports showing the effect of QoS policies on the network.
These reports can graphically illustrate the overall input traffic flow divided by traffic class, the
traffic that was actually sent, and the traffic that was dropped because of QoS policy
enforcement.
In the Reports tab for CiscoWorks QPM, under Historical Reports, you can create graphs such
as the following:
Matching Traffic Per Class Prior to QoS Actions: Graphs that display the traffic that
matched each policy group filter before any policy actions were performed
Matching Traffic Per Class After QoS Actions: Graphs that display the traffic that
matched each policy group filter and was transmitted (not dropped) by the configured QoS
policies
Matching Traffic Per Class Discarded by QoS Drop Actions: Graphs that display the
traffic that matched each policy group filter and was dropped (not transmitted) by QoS
policy drop actions
1-44 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 12
Cisco NBAR Protocol Discovery MIB
NBAR protocol discovery
statistics only available on the
configured device
Provides ability to retrieve
statistics via SNMP into a
central performance
monitoring system

Another important MIB that is used for monitoring QoS is the Cisco NBAR Protocol Discovery
MIB. Using the information collected by this MIB, it is possible to collect detailed protocol and
application-level network statistics.
Note NBAR protocol discovery MIB is discussed further in the module Classification and
Marking, where NBAR is explained.
2009 Cisco Systems, Inc. Introduction to QoS 1-45
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 13
Summary
There are four different methods for implementing QoS: CLI,
MQC, AutoQoS, and CiscoWorks QPM.
The original CLI method for implementing QoS is a nonmodular
and time-consuming method of implementing QoS.
MQC is a CLI structure that allows you to create traffic policies
and then attach these policies to interfaces.
AutoQoS is an intelligent macro that enables you to enter one or
two simple commands to automatically implement a set of QoS
policies on a router or switch.
The MQC offers excellent modularity and the ability to fine-tune
complex networks; AutoQoS offers the fastest way to implement
QoS, but has limited fine-tuning capabilities.
QPM enables the baselining of profile network traffic, creates QoS
policies at an abstract level, controls the deployment of policies,
and monitors QoS to verify intended results.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.31- 14
Summary (Cont.)
Specialized QoS MIBs enable CiscoWorks QPM to graphically
display key QoS information to aid in the management of QoS
policies on the network.
The Class-Based QoS MIB (CBQoSMIB) provides read access to
QoS configurations and provides QoS statistics information based
on the MQC.

1-46 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

2009 Cisco Systems, Inc. Introduction to QoS 1-47
Module Summary
This topic summarizes the key points discussed in this module.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-1
Module Summary
The problems that can lead to poor QoS for applications running
on a converged network include lack of bandwidth, excessive
delay, jitter, and packet loss.
QoS is the ability of the network to provide better or special
service to select users and applications.
The key steps to implement QoS on a converged network include:
Identifying the traffic types and their requirements
Classifying the traffic
Defining and implementing QoS policies for each traffic class


2009 CiscoSystems, Inc. All r ights reserved. QoS v2.31-2
Module Summary (Cont.)
Voice, video, and data have very different requirements and must
be defined into traffic classes.
Different methods to implement a QoS policy on Cisco devices
include the following:
Use existing CLI configuration mode
Use MQC-based QoS configuration
Use automated methods such as AutoQoS and CiscoWorks
QPM

1-48 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Converged IP networks must provide secure, predictable, measurable, and sometimes
guaranteed services. QoS provides network administrators and architects with a set of
techniques used to manage network resources. Cisco IOS Software provides a rich set of tools
and an automated approach for implementing QoS, such as AutoQoS.
References
For additional information, refer to these resources:
Implementing Quality of Service at this URL:
http://www.cisco.com/en/US/partner/tech/tk543/tk757/technologies_white_paper09186a00
8017f93b.shtml
To learn more about QoS, refer to Cisco IOS Quality of Service (QoS) at this URL:
http://www.cisco.com/en/US/technologies/tk389/tk813/technologies_white_paper0900aecd
802b68b1.html
For more information on QPM, refer to Introduction to QPM at this URL:
http://www.cisco.com/en/US/products/sw/cscowork/ps2064/products_user_guide_chapter0
9186a00800e0a00.html
For more information on Cisco MIBs, refer to Network Management Software at this URL:
http://www.cisco.com/public/sw-center/sw-netmgmt.shtml


2009 Cisco Systems, Inc. Introduction to QoS 1-49
Module Self-Check
Use the questions here to review what you learned in this module. The correct answers and
solutions are found in the Module Self-Check Answer Key.
Q1) Which of these terms is used to describe the time that it takes to actually transmit a
packet on a link (put bits on the wire)? (Source: Understanding the Need for QoS)
A) encoding delay
B) processing delay
C) serialization delay
D) transmission delay
Q2) What is the best solution for reducing delay on a link? (Source: Understanding the
Need for QoS)
A) compress data and headers
B) drop low-priority packets early
C) increase the bandwidth of the link
D) incorporate advanced queuing technologies
Q3) Which three of these are characteristics of converged network traffic? (Choose three.)
(Source: Understanding the Need for QoS)
A) constant small-packet flow
B) time-sensitive packets
C) intolerance of brief outages
D) bursty small packet flow
Q4) How much one-way delay can a voice packet tolerate? (Source: Understanding QoS)
A) 15 ms
B) 150 ms
C) 300 ms
D) 200 ms
Q5) Which transport layer protocol is used for voice traffic? (Source: Understanding QoS)
A) UDP
B) TCP
C) XNS
D) HTTP
Q6) Which three of these represent components in the definition of a QoS policy? (Choose
three.) (Source: Understanding QoS)
A) user-validated
B) network-wide
C) specific levels of quality of service
D) different classes of network traffic
Q7) How are QoS implementations that are generated using AutoQoS fine-tuned? (Source:
Implementing QoS)
A) command-line interface
B) Modular QoS CLI
C) QoS AutoTune
D) QoS Policy Manager
1-50 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Q8) Which three of these are advantages of using MQC? (Choose three.) (Source:
Implementing QoS)
A) reduction in time to configure a complex policy
B) ability to apply one policy to multiple interfaces
C) separation of classification from policy definition
D) automatic generation of CLI commands from MQC macros
Q9) Which QoS implementation method has the quickest implementation time for simple
networks? (Source: Implementing QoS)
A) CLI
B) MQC
C) AutoQoS
D) AutoTuner
Q10) Which two of these MIBs are specifically designed for managing QoS in a network?
(Choose two.) (Source: Implementing QoS)
A) Modular QoS MIB
B) Class-Based QoS MIB
C) QoS Policy Manager MIB
D) Cisco NBAR Protocol Discovery MIB
2009 Cisco Systems, Inc. Introduction to QoS 1-51
Module Self-Check Answer Key
Q1) C
Q2) C
Q3) A, B, C
Q4) B
Q5) A
Q6) B, C, D
Q7) A
Q8) A, B, C
Q9) C
Q10) B, D
1-52 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Module 2
The Building Blocks of QoS
Overview
Quality of service (QoS) and its implementations in a converged network are complex and
create many challenges for network administrators and architects. Evolving technology
introduces different approaches to providing QoS to network applications. Many QoS building
blocks or features operate at different parts of a network to create an end-to-end QoS system.
Managing how these building blocks are assembled and how different QoS features are used
can be a difficult task. In response to these difficulties, three different implementation models
for QoS have been developed.
This module discusses the different implementation models of QoS and describes how the
different building blocks of QoS integrate into each model. This module also discusses the
different QoS features and where those features are typically implemented within a network.
Module Objectives
Upon completing this module, you will be able to identify and describe different models used
for ensuring QoS in a network, and explain key QoS mechanisms that are used to implement
the models. This ability includes being able to meet these objectives:
Correctly match a list of QoS actions to one or more of the three models for implementing
QoS on a network
Describe the Integrated Services model and explain how this model can be used to
implement QoS in a network
Describe the Differentiated Services model and explain how this model can be used to
implement QoS in a network
Correctly match a list of QoS actions to mechanisms for implementing DiffServ QoS and
identify where in a network the different QoS mechanisms are commonly used
2-2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 1
Identifying Models for
Implementing QoS
Overview
Three different models exist for implementing quality of service (QoS) on a network. The best-
effort model was designed for best-effort, no-guarantee delivery of packets and is still the
predominant model in the Internet today. The Integrated Services (IntServ) model was
introduced to supplement the best-effort delivery by setting aside some bandwidth for
applications that require bandwidth and delay guarantees. IntServ expects applications to signal
their requirements to the network. The Differentiated Services (DiffServ) model was added to
provide greater scalability in providing QoS to IP packets. The main difference between the
IntServ and DiffServ models is that in DiffServ, the network recognizes packets (no signaling is
needed) and provides the appropriate services to the packets. IP networks today can use all
three models at the same time.
Objectives
Upon completing this lesson, you will be able to correctly match QoS actions to one or more
models for implementing QoS on a network. This ability includes being able to meet these
objectives:
Describe the types of models for providing QoS on a network
Describe the key features of the best-effort model for QoS
Describe the key features of IntServ for QoS
Describe the key features of DiffServ for QoS
2-4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Models
This topic describes the types of models for providing QoS on a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-2
Three Models for Quality of Service
Best-Effort: No QoS is applied to packets.
IntServ: Applications signal to the network that they require
special QoS.
DiffServ: The network recognizes classes that require
special QoS.

The following three models exist for implementing QoS in a network:
Best-effort: With the best-effort model, QoS is not applied to packets. If it is not important
when or how packets arrive, the best-effort model is appropriate.
IntServ: IntServ can provide very high QoS to IP packets. Essentially, applications signal
to the network that they will require special QoS for a period of time and that bandwidth is
reserved. With IntServ, packet delivery is guaranteed. However, the use of IntServ can
severely limit the scalability of a network.
DiffServ: DiffServ provides the greatest scalability and flexibility in implementing QoS in
a network. Network devices recognize traffic classes and provide different levels of QoS to
different traffic classes.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-5
Best-Effort Model
This topic describes the key features of the best-effort model for QoS.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-3
Best-Effort Model
Internet initially based on a
best-effort packet delivery
service
The default mode for all traffic
No differentiation between
types of traffic
Like using standard mail
It will get there when it gets there.

The Internet was designed for best-effort, no-guarantee delivery of packets. This behavior is
still predominant on the Internet today.
If QoS policies are not implemented, traffic is forwarded using the best-effort model. All
network packets are treated exactly the samean emergency voice message is treated exactly
like a digital photograph attached to an email. Without the implementation of QoS, the network
cannot tell the difference between packets and, as a result, cannot treat packets preferentially.
When you drop a letter in standard postal mail, you are using a best-effort model. Your letter
will be treated exactly the same as every other letter; it will get there when it gets there. With
the best-effort model, the letter may actually never arrive and, unless you have a separate
notification arrangement with the letter recipient, you may never know if the letter does not
arrive.
2-6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-4
Best-Effort Model (Cont.)
Benefits:
Highly scalable
No special mechanisms required
Drawbacks:
No service guarantees
No service differentiation

The best-effort model has these significant benefits:
The best-effort model has nearly unlimited scalability. The only way to reach scalability
limits is to reach bandwidth limits, in which case all traffic becomes equally delayed.
You do not need to employ special QoS mechanisms to use the best-effort model. It is the
easiest and quickest model to deploy.
The best-effort model also has these drawbacks:
Nothing is guaranteed. Packets will arrive whenever they can, in any order possible, if they
arrive at all.
Packets are not given preferential treatment. Critical data is treated the same as casual
email.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-7
IntServ Model
This topic describes the key features of the IntServ model for QoS.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-5
IntServ Model
Some applications have
special bandwidth or delay
requirements or both
IntServ guarantees a
predictable behavior of the
network for these applications
Guaranteed delivery:
no other traffic can use
reserved bandwidth
Like having your own private
courier plane
It will be there by 10:30 a.m.

Some applications, such as high-resolution video, require consistent, dedicated bandwidth to
provide sufficient quality for viewers. IntServ was introduced to guarantee predictable network
behavior for these applications.
Because IntServ reserves bandwidth throughout a network, no other traffic can use the reserved
bandwidth. Bandwidth that is unused, but reserved, is wasted.
IntServ is similar to a concept known as hard QoS . With hard QoS, traffic characteristics
such as bandwidth, delay, and packet-loss rates are guaranteed end-to-end. This guarantee
ensures both predictable and guaranteed service levels for mission-critical applications. There
will be no impact on traffic when guarantees are made, regardless of additional network traffic.
Hard QoS is accomplished by negotiating specific QoS requirements upon establishment of a
connection and by using Call Admission Control (CAC) to ensure that no new traffic will
violate the guarantee. Such guarantees require an end-to-end QoS approach with both
complexity and scalability limitations. Large network environments that contain heavy traffic
loads will be extremely challenged to track QoS guarantees for hundreds of thousands of
signaled flows.
Using IntServ is like having a private courier airplane or truck dedicated to the delivery of your
traffic. This model ensures quality and delivery, is expensive, and is not scalable.
2-8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-6
IntServ Model (Cont.)
Provides multiple service
levels
Requests specific kind of
service from the network
before sending data
Uses RSVP to reserve
network resources
Uses intelligent queuing
mechanisms
End-to-end

IntServ is a multiple-service model that can accommodate multiple QoS requirements. IntServ
inherits the connection-oriented approach from telephony network design. Every individual
communication must explicitly specify its traffic descriptor and requested resources to the
network. The edge router performs admission control to ensure that available resources are
sufficient in the network. The IntServ standard assumes that routers along a path set and
maintain the state for each individual communication.
The role of Resource Reservation Protocol (RSVP) in the Cisco QoS architecture is to provide
resource admission control for VoIP networks. If resources are available, RSVP accepts a
reservation and installs a traffic classifier in the QoS forwarding path. The traffic classifier tells
the QoS forwarding path how to classify packets from a particular flow and what forwarding
treatment to provide.
In the IntServ model, the application requests a specific kind of service from the network
before sending data. The application informs the network of its traffic profile and requests a
particular kind of service that can encompass its bandwidth and delay requirements. The
application is expected to send data only after it gets a confirmation from the network. The
application is also expected to send data that lies within its described traffic profile.
The network performs admission control based on information from the application and
available network resources. The network commits to meeting the QoS requirements of the
application as long as the traffic remains within the profile specifications. The network fulfills
its commitment by maintaining the per-flow state, and then performing packet classification,
policing, and intelligent queuing based on that state.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-9
The QoS feature set in Cisco IOS Software includes these features that provide controlled-load
service:
RSVP can be used by applications to signal their QoS requirements to the router.
Intelligent queuing mechanisms can be used with RSVP to provide these QoS service
levels:
Guaranteed-rate: Guaranteed-rate service level allows applications to reserve
bandwidth to meet their requirements. For example, a VoIP application can reserve
32 Mb/s end-to-end using this type of service. Cisco IOS QoS uses low latency
queuing (LLQ) with RSVP to provide guaranteed-rate type of service.
Controlled-load: Controlled-load service level allows applications to have low delay
and high throughput, even during times of congestion. For example, adaptive real-
time applications, such as the playback of a recorded conference, can use this
service. Cisco IOS QoS uses RSVP with weighted random early detection (WRED)
to provide controlled-load type of service.
2-10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-7
IntServ Model (Cont.)
RSVP QoS services
Guaranteed-rate service
Controlled-load service
RSVP provides policy to QoS mechanisms

RSVP is an IP service that allows end systems or hosts on either side of a router network to
establish a reserved-bandwidth path between them to predetermine and ensure QoS for their
data transmission. RSVP is currently the only standard signaling protocol designed to guarantee
network bandwidth from end to end for IP networks.
RSVP is an Internet Engineering Task Force (IETF) standard (RFC 2205) protocol for allowing
an application to dynamically reserve network bandwidth. RSVP enables applications to
request a specific QoS for a data flow (shown in the figure). Cisco implementation also allows
RSVP to be initiated within the network, using configured proxy RSVP. Network managers can
take advantage of RSVP benefits in the network, even for non-RSVP-enabled applications and
hosts.
Hosts and routers use RSVP to deliver QoS requests to the routers along the paths of the data
stream. Hosts and routers also use RSVP to maintain the router and host state to provide the
requested service, usually bandwidth and latency. RSVP uses a mean data rate; that is, the
largest amount of data the router will keep in queue and the minimum QoS used to determine
bandwidth reservation.
LLQ or WRED act as the workhorses for RSVP, setting up the packet classification and
scheduling that is required for the reserved flows. Using LLQ, RSVP can deliver an IntServ-
guaranteed service. Using WRED, RSVP can deliver a controlled-load service. RSVP can be
deployed in existing networks with a software upgrade.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-11
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-8
IntServ Model (Cont.)
Benefits:
Explicit resource admission control (end to end)
Per-request policy admission control (authorization object,
policy object)
Signaling of dynamic port numbers (for example, H.323)
Drawbacks:
Continuous signaling because of stateful architecture
Flow-based approach not scalable to large implementations
such as the public Internet (can be made more scalable when
combined with elements of the DiffServ model)

The main benefits of IntServ and RSVP are as follows:
RSVP signals QoS requests per individual flow. The network can then provide guarantees
to these individual flows. The problem with this is that IntServ does not scale to large
networks because of the large number of concurrent RSVP flows.
RSVP informs network devices of flow parameters (IP addresses and port numbers). Some
applications use dynamic port numbers, which can be difficult for network devices to
recognize. Network-Based Application Recognition (NBAR) is a mechanism that has been
introduced to supplement RSVP for applications that use dynamic port numbers but do not
use RSVP.
IntServ supports admission control, which allows a network to reject (or downgrade) new
RSVP sessions if one of the interfaces in the path has reached the limit (that is, all
reservable bandwidth is booked).
The main drawbacks of IntServ and RSVP are as follows:
There is continuous signaling because of the stateful RSVP operation.
RSVP is not scalable to large networks where per-flow guarantees would have to be made
to thousands of concurrent RSVP flows.
2-12 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
DiffServ Model
This topic describes the key features of the DiffServ model for QoS.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-9
DiffServ Model
Network traffic identified by
class
Network QoS policy enforces
differentiated treatment of
traffic classes
You choose level of service
for each traffic class
Like using a package delivery
service
Do you want overnight delivery?
Do you want two-day air
delivery?
Do you want three- to seven-day
ground delivery?

DiffServ was designed to overcome the limitations of both the best-effort and IntServ models.
DiffServ can provide an almost guaranteed QoS, while still being cost-effective and scalable.
DiffServ is similar to a concept known as soft QoS. With soft QoS, QoS mechanisms are
used without prior signaling. In addition, QoS characteristics (bandwidth and delay, for
example), are managed on a hop-by-hop basis by policies that are established independently at
each intermediate device in the network. The soft QoS approach is not considered an end-to-
end QoS strategy because end-to-end guarantees cannot be enforced. However, soft QoS is a
more scalable approach to implementing QoS than hard QoS, because many (hundreds or
potentially thousands) of applications can be mapped into a small set of classes upon which
similar sets of QoS behaviors are implemented. Although QoS mechanisms in this approach are
enforced and applied on a hop-by-hop basis, uniformly applying global meaning to each traffic
class provides both flexibility and scalability.
With DiffServ, network traffic is divided into classes based on business requirements. Each of
the classes can then be assigned a different level of service. As the packets traverse a network,
each of the network devices identifies the packet class and services the packet according to that
class. You can choose many levels of service with DiffServ. For example, voice traffic from IP
phones is usually given preferential treatment over all other application traffic. Email is
generally given best-effort service. Nonbusiness traffic can either be given very poor service or
blocked entirely.
DiffServ works like a package delivery service. You request (and pay for) a level of service
when you send your package. Throughout the package network, the level of service is
recognized and your package is given either preferential or normal service, depending on what
you requested.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-13
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 10
DiffServ Model (Cont.)
Benefits:
Highly scalable
Many levels of quality possible
Drawbacks:
No absolute service guarantee
Complex mechanisms

DiffServ has these key benefits:
It is highly scalable.
It provides many different levels of quality.
DiffServ also has these drawbacks:
No absolute guarantee of service quality can be made.
It requires a set of complex mechanisms to work in concert throughout the network.
2-14 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 11
Summary
There are three different models for providing QoS: Best-effort,
IntServ, and DiffServ.
While the best-effort model is highly scalable, it has no provision
for differentiating among types of network traffic and, as a result,
does not provide QoS.
The Integrated Services model offers absolute QoS guarantees
by explicitly reserving bandwidth, but is not scalable.
The Differentiated Services model provides the ability to classify
network traffic and offer many levels of QoS, while being highl y
scalable.


Lesson 2
Understanding the Integrated
Services Model
Overview
The Integrated Services (IntServ) model is an architecture that offers guaranteed quality of
service (QoS) end-to-end over the network. The key components of IntServ are Resource
Reservation Protocol (RSVP) and Call Admission Control (CAC). This lesson describes the
various aspects of the IntServ model and how it uses RSVP.
Objectives
Upon completing this lesson, you will be able to describe IntServ and explain how it can be
used to implement QoS in the network. This ability includes being able to meet these
objectives:
Explain the key features of the IntServ model for QoS
Describe the IntServ component, RSVP, and its function
Explain how bandwidth is used on an interface configured for RSVP
Explain how to enable RSVP on an interface
Explain how the IntServ model integrates into enterprise networks
2-16 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Integrated Services Model
This topic describes the purpose and function of the IntServ model.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-2
IntServ Model
IntServ provides end-to-end
QoS service for applications.
RSVP mechanism is used to
provision end-to-end QoS
treatment.
CAC is used through the
network to ensure resource
availability.

IntServ is an architecture for providing end-to-end QoS. The IntServ solution allows end
stations to make requests upon the network. The network participates in this QoS scheme by
either reserving or not reserving network resources for the requesting end station. The IntServ
architecture provides a way to guarantee network quality levels by specifically reserving
services and controlling the load of traffic on devices to provide the guaranteed service
requirements.
The IntServ module uses a CAC component and a policy control component to manage
requests for reservations. In other words, these components are used by RSVP-enabled routers
to determine whether there are enough resources to support the reservation request and whether
the host requesting the reservation can be granted a reservation.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-17
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-3
IntServ Model (Cont.)
RSVP supports the following messages:
PATH
RESV
Error and Confirmation
Teardown
Each reservation is unidirectional.
RSVP
PATH
RSVP
PATH
RSVP
PATH
RSVP
PATH
RSVP
PATH
RSVP
PATH
RSVP
RESV
RSVP
RESV
RSVP
RESV
RSVP
RESV
RSVP
RESV
RSVP
RESV
RSVP
Sender
RSVP
Receiver
R1 R2 R3

The figure illustrates a typical RSVP message being sent and the messages generated by the
receiver in the establishment of a reservation. These messages are required in order for a
unidirectional reservation to be made. In this example, the sender has successfully requested a
reservation to the end host. It is important to note that this is only a one-way reservation.
RSVP supports these messages:
Path messages (PATH): An RSVP path message is sent by each sender along the unicast
or multicast routes provided by the routing protocol. A path message is used to store the
path state in each node. The path state is used to route reservation-request messages in the
reverse direction.
Reservation-request messages (RESV): A reservation-request message is sent by each
receiver host toward the senders. This message follows in reverse the routes that the data
packets use, all the way to the sender hosts. A reservation-request message must be
delivered to the sender hosts so that the hosts can set up appropriate traffic-control
parameters for the first hop.
Error and confirmation messages: Reservation-request acknowledgment messages are
sent as the result of the appearance of a reservation-confirmation object in a reservation-
request message. This acknowledgment message contains a copy of the reservation
confirmation. An acknowledgment message is sent to the unicast address of a receiver host,
and the address is obtained from the reservation-confirmation object. A reservation-request
acknowledgment message is forwarded to the receiver hop-by-hop to accommodate the
integrity-check mechanism.
Path error messages result from path messages and travel toward senders. Path error
messages are routed hop-by-hop using the path state. At each hop, the IP destination
address is the unicast address of the previous hop.
2-18 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Reservation-request error messages result from reservation-request messages and
travel toward the receiver. Reservation-request error messages are routed hop-by-
hop using the reservation state. At each hop, the IP destination address is the unicast
address of the next-hop node. Information carried in error messages can include the
following:
Admission failure
Bandwidth unavailable
Service not supported
Bad flow specification
Ambiguous path
Teardown messages: RSVP teardown messages remove the path and reservation state
without waiting for the cleanup timeout period. Teardown messages can be initiated by an
application in an end system (sender or receiver) or a router as the result of state timeout.
RSVP supports the following two types of teardown messages:
path-teardown: Path-teardown messages delete the path state (which deletes the
reservation state), travel toward all receivers downstream from the point of
initiation, and are routed like path messages.
reservation-request teardown: Reservation-request teardown messages delete the
reservation state, travel toward all matching senders upstream from the point of
teardown initiation, and are routed like corresponding reservation-request messages.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-19
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-4
IntServ Model (Cont.)
There are three types of QoS services offered by RSVP:
Best Effort
Guaranteed Rate
Controlled Load

There are three types of QoS services offered by RSVP:
Best effort: There is no QoS at all, just first in, first out.
Guaranteed rate: The RSVP-enabled routers try to guarantee the worst-case delay that
will be incurred by the flow when traveling across the network. Guaranteed-rate services
compute the delay taken from the PATH messages along the RSVP path of the flow and
provide this information to the receiver during the resource reservation request.
Controlled Load: Controlled-load services allow an RSVP session to flow through the
network with the least possible interruption from other traffic flows.
If RSVP is configured to prefer a guaranteed rate, weighted random early detection (WRED) is
used to ensure QoS. If a controlled load is preferred, weighted fair queuing (WFQ) is used.
RSVP is used with DiffServ. When deployed with DiffServ, RSVP is used solely for CAC, and
the data flow is then passed through QoS policies such as low-latency queuing (LLQ). When
LLQ is used, the data traffic for the RSVP reservation is passed through the low-latency
priority queue.
2-20 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Components of RSVP
This topic describes the components of RSVP.
2009 Cisco Systems, Inc. All rights reserved. QoS v2.32-5
RSVP Components
NO
YES
?
Call Admission Control
Control Plane
Data Plane
WFQ or WRED
Scheduling + Policing
RSVP signaling (PATH)
RSVP signaling (RESV)
Best Effort:: FIFO
Guaranteed rate: WRED
Controlled load: WFQ
Data flow Data flow

In the IntServ model, RSVP involves use of both the control plane and the data plane. In the
control plane, RSVP provides a CAC function for reservation request which is based on
whether the router has the resources to support the reservation request and whether the host
making the request has the right to request the reservation. In the data plane, RSVP data flows
are classified and policed based on the traffic descriptions contained in the RSVP messages,
and queued to the appropriate queues.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-21
RSVP Interface Bandwidth Queuing
This topic describes how bandwidth is used on an interface configured for RSVP.
2009 Cisco Systems, Inc. All rights reserved. QoS v2.32-6
RSVP Interface Queuing
0%
100%
25%
50%
75%
*WFQ or WRED
RSVP flows admitted
or rejected based on
actual bandwidth left
available
ip rsvp bandwidth
should be set to
total bandwidth
available to RSVP
Priority
*
RSVP flows assigned to
priority queueall
other traffic is
scheduled and queued
using WFQ or WRED
mechanisms

The figure outlines how RSVP data flows are allocated when RSVP is configured on an
interface. The maximum bandwidth available on any interface is 75 percent of the line speed;
the rest is used for control plane traffic. When RSVP is configured on an interface, the option is
to use the entire usable bandwidth or a certain configured amount of bandwidth. The default is
for RSVP data flows to use up to 75 percent of the available bandwidth.
The figure shows that when RSVP is configured, a priority queue is set up and used by RSVP
data flows. In the event of congestion, all other data flows are scheduled and queued using
either WFQ or WRED mechanisms. The type of scheduling and queuing depends on whether
reservations are guaranteed-rate or controlled-load QoS services.
When RSVP is used with LLQ and class-based weighted fair queuing (CBWFQ), the RSVP
data flows are subject to the same rules as all other traffic.
2-22 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Enabling RSVP on an Interface
This topic describes how to enable RSVP on an interface.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-7

Enables RSVP

Disables reserving interface resources


Disables packet classification


Enabling RSVP

The figure shows the router interface commands used to enable and disable RSVP on an
interface. The first bulleted item shows the command for enabling RSVP on an interface, and
the arguments under this command are to either accept the default maximum data flow, which
is 75 percent of the line speed, or to define a maximum interface bandwidth for RSVP to use
and a set maximum for each RSVP data flow.
The second and third bulleted items enable RSVP to follow the same scheduling and queuing
mechanisms as configured in LLQ with CBWFQ. These two commands turn off resource
reservation protocol, making RSVP only an admission control mechanism.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-23
IntServ and DiffServ Integration
This topic describes how the IntServ module is used in a network.
2009 Cisco Systems, Inc. All rights reserved. QoS v2.32-8
IntServ and DiffServ Integration
IntServ/D
iffServ
model
RSVP signaling (PATH)
RSVP signaling (RESV)
Data
NO
YES
?
Call Admission Control
Control Plane
Data Plane
LLQ with CBWFQ
Scheduling + Policing
Data

In the DiffServ model, RSVP involves only the control plane performing admission control,
and does not involve the data plane. With IntServ integrated into the DiffServ model, it is
possible to add RSVP admission control to a network that is already using a differentiated
services approach to QoS. RSVP admits or rejects calls based on a preconfigured bandwidth
amount, but the actual scheduling is based on preexisting LLQ criteria, such as the
differentiated services code point (DSCP) value of each packet.
2-24 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-9
Summary
IntServ provides end-to-end QoS service for applications.
RSVP is used to provision end-to-end QoS treatment.
RSVP signaling uses the control plane and is used for Call
Admission Control. Reservation data flow uses the data plane in
which WFQ and WRED is used.
The ip rsvp bandwidth command is used to enable RSVP on an
interface.
RSVP integrates with DiffServ networks, in which RSVP is used
for flow admission control.


Lesson 3
Understanding the
Differentiated Services Model
Overview
Differentiated Services (DiffServ) is a multiple-service model for implementing quality of
service (QoS) in the network. With DiffServ, the network tries to deliver a particular kind of
service that is based on the QoS specified by each packet. This specification can occur in
different ways, such as using the differentiated services code point (DSCP) in IP packets or
source and destination addresses. The network uses the QoS specification of each packet to
classify, shape, and police traffic and to perform intelligent queuing.
Objectives
Upon completing this lesson, you will be able to describe DiffServ and explain how it can be
used to implement QoS in the network. This ability includes being able to meet these
objectives:
Describe the purpose and function of DiffServ
Describe the basic format and the purpose of the DSCP field in the IP header
Describe the different per-hop behaviors used in DSCP
Describe the interoperability between DSCP-based and IP precedence-based devices in a
network
2-26 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Differentiated Services Model
This topic describes the purpose and function of the DiffServ model.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-2
DiffServ Terminology
Behavior Aggregate (BA): A collection of packets with the same DSCP
crossing a link in a particular direction (implemented as traffic classes in
Cisco IOS Software)
Differentiated services code point (DSCP): A value in the IP header used
to select a QoS treatment for a packet
Per-hop behavior (PHB): The externally observable forwarding behavior
(QoS treatment) applied at a DiffServ-compliant node to a DiffServ BA
Apply PHB X to BA 1
Apply PHB C to BA 2
Apply PHB Z to BA 1
Apply PHB B to BA 2
Apply PHB A to BA 1
Apply PHB Y to BA 2
BA 2
FTP from Host A to
Host B
DSCP 22
FTP from Host A to
Host B
DSCP 22
FTP from Host A to
Host B
DSCP 22
Voice
DSCP 46
BA 1
Voice
DSCP 46
Voice
DSCP 46
Host A
Host B

In order to understand the Differentiated Services (DiffServ) module, it is important to
understand this DiffServ terminology:
Behavior aggregate (BA): A BA is a collection of packets with the same DSCP value
crossing a link in a particular direction. Packets from multiple applications and sources can
belong to the same BA. In Cisco IOS Software, classification of packets into BAs can be
done by using Modular quality of service command-line interface (MQC) class maps.
Differentiated services code point (DSCP): A value in the IP header that is used to select
a QoS treatment for a packet. In the DiffServ model, classification and QoS revolve around
the DSCP.
Per-hop behavior (PHB): A PHB is an externally observable forwarding behavior (or QoS
treatment) applied at a DiffServ-compliant node to a DiffServ BA. The term PHB refers to
the packet scheduling, queueing, policing, or shaping behavior of a node on any given
packet belonging to a BA. The DiffServ model itself does not specify how PHBs must be
implemented. A variety of techniques may be used to affect the desired traffic conditioning
and PHB. In Cisco IOS Software, you can configure PHBs by using MQC policy maps.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-27
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-3
DiffServ Model
In the DiffServ model, QoS behaviors are applied to traffic classes on a per-hop
basis.
Complex t raffic classification and conditioning are performed at the network
edge.
Network t raffic is categorized into BAs based on the content of some portion
of the packet header.
Each BA is assigned a DSCP value, and the packet header of each packet
belonging to the BA is marked with the DSCP value.
Network devices in the core use t he DSCP value to select a per-hop behavior
for the packet .
DiffServ
Cl ass-based
Per-fl ow state need not be mai ntained within
the core of the network
Level of servi ce determi ned by static polici es
i mplemented in each node along network path
Scales well
IntServ
Fl ow-based
Each node keeps state information for each
flow
Appl icati ons request l evel of service
Scales poorl y

The DiffServ architecture is based on a simple model in which traffic entering a network is
classified and possibly conditioned at the boundaries of the network. The traffic class is then
identified with a DSCP or bit marking in the IP header. The primary advantage of DiffServ is
scalability.
DSCP values are used to mark packets to indicate a desired PHB. Within the core of the
network, packets are forwarded according to the PHB that is associated with the DSCP.
One of the primary principles of DiffServ is that you should mark packets as close to the edge
of the network as possible. It is often a difficult and time-consuming task to determine the
traffic class for a data packet. You should classify the data as few times as possible. By
marking the traffic at the network edge, core network devices and other devices along the
forwarding path will be able to quickly determine the proper QoS treatment to apply to a given
traffic flow.
DSCP supersedes IP precedence, a three-bit field in the type of service (ToS) byte of the IP
header originally used to classify and prioritize types of traffic. However, DSCP maintains
interoperability with devices that use IP precedence.
2-28 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
DSCP Encoding
This topic describes the basic format of DSCP and explains the purpose of the DSCP field in
the IP header.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-4
IP Precedence
Version Offset Proto SA DA Len ID TTL
Header
Checksum
Flags
ToS
Byte
IPv4 Packet Header
Unused
DSCP
Flow
Control
IPv4 IP Precedence
DS Field
1 7 6 5 4 3 2 0
IHL
DSCP Encoding
DS field: The IP version 4 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)

DiffServ uses the Differentiated Services field (DS field) in the IP header to mark packets
according to their classification into BAs. The DS field occupies the same eight bits of the IP
header that were previously used for the ToS byte.
The following three Internet Engineering Task Force (IETF) standards describe the purpose of
the eight bits of the DS field:
RFC 791 includes specification of the ToS field, where the high-order three bits are used
for IP precedence. The other bits are used for delay, throughput, reliability, and cost.
RFC 1812 modifies the meaning of the ToS field by removing meaning from the five low-
order bits (those bits should all be 0). This gained widespread use and became known as
the original IP precedence.
RFC 2474 replaces the ToS field with the DS field, where the six high-order bits are used
for the DSCP. The remaining two bits are used for explicit congestion notification. RFC
3260 (New Terminology and Clarifications for Diffserv) updates RFC 2474 and provides
terminology clarifications.
Each DSCP value identifies a BA. Each BA is assigned a PHB. Each PHB is implemented
using the appropriate QoS mechanism or set of QoS mechanisms.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-29
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-5
IPv6 and QoS
IPv4 Header
Field name kept from IPv4 to IPv6
Fields not kept i n IPv6
Name and position changed in IPv6
New field in IPv6
Version IHL
Type of
Service
Total Length
Identification Flags
Fragment
Offset
Time to Live Protocol Header Checksum
Source Address
Destination Address
Options Padding
IPv6 Header
Version Traffic Class Flow Label
Payload Length
Hop
Limit
Source Address
DestinationAddress
Next
Header

IP version 6 (IPv6) also provides support for QoS marking via a field in the IPv6 header.
Similar to the ToS (or DS) field in the IPv4 header, the Traffic Class field (8 bits) is available
for use by originating nodes and forwarding routers to identify and distinguish between
different classes or priorities of IPv6 packets. The Traffic Class field can be used to set specific
precedence or DSCP values, which are used the same way they are used in IPv4.
IPv6 also has a 20-bit field known as the Flow Label field. The flow label enables per-flow
processing for differentiation at the IP layer. It can be used for special sender requests and is set
by the source node. The flow label must not be modified by an intermediate node. The main
benefit of the flow label is that transit routers do not have to open the inner packet to identify
the flow, which aids with identification of the flow when using encryption and in other
scenarios. The Flow Label field is described in RFC 3697.
Current Cisco IOS Software support for IPv6 QoS includes the following:
Packet classification
Queuing (including LLQ)
Traffic shaping
Weighted random early detection (WRED)
Class-based packet marking
Policing of IPv6 packets
2-30 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
The following QoS features are not supported for managing IPv6 traffic:
Compressed Real-Time Transport Protocol (cRTP)
Network-Based Application Recognition (NBAR)
Committed access rate (CAR)
Priority queuing (PQ)
Custom queuing (CQ)
Note For more information on implementing QoS for IPv6, refer to the Implementing QoS for IPv6
section of the Cisco IOS IPv6 Configuration Guide, Release 12.4, at the following URL:
http://www.cisco.com/en/US/docs/ios/ipv6/configuration/guide/ip6-qos.html#wp1055373
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-31
Per-Hop Behaviors
This topic describes the different PHBs that are used in DSCP.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-6
Per-Hop Behaviors
DSCP selects PHB throughout the network.
Default PHB: (FIFO, tail drop)
EF: Expedited Forwarding
AF: Assured Forwarding
Class-Selector: (IP Precedence) PHB
000 = Default
101 = Expedited Forwarding
001, 010, 011, or 100 = Assured Forwarding
DSCP 1 1 1 1 0 0
000 = Class Selector

These PHBs are defined by IETF standards:
Default PHB: Used for best-effort service (bits 5 to 7 of DSCP = 000)
Expedited Forwarding (EF) PHB: Used for low-delay service (bits 5 to 7 of DSCP =
101)
Assured Forwarding (AF) PHB: Used for guaranteed bandwidth service (bits 5 to 7 of
DSCP = 001, 010, 011, or 100)
Class-Selector PHB: Used for backward compatibility with non-DiffServ-compliant
devices (RFC 1812-compliant devices [bits 2 to 4 of DSCP = 000])
2-32 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-7
Per-Hop Behaviors (Cont.)
EF PHB:
Ensures a minimum departure rate
Guarantees bandwidth (The class is guaranteed an amount of
bandwidth with prioritized forwarding.)
Polices bandwidth (The class is not allowed to exceed the
guaranteed amount? excess traffic is dropped.)
DSCP value 101110: looks like IP precedence 5 to non-DiffServ-
compliant devices
Bits 5 to 7: 101 = 5 (Same three bits used for IP precedence)
Bits 3 to 4: 11 = drop probability high
Bit 2: Just 0
DSCP 1 1 1 1 0 0
5
No Drop
Probability
0

The EF PHB is identified based on the following:
The EF PHB ensures a minimum departure rate. The EF PHB provides the lowest possible
delay to delay-sensitive applications.
The EF PHB guarantees bandwidth. The EF PHB prevents starvation of the application if
there are multiple applications using EF PHB.
The EF PHB polices bandwidth when congestion occurs. The EF PHB prevents starvation
of other applications or classes that are not using this PHB.
Packets requiring EF should be marked with DSCP binary value 101110 (46 or 0x2E).
Non-DiffServ-compliant devices will regard EF DSCP value 101110 as IP precedence 5
(101). This precedence is the highest user-definable IP precedence and is typically used for
delay-sensitive traffic (such as VoIP). Bits 5 to 7 of the EF DSCP value are 101, which
matches IP precedence 5 and allows backward compatibility.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-33
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-8
Per-Hop Behaviors (Cont.)
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
DSCP 1 0 1 1 0 0
aaa dd 0

The AF PHB is identified based on the following:
The AF PHB guarantees a certain amount of bandwidth to an AF class.
The AF PHB allows access to extra bandwidth, if available.
Packets requiring AF PHB should be marked with DSCP value aaadd0, where aaa is
the number of the class and dd is the drop probability.
There are four standard defined AF classes. Each class should be treated independently and
should have allocated bandwidth that is based on the QoS policy.
2-34 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-9
Per-Hop Behaviors (Cont.)
Each AF class uses three DSCP values.
Each AF class is independently forwarded with its guaranteed bandwidth.
Congestion avoidance is used within each class to prevent congestion
within the class.
DSCP = AF11 0 1 1 0 0 0
dd 0
Class Value
AF1
AF2
AF3
AF4
001
dd 0 010
dd 0 011
dd 0 100
Drop
Probability
(dd)
Low
Medium
High
01
10
11
AF11
AF12
AF13
Value
AF
Value

Each AF class is assigned an IP precedence and has three drop probabilities: low, medium, and
high.
AFxy: Assured Forwarding (RFC 2597), where x corresponds to the IP precedence value
(only 14 are used for AF classes), and y corresponds to the Drop Preference value (either 1, 2,
or 3).
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-35
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 10
Per-Hop Behaviors (Cont.)
A DiffServ node must allocate a configurable, minimum amount of
forwarding resources (buffer space and bandwidth) per AF class.
Excess resources may be allocated between non-idle classes.
The manner must be specified.
Reordering of IP packets of the same flow is not allowed if they
belong to the same AF class.

An AF implementation must attempt to minimize long-term congestion within each class, while
allowing short-term congestion resulting from bursts. This requires an active queue
management algorithm. An example of such an algorithm is WRED, which is described in
detail in the Congestion Avoidance module in this course.
The AF specification does not define the use of a particular algorithm, but it does have certain
requirements and properties.
An AF implementation must detect and respond to long-term congestion within each class by
dropping packets, while handling short-term congestion (packet bursts) by queuing packets.
This implies the presence of a smoothing or filtering function that monitors the instantaneous
congestion level and computes a smoothed congestion level. The dropping algorithm uses this
smoothed congestion level to determine when packets should be discarded.
The dropping algorithm must treat all packets within a single class and precedence level
identically. Therefore, within a single traffic class, the discard rate of a particular packet flow
will be proportional to the percentage of the total amount of traffic.
2-36 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Backward Compatibility Using the Class Selector
This topic describes the interoperability between DSCP-based and IP precedence-based devices
in a network.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 11
Backward Compatibility Using the Class
Selector
Class-Selector xxx000 DSCP
Compatibility with current IP precedence usage (RFC 1812) = maps
IP precedence to DSCP
Differentiates probability of timely forwarding
(xyz000) >= (abc000) if xyz > abc
If a packet has DSCP = 011000, it has a greater probability of
timely forwarding than a packet with DSCP = 001000.
x x 0 0 x 0
IP version 4 I P precedence
Class
Selector
DSCP
IP precedence

The meaning of the eight bits in the DS field of the IP packet has changed over time to meet the
expanding requirements of IP networks.
Originally, the field was referred to as the ToS field and the first three bits of the field (bits 7 to
5) defined a packet IP precedence value. A packet could be assigned one of six priorities based
on the value of the IP precedence value (eight total values minus two reserved values). IP
precedence 5 (101) was the highest priority that could be assigned (RFC 791).
RFC 2474 replaced the ToS field with the DS field, in which a range of eight values (class
selector) is used for backward compatibility with IP precedence. There is no compatibility with
other bits used by the ToS field.
The Class-Selector PHB was defined to provide backward compatibility for DSCP with ToS-
based IP precedence. RFC 1812 simply prioritizes packets according to the precedence value.
The PHB is defined as the probability of timely forwarding. Packets with higher IP precedence
should be (on average) forwarded in less time than packets with lower IP precedence.
The last three bits of the DSCP (bits 2 to 4), set to 0, identify a Class-Selector PHB.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-37
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 12
Summary
In the DiffServ model, QoS behaviors are applied to traffic classes
on a per-hop basis.
Network devices in the core use the DSCP value to select a per-
hop behavior for the packet.
A per-hop behavior is an externally observable forwarding
behavior applied at a DiffServ-compliant node to a DiffServ
behavior aggregate. For example, the EF PHB guarantees and
polices bandwidth while ensuring a minimum departure rate.
The DSCP is backward compatible with IP precedence and
Class-Selector Code Point.

2-38 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 4
Identifying QoS Mechanisms
Overview
Quality of service (QoS) mechanisms are used to implement a coordinated QoS policy in
devices throughout the network. The moment an IP packet enters the network, it is classified
and usually marked with its class identification. From that point on, the packet is treated by a
variety of QoS mechanisms according to the packet classification. Depending upon the
mechanisms it encounters, the packet could be expedited, delayed, compressed, fragmented, or
even dropped. This lesson describes mechanisms for implementing QoS.
Objectives
Upon completing this lesson, you will be able to correctly match a list of QoS actions to a list
of mechanisms for implementing QoS, and identify where in a network the different QoS
mechanisms are commonly used. This ability includes being able to meet these objectives:
Describe the types of key mechanisms used to implement QoS in an IP network
Describe the purpose of classification and identify where classification is commonly
implemented in a network
Describe the purpose of marking and identify where marking is commonly implemented in
a network
Describe congestion management and identify where congestion management is commonly
implemented in a network
Describe congestion avoidance and identify where congestion avoidance is commonly
implemented in a network
Describe policing and shaping and identify where policing and shaping are commonly
implemented in a network
Describe the functions of compression and identify where compression is commonly
implemented in a network
Describe the functions of LFI and identify where LFI is commonly implemented in a
network
Describe when QoS mechanisms are used for input, output, and both
2-40 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Mechanisms
This topic describes the types of key mechanisms used to implement QoS in an IP network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-2
QoS Mechanisms
Classification: Each class-oriented QoS mechanism has to
support some type of classification.
Marking: Used to mark packets based on classification, metering,
or both.
Congestion management: Each interface must have a queuing
mechanism to prioritize transmission of packets.
Congestion avoidance: Used to drop packets early to avoid
congestion later in the network.
Policing and shaping: Used to enforce a rate limit based on the
metering (excess traffic is either dropped, marked, or delayed).
Link efficiency: Used to improve bandwidth efficiency through
compression, link fragmentation, and interleaving.

The main categories of tools used to implement QoS in a network are as follows:
Classification and marking: The identifying and splitting of traffic into different classes
and the marking of traffic according to behavior and business policies
Congestion management: The prioritization, protection, and isolation of traffic based on
markings
Congestion avoidance: Discards specific packets based on markings to avoid network
congestion.
Policing and shaping: Traffic conditioning mechanisms that police traffic by dropping
misbehaving traffic to maintain network integrity. These mechanisms also shape traffic to
control bursts by queuing traffic.
Link efficiency: One type of link efficiency technology is packet header compression,
which improves the bandwidth efficiency of a link. Another technology is link
fragmentation and interleaving (LFI), which can decrease the jitter of voice transmission
by reducing voice packet delay.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-41
Classification
This topic describes the purpose of classification and identifies where classification is
commonly implemented in a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-3
Classification
Classification is the identifying and splitting of traffic into different
classes.
Traffic can be classed by various means, including the DSCP.
Modular QoS CLI allows classification to be implemented
separately from policy.
IP
Transactional
Transactional
Transactional
Transactional
Voice
Mission-Critical
Transactional
IP
I P
I P
Service
Provider
Output
Interf ace
Input
Interf ace

Classification is the identifying and splitting of traffic into different classes. In a QoS-enabled
network, all traffic is classified at the input interface of every QoS-aware device. Packet
classification can be based on many factors, such as these:
Differentiated services code point (DSCP)
IP precedence
Source address
Destination address
The concept of trust is key for deploying QoS. When an end device (such as a workstation or an
IP phone) marks a packet with class of service (CoS) or DSCP, a switch or router has the option
of accepting or not accepting values from the end device. If the switch or router chooses to
accept the values, the switch or router trusts the end device. If the switch or router trusts the end
device, it does not need to do any reclassification of packets coming from that interface. If the
switch or router does not trust the interface, it must perform a reclassification to determine the
appropriate QoS value for the packets coming from that interface. Switches and routers are
generally set to not trust end devices and must specifically be configured to trust packets
coming from an interface. Classification tools include network-based application recognition
(NBAR), policy-based routing (PBR), and classification and marking using Modular QoS
command-line interface (CLI), or MQC.
Note The tools for classification are covered in detail in the Classification and Marking module in
this course.
2-42 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Marking
This topic describes the purpose of marking and identifies where marking is commonly
implemented in a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-4
Marking
Marking, also known as coloring, marks each packet as a member
of a network class so that the packet class can be quickly
recognized throughout the rest of the network.
3 3
3 3
3 3 Voice
Mission-Crit ical
Transactional
1
1
11
11
11 Voice
Mission-Crit ical
Transact ional
Service
Provider
Output
I nterface
I nput
Int erface

Marking, also known as coloring, involves marking each packet as a member of a network class
so that devices throughout the rest of the network can quickly recognize the packet class.
Marking is performed as close to the network edge as possible and is typically done using
MQC.
QoS mechanisms set bits in the DSCP or IP precedence fields of each IP packet according to
the class that the packet is in. The settings for the DSCP field and their relationship to the IP
precedence fields are discussed in the Understanding the Differentiated Services Model
lesson in this module. Other fields can also be marked to aid in the identification of a packet
class.
Other QoS mechanisms use these bits to determine how to treat the packets when they arrive. If
the packets are marked as high-priority voice packets, the packets will generally never be
dropped by congestion avoidance mechanisms and will be given immediate preference by
congestion management queuing mechanisms. On the other hand, if the packets are marked as
low-priority file transfer packets, they will be dropped when congestion occurs and will
generally be moved to the end of the congestion management queues.
Note The tools for marking are covered in detail in the Classification and Marking module in this
course.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-43
Congestion Management
This topic describes congestion management and identifies where congestion management is
commonly implemented in a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-5
Congestion Management
Congestion management uses the marking on each packet to
determine in which queue to place packets.
Congestion management uses sophisticated queuing
technologies, such as WFQ and LLQ, to ensure that time-
sensitive packets such as voice are transmitted first.
Voice
Mission-Critical
Transactional
Legend
Marked
Packets
Mission-Cri tical Queue (40% bandwidth)
Transactional Queue (20% bandwidth)
Voice Queue (First Out)
Service
Provider
Out put
Interf ace
Input
Interf ace

Congestion management mechanisms (queuing algorithms) use the marking on each packet to
determine in which queue to place packets. Different queues are given different treatment by
the queuing algorithm based on the class of packets in the queue. Generally, queues with high-
priority packets receive preferential treatment.
Congestion management is implemented on all output interfaces in a QoS-enabled network by
using queuing mechanisms to manage the outflow of traffic. Each queuing algorithm was
designed to solve a specific network traffic problem and has a particular effect on network
performance.
The Cisco IOS Software for congestion management or queuing includes these queuing
methods:
FIFO, priority queuing (PQ), custom queuing (CQ)
Weighted fair queuing (WFQ)
Class-based weighted fair queuing (CBWFQ)
Low-latency queuing (LLQ)
LLQ is currently the preferred queuing method. LLQ is a hybrid (PQ and CBWFQ) queuing
method that was developed to specifically meet the requirements of real-time traffic, such as
voice.
2-44 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Congestion Avoidance
This topic describes congestion avoidance and identifies where congestion avoidance is
commonly implemented in a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-6
Congestion Avoidance
Congestion avoidance may randomly drop packets from selected
queues when previously defined limits are reached.
By dropping packets early, congestion avoidance helps prevent
bottlenecks downstream in the network.
Congestion avoidance technologies include random early
detection and weighted random early detection.
Voice
Mission-Crit ical
Transact ional
Legend
Mission-Critical Queue (40% bandwidth)
Transactional Queue (20% bandwi dth)
Voice Queue (Fi rst Out)
Service
Provider
Out put
Interf ace
Input
Interf ace

Congestion-avoidance mechanisms monitor network traffic loads in an effort to anticipate and
avoid congestion at common network bottlenecks. Congestion avoidance is achieved through
packet dropping.
Congestion-avoidance mechanisms are typically implemented on output interfaces wherever a
high-speed link or set of links feeds into a lower-speed link (such as, a LAN feeding into a
slower WAN link.) This ensures that the WAN is not instantly congested by LAN traffic.
Weighted random early detection (WRED) is a Cisco primary congestion-avoidance technique.
WRED increases the probability that congestion is avoided by dropping low-priority packets
rather than dropping high-priority packets.
WRED is not recommended for voice queues. A network should not be designed to drop voice
packets.
Note The tools for congestion avoidance are covered in detail in the Congestion Avoidance
module in this course.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-45
Policing and Shaping
This topic describes policing and shaping and identifies where policing and shaping are
commonly implemented in a network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-7
Policing
Policing drops or marks packets when a predefined limit is
reached.
IP
Voice
Transactional
IP
I P
I P
200
121
156
Mission-Crit ical
LI MIT 200 REACHED!!
Drop Packets
Servi ce
Provider
Output
Interf ace
Input
I nterface

Policing or shaping mechanisms are often used to condition traffic before transmitting traffic to
a network or receiving traffic from a network.
Policing is the ability to control bursts and conform traffic to ensure that certain types of traffic
get certain types of bandwidth.
Policing drops or marks packets when predefined limits are reached. Policing mechanisms can
be set to first drop traffic classes that have lower QoS priority markings.
Policing mechanisms can be used at either input or output interfaces. These mechanisms are
typically used to control the flow into a network device from a high-speed link by dropping
excess low-priority packets. A good example would be the use of policing by a service provider
to throttle a high-speed inflow from a customer that was in excess of the service agreement. In
a TCP environment, this policing would cause the sender to slow its packet transmission.
Tools include class-based policing and committed access rate (CAR).
Note The tools for policing are covered in detail in the Traffic Policing and Shaping module in
this course.
2-46 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-8
Shaping
Shaping queues packets when a predefined limit is reached.
Voice
Transact ional
199
121
156
Mission-Critical
UNDER LIMIT AGAIN
(use buffered packets)
Mission-Critical
Buffer
Mission-Critical
Service
Provider
Output
Int erface
I nput
Int erface

Shaping helps smooth out speed mismatches in the network and limits transmission rates.
Shaping mechanisms are used on output interfaces. These mechanisms are typically used to
limit the flow from a high-speed link to a lower-speed link to ensure that the lower-speed link
does not become overrun with traffic. Shaping could also be used to manage the flow of traffic
at a point in the network where multiple flows are aggregated. Service providers use shaping to
manage the flow of traffic to and from customers to ensure that the flows conform to service
agreements between the customer and provider.
Cisco QoS software solutions include two traffic-shaping tools to manage traffic and
congestion on the network: Generic Traffic Shaping (GTS) and Frame Relay traffic shaping
(FRTS).
Note The tools for shaping are covered in detail in the Traffic Policing and Shaping module in
this course.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-47
Link Efficiency Mechanisms
This topic describes the functions of compression and identifies where compression is
commonly implemented in the network.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-9
Compression
Header compression can dramatically reduce the overhead
associated with voice transport.
Voice Data VH Voice Header
Compress Voice Header to 2 or 4 Bytes
2 or 4 Bytes 20 Bytes
Service
Provider
Output
Int erface
Input
Interface

Cisco IOS QoS Software offers link-efficiency mechanisms that work in conjunction with
queuing and traffic shaping to manage existing bandwidth more efficiently and predictably.
One of these link-efficiency mechanisms is compressed Real-Time Transport Protocol (cRTP).
Real-Time Transport Protocol (RTP) is a host-to-host protocol that is used for carrying
converged traffic (including packetized audio and video) over an IP network. RTP provides
end-to-end network transport functions intended for applications that transmit real-time
requirements, such as audio, video, simulation data multicast, or unicast network services.
A voice packet carrying a 20-byte voice payload, for example, typically carries a 20-byte IP
header, an 8-byte User Datagram Protocol (UDP) header, and a 12-byte RTP header. By using
cRTP, as shown in the illustration, the three headers with a combined 40 bytes are compressed
down to 2 or 4 bytes, depending on whether the cyclic redundancy check (CRC) is transmitted.
This compression can dramatically improve the performance of a link.
Compression would typically be used on WAN links between sites to improve bandwidth
efficiency.
Note Compression technology is discussed in the Link Efficiency Mechanisms module in this
course.
2-48 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Link Fragmentation and Interleaving
This topic describes the functions of LFI and identifies where LFI is commonly implemented in
the network.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 10
Link Fragmentation and Interleaving
Without link fragmentation and interleaving, time-sensitive voice
traffic can be delayed behind long, non-time-sensitive data
packets.
Link fragmentation breaks long data packets apart and interleaves
time-sensitive packets so that the time-sensitive packets are not
delayed.
Voice
Mission-Critical
Transact ional
Legend
Fragment packets and interleave packets
Dat a Voice
Queue
Service
Provider
Output
Interf ace
Input
Interf ace

Interactive traffic, such as Telnet and VoIP, is susceptible to increased latency and jitter when
the network processes large packets, such as LAN-to-LAN FTP Telnet transfers, traversing a
WAN link. This susceptibility increases as the traffic is queued on slower links.
LFI can reduce delay and jitter on slower-speed links by breaking up large datagrams and
interleaving low-delay traffic packets with the resulting smaller packets.
LFI would typically be used on WAN links between sites to ensure minimal delay for voice and
video traffic.
Note LFI technology is covered in detail in the Link Efficiency Mechanisms module in this
course.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-49
Applying QoS to Input and Output Interfaces
This topic describes when QoS mechanisms are used for input, output, and both.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 11
Applying QoS to Input and
Output Interfaces
Congestion
Management*
Congestion
Avoidance
(Always)
(High-speed to
low-speed links or
aggregation points)
Mark
Classify
(As close to the
source as possible)
Policing Policing
Shaping
(Going to lower-speed
links or from points of
aggregation)
(Coming from a
higher-speed link or
aggregation)
Fragmentation
and Interleaving
Compression
(Low-speed
WAN links)
Mark
Service
Provider
Output
Interf ace
Input
I nterface

In a QoS-enabled network, classification is performed on every input interface. Marking should
be performed as close to the network edge as possiblein the originating network device, if
possible. Devices farther from the edge of the network, such as routers and switches, can be
configured to trust or untrust the markings made by devices on the edge of the network. An IP
Phone, for example, will not trust the markings of an attached PC, while a switch will generally
be configured to trust the markings of an attached IP Phone.
It only makes sense to use congestion management, congestion avoidance, and traffic-shaping
mechanisms on output interfaces, because these mechanisms help maintain smooth operation of
links by controlling how much and which type of traffic is allowed on a link. On some router
and switch platforms, congestion management mechanisms, such as weighted round robin
(WRR) and modified deficit round robin (MDRR), can be applied on the input interface.
Congestion avoidance is typically employed on an output interface wherever there is a chance
that a high-speed link or aggregation of links feeds into a slower link (such as a LAN feeding
into a WAN).
Policing and shaping are typically employed on output interfaces to control the flow of traffic
from a high-speed link to lower-speed links. Policing is also employed on input interfaces to
control the flow into a network device from a high-speed link by dropping excess low-priority
packets.
Both compression and LFI are typically used on slower-speed WAN links between sites to
improve bandwidth efficiency.
2-50 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 12
Summary
Different mechanisms can be used to implement QoS in a
network: classification, marking, congestion management,
congestion avoidance, policing, shaping, and link efficiency.
The first step is always to identify classes of traffic at the input
interface of every QoS-aware device so that the appropriate QoS
treatment can be applied to the different traffic types.
Marking involves marking each packet as a member of a class so
that devices throughout the rest of the network can quickly
recognize the packet class. Marking is performed as close to the
network edge as possible.
Congestion management is based on placing marked packets into
different output interface queues based on their class; these
queues are given different treatment based on their associated
queuing algorithm.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 13
Summary (Cont.)
Congestion avoidance mechanisms help prevent link congestion
by dropping lower priority traffic at the output interface before it
becomes a problem.
Traffic conditioners such as policers and shapers are used to limit
the maximum rate of traffic sent or received on an interface.
Compression can be used on WAN links between sites to improve
bandwidth efficiency.
Link fragmentation and interleaving can also be used on WAN
links to improve bandwidth efficiency.
QoS mechanisms may be applied at the input interface, output
interface, or both, depending on the particular QoS mechanism.

2009 Cisco Systems, Inc. The Building Blocks of QoS 2-51
Module Summary
This topic summarizes the key points discussed in this module.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-1
Module Summary
The three basic models for QoS are best effort, IntServ, and
DiffServ. With best effort, no special QoS mechanisms are
applied. With IntServ, applications signal to the network that they
require QoS. With DiffServ, the network devices recognize the
traffic classes of the packets and provide different QoS levels.
The differentiated services model is the primary model used to
implement QoS in IP networks because it is highly scalable and
offers the capability to define many different levels of service.
The differentiated services model uses a 6-bit DSCP to mark
packets so that they will be treated with different levels of service
as they traverse an IP network.
IP networks use a variety of mechanisms to implement QoS,
including classification, marking, congestion management,
congestion avoidance, metering, traffic policing, traffic shaping,
and link efficiency.

There are three basic networking models: Best Effort, IntServ, and DiffServ. DiffServ is the
more scalable model to implement the required QoS for converged networks. With DiffServ,
traffic is classified into different traffic classes, and then marked. The network QoS policy then
enforces differentiated services based on the markings. To implement the QoS policy, different
QoS mechanisms are required.
References
For additional information, refer to these resources:
To learn more about the IntServ model, refer to Integrated Services in the Internet
Architecture: an Overview at this URL: http://www.ietf.org/rfc/rfc1633.txt.
To learn more about RSVP, refer to RFC 2210, The Use of RSVP with IETF Integrated
Services at this URL: http://www.ietf.org/rfc/rfc2210.txt.
To learn more about the DiffServ model, refer to RFC 2475, An Architecture for
Differentiated Services at this URL: http://www.ietf.org/rfc/rfc2475.txt.
To learn more about the DiffServ field, refer to Definition of the Differentiated Services
Field (DS Field) in the IPv4 and IPv6 Headers at this URL:
http://www.ietf.org/rfc/rfc2474.txt.
To learn more about Assured Forwarding, refer to Assured Forwarding PHB Group at this
URL: http://www.ietf.org/rfc/rfc2597.txt.
To learn more about Expedited Forwarding, refer to An Expedited Forwarding PHB (Per-
Hop Behavior) at this URL: http://www.ietf.org/rfc/rfc3246.txt.
2-52 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
To learn more about the Class-Selector PHB, refer to Definition of the Differentiated
Services Field (DS Field) in the IPv4 and IPv6 Headers at this URL:
http://www.ietf.org/rfc/rfc2474.txt.
To see more information on Cisco QoS mechanisms, select QoS (Quality of Service) from
the list at http://www.cisco.com/cisco/web/psa/default.html?mode=tech.
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-53
Module Self-Check
Use the questions here to review what you learned in this module. The correct answers and
solutions are found in the Module Self-Check Answer Key.
Q1) Which of these models for implementing QoS is the least scalable? (Source:
Identifying Models for Implementing QoS)
A) best effort
B) Integrated Services
C) Differentiated Services
D) Quantitative Services
Q2) Which three QoS mechanisms work together to provide a set of complete integrated
services on a network? (Choose three.) (Source: Identifying Models for Implementing
QoS)
A) weighted random early detection
B) weighted fair queuing
C) Generic Traffic Shaping
D) Resource Reservation Protocol
Q3) What is the most important advantage of DiffServ over other QoS models? (Source:
Understanding the Differentiated Services Model)
A) high scalability
B) many service levels
C) guaranteed service
D) deterministic delays
E) advanced queuing mechanisms
Q4) Services are provided to which entities in the DiffServ model? (Source: Understanding
the Differentiated Services Model)
A) frames
B) packets
C) applications
D) classes of traffic
Q5) How many bits is the DSCP field of the IP header? (Source: Understanding the
Differentiated Services Model)
A) 3
B) 4
C) 6
D) 8
Q6) Which PHB would be indicated if the DSCP was equal to 46 (101110)? (Source:
Understanding the Differentiated Services Model)
A) default PHB
B) selector PHB
C) AF PHB
D) EF PHB
2-54 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.
Q7) Which AF class and what drop probability would be indicated if the DSCP was equal
to 100100? (Source: Understanding the Differentiated Services Model)
A) AF1 and medium
B) AF4 and medium
C) AF1 and high
D) AF4 and high
Q8) Match each of the following QoS mechanisms to its function. (Source: Identifying QoS
Mechanisms)
A) congestion avoidance
B) congestion management
C) classification
D) traffic policing
E) traffic shaping
F) packet header compression
_____ 1. Drops misbehaving traffic to maintain network integrity
_____ 2. Improves the bandwidth efficiency of a link
_____ 3. Controls traffic by delaying bursts
_____ 4. Discards specific packets based on markings
_____ 5. Identifies and splits traffic
_____ 6. Prioritizes, protects, and isolates traffic based on markings
Q9) Which of the following QoS mechanisms is used on both input and output interfaces?
(Source: Identifying QoS Mechanisms)
A) classification
B) traffic policing
C) traffic shaping
D) congestion management
2009 Cisco Systems, Inc. The Building Blocks of QoS 2-55
Module Self-Check Answer Key
Q1) B
Q2) A, B, D
Q3) A
Q4) D
Q5) C
Q6) D
Q7) B
Q8) 1 = D, 2 = F, 3 = E, 4 = A, 5 = C, 6 = B
Q9) B
2-56 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.

Module 3
Introduction to MQC and Cisco
AutoQoS
Overview
Quality of service (QoS) configurations can be complex. In Cisco IOS Software configurations,
there are many different QoS mechanisms, many of which have similar features. Because there
are also many options available for providing QoS to different traffic types, the effort to deploy
QoS end-to-end in a network infrastructure can easily become overwhelming. Fortunately,
Cisco Systems has unified QoS configuration by separating the different components of a QoS
policy into different configuration modules. These modules comprise the Cisco Modular QoS
CLI, or MQC, which allows network administrators and network implementers to more easily
deploy QoS. MQC configurations are consistent for different QoS mechanisms and are
therefore easier to learn, deploy, and troubleshoot.
There are some instances, however, in which customers do not want to be concerned with the
specifics of QoS configuration. These customers would prefer to enable QoS in the LAN or
WAN by using one of two commands and allow the Cisco IOS router and switch to automate
the required complex QoS configuration. For those customers, Cisco has developed Cisco
AutoQoS VoIP and Cisco AutoQoS for the Enterprise.
This module introduces MQC and Cisco AutoQoS as configuration methods for implementing
QoS. This module will also serve as the foundation for more advanced MQC configurations
that include additional QoS features and techniques.
Module Objectives
Upon completing this module, you will be able to explain the use of MQC and Cisco AutoQoS
to implement QoS on the network. This ability includes being able to meet these objectives:
Explain how to implement a QoS policy using MQC
Identify capabilities provided by Cisco AutoQoS VoIP and Cisco AutoQoS for the
Enterprise
Configure QoS on a network using Cisco AutoQoS VoIP
Describe configuration of QoS on a network using Cisco AutoQoS for the Enterprise
3-2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 1
Introducing MQC
Overview
The Modular QoS CLI, or MQC, provides a modular approach to the configuration of quality
of service (QoS) mechanisms. Network administrators can introduce new QoS mechanisms and
reuse available classification options. This lesson describes how to implement QoS policies
using MQC.
Objectives
Upon completing this lesson, you will be able to explain how to implement a QoS policy using
MQC. This ability includes being able to meet these objectives:
Explain how to implement a given QoS policy using MQC
Describe the three steps involved in implementing a QoS policy using MQC and the
differences between class maps, policy maps, and service policies
Describe how a class map is used to define a class of traffic
Describe the Cisco IOS MQC commands required to configure and monitor a class map
Describe how a policy map is used to assign a QoS policy to a class of traffic
Describe the Cisco IOS MQC commands required to configure and monitor a policy map
Explain how a service policy is assigned to an interface
Describe the MQC commands used to attach a service policy to an interface
3-4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Modular QoS CLI
This topic describes how to implement a given QoS policy using MQC.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-2
Modular QoS CLI
The MQC provides a modular
approach to configuration of
QoS mechanisms.
First, build modules defining
classes of traffic.
Then, build modules defining
QoS policies and assign
classes to policies.
Finally, assign the policy
modules to interfaces.

The MQC was introduced to allow any supported classification to be used with any QoS
mechanism.
The separation of classification from the QoS mechanism allows new Cisco IOS Software
versions to introduce new QoS mechanisms and reuse all available classification options. On
the other hand, old QoS mechanisms can benefit from new classification options.
Another important benefit of the MQC is the reusability of configuration. MQC allows the
same QoS policy to be applied to multiple interfaces. The MQC, therefore, is a consolidation of
all the QoS mechanisms that have so far only been available as standalone mechanisms.
Example: Advantages of Using MQC
Configuring committed access rate (CAR), for example, requires entire configurations to be
repeated between interfaces and time-consuming configuration modifications. MQC allows the
same QoS policy to be applied to multiple interfaces.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-5
Modular QoS CLI Components
This topic describes the three steps involved in implementing a QoS policy using MQC and
differentiates between class maps, policy maps, and service policies.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-3
MQC Components
Apply a Service
Policy
Define QoS Policies
for Classes
Define Classes
of Traffic
What traffic do
we care about?
Each class of
traffic is defined
using a class
map.
What will be done to
this traffic?
Defines a policy map,
which configures the
QoS features
associated with a traffic
class previously
identified using a class
map.
Where will this
policy be
implemented?
Attaches a service
policy configured
with a policy map
to an interface.

Implementing QoS by using the MQC consists of three steps:
Step 1 Configure classification by using the class-map command.
Step 2 Configure traffic policy by associating the traffic class with one or more QOS
features using the policy-map command.
Step 3 Attach the traffic policy to inbound or outbound traffic on interfaces, subinterfaces,
or virtual circuits by using the service-policy command.
Example: Configuring MQC
Consider this example of configuring MQC on a network with voice telephony:
Step 1 Classify traffic as voice, high priority, low priority, and browser in a class map.
Step 2 Build a single policy map that defines three different traffic policies (different
bandwidth and delay requirements for each traffic class): NoDelay, BestService,
and Whenever, and assign the already defined classes of traffic to the policies.
Voice is assigned to NoDelay. High-priority traffic is assigned to BestService.
Both low-priority and browser traffic is assigned to Whenever.
Step 3 Assign the policy map to selected router and switch interfaces.
3-6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Class Maps
This topic describes how a class map is used to define a class of traffic.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-4
Class Maps
What traffic do we care about?
Each class is identified using a class map.
A traffic class contains three major elements:
A case-sensitive name
A series of match commands
If more than one match command exists in the traffic class, an
instruction on how to evaluate these match commands
Class maps can operate in two modes:
Match all: all conditions have to succeed
Match any: at least one condition must succeed
The default mode is match all.
Multiple traffic classes can be configured as a single traffic class
(nested).

Class maps are used to create classification templates that are later used in policy maps in
which QoS mechanisms are bound to classes.
Routers can be configured with a large number of class maps (currently limited to 256).
You can create a class map by using the class-map global configuration command. Class maps
are identified by case-sensitive names. Each class map contains one or more conditions that
determine if the packet belongs to the class.
There are two ways of processing conditions when there is more than one condition in a class
map:
Match all: This is the default match strategy. All conditions have to be met to bind a
packet to the class.
Match any: At least one condition has to be met to bind the packet to the class.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-7
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-5
Classification Using Class Maps
Match-all requires all conditions to return a positive answer. If one
condition is not met, the class map will return a no match result.
Match-any requires at least one condition to return a positive answer. If
no condition is met, the class map will return a no match result.

The figure illustrates the process of determining if a packet belongs to a class (match) or not
(no match).
The process goes through the list of conditions and returns the following:
A match results if one of the conditions is met and the match-any strategy is used.
A match results if all conditions are met and the match-all strategy is used.
A no match results if none of the conditions are met.
3-8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring and Monitoring Class Maps
This topic describes the Cisco IOS MQC commands required to configure and monitor a class
map.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-6
Configuring Class Maps

Enter the class-map configuration mode.


Specify the matching strategy.
Match-all is the default matching strategy.

Use at least one condition to match packets.


You should use descriptions in large and complex configurations.


The description has no operational meaning.

Use the class-map global configuration command to create a class map and enter the class-map
configuration mode. A class map is identified by a case-sensitive name; therefore, all
subsequent references to the class map must use exactly the same name.
At least one match command should be used within the class-map configuration mode (match
none is the default).
The description command is used for documenting a comment about the class map.
Note The syntax shown in the figure is compatible with Cisco IOS Software Release 12.4 and
Cisco Catalyst 2960 Switch IOS Software Release 12.2(46)SE. For the command syntax for
other software versions or platforms, refer to the appropriate Command Reference on
http://www.cisco.com.
Example: Class Map Configuration
This example shows a traffic class configured with the class-map match-all command:




2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-9
If a packet arrives on a router with traffic class called cisco1 configured on the interface, the
packet is evaluated to determine if it matches the IP protocol, QoS group 4, and access group
101. If all three of these match criteria are met, the packet matches traffic class cisco1.
3-10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-7
Configuring Classification Using
Special Options

The not keyword inverts the condition.


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.

The any keyword can be used to match all packets.



You can use match commands to specify various criteria for classifying packets. Packets are
checked to determine whether they match the criteria specified in the match commands. If a
packet matches the specified criteria, that packet is considered a member of the class and is
forwarded according to the QoS specifications set in the traffic policy. Packets that fail to meet
any of the matching criteria are classified as members of the default traffic class. The MQC
does not necessarily require that you associate a single traffic class to one traffic policy. You
can associate multiple types of traffic with a single traffic class by using the match any
command.
The match not command inverts the condition specified. This command specifies a match
criterion value that prevents packets from being classified as members of a specified traffic
class. All other values of that particular match criterion belong to the class.
The MQC allows multiple traffic classes (nested traffic classes, which are also called nested
class maps) to be configured as a single traffic class. This nesting can be achieved with the use
of the match class-map command. The only method of combining match-any and match-all
characteristics within a single traffic class is with the match class-map command.
The syntax in the figure is compatible with Cisco IOS Software Release 12.4. The syntax for
the match command in Cisco Catalyst 2960 Switch IOS Software Release 12.2(46)SE is as
follows:


2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-11
Parameter Description
access-group acl-index-or-name Number or name of an IP standard or extended access control list
(ACL) or MAC ACL. For an IP standard ACL, the ACL index range
is 1 to 99 and 1300 to 1999. For an IP extended ACL, the ACL
index range is 100 to 199 and 2000 to 2699.
ip dscp dscp-list List of up to eight IP differentiated services code point (DSCP)
values to match against incoming packets. Separate each value
with a space. The range is 0 to 63. You also can enter a
mnemonic name for a commonly-used value.
ip precedence ip-precedence-list List of up to eight IP-precedence values to match against
incoming packets. Separate each value with a space. The range
is 0 to 7. You also can enter a mnemonic name for a commonly-
used value.
Example: Using the match Command
This example shows a traffic class configured with the class-map match-any command:




In traffic class called cisco2, the match criteria are evaluated consecutively until a successful
match criterion is located. The packet is first evaluated to determine whether IP protocol can be
used as a match criterion. If IP protocol is not a successful match criterion, then QoS group 4 is
evaluated as a match criterion. Each matching criterion is evaluated to see if the packet matches
that criterion. When a successful match occurs, the packet is classified as a member of traffic
class cisco2. If the packet matches none of the specified criteria, the packet is classified as a
member of the class-default traffic class.
Example: Nested Traffic Class to Combine match-any and
match-all Characteristics in One Traffic Class
The only method for including both match-any and match-all characteristics in a single traffic
class is to use the match class-map command. To combine match-any and match-all
characteristics into a single class, a traffic class created with the match-any instruction must
use a class configured with the match-all instruction as a match criterion (through the match
class-map command), or vice versa.
This example shows how to combine the characteristics of two traffic classes, one with match-
any and one with match-all characteristics, into one traffic class with the match class-map
command. The result of traffic class class4 requires a packet to match one of these three match
criteria to be considered a member of traffic class class4: IP protocol and QoS group 4,
destination MAC address 1.1.1, or access group 2.
3-12 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
In this example, only the traffic class called class4 is used with the traffic policy called policy1:














2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-13
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-8
Monitoring Class Maps








Displays all class maps and their matching criteria

The show class-map command lists all class maps with their match statements.
The show class-map command with a name of a class map displays the configuration of the
selected class map.
The example of show class-map in the illustration shows three class maps:
class-3 will match any packet to access-group 103.
class-2 matches IP packets.
class-1 matches any input from interface Ethernet 1/0.
The syntax for the show class-map command is as follows:

Parameter Description
class-name (Optional) Name of the class map. The class map name can be a
maximum of 40 alphanumeric characters.
Command syntax varies by device platform and software version, as shown in the following
examples. For the command syntax for your platform and software version, refer to the
appropriate Command Reference document on http://www.cisco.com.
With Cisco IOS Software Release 12.4 on the Cisco 3825 Series Integrated Service Router, you
can use the show class-map command to display all class maps and their matching criteria; you
can use the show running-config class-map command to display configured class maps that
are part of the currently operating configuration.
The syntax for the show class-map and show run class-map commands in Cisco IOS
Software Release 12.4 on the Cisco 3825 Series Integrated Service Router is as follows:
3-14 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.




Parameter Description
class-map-name (Optional) Name of the class map. The class map name can be a
maximum of 40 alphanumeric characters.
linenum Displays line numbers in output
| begin Begin with the line that matches expression.
| exclude Exclude lines that match expression.
| include Include lines that match expression.
expression Any regular expression found in show command output
The syntax for the show class-map command in Cisco IOS Software Release 12.2(46)SE on
the Cisco Catalyst 2960 Switch is as follows:


Parameter Description
class-map-name (Optional) Name of the class map. The class map name can be a
maximum of 40 alphanumeric characters.
| begin Begin with the line that matches expression.
| exclude Exclude lines that match expression.
| include Include lines that match expression.
expression Any regular expression found in show command output
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-15
Policy Maps
This topic describes how a policy map is used to assign a QoS policy to a class of traffic.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-9
Policy Maps
What will be done to this traffic?
Defines a traffic policy, which configures the QoS features
associated with a traffic class previously identified using a class
map.
A traffic policy contains three major elements:
A case-sensitive name
A traffic class
The QoS policy associated with that traffic class
Up to 256 traffic classes can be associated with a single traffic
policy.
Multiple policy maps can be nested to influence the sequence of
QoS actions.

The policy-map command is used to create a traffic policy. The purpose of a traffic policy is to
configure the QoS features that should be associated with the traffic that has been classified in a
user-specified traffic class or classes. A traffic policy contains three elements: a case-sensitive
name, a traffic class (specified with the class command), and the QoS policies.
The name of a traffic policy is specified in the policy-map CLI (for example, issuing the
policy-map class1 command would create a traffic policy named class1). After issuing the
policy-map command, you are placed into policy-map configuration mode. You can then enter
the name of a traffic class, and enter the QoS features to apply to the traffic that matches this
class.
The MQC does not necessarily require that you associate only one traffic class to a single
traffic policy. When packets match more than one match criterion, multiple traffic classes can
be associated with a single traffic policy.
Note A packet can match only one traffic class within a traffic policy. If a packet matches more
than one traffic class in the traffic policy, the first traffic class defined in the policy will be
used.
3-16 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring and Monitoring Policy Maps
This topic describes the Cisco IOS MQC commands required to configure and monitor a policy
map.
2006 Cisco Systems, Inc. All rights reserved. QoS v2.23-10

Enter policy-map configuration mode.


Policy maps are identified by a case-sensitive name.

Enter the per-class policy configuration mode by using the name of a


previously configured class map.
Use the name class-default to configure the policy for the default
class.

Optionally, you can define a new class map by entering the condition
after the name of the new class map.
Uses the match-any strategy.
Configuring Policy Maps

You can configure service policies by using the policy-map command. Use up to 256 classes
within one policy map by using the class command with the name of a preconfigured class
map.
You can also use a nonexistent class within the policy-map configuration mode if the match
condition is specified after the name of the class. The running configuration will reflect such a
configuration by using the match-any strategy and inserting a full class map configuration.
The table shows starting and resulting configuration modes for the class-map, policy-map, and
class commands:
Configuration Modes
Starting configuration mode Command Configuration mode
Router(config)# class-map Router(config-cmap)#
Router(config)# policy-map Router(config-pmap)#
Router(config-pmap)# class Router(config-pmap-c)#
All traffic that is not classified by any of the class maps that are used within the policy map is
part of the default class class-default. This class has no QoS guarantees, by default. The
default class, when used on output, can use one FIFO queue or flow-based weighted fair
queuing (WFQ). The default class is part of every policy map, even if not configured.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-17
The syntax shown in the figure for the policy-map command is the same as the syntax for the
policy-map command in both Cisco IOS Software Release 12.2(46)SE (on the Cisco Catalyst
2960 Switch) and Cisco IOS Software Release 12.4 (on the Cisco 3825 Series Integrated
Services Router); however, command syntax may vary by device platform and software
version.
The syntax shown in the figure for the class command is the same as the syntax for the class
command in both Cisco IOS Software Release 12.2(46)SE (on the Cisco Catalyst 2960 Switch)
and Cisco IOS Software Release 12.4 (on the Cisco 3825 Series Integrated Services Router),
except that they do not allow you to create a new traffic class within policy-map configuration
mode. You must use the class-map command in global configuration mode to create classes.
Command syntax varies by device platform and software version. For the command syntax for
your platform and software version, refer to the appropriate Command Reference document on
http://www.cisco.com.
3-18 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 11
Configuring Policy Maps (Cont.)

You should use descriptions in large and complex configurations.


The description has no operational meaning.

Per-class service policies are configured within the per-class


policy-map configuration mode.
MQC supports the following QoS mechanisms:
Class-based weighted fair queuing (CBWFQ)
Low-latency queuing
Class-based policing
Class-based shaping
Class-based marking

Policy maps, like class maps, should use descriptions in large QoS implementations where a
large number of different policy maps are used.
Renaming a policy map would normally require the renaming of all the references to the policy
map. Using the rename command simplifies the renaming process by automatically renaming
all references.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-19
Example: Policy Map Example
The example shows the configuration of a policy map using three classes. The first two classes
were separately configured using the class-map command. The third class was configured by
specifying the match condition after the name of the class.


















Class Test1 has two match conditions evaluated in the match-all strategy. Classes Test2 and
Test3 use the match-any strategy.
3-20 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 12
Hierarchical (Nested) Policy Maps

Policy maps are normally applied to interfaces.


Nested policy maps can be applied directly inside other policy maps
to influence sequence of QoS actions.
For example: Shape all traffic to 2 Mb/s; queue shaped traffic to
provide priority and bandwidth guarantees.

The service-policy policy-map-name command is used to create hierarchical service policies in
policy-map class configuration mode.
The service-policy [input | output] policy-map-name command is a different command that is
used in interface configuration mode. The purpose of the service-policy [input | output]
policy-map-name command is to attach service policies to interfaces.
The child policy is the previously defined service policy that is now associated with the new
service policy through the use of the service-policy command. The new service policy that uses
the preexisting service policy is called the parent policy. In the hierarchical policy maps
example, the service policy named child is the child policy and the service policy named
parent is the parent policy.
The service-policy policy-map-name command has the following restrictions:
The set command is not supported on the child policy.
The priority command can be used in either the parent or the child policy, but not both
policies simultaneously.
The fair-queue command cannot be defined in the parent policy.
The syntax and usage of the service-policy command shown in the figure are compatible with
Cisco IOS Software Release 12.4 on the Cisco 3825 Series Integrated Services Router. Cisco
IOS Software Release 12.2(46)SE does not support this usage on the Cisco Catalyst 2960
Switch.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-21
Example: Hierarchical Policy Maps
In the example diagram, a child policy map QueueAll is created, which guarantees bandwidth
of 1 Mb/s to web traffic.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 13
Hierarchical (Nested) Policy Maps
Example
Example policy:
Shape all traffic on Fast Ethernet to 2 Mb/s.
Out of the 2 Mb/s, guarantee 1 Mb/s to web traffic.





The QueueAll policy map is then nested within a parent policy map named ShapeAll.
Finally, the parent policy map ShapeAll is applied to the FastEthernet interface.
Traffic out of the FastEthernet interface will first be shaped to 2 Mb/s, and then 1 Mb/s of the 2
Mb/s of shaped web traffic will be guaranteed.
Note Additional information on traffic shaping is covered in the Traffic Policing and Shaping
module in this course.
3-22 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Hierarchical Policy-Map Configuration
Follow these steps to apply a hierarchical policy:
Step 1 Create a child or lower-level policy that configures a queuing mechanism. In the
example, low-latency queuing (LLQ) is configured using the priority command.



Step 2 Create a parent or top-level policy that applies class-based shaping. Apply the child
policy as a command under the parent policy because the admission control for the
child class is based on the shaping rate for the parent class.




Step 3 Apply the parent policy to the subinterface.


2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-23
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 14
Monitoring Policy Maps












Displays the configuration of all classes for a specified service policy
map or all classes for all existing policy maps

The show policy-map command can be used to verify the configuration of a policy map.
With Cisco IOS Software Release 12.4 on the Cisco 3825 Series Integrated Service Router, you
can use the show policy-map command to display all policy maps and their configurations;
you can use the show running-config policy-map command to display configured policy maps
that are part of the currently operating configuration.
The syntax for the show policy-map and show running-config policy-map commands in
Cisco IOS Software Release 12.4 on the Cisco 3825 Series Integrated Service Router is as
follows:



Parameter Description
policy-map (Optional) Name of the service policy map whose complete
configuration is to be displayed. The name can be a maximum
of 40 characters.
linenum (Optional) Displays line numbers in output
| begin (Optional) Begin with the line that matches expression
| exclude (Optional) Exclude lines that match expression
| include (Optional) Include lines that match expression
expression (Optional) Any regular expression found in show command
output
The syntax for the show policy-map command in Cisco IOS Software Release 12.2(46)SE on
the Cisco Catalyst 2960 Switch is as follows:
3-24 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.


Parameter Description
policy-map-name (Optional) Name of the service policy map whose complete
configuration is to be displayed. The name can be a maximum
of 40 characters.
class class-map-name (Optional) Display QoS policy actions for an individual class
| begin (Optional) Begin with the line that matches expression
| exclude (Optional) Exclude lines that match expression
| include (Optional) Include lines that match expression
expression (Optional) Any regular expression found in show command
output
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-25
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 15
Monitoring Policy Maps (Cont.)


The show policy-map command also displays live information if the interface keyword is
used. The sample output shows the parameters and statistics of the policy map that is attached
to outbound traffic on interface FastEthernet0/0.
The syntax for the show policy-map interface command in Cisco IOS Software Release 12.4
on the Cisco 3825 Series Integrated Service Router is as follows:



3-26 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Parameter Description
interface-type (Optional) Interface type; valid values are Async, BVI,
CDMA-Ix, CTunnel, Dialer, GigabitEthernet, Group-Async,
= Lex, Loopback, MFR, Multilink, Port-channel, Tunnel, Vif ,
Virtual-PPP, Virtual-Template, Virtual-TokenRing, and
XTagATM.
interface-number (Optional) Module and port number
null 0 (Optional) Specifies the null interface; the only valid value is 0
input (Optional) Indicates that the statistics for the attached input policy
will be displayed
output (Optional) Indicates that the statistics for the attached output
policy will be displayed
| begin (Optional) Begin with the line that matches expression
| exclude (Optional) Exclude lines that match expression
| include (Optional) Include lines that match expression
expression (Optional) Any regular expression found in show command
output
Command syntax varies by device platform and software version. For the command syntax for
your platform and software version, refer to the appropriate Command Reference document on
http://www.cisco.com.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-27
Service Policy
This topic describes how a service policy is assigned to an interface.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 16
Service Policy
Where will this policy be implemented?
Attaches a traffic policy configured with a policy map to an
interface.
Service policies can be applied to an interface for inbound or
outbound packets.

The last configuration step when configuring QoS mechanisms using the MQC is to attach a
policy map to the inbound or outbound packets using the service-policy command.
Using the service-policy command, you can assign a single policy map to multiple interfaces or
assign multiple policy maps to a single interface (a maximum of one in each direction, inbound
and outbound). A service policy can be applied for inbound or outbound packets.
3-28 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Attaching Service Policies to Interfaces
This topic describes the MQC commands used to attach a service policy to an interface.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 17

Attaches the specified service policy map to the input or output


interface
Attaching Service Policies to Interfaces

Use the service-policy interface configuration command to attach a traffic policy to an
interface and to specify the direction in which the policy should be applied (either on packets
coming into the interface or packets leaving the interface).
The router immediately verifies the correctness of parameters that are used in the policy map. If
there is a mistake in the policy map configuration, the router will display a message explaining
what is wrong with the policy map.
The sample configuration shows how a policy map is used to separate HTTP from other traffic.
HTTP is guaranteed 2 Mb/s. All other traffic belongs to the default class and is guaranteed 6
Mb/s.
The syntax for the service-policy command in Cisco IOS Software Release 12.4 on the Cisco
3825 Series Integrated Service Router is the same as the syntax shown in the figure; however,
command options vary by router platform.
With Cisco IOS Software Release 12.2(46)SE on the Cisco Catalyst 2960 Switch, you can
apply a policy map only to incoming traffic on a physical port. The syntax for this command in
Cisco IOS Software Release 12.2(46)SE on the Cisco Catalyst 2960 Switch is as follows:

For the command syntax for other software versions or platforms, refer to the appropriate
Command Reference document on http://www.cisco.com.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-29
Example: Complete MQC Configuration
Traffic Classes Defined
In this example, two traffic classes are created and their match criteria are defined. For the first
traffic class, called class1, access control list (ACL) 101 is used as the match criterion. For the
second traffic class, called class2, ACL 102 is used as the match criterion. Packets are checked
against the contents of these ACLs to determine if they belong to the class.






Traffic Policy Created
In this example, a traffic policy called policy1 is defined to contain policy specifications for the
two classes: class1 and class2. The match criteria for these classes was defined in the traffic
classes.
For class1, the policy includes a bandwidth allocation request and a maximum packet count
limit for the queue reserved for the class. For class2, the policy specifies only a bandwidth
allocation request.








Traffic Policy Attached to an Interface
This example shows how to attach an existing traffic policy, which was created in the
preceding section, to an interface. After a traffic policy is defined with the policy-map
command, the traffic policy can be attached to one or more interfaces to specify the traffic
policy for those interfaces by using the service-policy command in interface configuration
mode. Although the same traffic policy can be assigned to multiple interfaces, each interface
can have only one traffic policy attached at the input and a single traffic policy attached at the
output.






3-30 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 18
Summary
MQC is a modular approach to designing and implementing an overall QoS
policy.
Applying an overall QoS policy involves three steps: defining class maps to
identify classes of traf fic, defining QoS policy maps, and assigning the policy
maps to interfaces.
Each class of traffic is defined in a class-map module.
The class-map global configuration command is used t o create a class map
and enter t he class-map configuration mode. The show class-map
command lists all class maps wit h their match statements.
A policy map module defines a traffic policy, which configures the QoS
features associated with a traffic class previously identified using a class
map.
The policy-map command is used to create a policy map name and enter
policy-map configuration mode.
A service policy attaches a traffic policy configured with a policy map to an
interface.
The service-policy command assigns a single policy map to multiple
interfaces or assigns multiple policy maps to a single interface
(a maximum of one in each direction, inbound and outbound).


Lesson 2
Introducing Cisco AutoQoS
VoIP
Overview
Cisco AutoQoS represents two innovative technologies, Cisco AutoQoS VoIP and Cisco
AutoQoS for the Enterprise, which simplify network administration challenges, reducing
quality of service (QoS) complexity, deployment time, and cost in enterprise networks. This
lesson focuses on Cisco AutoQoS VoIP. When Cisco AutoQoS is mentioned without VoIP or
Enterprise appended to it, it refers to both Cisco AutoQoS VoIP and Cisco AutoQoS for the
Enterprise.
Cisco AutoQoS VoIP incorporates value-added intelligence in Cisco IOS Software and Cisco
Catalyst software to provision and manage large-scale QoS deployments. It provides QoS
provisioning for individual routers and switches, simplifying deployment and reducing human
error. Cisco AutoQoS VoIP offers straightforward capabilities to automate VoIP deployments
for customers who want to deploy IP telephony but who lack the expertise and staffing to plan
and deploy IP QoS and IP services. This lesson explores the capabilities, requirements, and
configuration of Cisco AutoQoS VoIP.
Objectives
Upon completing this lesson, you will be able to identify capabilities provided by Cisco
AutoQoS VoIP and configure Cisco AutoQoS VoIP within a network. This ability includes
being able to meet these objectives:
Explain how Cisco AutoQoS is used to implement QoS policy
Describe the router platforms on which Cisco AutoQoS VoIP can be used
Describe the switch platforms on which Cisco AutoQoS VoIP can be used
Describe the prerequisites for using Cisco AutoQoS VoIP and how it is configured on a
network using CLI
Describe how to use Cisco IOS commands to examine and monitor a network configuration
after Cisco AutoQoS has been enabled
Identify several of the QoS technologies that are automatically implemented on the network
using Cisco AutoQoS VoIP
3-32 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Cisco AutoQoS VoIP
This topic describes how you can use Cisco AutoQoS VoIP to implement QoS policy.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-2
Cisco AutoQoS VoIP
One command per interface to enable and configure QoS

Cisco AutoQoS gives you the ability to deploy QoS features for converged IP telephony and
data networks fast and efficiently, by simplifying and automating the Modular QoS command-
line interface (CLI), or MQC, definition of traffic classes, and by the creation and configuration
of traffic policies. Cisco AutoQoS generates traffic classes and policy map CLI templates.
When Cisco AutoQoS is configured at the interface or permanent virtual circuit (PVC), the
traffic receives the required QoS treatment automatically. You do not need in-depth knowledge
of the underlying technologies, service policies, link efficiency mechanisms, and Cisco QoS
best practice recommendations for voice requirements to configure Cisco AutoQoS.
Cisco AutoQoS can be beneficial in these scenarios:
Small- to medium-sized businesses that must deploy IP telephony quickly, but lack the
experience and staffing to plan and deploy IP QoS services.
Large enterprises that need to deploy Cisco telephony solutions on a large scale while
reducing the costs, complexity, and time frame for deployment, and ensuring that the
appropriate QoS for voice applications is being set in a consistent fashion.
International enterprises or service providers requiring QoS for VoIP in different regions of
the world where little expertise exists and where provisioning QoS remotely and across
different time zones is difficult.
Service providers requiring a template-driven approach for delivering managed services
and QoS for voice traffic to many customer premise devices.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-33
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-3
Cisco AutoQoS VoIP (Cont.)






















AutoQoS
Manual QoS

Cisco AutoQoS automatically creates the QoS-specific features required for supporting the
underlying transport mechanism and link speed of an interface or PVC type. For example,
Frame Relay traffic shaping (FRTS) is automatically configured and enabled by Cisco
AutoQoS for Frame Relay links. Link fragmentation and interleaving (LFI) and compressed
Real-Time Transport Protocol (cRTP) are automatically configured via the Cisco AutoQoS
template for slow link speeds (less than 768 kbps). Therefore, it is very important that the
bandwidth statement be properly set on the interface prior to configuring Cisco AutoQoS,
because the resulting configuration will vary based on this configurable parameter.
Using Cisco AutoQoS, VoIP traffic is automatically provided with the required QoS template
for voice traffic by configuring the auto qos voip command on an interface or PVC. Cisco
AutoQoS enables the required QoS based on Cisco best-practice methodologies. You can
modify the configuration generated by Cisco AutoQoS if necessary.
3-34 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-4
Cisco AutoQoS VoIP (Cont.)
Application classification
Automatically discovers
applications and provides
appropriate QoS treatment
Policy generation
Automatically generates initial
and ongoing QoS policies
Configuration
Provides high-level business
knobs, and multi-device/domain
automation for QoS
Monitoring & reporting
Generates intelligent, automatic
alerts and summary reports
Consistency
Enables automatic, seamless
interoperability among all QoS
features and parameters across a
network topology LAN, MAN,
and WAN

Cisco AutoQoS simplifies and shortens the QoS deployment cycle in these five major aspects
of successful QoS deployments:
Application classification: Cisco AutoQoS leverages intelligent classification on routers
using Cisco network-based application recognition (NBAR) to provide deep and stateful
packet inspection. Cisco AutoQoS uses Cisco Discovery Protocol for voice packets to
ensure that the device attached to the LAN is really an IP phone.
Policy generation: Cisco AutoQoS evaluates the network environment and generates an
initial policy. Cisco AutoQoS automatically determines WAN settings for fragmentation,
compression, encapsulation, and Frame Relay-to-ATM Service Interworking (FRF.8),
eliminating the need to understand QoS theory and design practices in various scenarios.
You can meet additional or special requirements by modifying the initial policy.
The first release of Cisco AutoQoS provides the necessary Cisco AutoQoS VoIP feature to
automate QoS settings for VoIP deployments. This feature automatically generates
interface configurations, policy maps, class maps, and ACLs. Cisco AutoQoS VoIP will
automatically employ Cisco NBAR to classify voice traffic, and mark the traffic with the
appropriate differentiated services code point (DSCP) value. You can instruct Cisco
AutoQoS VoIP to rely on, or trust, the DSCP markings previously applied to the packets.
Configuration: With one command, Cisco AutoQoS configures the port to prioritize voice
traffic without affecting other network traffic, while still offering the flexibility to adjust
QoS settings for unique network requirements.
Not only will Cisco AutoQoS automatically detect Cisco IP Phones and enable QoS
settings, it will disable the QoS settings when a Cisco IP Phone is relocated or moved to
prevent malicious activity.
Cisco AutoQoS-generated router and switch configurations are customizable using the
standard Cisco IOS CLI.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-35
Monitoring and reporting: Cisco AutoQoS provides visibility into the classes of service
deployed via system logging and Simple Network Management Protocol (SNMP) traps,
with notification of abnormal events (that is, VoIP packet drops).
Consistency: When deploying QoS configurations using Cisco AutoQoS, configurations
generated are consistent among router and switch platforms. This level of consistency
ensures seamless QoS operation and interoperability within the network.
3-36 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Cisco AutoQoS VoIP Router Platforms
This topic describes the router platforms on which Cisco AutoQoS can be used.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-5
Cisco AutoQoS VoIP: Router Platforms
Cisco 1760, 1800, 2600, 2800, 3600, 3700, 3800, and 7200
Series routers support Cisco AutoQoS.
You can meet voice QoS requirements without extensive
knowledge of service policies.
You can reduce the time required to deploy QoS features for
converged IP telephony and data networks.
Cisco AutoQoS lends itself to tuning of all generated parameters
& configurations.

Support for Cisco AutoQoS includes the Cisco 1760, 1800, 2600 (including XM models), 2800,
3600, 3700, 3800, and 7200 Series routers. Support for additional platforms will become
available.
The Cisco AutoQoS VoIP feature is supported only on the following interfaces and PVCs:
Serial interfaces with PPP or High-Level Data Link Control (HDLC)
Frame Relay data-link connection identifiers (DLCIs)point-to-point subinterfaces only
Cisco AutoQoS does not support Frame Relay multipoint interfaces
ATM PVCs
Cisco AutoQoS VoIP is supported on low-speed ATM PVCs on point-to-point
subinterfaces only (link bandwidth less than 768 kbps)
Cisco AutoQoS VoIP is fully supported on high-speed ATM PVCs (link bandwidth
greater than 768 kbps)
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-37
Cisco AutoQoS VoIP Switch Platforms
This topic describes the switch platforms on which Cisco AutoQoS can be used.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-6
Cisco AutoQoS VoIP: Switch Platforms
Cisco Catalyst 2950, 2960, 2970, 3550, 3560, 3750, 4500, and
6500 Series switches support Cisco AutoQoS.
You can meet the voice QoS requirements without extensive
knowledge of:
Trust boundary
CoS-to-DSCP mappings
WRR & PQ scheduling parameters
You can reduce the time required to deploy QoS features for
converged IP telephony and data networks.
Generated parameters and configurations are user-tunable.

Support for Cisco AutoQoS includes the Cisco Catalyst 2950, 2960, 2970, 3550, 3560, 3750,
4500, and 6500 Series switches.
The Enhanced Image (EI) software is required on the Cisco Catalyst 29xx Series switches.
3-38 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-7
Cisco AutoQoS VoIP: Switch Platforms
(Cont.)
Single command at the interface level configures interface and
global QoS
Support for Cisco IP phone and Cisco IP SoftPhone
Trust boundary is disabled when IP phone is moved
Buffer allocation and egress queuing dependent on interface
type (Gigabit Ethernet/Fast Ethernet)
Supported on static, dynamic-access, voice VLAN access, and
trunk ports
Cisco Discovery Protocol must be enabled for Cisco AutoQoS to
function properly

To configure the QoS settings and the trusted boundary feature on the Cisco IP phone, Cisco
Discovery Protocol version 2 or later must be enabled on the port. If the trusted boundary
feature is enabled, a syslog warning message displays if Cisco Discovery Protocol is not
enabled or if Cisco Discovery Protocol is running version 1.
Cisco Discovery Protocol needs to be enabled only for the ciscoipphone QoS configuration;
Cisco Discovery Protocol does not affect the other components of the automatic QoS features.
When the ciscoipphone keyword with the port-specific automatic QoS feature is used, a
warning displays if the port does not have Cisco Discovery Protocol enabled.
When executing the port-specific automatic QoS command with the ciscoipphone keyword
without the trust option, the trust-device feature is enabled. The trust-device feature is
dependent on Cisco Discovery Protocol. If Cisco Discovery Protocol is not enabled or not
running version 2, a warning message displays as follows:









2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-39
Configuring Cisco AutoQoS VoIP
This topic describes the prerequisites for using Cisco AutoQoS and how to configure Cisco
AutoQoS on a network using CLI.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-8
Configuring Cisco AutoQoS VoIP:
Prerequisites for Using Cisco AutoQoS
VoIP
Cisco Express Forwarding must be enabled at the interface or
ATM PVC.
This feature cannot be configured if a QoS policy
(service policy) is attached to the interface.
An interface is classified as low-speed if its bandwidth is less than
or equal to 768 kb/s. It is classified as high-speed if its bandwidth
is greater than 768 kb/s.
The correct bandwidth should be configured on all interfaces or
subinterfaces using the bandwidth command.
If the interface or subinterface has a link speed of 768 kb/s or
lower, an IP address must be configured using the ip address
command.

Before configuring Cisco AutoQoS, you must meet these prerequisites:
Cisco Express Forwarding must be enabled at the interface, ATM PVC, or Frame Relay
DLCIs (point-to-point subinterfaces only). Cisco AutoQoS uses NBAR to identify various
applications and traffic types, and Cisco Express Forwarding is a prerequisite for NBAR.
You must ensure that no QoS policies (service policies) are attached to the interface. Cisco
AutoQoS cannot be configured if a QoS policy (service policy) is attached to the interface.
Cisco AutoQoS classifies links as either low-speed or high-speed depending upon the link
bandwidth. Remember that on a serial interface, if the default bandwidth is not specified, it
is 1.544 Mb/s. Therefore, it is important that the correct bandwidth be specified on the
interface or subinterface where Cisco AutoQoS is to be enabled.
For all interfaces or subinterfaces, be sure to properly configure the bandwidth by
using the bandwidth command. The amount of bandwidth that is allocated should
be based on the link speed of the interface.
If the interface or subinterface has a link speed of 768 kb/s or lower, an IP address
must be configured on the interface or subinterface using the ip address command.
By default, Cisco AutoQoS will enable Multilink PPP (MLP) and copy the
configured IP address to the multilink bundle interface.
3-40 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
In addition to the Cisco AutoQoS prerequisites, the following are recommendations and
requirements when configuring Cisco AutoQoS. Be aware that these may change with Cisco
IOS Software releases and should be verified before implementing Cisco AutoQoS in the
environment.
The Cisco AutoQoS VoIP feature is supported only on PVCs and these interfaces:
ATM PVCs
Serial interfaces with PPP or HDLC
Frame Relay DLCIs (point-to-point subinterfaces only) (Cisco AutoQoS does not
support Frame Relay multipoint interfaces.)
Configuration template generated by configuring Cisco AutoQoS on an interface or PVC
can be tuned manually, via CLI configuration, if desired.
Cisco AutoQoS cannot be configured if a QoS service policy is already configured and
attached to the interface or PVC.
MLP is configured automatically for a serial interface with a low-speed link. The serial
interface must have an IP address, which is removed and put on the MLP bundle. Cisco
AutoQoS VoIP must also be configured on the other side of the link.
The no auto qos voip command removes Cisco AutoQoS. However, if the interface or
PVC upon which Cisco AutoQoS generated QoS configuration is deleted without
configuring the no auto qos voip command, Cisco AutoQoS VoIP will not be completely
removed from the configuration.
Cisco AutoQoS SNMP traps are only delivered when an SNMP server is used in
conjunction with Cisco AutoQoS.
The SNMP community string AutoQoS should have write permissions.
If the device is reloaded with the saved configuration after configuring Cisco AutoQoS and
saving the configuration to NVRAM, some warning messages may be generated by
Remote Monitoring (RMON) threshold commands. These warning messages can be
ignored. (To avoid further warning messages, save the configuration to NVRAM again
without making any changes to the QoS configuration.)
By default, Cisco 7200 Series routers and below that support MQC QoS reserve up to 75
percent of the interface bandwidth for user-defined classes. The remaining bandwidth is
used for the default class. However, the entire remaining bandwidth is not guaranteed to the
default class. This bandwidth is shared proportionally between the different flows in the
default class and excess traffic from other bandwidth classes. At least one percent of the
available bandwidth is reserved and guaranteed for class default traffic by default on Cisco
7500 Series routers. (Up to 99 percent can be allocated to the other classes.)
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-41
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-9
Configuring Cisco AutoQoS VoIP:
Routers
Configures the Cisco AutoQoS VoIP feature
Untrusted mode by default
trust: Indicates that the DSCP markings of a packet are trusted
(relied on) for classification of the voice traffic
fr-atm: For low-speed Frame Relay DLCIs interconnected with
ATM PVCs in the same network, the fr-atm keyword must be
explicitly configured in the auto qos voip command to correctly
configure the Cisco AutoQoS VoIP feature.



To configure the Cisco AutoQoS VoIP feature on an interface, use the auto qos voip command
in interface configuration mode or Frame Relay DLCI configuration mode. To remove the
Cisco AutoQoS VoIP feature from an interface, use the no form of the auto qos voip
command.
The syntax for the auto qos voip command is as follows:

Syntax Description
Parameter Description
trust (Optional) Indicates that the DSCP markings of a packet are trusted (relied on) for
classification of the voice traffic. If the optional trust keyword is not specified, the
voice traffic is classified using NBAR, and the packets are marked with the
appropriate DSCP value.
fr-atm (Optional) Enables the Cisco AutoQoS VoIP feature for the Frame Relay-to-ATM
links. This option is available on the Frame Relay DLCIs for Frame Relay-to-ATM
Interworking only.
Note This syntax is compatible with Cisco IOS Release 12.4.
The bandwidth of the serial interface is used to determine the link speed. The link speed is one
element that is used to determine the configuration generated by the Cisco AutoQoS VoIP
feature. The Cisco AutoQoS VoIP feature uses the bandwidth at the time the feature is
configured and does not respond to changes made to bandwidth after the feature is configured.
3-42 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
For example, if the auto qos voip command is used to configure the Cisco AutoQoS VoIP
feature on an interface with 1000 kb/s, the Cisco AutoQoS VoIP feature generates
configurations for high-speed interfaces. However, if the bandwidth is later changed to 500
kb/s, the Cisco AutoQoS VoIP feature will not use the lower bandwidth. The Cisco AutoQoS
VoIP feature retains the higher bandwidth and continues to use the generated configurations for
high-speed interfaces.
To force the Cisco AutoQoS VoIP feature to use the lower bandwidth (and thus generate
configurations for the low-speed interfaces), use the no auto qos voip command to remove the
Cisco AutoQoS VoIP feature and then reconfigure the feature.
Example: Configuring the Cisco AutoQoS VoIP Feature on a
High-Speed Serial Interface
In the example, the Cisco AutoQoS VoIP feature is configured on the high-speed serial
interface s1/2:






2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-43
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 10







Configuring Cisco AutoQoS VoIP:
Cisco Catalyst 6500 Switch
Global configuration command.
All the global QoS settings are applied to all ports in the switch.
Prompt displays the CLI for the port-based automatic QoS
commands currently supported.



When the global automatic QoS macro is executed, all the global QoS settings are applied to all
ports in the switch. After completion, a prompt will display showing the CLI for the port-based
automatic QoS commands that are currently supported.
3-44 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 11
Configuring Cisco AutoQoS VoIP:
Cisco Catalyst 6500 Switch (Cont.)
trust dscp and trust cos are automatic QoS keywords used for
ports requiring a trust all type of solution.
trust dscp should be used only on ports that connect to other
switches or known servers, because the port will be trusting all
inbound traffic marking Layer 3 (DSCP).
trust cos should only be used on ports connecting other switches
or known servers, because the port trusts all inbound traffic
marking in Layer 2 (CoS).
The trusted boundary feature is disabled and no QoS policing is
configured on these types of ports.



The port-specific automatic QoS macro handles all inbound QoS configurations specific to a
particular port.
The QoS ingress port-specific settings include port trust, default class of service (CoS),
classification, and policing, but does not include scheduling. Input scheduling is programmed
through the global automatic QoS macro. Together with the global automatic QoS macro
command, all QoS settings are configured properly for a specific QoS traffic type.
Any existing QoS ACLs that are already associated with a port are removed when Cisco
AutoQoS modifies ACL mappings on that port. The ACL names and instances are not changed.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-45
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 12
Configuring Cisco AutoQoS VoIP:
Cisco Catalyst 6500 Switch (Cont.)
ciscosoftphone
The trusted boundary feature must be disabled for Cisco SoftPhone ports.
QoS settings must be configured to trust the Layer 3 markings of the traffic that
enters the port.
Available on most Catalyst platf orms.
ciscoipphone
The port is set up to trust-cos as well as to enable the trusted boundary feature.
Combined with the global automatic qos command, all settings are configured on
the switch to properly handle the signaling and voice bearer and PC data entering
and leaving the port.
Cisco Discovery Protocol must be enabled for the ciscoipphone QoS configuration.



The port-specific automatic QoS macro accepts a mod/port combination and must include a
Cisco AVVID (Cisco Architecture for Voice, Video, and Integrated Data, now Cisco Unified
Communications) system type of keyword. The ciscoipphone, ciscosoftphone, and trust
keywords are supported.
With the ciscoipphone keyword, the port is set up to trust-cos as well as to enable the trusted
boundary feature. Combined with the global automatic QoS command, all settings are
configured on the switch to properly handle the signaling, voice bearer, and PC data entering
and leaving the port.
In addition to the switch-side QoS settings that are covered by the global automatic QoS
command, the IP Phone has a few QoS features that need to be configured for proper labeling
to occur. QoS configuration information is sent to the IP Phone through Cisco Discovery
Protocol from the switch. The QoS values that need to be configured are the trust settings of the
PC port on the IP Phone (trusted or untrusted) and the CoS value that is used by the IP Phone
to re-mark packets in case the port is untrusted (ext-cos).
On the ports that connect to a Cisco SoftPhone, QoS settings must be configured to trust the
Layer 3 markings of the traffic that enters the port. Trusting all Layer 3 markings is a security
risk, because PC users could send nonpriority traffic with DSCP 46 and gain unauthorized
performance benefits. Although not configured by Cisco AutoQoS, policing on all inbound
traffic can be used to prevent malicious users from obtaining unauthorized bandwidth from the
network. Policing is accomplished by rate-limiting the DSCP 46 (Expedited Forwarding [EF])
inbound traffic to the codec rate used by the Cisco SoftPhone application (worst case G.722).
Any traffic that exceeds this rate is marked down to the default traffic rate (DSCP 0, or Best
Effort). Signaling traffic (DSCP 24) is also policed and marked down to zero if excess
signaling traffic is detected. All other inbound traffic types are reclassified to default traffic
(DSCP 0, or best effort).
Note You must disable the trusted boundary feature for Cisco SoftPhone ports.
3-46 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Using the Port-Specific Cisco AutoQoS Macro
This example shows how to use the ciscoipphone keyword:









This example shows how to use the ciscosoftphone keyword:





This example shows how to use the trust cos keyword:





This example shows how to use the trust dscp keyword:





2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-47
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 13
Configuring Cisco AutoQoS VoIP:
Catalyst 2950 (EI), 3550 Switches
The uplink interface is connected to a trusted switch or router, and
the VoIP classification in the ingress packet is trusted.

Automatically enables the trusted boundary feature, which uses the


Cisco Discovery Protocol to detect the presence or absence of a
Cisco IP phone.
If the interface is connected to a Cisco IP phone, the QoS labels of
incoming packets are trusted only when the IP phone is detected.

When the Cisco AutoQoS feature is enabled on the first interface, QoS is globally enabled (mls
qos global configuration command).
When the auto qos voip trust interface configuration command is entered, the ingress
classification on the interface is set to trust the CoS QoS label received in the packet, and the
egress queues on the interface are reconfigured. QoS labels in ingress packets are trusted.
When the auto qos voip cisco-phone interface configuration command is entered, the trusted
boundary feature is enabled. The trusted boundary feature uses the Cisco Discovery Protocol to
detect the presence or absence of a Cisco IP phone. When a Cisco IP phone is detected, the
ingress classification on the interface is set to trust the QoS label received in the packet. When
a Cisco IP phone is absent, the ingress classification is set to not trust the QoS label in the
packet. The egress queues on the interface are also reconfigured. This command extends the
trust boundary if an IP phone is detected.
The syntax for the auto qos voip command in Cisco IOS Release 12.2(46)SE for the Cisco
Catalyst 2960 Switch is as follows:

Syntax Description
Parameter Description
cisco-phone Identifies a port as connected to a Cisco IP phone, and automatically configures
QoS for VoIP. The QoS labels of incoming packets are trusted only when the
telephone is detected.
cisco-softphone Identifies a port as connected to a device running the Cisco SoftPhone, and
automatically configures QoS for VoIP.
trust Identifies a port as connected to a trusted switch or router, and automatically
configures QoS for VoIP. The QoS labels of incoming packets are trusted. For
nonrouted ports, the CoS value of the incoming packet is trusted.
3-48 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Monitoring Cisco AutoQoS VoIP
This topic describes how to use Cisco IOS commands to examine and monitor a network
configuration after Cisco AutoQoS has been enabled.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 14
Monitoring Cisco AutoQoS VoIP:
Routers
Displays the interface configurations, policy maps, class maps,
and ACLs created on the basis of automatically generated
configurations


When the auto qos voip command is used to configure the Cisco AutoQoS VoIP feature,
configurations are generated for each interface or PVC. These configurations are then used to
create the interface configurations, policy maps, class maps, and ACLs. The show auto qos
command can be used to verify the contents of the interface configurations, policy maps, class
maps, and ACLs.
The show auto qos interface command can be used with Frame Relay DLCIs and ATM PVCs.
When the interface keyword is used along with the corresponding interface type argument, the
show auto qos interface [interface type] command displays the configurations created by the
Cisco AutoQoS VoIP feature on the specified interface.
When the interface keyword is used but an interface type is not specified, the show auto qos
interface command displays the configurations created by the Cisco AutoQoS VoIP feature on
all the interfaces or PVCs on which the Cisco AutoQoS VoIP feature is enabled.
The syntax for the show auto qos command in Cisco IOS Release 12.4 is as follows:

2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-49
Syntax Description
Parameter Description
interface (Optional) Displays the configurations created by the Cisco AutoQoS VoIP feature
on all the interfaces or PVCs on which the Cisco AutoQoS VoIP feature is
enabled. When the interface keyword is configured but an interface type is not
specified, the show auto qos interface command displays the configurations
created by the Cisco AutoQoS VoIP feature on all the interfaces or PVCs on
which the Cisco AutoQoS VoIP feature is enabled.
type (Optional) Specifies an interface type; valid values are atm, ethernet,
fastethernet, ge-wan, gigabitethernet, pos, and tengigabitethernet.
slot/port Module and port number.

Example: show auto qos and show auto qos interface
The show auto qos command displays all of the configurations created by the Cisco AutoQoS
VoIP feature:


















3-50 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 15
Monitoring AutoQoS VoIP:
Routers (Cont.)
Displays the packet statistics of all classes that are configured for
all service policies, on either the specified interface or
subinterface















To display the configuration of all classes configured for all service policies on the specified
interface, or to display the classes for the service policy for a specific PVC on the interface, use
the show policy-map interface EXEC or privileged EXEC command.
The syntax for the show policy-map command is as follows:


The syntax for the show policy-map interface command in Cisco IOS Release 12.4 for the
Cisco 3825 Series Integrated Service Router is as follows:


2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-51
Syntax Description
Parameter Description
interface-type (Optional) Interface type; valid values include Async, BVI, CDMA-Ix, CTunnel,
Dialer, GigabitEthernet, Group-Async, Lex, Loopback, MFR, Multilink, Port-
channel, Tunnel, Vif, Virtual-PPP, Virtual-Template, Virtual-TokenRing, and
XTagATM.
interface-number (Optional) Module and port number. Valid values depend on the specified
interface type.
null 0 (Optional) Specifies the null interface; the only valid value is 0.
input (Optional) Indicates that the statistics for the attached input policy will be
displayed.
output (Optional) Indicates that the statistics for the attached output policy will be
displayed.
Note Command options vary by router platform. For the command syntax for your router platform,
refer to the Cisco IOS Master Command List, Release 12.4 on Cisco.com.
3-52 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2006 Cisco Systems, Inc. All rights reserved. QoS v2.23-16
Monitoring AutoQoS VoIP:
Switches













Displays the AutoQoS configuration that was initially applied
Does not display any user changes to the configuration that
might be in effect

To display the initial Cisco AutoQoS configuration, use the show auto qos [interface
[interface-id]] privileged EXEC command. To display any user changes to that configuration,
use the show running-config privileged EXEC command. You can compare the show auto
qos and the show running-config command output to identify the user-defined QoS settings.
The syntax for the show auto qos command in Cisco IOS Release 12.2(46)SE for the Cisco
Catalyst 2960 Switch is as follows:

Syntax Description
Parameter Description
interface
[interface-id]
(Optional) Displays auto-QoS information for the specified port or for all ports.
Valid interfaces include physical ports.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-53
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 17
Monitoring AutoQoS VoIP:
Switches (Cont.)
Displays QoS information at the interface level
















The show mls qos interface command is used to display QoS information at the interface
level, including the configuration of the egress queues, the CoS-to-egress-queue map, the
interfaces that have configured policers, and ingress and egress statistics (including the number
of bytes dropped).
If no keyword is specified with the show mls qos interface command, the port QoS mode
(DSCP trusted, CoS trusted, untrusted, and so forth), default CoS value, DSCP-to-DSCP-
mutation map (if any) that is attached to the port, and policy map (if any) that is attached to the
interface, are displayed. If a specific interface is not specified, the information for all interfaces
is displayed.
Expressions are case-sensitive. For example, if | exclude output is entered, the lines that
contain output are not displayed.
The syntax for the show mls qos interface command in Cisco IOS Release 12.2(46)SE for the
Cisco Catalyst 2960 switch is as follows:


3-54 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
interface-id (Optional) Displays QoS information for the specified port. Valid interfaces include
physical ports.
buffers (Optional) Displays the buffer allocation among the queues.
queuing (Optional) Displays the queuing strategy (shared or shaped) and the weights
corresponding to the queues.
statistics (Optional) Displays statistics for sent and received DSCPs and CoS values, the
number of packets enqueued or dropped per egress queue, and the number of in-
profile and out-of-profile packets for each policer.
| begin (Optional) Displays begins with the line that matches the expression.
| exclude (Optional) Displays excludes lines that match the expression.
| include
(Optional) Displays includes lines that match the specified expression.
expression
Expression in the output to use as a reference point.
Note Though visible in the command-line help string, the policer keyword is not supported.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-55
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 18
Monitoring Cisco AutoQoS VoIP:
Switches (Cont.)
Maps are used to generate an internal DSCP value, which
represents the priority of the traffic.




You can use the show mls qos maps command to display the current DSCP and CoS
mappings.
The syntax for the show mls qos maps command in Cisco IOS Release 12.2(46)SE for the
Cisco Catalyst 2960 switch is as follows:




3-56 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
cos-dscp (Optional) Displays CoS-to-DSCP map.
cos-input-q (Optional) Displays the CoS input queue threshold map.
cos-output-q (Optional) Displays the CoS output queue threshold map.
dscp-cos (Optional) Displays DSCP-to-CoS map.
dscp-input-q (Optional) Displays the DSCP input queue threshold map.
dscp-mutation
dscp-mutation-
name
(Optional) Displays the specified DSCP-to-DSCP-mutation map.

dscp-output-q (Optional) Displays the DSCP output queue threshold map.
ip-prec-dscp (Optional) Displays the IP-precedence-to-DSCP map.
policed-dscp (Optional) Displays the policed-DSCP map.
| begin (Optional) Displays begins with the line that matches the expression.
| exclude (Optional) Displays excludes lines that match the expression.
| include
(Optional) Displays includes lines that match the specified expression.
expression
Expression in the output to use as a reference point.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-57
Automation with Cisco AutoQoS
This topic describes several of the QoS technologies that are automatically implemented on the
network when using Cisco AutoQoS.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 19
Automation with Cisco AutoQoS
(Routers):
DiffServ Functions Automated

Cisco AutoQoS performs these functions in a WAN:
Automatically classifies Real-Time Transport Protocol (RTP) payload and VoIP control
packets (H.323, H.225 Unicast, Skinny, Session Initiation Protocol (SIP), Media Gateway
Control Protocol (MGCP)
Builds service policies for VoIP traffic that are based on Cisco MQC
Provisions low-latency queuing (LLQ)priority queuing (PQ) for VoIP bearer and
bandwidth guarantees for control traffic
Enables WAN traffic shaping that adheres to Cisco best practices, where required
Enables link efficiency mechanisms such as LFI and cRTP where required
Provides SNMP and syslog alerts for VoIP packet drops
Cisco AutoQoS performs these functions in a LAN:
Enforces the trust boundary on Cisco Catalyst switch access ports, and uplinks and
downlinks
Enables Cisco Catalyst strict PQ (also known as expedited queuing) with weighted round-
robin (WRR) scheduling for voice and data traffic, where appropriate
Configures queue admission criteria (maps CoS values in incoming packets to the
appropriate queues)
Modifies queue sizes and weights where required
3-58 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 20
Summary
You can enable QoS on a network by a single command per
interface using Cisco AutoQoS.
Cisco AutoQoS is supported on the following routers: Cisco 1760,
1800, 2600 (including XM models), 2800, 3600, 3700, 3800, and
7200 Series Routers.
Cisco AutoQoS is supported on the following switches: Cisco
Catalyst 2950, 2960, 2970, 3550, 3560, 4500, and 6500 Series
Switches.
There are several prerequisites for using Cisco AutoQoS. Cisco
AutoQos automatically configures and enables the DiffServ
mechanisms necessary for QoS.
You can use the show auto qos command to verify the contents
of the interface configurations, policy maps, class maps, and
ACLs.
Cisco AutoQoS performs several functions on both WAN
and LAN.


Lesson 3
Introducing Cisco AutoQoS for
the Enterprise
Overview
This lesson describes Cisco AutoQoS for the Enterprise and its capabilities and configuration.
Cisco AutoQoS for the Enterprise is a process in which two intelligent mechanisms are
deployed to detect voice, video, and data traffic in Cisco networks. The mechanisms generate
best-practice quality of service (QoS) policies and apply those policies to WAN interfaces. You
can enable Cisco AutoQoS for the Enterprise with two simple commands. Cisco AutoQoS for
the Enterprise detects up to ten traffic classes and provisions for them.
Objectives
Upon completing this lesson, you will be able to identify capabilities provided by Cisco
AutoQoS for the Enterprise and configure QoS on a network using Cisco AutoQoS for the
Enterprise. This ability includes being able to meet these objectives:
Explain how Cisco AutoQoS for the Enterprise is used to implement QoS policy
Describe the router platforms on which Cisco AutoQoS for the Enterprise is supported
Describe how Cisco AutoQoS for the Enterprise is configured on a router using CLI
Describe how to use Cisco IOS commands to examine and monitor a network configuration
after Cisco AutoQoS for the Enterprise has been deployed
3-60 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Cisco AutoQoS for the Enterprise
This topic describes how Cisco AutoQoS for the Enterprise is used to implement QoS policy.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-2
Cisco AutoQoS for the Enterprise
Two commands entered on the
WAN interface
Cisco AutoQoS for the
Enterprise:
Medium-to-large campus with
large remote sites
Best practices WAN QoS policy
automation tool
Classification for up to 10 traffic
classes


Frame Rel ay
+ 120 Remote Sites
Mul ti ple Apps.
Multi ple Apps.
Aut oQoS
Ent erprise
Multi ple Apps.

The Cisco AutoQoS for the Enterprise feature automates the deployment of QoS policies in a
general business environment. The policies deployed by Cisco AutoQoS for the Enterprise are
not solely focused on VoIP convergence, but also on convergence of voice, video, and data
applications. Cisco AutoQoS for the Enterprise is generally deployed in midsize companies and
branch offices of larger companies. It is used to provide best-practice QoS policy generation for
voice as well as to provide for classification of up to ten traffic classes.
Existing QoS policies may be present during the first configuration phase of Cisco AutoQoS
for the Enterprise; that is, during the auto-discovery (data collection) phase. However, any
existing QoS policies must be removed before the Cisco AutoQoS-generated policies are
applied during the second configuration phase of this feature.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-61
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-3
Cisco AutoQoS for the Enterprise (Cont.)
AutoDiscovery Cisco AutoQoS Policy
Application and
Protocol Types
Cisco AutoQoS
Class Maps
Match Statements
Offered Bit
Rate (Average and
Peak)
Minimum Bandwidth
to Cl ass Queues,
Scheduling, and WRED
Traffic Class
Transactional/Interactive AF21
Telephony Signaling CS3
Streaming Video CS4
Interactive Video AF41
Interactive Voice EF
Networ k Management CS2
Bulk Data AF11
Scavenger CS1
Best Effort 0
IP Routing CS6
DSCP

The figure shows the ten traffic classes that can be classified by Cisco AutoQoS for the
Enterprise. The auto-discovery process detects applications and protocol types, and offers a
recommended QoS policy, which will be generated and installed by the AutoQoS macros,
based on the data gathered by the auto-discovery process. The auto-discovery phase gives the
discovery period enough time to gather traffic statistics before applying Cisco AutoQoS. The
time for gathering traffic statistics before applying Cisco AutoQoS depends upon the actual
highs and lows of traffic patterns of a network.
3-62 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-4










Cisco AutoQoS for the Enterprise (Cont.)


Cisco AutoQoS VoIP

Cisco AutoQoS for the


Enterprise

The figure shows the differences between Cisco AutoQoS for the Enterprise and Cisco
AutoQoS VoIP. The Cisco AutoQoS policies came off the same router; Cisco AutoQoS VoIP
was first configured and then removed, followed by the configuration of Cisco AutoQoS for the
Enterprise. Notice how detailed the Cisco AutoQoS for the Enterprise policy is compared to the
Cisco AutoQoS VoIP policy.
The Cisco AutoQoS for the Enterprise policy is based on the traffic statistics gathered by the
Cisco AutoQoS discovery process. Conversely, the Cisco AutoQoS VoIP policy was not
generated by traffic statistics, but from a generic QoS template.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-63
Cisco AutoQoS for the Enterprise Router
Platforms
This topic describes the router platforms on which Cisco AutoQoS can be used.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-5
Cisco AutoQoS for the Enterprise:
Router Platforms
Cisco AutoQoS for the Enterprise supported platforms:
Cisco 1760 Modular Access Routers
Cisco 1800 Series Integrated Services Routers
Cisco 2600 Series Multiservice Platforms, including XM Series
Cisco 2800 Series Integrated Services Routers
Cisco 3600 Series Multiservice Platforms
Cisco 3725 and 3745 Multiservice Access Routers
Cisco 3800 Series Integrated Services Routers
Cisco 7200 Series Routers

The figure shows the listed Cisco router platforms that support the Cisco AutoQoS for the
Enterprise feature. When verifying whether a Cisco IOS Software release supports Cisco
AutoQoS for the Enterprise, check the Cisco Feature Navigator tool on http://www.cisco.com.
3-64 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-6
Cisco AutoQoS for the Enterprise:
Router Platforms (Cont.)
Search Cisco IOS Software by FEATURE:
Cisco IOS Software features:

When searching for a Cisco IOS Software version that will support the Cisco AutoQoS for the
Enterprise feature, make sure, when using the Cisco IOS Feature Navigator tool, that you select
these two options, as indicated in the Features available list shown in the figure:
AutoQoS for the Enterprise - Suggested Policy: Discovers and automatically configures
QoS policies for application traffic.
AutoQoS: AutoDiscovery Trust Option: Extends the power of Cisco AutoQoS for the
Enterprise to those routers on which differentiated services code point (DSCP) values have
already been assigned to traffic at the network edge. This option enables customers to
automatically set the QoS policy on routers by allowing the network to trust internally
established priority levels for various types of traffic.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-65
Configuring Cisco AutoQoS for the Enterprise
This topic describes the prerequisites for configuring Cisco AutoQoS for the Enterprise.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-7
Configuring Cisco AutoQoS for the
Enterprise
Before configuring Cisco AutoQoS for the Enterprise, remove any
existing service policies on an interface.
Cisco AutoQoS for the Enterprise requires Cisco Express
Forwarding to be enabled at the interface level.
The correct bandwidth must be configured on all interfaces or
subinterfaces using the bandwidth command.
If the interface or subinterface has a link speed of 768 kb/s or
lower, an IP address must be configured using the ip address
command.

Before configuring Cisco AutoQoS on a Cisco router, you must meet these prerequisites:
Removal of any preexisting service policies.
Cisco Express Forwarding must be enabled at the interface level on ATM permanent
virtual circuit (PVC) or Frame Relay data-link connection identifiers (DLCIs) (point-to-
point subinterfaces only).
Cisco AutoQoS uses network-based application recognition (NBAR) to identify various
applications and traffic types, and Cisco Express Forwarding is a prerequisite for NBAR.
Cisco AutoQoS classifies links as either low-speed or high-speed, depending upon the link
bandwidth. If the default bandwidth is not specified on a serial connection, it is 1.544 Mb/s.
You must specify the correct bandwidth on the interface or subinterface where Cisco
AutoQoS is to be enabled, as follows:
For all interfaces or subinterfaces, be sure to properly configure the bandwidth by
using the bandwidth command. The amount of bandwidth that is allocated should
be based on the link speed of the interface.
If the interface or subinterface has a link speed of 768 kb/s or lower, an IP address
must be configured on the interface or subinterface using the ip address command.
By default, Cisco AutoQoS will enable Multilink PPP (MLP) and copy the
configured IP address to the multilink bundle interface.
3-66 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
In addition to the Cisco AutoQoS prerequisites, there are other recommendations and
requirements when configuring Cisco AutoQoS, as follows: (Be aware that these may change
with Cisco IOS Software releases and should be verified before implementing Cisco AutoQoS
in the environment.)
The Cisco AutoQoS for the Enterprise feature is supported only on the following interfaces
and PVCs:
ATM PVCs low-speed and high-speed subinterfaces only
Serial interfaces with PPP or High-Level Data Link Control (HDLC)
Frame Relay DLCIs (point-to-point subinterfaces only)
Cisco AutoQoS does not support Frame Relay multipoint interfaces.
You can manually tune a configuration template, generated by configuring Cisco AutoQoS
on an interface or PVC, via a command-line interface (CLI), if desired.
Cisco AutoQoS cannot be configured if a QoS service policy is already configured and
attached to the interface or PVC.
MLP is configured automatically for a serial interface with a low-speed link when Real-
Time Transport Protocol (RTP) traffic is detected. The serial interface must have an IP
address, which is removed and put on the MLP bundle. Cisco AutoQoS for the Enterprise
must also be configured on the other side of the link.
The no auto discovery qos command removes auto discovery on WAN interfaces.
The no auto qos voip command removes Cisco AutoQoS VoIP. However, if the interface
or PVC on which Cisco AutoQoS-generated QoS configuration is deleted without
configuring the no auto qos voip command, Cisco AutoQoS VoIP will not be completely
removed from the configuration.
Cisco AutoQoS Simple Network Management Protocol (SNMP) traps are only delivered
when an SNMP server is used in conjunction with Cisco AutoQoS.
The SNMP community string AutoQoS should have write permission.
If the device is reloaded with the saved configuration after configuring Cisco AutoQoS and
saving the configuration to NVRAM, some warning messages may be generated by
Remote Monitoring (RMON) threshold commands. You can ignore these warning
messages. (To avoid further warning messages, save the configuration to NVRAM again
without making any changes to the QoS configuration.)
By default, Cisco 7200 Series Routers and below that support Modular QoS CLI (MQC)
reserve up to 75 percent of the interface bandwidth for user-defined classes. The remaining
bandwidth is used for the default class. However, the entire remaining bandwidth is not
guaranteed to the default class. This bandwidth is shared proportionally between the
different flows in the default class and excess traffic from other bandwidth classes. By
default, at least one percent of the available bandwidth is reserved and guaranteed for class
default traffic on Cisco 7500 Series Routers. (You can allocate up to 99 percent to the other
classes.)
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-67
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-8
Configuring Cisco AutoQoS for the
Enterprise (Cont.)
Configures phase one of the auto-discovery phase
Traffic statistics are gathered by NBAR
This command will not work until statistics have been gathered from
phase one.
Configures the second phase for Cisco AutoQoS for the Enterprise.
Instructs the templates to generate QoS policy based on statistics
gathered using NBAR and installs the service policies in the WAN
interface where the command is entered.





To configure Cisco AutoQoS for the Enterprise, enter auto discovery qos [trust] first, and
then, after two to three days and after the verification of traffic statistics, add the auto qos
commands on a router WAN interface. To verify that traffic has been gathered, enter show
auto discovery qos [interface]. The router will not accept the auto qos command until
statistics have been gathered.
Note Configuring auto qos voip along with auto discovery qos [trust] defaults the Cisco
AutoQoS policy generation to Cisco AutoQoS VoIP.
To remove the Cisco AutoQoS discovery or Cisco AutoQoS VoIP feature from an interface,
use the no form of the auto discovery qos or auto qos voip commands:
The syntax for the auto discovery qos command is as follows:

Syntax Description
Parameter Description
trust (Optional) Specifies that the DSCP markings of a packet are trusted; that is, used
for classification of the voice, video, and data traffic.
3-68 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Configuring the Cisco AutoQoS Discovery Feature
on a High-Speed Serial Interface
In the example, the Cisco AutoQoS discovery is configured on the high-speed serial
interface s1/1:







Example: Configuring the Cisco AutoQoS for the Enterprise
Feature on a High-Speed Serial Interface
In the example, the Cisco AutoQoS for the Enterprise feature is configured on the high-speed
serial
interface s1/1:








2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-69
Monitoring Cisco AutoQoS for the Enterprise
This topic describes how to use Cisco IOS commands to examine and monitor a network
configuration after Cisco AutoQoS has been configured.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-9
Monitoring Cisco AutoQoS for the
Enterprise
Displays the interface configurations, policy maps, class maps,
and ACLs created on the basis of automatically generated
configurations


When the Cisco AutoQoS for the Enterprise feature is configured on a router WAN interface,
you can use the show auto qos command to verify the contents of the interface configurations,
policy maps, class maps, and ACLs.
You can use the show auto qos interface command with Frame Relay DLCIs and ATM PVCs.
The show auto qos interface [interface type] command displays the configurations created by
the AutoQoS VoIP feature on the specified interface.
When the interface keyword is used but an interface type is not specified, the show auto qos
interface command displays the configurations created by the Cisco AutoQoS for the
Enterprise feature on all the interfaces or PVCs on which the Cisco AutoQoS for the Enterprise
feature is enabled.
The syntax for the show auto qos command in Cisco IOS Software Release 12.4 is as follows:

3-70 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
interface (Optional) Displays the configurations created by the Cisco AutoQoS VoIP feature
on all the interfaces or PVCs on which the Cisco AutoQoS VoIP feature is
enabled. When the interface keyword is configured but an interface type is not
specified, the show auto qos interface command displays the configurations
created by the Cisco AutoQoS VoIP feature on all the interfaces or PVCs on
which the Cisco AutoQoS VoIP feature is enabled.
type (Optional) Specifies an interface type; valid values are atm, ethernet,
fastethernet, ge-wan, gigabitethernet, pos, and tengigabitethernet.
slot/port Module and port number.
Example: show auto qos and show auto qos interface
In the example, the show auto qos command displays all of the configurations created by the
Cisco AutoQoS VoIP feature:


















2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-71
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 10























Monitoring Cisco AutoQoS for the
Enterprise (Cont.)

The figure shows an example of NBAR recognizing traffic classes that have been detected
across a WAN interface. This is only shown in this format after you enter the auto discovery
qos command on a WAN interface and traffic has been detected. The next step would be to
enter Cisco AutoQoS configuration under the WAN interface, which would result in
automatically configuring a best-practice QoS policy set for the supported traffic.
3-72 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 11

Monitoring Cisco AutoQoS for the


Enterprise (Cont.)
Suggested policy is based on autodiscovery statistics (NBAR)

The figure shows an example of a suggested QoS policy configuration generated by Cisco
AutoQoS templates, based on NBAR statistics gathered during the data discovery phase. Notice
that these policies are structured as if the policy was configured using the MQC. You can
modify these policies.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-73
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.33- 12
Summary
Cisco AutoQoS for the Enterprise is used on router WAN
interfaces and applies best-practice QoS automation. Ten traffic
types are detected.
Cisco AutoQoS for the Enterprise is supported on Cisco 1700,
2600 (including XM models), 2800, 3600, 3700, 3800, and 7200
Series Routers.
Cisco AutoQoS for the Enterprise is enabled by two commands.
(auto discovery and auto qos).
After the Cisco AutoQoS for the Enterprise feature is configured
on a router WAN interface, you can use the show auto qos
command to verify the contents of the interface configurations,
policy maps, class maps, and ACLs.

3-74 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-75
Module Summary
This topic summarizes the key points discussed in this module.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.33-1
Module Summary
Modular QoS is a three-step building-block approach to implementing
QoS in a network.
Each class of traffic is defined in a class-map module.
A policy map module defines a traffic policy that configures the QoS
features associated with a traffic class, previously identified using a
class map.
A service policy attaches a traffic policy configured with a policy map
to an interface.
Cisco AutoQoS can be enabled on a network by entering one or two
commands on an interface.
Cisco AutoQoS VoIP works on a variety of Cisco routers and
switches and automatically configures and enables the mechanisms
necessary for deploying QoS for VoIP.
Cisco AutoQoS for the Enterprise works on a variety of Cisco routers
and automatically configures and enables the mechanisms
necessary for deploying up to 10 traffic classes, including VoIP.

Both the Modular QoS command-line interface (CLI), or MQC, and Cisco AutoQoS are
designed to aid in more rapid and consistent design, implementation, and maintenance of QoS
policies for converged networks. The MQC offers a three-step, building-block approach for
implementing extremely modular QoS policies for network administrators who have the
responsibility to manage large and complex networks. Cisco AutoQoS provides an easy-to-use,
mostly automated means to provide consistent QoS policies throughout a network with a
minimal design and implementation effort.
3-76 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
References
For additional information, refer to these resources:
For more information on MQC, refer to Modular Quality of Service Command-Line
Interface Overview at this URL:
http://www.cisco.com/en/US/docs/ios/12_2/qos/configuration/guide/qcfmdcli.html.
For more information on MQC, refer to the Applying QoS Features Using the MQC section
of the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.4 at this
URL:
http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/qos_mqc_ps6350_TSD_Pro
ducts_Configuration_Guide_Chapter.html.
For more information on Cisco AutoQoS, refer to Cisco AutoQoS Whitepaper at this URL:
http://www.cisco.com/en/US/tech/tk543/tk759/technologies_white_paper09186a00801348
bc.shtml.
For more information on Cisco AutoQoS, refer to the Configuring Automatic QoS section
of the Catalyst 6500 Series Software Configuration Guide, 8.7 at this URL:
http://www.cisco.com/en/US/partner/docs/switches/lan/catalyst6500/catos/8.x/configuratio
n/guide/autoqos.html.
For more information on Cisco AutoQoS, refer to the AutoQoS VoIP section of the Cisco
IOS Quality of Service Solutions Configuration Guide, Release 12.4 at this URL:
http://www.cisco.com/en/US/partner/docs/ios/qos/configuration/guide/autoqos_voip_ps635
0_TSD_Products_Configuration_Guide_Chapter.html.
2009 Cisco Systems, Inc. Introduction to MQC and Cisco AutoQoS 3-77
Module Self-Check
Use the questions here to review what you learned in this module. The correct answers and
solutions are found in the Module Self-Check Answer Key.
Q1) Which command would you use to attach a QoS policy to an interface? (Source:
Introducing MQC)
A) policy-set-interface
B) policy-map
C) policy-interface
D) service-policy
Q2) What is trusted when the auto qos voip command is configured with the trust
parameter on routers? (Source: Introducing Cisco AutoQoS VoIP)
A) source address
B) MAC address of sender
C) DES keyword
D) DSCP
Q3) Which of these terms are displayed by the show auto qos interface S0/0 router
command? (Source: Introducing Cisco AutoQoS VoIP)
A) ACL configuration applied to the S0/0 interface
B) class-maps configuration
C) policy-maps configuration
D) service-policy configuration on the S0/0 interface
Q4) Which command would you use on a Cisco IOS-based Catalyst switch to display the
configuration of the egress queues? (Source: Introducing Cisco AutoQoS VoIP)
A) show mls qos maps
B) show auto qos
C) show auto qos interface
D) show mls qos interface
Q5) Which three of these does Cisco AutoQoS VoIP do when used to automatically
configure a WAN interface? (Choose three.) (Source: Introducing Cisco AutoQoS for
the Enterprise)
A) enable payload compression
B) provision low-latency queuing (LLQ)
C) automatically classify RTP payload and VoIP control packets
D) enable LFI where required
3-78 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Module Assessment Answer Key
Q1) D
Q2) D
Q3) D
Q4) D
Q5) B, C, D
Module 4
Classification and Marking
Overview
In any network in which networked applications require differentiated levels of service, traffic
must be sorted into different classes upon which quality of service (QoS) is applied.
Classification and marking are two critical functions of any successful QoS implementation.
Classification allows network devices to identify traffic as belonging to a specific class with
specific QoS requirements as determined by an administrative QoS policy. After network
traffic is sorted, individual packets are colored or marked so that other network devices can
apply QoS features uniformly to those packets in compliance with the defined QoS policy. This
module introduces classification and marking and the different methods of performing these
critical QoS functions on Cisco routers and switches.
Because the end result of QoS implementations is to affect application traffic traversing a QoS-
enabled network, this module also describes the effects that classification and marking have on
network traffic.
Module Objectives
Upon completing this module, you will be able to successfully classify and mark network
traffic to implement a policy according to QoS requirements. This ability includes being able to
meet these objectives:
Explain the purpose of classification and marking and how they can be used to define a
QoS service class
Define a QoS policy that assigns network traffic to service classes and assigns where
classification and marking should be applied to the network
Use MQC commands to classify packets
Use class-based marking to assign packets to a specific service class
Use NBAR to discover network protocols and applications, and to classify packets
Use the QoS preclassify feature to classify GRE, IPsec, L2F, and L2TP encapsulated
packets
Explain how to implement classification and marking in an interdomain network using
QPPB
4-2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Describe LAN-based methods for implementing classification and marking
Identify the QoS status of packets as they pass through various points in a network
Lesson 1
Understanding Classification
and Marking
Overview
Quality of service (QoS) offers the ability to provide different levels of treatment to specific
classes of traffic. Before any QoS applications or mechanisms can be applied, traffic must be
identified and sorted into different classes. QoS is applied to these different traffic classes.
Network devices use classification to identify traffic as belonging to a specific class. After
network traffic is sorted, marking can be used to color (tag) individual packets so that other
network devices can apply QoS features uniformly to those packets as they travel through the
network. This lesson introduces the concepts of classification and marking, explains the
different markers that are available at the data-link and network layers, and identifies where
classification and marking should be used in a network. In addition, the concept of a QoS
service class and how a service class can be used to represent an application or set of
applications is discussed.
Objectives
Upon completing this lesson, you will be able to explain the purpose of classification and
marking and how they can be used to define a QoS service class. This ability includes being
able to meet these objectives:
Explain the purpose of packet classification
Explain the purpose of packet marking
Describe IP packet classification and marking at the data-link layer
Describe IP packet classification and marking at the network layer
Describe data-link-to-network layer interoperability between QoS markers
Explain the term QoS service class and describe how service classes can be used to
create a service policy throughout a network
Explain how link-layer and network-layer markings are used to define service classes and
describe the different applications represented by each of these service classes
Explain the concept of trust boundaries and how they are used with classification and
marking
4-4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Classification
This topic describes the purpose of packet classification.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-2
Classification
The component of a QoS feature that recognizes and
distinguishes between different traffic streams
Most fundamental QoS building block
Without classification, all packets treated
the same

Classification is the process of identifying traffic and categorizing that traffic into different
classes. Packet classification uses a traffic descriptor to categorize a packet within a specific
group in order to define that packet. Typically used traffic descriptors include class of service
(CoS), incoming interface, IP precedence, differentiated services code point (DSCP), source or
destination address, application, and Multiprotocol Label Switching (MPLS) experimental bits
(EXP). After the packet has been defined (that is, classified), the packet is then accessible for
QoS handling on the network.
Using packet classification, you can partition network traffic into multiple priority levels or
classes of service. When traffic descriptors are used to classify traffic, the source agrees to
adhere to the contracted terms and the network promises a QoS. Different QoS mechanisms,
such as traffic policing, traffic shaping, and queuing techniques use the traffic descriptor of the
packet (that is, the classification of the packet) to ensure adherence to that agreement.
Classification should take place at the network edge, typically in the wiring closet, in IP phones
or at network endpoints. It is recommended that classification occur as close to the source of
the traffic as possible.
2009 Cisco Systems, Inc. Classification and Marking 4-5
Marking
This topic describes the purpose of packet marking.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-3
Marking
The QoS feature component that colors a packet (frame) so that
it can be identified and distinguished from other packets (frames)
in QoS treatment.
Commonly used markers include: CoS (ISL, 802.1p), DSCP, IP
precedence, and MPLS experimental bits.

Marking is related to classification. Marking allows network devices to classify a packet or
frame based on a specific traffic descriptor. Typically used traffic descriptors include CoS,
DSCP, IP precedence, and MPLS experimental bits. Marking can be used to set information in
the Layer 2 or Layer 3 packet headers.
Marking a packet or frame with its classification allows network devices to easily distinguish
the marked packet or frame as belonging to a specific class. After the packets or frames are
identified as belonging to a specific class, QoS mechanisms can be uniformly applied to ensure
compliance with administrative QoS policies.
4-6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Classification and Marking at the Data-Link Layer
This topic describes IP packet classification and marking options that are available at the data-
link layer.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-4
Classification and Marking at the Data-Link
Layer: Ethernet 802.1Q Class of Service
IEEE specification
802.1p user priority field, also called CoS
Supports up to 8 classes of service
Focuses on support for QoS over LANs and
802.1Q ports
Preserved through the LAN, not end-to-end

The 802.1Q standard is an IEEE specification for implementing VLANs in Layer 2 switched
networks. The 802.1Q specification defines two 2-byte fields, Tag Protocol Identifier (TPID)
and Tag Control Information (TCI), which are inserted within an Ethernet frame following the
source address field. The TPID field is currently fixed and assigned the value 0x8100. The TCI
field is composed of these three fields:
User priority bits (3 bits): The specifications of this 3-bit field are defined by the IEEE
802.1p standard. These bits can be used to mark packets as belonging to a specific CoS.
The CoS marking uses the three 802.1p user priority bits and allows a Layer 2 Ethernet
frame to be marked with eight different levels of priority (values 07). Three bits allow for
eight levels of classification, allowing a direct correspondence with IPv4 (IP precedence)
type of service (ToS) values. The 802.1P specification defines these standard definitions for
each CoS:
CoS 7 (111): network
CoS 6 (110): Internet
CoS 5 (101): critical
CoS 4 (100): flash-override
CoS 3 (011): flash
CoS 2 (010): immediate
CoS 1 (001): priority
CoS 0 (000): routine
2009 Cisco Systems, Inc. Classification and Marking 4-7
One disadvantage of using CoS markings is that frames will lose their CoS markings when
transiting a non-802.1Q or non-802.1p link, including any type of non-Ethernet WAN link.
Therefore, a more permanent marking should be used for network transit, such as Layer 3
IP DSCP marking. This is typically accomplished by translating a CoS marking into
another marker or simply using a different marking mechanism.
Canonical format identifier (CFI) (1 bit): This bit indicates whether the bit order is
canonical or noncanonical. The CFI bit is used for compatibility between Ethernet and
Token Ring networks.
VLAN identifier (VLAN ID) (12 bits): The VLAN ID field is a 12-bit field that defines
the VLAN used by 802.1Q. The fact that the field is 12 bits restricts the number of VLANs
supported by 802.1Q to 4096. For most enterprise customers, 4096 VLANs is adequate.
For service provider applications, 4096 VLANs may not be enough.
4-8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-5
Classification and Marking at the Data-
Link Layer: Cisco ISL Class of Service
Cisco proprietary specification
ISL encapsulation adds 30 bytes to
Ethernet frame
ISL header contains VLAN field and User
field
VLAN field contains VLAN ID
User field carries CoS values
Supports up to 8 classes of service
Focuses on support for QoS over ISL
trunks
Preserved through the LAN, not end to end

Inter-Switch Link (ISL) is a proprietary Cisco protocol for interconnecting multiple switches
and maintaining VLAN information as traffic travels between switches. ISL was created prior
to the standardization of 802.1Q. However, ISL is compliant with the IEEE 802.1P standard.
The ISL frame header contains a 4-bit User field that carries 802.1p CoS values in the three
least significant bits. When an ISL frame is marked for priority, the three 802.1p CoS bits are
set to a value 07. In compliance with the 802.1p specification, ISL follows the standard
definitions for each CoS:
CoS 7 (111): network
CoS 6 (110): Internet
CoS 5 (101): critical
CoS 4 (100): flash-override
CoS 3 (011): flash
CoS 2 (010): immediate
CoS 1 (001): priority
CoS 0 (000): routine
Similar to 802.1Q, ISL CoS markings are not maintained end-to-end if a non-ISL or non-
802.1Q trunk is transited. As a result, network administrators typically translate CoS markings
into another marker or simply use a different marking mechanism altogether.
2009 Cisco Systems, Inc. Classification and Marking 4-9
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-6
Classification and Marking at the Data-
Link Layer: Frame Relay and ATM QoS
Frame Relay DTE devices can set the DE bit of a frame so that if the
network becomes congested, Frame Relay devices will discard frames
with the DE bit set before discarding those that do not have the DE bit
set.
Preserved throughout the Frame Relay network.
The CLP bit indicates that the cell should be discarded if it encounters
congestion as it moves through the network.
Preserved throughout the ATM network.

Before the Internet Engineering Task Force (IETF) defined QoS methods for the network layer,
the ITU-T, ATM Forum, and the Frame Relay Forum (FRF) had already derived standards for
link-layer QoS in ATM and Frame Relay networks.
ATM standards define a rich QoS infrastructure by supporting traffic contracts, many
adjustable QoS knobs (such as peak cell rate [PCR], minimum cell rate [MCR], and so on),
signaling, and admission control. Frame Relay provides a simpler set of QoS mechanisms to
ensure a committed information rate (CIR), congestion notification, and FRF.12.
One component of Frame Relay QoS is packet discard when congestion is experienced in the
network. Frame Relay will allow network traffic to be sent at a rate exceeding its CIR. Frames
sent that exceed the committed rate can be marked as discard eligible (DE). If congestion
occurs in the network, frames marked DE will be discarded prior to frames that are not marked.
ATM cells consist of 48 bytes of payload and 5 bytes of header. The ATM header includes the
1-bit cell loss priority (CLP) field, which indicates the drop priority of the cell if that cell
encounters extreme congestion as it moves through the ATM network. The CLP bit represents
two values: 0 to indicate higher priority and 1 to indicate lower priority. Setting the CLP bit to
1 lowers the priority of the cell, increasing the likelihood that the cell will be dropped when the
ATM network experiences congestion.
4-10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-7
Classification and Marking at the Data-
Link Layer: MPLS Experimental Bits
MPLS uses a 32-bit label field (shim
header) which is inserted between Layer 2
and Layer 3 headers (frame mode).
Supports up to 8 classes of service.
The IP precedence or DSCP field is not
directly visible to MPLS label switch
routers.
By default, Cisco IOS Software copies the
three most significant bits of the DSCP or
the IP precedence of the IP packet to the
EXP field.
Preserved throughout the MPLS network.

When a customer transmits IP packets from one site to another, the IP precedence field (the
first three bits of the DSCP field in the header of an IP packet) specifies the CoS. Based on the
IP precedence marking, the packet is given the desired treatment, such as guaranteed bandwidth
or latency. If the service provider network is an MPLS network, the IP precedence bits are
copied into the MPLS experimental field at the edge of the network. However, the service
provider might want to set an MPLS packet QoS to a different value that is determined by the
service offering.
The MPLS experimental field allows the service provider to provide QoS without overwriting
the value in the customer IP precedence field. The IP header remains available for customer
use, and the IP packet marking is not changed as the packet travels through the MPLS network.
2009 Cisco Systems, Inc. Classification and Marking 4-11
Classification and Marking at the Network Layer
This topic describes the different IP packet classification and marking options that are available
at the network layer.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-8
Classification and Marking at the
Network Layer: IP Precedence and DSCP
IP Precedence: Three most significant bits of ToS byte are called
IP precedenceother bits unused.
DiffServ: Six most significant bits of ToS byte are called DSCP
remaining two bits used for flow control.
DSCP is backward compatible with IP precedence.

At the network layer, IP packets are typically classified based on source or destination IP
address, packet length, or the contents of the ToS byte. Link-layer media often changes as a
packet travels from its source to its destination. Because a CoS field does not exist in a standard
Ethernet frame, CoS markings at the link layer are not preserved as packets traverse nontrunked
or non-Ethernet networks. Using marking at the network layer (Layer 3) provides a more
permanent marker that is preserved from source to destination.
Originally, only the first three bits of the ToS byte were used for marking, referred to as IP
precedence. However, newer standards have made the use of IP precedence obsolete in favor of
using the first six bits of the ToS byte for marking, referred to as DSCP.
The header of an IPv4 packet contains the ToS byte. IP precedence uses three precedence bits
in the ToS field of the IPv4 header to specify CoS for each packet. IP precedence values range
from 0 to 7 and allow you to partition traffic in up to six useable classes of service. (Settings 6
and 7 are reserved for internal network use.)
Differentiated services (DiffServ) is a new model that supersedesand is backward compatible
withIP precedence. DiffServ redefines the ToS byte as the DiffServ field and uses six
prioritization bits that permit classification of up to 64 values (0 to 63), of which 32 are
commonly used. A DiffServ value is called a DSCP.
With DiffServ, packet classification is used to categorize network traffic into multiple priority
levels or classes of service. Packet classification uses the DSCP traffic descriptor to categorize
a packet within a specific group to define that packet. After the packet has been defined
(classified), the packet is then accessible for QoS handling on the network.
4-12 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Mapping CoS to Network Layer QoS
This topic describes data-link-layer to network-layer interoperability between different QoS
markers.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-9
Mapping CoS to Network-Layer QoS

IP headers are preserved end-to-end when IP packets are transported across a network; data-
link-layer headers are not preserved. This means that the IP layer is the most logical place to
mark packets for end-to-end QoS. However, there are edge devices that can only mark frames
at the data-link layer, and there are many other network devices that only operate at the data-
link layer. To provide true end-to-end QoS, the ability to map QoS marking between the data-
link layer and the network layer is essential.
Enterprise networks typically consist of a number of remote sites connected to the headquarters
campus via a WAN. Remote sites typically consist of a switched LAN, and the headquarters
campus network is both routed and switched. Providing end-to-end QoS through such an
environment requires that CoS markings that are set at the LAN edge be mapped into QoS
markings (such as IP precedence or DSCP) for transit through campus or WAN routers.
Campus and WAN routers can also map the QoS markings to new data-link headers for transit
across the LAN. In this way, QoS can be preserved and uniformly applied across the enterprise.
Service providers offering IP services have a requirement to provide robust QoS solutions to
their customers. The ability to map network-layer QoS to link-layer CoS allows these providers
to offer a complete end-to-end QoS solution that does not depend on any specific link-layer
technology.
Compatibility between an MPLS transport-layer and network-layer QoS is also achieved by
mapping between MPLS EXP bits and the IP precedence or DSCP bits. A service provider can
map the customer network-layer QoS marking as-is, or change it to fit an agreed-upon service
level agreement (SLA). The information in the MPLS EXP bits can be carried end-to-end in the
MPLS network, independent of the transport media. In addition, the network layer marking can
2009 Cisco Systems, Inc. Classification and Marking 4-13
remain unchanged so that when the packet leaves the service provider MPLS network, the
original QoS markings remain intact. Thus, a service provider with an MPLS network can help
provide a true end-to-end QoS solution.
4-14 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Service Class Defined
This topic describes QoS service class and how service classes can be used to create a service
policy throughout a network.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 10
QoS Service Class Defined
A QoS service class is a logical grouping of packets that are to
receive a similar level of applied quality.
A QoS service class can be a:
Single user: MAC address, IP address
Department, customer: Subnet, interface
Application: Port numbers, URL

When an administrative policy requiring QoS is created, you must determine how network
traffic is to be treated. As part of that policy definition, network traffic must be associated with
a specific service class. QoS classification mechanisms are used to separate traffic and identify
packets as belonging to a specific service class. QoS marking mechanisms are used to tag each
packet as belonging to the assigned service class. After the packets are identified as belonging
to a specific service class, QoS mechanisms such as policing, shaping, and queuing techniques
can be applied to each service class to meet the specifications of the administrative policy.
Packets belonging to the same service class are given the same treatment with regards to QoS.
A QoS service class, being a logical grouping, can be defined in many ways, including these:
Organization or department (marketing, engineering, sales, and so on)
A specific customer or set of customers
Specific applications or set of applications (Telnet, FTP, voice, Service Advertisement
Protocol [SAP], Oracle, video, and so on)
Specific users or sets of users (based on MAC address, IP address, LAN port, and so on)
Specific network destinations (tunnel interfaces, virtual private networks [VPNs], and
so on)
2009 Cisco Systems, Inc. Classification and Marking 4-15
Example: Defining QoS Service Classes
A network administrator wants to apply QoS to the corporate network to better control
bandwidth allocation of different network applications. Before QoS can be applied, an
administrative QoS policy is first devised as follows:
Voice traffic is to be given a strict priority over all other traffic types.
Business applications (FTP, TN3270, and Oracle) should be given priority over web traffic
and have a guaranteed bandwidth of 20 percent.
Web traffic should consume no more than 30 percent of any WAN link.
As a result of this policy, three QoS service classes have been defined:
Voice class: To be treated with a strict priority service
Business applications class: Requires a guaranteed bandwidth of 20 percent and is to be
given priority over web traffic
Web class: Only allowed to consume up to 30 percent of any WAN link
4-16 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Implementing a QoS Policy Using a QoS Service
Class
This topic describes how link-layer and network-layer markers are used to define QoS service
classes and the different applications that can be represented by each of these service classes.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 11
How Can a QoS Service Class Be Used
to Implement a QoS Policy?

Specifying an administrative policy for QoS requires that a specific set of service classes be
defined. QoS mechanisms are uniformly applied to these individual service classes to meet the
requirements of the administrative policy. Because the application of QoS mechanisms is
applied to different service classes and used to differentiate between applications, users, and
traffic, the service class is a key component of a successful QoS implementation.
There are many different methods in which service classes can be used to implement an
administrative policy. The first step is to identify the traffic that exists in the network and the
QoS requirements for each traffic type. Then, traffic can be grouped into a set of service classes
for differentiated QoS treatment in the network.
One popular model for the application of QoS service classes is the customer model which is
typically used by service providers when referring to customer traffic. The customer model
defines the following service classes (although many variations exist):
Voice service class: Delivers low latency for voice services
Mission-critical service class: Guarantees latency and delivery for the transport of
mission-critical business applications such as Systems Network Architecture (SNA)
Transactional service class: Guarantees delivery and is used for more general applications
that are not as sensitive to delay, such as e-commerce
Best-effort service class: Used to support small business, email, and other best-effort
applications
2009 Cisco Systems, Inc. Classification and Marking 4-17
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 12
Provisioning for Data:
General Principles
Profile applications to their basic network requirements.
Do not over-engineer provisioning.
Do not assign more than three applications to Mission-Critical or
Transactional classes.
Use proactive policies before reactive (policing) policies.
Seek executive endorsement of relative ranking of application
priority prior to rolling out QoS policies for data.

One key element of defining QoS service classes is to understand the basic quality needs of
network applications. It is essential that applications be given QoS treatment in line with their
needs. For example, improperly specifying voice traffic into a service class with guaranteed
bandwidthwithout a guaranteed latency (delay)would not meet the needs of the voice
traffic.
While it is important to fully understand network application requirements, it is equally
important not to over-provision or over-design the administrative policy. An administrative
policy should be proactive in nature and require as few service classes as possible.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 13
4/5 Class Model
Scavenger
Critical Data
Call Signaling
Real Time
8 Class Model
Critical Data
Video
Call Signaling
Best Effort
Voice
Bulk Data
Network Control
Scavenger
QoS Baseline Model
Network Management
Call Signaling
Streaming Video
Transactional Data
Interactive-Video
Voice
Best Effort
IP Routing
Mission-Critical Data
Scavenger
Bulk Data
Best Effort
QoS Baseline Expansion

4-18 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
The number of traffic classes used by enterprises has increased over the past few years, from 4
classes to 57 classes. The reason for this increase is that enterprises are using more and more
applications and want increasingly more granularity in QoS differentiation among applications.
The Cisco QoS baseline has suggested an 11-class model. This 11-class model is not
mandatory, but merely an example of traffic classification based on various types of
applications in use and their QoS requirements from an enterprise perspective. The Cisco
AutoQoS for the Enterprise feature can automatically classify traffic into 10 of these 11 classes
(the only class that the Cisco AutoQoS for the Enterprise feature does not automatically
provision for is the Mission Critical Data class; this class is defined by subjective business
requirements).
2009 Cisco Systems, Inc. Classification and Marking 4-19
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 14
Application
L3 Classification
DSCP PHB IPP CoS
Transactional Data 18 AF21 2 2
Call Signaling 24 CS3* 3 3
Streaming Video 32 CS4 4 4
Video Conferencing 34 AF41 4 4
Voice 46 EF 5 5
Network Management 16 CS2 2 2
L2
Bulk Data 10 AF11 1 1
Scavenger 8 CS1 1 1
Best Effort 0 0 0 0
Routing 48 CS6 6 6
Mission-Critical Data 26 AF31* 3 3
Example Application Service Classes

Although there are several sources of information that can be used as guidelines for
determining a QoS policy, none of them can determine exactly what is proper for a specific
network. Each network presents its own unique challenges and administrative policies. To
properly implement QoS, measurable goals must be declared, and then a plan for achieving
these goals must be formulated and implemented.
QoS must be implemented consistently across the entire network. It is not so important whether
Call Signaling is marked as DSCP 34 or 26, but rather that DSCP 34 and 26 are treated in a
manner that is necessary to accomplish the QoS policy. It is also important that data marked
DSCP 34 is treated consistently across the network. If data travels over even a small portion of
a network where different policies are applied (or no policies are applied), the entire QoS
policy is nullified. Whether the data is crossing slow WAN links or Gigabit Ethernet, being
switched by a Layer 2 switch or routed in a Layer 3 router, the policies must be consistently
implemented to satisfy the policy requirements.
Originally, Cisco marked call signaling traffic as Assured Forwarding (AF) 31; call signaling
traffic was originally marked by Cisco IP Telephony equipment to DSCP AF31. However, the
Assured Forwarding classes, as defined in RFC 2597, were intended for flows that could be
subject to markdown and, subsequently, the aggressive dropping of marked-down values.
Marking down and aggressively dropping call signaling could result in noticeable delay-to-dial-
tone (DDT) and lengthy call setup times, both of which generally translate to poor user
experiences.
The Cisco QoS Baseline changed the marking recommendation for call signaling traffic to
DSCP CS3 because Class Selector code points, as defined in RFC 2474, were not subject to
markdown or aggressive dropping.
4-20 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 15
RFC 4594 Marking Recommendations
Cisco modified RFC
4594-based
marking
recommendations
exchange Call
Signaling and
Broadcast Video, so
that:
Call Signaling =
CS3 (DSCP 24)
Broadcast Video =
CS5 (DSCP 40)
Application
Multimedia Streaming
Multimedia Conferencing
Call Signaling
Low-Latency Data
VoIP Telephony
Network Control
High-Throughput Data
Real-Time Interactive
Broadcast Video
Best Effort
OAM
Low-Priority Data
AF31
AF41
CS5
AF21
EF
CS6
AF11
CS4
CS3
DF
CS2
CS1
L3 Classification
PHB DSCP
48
46
40
34
32
26
24
18
16
10
0
8
RFC
RFC 2474
RFC 3246
RFC 2474
RFC 2597
RFC 2474
RFC 2597
RFC 2474
RFC 2597
RFC 2474
RFC 2597
RFC 2474
RFC 3662
IETF

Since the development of the Cisco QoS Baseline, new RFCs have been published, such as
RFC 4594, that improve and expand on the Cisco QoS Baseline. RFC 4594 was formally
accepted in 2006 as an informational RFC. An informational RFC is an industry recommended
best practice, while a standard RFC is an industry requirement. Therefore RFC 4594 is a set of
formal DiffServ QoS configuration best practices, not a requisite standard.
RFC 4594 puts forward twelve application classes and matches them to RFC-defined per-hop
behaviors (PHBs). These application classes and recommended PHBs are summarized in the
figure. Obviously, Cisco QoS Baseline and RFC 4594 are similar, because RFC 4594 is
essentially an industry-accepted evolution of the Cisco QoS Baseline. However, there are some
differences that merit attention.
The first set of differences is minor, primarily involving nomenclature. RFC 4594 changes the
names of some of the application classes from the QoS Baseline. These changes in
nomenclature are summarized in the following table.
2009 Cisco Systems, Inc. Classification and Marking 4-21
Nomenclature Changes from Cisco QoS Baseline to RFC 4594
Cisco QoS Baseline Class Names RFC 4594 Class Names
Routing Network Control
Voice VoIP Telephony
Interactive Video Multimedia Conferencing
Streaming Video Multimedia Streaming
Transactional Data Low-Latency Data
Network Management Operation, Administration, and Management
(OAM)
Bulk Data High-Throughput Data
Scavenger Low-Priority Data
The remaining changes, which follow, are more significant:
The QoS Baseline Locally-Defined Mission-Critical Data class has been deleted from RFC
4594.
The QoS Baseline marking recommendation of CS4 for Streaming Video has been changed
in RFC 4594 to mark Multimedia Streaming to AF31.
The QoS Baseline marking recommendation of CS3 for Call Signaling has been changed in
RFC 4594 to mark Call Signaling to CS5.
A new application class has been added to RFC 4594, Real-Time Interactive. This addition
allows for a service differentiation between elastic conferencing applications (which would
be assigned to the Multimedia Conferencing class) and inelastic conferencing applications
(which would include high-definition applications, such as Cisco TelePresence, in the Real-
Time Interactive class). Elasticity refers to the ability of the applications to function despite
experiencing minor packet loss. Multimedia Conferencing uses the AF4 class and is subject
to markdown (and potential dropping) policies, while the Real-Time Interactive class uses
CS4 and is not subject to markdown or dropping policies.
A second new application class has been added to RFC 4594, Broadcast Video. This
addition allows for a service differentiation between elastic and inelastic streaming media
applications. Multimedia Streaming uses the AF3 class and is subject to markdown (and
potential dropping) policies, while Broadcast Video uses the CS3 class and is subject
neither to markdown nor dropping policies.
The most significant of the differences between the Cisco QoS Baseline and RFC 4594 is the
RFC 4594 recommendation to mark Call Signaling to CS5. Cisco has completed a lengthy
marking migration for Call Signaling from AF31 to CS3 (as per the original QoS Baseline of
2002) and, as such, there are no plans to embark on another marking migration in the near
future. It is important to remember that RFC 4594 is an informational RFC and not a standard.
Therefore, Cisco plans to continue marking Call Signaling as CS3 until future business
requirements arise that necessitate another marking migration.
Note There are other RFCs relating to DiffServ design that are currently in draft status, such as
RFC 5127, Aggregation of Diffserv Service Classes.
4-22 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 16
Classifying Cisco TelePresence
A dedicated class, along with a dedicated classification marking
value, is recommended for Cisco TelePresence.
The recommended marking for Cisco TelePresence is CS4.
Branch
Private WAN
MPLS VPN
Metro
Ether net
Headquarters
Remot e
Campus
TelePresence
TelePresence
TelePresence

Cisco TelePresence combines rich audio, high-definition video, and collaboration technologies
to provide unique, real-time, face-to-face interactions between individuals in remote locations.
A major benefit of Cisco TelePresence over competitive offerings is that the real-time, high-
definition video and audio are transported over a converged IP network rather than a dedicated
network (although dedicated networks are also supported). The key enabling technology to
accomplish this convergence is QoS.
When implementing QoS for Cisco TelePresence, it is recommended that you designate a
dedicated class along with a dedicated classification marking value for Cisco TelePresence.
This is because Cisco TelePresence has higher service-level requirements than do generic
videoconferencing and video telephony applications. The table below summarizes the service
level requirements of both generic videoconferencing applications and Cisco TelePresence.
Service Level Requirements of Generic Video-Conferencing and Cisco
TelePresence
Service Level Parameter
(Target Values)
(Generic) Videoconferencing
and Video Telephony
Cisco TelePresence
Bandwidth 384 kb/s or 768 kb/s plus
network overhead
1.5 Mb/s to 12.6 Mb/s plus
network overhead
Latency 400450 ms latency 150 ms latency
Jitter 3050 ms peak-to-peak jitter 10 ms peak-to-peak jitter
Loss 1% random packet loss 0.05% random packet loss

Videoconferencing and video telephony applications have traditionally been marked to RFC
2597 AF4, which is the recommendation from both the Cisco QoS Baseline as well as RFC
4594. However, the AF PHB includes policing, as well as increasing the Drop Preferences
values, and ultimately dropping traffic according to the Drop Preference markings.
2009 Cisco Systems, Inc. Classification and Marking 4-23
TelePresence traffic has a very low tolerance to drops (0.05%) and therefore would not be
appropriately serviced by an AF PHB.
Because of the low-latency and jitter service-level requirements of Cisco TelePresence, it may
seem attractive to assign it an RFC 3246 Expedited Forwarding (EF) PHB; there is nothing in
RFC 3246 that dictates that only VoIP can be assigned to this PHB. However, it is important to
recognize that VoIP behaves differently than video. VoIP has constant packet sizes and packet
rates, whereas video packet sizes vary and video packet rates also vary in a random and bursty
manner. If both video and voice were assigned to the same marking value and class, bursty
video could easily interfere with well-behaved voice. Therefore, it is recommended in both the
Cisco QoS Baseline and RFC 4594 that you avoid marking both voice and video to EF.
How, then, should Cisco TelePresence be marked? The best formal guidance is provided in
RFC 4594, where a distinction is made between a Multimedia Conferencing (such as generic
videoconferencing and video telephony) service class and a Real-Time Interactive service class.
The Real-Time Interactive service class is intended for inelastic video flows, such as Cisco
TelePresence. The recommended marking for this Real-Time Interactive service class, and thus
the recommended marking for Cisco TelePresence, is CS4.
4-24 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Trust Boundaries
This topic describes the concept of trust boundaries and how they are used with classification
and marking.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 17
Trust Boundary Classification
Cisco QoS model assumes that the CoS carried in a frame may or
may not be trusted by the network device.
For scalability, classification should be done as close to the edge
as possible.
End hosts cannot be trusted to tag a packet priority correctly.
The outermost trusted devices represent the trust boundary.
1 and 2 are optimal, 3 is acceptable (if access switch cannot
perform classification).

The concept of trust is important and integral to deploying QoS. After the end devices have set
CoS or ToS values, the switch has the option of trusting them. If the switch trusts the values, it
does not need to reclassify; if the switch does not trust the values, it must perform
reclassification for the appropriate QoS.
The notion of trusting or not trusting forms the basis for the trust boundary. Ideally,
classification should be done as close to the source as possible. If the end device is capable of
performing this function, the trust boundary for the network is at the end device. If the device is
not capable of performing this function, or the wiring closet switch does not trust the
classification done by the end device, the trust boundary might shift.
How this shift happens depends on the capabilities of the switch in the wiring closet. If the
switch can reclassify the packets, the trust boundary is in the wiring closet. If the switch cannot
reclassify the packets, the task falls to other devices in the network, going toward the backbone.
In this case, one good rule is to perform reclassification at the distribution layer, which means
that the trust boundary shifts to the distribution layer. It is likely that there is a high-end switch
in the distribution layer with features to support the reclassification function. If possible, try to
avoid performing the reclassification function in the core of the network.
2009 Cisco Systems, Inc. Classification and Marking 4-25
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 18
Trust Boundaries Mark Where?
For scalability, marking should be done as close to the source as
possible.

Classification should take place at the network edge, typically in the wiring closet or within
endpoints (servers, hosts, video endpoints, or IP telephony devices).
For example, consider the campus network containing IP telephony and host endpoints. Frames
can be marked as important by using link-layer CoS settings, or the IP precedence or DSCP bits
in the ToS and DiffServ field in the IPv4 header. Cisco IP phones can mark voice packets as
high priority using CoS as well as ToS. By default, the IP phone sends 802.1p-tagged packets
with the CoS and ToS set to a value of 5 for its voice packets. Because most PCs do not have
an 802.1Q-capable network interface card (NIC), they send packets untagged. This means that
the frames do not have an 802.1p field. Also, unless the applications running on the PC send
packets with a specific CoS value, this field is zero.
Note A special case exists in which the TCP/IP stack in the PC has been modified to send all
packets with a ToS value other than zero. Typically, this does not happen, and the ToS
value is zero.
Even if the PC is sending tagged frames with a specific CoS value, Cisco IP phones can zero
out this value before sending the frames to the switch. This is the default behavior. Voice
frames coming from the IP phone have a CoS of 5 and data frames coming from the PC have a
CoS of 0. If the DSCP is set, then the IP phone cannot re-mark the DSCP.
If the end device is not a trusted device, the reclassification function (setting or zeroing the bits
in the CoS and ToS fields) can be performed by the access layer switch, if that device is
capable of doing so. If the device is not capable, then the reclassification task falls to the
distribution layer device. If reclassification cannot be performed at one of these two layers (the
access layer or the distribution layer), a hardware or Cisco IOS Software upgrade, or both, may
be necessary.
4-26 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 19
Summary
Packet classification is a QoS mechanism responsible for
distinguishing between different traffic streams.
Packet marking is a QoS mechanism that colors a packet so it
can be distinguished from other packets during the application of
QoS.
Packets can be classified and marked at the data-link layer using
several different mechanisms, including: 802.1Q, ISL, MPLS
experimental bits, the Frame Relay DE bit, and the ATM CLP bit.
Packets can be classified and marked at the network layer using
IP precedence and DSCP.
The ability to map network-layer QoS to link-layer CoS allows
service providers to offer a complete end-to-end QoS solution that
does not depend on any specific link-layer technology.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 20
Summary (Cont.)
A QoS service class is a logical grouping of packets that, as
specified in an administrative policy, are to receive a similar level
of applied quality.
An administrative policy for QoS requires that a specific set of
service classes be defined. QoS mechanisms are uniformly
applied to these individual service classes to meet the
requirements of the administrative policy.
It is important that a trust boundary be specified allowing
classification and marking as close to the source as possible.


Lesson 2
Using MQC for Classification
Overview
The application of quality of service (QoS) requires that traffic be separated into service classes
upon which you apply different levels of service. Separating traffic into different service
classes requires QoS classification mechanisms. The Modular QoS CLI, or MQC, is one such
mechanism for classifying network traffic. This lesson describes the packet classification
features of the MQC, including input interface, access control lists (ACLs), class of service
(CoS), IP precedence, and differentiated services code point (DSCP). The lesson also describes
how you can configure MQC class maps to classify network traffic.
Objectives
Upon completing this lesson, you will be able to use MQC commands to classify packets. This
ability includes being able to meet these objectives:
Describe the different IP packet classification options in the MQC
Identify the Cisco IOS commands used to configure classification of packets with MQC
Identify the Cisco IOS commands used to monitor classification with MQC
4-28 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
MQC Classification Options
This topic describes the different IP packet classification options available in MQC.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-2
MQC Classification Options
Classification options configured in a class map
Requires a referring policy map to be useful
MQC classification options include the following:
Access list
IP precedence value
IP DSCP value
QoS group number
MPLS experimental bits
Protocol (including NBAR)
Using another class map
Frame Relay DE bit
IEEE 802.1Q/ISL
CoS/Priority values
Input interface
Source MAC address
Destination MAC address
RTP (UDP) port range
Any packet

Classification using MQC is accomplished by specifying a traffic match criteria within a
configured class map for each different service class. In order for QoS mechanisms to use the
class map, the map must be referenced through the use of a policy map, which is subsequently
applied to an inbound or outbound interface as a service policy.
In older Cisco IOS Software releases, the router classified a packet against every individual
QoS feature. This resulted in additional processing overhead, inaccurate packet counters, and
double accounting issues. Common classification is a feature that was introduced in Cisco IOS
Software Release 12.2, and is enabled by default whenever classification is invoked within a
policy map. With common classification, a packet is classified only once per service policy and
matches a single class in the policy. Because matching terminates at the first matching class, it
is important to ensure that the classes are configured in the right sequence within a policy. After
a packet is classified against a particular class, that packet is subjected to all the QoS features
configured within that class.
MQC classification with class maps is extremely flexible and can classify packets by using
these classification tools:
ACLs: ACLs for any protocol can be used within the class map configuration mode. The
MQC can be used for other protocols, not only IP.
IP precedence: IP packets can be classified directly by specifying IP precedence values.
DSCP: IP packets can be classified directly by specifying IP DSCP values. DiffServ-
enabled networks can have up to 64 classes if DSCP is used to mark packets.
MPLS experimental bits: Packets can be matched based on the value in the experimental
bits of the MPLS header of labeled packets.
2009 Cisco Systems, Inc. Classification and Marking 4-29
QoS group: A QoS group parameter can be used to classify packets in situations where up
to 100 classes are needed or the QoS group parameter is used as an intermediate marker;
for example, MPLS-to-QoS-group translation on input and QoS-group-to-DSCP translation
on output. QoS group markings are local to a single router.
Protocol: Classification is possible by identifying Layer 3 or Layer 4 protocols. Advanced
classification is also available by using the Network-Based Application Recognition
(NBAR) tool, which identifies dynamic protocols by inspecting higher-layer information.
Class map hierarchy: Another class map can be used to implement template-based
configurations.
Frame Relay DE bit: Packets can be matched based on the value of the underlying Frame
Relay DE bit.
CoS: Packets can be matched based on the information contained in the three CoS bits
(when using IEEE 802.1Q encapsulation) or priority bits (when using the Inter-Switch Link
[ISL] encapsulation).
Input interface: Packets can be classified based on the interface from which they enter the
Cisco IOS device.
MAC address: Packets can be matched based on their source or destination MAC
addresses.
User Datagram Protocol (UDP) port range: Real-Time Transport Protocol (RTP)
packets can be matched based on a range of UDP port numbers.
All packets: MQC can also be used to implement a QoS mechanism for all traffic in which
case classification will put all packets into one class.
In Cisco IOS Software Release 12.4, packets can also be classified based on the following
criteria:
Datagram header (Layer 2 ) or network header (Layer 3): You can use the match start
command to configure the match criteria for a class map on the basis of the datagram
header (Layer 2 ) or the network header (Layer 3).
Discard Class: You can use the match discard-class command to match packets of a
certain discard class. A discard-class value has no mathematical significance. The value
simply indicates that a packet marked with discard-class 2 should be treated differently
than a packet marked with discard-class 1.
Field: You can use the match field command to configure the match criteria for a class
map on the basis of the fields defined in protocol header description files (PHDFs). Before
configuring this match criterion, you must load a PHDF onto the router.
Frame Relay data-link connection identifier (DLCI): You can use the match fr-dlci
command to specify the Frame Relay DLCI number as a match criterion in a class map.
This match criterion can be used in main interfaces and point-to-multipoint subinterfaces in
Frame Relay networks. It can also be used in hierarchical policy maps.
MPLS experimental (EXP) value in the topmost label header: You can use the match
mpls experimental topmost command to match the MPLS EXP value in the topmost
label. You can use this match criterion on the input interfaces and the output interfaces. It
will match only on MPLS packets.
Packet length: You can use the match packet length command to specify the Layer 3
packet length in the IP header as a match criterion in a class map.
4-30 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Port type: You can use the match port-type command to match traffic on the basis of the
port type for a class map.
Tag: You can use the match tag command to specify tag type as a match criterion.
Note As of Cisco IOS Software Release 12.2(31)SB2, you can classify traffic on the basis of a
VLAN identification number on Cisco 10000 Series routers.
2009 Cisco Systems, Inc. Classification and Marking 4-31
Configuring Classification with MQC
This topic describes the Cisco IOS commands used to configure classification of packets with
MQC.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-3
Configuring Classification with MQC
Enters the class map configuration mode.
Names can be a maximum of 40 alphanumeric characters.
Match all is the default matching strategy.
Use at least one condition to match packets.
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.


You can use the class-map global configuration command to create a class map and enter the
class map configuration mode. A class map is identified by a case-sensitive name; therefore, all
subsequent references to the class map must use exactly the same name.
You can use the match command to specify the classification criteria when in class map
configuration mode. You can use multiple match commands within a class map. At least one
match command should be used within the class map configuration mode. The default is
match none.
You can also nest class maps in MQC configurations by using the match class-map command
within the class map configuration. By nesting class maps, the creation of generic classification
templates and more sophisticated classifications are possible.
The syntax for the class-map command is as follows:

4-32 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description


(Optional) Determines how packets are evaluated when multiple
match criteria exist. Packets must either meet all of the match
criteria (match-all) or one of the match criteria (match-any) to be
considered a member of the class. The default is match-all.
Name of the class for the class map. The name can be a
maximum of 40 alphanumeric characters. The class name is
used for both the class map and to configure policy for the class
in the policy map.
Note The command syntax shown in the figure is compatible with Cisco IOS Software Release
12.4.
2009 Cisco Systems, Inc. Classification and Marking 4-33
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-4
Configuring Classification
with MQC (Cont.)
The not keyword inverts the condition.
The any keyword can be used to match all packets.




These are additional options that give extra power to class maps:
Any condition can be negated by inserting the keyword not.
A class map can use another class map to match packets.
The any keyword can be used to match all packets.
The example in the figure shows these three class maps:
Class map Well-known-services uses an ACL to match all the packets with the source or
destination port number lower than 1024.
Class map Unknown-services uses the first class map but negates the result. The same
could be achieved by using the same ACL with a negation.
Class map All-services actually matches all the packets.
The syntax for the match not command is as follows:
match not match-criteria
Syntax Description
Parameter Description
(Required) Specifies the match-criterion value that is an
unsuccessful match criterion. All other values of the specified
match criteria will be considered successful match criteria.
Note The command syntax shown in the figure is compatible with Cisco IOS Software Release
12.4.
4-34 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-5
Configuring Classification Using
Input Interface
All packets received through the selected input interface are
matched by this class map.







As shown in the example in the figure, a packet can also be classified based on the input
interface. In the first class-map example, called Ethernets, the match input-interface will
match any packet that arrives on either the E0/0 or E0/1 interfaces.
In the second class map, FastEthernets, any packet arriving on either the FastEthernet 1/0 or
FastEthernet 1/1 interface will be matched.
And in the last class map example, Serials, incoming packets arriving on any of S2/0, S2/1,
S2/2, or S2/3 interfaces will be matched.
The syntax for the match input-interface command is as follows:
match input-interface interface-name
Syntax Description
Parameter Description
Name of the input interface to be used as match criteria
Note The syntax shown in the figure for the match input-interface command is the same as the
syntax for the match input-interface command in Cisco IOS Software Release 12.4.
2009 Cisco Systems, Inc. Classification and Marking 4-35
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-6
Configuring Classification Using CoS
Select up to four CoS or priority values.
Allowed values are 0 to 7.
This classification option can only be used on interfaces using
802.1Q or ISL encapsulation.




Routers can also match the three CoS bits in 802.1Q headers or priority bits in the ISL header.
These bits can be used in a LAN-switched environment to provide differentiated quality of
service.
This is demonstrated in the example. In the first class map, Strict-priority, packets will be
matched if they have a CoS value of 5.
In the second class map example, High-priority, packets will be matched if they have a CoS
value of 4, 6, or 7.
And in the last class map example, Low-priority, packets will be matched if they have a CoS
value of 0, 1, 2, or 3.
match cos cos-value [cos-value cos-value cos-value]
Syntax Description
Parameter Description
(Optional) Specific IEEE 802.1Q/ISL CoS value. The cos-value is
from 0 to 7; up to four CoS values can be specified in one match
cos statement.
Note The command syntax shown in the figure is compatible with Cisco IOS Software Release
12.4.
4-36 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-7
Configuring Classification Using
Access Lists
Access lists are the oldest classification tool used with QoS
mechanisms.
Class maps support all types of access lists.
Class maps are multiprotocol.
Class maps can use named access lists and numbered access
lists (in the range from 1 to 2699) for all protocols.

ACLs were originally used for filtering of inbound or outbound packets on interfaces. They
were later reused for filtering of routing updates and also for classification with early QoS
tools, such as priority queuing (PQ), custom queuing (CQ), and traffic shaping.
ACLs are still one of the most powerful classification tools. Class maps can use any type of
ACL (not only IP ACLs).
ACLs have a drawback: Compared to other classification tools, they are one of the most CPU-
intensive. For this reason, ACLs should not be used for classification on high-speed links where
they could severely impact performance of routers. ACLs are typically used on low-speed links
at network edges, where packets are classified and marked (for example, with IP precedence).
Classification in the core is done based on the IP precedence value.
However, ACLs may be efficiently used for classification purposes on Cisco Catalyst switches,
because all classification operations (with the exception of NBAR classification on Cisco
Catalyst 6500 Series) on Cisco Catalyst switches are performed in hardware, without any
incremental CPU load.
2009 Cisco Systems, Inc. Classification and Marking 4-37
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-8
Configuring Classification Using Access
Lists (Cont.)
Select an access list to be used for classification.







Use the match access-group command to attach an ACL to a class map.
The example in the figure shows how a numbered or named ACL can be used for classification.
In the first example, class-map Telnet, packets will match according to those allowed by the
access-group 100. When exploring what will be allowed, ACL 100 will permit port 23.
In the second example, packets will be allowed if they match according to those allowed by the
ACL IPX_Printers.
match access-group {number | name} [name]
Syntax Description
Parameter Description
A numbered ACL whose contents are used as the match criteria
against which packets are checked to determine if they belong to
this class
A named ACL whose contents are used as the match criteria
against which packets are checked to determine if they belong to
this class
4-38 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-9
Configuring Classification Using
IP Precedence
Select up to four IP precedence values or names.
All packets marked with one of the selected IP precedence values
are matched by this class map.




A much faster method of classification is by matching the IP precedence. Up to four separate IP
precedence values or names can be used to classify packets based on the IP Precedence field in
the IP header on a single match-statement line.
The figure contains a mapping between IP precedence values and names. The running
configuration, however, only shows IP precedence values (not names).
The syntax for the match ip precedence command is as follows:
match ip precedence ip-prec-value [ip-prec [ip-prec [ip-prec]]]
Note This command has been simplified to match precedence as of Cisco IOS Software
Release 12.2[13]T. Inserting ip between match and precedence is optional as of this
release and specifies that the match is only against IPv4 packets (if ip is omitted, the match
will be against both IPv4 and IPv6 packets).
Syntax Description
Parameter Description
Specifies the exact value from 0 to 7 used to identify an IP
precedence value.
Note The command syntax shown in the figure is compatible with Cisco IOS Software Release
12.4.
2009 Cisco Systems, Inc. Classification and Marking 4-39
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 10
Configuring Classification Using DSCP
Select up to eight DSCP values or names.
All packets marked with one of the selected DSCP values are
matched by this class map.


IP packets can also be classified based on the IP DSCP field. A QoS design can be based on IP
precedence marking or DSCP marking. DSCP standards make IP precedence marking obsolete
but include backward compatibility with IP precedence by using the Class Selector (CS) values
(which are 6-bit equivalents to their IP precedence counterparts and are obtained by setting the
three most significant bits of the DSCP to the IP precedence value, while holding the three least
significant bits to zero).
The syntax for the match [ip] dscp command is as follows:
match [ip] dscp ip-dscp-value [ip-dscp-value ...]
Syntax Description
Parameter Description
(Optional) Specifies that the match is for IPv4 packets only. If not
used, the match is on both IPv4 and IPv6 packets.
Specifies the exact value from 0 to 63 used to identify an IP
DSCP value.
Note The command syntax shown in the figure is compatible with Cisco IOS Software Release
12.4.
4-40 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 11
Configuring Classification Using
DSCP (Cont.)




The figure illustrates implementation of a design with these five classes:
Voice: Identified by DSCP value EF, which looks like IP precedence value 5 in non-
DSCP-compliant devices.
Mission-Critical: Identified by DSCP values AF31, AF32, and AF33. The class is also
identified by IP precedence 3.
Transactional: Identified by DSCP values AF21, AF22, and AF23. The class is also
identified by IP precedence 2.
Bulk: Identified by DSCP values AF11, AF12, and AF13. The class is also identified by IP
precedence 1.
Best-effort: Identified by the default DSCP value that is equal to the default IP precedence
value (0).
From a non-DSCP-compliant device, the design looks slightly different:
Voice: IP precedence 5
Mission-Critical: IP precedence 3
Transactional: IP precedence 2
Bulk: IP precedence 1
Best-effort: IP precedence 0
2009 Cisco Systems, Inc. Classification and Marking 4-41
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 12
Configuring Classification Using a UDP
Port Range
Use this command to implement classification equal to IP RTP
Priority.
All UDP packets with source or destination port numbers within
the specified range are matched.
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).
The command should be used in combination with class-based
low-latency queuing to implement RTP Priority using MQC.




IP RTP Priority was introduced to provide low latency queuing (LLQ) in combination with
weighted fair queuing (WFQ). The match ip rtp command can be used to match packets in the
same way as with IP RTP Priority. The command should also be combined with LLQ to
generate a similar result as IP RTP Priority.
The syntax for the match ip rtp command is as follows:
match ip rtp starting-port-number port-range
Syntax Description
Parameter Description
The starting RTP port number. Values range from 2000 to 65535.
The RTP port number range. Values range from 0 to 16383.
Note The syntax shown in the figure for the match ip rtp command is the same as the syntax for
the match ip rtp command in Cisco IOS Software Release 12.4.
4-42 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 13
Configuring IPv6 Classification via the
MQC
For IPv6, the MQC allows you to classify packets based on:
Precedence: Requires the match precedence command without the ip
keyword; to match IPv6 packets only, also requires the match protocol ipv6
command
DSCP: Requires the match dscp command without the ip keyword; to match
IPv6 packets only, also requires the match protocol ipv6 command
IPv6 access group values in IPv6 packets: Requires the match access-group
name command (followed by the name of an IPv6 access group)












To implement QoS in networks running IPv6, follow the same steps that you would follow to
implement QoS in networks running only IPv4.
Classification in IPv6 can be based on IPv6 precedence, DSCP, and other IPv6 protocol-
specific values that can be specified in IPv6 access lists. Classification can also be based on
non-IPv6 protocol-specific values such as CoS, packet length, and QoS group. The MQC
allows you to create matches on precedence, DSCP, and IPv6 access group values in IPv6
packets.
Except for the following special considerations, the functionality of all of the match commands
is the same for IPv4 and IPv6:
Usage of match dscp command: The ip keyword specifies that the match is for IPv4
packets only. If the ip keyword is not used, the match is on both IPv4 and IPv6 packets. To
match DSCP values for IPv6 packets only, the match protocol ipv6 command must also
be used.
Usage of match precedence command: The ip keyword specifies that the match is for IPv4
packets only. If the ip keyword is not used, the match is on both IPv4 and IPv6 packets. To
match IP precedence values for IPv6 packets only, the match protocol ipv6 command
must also be used.
Usage of match access-group command: To specify the name of an IPv6 access list against
whose contents packets are checked to determine if they belong to the traffic class, use the
match access-group name command in class-map configuration mode. The name
keyword must be used and must be followed by the name of an IPv6 access group.
Note The Cisco 10000 Series Router supports DSCP matching of IPv4 packets only. You must
include the ip keyword when specifying the DSCP values to use as match criterion.
2009 Cisco Systems, Inc. Classification and Marking 4-43
Packet classification is available with both process and Cisco Express Forwarding switching
paths. However, the match cos command for 802.1Q interfaces is supported only for Cisco
Express Forwarding switched packets. Process-switched packets, such as router-generated
packets, are not marked when this option is used.
4-44 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Monitoring Class Maps
This topic describes the Cisco IOS commands that are used to monitor classification with
MQC.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 14
Monitoring Class Maps
Displays all class maps and their matching criteria












The show class-map command lists all class maps with their match statements. This command
can be issued from the EXEC or privileged EXEC mode. The show class-map command with
a name of a class map displays the configuration of the selected class map.
In the figure, the show class map Cisco IOS command shows all the class maps that have been
configured and what match statements are contained in the maps. The first class map listed is
the default class map. The default class map contains only a single match statement, match-
any. The second class map listed, Well-known-services, has one match statement that will
compare packets against the configured access-group 100. The third class map displayed, All-
services, contains two match statements that compare packets against two other configured
class maps, Well-known-services and Unknown-services.
show class-map [class-map-name]
Syntax Description
Parameter Description
(Optional) Name of the class map.
Note The command syntax shown in the figure is compatible with Cisco IOS Software Release
12.4.
2009 Cisco Systems, Inc. Classification and Marking 4-45
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 15
Summary
MQC classification options include: access list, IP precedence
value, IP DSCP value, QoS group number, MPLS experimental
bits, protocol (including NBAR), using another class map, Frame
Relay DE bit, IEEE 802.1Q/ISL CoS/Priority values, input
interface, source MAC address, destination MAC address, RTP
(UDP) port range, and any packet.
The MQC uses class maps to specify match criteria, allowing
classification of traffic for QoS treatment.
Class maps are monitored by using the show class-map
command.

4-46 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 3
Using MQC for Class-Based
Marking
Overview
The process of packet classification is both complex and CPU-intensive. You should classify
packets as close to the source as possibleat the edges of the network. Performing
classification in the core is not recommended because it would add delay in transiting the core.
To provide different levels of treatment to service classes, you must identify traffic as
belonging to a specific class. Instead of classifying traffic at each hop in the network as the
packet traverses the network to its ultimate destination, QoS marking mechanisms are used.
Marking allows you to set specific fields in a frame or packet that identify that frame or packet
as belonging to a specific service class. The Modular quality of service (QoS) command-line
interface (CLI), or MQC, provides one such mechanism for marking network traffic. This
lesson describes the class-based marking capability of the Cisco IOS MQC and how policy
maps can be configured to mark network traffic. MQC marking features covered in this lesson
include class of service (CoS), IP precedence, and differentiated services code point (DSCP).
Objectives
Upon completing this lesson, you will be able to use class-based marking to assign packets to a
specific service class. This ability includes being able to meet these objectives:
Describe the MQC class-based marking system
Describe the different IP packet-marking options available in class-based marking
Identify the Cisco IOS commands required to configure class-based marking
Identify the Cisco IOS commands used to monitor class-based marking
4-48 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Class-Based Marking Overview
This topic describes the MQC class-based marking mechanism.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-2
Class-Based Marking Overview
Class-based marking is an additional tool available with the MQC
that allows static per-class marking of packets.
It can be used to mark inbound or outbound packets.
It can be combined with any other QoS feature on output.
It can be combined with class-based policing on input.
Cisco Express Forwarding must be configured on the interface
before the class-based packet marking feature can be used.

Marking packets or frames sets information in the Layer 2 and Layer 3 headers of a packet so
that the packet or frame can be identified and distinguished from other packets or frames.
MQC provides packet-marking capabilities using class-based marking. MQC is the most
flexible Cisco IOS marking tool, extending the marking functionality of committed access rate
(CAR) and policy routing.
You can use class-based marking on input or output of interfaces as part of a defined input or
output service policy. On input, you can combine class-based marking with class-based
policing, and on output, with any other class-based weighted fair queuing (CBWFQ) QoS
feature.
2009 Cisco Systems, Inc. Classification and Marking 4-49
MQC Marking Options
This topic describes the different IP packet and frame marking options that are available in
class-based marking.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-3
MQC Marking Options
Packets can be marked with one of these:
IP precedence
IP DSCP
QoS group
MPLS experimental bits
IEEE 802.1Q or ISL CoS/priority bits
Frame Relay DE bit
ATM CLP bit

Class-based marking supports these markers:
IP precedence
IP DSCP value
QoS group
Multiprotocol Label Switching (MPLS) experimental bits
IEEE 802.1Q or Inter-Switch Link (ISL) CoS or priority bits
Frame Relay discard eligible (DE) bit
ATM cell loss priority (CLP) bit
Note A QoS group is an internal label used by a switch to identify packets as members of a
specific class. The label is not part of the packet header and is restricted to the switch that
sets the label. QoS groups provide a way to tag a packet for subsequent QoS action without
explicitly marking (changing) the packet. You can then communicate an ACL match from an
input policy map to an output policy map.
In Cisco IOS Software Release 12.4, class-based marking also supports these markers:
Discard-class value
MPLS EXP field value in the topmost label on either an input or an output interface
ToS bits in the header of an IP packet
4-50 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
You can combine class-based marking with other mechanisms available in the MQC.
2009 Cisco Systems, Inc. Classification and Marking 4-51
Configuring Class-Based Marking
This topic describes the Cisco IOS commands that are required to configure class-based
marking.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-4
Configuring Class-Based Marking
1. Create class map: A traffic class (match access list, input
interface, IP precedence, DSCP, protocol [NBAR] src/dst MAC
address).
2. Create policy map (service policy): Associate a class map with
one or more QoS marking policies.
3. Attach service policy: Associate the policy map to an input or
output interface.


When configuring class-based marking, you must complete these three configuration steps:
Step 1 Create a class map.
Step 2 Create a policy map.
Step 3 Attach the policy map to an interface by using the service-policy Cisco IOS
command.
The syntax for the class-map command is as follows:

Syntax Description
Parameter Description
Name of the class for the class map. The class name is used for
both the class map and to configure policy for the class in the
policy map.
Determines how packets are evaluated when multiple match
criteria exist. Packets must either meet all of the match criteria
(match-all) or one of the match criteria (match-any) to be
considered a member of the class.
The syntax for the policy-map command is as follows:

4-52 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
Name of the policy map
The syntax for the service-policy command is as follows:

Syntax Description
Parameter Description
Specifies the name of the predefined policy map to be used as a
QoS policy. The name can be a maximum of 40 alphanumeric
characters.
Note The command syntax shown in the figure is compatible with Cisco IOS Software Release
12.4.
2009 Cisco Systems, Inc. Classification and Marking 4-53
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-5
Configuring Class-Based Marking (Cont.)




In the figure, two class maps have been configured, Well-known-services and Unknown-
services. The match criteria is specified in access-list 100.
The policy map, set-DSCP, has been created to associate with the class maps, Well-known-
services and Unknown-services.
For packets allowed by class map Well-known-services, the IP DSCP value will be set to
AF21. The matching class map, Unknown-services, will have the IP DSCP value set to 0.
The policy map is attached to E0/0 for incoming packets by the service-policy command.
4-54 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-6
Configuring CoS Marking
Mark frames with the specified value (0 to 7).
The value applies to the CoS bits with the IEEE 802.1Q
encapsulation or priority bits with the ISL encapsulation.
The command can only be used on LAN interfaces that use one
of the two mentioned encapsulations.









The IEEE 802.1p specification specifies a standard for delivering QoS in LANs. Packets are
marked with three CoS bits, with values ranging from zero for low priority to seven for high
priority. CoS can only be applied on trunks because VLAN trunking encapsulations designate
fields with available space to carry CoS bits. There are currently two widely deployed trunking
protocols that can transport CoS markings, as follows:
ISL frame headers: ISL frame headers have a 1-byte user field that carries the CoS value
in the three least significant bits.
IEEE 802.1p and 802.1Q frame headers: IEEE 802.1p and 802.1Q frame headers have a
2-byte Tag Control Information (TCI) field that carries the CoS value in the three most
significant bits, called the user priority bits.
Note Other (untagged) Ethernet frame types cannot carry CoS values.
In general, legacy Layer 2 switches can examine, use, or alter MAC layer markings (but not IP
precedence or DSCP settings), because IP precedence and DSCP are Layer 3. Layer 2 markings
are generally applied on egress trunk ports.
The syntax for the set cos command is as follows:
set cos cos-value
Syntax Description
Parameter Description
Specific IEEE 802.1Q CoS value from 0 to 7

2009 Cisco Systems, Inc. Classification and Marking 4-55
The syntax for the set cos command in Cisco IOS Software Release 12.4 is as follows:

Syntax Description
Parameter Description
Specific IEEE 802.1Q CoS value from 0 to 7.
Specific packet-marking category to be used to set the CoS value
of the packet. If you are using a table map for mapping and
converting packet-marking values, this establishes the "map
from" packet-marking category. Packet-marking category
keywords are as follows:
precedence
dscp
(Optional) Indicates that the values set in a specified table map
will be used to set the CoS value.
(Optional) Name of the table map used to specify the CoS value.
The table map name can be a maximum of 64 alphanumeric
characters.

Note In addition to using individual set commands for specifying and marking traffic attributes,
you can specify and mark the traffic attribute by creating a mapping table (called a "table
map"). With this method, you configure the traffic attributes that you want to mark once in a
table map and then the markings can be propagated throughout the network. For more
information on the table map method, refer to Cisco IOS Quality of Service Solutions
Configuration Guide, Release 12.4, at http://www.cisco.com.
4-56 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-7
Configuring IP Precedence Marking
Mark IP packets with the specified IP precedence value.
IP precedence can be set using a value (0 to 7) or a
corresponding name (for example, routine, priority, immediate).









IP precedence is encoded into the three high-order bits of the type of service (ToS) field in the
IP header. It supports eight classes, two of which (IP precedence 6 and 7) are reserved for
control-plane traffic and should not be used for user-defined classes. IP precedence 0 is the
default value and is usually used for the best-effort class.
To set the precedence value in the IP header, use the set ip precedence QoS policy-map
configuration command. To leave the precedence value at the current setting, use the no form
of this command.
The syntax for the set ip precedence command is as follows:
set ip precedence ip-precedence-value
Syntax Description
Parameter Description
A number from 0 to 7 that sets the precedence bit in the IP
header
In Cisco IOS Software Release 12.4, use the set precedence command to set the precedence
value in the packet header. The syntax for the set precedence command is as follows:
precedence-value from-field table-map-name
Syntax Description
2009 Cisco Systems, Inc. Classification and Marking 4-57
Parameter Description
A number from 0 to 7 that sets the precedence bit in the packet
header.
Specific packet-marking category to be used to set the
precedence value of the packet. If you are using a table map for
mapping and converting packet-marking values, this argument
value establishes the "map from" packet-marking category.
Packet-marking category keywords are as follows:
cos
qos-group
(Optional) Indicates that the values set in a specified table map
will be used to set the precedence value.
(Optional) Name of the table map used to specify a precedence
value based on the CoS value. The name can be a maximum of
64 alphanumeric characters.

To set the precedence values for IPv4 packets only, include the match protocol ip command
along with the other commands in the class map. Without the match protocol ip command, the
class map may match both IPv6 and IPv4 packets (depending on the other match criteria) and
the set precedence command may act upon both types of packets.
4-58 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-8
Configuring IP DSCP Marking
Mark IP packets with the specified DSCP value.
DSCP can be set using a value (0 to 63) or a corresponding name
(for example, af11, af12, af13, af21, ef, cs1, default).









Differentiated Services (DiffServ) is a standards-based Layer 3 marking model that
supersedesand is backward compatible withIP precedence. DiffServ uses six prioritization
bits that permit classification of up to 64 values (0 to 63). A DiffServ value is called a DSCP.
The set ip dscp command is used to mark packets of a class with a DSCP value.
To mark a packet by setting the IP DSCP in the ToS byte, use the set ip dscp QoS policy-map
configuration command. To remove a previously set IP DSCP, use the no form of this
command.
The syntax for the set [ip] dscp command is as follows:

Syntax Description
Parameter Description
A number from 0 to 63 that sets the IP DSCP value. Reserved
keywords EF (Expedited Forwarding), AF11 (Assured Forwarding
Class 1 Drop Preference 1), AF12 (Assured Forwarding Class 1
Drop Preference 2), and so on can be specified instead of
numeric values.
The syntax for this command in Cisco IOS Software Release 12.4 is as follows:

2009 Cisco Systems, Inc. Classification and Marking 4-59
Syntax Description
Parameter Description
(Optional) Specifies that the match is for IPv4 packets only. If
not used, the match is on both IPv4 and IPv6 packets.
A number from 0 to 63 that sets the DSCP value. The following
keywords are examples of reserved keywords can be specified
instead of numeric values:
EF (expedited forwarding)
AF11 (assured forwarding class AF11)
AF12 (assured forwarding class AF12)
Specific packet-marking category to be used to set the DSCP
value of the packet. If you are using a table map for mapping and
converting packet-marking values, this establishes the "map
from" packet-marking category. Packet-marking category
keywords are as follows:
cos
qos-group
(Optional) Used in conjunction with the from-field argument.
Indicates that the values set in a specified table map will be used
to set the DSCP value.
table-map-name

(Optional) Used in conjunction with the table keyword. Name of
the table map used to specify the DSCP value. The name can be
a maximum of 64 alphanumeric characters.
4-60 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-9
Class-Based Packet Marking in IPv6
Networks
You can create policies to mark packets by DSCP or precedence.
Use the set dscp or set precedence command in a policy map to
configure packet marking.
Use the set dscp command without the ip keyword.
To set DSCP or precedence values for IPv6 packets only, use
the match protocol ipv6 command in the class-map that
classifies packets for this action.

For IPv6 networks, you can create policies to mark packets by DSCP or precedence. Use the
set dscp or set precedence command in a policy map to configure packet marking.
To use the set dscp command for packet marking in an IPv6 network, use the command
without the ip keyword. Use of the ip keyword specifies that the match is for IPv4 packets
only. To set the DSCP values for IPv6 packets only, the match protocol ipv6 command must
also be used in the class map that classified packets for this action.
When the set precedence command is used in IPv6 environments, it can set the value in both
IPv4 and IPv6 packets. However, the actual packets set by this function are only those that
meet the match criteria of the class map containing this function. To set the precedence values
for IPv6 packets only, the match protocol ipv6 command must also be used in the class map
that classified packets for this action. Without the match protocol ipv6 command, the class
map may classify both IPv6 and IPv4 packets, (depending on other match criteria) and the set
precedence command will act upon both types of packets.
Note Cisco IOS set commands can vary by release. For more information, see the command
documentation for the Cisco IOS Software release that you are using.
2009 Cisco Systems, Inc. Classification and Marking 4-61
Monitoring Class-Based Marking
This topic describes the Cisco IOS commands that are used to monitor class-based marking.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 10
Monitoring Class-Based Marking
Displays the configuration of all classes for a specified service
policy map or all classes for all existing policy maps.


















The show policy-map command displays all classes for the service policy specified in the
command line.
To display the configuration of all classes for a specified service policy map or all classes for
all existing policy maps, use the show policy-map EXEC or privileged EXEC command.
The syntax for the show policy-map command is as follows:

Syntax Description
Parameter Description
(Optional) The name of the service policy map whose complete
configuration is to be displayed
The syntax shown in the figure for the show policy-map command is the same as the syntax
for the show policy-map command in Cisco IOS Software Release 12.4.
4-62 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 11
Monitoring Class-Based Marking (Cont.)
Displays the configuration of all classes configured for all service
policies on the specified interface.


The show policy-map interface command displays all service policies applied to the interface.
In addition to the settings, marking parameters and statistics are displayed.
To display the configuration of all classes configured for all service policies on the specified
interface or to display the classes for the service policy for a specific permanent virtual circuit
(PVC) on the interface, use the show policy-map interface EXEC or privileged EXEC
command.
The syntax for the show policy-map interface command is as follows:


Syntax Description
Parameter Description
Name of the interface or subinterface whose policy configuration
is to be displayed.
(Optional) ATM network virtual path identifier (VPI) for this PVC.
The absence of the / and a vpi value defaults the vpi value to 0.
On the Cisco 7200 and 7500 Series Routers, this value ranges
from 0 to 255.
The vpi and vci arguments cannot both be set to 0; if one is 0, the
other cannot be 0.
If this value is omitted, information for all virtual circuits (VCs) on
the specified ATM interface or subinterface is displayed.
2009 Cisco Systems, Inc. Classification and Marking 4-63
Parameter Description
(Optional) ATM network virtual channel identifier (VCI) for this
PVC. This value ranges from 0 to one less than the maximum
value set for this interface by the atm vc-per-vp command.
Typically, lower values 0 to 31 are reserved for specific traffic
(Operation, Administration, and Maintenance [OAM]; switched
virtual circuit [SVC] signaling, Integrated Local Management
Interface [ILMI], and so on) and should not be used.
The VCI is a 16-bit field in the header of the ATM cell. The VCI
value is unique only on a single link, not throughout the ATM
network, because it has local significance only.
The vpi and vci arguments cannot both be set to 0; if one is 0, the
other cannot be 0.
(Optional) Indicates a specific PVC for which policy configuration
will be displayed.
(Optional) A specific data-link connection identifier (DLCI) number
used on the interface. Policy configuration for the corresponding
PVC will be displayed when a DLCI is specified.
(Optional) Indicates that the statistics for the attached input policy
will be displayed.
(Optional) Indicates that the statistics for the attached output
policy will be displayed.
The syntax shown in the figure for the show policy-map interface command is compatible
with the syntax for the show policy-map interface command in Cisco IOS Software Release
12.4.
Note Syntax for commands documented in this lesson may vary by platform and software version.
For more information on command syntax for your Cisco IOS Software release and router
platform, refer to the Cisco IOS Master Command List, Release 12.4, at
http://www.cisco.com.
4-64 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 12
Summary
Class-based marking, which requires that Cisco Express
Forwarding be enabled, can mark inbound or outbound packets.
IP packet-marking options available in class-based marking
include IP precedence, IP DSCP, QoS group, Layer 2 CoS value,
and MPLS experimental bits.
Class-based marking requires three configuration steps: class
map, policy map, service policy; use the set cos, set ip
precedence, and set ip dscp commands to set (mark) Layer 2
CoS, precedence, and DSCP values, respectively.
Use the show policy-map and show policy-map interface
commands to monitor class-based marking.


Lesson 4
Using NBAR for Classification
Overview
Network-Based Application Recognition (NBAR), a feature in Cisco IOS Software, provides
intelligent classification for the network infrastructure. NBAR is a classification engine that can
recognize a wide variety of protocols and applications, including web-based applications and
client and server applications that dynamically assign TCP or User Datagram Protocol (UDP)
port numbers. After the protocol or application is recognized, the network can invoke specific
services for that particular protocol or application. NBAR currently works with quality of
service (QoS) features to ensure that the network bandwidth is best used to fulfill company
objectives. These features include the ability to guarantee bandwidth to critical applications,
limit bandwidth to other applications, drop selected packets to avoid congestion, and mark
packets appropriately so that the network and the service provider network can provide QoS
from end to end.
This lesson describes NBAR, including applications that NBAR can support, Packet
Description Language Modules (PDLMs), and NBAR Protocol Discovery.
Objectives
Upon completing this lesson, you will be able to use NBAR to discover network protocols and
to classify packets. This ability includes being able to meet these objectives:
Describe the Cisco IOS protocol discovery and classification mechanism known as NBAR
Identify the types of applications supported by NBAR
Explain the purpose of PDLMs in NBAR
Explain how custom protocols can be used to extend the set of protocols recognized by
NBAR
Describe NBAR Protocol Discovery and the Cisco NBAR Protocol Discovery MIB
Identify the Cisco IOS commands required to configure and monitor NBAR
4-66 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Network-Based Application Recognition
This topic describes NBAR, a Cisco IOS protocol discovery and classification mechanism.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-2
Network-Based
Application Recognition
NBAR solves the problem of how to classify modern client/server
and web-based applications.
NBAR performs the following functions:
Identification of applications and protocols
(Layer 4 to Layer 7)
Protocol discovery
Provides traffic statistics
NBAR enables downstream actions based on QoS policies via
class-based queuing, policing, and shaping by selecting traffic
which can then be marked to trigger downstream per-hop
behaviors.
New applications are easily supported by loading PDLM.

NBAR is a classification engine that recognizes and classifies a wide variety of protocols and
applications, including web-based and other difficult-to-classify applications and protocols that
use dynamic TCP/UDP port assignments.
When NBAR recognizes and classifies a protocol or application, the network can be configured
to apply the appropriate QoS for that application or traffic with that protocol. The QoS is
applied using the Modular QoS CLI, or MQC.
Examples of the QoS features that can be applied to the network traffic (using the MQC), after
NBAR has recognized and classified the application or protocol, include the following:
Class-based marking
Class-based weighted fair queuing (CBWFQ)
Low-latency queuing (LLQ)
Traffic policing
Traffic shaping
For Cisco IOS Software Release 12.2(18)ZYA on the Cisco Catalyst 6500 Series Switch
(which is equipped with a Supervisor 32/Programmable Intelligent Services Accelerator
[PISA]), only the QoS features listed below can be configured. These features can be
configured (using the MQC) after NBAR has recognized and classified the application or
protocol.
Traffic classification
Traffic marking
2009 Cisco Systems, Inc. Classification and Marking 4-67
Traffic policing
NBAR includes a Protocol Discovery feature that provides an easy way to discover application
protocols that are operating on an interface. The Protocol Discovery feature discovers any
protocol traffic supported by NBAR. You can apply Protocol Discovery to interfaces and use it
to monitor both input and output traffic. Protocol Discovery maintains per-protocol statistics for
enabled interfaces such as total number of input and output packets and bytes, and input and
output bit rates.
You can load an external PDLM at run time to extend the NBAR list of recognized protocols.
PDLMs allow NBAR to recognize new protocols without requiring a new Cisco IOS image or a
router reload.
NBAR introduces powerful application classification features into the network at a small-to-
medium CPU overhead cost. The CPU utilization will vary based on factors such as the router
processor speed and type, and the traffic rate.
Note NBAR classifies network traffic by application or protocol. Network traffic can be classified
without using NBAR.
NBAR gives you the ability to see the variety of protocols and the amount of traffic generated
by each protocol. After gathering this information, NBAR allows you to organize traffic into
classes.
4-68 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-3
NBAR Requirements and Restrictions
Before you configure NBAR, you must enable Cisco Express
Forwarding.
NBAR is not supported on the following logical interfaces:
Fast EtherChannel
Dialer interfaces before Cisco IOS Release 12.2(4)T
Interfaces where tunneling or encryption is used
NBAR does not support the following:
More than 24 concurrent URLs, hosts, or MIME-type matches
Non-IP traffic
Multicast and switching modes other than Cisco Express
Forwarding
Fragmented packets
URL, host, or MIME classification with secure HTTP
Packets originating from or destined to the router running NBAR

The following requirements and restrictions apply to NBAR:
Before you configure NBAR, you must enable Cisco Express Forwarding. This prerequisite
does not apply if you are using Cisco IOS Software Release 12.2(18)ZYA.
NBAR does not support the following:
More than 24 concurrent URLs, hosts, or Multipurpose Internet Mail Extension
(MIME)-type matches. For Cisco IOS Software Release 12.2(18)ZYA, the
maximum number of concurrent URLs, hosts, or MIME-type matches is 56.
Matching beyond the first 400 bytes in a packet payload in Cisco IOS Software
releases before Cisco IOS Software Release 12.3(7)T. In Cisco IOS Software
Release 12.3(7)T, this restriction was removed, and NBAR now supports full
payload inspection. The only exception is that NBAR can inspect custom protocol
traffic for only 255 bytes into the payload.
Non-IP traffic.
Multiprotocol Label Switching (MPLS)-labeled packets. NBAR classifies IP packets
only. You can, however, use NBAR to classify IP traffic before the traffic is handed
over to MPLS.
Multicast and switching modes other than Cisco Express Forwarding.
Fragmented packets.
Pipelined persistent HTTP requests.
URL, host, or MIME classification with secure HTTP.
Asymmetric flows with stateful protocols.
Packets that originate from or that are destined to the router running NBAR.
NBAR is not supported on the following logical interfaces:
Fast EtherChannel
2009 Cisco Systems, Inc. Classification and Marking 4-69
Note Fast EtherChannels are supported in Cisco IOS Software Release 12.2(18)ZYA.
Dialer interfaces before Cisco IOS Software Release 12.2(4)T
Interfaces where tunneling or encryption is used
Note You cannot use NBAR to classify output traffic on a WAN link where tunneling or encryption
is used. Therefore, you should configure NBAR on other interfaces on the router (such as a
LAN link) to perform input classification before the traffic is switched to the WAN link for
output. However, NBAR protocol discovery is supported on interfaces on which tunneling or
encryption is used. You can enable protocol discovery directly on the tunnel or on the
interface on which encryption is performed to gather key statistics about the various
applications that are traversing the interface. The input statistics also show the total number
of encrypted or tunneled packets received in addition to the per-protocol breakdowns.
NBAR is currently not supported with Stateful Switchover (SSO). This restriction applies
to the Cisco Catalyst 6500 Series Switches and to the Cisco 7500 and Cisco 7600 Series
Routers.
To use Distributed NBAR (dNBAR) on a Cisco 7500 Series Router, you must use a slot
controller (or VIP processor) that has 64 MB of DRAM or more.
Note When NBAR is used on a Cisco 7500 Series Router with a Versatile Interface Processor
(VIP) or on a Catalyst 6500 Series Switch with a FlexWAN module or serial interface
processor (SIP), NBAR is referred to as dNBAR. The implementation of NBAR and dNBAR
is identical.
The phrase "Layer 2 NBAR" refers to NBAR functionality used with Layer 2 interfaces, such
as switch ports, trunks, or EtherChannels. Layer 2 NBAR functionality can also be used with
service modules such as a Firewall Services Module (FWSM) and an Intrusion Detection
Services Module (IDSM) with the following restriction. Layer 2 NBAR is not supported on
Layer 2 interfaces that are configured as part of a service module (such as FWSM and IDSM)
when those service modules are configured in inline mode (that is, when network traffic is in a
direct path through the service module). However, Layer 2 NBAR is supported in non-inline
mode with service modules.
Note This restriction does not apply to NBAR functionality that is used with Layer 3 interfaces.

Note For the latest information regarding NBAR use restrictions, please refer to the Cisco IOS
documentation for your specific software release.
4-70 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
NBAR Application Support
This topic describes the types of applications supported by NBAR.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-4
NBAR Application Support
NBAR can classify applications that use:
Statically assigned TCP and UDP port numbers
Non-UDP and non-TCP IP protocols
Dynamically assigned TCP and UDP port numbers negotiated during
connection establishment (requires stateful inspection)
NBAR can perform subport classification or classification based on deep
packet inspection. For example:
Classification of HTTP traffic by URL, hostname, or MIME type
Classification of Citrix traffic based on the published application name
or ICA tag number
Classification of RTP packets by RTP payload type

NBAR supports simpler configuration coupled with stateful recognition of flows. The simpler
configuration means that a protocol analyzer capture does not need to be examined to calculate
ports and details. Stateful recognition means smarter, deeper packet recognition.
NBAR can be used to recognize and classify packets belonging to the following types of
protocols and applications:
Applications that use statically assigned TCP and UDP port numbers: These
applications establish sessions to well-known TCP or UDP destination port numbers.
Access control lists (ACLs) can also be used for classifying static port protocols. However,
NBAR is easier to configure, and NBAR can provide classification statistics that are not
available when ACLs are used.
Applications that use dynamically assigned TCP and UDP port numbers: These
applications use multiple sessions that use dynamic TCP or UDP port numbers. Typically,
there is a control session to a well-known port number and the other sessions are
established to destination port numbers negotiated through the control sessions. NBAR
inspects the port number exchange through the control session. This kind of classification
requires stateful inspection; that is, the ability to inspect a protocol across multiple packets
during packet classification.
Non-TCP and non-UDP IP protocols: Some non-TCP and non-UDP IP protocols can be
recognized by NBAR.
2009 Cisco Systems, Inc. Classification and Marking 4-71
NBAR also has the capability to perform subport classification or classification based on deep-
packet inspection. Deep-packet classification is classification performed at a finer level of
granularity. For instance, if a packet is already classified as HTTP traffic, it may be further
classified as HTTP traffic with a specific URL. Subport classification looks beyond the TCP or
UDP port numbers of a packet; NBAR looks into the TCP or UDP payload itself and classifies
packets based on the content within the payload, such as transaction identifier, message type, or
other similar data.
4-72 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-5
NBAR Application Support (Cont.)
TCP and UDP Protocols Supported by NBAR
BGP Finger Kazaa Novadigm SFTP SunRPC
Cit rix ICA FTP Kerberos NTP SMTP Syslog
CU-SeeMe HTTP L2TP PCAnywhere SNMP Telnet
DHCP HTTPS LDAP POP3 SOCKS TFTP
DNS IMAP NetShow RSVP SQL*NET VDOLive
Exchange IRC NNTP RTSP SSH YouTube
Non-TCP and Non-UDP Protocols Supported by NBAR
EGP EIGRP GRE ICMP IPINIP IPsec OSPF

The tables list some of the NBAR-supported protocols available in Cisco IOS Software. The
tables also provide information about the protocol type and the well-known port numbers (if
applicable).
Many peer-to-peer file-sharing applications not listed in these tables can be classified using
FastTrack or Gnutella. RTSP can be used to classify various types of applications that use
streaming audio.
Note These tables include the NBAR-supported protocols available with the 12.2(18)ZY and
12.2(18)ZYA releases. Protocols included in the 12.2(18)ZY and 12.2(18)ZYA releases are
supported on the Catalyst 6500 series switch that is equipped with a Supervisor 32/PISA.
This table lists non-TCP and non-UDP protocols supported by NBAR.
Non-TCP and Non-UDP NBAR Supported Protocols
Protocol Network
Protocol
Protocol ID Description
EGP IP 8 Exterior Gateway Protocol
GRE IP 47 Generic Routing Encapsulation
ICMP IP 1 Internet Control Message Protocol
IPIP IP 4 IP in IP
IPsec IP 50, 51 IP Encapsulating Security Payload (ESP=50)
and Authentication Header (AH=51)
EIGRP IP 88 Enhanced Interior Gateway Routing Protocol
OSPF IP 89 Open Shortest Path First
2009 Cisco Systems, Inc. Classification and Marking 4-73
This table shows IP protocols supported by NBAR.
TCP and UDP NBAR Supported Protocols
Protocol Network
Protocol
Protocol ID Description
AOL-
messenger
TCP 5190, 443 AOL Instant Messenger chat messages
BGP TCP/UDP 179 Border Gateway Protocol
Citrix ICA TCP/UDP TCP: 1494, 2512,
2513, 2598
UDP: 1604
Citrix ICA traffic
CU-SeeMe TCP/UDP TCP: 7648, 7649
UDP: 24032
Desktop video conferencing
DHCP/
BOOTP
UDP 67, 68 Dynamic Host Configuration Protocol/
Bootstrap Protocol
DNS TCP/UDP 53 Domain Name System
Doom TCP/UDP 666 Doom
Exchange TCP 135 MS-RPC for Exchange
FastTrack TCP/UDP Dynamically
assigned
FastTrack peer-to-peer protocol
Finger TCP 79 Finger user information protocol
FTP TCP Dynamically
assigned, 20, 21
File Transfer Protocol
HTTP TCP 80 Hypertext Transfer Protocol
HTTPS TCP 443 Secure HTTP
IMAP TCP/UDP 143, 220 Internet Message Access Protocol
IRC TCP/UDP 194 Internet Relay Chat
Kazaa TCP/UDP Dynamically
assigned
Kazaa
Kerberos TCP/UDP 88, 749 Kerberos network authentication service
L2TP UDP 1701 Layer 2 Tunneling Protocol
LDAP TCP/UDP 389 Lightweight Directory Access Protocol
MSN-
messenger
TCP 1863 MSN Messenger chat messages
NetShow TCP/UDP Dynamically
assigned
Microsoft NetShow
NNTP TCP/UDP 119 Network News Transfer Protocol
Notes TCP/UDP 1352 Lotus Notes
Novadigm TCP/UDP 3460-3465 Novadigm Enterprise Desktop
Manager (EDM)
NTP TCP/UDP 123 Network Time Protocol
4-74 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Protocol Network
Protocol
Protocol ID Description
PCAnywhere TCP/UDP TCP: 5631, 65301
UDP: 22, 5632
Symantec PCAnywhere
POP3 TCP/UDP 110 Post Office Protocol
RealAudio TCP/UDP Dynamically
assigned
RealAudio Streaming Protocol
RSVP UDP 1698,1699 Resource Reservation Protocol
RTSP TCP/UDP Dynamically
assigned
Real Time Streaming Protocol
SFTP TCP 990 Secure FTP
SIP TCP/UDP 5060 Session Initiation Protocol
Skinny
(SCCP)
TCP 2000, 2001, 2002 Skinny Client Control Protocol
Skype TCP/UDP Dynamically
assigned
Peer-to-Peer VoIP Client Software
SMTP TCP 25 Simple Mail Transfer Protocol
SNMP TCP/UDP 161, 162 Simple Network Management Protocol
SOCKS TCP 1080 Firewall security protocol
SQL*NET TCP/UDP 1521 SQL*NET for Oracle
SSH TCP 22 Secured Shell Protocol
SunRPC TCP/UDP Dynamically
assigned
Sun Remote Procedure Call
Syslog UDP 514 System logging utility
Telnet TCP 23 Telnet protocol
TFTP UDP Static (69) with
inspection
Trivial File Transfer Protocol
VDOLive TCP/UDP Static (7000) with
inspection
VDOLive Streaming Video
Yahoo-
messenger
TCP 5050, 5101 Yahoo Messenger chat messages
YouTube TCP Both static (80)
and dynamically
assigned
Online video-sharing website


Note For a complete list of NBAR-supported protocols (and details regarding protocol support with
specific platforms and software versions), refer to the Classification section of the Cisco IOS
Quality of Service Solutions Configuration Guide, Release 12.4 at http://www.cisco.com.
2009 Cisco Systems, Inc. Classification and Marking 4-75
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-6
NBAR and Port Numbers Other Than
Well-Known Ports
Some protocols can use TCP or UDP ports other than the well-
known IANA-assigned port numbers.
You can configure NBAR to search for a protocol or protocol
name using a port number other than the well-known port.
Configures NBAR to search for a protocol or protocol name using
a port number other than the well-known port
Accepts up to 16 port-number arguments in one command line


Some protocols can use TCP or UDP ports other than the well-known Internet Assigned
Numbers Authority (IANA)-assigned port number. You can configure NBAR to search for a
protocol or protocol name using a port number other than the well-known port by using the ip
nbar port-map command in global configuration mode. Using this command modifies the
default NBAR port map, which associates protocols with their IANA-assigned port numbers.
For example, you can use the ip nbar port-map command to configure NBAR to look for Telnet on
a port other than port 23. You can specify up to 16 ports with this command.
Note For best results, do not configure the Citrix or BitTorrent protocols.
The syntax for the ip nbar port-map command is as follows:

Syntax Description
Parameter Description
Name of protocol known to NBAR.
(Optional) Specifies that a TCP port will be searched for the
specified protocol-name argument.
(Optional) Specifies that a UDP port will be searched for the
specified protocol-name argument.
Assigned port for named protocol. The port-number argument is
either a UDP or a TCP port number, depending on which protocol
is specified in this command line. Up to 16 port-number
arguments can be specified in one command line. Port number
values can range from 0 to 65535.
4-76 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-7
HTTP typically uses well-known port number 80; however, other
port numbers may also be used.
The ip nbar port-map command informs the router that other
ports are also used for HTTP.
NBAR and Port Numbers Other Than
Well-Known Ports (Cont.)

HTTP is often used on ports other than its well-known port, TCP port 80. In the figure, the ip
nbar port-map command is used to enable HTTP recognition on both TCP port 80 and TCP
port 8080. The class map called HTTP is used to match the HTTP protocol. The policy map
LIMITWEBBW will use the class map HTTP and set the bandwidth for HTTP traffic to
256 kb/s. The policy map is then applied as a service policy for outbound traffic on the S0/0
interface.
The following example configures NBAR to look for the protocol Structured Query Language
(SQL)*NET on port numbers 63000 and 63001, rather than on its well-known port numbers,
TCP port 66 and UDP port 66:

You can use the show ip nbar port-map command to display the current protocol-to-port
mappings in use by NBAR. Use the display to verify that these mappings are correct.
If the ip nbar port-map command has been used, the show ip nbar port-map command
displays the ports assigned to the protocol. If the no ip nbar port-map command has been
used, the show ip nbar port-map command displays the default ports. To limit the display to a
specific protocol, use the protocol-name argument of the show ip nbar port-map command.

2009 Cisco Systems, Inc. Classification and Marking 4-77
Packet Description Language Module
This topic describes the purpose of PDLMs in NBAR.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-8
Packet Description Language Module
An external PDLM can be loaded at run time to extend the NBAR
list of recognized protocols.
PDLMs allow NBAR to recognize new protocols without requiring
a new Cisco IOS image or a router reload.
PDLMs are produced exclusively by Cisco engineers.
The DirectConnect PDLM is currently available for download.

New features are usually added to new versions of the Cisco IOS Software. NBAR is the first
mechanism that supports dynamic upgrades without having to change the Cisco IOS Software
version or restart a router. This is accomplished by loading one or more PDLMs onto a router.
Adding PDLMs extends the functionality of NBAR by enabling NBAR to recognize additional
protocols on your network.
A PDLM is a separate file available on http://www.cisco.com. You can load an external PDLM
at run time to extend the NBAR list of recognized protocols. PDLMs that are not embedded
within Cisco IOS Software are referred to as nonnative PDLMs. A native PDLM is a PDLM
that is embedded within the Cisco IOS Software. You receive it automatically along with the
Cisco IOS Software.
There are separate version numbers associated with the NBAR software and the Cisco IOS
Software. These version numbers are used together to maintain the PDLM version.
PDLM version: The version of the PDLM, either native or nonnative.
Cisco IOS NBAR software version: The version of NBAR that resides with the Cisco IOS
Software. You can display the Cisco IOS NBAR software version by executing the show ip
nbar version command.
Note Each nonnative PDLM also contains the Cisco IOS NBAR software version in which the
PDLM was created.
4-78 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Both the native and nonnative PDLMs contain internal module names. These internal module
names are unique and independent. They are used to indicate the protocol that the PDLM
module represents (such as BitTorrent or DirectConnect), and they are used to control the
module version number (such as module version 3).
In order for a PDLM (either native or nonnative) to be downloaded or overridden, both of the
following conditions much be met:
The module version of the PDLM being downloaded must be higher than the module
version currently installed. For example, if a PDLM called BitTorrent.pdlm (with the
internal module name "bittorrent") is currently at version 3, the resident PDLM (either
native or nonnative) with the same internal module name (bittorrent) is overridden as long
as the module version is either 1 or 2.
The Cisco IOS NBAR software version of the PDLM must be less than or equal to the
Cisco IOS NBAR software version of the Cisco IOS image.
Note New PDLMs are released only by Cisco and are available from local Cisco representatives.
They can be loaded from flash memory. To view a list of currently available PDLMs, go to
the following URL: http://www.cisco.com/pcgi-bin/tablebuild.pl/pdlm
2009 Cisco Systems, Inc. Classification and Marking 4-79
NBAR and Custom Protocols
This topic explains how custom protocols can be used to extend the set of protocols that NBAR
recognizes.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-9
NBAR and Custom Protocols
NBAR supports the use of custom protocols to identify custom
applications.
You can add to the set of protocols and application types that
NBAR recognizes by creating custom protocols.
You can define the names of your custom protocol applications;
the custom protocol names you specify can then be used by
Protocol Discovery, the Protocol Discovery MIB, the match
protocol command, and the ip nbar port-map command as
NBAR-supported protocols.

NBAR supports the use of custom protocols to identify custom applications. You can add to the
set of protocols and application types that NBAR recognizes by creating custom protocols.
NBAR recognizes and classifies network traffic on the basis of a set of protocols and
application types. Custom protocols extend the capability of NBAR Protocol Discovery to
classify and monitor additional static port applications and allows NBAR to classify
nonsupported static port traffic; NBAR can map static TCP and UDP port numbers to custom
protocols.
You can define the names of your custom protocol applications. Each name you specify can
then be used by Protocol Discovery, the Protocol Discovery MIB, the match protocol
command, and the ip nbar port-map command as an NBAR-supported protocol.
You can create more than 30 custom protocols on a router. NBAR can support up to 128
protocols total.
4-80 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Protocol Discovery
This topic describes NBAR Protocol Discovery and the Cisco NBAR Protocol Discovery MIB.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 10
Protocol Discovery
Protocol Discovery analyzes application traffic patterns in real
time and discovers which traffic is running on the network.
Provides bidirectional, per-interface, per-protocol statistics:
5-minute bit rate (b/s)
Packet counts
Byte counts
Important monitoring tool supported by Cisco QoS management
tools.
Generates real-time application statistics
Provides traffic distribution information at key network locations
Historical QoS statistical information available through the
Protocol Discovery MIB.

NBAR includes a Protocol Discovery feature that provides an easy way to discover application
protocols that are transiting an interface so that appropriate QoS features can be applied. The
Protocol Discovery feature discovers any protocol traffic that is supported by NBAR.
NBAR Protocol Discovery captures key statistics associated with each protocol in a network.
These statistics can be used to define traffic classes and QoS policies for each traffic class.
You can apply protocol discovery to interfaces and use it to monitor both input and output
traffic. In addition, protocol discovery shows the mix of applications currently running on the
network, which helps in defining QoS classes and policies, such as determining how much
bandwidth to provide to mission-critical applications and which protocols should be policed.
Protocol Discovery maintains the following per-protocol statistics for enabled interfaces:
Total number of input packets and bytes
Total number of output packets and bytes
Input bit rates
Output bit rates
Cisco IOS Software Release 12.2(18)ZYA includes a feature called Non-Intrusive Protocol
Discovery. The Non-Intrusive Protocol Discovery feature enables the Cisco Catalyst 6500
Series Switch, which is equipped with a Supervisor 32/PISA, to perform protocol discovery in
out-of-band (that is, offline) mode. In offline mode, a copy of the network traffic is used to
discover the application protocols that are operating on an interface, leaving the network traffic
undisturbed and available for other purposes. Non-Intrusive Protocol Discovery is closely
2009 Cisco Systems, Inc. Classification and Marking 4-81
associated with a feature called Intelligent Traffic Redirect (ITR). ITR allows you to optimize
system performance by identifying the specific traffic that needs to be redirected to the
Supervisor 32/PISA for deep-packet inspection. Non-Intrusive Protocol Discovery is achieved
by enabling ITR on an interface on which protocol discovery has been enabled.
For the Non-Intrusive Protocol Discovery feature to function properly, no other intrusive
features (for example, Flexible Packet Matching [FPM]) can be in use on the interface in either
the input or output direction. An intrusive feature is one that manipulates the packets, such as
modifying a statistic or a packet counter. If such a feature is in use, the actual traffic (and not a
copy of the traffic) is redirected.
Note For more information about the commands used to enable ITR, see the Cisco Catalyst
Supervisor Engine 32 PISA IOS Command Reference on http://www.cisco.com.
4-82 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 11
Protocol Discovery MIB
The NBAR Protocol Discovery MIB uses SNMP to
provide the following protocol discovery functionality:
Enable or disable protocol discovery per interface
Display protocol discovery statistics
Configure and view multiple top-n tables that list protocols by
bandwidth usage
Configure thresholds based on traffic of particular NBAR-
supported protocols or applications that report breaches and send
notifications when these thresholds are crossed

The NBAR Protocol Discovery MIB expands the capabilities of NBAR Protocol Discovery by
providing the following functionality through Simple Network Management Protocol (SNMP):
Enable or disable Protocol Discovery per interface.
Display Protocol Discovery statistics.
Configure and view multiple top-n tables that list protocols by bandwidth usage.
Configure thresholds based on traffic of particular NBAR-supported protocols or
applications that report breaches and send notifications when these thresholds are crossed.
2009 Cisco Systems, Inc. Classification and Marking 4-83
Configuring and Monitoring NBAR
This topic describes the Cisco IOS commands that are required to configure and monitor
NBAR.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 12
NBAR Configuration Tasks
1. Enable Cisco Express Forwarding (required)
2. Enable Protocol Discovery (as needed to determine which
protocols are currently running on your network; required for
obtaining statistics on those protocols)
3. Configure NBAR using the MQC (optional)
4. Add PDLMs (optional)
5. Create custom protocols (optional)

To configuring NBAR, follow these steps:
Step 1 Enable Cisco Express Forwarding (required unless you are using Cisco IOS Software Release
12.2(18)ZYA)
Step 2 Enable Protocol Discovery (as needed to determine which protocols are currently running on
your network; required for obtaining statistics on those protocols)
Step 3 Configure NBAR using the MQC (optional)
Step 4 Add PDLMs (optional)
Step 5 Creating custom protocols (optional)
4-84 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 13
Configuring Protocol Discovery
Configures NBAR to discover traffic for all protocols known to
NBAR on a particular interface
Requires that Cisco Express Forwarding be enabled before
protocol discovery
Can be applied with or without a service policy enabled


The NBAR feature has these two components:
One component monitors applications traversing a network.
The other component classifies traffic by protocol.
In order to monitor applications traversing a network, Protocol Discovery must be enabled. The
ability to classify traffic by protocol using NBAR and then to apply QoS to the classified traffic
is configured using the MQC.
Use the ip nbar protocol-discovery command in interface configuration mode (or VLAN
configuration mode for Catalyst switches) to configure NBAR to keep traffic statistics for all
protocols known to NBAR. The syntax shown in the figure for the ip nbar protocol-discovery
command is the same as the syntax for the ip nbar protocol-discovery command in Cisco IOS
Software Release 12.4.
Note With Cisco IOS Software Release 12.2(18)ZYA, intended for use on a Cisco 6500 Series
Switch that is equipped with a Supervisor 32/PISA, the ip nbar protocol-discovery
command is supported on both Layer 2 and Layer 3 EtherChannels.
2009 Cisco Systems, Inc. Classification and Marking 4-85
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 14
Monitoring Protocol Discovery
Displays the statistics gathered by the NBAR Protocol Discovery
feature



Use the show ip nbar protocol-discovery command to display statistics gathered by the
NBAR protocol discovery feature. This command, by default, displays statistics for all
interfaces on which protocol discovery is currently enabled.
You can use protocol discovery to monitor both input and output traffic and apply it with or
without a service policy enabled. NBAR protocol discovery gathers statistics for packets
switched to output interfaces. These statistics are not necessarily for packets that exited the
router on the output interfaces, because packets might have been dropped after switching for
various reasons (policing at the output interface, access lists, or queue drops).
The syntax for the show ip nbar protocol-discovery command in Cisco IOS Software Release
12.4 is as follows:



4-86 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
(Optional) Specifies that protocol discovery statistics for the
interface are to be displayed
Type of interface or subinterface whose policy configuration is to
be displayed
Port, connector, VLAN, or interface card number
(Optional) Specifies that the byte count, byte rate, or packet count
is to be displayed
(Optional) Specifies that the byte count is to be displayed
(Optional) Specifies that the bit rate is to be displayed
(Optional) Specifies that the packet count is to be displayed
(Optional) Specifies that the maximum bit rate is to be displayed
(Optional) Specifies that statistics for a specific protocol are to be
displayed
(Optional) User-specified protocol name for which the statistics
are to be displayed
(Optional) Specifies that a top-n is to be displayed. A top-n is the
number of most active NBAR-supported protocols, where n is the
number of protocols to be displayed. For instance, if top-n 3 is
entered, the three most active NBAR-supported protocols will be
displayed.
(Optional) Specifies the number of most active NBAR-supported
protocols to be displayed
2009 Cisco Systems, Inc. Classification and Marking 4-87
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 15
Monitoring Protocol Discovery (Cont.)




















The default output of the show ip nbar protocol-discovery command includes input bit rate
(in bits per second), input byte count, input packet count, and protocol name. The example in
the figure displays partial output from the show ip nbar protocol-discovery command for the
five most active protocols on an Ethernet interface.
4-88 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 16
Configuring NBAR Using the MQC
Configures the match criteria for a class map on the basis of the
specified protocol.
CBWFQ is applied to all Citrix traffic entering the FastEthernet2/4
interface.








After you enable Protocol Discovery, you can configure NBAR using the functionality of the
MQC. The MQC uses traffic classes and traffic policies (policy maps) to apply QoS features to
classes of traffic and applications recognized by NBAR. Configuring NBAR using the MQC
involves defining a traffic class, configuring a traffic policy (policy map), and then attaching
that traffic policy to the appropriate interface.
A traffic class contains three major elements: a name, one or more match commands, and, if
more than one match command exists in the traffic class, an instruction on how to evaluate
these match commands (match-all or match-any).
The match commands are used to specify various criteria for classifying packets. For NBAR,
the criterion is whether the packet matches a specific protocol or application known to NBAR.
Using the MQC, network traffic with one network protocol (Citrix, for example) can be placed
into one traffic class, while traffic that matches a different network protocol (Gnutella, for
example) can be placed into another traffic class. You specify the criteria used to classify traffic
by using the match protocol command. Using the match protocol command with the
protocol-name value configures NBAR to match all traffic for the specified protocol.
Note For Cisco IOS Software Release 12.2(18)ZY, a maximum of eight match protocol
commands can be configured in a single traffic class.
In the figure, a class called CMAP1 is configured to match all Citrix traffic. CMAP1 is applied
to policy map POLICY1 , within which the bandwidth command is used to associate CBWFQ
with the CMAP1 class of traffic. POLICY1 is attached to Ethernet interface 2/4 in the input
direction. CBWFQ is an example of a QoS feature that can be applied in a policy map. Use the
appropriate command for the QoS feature that you want to use.
2009 Cisco Systems, Inc. Classification and Marking 4-89
The syntax for the match protocol command is as follows:
match protocol protocol-name
Syntax Description
Parameter Description
Name of the protocol used as a matching criterion. Supported
protocols include the following (Some protocols omitted. Refer to
Cisco IOS documentation for complete details):
aarp: AppleTalk Address Resolution Protocol (AARP)
arp: IP Address Resolution Protocol (ARP)
bridge: bridging
cdp: Cisco Discovery Protocol
compressedtcp: compressed TCP
dlsw: data-link switching (DLSw)
ip: IP
ipx: Novell IPX
The syntax for the match protocol command in Cisco IOS Software Release 12.4 is as follows:

Syntax Description
Parameter Description
Particular protocol type that is known to NBAR.
(Optional and usable only with custom protocols) Predefined
variable that was created when you created a custom protocol.
The variable-field-name will match the field-name variable
entered when you created the custom protocol using the ip nbar
custom command.
(Optional and usable only with custom protocols) Specific value in
the custom payload to match. A value can be entered along with
a variable field name. The value can be expressed in decimal or
hexadecimal format.
4-90 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 17
Classifying HTTP Traffic
Configures NBAR to match HTTP traffic by URL, host, MIME type,
or fields in HTTP packet headers
Classifies HTTP packets based on any URL containing the string
whatsnew/latest followed by zero or more characters




NBAR can classify application traffic by looking beyond the TCP and UDP port numbers of a
packet. This capability is called subport classification. NBAR looks into the TCP or UDP
payload itself and classifies packets based on content within the payload, such as transaction
identifier or message type. Classification of HTTP traffic by URL, host, or MIME type is an
example of subport classification.
NBAR classifies HTTP traffic by text within the URL or host fields of an HTTP request packet
by using regular expression matching. When matching by URL, NBAR recognizes the HTTP
packets containing the URL and then matches all packets that are part of the HTTP request.
HTTP client request matching in NBAR supports most HTTP request methods such as GET,
PUT, HEAD, POST, DELETE, OPTIONS, CONNECT, and TRACE. With classification by
host name, NBAR classifies all packets from the host you specify.
For MIME-type matching, the MIME type can contain any text string you specify. A list of the
IANA-supported MIME types can be found at the following URL:
http://www.iana.org/assignments/media-types/
NBAR supports URL and host classification in the presence of persistent HTTP. NBAR does
not classify packets that are part of a pipelined request. With pipelined requests, multiple
requests are pipelined to the server before previous requests are serviced. Pipelined requests are
less common types of persistent HTTP requests.
In Cisco IOS Software Release 12.3(4)T, the NBAR Extended Inspection for HTTP Traffic
feature was introduced. This feature allows NBAR to scan TCP ports that are not well known
and to identify HTTP traffic traversing these ports. HTTP traffic classification is no longer
limited to the well-known and defined TCP ports. This feature is enabled automatically when a
service policy containing the match protocol http command is attached to an interface.
2009 Cisco Systems, Inc. Classification and Marking 4-91
The syntax for the match protocol http command in Cisco IOS Software Release 12.4 is as
follows:



Parameter Description
(Optional) Specifies matching by a URL
(Optional) User-specified URL of HTTP traffic to be matched
(Optional) Specifies matching by a hostname
(Optional) User-specified hostname to be matched
(Optional) Specifies matching by a MIME text string
(Optional) User-specified MIME text string to be matched
(Optional) Specifies matching by a string in the header field in
HTTP request messages
(Optional) User-specified text string within the HTTP request
message to be matched
(Optional) Specifies matching by a string in the header field in
HTTP response messages
(Optional) User-specified text within the HTTP response message
to be matched
When specifying a URL for classification, include only the portion of the URL that follows the
www.hostname.domain in the match statement. For example, for the URL
www.cisco.com/latest/whatsnew.html, include only /latest/whatsnew.html with the match
statement as shown in the following example:


The following example classifies, within the class map called EXAMPLECLASS2, packets
based on any host name containing the string cisco followed by zero or more characters:


The following example classifies, within the class map called EXAMPLECLASS3, packets
based on the Joint Photographic Experts Group (JPEG) MIME type:


4-92 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 18
Classifying HTTP Traffic (Cont.)
Any request message that contains "somebody@cisco.com"
in the User-Agent, Referrer, or From fields will be classified
by NBAR.
HTTP header fields are combined with a URL to classify traffic.
Traffic with a User-Agent field of "CERN-LineMode/3.0" and a
Server field of "CERN/3.0," along with URL
"www.cisco.com/routers," will be classified using NBAR.







In Cisco IOS Software Release 12.3(11)T, NBAR introduced expanded ability for users to
classify HTTP traffic using information in the HTTP header fields. HTTP header fields are
used to provide information about HTTP request and response messages. HTTP has numerous
header fields.
NBAR is able to classify these HTTP header fields for request messages (client to server):
User-Agent
Referer
From
NBAR is able to classify the following HTTP header fields for response messages (server to
client):
Server
Location
Content-Encoding
Content-Base
Note Use of the Content-Base field has not been implemented by the HTTP community. (See
RFC 2616 for details.) Therefore, the Content-Base field is not identified by NBAR on the
Cisco Catalyst 6500 Series Switch that is equipped with a Supervisor 32/PISA.
You can use the match protocol http command with the c-header-field keyword to specify
that NBAR identify request messages. The "c" in the c-header-field portion of the command is
for client. You can use the match protocol http command with the s-header-field keyword to
specify response messages. The "s" in the s-header-field portion of the command is for server.
2009 Cisco Systems, Inc. Classification and Marking 4-93
In the first example in the figure, any request message that contains "somebody@cisco.com" in
the User-Agent, Referer, or From fields will be classified by NBAR. Typically, a term with a
format similar to "somebody@cisco.com" would be found in the From header field of the
HTTP request message.
4-94 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 19
Classifying Citrix Traffic
Configures NBAR to match Citrix traffic
Configures NBAR to match Citrix traffic with the application name
of packet1




NBAR can classify Citrix Independent Computing Architecture (ICA) traffic and perform
subport classification of Citrix traffic based on the published application name or ICA tag
number. To configure NBAR to match Citrix traffic, use the match protocol citrix command
in class-map configuration mode.
The syntax for the match protocol citrix command in Cisco IOS Software Release 12.4 is as
follows:


Syntax Description
Parameter Description
(Optional) Specifies matching of an application name string


(Optional) Specifies the string to be used as the subprotocol
parameter
(Optional) Specifies tagging of Independent Computing
Architecture (ICA) packets
(Optional) Specifies the priority tag of ICA packets. Priority tag
values can be in the range of 0 to 3

Note For more information on NBAR and Classification of Citrix ICA Traffic, refer to the Part 1:
Classification section of the Cisco IOS Quality of Service Solutions Configuration Guide,
Release 12.4 on http://www.cisco.com.
2009 Cisco Systems, Inc. Classification and Marking 4-95
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 20
Classifying Peer-to-Peer File-Sharing
Applications
Configures NBAR to match Gnutella peer-to-peer traffic
Configures NBAR to match FastTrack peer-to-peer traffic


The following are the most common peer-to-peer file-sharing applications supported by NBAR:
BitTorrent
DirectConnect
eDonkey
eMule
FastTrack
Grokster
JTella
Kazaa (as well as Kazaa Lite and Kazaa Lite Resurrection)
Morpheus
Win MX
Gnutella is another file-sharing protocol that became classifiable using NBAR in Cisco IOS
Software Release 12.1(12c)E. Applications that use the Gnutella protocol include Bearshare,
Gnewtellium, Gnucleus, Gtk-Gnutella, Limewire, Mutella, Phex, Qtella, Swapper, and Xolo.
The match protocol gnutella file-transfer regular-expression and match protocol fasttrack
file-transfer regular-expression commands are used to enable Gnutella and FastTrack
classification in a traffic class. The file-transfer keyword indicates that a regular expression
variable will be used to identify specific Gnutella or FastTrack traffic. Wildcard characters in a
regular expression can also be used to identify specified Gnutella and FastTrack traffic. These
regular expression matches can be used to match on the basis of filename extension or a
particular string in a filename. In the example, Gnutella traffic that contains the characters
"cisco" is classified:


4-96 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 21
Classifying Peer-to-Peer File-Sharing
Applications (Cont.)
All Gnutella files that have the .mpeg extension will be classified
into class map NBAR
All FastTrack traffic is classified into class map NBAR






All eDonkey and eMule traffic is classified into class map NBAR.
(NBAR also classifies eMule traffic as eDonkey traffic.)

The regular-expression variable can be expressed as "*" to indicate that all FastTrack or
Gnutella traffic is classified by a traffic class. In the following example, all FastTrack traffic is
classified into class map NBAR:


Similarly, all Gnutella traffic is classified into class map NBAR in the following example:


To classify NBAR supported peer-to-peer file-sharing applications other than Gnutella and
FastTrack, use the match protocol command as you would with other NBAR supported
protocols.
2009 Cisco Systems, Inc. Classification and Marking 4-97
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 22
Adding PDLMs
Extends the list of protocols recognized by NBAR by installing
a PDLM
Uses URL format to specify the name and location of the
PDLM file
Downloads the DirectConnect PDLM to the router from flash
memory



A PDLM is used to add support for a protocol that is currently not available as part of the Cisco
IOS Software. A PDLM extends the functionality of NBAR by enabling NBAR to recognize
additional protocols on the network.
To install a PDLM, complete these steps:
Step 1 Review the list of NBAR protocols currently supported by the Cisco IOS Software
release that you are using to determine if support for the protocol that you would like
to add is already in your Cisco IOS Software release. Protocols introduced when you
download a PDLM are commonly added to subsequent Cisco IOS Software releases.
To check the list of NBAR protocols supported in your Cisco IOS Software release,
enter the match protocol ? command and view the options that are displayed. The
options correspond to the NBAR supported protocols.
Step 2 If support for the protocol that you would like to add does not already exist in your
Cisco IOS Software release, use the ip nbar pdlm command followed by the pdlm-
name argument to add NBAR support for the protocol to your Cisco IOS Software.
For the pdlm-name argument, enter the URL at which the PDLM can be found on
the flash card.
4-98 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 23
Verifying Downloaded PDLMs
Displays the PDLM in use by NBAR
Displays information about the version of the NBAR software in
your Cisco IOS Software release or the version of an NBAR
PDLM on your router




After you download the PDLM, you may want to verify that the PDLM is on your router. You
may also want to determine if there are earlier versions of the PDLM already on your router.
You can use the output of the show ip nbar pdlm command and the show ip nbar version
command to verify information about the downloaded PDLMs on your router.
In this example, the Citrix PDLM has been loaded from flash memory:



The following is sample output from the show ip nbar version command:














2009 Cisco Systems, Inc. Classification and Marking 4-99













The table describes the fields shown in the display.
Field Descriptions for show ip nbar version Command Output
Field Description
NBAR software version that is running in the current Cisco IOS
Software. In this example, version 3 is shown.
Resident Module Version. The Resident Module Version is the
version of the NBAR-supported PDLM protocol, and therefore,
varies by protocol. The Resident Module Version of TFTP, for
example, is 1.
Minimum version of the NBAR software that is required to load a
nonnative PDLM. This number is available only for nonnative
PDLMs that were loaded onto the router, such as the Kazaa
PDLM (protocol 17); in that case, the Nv version is 3.
4-100 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 25
Configuring Custom Protocols
Defines a custom protocol
Defines a custom protocol named LunarLight that identifies TCP
packets that have source or destination ports between 2000 and
2999 (inclusive) and contain the string Moonbeam" in the eighth
byte of the payload





To define a custom protocol, use the keywords and arguments of the ip nbar custom
command. After you define the custom protocol, you must create a traffic class and configure a
traffic policy (policy map) to use the custom protocol when NBAR classifies traffic.
The syntax for the ip nbar custom command in Cisco IOS Software Release 12.4 is as follows:



2009 Cisco Systems, Inc. Classification and Marking 4-101
Syntax Description
Parameter Description
The name given to the custom protocol. This name is reflected
wherever the name is used, including NBAR Protocol Discovery,
the match protocol command, the ip nbar port-map command,
and the NBAR Protocol Discovery MIB.
The name must be no longer than 24 characters and can contain
only lowercase letters (a-z), digits (0-9), and the underscore (_)
character.
(Optional) A digit representing the byte location for payload
inspection. The offset function is based on the beginning of the
payload directly after the TCP or UDP header.
(Optional) Defines the format of the value and the length of the
value that is being inspected in the packet payload. Current
format options are ascii, hex, and decimal. The length of the
value is dependent on the chosen format. The length restrictions
for each format are listed below:
ascii: Up to 16 characters can be searched. Regular
expressions are not supported.
hex: Up to 4 bytes.
decimal: Up to 4 bytes.


(Optional) When you enter the variable keyword, a specific
portion of the custom protocol can be treated as an NBAR-
supported protocol. For example, a specific portion of the custom
protocol can be tracked using class-map statistics and can be
matched using the class-map command. If you enter the
variable keyword, you must define the following fields:
field-name: Provides a name for the field to search in the
payload. After you configure a custom protocol using a
variable, you can use this field name with up to 24 different
values per router configuration.
field-length: Enters the field length in bytes. The field length
can be up to 4 bytes, so you can enter 1, 2, 3, or 4 as the
field-length value.
(Optional) Specifies the direction in which packets are inspected.
If you do not specify source or destination, all packets traveling in
either direction are monitored by NBAR.
(Optional) Specifies the TCP or the UDP implemented by the
application.
(Optional) Specifies a range of ports that the custom application
monitors. The start is the first port in the range, and the end is the
last port in the range. One range of up to 1000 ports can be
specified for each custom protocol.
(Optional) The port that the custom application monitors. Up to 16
individual ports can be specified as a single custom protocol.

In the following example, the custom protocol AppSales1 identifies TCP packets that have a
source port of 4567 and that contain the term "SALES" in the fifth byte of the payload:


4-102 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
In the following example, the custom protocol VirusHome identifies UDP packets that have a
destination port of 3000 and that contain "0x56" in the seventh byte of the payload:


In the following example, the custom protocol MediaNew identifies TCP packets that have a
destination or source port of 4500 and that have a value of 90 at the sixth byte of the payload:

In the following example, the custom protocol MSN1 looks for TCP packets that have a
destination or source port of 6700:

In the following example, the custom protocol MailX looks for UDP packets that have a
destination port of 8202:

In the following example, the custom protocol MailY looks for UDP packets that have
destination ports between 3000 and 4000 inclusive:


In the following example, the variable keyword is used while creating a custom protocol, and
class maps are configured to classify different values within the variable field into different
traffic classes. Specifically, in the example below, variable scid values 0x15, 0x21, and 0x27
are classified into class map ActiveCraft, while scid values 0x11, 0x22, and 0x25 are classified
into class map PassiveCraft.












2009 Cisco Systems, Inc. Classification and Marking 4-103
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 26
Configuring RTP Payload Type
Classification
Configures NBAR to match RTP traffic
Can match audio traffic by payload-type values 0 to 23, which are
reserved for audio traffic
Can match video traffic by payload-type values 24 to 33, which are
reserved for video traffic
Supports NBAR RTP payload classification:
Allows you to identify real-time audio and video traffic
Can differentiate on the basis of audio and video codecs to provide
more granular QoS
Configures NBAR to match RTP traffic with payload types 0, 1, and 64




Real-Time Transport Protocol (RTP) is a packet format for multimedia data streams. It can be
used for media-on-demand as well as for interactive services such as Internet telephony.
RTP consists of a data component and a control component. The control component is called
Real-Time Transport Control Protocol (RTCP). RTCP is a separate protocol that is supported
by NBAR. The data component of RTP is a thin protocol that provides support for applications
with real-time properties such as continuous media (audio and video), which includes timing
reconstruction, loss detection, and security and content identification.
The RTP payload is the data transported by RTP in a packet, such as audio samples or
compressed video data. NBAR RTP Payload Type Classification not only allows you to
statefully identify real-time audio and video traffic but can also differentiate on the basis of
audio and video codecs to provide more granular QoS. The RTP Payload Type Classification
feature, therefore, looks deep into the RTP header to classify RTP packets.
NBAR matches RTP traffic on the basis of the payload type field in the RTP packet. A working
knowledge of RTP and RTP payload types is helpful if you want to configure NBAR to match
RTP traffic. For more information about RTP and RTP payload types, refer to RFC 1889, RTP:
A Transport Protocol for Real-Time Applications.
Note It is important to note that the NBAR RTP Payload Classification feature does not identify
RTCP packets.
Use the match protocol rtp command to configure NBAR to match RTP traffic, including
matching on RTP payload type. The syntax for the match protocol rtp command is as follows:


4-104 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
(Optional) Specifies matching by audio payload-type values in the
range of 0 to 23. These payload-type values are reserved for
audio traffic.
(Optional) Specifies matching by video payload-type values in the
range of 24 to 33. These payload-type values are reserved for
video traffic.
(Optional) Specifies matching by a specific payload-type value,
providing more granularity than is available with the audio or
video keywords.
(Optional) User-specified string that contains the specific
payload-type values. A payload-string argument can contain
commas to separate payload-type values and hyphens to indicate
a range of payload-type values. A payload-string argument can
be specified in hexadecimal notation (by prepending 0x to the
value) and binary notation (by prepending b to the value) in
addition to standard number values.

2009 Cisco Systems, Inc. Classification and Marking 4-105
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 27
Example: Configuring NBAR

The example in the figure illustrates a simple classification of RTP sessions, both on the input
interface and on the output interface of the router. On the input interface, three class maps have
been created: voice-in, videoconferencing-in, and interactive-in. The voice-in class map will
match the RTP audio protocol; the videoconferencing-in class map will match the RTP video
protocol; and the interactive-in class map will match the Citrix protocol.
The policy map class-mark will then do the following:
If the packet matches the voice-in class map, the packet differentiated services code point
(DSCP) field will be set to Expedited Forwarding (EF). If the packet matches the
videoconferencing-in class map, the packet DSCP field will be set to AF41. If the packet
matches the interactive-in class map, the DSCP field will be set to AF31.
The policy map class mark is applied to the input interface, E0/0.
On the output interface, three class maps have been created: voice-out, videoconferencing-out,
and interactive-out. The voice-out class map will match the DSCP field for EF. The
videoconferencing-out class map will match the DSCP field for AF41. The interactive-out class
map will match the DSCP field for AF31.
In the figure, policy-map qos-policy will then do the following:
If the packet matches the class map voice-out, the LLQ priority bandwidth will be set to 10
percent of the interface bandwidth. If the packet matches the class map videoconferencing-
out, the class-based weighted-fair queuing (CBWFQ) minimum-guaranteed bandwidth will
be set to 20 percent of the interface bandwidth and if the packet matches the class map
interactive-out, the CBWFQ will be set to 30 percent. All other packet flows will be
classified as class-default and fair-queuing will be performed on them.
The policy map class-mark is applied to the output interface, S0/0.
4-106 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Note Your Cisco IOS Software release may not support all of the features documented in this
lesson. For the latest feature information and caveats, see the release notes for your
platform and software release. Use Cisco Feature Navigator to find information about
platform support and Cisco IOS and Catalyst operating system image support. To access
Cisco Feature Navigator, go to http://www.cisco.com/go/cfn.

Note All commands shown in this lesson may not be available in your Cisco IOS Software
release. For information about a specific command, see the command reference
documentation.
2009 Cisco Systems, Inc. Classification and Marking 4-107
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 28
Summary
NBAR identifies applications and protocols
(Layer 4 to Layer 7) and provides traffic statistics.
NBAR recognizes applications that use statically assigned
TCP and UDP port numbers, applications that use dynamically
assigned TCP and UDP port numbers, and some non-TCP and
non-UDP IP protocols.
PDLMs contain the rules that are used by NBAR to recognize an
application and can be used to bring new or changed functionality
to NBAR.
You can configure NBAR to recognize custom protocols.
NBAR Protocol Discovery analyzes application traffic patterns in
real time and discovers which traffic is running on the network.
NBAR Protocol Discovery MIB uses SNMP to provide new
protocol discovery functionality.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 29
Summary (Cont.)
You can use the following commands to configure NBAR:
ip nbar protocol-discovery: To configure NBAR to keep
traffic statistics for protocols
match protocol (and variations): To specify a protocol as
criteria used to classify traffic in a class map
ip nbar pdlm: To add support for a protocol that is currently
not available as part of the Cisco IOS Software
ip nbar custom: To create a custom protocol
ip nbar port-map: To configure NBAR to search for a protocol
using a port number other than the well-known port

4-108 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 5
Configuring QoS Preclassify
Overview
The quality of service (QoS) for virtual private networks (VPNs) feature (QoS preclassify)
provides a solution for ensuring that Cisco IOS QoS services operate in conjunction with
tunneling and encryption on an interface. This lesson describes QoS preclassify, using QoS
policies on VPN interfaces, and configuring and monitoring QoS preclassify.
Objectives
Upon completing this lesson, you will be able to use the QoS preclassify feature to classify
Generic Routing Encapsulation (GRE) and IPsec encapsulated packets. This ability includes
being able to meet these objectives:
Describe issues regarding the use of QoS with VPNs
Describe ToS byte preservation
Describe the QoS preclassification feature of Cisco IOS Software
Identify the Cisco IOS commands required to support QoS preclassification
Identify the Cisco IOS commands used to monitor QoS preclassification
4-110 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Issues with VPNs
This topic describes issues regarding the use of QoS with VPNs.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-2
VPN QoS Issues
Packet classification is commonly based on the contents of fields
in the packet header.
When packets are encrypted, QoS features are unable to
examine the original packet headers and correctly classify
packets.
Packets traveling across the same tunnel have the same tunnel
headers, so the packets are treated identically if the physical
interface is congested.
Ori ginal packet header encrypted;
unreadable by QoS mechanisms

QoS classification is commonly based on the contents of packet headers. However, when an IP
packet is encrypted, the IP header becomes unusable by QoS mechanisms that process the
packet (post encryption).
2009 Cisco Systems, Inc. Classification and Marking 4-111
ToS Byte Preservation
This topic describes ToS byte preservation.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-3
ToS Byte Preservation
The ToS byte information is copied from the original IP
header to the IPsec header.
IP Packet
Header
ToS Byt e
IP
Header
UDP RTP Voice
ESP
Pad/NH
ESP Auth ESP
Header
ESP IV IPsec
Header
Version Len ID Offset TTL Proto
Header
Checksum
SA DA UDP RTP Voice I HL Flags
ToS byte from
original packet

For many QoS designs, classification is performed based on differentiated services code point
(DSCP) markings in the ToS byte of the IP packet header. When an IP packet is encrypted
through IPsec, the entire packet header (including the ToS byte values) is also encrypted and,
thus, unusable by QoS mechanisms that process the packet after encryption.
To compensate for the fact that the ToS byte is unreadable because of encryption, IPsec
automatically preserves the ToS byte information of the original IP header by copying it to the
IP headers added by the tunneling and encryption process. This process allows the packet to be
processed (post-encryption) by QoS mechanisms in the same manner as any other packet.
4-112 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-4
ToS Byte Preservation (Cont.)
The ToS byte information is copied from the original IP header
to the headers added by the tunneling and encryption process.
ToS Byte
IP Packet
Header
ToS Byte
GRE IP
Header
GRE
IP
Header
UDP RTP Voice
ESP
Pad/NH
ESP Auth ESP
Header
ESP IV IPsec
Header
GRE IP
Header
GRE
I P
Header
UDP RTP Voice
Version Len I D Off set TTL Prot o
Header
Checksum
SA DA UDP RTP Voice IHL Flags
ToS byte from
original packet

In Cisco IOS Software Release 11.3T and later, the ToS byte information of the original IP
header is also automatically copied to the GRE IP header when the router is configured to
encapsulate packets using GRE. GRE tunnels based on RFC 1702 allow any protocol to be
tunneled in an IP packet. GRE tunneling allows routers between GRE-based tunnel endpoints
to adhere to precedence bits, thereby improving the routing of premium service packets. Cisco
IOS technologies such as policy routing, weighted fair queuing (WFQ), and weighted random
early detection (WRED), can operate on intermediate routers between GRE tunnel endpoints.
GRE tunnels are commonly used to provide dynamic routing resilience over IPsec. Normal
IPSec configurations cannot transfer routing protocols, such as Enhanced Interior Gateway
Routing Protocol (EIGRP) and Open Shortest Path First (OSPF), or non-IP traffic, such as
Internetwork Packet Exchange (IPX) and AppleTalk.
The figure illustrates ToS byte preservation in a scenario where IPsec is being used with GRE.
The original IP ToS byte values are copied initially to the IP header added by the GRE
encapsulation; the values are then copied again to the IP header added by IPsec encryption.
This process allows the packet to be processed (post-encryption) by QoS mechanisms in the
same manner as any other packet.
2009 Cisco Systems, Inc. Classification and Marking 4-113
QoS Preclassify
This topic describes the QoS preclassify feature of Cisco IOS Software.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-5
Disabled by default
Allows packets to be classified on IP header parameters other than ToS byte
values after encryption
Creates a clone of the headers of the original packet before encryption and uses
the values in the clone to make QoS decisions at the output interface
Applicable only at the encrypting router output interface
QoS Preclassify
Version Len ID Offset TTL Proto
Header
Checksum
SA DA IHL Flags
ToS
Byte

The QoS preclassify feature (also called QoS for VPNs) is often confused with ToS byte
preservation. QoS preclassify is a Cisco IOS feature that allows for packets to be classified on
header parameters other than ToS byte values after encryption.
Because all original packet header fields are encrypted, including source or destination IP
addresses, Layer 4 protocol, and source or destination port addresses, post-encryption QoS
mechanisms cannot perform classification against criteria specified within any of these fields.
A solution to this constraint is to create a clone of the original packet headers before encryption
and then use the values in the clone to make QoS decisions at the output interface.
A key point to remember regarding QoS preclassify is that it is applicable only at the
encrypting router output interface. The fields preserved by QoS preclassify are not available to
any routers downstream; the clone never leaves the router performing the encryption, thus
ensuring the integrity and security of the IPsec VPN tunnel.
QoS preclassify is supported for both GRE and IPsec and is available for these platforms:
Cisco 7100 Series VPN Routers and Cisco 7200 Series Routers (since Cisco IOS Software
Release 12.1(5)T)
Cisco 2600 and 3600 Series Routers (since Cisco IOS Software Release 12.2(2)T)
Cisco ASR 1000 Series Routers (since Cisco IOS Software XE Release 2.1)
4-114 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS preclassify is supported in all Cisco IOS switching paths and is recommended to be
enabled on some platforms even when only the ToS byte values are being used for
classification. (QoS preclassify is disabled by default.) Testing has shown that when hardware-
based encryption cards are combined with QoS, the Cisco IOS Software implementation of the
QoS preclassify feature slightly enhances performance, even when matching only on ToS byte
values. Furthermore, enabling QoS preclassify by default eliminates the possibility that its
configuration will be overlooked if the QoS policy is later changed to include matching on IP
addresses, ports, or protocols.
Design recommendations for the QoS preclassify feature can be summarized as follows:
Enable QoS preclassify on all branch IPsec VPN routers that support it.
Enable QoS preclassify on headend IPsec VPN routers only when both the VPN
termination and QoS policies reside on the same device.
Note If a packet is fragmented after encryption, only the first fragment is preclassified.
Subsequent fragments might receive different classifications. This behavior is consistent
with QoS classification of nontunneled fragments.
2009 Cisco Systems, Inc. Classification and Marking 4-115
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-6
QoS Preclassify Feature Operation
Clone of origi nal packet header created
Packet encrypted
Clone associated with encrypted packet
and sent to output interface
Classi fication
performed
against cl one
Clone does not leave router

QoS preclassify creates a clone of the original packet headers before encryption. The crypto
engine encrypts the original packet, and then the clone is associated with the newly encrypted
packet and sent to the output interface. At the output interface, QoS decisions based on header
criteria can be performed by matching values of the clone. In this way, advanced classification
can be administered, even on encrypted packets.
4-116 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring QoS Preclassify
This topic identifies the Cisco IOS commands required to configure preclassification.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-7









Configuring QoS Preclassify


Enables the QoS preclassification feature
Restricted to tunnel interfaces, virtual templates, and crypto maps
Introduced for Cisco 2600 and 3600 in Cisco IOS Release
12.2(2)T

You can use the qos pre-classify Cisco IOS command to enable the QoS preclassification
feature. Where you apply the command depends upon the type of VPN tunnel that you are
using. For GRE tunnels, apply the command to a tunnel interface. For IPsec tunnels, apply the
command to a crypto map. When configuring an IPsec encrypted IP GRE tunnel, apply the qos
pre-classify command to both the tunnel interface and the crypto map. This command can be
applied only to a tunnel interface, a crypto map, or a virtual template interface. Virtual template
interfaces are used with Layer 2 Tunneling Protocol (L2TP) tunnels; when configuring L2TP
tunnels, apply the command to a virtual-template interface.
Note If the classification policy matches on the ToS byte, it is not necessary to use the qos pre-
classify command.
2009 Cisco Systems, Inc. Classification and Marking 4-117
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-8
Configuring QoS Preclassify (Cont.)

The figure shows the successful configuration of the qos pre-classify command.
The configuration of the branch router is shown as follows:
On the S0/0 interface, there is an outgoing service policy that sets the bandwidth of the
interface at 128 kb/s and is policed at a rate of 256 kb/s. This policy is applied to any match
in the class map branch 110.
A traffic tunnel has been built on interface S0/0 (whose destination is HQ for this branch IP
address 205.51.11.5). It is on this traffic tunnel that QoS preclassification has been
configured.
The example configuration also shows that QoS preclassify has been successfully enabled on
the crypto map named vpn. This crypto map has also been applied to S0/0. If QoS preclassify is
only enabled on the crypto map and not on the tunnel interface, the router will see one flow
only, the GRE tunnel (protocol 47).
4-118 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Monitoring QoS Preclassify
This topic identifies the Cisco IOS commands used to monitor QoS preclassification.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-9











Verifying QoS Preclassify Configuration
Displays traffic seen on a specific interface
Used to verify that QoS preclassify has been successfully enabled


Use the show interfaces command to verify that the QoS preclassify feature has been enabled.
Verify by examining the queuing strategy line in the figure:

2009 Cisco Systems, Inc. Classification and Marking 4-119
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 10










Verifying QoS Preclassify Configuration
(Cont.)
Displays the current crypto map configuration
Used to verify that QoS preclassify has been successfully enabled
on a crypto map


In the example, the show crypto map command has been issued. This command will show
current crypto map configuration and also whether the QoS preclassify feature has been
successfully enabled on a crypto map.
show crypto map [interface interface | tag map-name]
Syntax Description
Parameter Description
(Optional) Displays only the crypto map set applied to the
specified interface.
(Optional) Displays only the crypto map set with the specified
map-name.

4-120 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 11
Verifying that QoS Preclassify Is
Working as Expected
Displays statistics of the policies that are attached to an interface


After you have configured a VPN and QoS for your VPN, you can use the show policy-map
interface command to verify that QoS preclassify is actually working as expected. The show
policy-map interface command output in the figure shows that class map branch110 has
matched 263 packets traversing interface GigabitEthernet0/0, while the default traffic class has
matched only 3 packets. If GigabitEthernet0/0 both terminates the VPN and holds the QoS
policy, these packet counts are a likely indication that preclassify is working; however, to
completely verify the fact, use a procedure such as the following.
Note For Cisco 3660, 3845, 7200, 7400, 7500, and ASR 1000 Series Routers, the counters
displayed after the show policy-map interface command is entered are updated only if
congestion is present on the interface. For more information on the counters displayed by
the show policy-map interface command, refer to the Understanding Packet Counters in
show policy-map interface Output document on http://www.cisco.com.
2009 Cisco Systems, Inc. Classification and Marking 4-121
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 12
Verifying that QoS Preclassify Is
Working as Expected: Example
























Router A
With QoS
Preclassify
Without
QoS
Preclassify
Crypto map interesting
traffic that matches class
map br anch110
QoS
Policy
Router B

You can use the show policy-map interface command with a procedure such as the following
to verify that QoS preclassify is working as expected:
Step 1 Configure an IPsec VPN between router A and router B. The VPN configuration
must meet the following criteria:
Telnet traffic must be designated as "interesting traffic" (traffic to be encrypted).
The crypto map must include the qos pre-classify command.
Step 2 On router B, configure a QoS policy that contains a single class map. Apply the QoS
policy to the VPN output interface of the router. The class map must meet the
following criteria:
The class map must classify traffic by examining something in the packet header
other than ToS byte values.
The class map must identify Telnet traffic.
Step 3 From a host on the router B side of the VPN, generate some Telnet traffic.
Step 4 Execute the show policy-map interface command on router B. If classification is
working properly with QoS preclassify configured, the counters for the class map
should show packets and bytes as matching the class map.
Step 5 Remove the qos pre-classify statement from the crypto map on router B.
Step 6 Use the clear counters command to clear all interface counters, including the
counters for the class map.
Step 7 Generate Telnet traffic again.
Step 8 Execute the show policy-map interface command on router B. The class map
counters should show no traffic matching the class map, thus verifying that the QoS
preclassify feature worked as expected when configured.
4-122 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 13
Summary
When packets are encapsulated by tunnel or encryption headers,
QoS features are unable to examine the original packet headers
and correctly classify the packets.
To compensate for the fact that tunneling or encryption processes
render the IP header unreadable by QoS mechanisms, ToS byte
preservation automatically copies ToS byte information from the
original IP header to the headers added by those processes.
QoS preclassify is a configurable feature that allows for packets to
be classified on header parameters other than ToS byte values
after encryption.
QoS preclassify is enabled by the qos pre-classify Cisco IOS
command, which can be used on tunnel interfaces, virtual
templates, and crypto maps.
The show interface command can be used to verify if QoS
preclassify has been enabled.




Lesson 6
Configuring QoS Policy
Propagation via BGP
Overview
The quality of service (QoS) Policy Propagation via Border Gateway Protocol (BGP) feature,
or QPPB, allows packets to be classified based on access lists, BGP community lists, and BGP
autonomous system (AS) paths. The supported classification policies include IP precedence
setting and the ability to tag the packet with a QoS class identifier internal to the router. After a
packet has been classified, you can use other QoS features, such as committed access rate
(CAR) and weighted random early detection (WRED), to specify and enforce business policies
to fit the business model.
This lesson describes the QPPB classification mechanism. QPPB features covered in this lesson
include a review of Cisco Express Forwarding and the tasks and Cisco IOS commands that are
required to configure QPPB on Cisco routers.
Objectives
Upon completing this lesson, you will be able to explain how to implement classification and
marking in an interdomain network using QPPB. This ability includes being able to meet these
objectives:
Describe the QPPB feature that propagates QoS policy via BGP
Describe the interaction between QoS and BGP
Describe Cisco Express Forwarding switching on Cisco IOS platforms
List the steps required to configure QPPB on Cisco routers
Identify the Cisco IOS commands required to configure QPPB on Cisco routers

4-124 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Policy Propagation via BGP
This topic describes the QPPB feature, which propagates QoS policy via BGP.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-2
QoS Policy Propagation on BGP
QPPB uses BGP attributes to advertise CoS to other routers in
the network.
BGP communities are usually used to propagate CoS information
bound to IP networks.
Packet classification policy can be propagated on BGP without
having to use complex access lists at each of a large number of
border (edge) routers.
A route map is used to translate BGP information (for example,
BGP community value) into IP precedence or QoS group.
QPPB can only classify and mark inbound packets.

BGP is an interdomain routing protocol that exchanges reachability information with other
BGP systems. The QoS policy propagation via the BGP feature allows classifying packets
based on access lists, BGP community lists, and BGP AS paths.
The supported classification policies include IP precedence setting and the ability to tag the
packet with a QoS class identifier internal to the router. After a packet has been classified, you
can use other QoS features such as policing, WRED, and traffic shaping to specify and enforce
business policies to fit the business model.
The QPPB feature has these enhancements:
QoS group ID: An internal QoS group ID can be set that can be used later to perform
policing or weighted fair queuing (WFQ) based on the QoS group ID.
Source and destination address lookup: Specify whether the IP precedence level or QoS
group ID is obtained from the source (input) address or destination (output) address entry in
the route table.

2009 Cisco Systems, Inc. Classification and Marking 4-125
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-3
BGP Marking
Propagate the CoS by encoding it into BGP attributes:
BGP communities
AS paths
IP prefixes
Any other BGP attribute
Translate the selected BGP attribute into either:
IP precedence
QoS group
Enable Cisco Express Forwarding and packet marking on interfaces

The figure shows three elements used on inbound packets to support QPPB operation.
Propagate the class of service (CoS) by encoding a value based on the following BGP
attributes:
BGP communities
AS paths
IP prefixes
Any other BGP attribute
Translate the selected BGP attribute into either:
IP precedence
QoS group
Enable Cisco Express Forwarding and packet marking on interfaces.

4-126 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS and BGP Interaction
This topic describes the interaction between QoS and BGP.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-4
QoS and BGP Interaction
QoS features work independently of BGP routing.
BGP is used only to propagate policies for source or destination
IP prefixes through the network.

When using QPPB, the QoS feature works independently from BGP routing. BGP is only used
to propagate the QoS policy.
In QPPB configurations, you specify whether to use IP precedence or the QoS group ID
obtained from the source (input) address or destination (output) address entry in the routing
table. You can specify either the input or output address.

2009 Cisco Systems, Inc. Classification and Marking 4-127
Cisco Express Forwarding
This topic describes Cisco Express Forwarding switching on Cisco IOS platforms.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-5
Cisco Express Forwarding
The two main components of Cisco Express Forwarding
operation:
Forwarding Information Base
Adjacency tables
Cisco Express Forwarding was first introduced on the following
platforms:
Cisco 7x00 Series in Cisco IOS Release 11.1CC
All RISC-based platforms in Cisco IOS Release 12.0

When you initialize the router for Cisco Express Forwarding, two tables are created in the
router:
Forwarding Information Base (FIB) table: Lists all paths to all reachable networks,
together with the output interface information
Adjacency table: Lists all required next-hops on output interfaces
To enable scalable forwarding, Cisco Express Forwarding builds a forwarding table called the
FIB. Contrary to demand-switching methods, the FIB is not a small subset of the routing table.
The FIB is a full extract of the routing table, with all the forwarding parameters precalculated at
the time of FIB creation, and updated with any topology (routing table) changes.
The second table is the adjacency table, which contains all the Layer 2 next-hops currently
being used by the router to forward traffic.
The two tables are interconnected, so that every destination network is linked to its appropriate
local next-hop adjacency. Many destinations can be linked to the same next-hop adjacency,
removing redundancy and increasing manageability of Cisco Express Forwarding tables.
Moreover, a single destination can point to multiple next-hop adjacencies, enabling flexible
traffic load-balancing.

4-128 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-6
Cisco Express Forwarding
Review: Standard IP Switching

The figure shows a sequence of events when process switching and fast switching for
destinations learned via BGP, as follows:
Step 1 When a BGP update is received and processed, an entry is created in the routing
table.
Step 2 When the first packet arrives for this destination, the router tries to find the
destination in the fast-switching cache. Because the packet is not there, process
switching has to switch the packet when the process is run. The process performs a
recursive lookup to find the outgoing interface. The process may possibly trigger an
Address Resolution Protocol (ARP) request or find the Layer 2 address in the ARP
cache. Finally, the process creates an entry in the fast-switching cache.
Step 3 All subsequent packets for the same destination are fast-switched. The switching
occurs in the interrupt code (the packet is processed immediately). Fast destination
lookup is performed (no recursion).
The encapsulation uses a pregenerated Layer 2 header that contains the destination as well as
Layer 2 source (MAC) address. No ARP request or ARP cache lookup is necessary.

2009 Cisco Systems, Inc. Classification and Marking 4-129
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-7
Cisco Express Forwarding
Review: Cisco Express Forwarding Switching

The generation of entries in the FIB table is not packet-triggered, but change-triggered. When
something changes in the IP routing table, the change is also reflected in the FIB table.
Because the FIB contains the complete IP switching table, the router can make definitive
decisions based on the FIB. Whenever a router receives a packet that should be Cisco Express
Forwarding-switched, but the destination is not in the FIB, the packet is dropped.
The FIB table is also different from other fast-switching caches in that it does not contain
information about the outgoing interface and the corresponding Layer 2 header. That
information is stored in a separate table, the adjacency table. The adjacency table is more or
less a copy of the ARP cache, but instead of holding only the destination MAC address, the
adjacency table holds the Layer 2 header (source and destination MAC address).
The figure illustrates how the Cisco Express Forwarding switching entries are created. When a
route is added or changed in the main routing table (for example, learned via BGP), a new FIB
entry is created, and the next hop is calculated via recursive lookups to the routing table (if
necessary). The FIB entry is then linked to the next-hop adjacency entry, which provides the
necessary Layer 2 information used to forward the packet on the output medium.

4-130 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-8
Cisco Express Forwarding Switching
with QoS Packet Marking

In the figure, the tables are again displayed, with the difference that BGP communities being
translated to IP precedence and QoS group are also inserted into the FIB table.

2009 Cisco Systems, Inc. Classification and Marking 4-131
QPPB Configuration Tasks
This topic describes how to configure QPPB on Cisco routers.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-9
QPPB Configuration Tasks
1. Create a route map to set IP precedence or QoS group.
2. Apply the route map to BGP routes transferred to main IP
routing table.
3. Enable per-interface packet marking.

When setting up a BGP policy, there are three required steps to consider:
Step 1 Create a route map to set IP precedence or QoS group. Use the route-map command
to accomplish this task, as follows:




Step 2 Apply the route map to BGP routes that are in the BGP table. Use the table-map
command to accomplish this task, as follows:



Step 3 Enable the required interface for packet marking. Use the bgp-policy command to
accomplish this task, as follows:



4-132 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring QPPB
This topic describes the Cisco IOS commands that are required to configure QPPB.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 10
Setting IP Precedence or QoS Group in
the IP Routing Table
Defines a route map to set IP precedence or QoS group
Specifies IP precedence and QoS group values in the routing
table/FIB table entry
Specifies the route map used to set additional routing table
attributes


Use the route-map command to define a route map to match based on a BGP community list,
BGP AS path, or access list, and to set the IP precedence or QoS group. To set the IP
precedence value (and an optional IP number or IP name) in the IP header, use the set IP
precedence route-map configuration command. To leave the precedence value unchanged, use
the no form of this command.
The syntax for the set ip precedence command is as follows:

Syntax Description
Parameter Description
precedence | name

A number or name that sets the precedence bits in the IP header.
The values for the precedence argument and the corresponding
name argument are listed in the table from least to most
important.

2009 Cisco Systems, Inc. Classification and Marking 4-133
The table lists the values for the precedence argument and the corresponding name argument
for precedence values in the IP header. They are listed from least to most important.
Precedence Name
0 routine
1 priority
2 immediate
3 flash
4 flash-override
5 critical
6 Internet
7 network
To set a group ID that can be used later to classify packets, use the set qos-group QoS policy
map configuration command. To remove the group ID, use the no form of this command.
set qos-group group-id
Syntax Description
Parameter Description
Group ID number in the range from 0 to 99
Note To display QoS group information, use the show ip cef command.
Use the BGP table-map command to apply the route map to the BGP routing process. This will
populate the corresponding BGP routes in the IP routing table and FIB with the CoS (IP
precedence and/or QoS group) information. To modify metric and tag values when the IP
routing table is updated with BGP learned routes, use the table-map command in address
family or router configuration mode. To disable this function, use the no form of the command.
The syntax for the table-map command is as follows:

Syntax Description
Parameter Description
map-name Route map name, from the route-map command
The syntax shown in the figure for the match as-path and table-map commands is the same as
the syntax for the match as-path and table-map commands in Cisco IOS Software Release
12.4.
The syntax shown in the figure for the route-map, match ip address, match community, set
ip precedence, and set ip qos-group commands is compatible with Cisco IOS Software
Release 12.4.

4-134 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 11
Enable Per-Interface Packet Marking
Marks packets using the IP precedence based on the packet
source address or destination address.
If both source and destination are specified on an interface, the
software lookup for the destination address occurs last and the
packet is re-marked based on the destination address.
Marks packets using the QoS group ID based on the packet
source address or destination address.


After the CoS information (IP precedence or QoS group) in the IP routing table and the FIB
table, you can configure Cisco Express Forwarding-based markings on the input interfaces by
using the bgp-policy interface configuration command.
Using the bgp-policy interface configuration command, you can furnish the Cisco Express
Forwarding-based markings based on the source or destination address of an incoming packet.
Use the source option to mark packets sourced from a customer. Use the destination option to
mark packets destined to a customer.
You can mark the packets with the IP precedence or QoS group value from the FIB table. Use
the ip-prec-map option to mark the packets with IP precedence, and use the ip-qos-map option
to mark the packets with a QoS group.
The syntax for the bgp-policy command is as follows:

Syntax Description
Parameter Description
source The IP precedence bit or QoS group ID from the source address
entry in the route table
destination The IP precedence bit or QoS group ID from the destination
address entry in the route table
ip-prec-map QoS policy based on the IP precedence
ip-qos-map The QoS policy based on the QoS group ID
The syntax shown in the figure for the bgp-policy command is compatible with Cisco IOS
Software Release 12.4.

2009 Cisco Systems, Inc. Classification and Marking 4-135
Note If you specify both source and destination on the interface, the software looks up the
source address in the routing table and classifies the packet based on the source address
first; then the software looks up the destination address in the routing table and reclassifies it
based on the destination address.

4-136 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Configuration
































In this example, the community attribute is being matched and then the action is taken on those
attributes. If the community is 60:1 (IP community list 1), its IP precedence will be set to
priority and the QoS group will be set to 1, as specified in the route map precedence map.

2009 Cisco Systems, Inc. Classification and Marking 4-137
If the community attribute is 60:2 (IP community list 2), its IP precedence will be set to
immediate.
The policy is then applied to the interface HSSI 5/0/0/0.1, using the bgp-policy source
command. The ip-prec-map keyword indicates that the QoS policy is based on IP precedence.

4-138 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Configuring QPPB
The figure shows an example of configuring QPPB.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 12
Configuring QPPB
Example
Create an end-to-end QoS solution in a service provider
network:
The customer in AS 73 is a premium customer.
All packets to AS 73 will be sent with IP precedence flash.
This example illustrates destination-based IP precedence marking
using QPPB.

In a service-provider network, an end-to-end QoS solution must be created.
The requirements for the example are as follows:
The customer in AS 73 is a premium customer.
All packets to AS 73 are sent with IP precedence flash.

2009 Cisco Systems, Inc. Classification and Marking 4-139
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 13
Step 1: Distribute QoS Functions

Because you are going to create an end-to-end QoS solution, this figure illustrates the first step:
Routes that are received from AS 24 and destined for AS 73 will have IP precedence set to
flash on the network access point (NAP) router (in AS 12).
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 14
Step 2: Select QoS Mechanisms

The figure shows the second requirement: Enable Cisco Express Forwarding-based marking on
the NAP router serial interface connecting to AS 24.

4-140 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 15
Step 3: Design Individual
QoS Mechanisms

This figure shows the third requirement, consisting of the following:
BGP routes that are received into AS 12 from AS 73 will be marked with a community
value of 12:17 on the point of presence (POP) router.
Community propagation will have to be configured on the POP router so that the
community value of 12:17, set on the POP router, will be propagated to the NAP router.
All the BGP routes with a community of 12:17 in the IP routing table and the FIB table on
the AS 12 NAP routers will contain the IP precedence flash.

2009 Cisco Systems, Inc. Classification and Marking 4-141
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 16
Mark Routes Coming from AS 73

The figure shows the configuration that is necessary to meet the requirement that routes coming
from AS 73 will be marked with the special community value of 12:17.
Use this configuration on the POP router to mark BGP routes from AS 73 with the community
value 12:17:







4-142 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 17
Configure Community Propagation

The figure shows the configuration that is necessary to propagate the special community value,
12:17, which has been added on the POP router and will be seen on the NAP router.
The following configuration is used on the POP router to mark to propagate the community
value (12:17) to the NAP router:




2009 Cisco Systems, Inc. Classification and Marking 4-143
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 18
Set FIB Table Based on BGP Community

The NAP router in AS 12 uses a route map to translate BGP community values into appropriate
IP precedence values. This figure illustrates how all BGP routes carrying BGP community
12:17 are tagged with IP precedence flash in the routing table and the FIB table. All other BGP
routes are tagged with IP precedence 0.
The following configuration is used on the NAP router to set or change the IP precedence of
those BGP routes that match the community value (12:17):











The configuration shows that if the route map PremiumCheck matches the community attribute
of 12:17, the corresponding packet will have its IP precedence changed to flash, as required in
the example.

4-144 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 19
Configure Cisco Express Forwarding
Packet Marking

The last configuration step is to enable Cisco Express Forwarding-based marking on the NAP
router in AS 12. This example requires that all packets going to (destination-based marking) the
customer network (AS 73) be marked with IP precedence flash.
In this case, the AS 12 NAP router HSSI 0/0 interface connects to AS 24. Therefore, the
bgp-policy destination ip-prec-map command is configured under the HSSI 0/0 interface to
enable destination-based Cisco Express Forwarding-based marking. All packets from AS 24
destined to customer AS 73 will be marked with IP precedence flash.
QPPB marking is only available in combination with Cisco Express Forwarding switching. The
global ip cef command enables Cisco Express Forwarding switching on all interfaces that
support Cisco Express Forwarding.
The following configuration is used on the NAP router to configure Cisco Express Forwarding
packet marking:





2009 Cisco Systems, Inc. Classification and Marking 4-145
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 20
Summary
The QoS policy propagation via the QPPB BGP feature allows
classifying packets based on access lists, BGP community lists,
and BGP AS paths.
When using QPPB, QoS works independently from BGP routing.
Cisco Express Forwarding switching with QoS packet marking will
populate the FIB table with IP precedence and QoS group values.
Route maps are used to set IP precedence and QoS group ID.
The bgp-policy Cisco IOS command (interface level) is used to
mark the QoS policy via BGP.


4-146 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 7
Configuring LAN Classification
and Marking
Overview
A switch may operate at wire speeds, but because most switches have been inherently designed
to accommodate oversubscriptionsuch as having more access ports than uplink portsthe
switch may congest. During times of congestion, if the congestion management features are not
in place, packets will be dropped. When packets are dropped, retransmissions occur. When
retransmissions occur, the network load can increase. In networks that are already congested,
an increase in network load can add to existing performance issues and potentially further
degrade performance. With converging networks, congestion management is even more
critical. Latency-sensitive traffic, such as voice and video, can be severely impacted if delays
are incurred. Simply adding more buffers to a switch will not necessarily alleviate congestion
problems. Latency-sensitive traffic must be switched as fast as possible. First, this important
traffic must be identified through classification techniques, and then buffer management
techniques must be implemented to prevent the higher priority traffic from being dropped
during congestion.
This lesson describes classification and marking as it is implemented on Cisco Catalyst
switches. Topics covered include LAN classification and marking options and platforms, and
configuring and monitoring LAN-based classification and marking.
Objectives
Upon completing this lesson, you will be able to describe LAN-based methods for
implementing classification and marking. This ability includes being able to meet these
objectives:
Describe LAN-based classification and marking using a Layer 2 Catalyst workgroup switch
Describe QoS trust boundaries and explain their significance in LAN-based classification
and marking
Describe several of the Catalyst switches and identify the different classification and
marking options available on Cisco Layer 2 and Layer 3 switching platforms
4-148 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Identify the Cisco IOS commands required to configure LAN-based classification and
marking
Identify some of the Cisco IOS commands required to monitor LAN-based classification
and marking
2009 Cisco Systems, Inc. Classification and Marking 4-149
LAN-Based Classification and Marking
This topic describes LAN-based classification and marking using a Layer 2 Catalyst workgroup
switch.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-2
LAN-Based Classification and Marking
Classification and marking should typically be performed as close
to the source of the traffic as possible.
Defining trust boundaries is important when performing
classification and marking in the LAN.
For QoS marking transparency, mapping between Layer 2 and
Layer 3 classification schemes must be accomplished.
Cisco Catalyst switches have classification and marking
capabilities and are ideal locations for performing these critical
QoS functions.
Classification and marking mechanisms of workgroup switches
are based on DSCP and CoS, but compatibility
with IP precedence can be achieved because DiffServ is
backwards-compatible.
Only ports that have been configured as ISL or 802.1Q trunks can
carry Layer 2 CoS values.

The Cisco Catalyst line of multilayer switches includes the capability to provide quality of
service (QoS) at Layer 2 or Layer 3, depending on the switch type. At Layer 2, the frame uses
class of service (CoS) in 802.1p and Inter-Switch Link (ISL). CoS uses three bits, similar to IP
precedence, and maps well from Layer 2 to Layer 3, and vice versa.
The switches have the capability to differentiate frames based on CoS settings. If multiple
queues are present, frames can be placed in different queues and serviced via weighted round
robin (WRR) or shaped round robin (SRR) scheduling algorithms.
Classification is only performed on a Cisco Catalyst switch if QoS has been globally enabled
on the switch.
4-150 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Trust Boundaries
This topic describes QoS trust boundaries and their significance in LAN-based classification
and marking.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-3
QoS Trust Boundaries in the LAN
Benefits of applying QoS at the edge of the network:
Provides the ability to classify and mark traffic immediately
Minimizes upstream congestion
Frees up router processing power

You should apply QoS as close to the source of the traffic as possible.
These are some of the benefits of applying QoS at the edge (or close to the source of the
traffic):
Provides the ability to classify and mark traffic immediately
Reduces CPU use of upstream devices, thus reducing the possibility that priority traffic,
such as voice, is delayed at some point further in the network
Frees up router processing power, as Catalyst switches perform QoS operations in
hardware (with no incremental CPU load)
2009 Cisco Systems, Inc. Classification and Marking 4-151
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-4
QoS Trust Boundary in the LAN:
Classify and Mark Where?
Cisco QoS model assumes that the CoS carried in a frame may or may
not be trusted by the network device.
Classification should be done as close to the edge as possible.
End hosts such as user PCs generally cannot be trusted to correctly tag
a packet priority.

Classification should take place at the network edge, typically in the wiring closet or within
video endpoints or IP phones themselves.
The figure demonstrates this with an IP telephony example. Packets can be marked as
important by using Layer 2 CoS settings in the user priority bits of the 802.1p portion of the
802.1p or 802.1Q fields, or the IP precedence and differentiated services code point (DSCP)
bits in the type of service (ToS) or Differentiated Services (DiffServ) field in the IPv4 header.
Cisco IP phones can mark voice packets as high priority using CoS and DSCP. By default, the
IP phone sends 802.1p-tagged packets with the CoS set to a value of 5 and the DSCP set to
Expedited Forwarding (46).
In a Cisco IP telephony environment, PCs are placed in a native VLAN, meaning that their
Ethernet packets are untagged. This means that (properly formatted) Ethernet frames
originating from a PC will not have an 802.1p field and thus no provision to set CoS values.
Additionally, by default, DSCP values or packets originating from PCs are set to 0.
A special case exists when the networking stack in the PC has been modified to send packets
with a CoS or DSCP value other than zero. Typically, this does not happen, but even if the PC
sends tagged frames with a specific CoS value, Cisco IP phones can zero out the CoS value
before sending the frames to the switch. This is the default behavior. Voice frames coming
from the IP phone have a CoS of 5 and data frames coming from the PC have a CoS of 0. When
the switch receives these frames, it can take into account these values for further processing
based on its capabilities.
Some switches also use queues to buffer incoming frames before sending the frames to the
switching engine. (It is important to remember that input queuing, such as output queuing,
comes into play only when there is congestion.) The switch uses the CoS values to put the
frames in appropriate queues. The switch can employ congestion management mechanisms,
such as WRR or SRR, as well as congestion avoidance mechanisms, such as weighted random
early detection (WRED), or weighted tail drop (WTD) on either input or output queues.
4-152 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-5
Connecting the IP Phone
802.1Q trunking between the switch and IP phone for multiple VLAN support
(separation of voice and data traffic) is preferred.
The 802.1Q header contains the VLAN information and the CoS 3-bit field, which
determines the priority of the packet.
For most Cisco IP phone configurations, traffic sent from the IP phone to the
swit ch is trusted to ensure that voice traffic is properly prioritized over other types
of traffic in the network.
The trusted boundary feature uses Cisco Discovery Protocol to detect an IP phone
and otherwise disables the trusted setting on the switch port to prevent misuse of
a high-priority queue.

In a typical network, a Cisco IP phone is connected to a switch port as shown in the figure.
Traffic sent from the telephone to the switch is typically marked with a tag that uses the 802.1Q
header. The header contains the VLAN information and the CoS three-bit field, which
determines the priority of the packet. For most Cisco IP phone configurations, the traffic sent
from the telephone to the switch is trusted to ensure that voice traffic is properly prioritized
over other types of traffic in the network. By using the mls qos trust device cisco-phone and
the mls qos trust cos interface configuration commands, the switch port to which the telephone
is connected can be configured to trust the CoS labels of all traffic received on that port.
2009 Cisco Systems, Inc. Classification and Marking 4-153
LAN Classification and Marking Platforms
This topic describes several of the Cisco Catalyst switches, identifying the different
classification and marking options available on Layer 2 and Layer 3 switching platforms.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-6
Classification and Marking on
Catalyst Switches
6500 (PFC)
4500 (Sup II plus,
III, IV, V)
3750 3550 , 3560 (2970)
Trust Capabi lities
CoS
DSCP
IP precedence
(Module-
dependent)
Extend trust
to IP phone
CoS
DSCP
---
(Module-
dependent)
Extend trust
to IP phone
CoS
DSCP
IP Precedence
IP Phone
Extend trust to IP
phone
CoS
DSCP
IP Precedence
IP Phone
Extend trust
to IP phone
CoS to DSCP and
DSCP to CoS
Mapping Tables
Yes Yes Yes Yes
IPP to DSCP
Mapping Table
Yes Yes Yes Yes
DSCP Options
(pass-thru,
mutation)
Yes
Yes
(no mutation)
Yes Yes
ACL Yes Yes Yes Yes
Class-Based
Marki ngs
Yes Yes Yes Yes

Catalyst 6500
Classification can be performed only on the Catalyst 6500 Switch when QoS has been globally
enabled. By default, QoS is globally disabled and classification does not occur.
With a policy feature card (PFC), QoS can classify traffic that is addressed to a specified MAC
address, or VLAN pairs to be marked with a configured CoS value. Classification can also be
performed against Layer 3 and Layer 4 values. Marking may be by Layer 2 CoS or Layer 3 IP
precedence or DSCP values.
QoS schedules traffic through the transmit queues based on CoS values and uses CoS-value-
based transmit-queue drop thresholds to avoid congestion in traffic that is transmitted from
Ethernet-based ports. The implementation of scheduling and congestion avoidance is line card
hardware- dependent, and with each specific line card family different queue capabilities exist.
Queues are defined in terms of number of queues, the type of queue, and the number of drop
thresholds per queue. Here are three examples:
2q2t: Indicates two standard queues, each with two configurable tail-drop thresholds
1p2q2t: Indicates one strict-priority queue and two standard queues, each with two
configurable WRED drop thresholds
1p3q1t: Indicates one strict-priority queue and three standard queues, each with one
configurable WRED drop threshold (On 1p3q1t ports, each standard queue also has one
nonconfigurable tail-drop threshold.)
4-154 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
With 1p3q1t, the three standard transmit queues each have one WRED drop threshold and one
nonconfigurable tail-drop threshold, and the frames, by default, are handled as follows:
Frames with CoS 5 go to the strict-priority transmit queue (queue 4), where the switch
drops frames only when the buffer is 100 percent full.
Frames with CoS 0 and 1 go to the low-priority standard transmit queue (queue 1).
Frames with CoS 2, 3, or 4 go to the medium-priority standard transmit queue (queue 2).
Frames with CoS 6 or 7 go to the high-priority standard transmit queue (queue 3).
Catalyst 4500
Classification on the Catalyst 4500 Switch can be performed only if QoS is globally enabled on
the switch. By default, QoS is globally disabled and classification does not occur.
You must specify which fields in the frame or packet will be used to classify incoming traffic.
For IP traffic, you have these classification options:
Trust the IP DSCP in the incoming packet (configure the port to trust DSCP), and assign
the same DSCP to the packet for internal use.
Trust the CoS value (if present) in the incoming packet, and generate the DSCP by using
the CoS-to-DSCP map.
Perform the classification based on a configured IP standard or extended access control list
(ACL), which examines various fields in the IP header. If no ACL is configured, the packet
is assigned the default DSCP based on the trust state of the ingress port; otherwise, the
policy map specifies the DSCP to assign to the incoming frame.
You can classify a packet for QoS using multiple match criteria, and the classification can
specify whether the packet should match all of the specified match criteria or at least one of the
match criterion. To define a QoS classifier, provide the match criteria using the match
statements in a class map. In the match statements, specify the fields in the packet to match
on, or use IP standard or IP extended ACLs.
During QoS processing of a frame, the switch represents its priority with an internal DSCP
value:
During classification, QoS uses configurable mapping tables to derive the internal DSCP
from received CoS. These maps include the CoS-to-DSCP map.
During policing, QoS can assign another DSCP value (if the packet is out of profile and the
policer specifies a marked-down DSCP value).
Before the traffic reaches the scheduling stage, QoS uses the internal DSCP to select one of
the four egress queues for output processing. You can configure the DSCP-to-egress queue
mapping by using the qos map dscp to tx-queue command.
The CoS-to-DSCP and DSCP-to-CoS maps have default values that might or might not be
appropriate for the network.
Each physical port has four transmit queues (egress queues). Each packet that needs to be
transmitted is attached to one of the transmit queues. The transmit queues are then serviced
based on the transmit queue scheduling algorithm.
2009 Cisco Systems, Inc. Classification and Marking 4-155
After the final transmit DSCP is computed (including any markdown of DSCP), the transmit-
DSCP-to-transmit-queue mapping configuration determines the transmit queue. The packet is
placed in the transmit queue of the transmit port, determined from the transmit DSCP. Use the
qos map dscp to tx-queue command to configure the transmit DSCP to transmit queue
mapping.
You can configure the transmit queue 3 on each port as the priority queue using the priority
high tx-queue configuration command in the interface configuration mode. When transmit
queue 3 is configured with higher priority, packets in transmit queue 3 are scheduled ahead of
packets in other queues.
Catalyst 3750
The Catalyst 3750 Switch supports Layer 3 routing and may be found in either the access layer
or the distribution layer. QoS is globally disabled by default on the Catalyst 3750. While QoS is
disabled, all frames and packets are passed through the switch unaltered (which is equivalent to
a trust CoS and trust DSCP state on all ports). When QoS is globally enabled, however, all
DSCP and CoS values are (by default) set to 0 (which is equivalent to an untrusted state on all
ports). QoS must be enabled globally for configured policies to become effective.
Generally, the Catalyst 3750 is relatively compatible in QoS features and syntax with the
Catalyst 3550, except with respect to queuing and dropping.
As in the Catalyst 6500, queues are defined in terms of number of queues, the type of queue,
and the number of drop thresholds per queue. The Catalyst 3750 supports four egress queues,
which can be configured on a per-interface basis to operate in either 4q3t or 1p3q3t modes.
Additionally, the Catalyst 3750 supports two queue sets, allowing certain interfaces to be
configured in one manner and others to be configured in a different manner. For example, some
interfaces may be assigned to queue set 1 operating in 4q3t mode, while others may be assigned
to queue set 2 operating in 1p3q3t mode.
However, unlike the Catalyst 2950 and 3550, the Catalyst 3750 has queue 1 (not queue 4) as
the optional priority queue. In a converged campus environment, it is recommended to enable
the priority queue via the priority-queue out interface command.
Note The Catalyst 3750 also supports two configurable ingress queues (normal and expedite).
Ingress scheduling, however, is rarely, if ever, required, because it only becomes enabled if
the combined input rates from any or all switch ports exceed the capacity of the switch
fabric. Such cases are extremely difficult to achieve, even in controlled lab environments. In
the extreme case in which such a scenario develops in a production environment, the
default settings of the ingress queues are acceptable to maintain VoIP quality and network
availability.
The three remaining egress queues on the Cisco Catalyst 3750 are scheduled by SRR, which
can be configured to operate in shaped mode or in shared mode.
The Catalyst 3750 supports three WTD thresholds per queue. Two of these thresholds are
configurable (explicit); the third is non-configurable (implicit), because it is set to the queue-
full state (100%). These thresholds can be defined with the mls qos queue-set output
threshold global command.
4-156 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Once the queues and thresholds have been defined, traffic can be assigned to queues and
thresholds either by CoS values or DSCP values, using the mls qos srr-queue output cos-map
queue and mls qos srr-queue output dscp-map queue global commands, respectively.
Catalyst 3550
Each Gigabit-capable Ethernet port has four egress queues, one of which can be the egress
expedite or priority queue. If the expedite (priority) queue is enabled, WRR services it until the
queue is empty before servicing the other three queues. Ingress frame or packet classification
options include the following:
Non-IP traffic:
Use the port default. If the frame does not contain a CoS value, the switch assigns
the default port CoS value to the incoming frame. Then the switch uses the
configurable CoS-to-DSCP map to generate the internal DSCP value.
Trust the CoS value in the incoming frame (configure the port to trust CoS). Then
the switch uses the configurable CoS-to-DSCP map to generate the internal DSCP
value. Layer 2 ISL frame headers carry the CoS value in the three least-significant
bits of the one-byte User field. Layer 2 802.1Q frame headers carry the CoS value in
the three most significant bits of the Tag Control Information (TCI) field. CoS
values range from 0 for low priority to 7 for high priority.
The trust-DSCP and trust-IP precedence configurations are meaningless for non-IP
traffic. If a port is configured with either of these options and non-IP traffic is
received, the switch assigns the default port CoS value and generates the internal
DSCP from the CoS-to-DSCP map.
Perform the classification based on the configured Layer 2 MAC ACL, which can
examine the MAC source address, the MAC destination address, and the EtherType
field. If no ACL is configured, the packet is assigned the default DSCP of 0, which
means best-effort traffic; otherwise, the policy map specifies the DSCP to assign to
the incoming frame.
IP traffic:
Trust the IP DSCP in the incoming packet (configure the port to trust DSCP), and
assign the same DSCP to the packet for internal use. The Internet Engineering Task
Force (IETF) defines the six most significant bits of the one-byte ToS field as the
DSCP. The priority represented by a particular DSCP value is configurable. DSCP
values range from 0 to 63.
Trust the IP precedence in the incoming packet (configure the port to trust IP
precedence), and generate a DSCP by using the configurable IP precedence-to-
DSCP map. The IPv4 specification defines the three most significant bits of the one-
byte ToS field as the IP precedence. IP precedence values range from 0 for low
priority to 7 for high priority.
Trust the CoS value (if present) in the incoming packet, and generate the DSCP by
using the CoS-to-DSCP map.
Perform the classification based on a configured IP standard or an extended ACL,
which examines various fields in the IP header. If no ACL is configured, the packet
is assigned the default DSCP of 0, which means best-effort traffic; otherwise, the
policy map specifies the DSCP to assign to the incoming frame.
2009 Cisco Systems, Inc. Classification and Marking 4-157
Class maps and policy maps:
A class map is a mechanism used to name and isolate a specific traffic flow, or class,
from all other traffic. The class map defines the criteria that is used to match against
a specific traffic flow to further classify it; the criteria can include matching the
access group defined by the ACL, matching a specific list of DSCP or IP precedence
values, or matching a specific list of VLAN IDs associated with another class map
that defines the actual criteria (for example, to match a standard or extended ACL).
If there is more than one type of traffic that needs to be classified, another class map
is created using a different name. After a packet is matched against the class-map
criteria, it is further classified through the use of a policy map.
A policy map specifies which traffic class to act on. Actions can include trusting the
CoS, DSCP, or IP precedence values in the traffic class; setting a specific DSCP or
IP precedence value in the traffic class; or specifying the traffic bandwidth
limitations and the action to take when the traffic is out of profile. Before a policy
map can be effective, it must be attached to an interface.
Catalyst 2970 and 3560
The default CoS-to-DSCP, IP precedence-to-DSCP, and DSCP-to-CoS maps for all
Catalyst 2970 and 3560 Switches are identical to those for the Catalyst 3550 Switch, as are
mapping functions and syntax, including DSCP mutation.
4-158 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-7
Classification and Marking on
Catalyst Switches (Cont.)
2950 2960
Trust
Capabilities
CoS
DSCP
---
IP phone
Extend trust to IP
phone
CoS
DSCP
IP precedence
IP phone
Extend trust to IP
phone
CoS to DSCP and
DSCP to CoS Mapping
Tables
Yes Yes
IPP to DSCP Mapping
Table
No Yes
DSCP Options (pass-
thru, mutation)
Yes
(no mutation)
Yes
ACL
Yes
(no mutation)
Yes
(no port range)
Class-Based Mar kings Yes Yes

Catalyst 2950
Cisco Catalyst 2950 Series Switches offer superior and highly granular QoS based on Layer 2
through Layer 4 information to ensure that network traffic is classified and prioritized, and that
congestion is avoided in the best possible manner.
Cisco Catalyst 2950 series switches can classify, reclassify, police (determine if the packet is in
or out of predetermined profiles and affect actions on the packet), and mark or drop incoming
packets before the packets are placed in the shared buffer. Packet classification allows the
network elements to discriminate between various traffic flows and enforce policies based on
Layer 2 and Layer 3 QoS fields.
The QoS implementation is based on the DiffServ architecture, an IETF standard. The DiffServ
architecture specifies that each packet is classified upon entry into the network. The
classification is carried in the IP packet header, using six bits from the deprecated IP ToS field
to carry the classification information.
Classification can be carried out using prioritization values in the Layer 2 frame information, as
follows:
Layer 2 802.1Q frame headers are used in trunks, except for native VLAN frames.
Other non-802.1Q frame types cannot carry Layer 2 CoS values.
Classification can also be carried out using prioritization bits in the Layer 3 IP packets, with
DSCP values 0, 8, 10, 16, 18, 24, 26, 32, 34, 40, 46, 48, and 56 only.
Note The Catalyst 2950 Switch does not support VLAN-based classification.

2009 Cisco Systems, Inc. Classification and Marking 4-159
The Catalyst 2950 switch supports four egress queues, which allow you to be discriminating in
assigning priorities for the various applications on the LAN. Strict-priority scheduling helps
ensure that time-sensitive applications such as voice always follow an expedited path through
the switch fabric. WRR scheduling, another significant enhancement, ensures that lower-
priority traffic receives attention without comprising the priority settings administered by a
network manager. These features allow you to prioritize mission-critical, time-sensitive traffic
such as voice (IP telephony traffic); enterprise resource planning (ERP) applications, such as
Oracle, SAP, and so on; and computer-aided design (CAD) and computer-aided manufacturing
(CAM) over less time-sensitive applications such as FTP or email (Simple Mail Transfer
Protocol [SMTP]).
Actions at the egress interface include queuing and scheduling. Queuing evaluates the CoS
value and determines which of the four egress queues to place the packet in. Scheduling
services the four egress queues based on their configured WRR.
The Catalyst 2950 supports packet classification based on QoS ACLs, as follows:
IP standard, IP extended, and Layer 2 MAC ACLs can be used to define a group of packets
with the same characteristics (class). In the QoS context, the permit and deny actions in the
access control entries (ACEs) have different meanings than with security ACLs.
If a match with a permit action is encountered (first-match principle), the specified QoS-
related action is taken.
If no match with a permit action is encountered and all the ACEs have been examined, no
QoS processing occurs on the packet.
If multiple ACLs are configured on an interface, the packet matches the first ACL with a
permit action, and QoS processing begins.
Configuration of a deny action is not supported in QoS ACLs on the switch.
After a traffic class has been defined with the ACL, a policy can be attached to it. A policy
might contain multiple classes with actions specified for each one of them. A policy might
include commands to classify the class as a particular aggregate (for example, assign a DSCP)
or to rate-limit the class. The policy is then attached to a particular port on which it becomes
effective.
You can implement IP ACLs to classify IP traffic by using the access-list global configuration
command. You can implement Layer 2 MAC ACLs to classify Layer 2 traffic by using the mac
access-list extended global configuration command.
In the case of frames that arrive without a CoS value (untagged frames), these switches support
classification based on a default CoS value per port assigned by the network administrator.
After the frames have been classified or reclassified using one of the above modes, the frames
are assigned to the appropriate queue at the egress port.
Note To use the features described in this chapter, you must have the Enhanced Image (EI)
installed on your switch.
4-160 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Catalyst 2960
The Cisco Catalyst 2960 Series Switches provide the following classification options for non-
IP traffic:
Trust the CoS value in the incoming frame by configuring the port to trust CoS. Then use
the configurable CoS-to-DSCP map to generate a DSCP value for the packet. If you
configure a port to trust DSCP or IP precedence values and non-IP traffic is received, the
switch assigns a CoS value and generates an internal DSCP value from the CoS-to-DSCP
map. The switch uses the internal DSCP value to generate a CoS value representing the
priority of the traffic.
Perform the classification based on a configured Layer 2 MAC access control list (ACL),
which can examine the MAC source address, the MAC destination address, and other
fields. If no ACL is configured, the packet is assigned 0 as the DSCP and CoS values,
which means best-effort traffic. Otherwise, the policy map action specifies a DSCP or CoS
value to assign to the incoming frame.
For IP traffic, Cisco Catalyst 2960 Series Switches provide the following classification options:
Trust the DSCP value in the incoming packet by configuring the port to trust DSCP. For
ports that are on the boundary between two QoS administrative domains, you can modify
the DSCP to another value by using the configurable DSCP-to-DSCP mutation map.
Trust the IP precedence value in the incoming packet by configuring the port to trust IP
precedence, and generate a DSCP value for the packet by using the configurable IP-
precedence-to-DSCP map.
Trust the CoS value (if present) in the incoming packet, and generate a DSCP value for the
packet by using the CoS-to-DSCP map. If the CoS value is not present, use the default port
CoS value.
Perform the classification based on a configured IP standard or an extended ACL, which
examines various fields in the IP header. If no ACL is configured, the packet is assigned 0
as the DSCP and CoS values, which means best-effort traffic. Otherwise, the policy-map
action specifies a DSCP or CoS value to assign to the incoming frame.
Cisco Catalyst 2960 Series Switches support traffic policing policies on physical ports. In
policy maps on physical ports, you can create these types of policers:
Individual: QoS applies the bandwidth limits specified in the policer separately to each
matched traffic class.
Aggregate: QoS applies the bandwidth limits specified in an aggregate policer
cumulatively to all matched traffic flows.
Note To use policy maps, the switch must be running the LAN Base image.
Each policer decides on a packet-by-packet basis whether the packet is in or out of profile and
specifies the actions on the packet. These actions, carried out by the marker, include passing the
packet without modification, dropping the packet, or modifying (marking down) the assigned
DSCP of the packet and then allowing the packet to pass through. Cisco Catalyst 2960 Series
Switches support out-of-profile markdown for packets that exceed bandwidth utilization limits.
2009 Cisco Systems, Inc. Classification and Marking 4-161
To support egress and ingress queuing, Cisco Catalyst 2960 Series Switches must run the LAN
Base image. This switch supports two configurable ingress queues, which are serviced by SRR
in shared mode only. One of these queues can be the priority queue. Each port on the Cisco
Catalyst 2960 Series Switches supports four egress queues, one of which (queue 1) can be the
egress expedite queue. The egress queues are serviced by SRR in either shaping or sharing
mode. Both the ingress and egress queues use WTD as the congestion-avoidance mechanism.
4-162 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Configure Trust Settings on the Cisco Catalyst 2950
Series Switches
Here are three examples showing how to configure the trust setting on the Catalyst 2950 Switch
and how each trust setting affects the internal DSCP value, the egress queue, and the egress
CoS/DSCP values.
The first example is to trust the incoming CoS, the second example is to trust the incoming
DSCP, and the third example is to trust the incoming CoS and pass through the incoming
DSCP.
Trust CoS:
incoming CoS > cos-dscp map > internal dscp > dscp-cos map > egress queue
| > egress cos
|
| -------------------------------------> egress dscp
Trust DSCP:
incoming dscp > internal dscp > dscp-cos map > egress queue
| > egress CoS
|
| ----------------------------------> egress dscp
Trust CoS (pass through DSCP):
incoming CoS > cos-dscp map > internal dscp > dscp-cos map > egress queue
> egress cos
incoming dscp --------------------------------------------------------------> egress dscp
2009 Cisco Systems, Inc. Classification and Marking 4-163
Example: QoS Mechanisms on the Cisco Catalyst 2950 Switch
The example in the illustration provides a block diagram of the QoS mechanisms on the
Catalyst 2950 Switch.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-8
Catalyst 2950: Aggregate QoS Model
QoS ACLs using Layer 2, 3, and 4 access control parameters
Source/destination MAC address, 16-bit ethertype, source/destination
IP address, TCP/UDP source or destination port number
QoS based on DSCP classification; Support for 13 widely used, well-
known DSCP values (0, 8, 10, 16, 18, 24, 26, 32, 34, 40, 46, 48, and 56)
CoS override per port

On incoming packets, classification and reclassification are performed by identifying packet
groups using either DSCP or CoS. Policing and metering, if configured, are then performed on
the packets to ensure compliance to configure rates. Marking is the last action performed on
incoming packets, based on the CoS-to-DSCP or DSCP-to-CoS mappings.
Outgoing packets are scheduled and queued for congestion control. There are four queues per
port and packets are scheduled based on WRR and strict priority scheduling.
4-164 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: QoS Mechanisms on Cisco Catalyst 2960 Series
Switches
The example in the illustration provides a block diagram of the QoS mechanisms on Cisco
Catalyst 2960 Series switches.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-9
EGRESS ACTIONS INGRESS ACTIONS
Based on whether
the packet is in or
out of profile and
the configured
parameters,
determi ne whether
to pass through,
mark down, or
drop the packet.
Based on the QoS
label, determi ne
into which of the
ingress queues to
place the packet.
Then service the
queues according
to the configured
weights.
Based on the QoS
label, determine
into which of the
egress queues to
place the packet.
Then service the
queues according
to the configured
weights.
Compare the
incoming traffic
rate with the
configured
policer and
determine if the
packet is in
profile or out of
profile.
Inspect packet
and determine
the QoS label
based on
ACLs or the
configuration.
Queuing and
Scheduling
Generate
QoS label
In profile or
out of profile
Classificati on Policing Marking
Queuing and
Scheduling
Catalyst 2960: Basic QoS Model
Standard 802.1p CoS and DSCP field classification, using marking and
reclassification on a per-packet basis by source and destination IP address,
source and destination MAC address, or Layer 4 TCP or UDP port number
Cisco control-plane and data-plane QoS ACLs on all ports to help ensure proper
marking on a per-packet basis
CoS override per port

The figure shows the basic QoS model for Cisco Catalyst 2960 Series Switches. Actions at the
ingress port include classifying traffic, policing, marking, queuing, and scheduling, as follows:
Classifying a distinct path for a packet by associating it with a QoS label. The switch maps
the CoS or DSCP in the packet to a QoS label to distinguish one kind of traffic from
another. The QoS label that is generated identifies all future QoS actions to be performed
on this packet.
Policing determines whether a packet is in or out of profile by comparing the rate of the
incoming traffic to the configured policer. The policer limits the bandwidth consumed by a
flow of traffic. The result is passed to the marker.
Marking evaluates the policer and configuration information for the action to be taken
when a packet is out of profile and determines what to do with the packet (pass through a
packet without modification, mark down the QoS label in the packet, or drop the packet).
Queuing evaluates the QoS label and the corresponding DSCP or CoS value to select into
which of the two ingress queues to place a packet. Queuing is enhanced with the WTD
algorithm, a congestion-avoidance mechanism. If the threshold is exceeded, the packet is
dropped.
Scheduling services the queues based on their configured SRR weights. One of the ingress
queues is the priority queue, and SRR services it for its configured share before servicing
the other queue.
2009 Cisco Systems, Inc. Classification and Marking 4-165
Actions at the egress port include queuing and scheduling:
Queuing evaluates the QoS packet label and the corresponding DSCP or CoS value before
selecting which of the four egress queues to use. Because congestion can occur when
multiple ingress ports simultaneously send data to an egress port, WTD differentiates
traffic classes and subjects the packets to different thresholds based on the QoS label. If the
threshold is exceeded, the packet is dropped.
Scheduling services the four egress queues based on their configured SRR shared or shaped
weights. One of the queues (queue 1) can be the expedited queue, which is serviced until
empty before the other queues are serviced.
4-166 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 10
Default QoS Configuration:
Catalyst 2950 and 3550 Switches
The default port CoS value is 0.
The default port trust state is untrusted.
The CoS value of 0 is assigned to all incoming packets.
Default CoS assignment to priority queues is:
CoS 6 to 7: Queue 4
CoS 4 to 5: Queue 3
CoS 2 to 3: Queue 2
CoS 0 to 1: Queue 1
Default CoS assignment can be altered during configuration.

The default QoS settings for the Catalyst 2950 and 3550 Switches are as follows:
The default port CoS value is 0.
The CoS value of 0 is assigned to all incoming packets.
The default port trust state is untrusted. If a port is connected to an IP phone, you should
change the default port configuration to trust the CoS setting from the IP phone using the
mls qos trust command.
No policy maps are configured.
No policers are configured.
The default CoS assignments to priority queues are as follows:
CoS 6 to 7: Queue 4
CoS 4 to 5: Queue 3
CoS 2 to 3: Queue 2
CoS 0 to 1: Queue 1
The default CoS assignments to priority queues change once auto qos voip is configured.
With auto qos voip [cisco-phone] or [trust], the default CoS assignments change to:
CoS 6 and 7: Queue 3
CoS 5: Queue 4
CoS 3: Queue 3
CoS 0,1,2, and 4: Queue 1
2009 Cisco Systems, Inc. Classification and Marking 4-167
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 11
Default QoS Configuration:
Catalyst 2960 Switches
The default port CoS value is 0.
The default port trust state is untrusted.
CoS and DSCP values are set to 0 for all incoming packets.
Ingress and egress queues have separate default settings.
Default CoS assignment can be altered during configuration.

By default, QoS is disabled on Cisco Catalyst 2960 Series Switches. There is no concept of
trusted or untrusted ports because the packets are not modified; the CoS, DSCP, and IP
precedence values in the packet are not changed. Traffic is switched in pass-through mode.
Packets are switched without any rewrites and classified as best effort without any policing.
When QoS is enabled with the mls qos global configuration command and all other QoS
settings are at their defaults, traffic is classified as best effort (DSCP and CoS values set to 0)
without any policing. No policy maps are configured. The default port trust state on all ports is
untrusted.
4-168 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 12
Mapping Tables:
Catalyst 2950 and 3550 Switches
During QoS processing, the switch represents the priority of all traffic
(including non-IP traffic) with an internal DSCP value.
During classification, QoS uses configurable mapping tables to derive the
internal DSCP (a six-bit value) from received CoS value.
Before the traffic reaches the scheduling stage, QoS uses the
configurable DSCP-to-CoS map to derive a CoS value from the internal
DSCP value.
(2950)
(2950 and 3550)

Actions at the egress interface include queuing and scheduling:
Queuing: Queuing evaluates the internal DSCP and determines which of the four egress
queues should be used for placing the packet. The DSCP value is mapped to a CoS value,
which selects one of the queues.
Scheduling: Scheduling services the four egress queues based on their configured WRR
weights and thresholds. One of the queues can be the expedite queue, which is serviced
until empty before the other queues are serviced. Congestion avoidance techniques include
tail drop and WRED on Gigabit-capable Ethernet ports and tail drop (with only one
threshold) on 10/100 Ethernet ports.
During QoS processing, the switch represents the relative-priority of all traffic (including non-
IP traffic) with an internal DSCP value. During classification, QoS uses configurable mapping
tables to derive the internal DSCP (a six-bit value) from received CoS or IP precedence (three-
bit) values. These maps include the CoS-to-DSCP map and the IP-precedence-to-DSCP map.
On an ingress interface configured in the DSCP-trusted state, if the DSCP values are different
between the QoS domains, the configurable DSCP-to-DSCP-mutation map can be applied to
the interface that is on the boundary between the two QoS domains.
During policing, QoS can assign another DSCP value to an IP or non-IP packet, if the packet is
out of profile and the policer specifies a marked-down DSCP value. This configurable map is
called the policed-DSCP map.
Before the traffic reaches the scheduling stage, QoS uses the configurable DSCP-to-CoS map
to derive a CoS value from the internal DSCP value. Through the CoS-to-egress-queue map,
the CoS values select one of the four egress queues for output processing.
The CoS-to-DSCP, DSCP-to-CoS, and the IP-precedence-to-DSCP (Catalyst 3550 only) maps
have default values that might or might not be appropriate for the network.
2009 Cisco Systems, Inc. Classification and Marking 4-169
The default DSCP-to-DSCP-mutation (Catalyst 3550 only) map and the default policed-DSCP
map are null maps; they map an incoming DSCP value to the same DSCP value.
The DSCP-to-DSCP-mutation map is the only map that can be applied to a specific Gigabit-
capable Ethernet port or to a group of 10/100 Ethernet ports. All other maps apply to the entire
switch.
4-170 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 13
Mapping Tables:
Catalyst 2960 Switches
During QoS processing, the switch represents the priority of all
traffic (including non-IP traffic) with a QoS label based on the
DSCP or CoS value from the classification stage.
During classification, QoS uses configurable mapping tables to
derive a corresponding DSCP or CoS value from a received CoS,
DSCP, or IP precedence value; these maps include the CoS-to-
DSCP map and the IP-precedence-to-DSCP map.
Default CoS-to-DSCP Map
7 6 5 2 3
16 24 32 40 48 56
4 1 0
0 8 DSCP value
CoS value
Default IP-Precedence-to-DSCP Map
7 6 5 2 3
16 24 32 40 48 56
4 1 0
0 8
IP precedence value
DSCP value

During QoS processing, Cisco Catalyst 2960 Series Switches represent the priority of all traffic
(including non-IP traffic) with a QoS label based on the DSCP or CoS value from the
classification stage.
During classification, QoS uses configurable mapping tables to derive a corresponding DSCP
or CoS value from a received CoS, DSCP, or IP precedence value. These maps include the
CoS-to-DSCP map and the IP-precedence-to-DSCP map. You can configure these maps by
using the mls qos map cos-dscp and the mls qos map ip-prec-dscp global configuration
commands.
On an ingress port configured in the DSCP-trusted state, if the DSCP values are different
between the QoS domains, you can apply the configurable DSCP-to-DSCP-mutation map to the
port that is on the boundary between the two QoS domains. You can configure this map by
using the mls qos map dscp-mutation global configuration command.
During policing, QoS can assign another DSCP value to an IP or a non-IP packet (if the packet
is out of profile and the policer specifies a marked-down value). This configurable map is
called the policed-DSCP map. You can configure this map by using the mls qos map policed-
dscp global configuration command.
2009 Cisco Systems, Inc. Classification and Marking 4-171
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 14
Mapping Tables:
Catalyst 2960 Switches (Cont.)
Default DSCP Input Queue Threshold Map
DSCP value 0- 39 48-63
Queue ID-Threshold ID
40-47
2-1 1-1 1-1
Defaul t DSCP Output Queue Threshol d Map
DSCP val ue 0- 15 32-39
Queue ID-Threshold ID
16-31
3-1 2-1 4-1
40-47 48-63
1-1 4-1
Default CoS Input Queue Threshold Map
CoS value 0- 4
1-1
6, 7
Queue ID-Threshold ID 2-1
5
1-1
Default CoS Output Queue Threshol d Map
CoS value 0, 1
1-1
6, 7
Queue ID-Threshold ID 2-1
5
3-1
2, 3 4
4-1 4-1
Before the traffic reaches the scheduling stage, QoS stores the packet in an
ingress and an egress queue according to the QoS label; the QoS label is based
on the DSCP or the CoS value in t he packet and selects the queue through the
DSCP input and output queue threshold maps or through the CoS input and output
queue threshold maps.

Before the traffic reaches the scheduling stage, QoS stores the packet in an ingress and an
egress queue according to the QoS label. The QoS label is based on the DSCP or the CoS value
in the packet and selects the queue through the DSCP input and output queue threshold maps or
through the CoS input and output queue threshold maps. In addition to an ingress or an egress
queue, the QOS label also identifies the WTD threshold value. You can configure these maps
by using the mls qos srr-queue {input | output} dscp-map and the mls qos srr-queue {input
| output} cos-map global configuration commands.
The DSCP-to-CoS map is used to generate a CoS value, which is used to select one of the four
egress queues.
4-172 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Default DSCP-to-CoS Map
DSCP Value CoS Value
0-7 0
8-15 1
16-23 2
24-31 3
32-39 4
40-47 5
48-55 6
56-63 7
The CoS-to-DSCP, DSCP-to-CoS, and the IP-precedence-to-DSCP maps have default values
that might or might not be appropriate for your network.
The default DSCP-to-DSCP-mutation map and the default policed-DSCP map are null maps;
they map an incoming DSCP value to the same DSCP value. The DSCP-to-DSCP-mutation
map is the only map you apply to a specific port. All other maps apply to the entire switch.
2009 Cisco Systems, Inc. Classification and Marking 4-173
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 15
Mapping Tables Example 1:
Life of a High-Priority (VoIP) Packet

The figure provides an example of a CoS value mapped to the DSCP value in a Catalyst 2950
Switch.
The trust boundary has been established on the switch port to trust the CoS setting from the IP
phone. By default, the CoS and DSCP value of a packet coming from a Cisco IP phone is set to
CoS 5 and DSCP Expedited Forwarding (EF) value 46.
On the output of the switch, in the Layer 3 header, the DSCP will be set to 40 using the default
CoS-to-DSCP map.
4-174 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 16
Mapping Tables Example 2:
Life of a High-Priority (VoIP) Packet

The figure shows the previous packet as it arrives to its destination after traversing the network.
In this example, the switch port connecting to the router is set to trust DSCP. Therefore, the
Layer 3 header will have a DSCP value of 40 (from the previous slide) and as it traverses the
switch, its CoS value is set to 5 using the default DSCP-to-CoS map.
2009 Cisco Systems, Inc. Classification and Marking 4-175
Configuring LAN-Based Classification and
Marking
This topic describes the Cisco IOS commands that are required to configure LAN-based
classification and marking.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 17

Configuring Classification and Marking


on Catalyst 2950 Switches
Configures the port to trust state on an interface.
When a port is configured with trust DSCP and the incoming
packet is a tagged non-IP packet, the CoS value for the packet is
set to 0, and the DSCP-to-CoS map is not applied.
If DSCP is trusted, the DSCP field of the IP packet is not modified,
but it is still possible that the CoS value of the packet is modified
according to the DSCP-to-CoS map.
Defines the default CoS value of a port or assigns the default CoS
to all incoming packets on the port.

The figure shows some of the QoS configuration commands that are necessary for Catalyst
2950 switches. The defaults for its interfaces are as follows:
The port is not trusted.
Pass-through mode is disabled.
Trusted boundary is disabled.
The syntax for the mls qos trust command is as follows:


4-176 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
(Optional) Specifies that the CoS bits in incoming frames are
trusted and derives the internal DSCP value from the CoS bits.
(Optional) Configures the interface to classify ingress packets by
trusting the CoS value and to send packets without modifying the
DSCP value (pass-through mode).
(Optional) Classifies ingress packets by trusting the value sent
from the Cisco IP phone (trusted boundary).
(Optional) Classifies ingress packets with packet DSCP values
(most significant 6 bits of the 8-bit service-type field). For non-IP
packets, the packet CoS value is set to 0. This keyword is
available only if your switch is running the EI software.
To define the default CoS value for an interface, use the mls qos cos interface configuration
command. Use the no form of this command to remove a prior entry. QoS assigns the CoS
value specified with this command to untagged frames received on trusted and untrusted ports.
The default CoS value is 0.
The syntax for the mls qos cos command is as follows:

Syntax Description
Parameter Description
Default CoS value for the interface; valid values are from 0 to 7.
The syntax for the mls qos trust command in Cisco IOS Software Release 12.2(46)SE on
Cisco Catalyst 2960 Series Switches is as follows:


2009 Cisco Systems, Inc. Classification and Marking 4-177
Syntax Description
Parameter Description
(Optional) Classifies an ingress packet by using the packet CoS
value. For an untagged packet, use the port default CoS value.
(Optional) Classifies an ingress packet by trusting the CoS or
DSCP value sent from the Cisco IP phone (trusted boundary),
depending on the trust setting.
(Optional) Classifies an ingress packet by using the packet DSCP
value (most significant 6 bits of 8-bit service-type field). For a
non-IP packet, the packet CoS is used if the packet is tagged. For
an untagged packet, the default port CoS value is used.
(Optional) Classifies an ingress packet by using the packet IP-
precedence value (most significant 3 bits of 8-bit service-type
field). For a non-IP packet, the packet CoS is used if the packet is
tagged. For an untagged packet, the port default CoS value is
used.
The syntax shown in the figure for the mls qos cos command is the same as the syntax for the
mls qos cos command in Cisco IOS Software Release 12.2(46)SE on Cisco Catalyst 2960
Series Switches.
4-178 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 18

Configuring Classification and Marking


on Catalyst 2950 Switches (Cont.)
Defines the CoS-to-DSCP mapping.
For dscp1...dscp8, enter eight DSCP values that correspond to
CoS values 0 to 7. Separate each DSCP value with a space.
The supported DSCP values are 0, 8, 10, 16, 18, 24, 26, 32, 34,
40, 46, 48, and 56.
Defines the DSCP-to-CoS mapping.
For dscp-list, enter up to 13 DSCP values separated by spaces.
Then enter the to keyword. The supported DSCP values are 0, 8,
10, 16, 18, 24, 26, 32, 34, 40, 46, 48, and 56.
For cos, enter the CoS value to which the DSCP values
correspond. The CoS range is 0 to 7.

The commands listed in the figure show how to change the default CoS-to-DSCP and DSCP-
to-CoS mappings.
CoS-to-DSCP Default Mapping
Marker Value
CoS Values 0 1 2 3 4 5 6 7
DSCP
Values
0 8 16 24 32 40 48 56
To define the ingress CoS-to-DSCP mapping for trusted interfaces, use the mls qos map cos-
dscp command. The CoS-to-DSCP map is used to map the CoS of packets arriving on trusted
interfaces (or flows) to a DSCP where the trust type is trust-cos. This map is a table of eight
CoS values (0 through 7) and their corresponding DSCP values. Use the no form of this
command to remove a prior entry.
The syntax for the mls qos map cos-dscp command is as follows:
mls qos map cos-dscp values
Syntax Description
Parameter Description


Eight DSCP values, separated by spaces, corresponding to the
CoS values; valid values are from 0 to 63.

2009 Cisco Systems, Inc. Classification and Marking 4-179
DSCP-to-CoS Default Mapping
Marker Value
DSCP
Values
0 8, 10 16, 18 24, 26 32, 34 40, 46 48 56
CoS Values 0 1 2 3 4 5 6 7
To define an egress DSCP-to-CoS mapping, use the mls qos map dscp-cos command. The
DSCP-to-CoS map is used to map DSCP values in incoming packets to a CoS value, which is
used to select one of the four egress queues. The CoS mapped value is written into the ISL
header or 802.1Q tag of the transmitted frame on trunk interfaces. You can enter up to eight
DSCP values separated by a space, and up to eight CoS values separated by a space. Use the no
form of this command to remove a prior entry.
The syntax for the mls qos map dscp-cos command is as follows:
mls qos map dscp-cos dscp-values to cos-values
Syntax Description
Parameter Description
DSCP values; valid values are from 0 to 63.
Defines mapping.
CoS values; valid values are from 0 to 63.
The syntax for the mls qos map command in Cisco IOS Software Release 12.2(46)SE on Cisco
Catalyst 2960 Series Switches is as follows:




4-180 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
Defines the CoS-to-DSCP map.
For dscp1...dscp8, enter eight DSCP values that correspond to
CoS values 0 to 7. Separate each DSCP value with a space. The
range is 0 to 63.


Defines the DSCP-to-CoS map.
For dscp-list, enter up to eight DSCP values, with each value
separated by a space. The range is 0 to 63. Then enter the to
keyword.
For cos, enter a single CoS value to which the DSCP values
correspond. The range is 0 to 7.



Defines the DSCP-to-DSCP-mutation map.
For dscp-mutation-name, enter the mutation map name.
For in-dscp, enter up to eight DSCP values, with each value
separated by a space. Then enter the keyword.
For out-dscp, enter a single DSCP value.
The range is 0 to 63.


Defines the IP-precedence-to-DSCP map.
For dscp1...dscp8, enter eight DSCP values that correspond to
the IP precedence values 0 to 7. Separate each DSCP value with
a space. The range is 0 to 63.


Defines the policed-DSCP map.
For dscp-list, enter up to eight DSCP values, with each value
separated by a space. Then enter the keyword.
For mark-down-dscp, enter the corresponding policed (marked
down) DSCP value.
The range is 0 to 63.

2009 Cisco Systems, Inc. Classification and Marking 4-181
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 19
Configuring Classification and Marking
on Catalyst 2950 Switches (Cont.)

The figure shows a configuration example on a Catalyst 2950 Switch where the CoS-to-DSCP
map has been changed from the default.
The default map is:
Marker Value
CoS Values 0 1 2 3 4 5 6 7
DSCP
Values
0 8 16 24 32 40 48 56
And the map after configuration is:
Marker Value
CoS Values 0 1 2 3 4 5 6 7
DSCP
Values
0 10 18 26 34 46 48 56
The interface has been set to trust the CoS value using the mls qos trust command, using both
the cos and cisco-phone options. The result of the configuration is that the switch interface
trusts CoS only when a Cisco IP phone is attached. The switch uses Cisco Discovery Protocol
to detect whether a Cisco IP phone is attached, and also passes the voice VLAN ID information
to the Cisco IP phone using Cisco Discovery Protocol.
Use the switchport priority extend cos 0 interface configuration command to enable the IP
phone to override the CoS marking from the PC attached to the IP phone with a CoS value
of 0.
4-182 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Use the switchport priority extend interface configuration command to set a port priority for
the incoming untagged frames or the priority of frames received by the IP phone connected to
the specified port. Use the no form of this command to return to the default setting.
The syntax for the switchport priority extend command is as follows:
switchport priority extend {cos value | trust}
Syntax Description
Parameter Description


Sets the IP phone port to override the priority received from PC or
the attached device.
The CoS value is a number from 0 to 7. 7 is the highest priority.
The default is 0.
Sets the IP phone port to trust the priority received from PC or the
attached device.
The syntax for the switchport priority extend command is the same as the syntax for the
switchport priority extend command in Cisco IOS Software Release 12.2(46)SE on Cisco
Catalyst 2960 Series Switches.
2009 Cisco Systems, Inc. Classification and Marking 4-183
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 20
Configuring Classification and Marking
on Catalyst 2950 Switches (Cont.)
Classification and marking can also be performed using
MQC (class maps and policy maps):
1. Create an IP standard or extended ACL for IP traffic, or a
Layer 2 MAC ACL for non-IP traffic.
2. Create a class map and define the match criteria to classify
traffic.
3. Create a service policy to perform the appropriate QoS action
(mark, police, and so on).
4. Apply the service policy to a switch interface.

Create a class map by using the class-map global configuration command. The class-map
global configuration command is used to isolate a specific traffic flow (or class) from all other
traffic and to name it. Use this command when the map is shared among many ports. When you
enter the class-map global configuration command, the switch enters the class-map
configuration mode. In this mode, you define the match criterion for the traffic by using the
match class-map configuration command. Match statements can only include ACLs.
Create and name a policy map by using the policy-map global configuration command. When
you enter this command, the switch enters the policy-map configuration mode. In this mode,
the actions to take on a specific traffic class are specified by using the class policy-map
configuration or set policy-map class configuration command. To make the policy map
effective, you attach it to an interface by using the service-policy interface configuration
command.
A policy map also has these characteristics:
A policy map can contain multiple class statements, each with different match criteria and
policers.
A separate policy-map class can exist for each type of traffic received through an interface.
Only one policy map per interface can be attached in the input direction.
Note This procedure is the same in Cisco IOS Software Release 12.2(46)SE on Cisco Catalyst
2960 Series Switches.
4-184 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 21

Configuring Classification and Marking


on Catalyst 2950 Switches (Cont.)
Configures a standard IP access control list that is based on
source address only.
The default standard ACL is always terminated by an implicit deny
statement for all packets.
Configures an extended IP access control list that can be based
on source, destination, port, DSCP value, or a time range.
The default extended ACL is always terminated by an implicit
deny statement for all packets.

You can use IP standard, IP extended, and Layer 2 MAC ACLs to define a group of packets
with the same characteristics (class). In the QoS context, the permit and deny actions in the
ACEs have different meanings than with security ACLs, as follows:
If a match with a permit action is encountered (first-match principle), the specified QoS-
related action is taken.
If no match with a permit action is encountered and all the ACEs have been examined, no
QoS processing occurs on the packet.
If multiple ACLs are configured on an interface, the packet matches the first ACL with a
permit action, and QoS processing begins.
Configuration of a deny action is not supported in QoS ACLs on the switch.
Use the standard version of the access-list global configuration command to configure a
standard IP ACL. Use the no form of this command to remove a standard IP ACL.
The syntax for the standard access-list command is as follows:


2009 Cisco Systems, Inc. Classification and Marking 4-185
Syntax Description
Parameter Description
Number of an ACL, from 1 to 99 or from 1300 to 1999.
Denies access if conditions are matched.
Permits access if conditions are matched.
ACL entry comment; up to 100 characters.


Defines a source IP address and wildcard.
The source is the source address of the network or host from
which the packet is being sent, specified in one of these ways:
The 32-bit quantity in dotted-decimal format. The source-
wildcard applies wildcard bits to the source.
The keyword host, followed by the 32-bit quantity in dotted-
decimal format, as an abbreviation for source and source-
wildcard of source 0.0.0.0.
The keyword any as an abbreviation for source and source-
wildcard of 0.0.0.0 255.255.255.255. You do not need to
enter a source-wildcard.
Use the extended version of the access-list global configuration command to configure an
extended IP ACL. Use the no form of this command to remove an extended IP ACL.





4-186 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
Number of an ACL, from 100 to 199 or from 2000 to 2699.
Name of an IP protocol.
protocol can be ip, tcp, or udp.
Denies access if conditions are matched.
Permits access if conditions are matched.
ACL entry comment; up to 100 characters.


Defines a source IP address and wildcard.
The source is the source address of the network or host from
which the packet is being sent, specified in one of these ways:
The 32-bit quantity in dotted-decimal format. The source-
wildcard applies wildcard bits to the source.
The keyword host, followed by the 32-bit quantity in dotted-
decimal format, as an abbreviation for source and source-
wildcard of source 0.0.0.0.
The keyword any as an abbreviation for source and source-
wildcard of 0.0.0.0 255.255.255.255. You do not need to
enter a source-wildcard.



Defines a destination IP address and wildcard.
The destination is the destination address of the network or host
to which the packet is being sent, specified in one of these ways:
The 32-bit quantity in dotted-decimal format. The destination-
wildcard applies wildcard bits to the destination.
The keyword host, followed by the 32-bit quantity in dotted-
decimal format, as an abbreviation for destination and
destination-wildcard of source 0.0.0.0.
The keyword any as an abbreviation for destination and
destination-wildcard of 0.0.0.0 255.255.255.255. You do not
need to enter a destination-wildcard.
(Optional) Defines a source or destination port.
The operator can be only eq (equal).
If operator is after the source IP address and wildcard, conditions
match when the source port matches the defined port.
If operator is after the destination IP address and wildcard,
conditions match when the destination port matches the defined
port.
The port is a decimal number or name of a TCP or UDP port. The
number can be from 0 to 65535.
Use TCP port names only for TCP traffic.
Use UDP port names only for UDP traffic.
2009 Cisco Systems, Inc. Classification and Marking 4-187
Parameter Description
(Optional) Defines a DSCP value to classify traffic.
For the dscp-value, enter any of the 13 supported DSCP values
(0, 8, 10, 16, 18, 24, 26, 32, 34, 40, 46, 48, and 56), or use the
question mark (?) to see a list of available values.


(Optional) For the time-range keyword, enter a meaningful name
to identify the time range. For a more detailed explanation of this
keyword, refer to the software configuration guide.
The syntax shown in the figure is compatible with Cisco IOS Software Release 12.2(46)SE on
Cisco Catalyst 2960 Series Switches. For the command syntax for other software versions or
platforms, refer to the appropriate Command Reference on http://www.cisco.com.
4-188 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 22

Configuring Classification and Marking


on Catalyst 2950 Switches (Cont.)
Creates a class map to be used for matching packets.
Only one match criterion per class map is supported. For
example, when defining a class map, only one match command
can be entered.
Defines the match criteria to classify traffic.
Only IP access groups, MAC access groups, and classification
based on DSCP values are supported.

You can also use modular QoS command-line interface (CLI), or MQC, class maps on Catalyst
2950 switches for packet classification purposes. However, the match command used in
conjunction with the class map has different parameters when executed on a Catalyst switch.
Use the match class-map configuration command to define the match criteria to classify traffic.
Use the no form of this command to remove the match criteria.
The syntax for the match command is as follows:
match {access-group acl-index | access-group name acl-name | ip dscp dscp-list}
Syntax Description
Parameter Description
Number of an IP standard or extended ACL.
For an IP standard ACL, the ACL index range is 1 to 99 and 1300
to 1999. For an IP extended ACL, the ACL index range is 100 to
199 and 2000 to 2699.


Name of an IP standard or extended ACL or name of an
extended MAC ACL.
Note: The ACL name must begin with an alphabetic character to
prevent ambiguity with numbered ACLs. A name also cannot
contain a space or quotation mark.
List of up to eight DSCP values for each match statement to
match against incoming packets. Separate each value with a
space. The supported DSCP values are 0, 8, 10, 16, 18, 24, 26,
32, 34, 40, 46, 48, and 56.
2009 Cisco Systems, Inc. Classification and Marking 4-189
The syntax for the class-map command in Cisco IOS Software Release 12.2(46)SE on Cisco
Catalyst 2960 Series Switches is as follows:

Syntax Description
Parameter Description
match-all (Optional) Performs a logical AND of all matching statements
under this class map. All criteria in the class map must be
matched.
match-any (Optional) Performs a logical OR of the matching statements
under this class map. One or more criteria must be matched.
class-map-name Name of the class map.
The syntax for the match command in Cisco IOS Software Release 12.2(46)SE on Cisco
Catalyst 2960 Series Switches is as follows:


Syntax Description
Parameter Description
access-group acl-index-or-name Number or name of an IP standard or extended ACL or MAC
ACL. For an IP standard ACL, the ACL index range is 1 to 99 and
1300 to 1999. For an IP extended ACL, the ACL index range is
100 to 199 and 2000 to 2699.
ip dscp dscp-list List of up to eight IP DSCP values to match against incoming
packets. Separate each value with a space. The range is 0 to 63.
You also can enter a mnemonic name for a commonly used
value.
ip precedence ip-precedence-list List of up to eight IP precedence values to match against
incoming packets. Separate each value with a space. The range
is 0 to 7. You also can enter a mnemonic name for a commonly
used value.
4-190 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 23

Configuring Classification and Marking


on Catalyst 2950 Switches (Cont.)
Creates or modifies a policy map that can be attached to multiple
interfaces
Defines a traffic classification for the policy to act on using the
class-map name or access group
Used to mark packets with a new DSCP value. Supported DSCP
values are 0, 8, 10, 16, 18, 24, 26, 32, 34, 40, 46, 48, and 56

Recall that a policy map creates or modifies a policy that can be attached to multiple interfaces.
The class command defines traffic classification for the policy to act on based on the class map
or the access group. Use the class policy-map configuration command to define a traffic
classification for the policy to act on using the class map name or access group. Use the no
form of this command to delete an existing class map.
The syntax for the class command is as follows:
class class-map-name [access-group name acl-index-or-name]
Syntax Description
Parameter Description


(Optional) Number or name of an IP standard or extended ACL or
name of an extended MAC ACL. For an IP standard ACL, the
index range is 1 to 99 and 1300 to 1999; for an IP extended ACL,
the index range is 100 to 199 and 2000 to 2699.
Use the set ip dscp policy-map class configuration command to classify IP traffic by setting a
DSCP value.
set ip dscp new-dscp
2009 Cisco Systems, Inc. Classification and Marking 4-191
Syntax Description
Parameter Description
New DSCP value assigned to the classified traffic.
The supported DSCP values are 0, 8, 10, 16, 18, 24, 26, 32, 34,
40, 46, 48, and 56.
The syntax shown in the figure for the policy-map command is the same as the syntax for the
policy-map command in Cisco IOS Software Release 12.2(46)SE on Cisco Catalyst 2960
Series Switches.
The syntax for the class command in Cisco IOS Software Release 12.2(46)SE on Cisco
Catalyst 2960 Series Switches is as follows:

The syntax for the set command in Cisco IOS Software Release 12.2(46)SE on Cisco Catalyst
2960 Series Switches is as follows:

Syntax Description
Parameter Description
New DSCP value assigned to the classified traffic. The range is 0
to 63. You also can enter a mnemonic name for a commonly
used value.


New IP-precedence value assigned to the classified traffic. The
range is 0 to 7. You also can enter a mnemonic name for a
commonly used value.
4-192 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 24

Configuring Classification and Marking


on Catalyst 2950 Switches (Cont.)
Applies a policy map defined by the policy-map command to the
input of a particular interface






The last step in configuring a policy is to apply the policy to the interface.
In the example, an extended access list has been created for a MAC address, maclist1. A class
map, macclass1, has been created that will match any MAC address permitted by the access list
maclist1.
If there is a match for the class map macclass1, the DSCP field will be set to 26 as defined in
the policy map macpolicy1.
This policy map has been implemented on the Gigabit Ethernet port 0/1 for incoming packets.
The syntax shown in the figure for the service-policy command is the same as the syntax for
the service-policy command in Cisco IOS Software Release 12.2(46)SE on Cisco Catalyst
2960 Series Switches.
2009 Cisco Systems, Inc. Classification and Marking 4-193
Monitoring LAN-Based Classification and
Marking
This topic describes some of the Cisco IOS commands required to monitor LAN-based
classification and marking.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 25
Monitoring QoS on
Catalyst 2950 Switches
Displays QoS information at the interface level










After QoS has been configured on a Catalyst switch, you should verify proper operation of QoS
and verify that the policies have been configured. In the example, the trust state has been set for
CoS and the default value of CoS is 0.
Use the show mls qos interface user EXEC command to display QoS information at the
interface level.
The syntax for the show mls qos interface command is as follows:
show mls qos interface [interface-id] [policers]
Syntax Description
Parameter Description
(Optional) Displays QoS information for the specified interface
(Optional) Displays all the policers configured on the interface,
their settings, and the number of policers unassigned (available
only when the switch is running the EI software)
4-194 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
The syntax for the show mls qos interface command in Cisco IOS Software Release
12.2(46)SE on Cisco Catalyst 2960 Series Switches is as follows:
show mls qos interface [interface-id] [buffers | queueing | statistics] [ | {begin | exclude |
include} expression]
Syntax Description
Parameter Description
interface-id (Optional) Displays QoS information for the specified port. Valid
interfaces include physical ports
buffers (Optional) Displays the buffer allocation among the queues
queuing (Optional) Displays the queuing strategy (shared or shaped) and
the weights corresponding to the queues
statistics (Optional) Displays statistics for sent and received DSCP values
and CoS values, the number of packets enqueued or dropped per
egress queue, and the number of in-profile and out-of-profile
packets for each policer
| begin (Optional) Displays begins with the line that matches the
expression
| exclude (Optional) Displays excludes lines that match the expression
| include (Optional) Displays includes lines that match the specified
expression
expression Expression in the output to use as a reference point

2009 Cisco Systems, Inc. Classification and Marking 4-195
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 26
Monitoring QoS on
Catalyst 2950 Switches (Cont.)
Displays QoS mapping information



Another important monitoring command is the show mls qos maps command, which displays
the CoS-to-DSCP and DSCP-to-CoS mappings. Maps are used to generate an internal DSCP
value which represents the priority of the traffic.
The syntax for the show mls qos maps command is as follows:

Syntax Description
Parameter Description
(Optional) Displays CoS-to-DSCP map
(Optional) Displays DSCP-to-CoS map
The syntax for the show mls qos maps command in Cisco IOS Software Release 12.2(46)SE on
Cisco Catalyst 2960 Series Switches is as follows:




4-196 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
(Optional) Displays CoS-to-DSCP map
(Optional) Displays the CoS input queue threshold map
(Optional) Displays the CoS output queue threshold map
(Optional) Displays DSCP-to-CoS map
(Optional) Displays the DSCP input queue threshold map


(Optional) Displays the specified DSCP-to-DSCP-mutation map
(Optional) Displays the DSCP output queue threshold map
(Optional) Displays the IP-precedence-to-DSCP map
(Optional) Displays the policed-DSCP map
(Optional) Displays begins with the line that matches the
expression
(Optional) Displays excludes lines that match the expression
(Optional) Displays includes lines that match the specified
expression
Expression in the output to use as a reference point

2009 Cisco Systems, Inc. Classification and Marking 4-197
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.34- 27
Summary
QoS classification and marking on workgroup switches are based
on DiffServ and CoS. There must be mapping between Layer 2
and Layer 3.
For most Cisco IP phone configurations, the traffic sent from the
telephone to the switch may be trusted to ensure that voice traffic
is properly prioritized over other types of traffic in the network.
Several types of classification and marking are availabl e on Cisco
Catalyst 6500, 4000, 3750, 3500, 2950, and 2960 Switches.
QoS assigns the CoS value specified with mls qos cos interface
configuration command to untagged frames received on trusted
and untrusted ports.
Use the show mls qos interface command to display general
QoS information.

4-198 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 8
Understanding QoS in the
Life of a Packet
Overview
This lesson provides information regarding the application of quality of service (QoS)
mechanisms throughout a simple network. The lesson follows two packetsa high-priority
voice packet and a low-priority file transfer packetas they traverse a QoS-enabled network.
Objectives
Upon completing this lesson, you will be able to describe how QoS mechanisms have an
impact on IP packets. This ability includes being able to meet these objectives:
Describe how QoS mechanisms have an impact on IP packets
On a network diagram, identify key points where the QoS status of a high-priority VoIP
packet can be altered as QoS policies are applied to the IP packet
On a network diagram, identify key points where the QoS status of a low-priority FTP
packet can be altered as QoS policies are applied to the IP packet
4-200 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS and Packets
This topic describes how QoS mechanisms have an impact on IP packets.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-2
Overview

The first packet, packet 1, is a high-priority VoIP packet that will receive preferential treatment
as it moves through the network.
The second packet, packet 2, is a low-priority FTP packet that will receive deferential treatment
as it moves through the network.
A QoS peering relation between the enterprise and the service provider is assumed. The service
provider will recognize and act upon QoS classifications made by the enterprise customer. The
relationship shows how QoS can be effectively honored across an enterprise and service
provider boundary.
2009 Cisco Systems, Inc. Classification and Marking 4-201
Life of a High-Priority VoIP Packet
This topic describes the life of a high-priority VoIP packet.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-3
Life of a High-Priority VoIP Packet

As it begins its life in the IP phone, the VoIP packet is immediately marked with both of the
following:
Layer 2: 802.1Q CoS = 5 (highest priority in an Ethernet LAN)
Layer 3: DSCP = EF (highest priority in an IP network)
Note The IEEE 802.1Q standard is an IEEE specification for implementing VLANs in Layer 2
switched networks. IEEE 802.1Q and its use in QoS will be discussed further in the
Classification and Marking module in this course.
With the frame marked at class of service (CoS) = 5 and differentiated services code point
(DSCP) = Expedited Forwarding (EF), this frame should receive priority treatment every time
it encounters any QoS mechanism in the network.
Note A User Datagram Protocol (UDP) header is used for voice packets rather than TCP.
Notice that a Real-Time Transport Protocol (RTP) header has been added because this is a
voice packet. RTP helps synchronize real-time transmissions such as voice by time-stamping
packets so that they can be resynchronized at the receiving end. This helps minimize jitter.
4-202 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-4
Life of a High-Priority VoIP Packet
(Cont.)

In the Cisco Catalyst 2950 Switch, CoS = 5 means to treat the frame with priority queuing
(PQ). This means that you should move the frame before any other frames with a lower CoS.
The default CoS-to-DSCP mapping is set to recognize the CoS = 5 as DSCP = 40. The EF
value is 46 on input to the switch as set by the IP phone. Because the default CoS-to-DSCP
marking is CoS 5 = DSCP 40 in the Cisco 2950 Switch (not 46), DSCP is set to 40 on output.
When the frame arrives at the Cisco Catalyst 2950 Switch, it is instantly recognized as a high-
priority frame because of the CoS = 5 and is immediately placed in the high-priority, no-delay
queue. Because the switch recognizes the frame as a CoS = 5, it re-marks the DSCP field to 40.
Default CoS-to-DSCP Mapping in Cisco Catalyst 2950 Switch
COS Value DSCP Value
0 0
1 8
2 16
3 24
4 32
5 40
6 48
7 56
Note The default CoS-to-DSCP mappings are the same in Cisco Catalyst 2960 Switches and
Cisco Catalyst 2950 Switches.
2009 Cisco Systems, Inc. Classification and Marking 4-203
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-5
Life of a High-Priority VoIP Packet
(Cont.)

When the packet hits the edge router, the router recognizes the packet as a voice packet due to
the DSCP = 40 setting (which was set by the Cisco Catalyst 2950 Switch).
The packet is immediately dispatched ahead of any nonvoice packets, using low-latency
queuing (LLQ). LLQ is designed to provide instant dispatch of voice packets ahead of data
while carefully managing the dispatch of data.
If the link to the service provider is a relatively slow link, both header compression (in this
case, class-based RTP header compression) and link fragmentation and interleaving (LFI)
would be employed to improve the bandwidth efficiency of the link.
If the WAN link is a Frame Relay link, the packet would use Frame Relay traffic shaping
(FRTS) and Frame Relay Forum 12 (FRF.12).
Note Both of these technologies are explained further in the Traffic Shaping and Policing module
in this course.
4-204 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-6
Life of a High-Priority VoIP Packet
(Cont.)

When the packet arrives at the service provider, the service provider reclassifies the packet to
fit within the service provider QoS classification policy.
In this case, the service provider has defined these four traffic classes:
Controlled latency
Controlled load 1 (Assured Forwarding [AF]31)
Controlled load 2 (AF21)
Best-effort
The service provider provides QoS service level agreement (SLA) for the controlled-latency,
controlled-load 1 (AF31), controlled-load 2 (AF21), and best-effort traffic classes. The service
provider maps the enterprise customer QoS classifications into the four defined traffic classes
of the service provider.
The service provider router recognizes the packet as a high-priority voice packet and assigns
the packet to the real-time EF class. The packet is re-marked to DSCP = 46 to fit the service
provider classification conventions and sent on its way as a member of the real-time class.
2009 Cisco Systems, Inc. Classification and Marking 4-205
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-7
Life of a High-Priority VoIP Packet
(Cont.)

In the service provider core network, the packet will move along with minimal delay using EF.
The key congestion avoidance technology, weighted random early detection (WRED), is used
in the service provider network. WRED ensures that lower-priority packets are dropped to
ensure that priority packets make their way quickly through the network.
Because the voice packet is marked as EFthe service provider real-time classWRED
should have no impact on the packet. QoS policy for the service provider should be not to drop
voice packets so that WRED would not be applied to packets identified as real time.
The packet will almost certainly not be dropped and will encounter minimal delay.
4-206 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-8
Life of a High-Priority VoIP Packet
(Cont.)

While the packet traversed the service provider network, the DSCP was marked as 46 so that
the packet would be immediately dispatched as a member of the service provider real-time
class.
But the packet was marked DSCP = 40 by the customer before it entered the service provider
network. At the edge of the service provider network, the DSCP is re-marked to 40 to match
the classification scheme being used by the enterprise customer.
The packet is dispatched immediately using the LLQ method that always provides absolute
priority to voice packets.
2009 Cisco Systems, Inc. Classification and Marking 4-207
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.32-9
Life of a High-Priority VoIP Packet
(Cont.)

Upon arriving at the enterprise network router, the voice packet is sent out the LAN interface
toward the switch using FIFO queuing on the LAN interface.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 10
Life of a High-Priority VoIP Packet
(Cont.)

Upon arriving at the Cisco Catalyst 2950 switch, the DSCP field is mapped to the CoS field of
the outgoing Ethernet frame using the DSCP-to-CoS mapping. This results in CoS being set to
5. At the output interface, it is queued as a high-priority voice frame because the Layer 2
priority is set to CoS = 5. The frame jumps ahead of any nonvoice frame and is immediately
dispatched to the PQ.
4-208 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 11
Life of a High-Priority VoIP Packet
(Cont.)

The packet finally arrives at the receiving IP phone.
The RTP header is used to ensure that the packet is synchronized correctly with other packets
from the same voice flow and that the voice payload is delivered.
2009 Cisco Systems, Inc. Classification and Marking 4-209
Life of a Low-Priority FTP Packet
This topic describes the life of a low-priority FTP packet.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 12
Life of a Low-Priority FTP Packet

The low-priority FTP packet begins life as a very low-priority CoS = 0, DSCP = 0.
Note The FTP packet is using TCP rather than UDP (which was used by the voice packet).
4-210 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 13
Life of a Low-Priority FTP Packet (Cont.)

All traffic arriving from the workstation attached to the IP phone is set to be untrusted.
As a result, the IP phone will not accept any CoS marking done by the workstation and will re-
mark the CoS to 0. This ensures that the voice traffic generated by the IP phone will always
receive priority treatment over any traffic generated by the workstation.
Note The IP phone cannot re-mark the incoming DSCP value. The IP phone can only re-mark the
Layer 2 CoS value.
2009 Cisco Systems, Inc. Classification and Marking 4-211
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 14
Life of a Low-Priority FTP Packet (Cont.)

In the Cisco Catalyst 2950 switch, the CoS-to-DSCP mapping table is used to map the CoS
value of the packet to the DSCP equivalent. In the case of the FTP frame, the DSCP = 0
matches the CoS = 0, so the frame DSCP value does not change.
The switch congestion management technology weighted round robin (WRR) with an
expedite queue (priority queue [PQ])dispatches the frame, but not until all high-priority voice
frames have been dispatched.
Note WRR with an expedite queue is explained further in the Congestion Management module
in this course.
Default CoS-to-DSCP Mapping in Cisco Catalyst 2950 Switch
COS Value DSCP Value
0 0
1 8
2 16
3 24
4 32
5 40
6 48
7 56
4-212 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 15
Life of a Low-Priority FTP Packet (Cont.)

In the enterprise router, a classification technology, Network-Based Application Recognition
(NBAR), recognizes the packet as an FTP packet and re-marks the packet with a DSCP =
001010 = AF11.
With a DSCP = AF11, the packet is then dispatched as a low-priority class packet by CBWFQ.
CBWFQ is the component of LLQ that carefully manages the dispatch of data traffic.
The AF11 class is given a minimum guarantee of bandwidth. If the link to the service provider
is congested, the packet has a good probability of being dropped to ensure that higher-priority
packets are not delayed.
2009 Cisco Systems, Inc. Classification and Marking 4-213
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 16
Life of a Low-Priority FTP Packet (Cont.)

The service provider provides QoS SLA for the controlled-latency, controlled-load 1 (AF31),
controlled-load 2 (AF21), and best-effort traffic classes. The service provider maps the
enterprise customer QoS classifications into the four defined traffic classes of the service
provider.
Upon arriving at the service provider network, the packet is identified as an FTP packet and
assigned to the controlled-load 2 (AF21) class.
4-214 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 17
Life of a Low-Priority FTP Packet (Cont.)

The packet traverses the service provider core marked as a controlled-load 2 (AF21) packet.
While in the service provider core network, the FTP packet has a much better probability of
being dropped by WRED than the voice packet.
2009 Cisco Systems, Inc. Classification and Marking 4-215
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 18
Life of a Low-Priority FTP Packet (Cont.)

Before the packet entered the service provider network, it was marked DSCP = AF11, which
fits the classification scheme used by the enterprise customer. As the packet leaves the service
provider network, the packet is re-marked to DSCP = AF11 for the enterprise customer.
The AF11 class is given a minimum guarantee of bandwidth.
4-216 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 19
Life of a Low-Priority FTP Packet (Cont.)

As the packet reenters the enterprise network, it is recognized as an AF11 class packet and is
passed through the enterprise router without being re-marked.
The FTP packet is sent out the LAN interface toward the switch using FIFO queuing on the
LAN interface.
2009 Cisco Systems, Inc. Classification and Marking 4-217
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 21
Life of a Low-Priority FTP Packet (Cont.)

Using its DSCP-to-CoS mapping, the Cisco Catalyst 2950 Switch recognizes the DSCP = AF11
packet (Layer 3) as a CoS = 1 priority frame (Layer 2).
The FTP frame is treated by WRR with the CoS 1.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 21
Life of a Low-Priority FTP Packet (Cont.)

The FTP packet finally arrives at the destination host, and the payload is delivered.
If the packet had been dropped at any point along the way, TCP would recognize that fact and
request retransmission of the packet.
4-218 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.32- 22
Summary
High-priority and low-priority packets are treated very differently in
a network using differentiated services.
The high-priority VoIP packet begins life at an IP phone as a CoS
5 on the LAN, which translates to DSCP 40 as the packet hits the
WAN and is given EF status in the service provider core network;
the high-priority packet is immediately transmitted by all devices
as it moves through the network.
The low-priority FTP packet begins life as a CoS 0 packet, which
translates to DSCP 0 and AF11 in the service provider core
network.


2009 Cisco Systems, Inc. Classification and Marking 4-219
Module Summary
This topic summarizes the key points discussed in this module.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.34-1
Module Summary
Classification is a critical QoS component that recognizes and distinguishes
between different traffic streams. Without classification, all packets are
treated the same.
Marking is a QoS component that colors a packet so that it can be
identified and distinguished from other packets in QoS treatment.
MQC classification can be achieved using class maps
and a variety of traffic descriptors, including: CoS
(ISL, 802.1Q), IP precedence, DSCP, QoS group, MPLS experimental bits,
Frame Relay DE bit, and ATM CLP bit.
Many different mechanisms exist to perform classification and marking,
including: class maps, class-based marking, NBAR, QoS preclassify, QPPB,
and LAN-based CoS marking.
As packets travel through the network, each packet is classified and marked
as close to the source as possible. The downstream devices then apply
different QoS mechanisms to the packet based on its marking. The
packets can be re-marked along the way.

Classification is the process of identifying traffic and categorizing it into different classes.
Packet classification allows some packets to be handled more quickly or with a higher priority
than other packets. Applications such as voice typically need to be treated faster than a file
transfer.
Classification uses a traffic descriptor to categorize a packet within a specific group, to define
that packet. Typically, traffic descriptors include: Class of service (CoS) (Inter-Switch Link
[ISL], 802.1Q) incoming interface, IP precedence, differentiated services code point (DSCP),
QoS group ID, Multiprotocol Label Switching (MPLS) experimental bits, Frame Relay discard
eligible (DE) bit, ATM cell loss priority (CLP) bit, source or destination address, or
application.
Marking a packet or frame with its classification allows network devices to easily distinguish
the marked packet or frame. Marking is a useful feature in that it allows network devices to
easily identify packets or frames as belonging to a specific class. After packets have been
identified as belonging to a specific class, QoS mechanisms can be uniformly applied to ensure
compliance with administrative QoS policies.
You can implement packet classification using such tools as Modular quality of service (QoS)
command-line interface (CLI), or MQC, class maps and policy maps, Network-Based
Application Recognition (NBAR), QoS preclassify (VPN QoS), and QoS Policy Propagation
via BGP (QPPB).
Classification and marking can be performed at the network or link layer.
4-220 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
References
For additional information, refer to these resources:
For an overview of classification, refer to Classification Overview at this URL:
http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/
classification_oview_ps6350_TSD_Products_Configuration_Guide_Chapter.html
For additional information on 802.1p/Q marking, refer to Bridging Between IEEE 802.1Q
VLANs at this URL:
http://www.cisco.com/en/US/docs/ios/12_1t/12_1t3/feature/guide/dtbridge.html
For additional information on ISL marking, refer to Configuring Routing between VLANs
with ISL Encapsulation at this URL:
http://www.cisco.com/en/US/docs/ios/12_2/switch/configuration/guide/xcfvlisl.html
For additional information on ISL marking, refer to Configuring QoS at this URL:
http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/catos/8.x/configuration/guide/
qos.html
For more information on classification using MQC, refer to Configuring the Modular
Quality of Service Command-Line Interface at this URL:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fqos_c/fqcprt8/
qcfmcli2.pdf
For more information on class-based marking, refer to Class-Based Marking at this URL:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/121t5/
cbpmark2.pdf
For more information on NBAR, refer to Network-Based Application Recognition at this
URL:
http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6558/ps6612/ps6653/
prod_qas09186a00800a3ded.html
For more information on QoS preclassify, refer to Reference Guide to Implementing Crypto
and QoS at this URL:
http://www.cisco.com/en/US/tech/tk543/tk757/technologies_tech_note09186a00800b3d15.
shtml
For more information on QoS preclassify, refer to Configuring QoS for Virtual Private
Networks at this URL:
http://www.cisco.com/en/US/docs/ios/12_2/qos/configuration/guide/qcfvpn.html
For more information on QPPB, refer to Quality of Service Policy Propagation via BGP
at the following URL:
http://www.cisco.com/en/US/docs/ios/11_1/feature/guide/bgpprop.html
For more information on configuring QPPB, refer to Configuring QoS Policy Propagation
via Border Gateway Protocol at the following URL:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fqos_c/fqcprt1/
qcfprop.pdf
For more information on classification and marking on the Catalyst 2960, refer to
Configuring QoS at the following URL:
http://www.cisco.com/en/US/docs/switches/lan/catalyst2960/software/release/12.2_46_se/
configuration/guide/swqos.html
2009 Cisco Systems, Inc. Classification and Marking 4-221
For more information on classification and marking on the Catalyst 3750, refer to
Configuring QoS at the following URL:
http://www.cisco.com/en/US/docs/switches/lan/catalyst3750/software/release/12.2_46_se/
configuration/guide/swqos.html
For more information on classification and marking on the Catalyst 6500, refer to
Configuring QoS at the following URL:
http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/catos/8.x/configuration/guide/
qos.html
4-222 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

2009 Cisco Systems, Inc. Classification and Marking 4-223
Module Self-Check
Use the questions here to review what you learned in this module. The correct answers and
solutions are found in the Module Self-Check Answer Key.
Q1) Classification of packets should occur _____. (Source: Understanding Classification
and Marking)
A) at the distribution layer
B) anywhere in the core of the network
C) as close to the source of the traffic as possible
D) as close to the destination of the traffic as possible
Q2) To use a class map, QoS must be referenced through the use of _____. (Source: Using
MQC for Classification)
A) a route map
B) an access list
C) a policy map
D) a service map
Q3) What is a requirement for using class-based marking? (Source: Using MQC for Class-
Based Marking)
A) Cisco Express Forwarding must be enabled.
B) Cisco Express Forwarding must be disabled.
C) Cisco Express Forwarding can only be used on serial interfaces.
D) Cisco Express Forwarding can only be used on Ethernet interfaces.
Q4) What is the MQC feature that allows traffic to be classified by a packet subport value?
(Source: Using NBAR for Classification)
A) LDPM
B) NBAR
C) service maps
D) service classes
Q5) The QoS for VPNs feature is designed to operate on _____. (Source: Configuring QoS
Preclassify)
A) logical interfaces
B) loopback interfaces
C) tunnel interfaces
D) physical interfaces
Q6) Which of these commands will modify the IP precedence or QoS group value when the
IP routing table is updated with BGP learned routes? (Source: Configuring QoS Policy
Propagation via BGP)
A) table-map
B) bgp-policy
C) map bpg ip
D) bgp table-map
4-224 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Q7) Which of these commands will enable the propagation of the QoS policy via BGP on
an interface? (Source: Configuring QoS Policy Propagation via BGP)
A) table-map
B) bgp-policy
C) bgp send-policy
D) bgp policy-propagation
Q8) Which of these commands will display both the CoS-to-DSCP and DSCP-to-CoS
mappings on a Catalyst switch? (Source: Configuring LAN Classification and
Marking)
A) show mls maps
B) show mls qos maps
C) show mls maps both
D) show qos mls maps both
2009 Cisco Systems, Inc. Classification and Marking 4-225
Module Self-Check Answer Key
Q1) C
Q2) C
Q3) A
Q4) B
Q5) C
Q6) A
Q7) B
Q8) B
4-226 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Module 5
Congestion Management
Overview
Congestion can occur in many different locations within a network and is the result of many
factors, including oversubscription, insufficient packet buffers, traffic aggregation points,
network transit points, and speed mismatches (such as at LAN-to-WAN links). Simply
increasing link bandwidth is not adequate to solve the congestion issue, in most cases.
Aggressive traffic can fill interface queues and starve more fragile flows such as voice and
interactive traffic. The results can be devastating for delay-sensitive traffic types, making it
difficult to meet the service-level requirements these applications require. Fortunately, there are
many congestion management techniques available on Cisco IOS platforms, which provide you
with an effective means to manage software queues and to allocate the required bandwidth to
specific applications when congestion exists. This module examines the components of queuing
systems and the different congestion management mechanisms available on Cisco IOS devices.
Module Objectives
Upon completing this module, you will be able to use Cisco quality of service (QoS) queuing
mechanisms to manage network congestion. This ability includes being able to meet these
objectives:
Explain the operation of basic queuing algorithms, including FIFO, priority, and round-
robin queuing
Describe hardware and software queuing on a network device
Configure WFQ to manage congestion
Configure CBWFQ and LLQ to manage congestion
Configure WRR on a Cisco Catalyst switch to manage LAN congestion

5-2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 1
Introducing Queuing
Overview
Queuing algorithms are one of the primary ways to manage congestion in a network. Network
devices handle an overflow of arriving traffic by using a queuing algorithm to sort traffic and
determine a method of prioritizing the traffic onto an output link. Each queuing algorithm was
designed to solve a specific network traffic problem and has a particular effect on network
performance. This lesson describes several queuing algorithms.
Objectives
Upon completing this lesson, you will be able to explain the operation of several queuing
algorithms, including FIFO, priority, and round-robin queuing. This ability includes being able
to meet these objectives:
Explain the need for congestion management mechanisms
List the various queuing algorithms
Describe the FIFO queuing algorithm
Describe the priority queuing algorithm
Describe the round-robin queuing algorithm
Describe the WRR queuing algorithm
Describe the deficit round-robin queuing algorithm
Describe the custom queuing algorithm
5-4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Congestion and Queuing
This topic describes the need for congestion management mechanisms.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-2
Congestion and Queuing
Congestion can occur at any point in the network where there are points
of speed mismatches, aggregation, or confluence.
Queuing manages congestion to provide bandwidth and delay
guarantees.

Congestion can occur anywhere within a network where there are points of speed mismatches
(for example, a Gigabit Ethernet link feeding a Fast Ethernet link), aggregation (for example,
multiple Gigabit Ethernet links feeding an upstream Gigabit Ethernet), or confluence (the
flowing together of two or more traffic streams).
Queuing algorithms are used to manage congestion. Many algorithms have been designed to
serve different needs. A well-designed queuing algorithm will provide some bandwidth and
delay guarantees to priority traffic.
2009 Cisco Systems, Inc. Congestion Management 5-5
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-3
Congestion and Queuing:
Speed Mismatch
Speed mismatches are the most typical cause of congestion.
Possibly persistent when going from LAN to WAN.
Usually transient when going from LAN to LAN.

Speed mismatches are the most typical cause of congestion in a network.
Speed mismatches are most common when traffic moves from a high-speed LAN environment
(1000 Mb/s or higher) to lower-speed WAN links (1 or 2 Mb/s). Speed mismatches are also
common in LAN-to-LAN environments when, for example, a 1000-Mb/s link feeds into a 100-
Mb/s link.
5-6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-4
Congestion and Queuing:
Aggregation

The most common site of congestion is at points of aggregation in a network.
Typical points of aggregation occur in WANs when multiple remote sites feed back into a
central services site.
In a LAN environment, congestion resulting from aggregation often occurs at the distribution
layer of networks, where the different access layer devices feed traffic to the distribution-level
switches.
2009 Cisco Systems, Inc. Congestion Management 5-7
Queuing Algorithms
This topic describes the different queuing algorithms.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-5
Queuing Algorithms
FIFO
PQ
Round robin
WRR
DRR
CQ
WFQ
CBWFQ
LLQ

Queuing algorithms include the following:
FIFO: The simplest algorithm.
Priority queuing (PQ): Allows certain traffic to be strictly prioritized.
Round robin: Allows several traffic flows to share bandwidth.
Weighted round robin (WRR): Allows sharing of bandwidth with preferential treatment.
Deficit round robin (DRR): Resolves problem with some WRR implementations.
Custom queuing (CQ): Enables you to guarantee a fixed portion of available bandwidth to
specific traffic and leave the remaining bandwidth to other traffic.
Weighted fair queuing (WFQ): Flow-based algorithm that simultaneously schedules
interactive traffic to the front of a queue to reduce response time and fairly shares the
remaining bandwidth among high-bandwidth flows.
Class-based weighted fair queuing (CBWFQ): Extends WFQ functionality to provide
support for user-defined traffic classes. CBWFQ allows you to specify the exact amount of
bandwidth to be allocated for a specific class of traffic.
Low-latency queuing (LLQ): Brings strict PQ to CBWFQ. Strict PQ allows delay-
sensitive data such as voice to be dequeued and transmitted before packets in other queues
are dequeued.
5-8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-6
Queuing and IPv6
Class-based and flow-based queuing are supported for IPv6.
Cisco IOS Software supports LLQ for IPv6 QoS.
Cisco IOS Software does not support legacy PQ or CQ for IPv6 QoS.
The commands used to configure queuing for IPv6 are the same
commands used to configure queuing for IPv4.

Class-based and flow-based queuing are supported for IPv6. For IPv6 QoS, Cisco IOS Software
supports LLQ; however, it does not support legacy PQ or CQ. The commands used to configure
queuing for IPv6 are the same commands used to configure queuing for IPv4. Refer to the
Cisco IOS Quality of Service Solutions Configuration Guide for configuration and usage
instructions for queuing features.
2009 Cisco Systems, Inc. Congestion Management 5-9
First In First Out
This topic describes the FIFO queuing algorithm.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-7
First In, First Out
First packet in is first packet out
Simplest of all
One queue
All individual queues are FIFO

FIFO is the simplest queuing algorithm. Packets are placed into a single queue and serviced in
the order they were received.
All individual queues are, in fact, FIFO queues. Other queuing methods rely upon FIFO as the
congestion management mechanism for single queues, while using multiple queues to perform
more advanced functions such as prioritization.
5-10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Priority Queuing
This topic describes the priority queuing algorithm.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-8
Priority Queuing
Uses multiple queues.
Allows prioritization.
Always empties first queue before
going to the next queue:
Empty Queue 1.
If Queue 1 is empty, then
dispatch one packet from
Queue 2.
If both Queue 1 and Queue 2
are empty, then dispatch one
packet from Queue 3.
Queues 2 and 3 may starve.

The PQ algorithm is also quite simple. Each packet is assigned a priority and placed into a
hierarchy of queues based on priority. When there are no more packets in the highest queue, the
next lower queue is serviced. Packets are then dispatched from the next highest queue until
either the queue is empty or another packet arrives for a higher PQ.
Packets will be dispatched from a lower queue only when all higher priority queues are empty.
If a packet arrives for a higher queue, the packet from the higher queue is dispatched before any
packets in lower-level queues.
The problem with PQ is that queues with lower priority can starve if a steady stream of
packets continues to arrive for a queue with a higher priority. Packets waiting in the lower
priority queues may never be dispatched.
2009 Cisco Systems, Inc. Congestion Management 5-11
Round Robin
This topic describes the round-robin queuing algorithm.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-9
Round Robin
Uses multiple queues
No prioritizati on
Dispatches one packet from
each queue in each round
One packet from
Queue 1
One packet from
Queue 2
One packet from
Queue 3
Then repeat

With round-robin queuing, one packet is taken from each queue and then the process repeats.
If all packets are the same size, all queues share the bandwidth equally. If packets being put
into one queue are larger, that queue will receive a larger share of bandwidth.
No queue will starve with round robin because all queues receive an opportunity to dispatch a
packet every round.
A limitation of round robin is the inability to prioritize traffic.
5-12 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Weighted Round Robin
This topic describes the weighted round robin (WRR) queuing algorithm.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-10
Weighted Round Robin
Allows prioritization
Assign a weight to each queue
Dispatches packets from each
queue proportionally to an assigned
weight:
Dispatch up to 4 from Queue 1
Dispatch up to 2 from Queue 2
Dispatch 1 from Queue 3
Go back to Queue 1

The WRR algorithm was developed to provide prioritization capabilities for round robin.
In WRR, packets are assigned a class (voice, file transfer, and so on) and placed into the queue
for that class of service. Packets are accessed round-robin style, but queues can be given
priorities called weights. For example, in a single round, four packets from a high-priority
class might be dispatched, followed by two from a middle-priority class, and then one from a
low-priority class.
Some implementations of the WRR algorithm will dispatch a configurable number of bytes
during each round.
2009 Cisco Systems, Inc. Congestion Management 5-13
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-11
Weighted Round Robin (Cont.)
Problem with WRR
Some implementations of WRR dispatch a configurable number
of bytes (threshold) from each queue for each roundseveral
packets can be sent in each turn.
The router is allowed to send the entire packet even if the sum of
all bytes is more than the threshold.

Some implementations of the weighted round-robin algorithm provide preferential service by
dispatching a configurable number of bytes each round rather than a number of packets. The
Cisco custom queuing (CQ) mechanism is an example of this implementation.
The figure illustrates a unique-case scenario of the WRR algorithm, in which these parameters
were used to implement WRR queuing on an interface:
Maximum transmission unit (MTU) of the interface is 1500 bytes.
The byte count to be sent for the queue in each round is 3000 bytes (twice the MTU).
The example shows how the router first sent two packets with a total size of 2999 bytes.
Because this is still within the limit (3000), the router can send the next packet (MTU-sized).
The result was that the queue received almost 50 percent more bandwidth in this round than it
should have received.
This is one of the drawbacks of WRR queuingit does not allocate bandwidth accurately.
The limit or weight of the queue is configured in bytes. The accuracy of WRR queuing depends
on the weight (byte count) and the MTU. If the ratio between the byte count and the MTU is
too small, WRR queuing will not allocate bandwidth accurately. If the ratio between the byte
count and the MTU is too large, WRR queuing will cause long delays.
5-14 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Deficit Round Robin
This topic describes the deficit round-robin queuing algorithm.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-12
Deficit Round Robin
Solves problem with some implementations of WRR
Keeps track of the number of extra bytes dispatched in each
roundthe deficit
Adds the deficit to the number of bytes dispatched in the next
round
Problem resolved with deficit round robin:
Threshold of 3000
Packet sizes of 1500, 1499, and 1500
Total sent in round = 4499 bytes
Deficit = (4499 3000) = 1499 bytes
On the next round send only the (threshold deficit) =
(3000 1499) = 1501 bytes

Deficit round robin is an implementation of the WRR algorithm developed to resolve the
inaccurate bandwidth allocation problem with WRR. The Cisco modified deficit round robin
(MDRR) method used on the Cisco 12000 series is an implementation of deficit round robin.
Deficit round robin uses a deficit counter to track the number of extra bytes dispatched over
the number of bytes that was to be configured to be dispatched each round. During the next
round, the number of extra bytesthe deficitis effectively subtracted from the
configurable number of bytes that are dispatched.
2009 Cisco Systems, Inc. Congestion Management 5-15
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-13
Modified Deficit Round Robin
Differs from regular DRR by adding a special low-latency queue that can be
serviced in one of two modes:
Strict priority mode: Low-latency queue is serviced whenever it is not empty.
Alternate mode: MDRR alternat ely services the low-latency queue and any
other configured queues.
Each queue within MDRR is defined by:
Quantum value: Average number of bytes served in each round.
Deficit counter: Number of bytes a queue has transmitted in each round.

MDRR is a class-based composite scheduling mechanism that allows for queueing of up to
eight traffic classes. It operates in the same manner as class-based weighted fair queueing
(CBWFQ) and allows definition of traffic classes based on customer match criteria (such as
access lists); however, MDRR does not use the weighted fair queueing algorithm.
With MDRR configured in the queueing strategy, nonempty queues are served one after the
other, in a round-robin fashion. Each time a queue is served, a fixed amount of data is
dequeued. The algorithm then services the next queue. When a queue is served, MDDR keeps
track of the number of bytes of data that were dequeued in excess of the configured value. In
the next pass, when the queue is served again, less data is dequeued to compensate for the
excess data that was served previously. As a result, the average amount of data dequeued per
queue is close to the configured value.
Each queue within MDRR is defined by these two variables:
Quantum value: Average number of bytes served in each round.
Deficit counter: Number of bytes a queue has transmitted in each round. The counter is
initialized to the quantum value.
Packets in a queue are served as long as the deficit counter is greater than zero. Each packet
served decreases the deficit counter by a value equal to its length in bytes. A queue can no
longer be served after the deficit counter becomes zero or negative. In each new round, the
deficit counter for each nonempty queue is incremented by its quantum value. In general, the
quantum size for a queue should not be smaller than the maximum transmission unit (MTU) of
the interface to ensure that the scheduler always serves at least one packet from each nonempty
queue.
5-16 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Each MDRR queue can be given a relative weight, with one of the queues in the group defined
as a priority queue. The weights assign relative bandwidth for each queue when the interface is
congested. The MDRR algorithm dequeues data from each queue in a round-robin fashion if
there is data in the queue to be sent. During each cycle, a queue can dequeue a quantum based
on its configured weight.
MDRR differs from regular DRR by adding a special low-latency queue that can be serviced in
one of two modes:
Strict priority mode: The low-latency queue is serviced whenever it is not empty. This
provides the lowest delay possible for delay-sensitive traffic. The scheduler services only
the current non-priority packet and then switches to the low-latency queue. The scheduler
starts to service a non-priority queue only after the low-latency queue becomes completely
empty. This mode can starve other queues, particularly if the matching flows are aggressive
senders.
Alternate mode: The MDRR scheduler alternatively services the low-latency queue and
any other configured queues. Alternate mode can exercise less control over jitter and delay.
If the MDRR scheduler starts to service frames from a data queue and then a voice packet
arrives in the low-latency queue, the scheduler completely serves the non-priority queue
until its deficit counter reaches zero. During this time, the low-latency queue is not
serviced, and the VoIP packets are delayed. It is important to note that the priority queue in
alternate priority mode is serviced more than once in a cycle, and thus takes more
bandwidth than other queues with the same nominal weight. How much more is a function
of how many queues are defined. For example, with three queues, the low latency queue is
serviced twice as often as the other queues, and it sends twice its weight per cycle.
The figure shows three queues, each of which contains some packets that have been received
and queued. For example, Queue 0 contains three packets: P1 (a 250-byte packet), P2 (a 1500-
byte packet), and P3 (another 250-byte packet). Queue 0 is the low latency queue, and it is
configured to operate in alternate mode. Each queue is assigned a quantum, as follows:
Queue 0 has a quantum of 1500 bytes.
Queue 1 has a quantum of 3000 bytes.
Queue 2 has a quantum of 1500 bytes.
The figure illustrates the initial state of the queues for an example of MDRR operations, which
is continued on the following pages.
2009 Cisco Systems, Inc. Congestion Management 5-17
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-14
Modified Deficit Round Robin (Cont.)

Queue 0 is serviced first. Its quantum is added to its deficit counter, Packet 1 (250 bytes) is
transmitted, and its size is subtracted from the deficit counter. Because the deficit counter of
Queue 0 is still greater than 0 (1500 - 250 = 1250), Packet 2 is transmitted as well, and its
length subtracted from the deficit counter. The deficit counter of Queue 0 is now -250, so queue
1 is serviced next.
The deficit counter of Queue 1 is set to 3000, and packets 4 and 5 are transmitted. As each
packet is transmitted, its size is subtracted from the deficit counter. This reduces the deficit
counter of Queue 1 to 0.
5-18 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-15
Modified Deficit Round Robin (Cont.)

Because alternate priority mode is configured, MDRR services Queue 0 again after servicing
Queue 1. Again, the Queue 0 quantum value of 1500 is added to the current deficit counter of
-250, making the new deficit counter of Queue 0 1250. Packet 3 (whose size is 250 bytes) is
now transmitted, and Queue 0 is now empty. When a queue is emptied, its deficit counter is set
to 0, as shown in the figure.
Queue 2 is serviced next. Its deficit counter is set to 1500. Packets 7 through 10 are transmitted,
which leaves the deficit counter at 500 (1500 - (4*250) = 500). Because the deficit counter is
still greater than 0, packet 11 is also transmitted. When packet 11 is transmitted, Queue 2 is
empty, and its deficit counter is set to 0, as shown in the figure.
Note MDRR is supported in Cisco IOS XR Software. For more information on MDRR, please refer
to the document Understand and Configure MDRR/WRED on the Cisco 12000 Series
Internet Router and the section "Configuring Modular Quality of Service Congestion
Management on Cisco IOS XR Software" in the Cisco IOS XR Modular Quality of Service
Configuration Guide, Release 3.8, on Cisco.com.

Note WFQ, CBWFQ, and LLQ are explained in depth in another lesson.
2009 Cisco Systems, Inc. Congestion Management 5-19
Custom Queuing
This topic describes the custom queuing algorithm.
2009 Cisco Systems, Inc. All rights reserved. QoSv2.35-16
Custom Queuing
Sends packets from a particular
queue until configured byte count
is exceeded
Services queues in round-robin
fashion
Maintains 17 output queues for
CQ-enabled interface
System queue (Queue 0) for
high-priority packets such as
keepalive packets only;
emptied before other queues
Queues 1 through 16
configurable (you assign
packets to these queues)
Statically configured; does not
adapt to changing network
conditions

The Cisco IOS QoS CQ feature can provide guaranteed bandwidth to specific traffic at a
potential congestion point, thus assuring the traffic a fixed portion of available bandwidth and
leaving the remaining bandwidth to other traffic. For example, you could reserve half of the
bandwidth for Systems Network Architecture (SNA) data, allowing the remaining half to be
used by other protocols. If a particular type of traffic is not using the bandwidth reserved for it,
unused bandwidth can be dynamically allocated to other traffic types.
Note CQ is statically configured and does not adapt to changing network conditions. With CQ
enabled, the system takes longer to switch packets than FIFO because the packets are
classified by the processor card.
CQ allows you to specify a certain number of bytes to forward from a queue each time the
queue is serviced. This allows you to share the network resources among applications with
specific minimum bandwidth requirements. You can also specify a maximum number of
packets in each queue.
CQ handles traffic by specifying the number of packets or bytes to be serviced for each class of
traffic. It services the queues by cycling through them in round-robin fashion, sending the
portion of allocated bytes for each queue before moving to the next queue. If one queue is
empty, the router sends packets from the next queue that has packets ready to send.
5-20 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
When CQ is enabled on an interface, the system maintains 17 output queues for that interface.
You can specify queues 1 through 16. Queue number 0 is a system queue; it is emptied before
any of the queues numbered 1 through 16 are processed. The system queues high-priority
packets, such as keepalive packets and signaling packets, to this queue. Other traffic cannot be
configured to use this queue.
In order to allocate bandwidth to different queues, you must specify the byte count for each
queue. The router sends packets from a particular queue until the byte count is exceeded. Once
the byte count value is exceeded, the packet that is currently being sent is completely sent.
Therefore, if you set the byte count to 100 bytes and the packet size of your protocol is 1024
bytes, then every time this queue is serviced, 1024 bytes will be sent rather than 100 bytes.
For example, suppose one protocol has 500-byte packets, another has 300-byte packets, and a
third has 100-byte packets. If you want to split the bandwidth evenly across all three protocols,
you might choose to specify byte counts of 200, 200, and 200 for each queue. However, this
configuration does not result in a 33/33/33 ratio. When the router services the first queue, it
sends a single 500-byte packet; when it services the second queue, it sends a 300-byte packet;
and when it services the third queue, it sends two 100-byte packets. The effective ratio is
50/30/20. Thus, setting the byte count too low can result in an unintended bandwidth allocation.
However, very large byte counts may also cause an unacceptable distribution. That is, if you
assign 10 KB, 10 KB, and 10 KB to the three queues in the example, each protocol is serviced
promptly when its queue is the one being serviced, but it may be a long time before the queue is
serviced again. In order to service queues in a timely manner and ensure that the configured
bandwidth allocation is as close as possible to the required bandwidth allocation, you must
determine the byte count based on the packet size of each protocol. Otherwise your percentages
may not match what you configure.
Note CQ was modified in Cisco IOS Software Release 12.1. When the queue is depleted early, or
the last packet from the queue does not exactly match the configured byte count, the
amount of deficit is remembered and accounted for the next time the queue is serviced.
Beginning with Cisco IOS Software Release 12.1, you need not be as accurate in specifying
byte counts as you did when using earlier Cisco IOS Software releases that did not take
deficit into account.
Window size also affects the bandwidth distribution. If the window size of a particular protocol
is set to one, that protocol will not place another packet into the queue until it receives an
acknowledgment. The CQ algorithm moves to the next queue if the byte count is exceeded or
no packets are in that queue.
2009 Cisco Systems, Inc. Congestion Management 5-21
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-17
Summary
Congestion can occur at any point in the network, but particularly at points of
speed mismatches and traffic aggregation.
Three basic queuing algorithms are used to manage congestion: FIFO, priority,
and round-robin queuing.
FIFO is the simplest queuing algorithm.
Priority queuing allows for the prioritization of traffic through the use of multiple
queues, but can starve lower-priority queues.
Round-robin queuing uses multiple queues to provide equal access to all queues.
Weighted round robin offers priority access to multiple queues by assigning
weights to queues, but some implementations may provide inaccurate access to
some queues.
Deficit round-robin queuing solves the inaccuracy problem with round robin by
keeping a deficit count.
Custom queuing enables you t o guarantee a fixed portion of available bandwidth
to specific traffic and leave the remaining bandwidth to other traffic.

5-22 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 2
Understanding Queuing
Implementations
Overview
Queuing technologies are one of the primary ways to manage congestion in a network. Network
administrators and network designers benefit from an understanding of how the queuing
algorithms are implemented. This lesson describes the relationship of queuing components and
how this affects the overall queuing performance.
Objectives
Upon completing this lesson, you will be able to describe hardware and software queuing on a
network device. This ability includes being able to meet these objectives:
Describe the primary components of a queuing mechanism
Explain the significance of the size of the hardware queue
Explain how congestion occurs on software interfaces
Describe the basic software queuing technologies used on Cisco network devices
5-24 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Queuing Components
This topic describes the primary components of a queuing mechanism.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-2
Queuing Components
The hardware queuing system always uses FIFO queuing.
The software queuing system can be selected and configured depending
on the platform and Cisco IOS Software version.

Queuing on routers is necessary to accommodate bursts when the arrival rate of packets is
greater than the departure rate, usually because of one of these two reasons:
Input interface is faster than the output interface
Output interface is receiving packets coming in from multiple other interfaces
Initial implementations of queuing used a single FIFO strategy. More complex scheduling
mechanisms were introduced when special requirements needed routers to differentiate
between packets of different levels of importance.
Queuing was split into these two parts:
Hardware queue: Uses FIFO strategy, which is necessary for the interface drivers to
transmit packets one by one. The hardware queue is sometimes referred to as the transmit
queue (TxQ).
Software queue: Schedules packets into the hardware queue based on the QoS
requirements.
The figure illustrates these actions that have to be taken before a packet can be transmitted:
Most queuing mechanisms include classification of packets.
After a packet is classified, a router has to determine whether it can put the packet into the
queue or drop the packet. Most queuing mechanisms will drop a packet only if the
corresponding queue is full (tail drop). Some mechanisms use a more intelligent dropping
scheme, such as weighted fair queuing (WFQ), or a random dropping scheme, such as
weighted random early detection (WRED).
2009 Cisco Systems, Inc. Congestion Management 5-25
If the packet is allowed to be enqueued, it will be put into the FIFO queue for that
particular class.
Packets are then taken from the individual per-class queues and put into the hardware
queue.
5-26 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-3
The Software Queue
Generally, a full hardware queue indicates interface congestion,
and software queuing is used to manage it.
When a packet is being forwarded, the router will bypass
the software queue if the hardware queue has space in it
(no congestion).

Software queuing is implemented when the interface is congested; the software queuing system
is bypassed whenever there is room in the hardware queue.
The software queue is, therefore, used only when data must wait to be placed into the hardware
queue.
2009 Cisco Systems, Inc. Congestion Management 5-27
Hardware Queue (TxQ) Size
This topic describes the significance of the size of the hardware queue.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-4
Hardware Queue (TxQ) Size
Routers determine the length of the hardware queue based on the
configured bandwidth of the interface.
The length of the hardware queue can be adjusted with the tx-ring-limit
command.
Reducing the size of the transmit ring has two benefits:
It reduces the maximum amount of time that packets wait in the FIFO
queue before being transmitted.
It accelerates the use of QoS in the Cisco IOS Software.
Improper tuning of the hardware queue may produce undesirable results:
Long TxQ may result in poor performance of the software queue.
Short TxQ may result in a large number of interrupts, which cause
high CPU utilization and low link utilization.

The double queuing strategy (software and hardware queue) has its impacts on the results of
overall queuing. Software queues serve a valuable purpose. If the hardware queue is too long, it
will contain a large number of packets scheduled in the FIFO fashion. A long FIFO hardware
queue most likely defeats the purpose of the QoS design requiring a certain complex software
queuing system (for example, custom queuing [CQ]).
So why use the hardware queue at all? Or why not just set its length to one? That would force
all packets to go through the software queue and be scheduled one by one to the interface for
transmission. This approach has these drawbacks:
Each time a packet is transmitted, the interface driver interrupts the CPU and requests more
packets to be delivered into its hardware queue. Some queuing mechanisms have complex
scheduling that takes time to deliver more packets. The interface does not send anything
during that time (link utilization is decreased) if the hardware queue is empty, because its
maximum size is one.
The CPU schedules packets one by one instead of many at the same time (in the same
interrupt interval), which increases the CPU utilization.
The default TxQ size is determined by the Cisco IOS Software, based on the bandwidth of the
media, and should be fine for most queuing implementations. Some platforms and QoS
mechanisms will automatically adjust the TxQ size to an appropriate value. Faster interfaces
have longer hardware queues because they produce less delay. Slower interfaces have shorter
hardware queues to prevent too much delay in the worst-case scenario in which the entire
hardware queue is full of MTU-sized packets.
5-28 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Note Refer to Cisco IOS Software configuration documentation for more information.
The transmit ring serves as a staging area for packets in line to be transmitted. The router needs
to enqueue a sufficient number of packets on the transmit ring and ensure that the interface
driver has packets with which to fill available cell timeslots.
The primary reason to tune the transmit ring is to reduce latency caused by queuing. On any
network interface, queuing forces a choice between latency and the amount of burst that the
interface can sustain. Larger queue sizes sustain longer bursts while increasing delay. Tune the
size of a queue when traffic is experiencing unnecessary delay.
The size of the transmit ring must be small enough to avoid introducing latency because of
queuing. The transmit ring must also be large enough to avoid drops and a resulting impact to
TCP-based flows. Queuing on the transmit ring introduces a serialization delay that is directly
proportional to the depth of the ring. An excessive serialization delay can impact latency
budgets for delay-sensitive applications such as voice. Cisco recommends reducing the size of
the transmit ring for virtual circuits (VCs) carrying voice. Select a value based on the amount of
serialization delay, expressed in seconds, introduced by the transmit ring. Use the following
formula:





Note IP packets on the Internet are typically one of three sizes: 64 bytes (for example, control
messages), 1500 bytes (for example, file transfers), or 256 bytes (all other traffic). These
values produce a typical overall Internet packet size of 250 bytes.
2009 Cisco Systems, Inc. Congestion Management 5-29
Congestion on Software Interfaces
This topic describes how congestion occurs on software interfaces.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-5
Congestion on Software Interfaces
Subinterfaces and software interfaces do not have their own
separate Tx ring, therefore no congestion can occur.
Dialers, tunnels, Frame Relay subinterfaces
They congest when their main hardware interface Tx ring
congests
The Tx-ring state (full, not full) is, therefore, an indication of
congestion for software interfaces.
Only hardware interfaces have a Tx ring.

Subinterfaces and software interfaces do not have their own separate transmit (Tx) ring;
therefore, no congestion can occur. These interface types include dialers, tunnels, and Frame
Relay subinterfaces, and will only congest when their main hardware interface Tx ring
congests. The Tx ring state is an indication of congestion for software interfaces.
Software interfaces can implement a software shaping queue when traffic shaping is configured
on the Frame Relay subinterface, and, in this case, the main interface software queue will be a
FIFO queue.
5-30 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Queuing Implementations in Cisco IOS Software
This topic describes the basic software queuing technologies used on Cisco network devices.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-6
Queuing Implementations in Cisco IOS
Software
Priority queuing
Implementation of priority queuing
Four queues (high, medium, normal, low)
Custom queuing
Implementation of weighted round robin
Up to 16 queues
Threshold based on number of bytes
Configurable priority queues
Inaccurate bandwidth allocation due to threshold issue with
weighted round robin
Modified deficit round robin
Deficit round robin with a priority queue for Cisco 12xxx routers

The figure shows these available software queuing technologies:
Priority queuing (PQ):
A Cisco implementation of the priority queuing algorithm
Allows four queues to be used for prioritization (high, medium, normal, low)
Allows for a variety of classification, including source IP address, destination IP
address, IP precedence, and differentiated services code point (DSCP)
Custom queuing (CQ):
A Cisco implementation of weighted round robin (WRR)
Allows up to 16 queues to be used for traffic classification
Allows for a variety of classification, including source IP address, destination IP
address, IP Precedence, and DSCP
Tail drop used within each individual queue
Modified deficit round robin (MDRR):
A Cisco implementation of deficit round robin
Available only on the Cisco 12000 Series routers
2009 Cisco Systems, Inc. Congestion Management 5-31
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35-7
Summary
Each physical interface has a hardware and a software queuing
system. The hardware queuing system uses FIFO, while the
software queuing system can be configured depending on the
platform and IOS version.
The length of the hardware queue has a significant impact
on performance and can be configured on a router with the
tx-ring-limit command.
Software interfaces have no queues; they congest only when their
hardware interface congests.
Cisco offers implementations of basic queuing algorithms:
priority queuing, custom queuing, and modified deficit round robin.


5-32 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 3
Configuring FIFO and WFQ
Overview
FIFO and weighted fair queuing (WFQ) are the two primary default queuing mechanisms that
are implemented on Cisco routers. WFQ was developed to resolve some of the problems, such
as queue starvation, delay, and jitter, resulting from the use of basic queuing methods. WFQ
dynamically divides available bandwidth by a calculation based on the total number of flows
and the weight of each given flow. Bandwidth cannot be guaranteed, because the number of
flows are constantly changing and therefore so is the allocated bandwidth to each flow. This
lesson describes how to configure WFQ to manage congestion.
Objectives
Upon completing this lesson, you will be able to configure WFQ to manage congestion, given a
network with suboptimal QoS performance. This ability includes being able to meet these
objectives:
Describe the FIFO queuing mechanism
Give a detailed explanation of WFQ
Identify the parameters on which WFQ can classify traffic
Explain the insertion and drop policy used by WFQ
Explain how finish time is calculated based on weight and how it is used in the operation of
WFQ
Describe the benefits and drawbacks of using WFQ to implement QoS
Identify the Cisco IOS commands required to configure WFQ on a Cisco router
Identify the Cisco IOS commands required to monitor WFQ on a Cisco router
5-34 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
FIFO Queuing
This topic describes the FIFO queuing mechanism.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-2
FIFO Queuing
The software FIFO queue is basically an extension of the
hardware FIFO queue.

FIFO queuing has no classification because all packets belong to the same class. Packets are
dropped when the output queue is full (tail drop). The scheduler services packets in the order
they arrive.
The software FIFO queue is basically an extension of the hardware FIFO queue.
2009 Cisco Systems, Inc. Congestion Management 5-35
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-3
FIFO Queuing (Cont.)
Benefits
Simple and fast (one single queue with a simple scheduling
mechanism)
Supported on all platforms
Supported in all switching paths
Supported in all IOS versions
Drawbacks
Causes starvation (aggressive flows can monopolize links)
Causes jitter (bursts or packet trains temporarily fill the queue)

Although FIFO queuing might be regarded as the fairest queuing mechanism, it has these
drawbacks:
FIFO is extremely unfair when an aggressive flow contests with a fragile flow. Aggressive
flows send a large number of packets, many of which are dropped. Fragile flows send a
modest number of packets and most of them are dropped because the queue is always full
due to the aggressive flow. This type of behavior is called starvation.
Short or long bursts cause a FIFO queue to fill. Packets entering an almost-full queue have
to wait a long time before they can be transmitted. At another time, the queue might be
empty, causing packets of the same flow to experience almost no delay. Variation in delay
is called jitter.
Despite the drawbacks, FIFO is still the most-used queuing mechanism because of these
benefits:
FIFO is simple and fast. Most high-end routers with fast interfaces are not really challenged
by the drawbacks. Furthermore, routers are not capable of complex classification and
scheduling when they have to process a large number of packets per second. FIFO is,
therefore, the most suitable queuing mechanism on high-end router platforms.
FIFO is supported on all platforms.
FIFO queuing is supported in all versions of Cisco IOS Software.
5-36 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Weighted Fair Queuing
This topic describes weighted fair queuing (WFQ).
2009 Cisco Systems, Inc. All rights reserved. QoS v2.35-4
Weighted Fair Queuing
A queuing algorithm should share the bandwidth fairly among
flows by:
Reducing response time for interactive flows by scheduling
them to the front of the queue
Preventing high-volume conversations from monopolizing an
interface
In the WFQ implementation, messages are sorted into
conversations (flows) and transmitted by the order of the last bit
crossing its channel.
Unfairness is reinstated by introducing weight to give
proportionately more bandwidth to flows with higher IP
precedence (lower weight).

WFQ was introduced as a solution to these problems of the queuing mechanisms:
FIFO queuing causes starvation, delay, and jitter.
Priority queuing (PQ) causes starvation of other lower priority classes and suffers from all
FIFO problems within each of the four queues that it uses for prioritization.
Custom queuing (CQ) causes long delays and also suffers from all FIFO problems within
each of the 16 queues that it uses for traffic classification.
The idea of WFQ is as follows:
To have a dedicated queue for each flow (no starvation, delay, or jitter within the queue)
To allocate bandwidth fairly and accurately among all flows (minimum scheduling delay,
guaranteed service)
To use IP precedence as weight when allocating bandwidth
2009 Cisco Systems, Inc. Congestion Management 5-37
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-5
WFQ Architecture
WFQ uses per-flow FIFO queues

WFQ uses automatic classification. Manually defined classes are not supported.
WFQ dropping is not a simple tail drop. WFQ drops packets of the most aggressive flows.
WFQ scheduler is a simulation of a time-division multiplexing (TDM) system. WFQ adapts to
the number of active flows (queues) and attempts to allocate equal amounts of bandwidth to
each flow (queue). Flows with small packets (usually interactive flows) get much better service
because they do not need a great deal of bandwidth. They need low delay, however, which they
get because of the way in which the WFQ algorithm works.
5-38 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-6
WFQ Implementations
Implementation parameters
Queuing platform: central CPU or VIP
Classification mechanism
Weighted fairness
Modified tail drop within each queue

WFQ is supported on most Cisco routers, as well as on Versatile Interface Processors (VIPs).
The implementation of WFQ on the VIP is distinct in these ways:
Classification identifies a flow and assigns a queue to the flow.
Weight is used for scheduling to give proportionately more bandwidth to flows with a
higher IP precedence.
The tail-dropping scheme is improved to drop packets of the most aggressive flows.
2009 Cisco Systems, Inc. Congestion Management 5-39
WFQ Classification
This topic describes the parameters on which WFQ can classify traffic.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-7
WFQ Classification
Packets of the same flow end up in the same queue.
The ToS field is the only parameter that might change, causing
packets of the same flow to end up in different queues.

WFQ classification has to identify individual flows. (The term conversation is also used to
signify flow.) A flow is identified based on information taken from the IP header and the TCP
or User Datagram Protocol (UDP) headers, such as the following:
Source IP address
Destination IP address
Protocol number (identifying TCP or UDP)
Type of service field
Source TCP or UDP port number
Destination TCP or UDP port number
These parameters are usually fixed for a single flow, although there are some exceptions:
A QoS design can mark packets with different IP precedence values even if they belong to
the same flow. You should avoid this when using WFQ.
Some applications change port numbers (for example, TFTP).
If packets of the same flow do not have the same parameters (for example, a different ToS
field), the packets can end up in different queues and reordering can occur.
The parameters are used as input for a hash algorithm that produces a fixed-length number that
is used as the index of the queue.
5-40 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-8
WFQ Classification (Cont.)
A fixed number of per-flow queues is configured.
A hash function is used to translate flow parameters into a queue
number.
System packets (8 queues) and RSVP flows (if configured) are
mapped into separate queues.
Two or more flows could map into the same queue, resulting in
lower per-flow bandwidth.
Important: The number of queues configured has to be larger than
the expected number of flows.

WFQ uses a fixed number of queues. The hash function is used to assign a queue to a flow.
There are eight additional queues for system packets and optionally up to 1000 queues for
Resource Reservation Protocol (RSVP) flows. The number of dynamic queues WFQ uses by
default is based on the interface bandwidth. Using the default interface bandwidth, WFQ uses
256 dynamic queues. The number of queues can be configured in the range between 16 and
4096 (the number must be a power of 2). The default number of dynamic queues for different
interface bandwidths is shown in the table.
Bandwidth Range Number of Dynamic Queues
Less than or equal to 64 kb/s 16
More than 64 kb/s and less than or equal to 128 kb/s 32
More than 128 kb/s and less than or equal to 256 kb/s 64
More than 256 kb/s and less than or equal to 512 kb/s 128
More than 512 kb/s 256
If there are a large number of concurrent flows, it is likely that two flows could end up in the
same queue. You should have several times as many queues as there are flows (on average).
This may not be possible in larger environments where the number of concurrent flows is in the
thousands.
The probability of two flows ending up in the same flow could be calculated using the
following formula:
)! (
!
1
Flows Queues Queues
Queues
P
Flows


2009 Cisco Systems, Inc. Congestion Management 5-41
The table lists the probability values for three sizes of the WFQ system (64, 128, and 256
queues), with the number of concurrent flows from 5 to 40.
Flows 64 Queues 128 Queues 256 Queues
5 15% 8% 4%
10 52% 30% 16%
15 83% 57% 34%
20 96% 79% 53%
25 100% 92% 70%
30 100% 98% 83%
35 100% 99% 91%
40 100% 100% 96%
The following is the sample calculation of the probability value for 5 flows and 64 queues:








5-42 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
WFQ Insertion and Drop Policy
This topic describes the WFQ insertion and drop policy.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-9
WFQ Insertion and Drop Policy
WFQ has two modes of dropping:
Early dropping when the congestion discard threshold is
reached.
Aggressive dropping when the hold-queue out limit is reached.
WFQ typically drops packets of the most aggressive flow.
Drop mechanism exceptions:
Packet classified into an empty sub-queue is never dropped.
Packet precedence has no effect on the dropping scheme.

WFQ uses these two parameters that affect the dropping of packets:
The congestive discard threshold (CDT) is used to start dropping packets of the most
aggressive flow, even before the hold-queue limit is reached.
The hold-queue out limit (HQO) defines the maximum number of packets that can be in the
WFQ system at any time.
There are two exceptions to the WFQ insertion and drop policy, as follows:
If the WFQ system is above the CDT limit, the packet is still enqueued if the per-flow
queue is empty.
The dropping strategy is not directly influenced by IP precedence.
2009 Cisco Systems, Inc. Congestion Management 5-43
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 10
Finish Time Calculation

The length of queues (for scheduling purposes) is not in packets but in the time it would take to
transmit all the packets in the queue. The end result is that WFQ adapts to the number of active
flows (queues) and allocates equal amounts of bandwidth to each flow (queue).
The side effect is that flows with small packets (usually interactive flows) get much better
service because they do not need a lot of bandwidth. They need low delay, however, which they
get because small packets have a low finish time.
The figure illustrates how two queues (queue A and queue B) are contesting for link bandwidth.
For this example, assume that the time units are in ms and time T (value 0 is used in the figure)
is the starting point.
Queue A receives packets in the following order and times:
Packet A1 arrives at time T + 0 ms and requires 100 ms to be transmitted.
Packet A2 arrives at time T + 60 ms (the input interface is obviously faster than the output
interface because the arrival time of packet A2 is before the finish time of packet A1) and
requires 20 ms to be transmitted.
Packet A3 arrives at time T + 70 ms (the input interface is obviously much faster than the
output interface) and requires 10 ms to be transmitted.
Queue B receives packets in the following order and times:
Packet B1 arrives at time T + 50 ms and requires 300 ms to be transmitted.
Packet B2 arrives at time T + 100 ms and also requires 300 ms to be transmitted.
The finish times of packets in Queue A are as follows:
Packet A1 has a finish time that is the sum of the current time (because the queue was
empty at the time of arrival) plus the time it takes to transmit this packet (100 ms): FTA1 =
0 ms + 100 ms = 100 ms.
5-44 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Packet A2 has a finish time that is the sum of the finish time of the last packet in queue A
(packet A1) plus the time it would take to transmit this packet (20 ms): FTA2 = 100 ms +
20 ms = 120 ms.
Packet A3 has a finish time that is the sum of the finish time of the last packet in queue A
(packet A2) plus the time it would take to transmit this packet (20 ms): FTA3 = 120 ms +
10 ms = 130 ms.
The finish times for the packets in Queue B are as follows:
Packet B1 has a finish time that is the sum of the current time (because the queue was
empty at the time of arrival) plus the time it takes to transmit this packet (300 ms): FTB1 =
50 ms + 300 ms = 350 ms.
Packet B2 has a finish time that is the sum of the finish time of the last packet in queue B
(packet B1) plus the time it would take to transmit this packet (300 ms): FTB2 = 350 ms +
300 ms = 650 ms.
The packets are scheduled into the hardware queue (or the TxQ) in the ascending order of
finish times:
1. A1 (100 ms)
2. A2 (120 ms)
3. A3 (130 ms)
4. B1 (350 ms)
5. B2 (650 ms)
Note WFQ prevents reordering of packets within a single flow (conversation). Small packets are
automatically preferred over large packets.

2009 Cisco Systems, Inc. Congestion Management 5-45
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 11
WFQ Dropping Operations
HQO is the maximum number of packets that the WFQ system can hold.
CDT is the threshold when WFQ starts dropping packets of the most
aggressive flow.
N is the number of packets in the WFQ system when the Nth packet arrives.

The figure illustrates the dropping scheme of WFQ. The process can be organized into these
steps:
Step 1 Drop the new packet if the WFQ system is full (hold-queue limit reached) and the
new packet has the worst finish time (the last in the entire system). WFQ calculates
the finish times based on factors such as packet length, packet arrival time, the
amount of time needed to transmit the packet, and the finish time of the previous
packet placed in the queue.
Step 2 Drop the packet with the worst finish time in the WFQ system if the system is full.
Enqueue the new packet.
Step 3 When the WFQ system is above the CDT limit, a new packet is dropped if that
packet is the last in the WFQ system, even though the WFQ system is still within the
hold-queue limit.
Step 4 When the WFQ system is above the CDT limit, and if a new packet would not be the
last in the WFQ system, the new packet can be enqueued and no other packet is
dropped.
When the WFQ system is below both the HQO and the CDT limit, newly arriving packets are
enqueued normally.
5-46 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 12
Weight in WFQ Scheduling

The figure introduces the weight into the finish time calculation. The time it takes to transmit
the packet is divided by IP Precedence increased by one (to prevent division by zero).
The WFQ implementation in Cisco routers is optimized in these ways:
The real time it takes to transmit the packet is not relevant. The packet size can be used
instead because it is proportional to the transmit time.
The packet size is not divided by IP precedence (division is a CPU-intensive operation).
Instead, the size is multiplied by a fixed value (one multiplication value for each IP
Precedence value).
Packets with IP Precedence one appear half the size they really are. The result is that these
packets receive twice as much bandwidth as packets with IP Precedence zero.
2009 Cisco Systems, Inc. Congestion Management 5-47
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 13
WFQ Case Study
WFQ system can hold a maximum of ten packets
(hold-queue limit).
Early dropping (of aggressive flows) should start when there are
eight packets (congestive discard threshold) in the WFQ system.

The case study on the following pages describes how packets are dropped in various situations.
The WFQ system is reduced to a modest hold-queue limit of ten and a congestive discard
threshold of eight.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 14
WFQ Case Study
Interface Congestion
HQO (hold-queue out limit) is the maximum number of packets
that the WFQ system can hold and HQO = 10.

There are already ten packets in the WFQ system. The new packet would be the eleventh and
also the last in the entire WFQ system.
5-48 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 15
WFQ Case Study
Interface Congestion (Cont.)
HQO is the maximum number of packets that the WFQ system can hold
and HQO = 10.
Absolute maximum (HQO=10) exceeded, new packet is the last in the
TDM system and is dropped.

The new packet is dropped.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 16
WFQ Case Study
Flow Congestion
Early dropping (of aggressive flows) should start when there are
eight packets (congestive discard threshold) in the WFQ system.

The example illustrates how WFQ can drop packets even if the WFQ system is still within the
hold-queue limit. The system, however, is above the CDT limit. In this case, a packet can be
dropped if it is the last in the system.
2009 Cisco Systems, Inc. Congestion Management 5-49
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 17
WFQ Case Study
Flow Congestion (Cont.)
Early dropping (of aggressive flows) should start when there are eight
packets (congestive discard threshold) in the WFQ system.
CDT exceeded (CDT=8), new packet would be the last in the TDM
system and is dropped.

The new packet would be the last in the TDM system and is dropped.
5-50 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
WFQ Scheduling
This topic describes how finish time is calculated based on weight and how it is used in the
operation of WFQ.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 18
Weight in WFQ Scheduling
WFQ is IP precedence-aware; it can detect higher priority packets
marked with precedence values and provide them with superior
response time.
The WFQ scheduler implementation in Cisco routers uses the
following information to calculate the finish time:
Packet length
IP precedence number (translated to a "weight" value)
The weight value is inversely proportional to the IP precedence
value; packets with higher precedence numbers have lower
weights.
Packets with lower weights receive proportionately more
bandwidth and priority in the transmit order.
Packets belonging to RSVP flows and system packets have
special low weights that guarantee them more bandwidth.

WFQ is IP precedence-aware. It can detect higher-priority packets marked with precedence
values and can schedule them faster, providing superior response time for this traffic.
If IP precedence were not considered, packets would simply be scheduled into the hardware
queue (or the TxQ) in the ascending order of finish times. For example, if Packet A had a finish
time of 100 ms and Packet B had a finish time of 120 ms, packet A would be placed in the
hardware queue first. However, finish time can be adjusted based on IP precedence of the
packet.
When determining which packet to transmit next, the WFQ scheduler selects the packet with
the lowest finish time among all the queues. The WFQ scheduler uses the following
information to calculate the finish time:
Packet length
IP precedence number (translated to a "weight" value)
The size of a packet is proportional to the time it takes to transmit the packet. Therefore, the
WFQ implementation in Cisco routers uses packet size instead of the time needed to transmit a
packet for WFQ finish time calculations. The weight value is inversely proportional to the IP
precedence value; packets with higher precedence numbers have lower weights and thus
receive proportionately more bandwidth and priority in the transmit order. Packets belonging to
RSVP flows and system packets have special low weights that guarantee them more bandwidth.
Note WFQ prevents reordering of packets within a single flow (conversation). Small packets are
automatically preferred over large packets.
2009 Cisco Systems, Inc. Congestion Management 5-51
Benefits and Drawbacks of WFQ
This topic describes the benefits and drawbacks of using WFQ to implement QoS.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 19
Benefits and Drawbacks of WFQ
Benefits
Simple configuration (classification does not have to be configured)
Guarantees throughput to all flows
Drops packets of most aggressive flows
Supported on most platforms
Supported in all IOS versions
Drawbacks
Multiple flows can end up in one queue
Does not support the configuration of classification
Cannot provide fixed bandwidth guarantees
Complex classification and scheduling mechanisms

These are the main benefits of WFQ:
Simple configuration (no manual classification is necessary)
Guarantees throughput to all flows
Drops packets of the most aggressive flows
Supported on most platforms
Supported in all Cisco IOS Software versions
These are the main drawbacks of WFQ:
Not always possible to have one flow per queue
Does not allow manual classification
Cannot provide fixed guarantees
Complex classification and scheduling mechanisms
5-52 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring WFQ
This topic describes the Cisco IOS commands required to configure WFQ on a Cisco router.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 20
Configuring WFQ
congestive-discard-threshold
Number of messages allowed in the WFQ system before the router
starts dropping new packets for the longest queue.
The value can be in the range from1 to 4096 (default is 64)
dynamic-queues
Number of dynamic queues used for best-effort conversations
(values are: 16, 32, 64, 128, 256, 512, 1024, 2048, and 4096)
reservable-queues
Number of reservable queues used for reserved conversations in the
range 0 to 1000 (used for interfaces configured for features such as
RSVPthe default is 0)


WFQ is the default queueing mode on interfaces that run at E1 speeds (2.048 Mb/s) or below. It
is enabled by default for physical interfaces that do not use Link Access Procedure, Balanced
(LAPB), X.25, or Synchronous Data Link Control (SDLC) encapsulations. WFQ is not an
option for these protocols. WFQ is also enabled by default on interfaces configured for
Multilink PPP (MLP). However, if custom queueing (CQ) or priority queueing (PQ) is enabled
for a qualifying link, it overrides fair queueing, effectively disabling it. Additionally, WFQ is
automatically disabled if you enable autonomous or silicon switching.
The fair-queue command is used to enable WFQ on interfaces where it is not enabled by
default or was previously disabled.
The syntax for the fair-queue command is as follows:


2009 Cisco Systems, Inc. Congestion Management 5-53
Syntax Description
Parameter Description


(Optional) Number of messages allowed in the WFQ system. The
default is 64 messages, and a new threshold must be a power of
2 in the range from 16 to 4096. When a conversation reaches this
threshold, new message packets are discarded.
(Optional) Number of dynamic queues used for best-effort
conversations. Values are 16, 32, 64, 128, 256, 512, 1024, 2048,
and 4096.
(Optional) Number of reservable queues used for reserved
conversations in the range 0 to 1000. The default is 0.
Reservable queues are used for interfaces configured for
features such as RSVP.
The syntax for the fair-queue command is the same as the syntax for the fair-queue command
in Cisco IOS Software Release 12.4.
5-54 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 21
Additional WFQ Configuration
Parameters
Specifies the maximum number of packets that can be in all output
queues on the interface at any time.
The default value for WFQ is 1000.
Under special circumstances, WFQ can consume a lot of buffers,
which may require lowering this limit.


The same hold-queue command that can be used with FIFO queuing can also be used with
WFQ. The default hold-queue limit with WFQ is 1000 packets.
The WFQ system will generally never reach the hold-queue limit because the CDT limit starts
dropping packets of aggressive flows. Under special circumstances, it would be possible to fill
the WFQ system. For example, a denial-of-service attack that floods the interface with a large
number of packets (each different) could fill all queues at the same rate.
2009 Cisco Systems, Inc. Congestion Management 5-55
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 22
WFQ Configuration Defaults
Fair queuing is enabled by default:
On physical interfaces whose bandwidth is less than or equal
to 2.048 Mb/s
On interfaces configured for Multilink PPP
Fair queuing is disabled:
If you enable the autonomous or silicon switching engine
mechanisms
For any sequenced encapsulation: X.25, SDLC, LAPB,
reliable PPP

The figure explains the default behavior of WFQ. WFQ is automatically enabled on all
interfaces slower than 2 Mb/s. WFQ is also required on interfaces using Multilink PPP (MLP).
WFQ cannot be used if the switching path does not support WFQ, or if reordering of frames is
not allowed because of sequence numbering of Layer 2 frames. WFQ is disabled for any
sequenced encapsulation, such as X.25, Synchronous Data Link Control (SDLC), Link Access
Procedure, Balanced (LAPB), and reliable PPP.
5-56 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Monitoring WFQ
This topic describes the Cisco IOS commands required to monitor WFQ on a Cisco router.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 23
Monitoring WFQ

Displays interface delays including the activated queuing mechanism


with the summary information

















Use the same show commands as with other queuing mechanisms:
show interface
show queue
show queueing
Use the show interface command to determine the queuing strategy. The summary statistics
are also displayed.
The sample output in the figure shows that there are currently no packets in the WFQ system.
The system allows up to 1000 packets (hold-queue limit) with CDT 64. WFQ is using 256
queues. The maximum number of concurrent conversations (active queues) is four.
2009 Cisco Systems, Inc. Congestion Management 5-57
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 24
Monitoring WFQ (Cont.)

Displays detailed information about the WFQ system of the selected interface















The show queue command is used to display the contents of packets inside a queue for a
particular interface, including flow (conversation) statistics, as follows:
Queue depth is the number of packets in the queue.
Weight is 4096 / (IP Precedence + 1), or 32,384 / (IP Precedence + 1), depending on the
Cisco IOS Software version.
In the command output, discards are used to represent the number of drops due to the CDT
limit.
In the command output, tail drops are used to represent the number of drops due to the
hold-queue limit.
The syntax for the show queue command in Cisco IOS Software Release 12.4 is as follows:


5-58 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
The name of the interface.
The number of the interface.
(Optional) The number of the queue. The queue number is a
number from 1 to 16.
(Optional) For ATM interfaces only, shows the fair queueing
configuration for a specified permanent virtual circuit (PVC). The
name can be up to 16 characters long.
(Optional) ATM network virtual path identifier (VPI) for this PVC.
The absence of the "/" and a vpi value defaults the vpi value to 0.
On the Cisco 7200 and Cisco 7500 Series routers, this value
ranges from 0 to 255.
The vpi and vci arguments cannot both be set to 0; if one is 0, the
other cannot be 0.
If this value is omitted, information for all VCs on the specified
ATM interface or subinterface is displayed.
(Optional) ATM network virtual channel identifier (VCI) for this
PVC. This value ranges from 0 to 1 less than the maximum value
set for this interface by the atm vc-per-vp command. Typically,
lower values 0 to 31 are reserved for specific traffic [F4
Operation, Administration, and Maintenance (OAM), switched
virtual circuit (SVC) signaling, Integrated Local Management
Interface (ILMI), and so on] and should not be used.
The VCI is a 16-bit field in the header of the ATM cell. The VCI
value is unique only on a single link, not throughout the ATM
network, because it has local significance only.
The vpi and vci arguments cannot both be set to 0; if one is 0, the
other cannot be 0.

2009 Cisco Systems, Inc. Congestion Management 5-59
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 25
Summary
The software FIFO queue is basically an extension of the
hardware FIFO queue.
WFQ was developed to overcome the limitations of the more
basic queuing methods. Traffic is sorted into flows and transmitted
by the order of the last bit crossing its channel.
WFQ classification uses parameters such as source and
destination IP addresses, source and destination TCP or UDP
ports, transport protocol, and ToS field.
With WFQ, the CDT is used to start dropping packets of the most
aggressive flow, even before the hold-queue limit is reached, and
the hold-queue out limit defines the total maximum number of
packets that can be in the WFQ system at any time.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 26
Summary (Cont.)
When determining which packet to transmit next, the WFQ scheduler
selects the packet with the lowest finish time; the WFQ implementation in
Cisco routers uses the following information to calculate the finish time:
Packet length
IP precedence number (translated to a "weight" value)
WFQ benefits: Simple configuration, drops packets of the most
aggressive flows. WFQ drawbacks: Not always possible to have one flow
per queue, does not allow manual classification, and cannot provide fixed
guarantees.
WFQ is automatically enabled on all interfaces that have a default
bandwidth of less than 2 Mb/s. The fair-queue command is used to
enable WFQ on interfaces where it is not enabled by default or was
previously disabled.
The same show commands can be used as with other queuing
mechanisms: show interface, show queue, and show queuing.

5-60 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 4
Configuring CBWFQ and LLQ
Overview
Class-based weighted fair queuing (CBWFQ) extends the standard weighted fair queuing
(WFQ) functionality to provide support for user-defined traffic classes. With CBWFQ, you
define traffic classes based on match criteria including Network-Based Application
Recognition (NBAR), access control lists (ACLs), and input interfaces. Packets satisfying the
match criteria for a class constitute the traffic for that class. A queue is reserved for each class,
and traffic belonging to a class is directed to the queue for that class. Low-latency queuing
(LLQ) brings strict priority queuing to CBWFQ. Strict priority queuing allows delay-sensitive
data such as voice to be dequeued and sent first (before packets in other queues are dequeued),
giving delay-sensitive data preferential treatment over other traffic. This lesson describes how
to configure CBWFQ and LLQ.
Objectives
Upon completing this lesson, you will be able to configure CBWFQ and LLQ to manage
congestion. This ability includes being able to meet these objectives:
Explain how basic queuing mechanisms can be used to build advanced queuing
mechanisms
Explain the purpose and features of CBWFQ
Describe CBWFQ features and explain how CBWFQ works using a block diagram
Describe the benefits of CBWFQ
Identify the Cisco IOS commands required to configure and monitor CBWFQ on a Cisco
router
Explain the purpose and features of LLQ
Explain how LLQ works using a block diagram and identify situations in which LLQ is
most appropriate for providing QoS
Describe the benefits of LLQ
Identify the Cisco IOS commands required to configure and monitor LLQ on a Cisco router
5-62 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
CBWFQ and LLQ
This topic describes how you can use basic queuing mechanisms to build more advanced
queuing mechanisms.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-2
CBWFQ and LLQ
Basic methods are combined to create more versatile
queuing mechanisms.

Neither the basic queuing methods nor the more advanced WFQ completely solve quality of
service (QoS) problems resulting from converged network traffic. These problems remain:
If only priority queuing (PQ) is used for a voice-enabled network, voice will get the priority
needed, but data traffic will likely starve out at some point.
If only custom queuing (CQ) is used for a voice-enabled network, data traffic will be
assured of some bandwidth, but voice traffic will suffer excessive delays.
If WFQ is used, voice still experiences delay, even when treated fairly by WFQ and no
bandwidth guarantees can be made for data applications.
All of the classification, marking, and queuing mechanisms are complicated to use and
time-consuming when applied on an interface-by-interface basis.
Newer queuing mechanisms take the best aspects of existing queuing methods and apply them
to give voice the priority it requires while still ensuring that data is serviced efficiently on a
class basis.
2009 Cisco Systems, Inc. Congestion Management 5-63
Class-Based Weighted Fair Queuing
This topic describes the purpose and features of class-based weighted fair queuing (CBWFQ).
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-3
Class-Based Weighted Fair Queuing
CBWFQis a mechanism that is used to guarantee bandwidth to
classes.
CBWFQ extends the standard WFQ functionality to provide
support for user-defined traffic classes.
Classes are based on user-defined match criteria.
Packets satisfying the match criteria for a class constitute the
traffic for that class.
A queue is reserved for each class, and traffic belonging to a
class is directed to that class queue.

CBWFQ extends the standard WFQ functionality to provide support for user-defined traffic
classes. With CBWFQ, you define the traffic classes based on match criteria, including
protocols, ACLs, and input interfaces. Packets satisfying the match criteria for a class constitute
the traffic for that class. A queue is reserved for each class, and traffic belonging to a class is
directed to that class queue.
After a class has been defined according to its match criteria, you can assign characteristics to
it. To characterize a class, you assign it bandwidth, weight, and maximum packet limit. The
bandwidth assigned to a class is the minimum bandwidth delivered to the class during
congestion.
To characterize a class, you also specify the queue limit for that class, which is the maximum
number of packets allowed to accumulate in the class queue. Packets belonging to a class are
subject to the bandwidth and queue limits that characterize the class. After a queue has reached
its configured queue limit, enqueuing of additional packets to the class causes tail drop or
random packet drop to take effect, depending on how the class policy is configured.
5-64 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
CBWFQ Architecture
This topic describes the features of CBWFQ and how CBWFQ works.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-4
CBWFQ Architecture
Supports multiple classes (depending on platform)

CBWFQ supports multiple class maps (the number depends upon the platform) to classify
traffic into its corresponding FIFO queues. Tail drop is the default dropping scheme of
CBWFQ. You can use weighted random early detection (WRED) in combination with CBWFQ
to prevent congestion of a class.
The CBWFQ scheduler is used to guarantee bandwidth that is based on the configured weights.
Note Currently, except for the Cisco 7500 Series router platform, all traffic classes (default traffic
class excluded) only support FIFO queuing within the class. On all platforms, the default
traffic class can support either FIFO or WFQ within the class. Check Cisco.com for the latest
information on WFQ support within each traffic class.
2009 Cisco Systems, Inc. Congestion Management 5-65
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-5
CBWFQ Architecture:
Classification
Classification uses class maps.
Availability of certain classification options depends on the Cisco
IOS Software version.
Some classification options depend on the type of interface and
encapsulation where the service policy is used.
For example:
Matching on Frame Relay discard eligible bits can be used
only on interfaces with Frame Relay encapsulation.
Matching on MPLS experimental bits has no effect if MPLS is
not enabled.
Matching on ISL priority bits has no effect if ISL is not used.

You can use any classification option depending on its availability in the Cisco IOS Software
version and the support on the selected interface and encapsulation. These examples illustrate
some of the limitations regarding classification options:
Matching on Frame Relay discard eligible bits can only be used on interfaces with Frame
Relay encapsulation.
Matching on Multiprotocol Label Switching (MPLS) Experimental bits has no effect if
MPLS is not enabled.
Matching on Inter-Switch Link (ISL) priority bits has no effect if ISL is not used.
It is important to note that CBWFQ is configured using Modular QoS command-line interface
(CLI), or MQC.
5-66 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-6
CBWFQ Architecture:
Insertion Policy
Each queue has a maximum number of packets that it can hold
(queue size).
The maximum queue size is platform dependent.
After a packet is classified to one of the queues, the router will
enqueue the packet if the queue limit has not been reached
(tail drop within each class).
WRED can be used in combination with CBWFQ to prevent
congestion of the class.

CBWFQ reserves multiple FIFO queues in the WFQ system. The default queue limit is 64 (tail
drop) and can be configured with WRED (weighted random drop).
2009 Cisco Systems, Inc. Congestion Management 5-67
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-7
CBWFQ Architecture:
Scheduling
CBWFQ guarantees bandwidth according to weights assigned to
traffic classes.
Weights can be defined by specifying:
Bandwidth (in kb/s)
Percentage of bandwidth (percentage of available interface
bandwidth)
Percentage of remaining available bandwidth
One service policy can not have mixed types of weights.
The show interface command can be used to display the available
bandwidth.

You can configure bandwidth guarantees by using one of these commands:
The bandwidth command allocates a fixed amount of bandwidth by specifying the amount
in kb/s. The reserved bandwidth is subtracted from the available bandwidth of the interface
where the service policy is used. The allocated bandwidth must also be within the
configured reservable limit (75 percent by default).
You can use the bandwidth percent command to allocate a percentage of the default or
available bandwidth of an interface. The default bandwidth usually equals the maximum
speed of an interface. Sometimes it actually reflects the real speed of an interface (for
example, Ethernet or Fast Ethernet). The default value can be replaced by using the
bandwidth interface command. It is recommended that the bandwidth reflect the real speed
of the link. The allocated bandwidth is subtracted from the available bandwidth of the
interface in which the service policy is used.
You can use the bandwidth remaining percent command to allocate a portion of the
unallocated bandwidth. The bandwidth is not subtracted from the available bandwidth of
the interface where the service policy is used.
A single service policy cannot mix the fixed bandwidth (in kb/s) and bandwidth percent
commands (except with strict priority queues).
5-68 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-8
CBWFQ Architecture:
Available Bandwidth
Available bandwidth is calculated according to the following
formula:

The available bandwidth displayed by the show interface command is calculated by
subtracting all fixed bandwidth reservations from 75 percent of the configured bandwidth of an
interface.
2009 Cisco Systems, Inc. Congestion Management 5-69
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-9
CBWFQ Architecture:
75 Percent Rule
Add the following:
Class bandwidths
RSVP maximum reserved bandwidth
The result must be less than or equal to 75% of interface bandwidth (or Frame
Relay, DLCI, CIR).
This leaves headroom for overhead traffic such as Layer 2 keepalives and
bandwidth for the class default traffic.
The 75% rule is conservative.
The max-reserved-bandwidth command overrides the 75% limit but is seldom
recommended.

Properly provisioning the network bandwidth is a major component of successful network
design. You can calculate the required bandwidth by adding the bandwidth requirements for
each major application (for example, voice, video, and data). The resulting sum represents the
minimum bandwidth requirement for any given link, and it should not exceed 75 percent of the
total available bandwidth for the link (or Frame Relay or ATM PVC committed information
Rate [CIR]). This 75-percent rule assumes that some bandwidth is required for overhead traffic,
such as layer 2 keepalive messages, as well as for the class default traffic.
The total amount of bandwidth allocated for all classes included in a policy map should not
exceed 75 percent of the available bandwidth on the interface. The max-reserved bandwidth
command overrides the 75 percent limitation, but overriding is recommended only for the most
knowledgeable network administrators who have access to precise figures for available, used,
and required bandwidth, including control plane traffic bandwidth requirements. If all of the
bandwidth is not allocated, the remaining bandwidth is proportionally allocated among the
classes based on the configured bandwidth of the classes.
5-70 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
CBWFQ Benefits
This topic describes the benefits of CBWFQ.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 10
CBWFQ Benefits
Benefits
Minimum bandwidth allocation
Finer granularity and scalability
MQC interface easy to use
Maximizes transport of priority traffic
Weights guarantee minimum bandwidth
Unused capacity shared among the other classes
Queues separately configured for QoS
Drawbacks
Voice traffic can still suffer unacceptable delay

CBWFQ allows you to define traffic classes based on custom-defined match criteria such as
ACLs, input interfaces, protocol, and QoS label. For example, a class might consist of a team
working on a certain project, or a class can be created for the important mission-critical
applications such as enterprise resource planning (ERP) applications. When the traffic classes
have been defined, they can be assigned a bandwidth, queue limit, or drop policy such as
WRED. These are additional benefits of CBWFQ:
Bandwidth allocation: CBWFQ allows you to specify the exact amount of bandwidth to
be allocated for a specific class of traffic. Accounting for available bandwidth on the
interface, you can configure multiple classes (the number depends upon the platform).
Finer granularity and scalability: CBWFQ allows you total flexibility to define a class,
based on ACLs and protocols or input interfaces, thereby providing finer granularity.
Supported by MQC: CBWFQ is supported by the easy-to-use MQC.
The CBWFQ feature is supported on all platforms that WFQ is supported on; in other words,
the Cisco 7200, 3800, 1800, and 800 Series routers, and others.
2009 Cisco Systems, Inc. Congestion Management 5-71
Configuring and Monitoring CBWFQ
This topic describes the Cisco IOS commands that are used to configure and monitor CBWFQ
on a Cisco router.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 11
Configuring CBWFQ

The bandwidth command allocates a fixed amount of bandwidth to


a class.
Use of the percent keyword enables you to allocate a percentage of
bandwidth to a class; the configured (or default) interface bandwidth
is used to calculate the guaranteed bandwidth.
Use of the remaining percent keywords enables you to allocate a
percentage of available bandwidth to a class.

The queue-limit command sets the maximum number of packets the


queue can hold; the default maximum is 64.

The bandwidth policy-map class configuration command is used to specify or modify the
bandwidth allocated for a class belonging to a policy map.
All classes belonging to one policy map should use the same type of fixed bandwidth
guarantee, in kb/s, percentage of interface bandwidth, or percentage of available bandwidth.
Configuring bandwidth in percentages is most useful when the underlying link bandwidth is
unknown or the relative class bandwidth distributions are known.
The syntax for the bandwidth command is as follows:


Syntax Description
Parameter Description
Amount of bandwidth, in kb/s, to be assigned to the class.


Amount of guaranteed bandwidth, based on a relative percent of
available bandwidth. The percentage can be a number from 1 to
100.
Amount of guaranteed bandwidth, based on an absolute percent
of available bandwidth. The percentage can be a number from 1
to 100. (By default, only 75 percent can be reserved.)
5-72 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Note The syntax shown here for the bandwidth command is the same as the syntax for the
bandwidth command in Cisco IOS Software Release 12.4.
These restrictions apply to the bandwidth command:
If the percent keyword is used, the sum of the class bandwidth percentages cannot exceed
100 percent.
The amount of bandwidth configured should be large enough to also accommodate Layer 2
overhead.
A policy map can have all the class bandwidths specified in kb/s or in percentages, but not
a mix of both. However, the unit for the priority command in the priority class can be
different from the bandwidth unit of the low-priority class.CBWFQ is not supported on
sub-interfaces. If a service policy is applied to a sub-interface in which the service policy
directly references a policy map that has a bandwidth statement in it, this error message
will be displayed:


You can change the default queue limit of 64 packets by using the queue-limit command. It is
recommended that you not change the default value.
The syntax for the queue-limit command in Cisco IOS Software Release 12.4 is as follows:

Syntax Description
Parameter Description
queue-limit-size The maximum size of the queue. The maximum varies
according to the optional unit of measure keyword specified
(bytes, ms, or packets). If an optional unit of measure is not
indicated, the default unit of measure is packets.
bytes (Optional) Indicates that the unit of measure is bytes. Valid range
for bytes is a number from 1 to 8192000. The bytes keyword is
not supported on Cisco 7600 and ASR 1000 series routers.
ms (Optional) Indicates that the unit of measure is milliseconds. Valid
range for milliseconds is a number from 1 to 3400. The ms
keyword is not supported on Cisco 7600 and ASR 1000 series
routers.
packets (Optional) Indicates that the unit of measure is packets. Valid
range for packets is a number from 1 to 32768 but can also vary
by platform and release.

2009 Cisco Systems, Inc. Congestion Management 5-73
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 12
Configuring CBWFQ (Cont.)



















The sample configuration shows how CBWFQ is used to guarantee bandwidth to each of the
two classes.
5-74 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 13
Configuring the Class-Default Class
Policy
FIFO queuing is configured within the default class.
The default class is guaranteed 1 Mb/s of bandwidth and the maximum
queue size is limited to 40 packets.




Sixteen dynamic queues are reserved for use by flow-based WFQ running on
the default class.
Because the queue-limit command is configured, tail drop is used for each
dynamic queue when the maximum number of packets are enqueued and
additional packets arrive.





The class-default class is used to classify traffic that does not fall into one of the defined
classes. Once a packet is classified, all of the standard mechanisms that can be used to
differentiate service among the classes apply. The class-default class is predefined when you
create a policy map, but you must configure it. If no default class is configured, then by default,
the traffic that does not match any of the configured classes is flow classified and given best-
effort treatment.
By default, the class-default class is defined as flow-based WFQ. However, configuring the
default class with the bandwidth policy-map class configuration command disqualifies the
default class as flow-based WFQ.
To configure a policy map and configure the class-default class to use tail drop, use the policy-
map command in global configuration mode to specify the policy map name; then configure
policy for the default class by using the bandwidth command (or the fair-queue command for
class-default) and the queue-limit command in policy-map class configuration mode.
If you want the class-default class to use WRED packet drop instead of tail drop, you can also
use the bandwidth command (or the fair-queue command for class-default) with the
random-detect and random-detect exponential-weighting-constant (or random-detect
precedence) commands in policy-map class configuration mode to configure the policy for the
default class.
The fair-queue command can be used to specify the number of dynamic queues to be reserved
for use by flow-based WFQ running on the default class. The number of dynamic queues is
derived from the bandwidth of the interface. Refer to the tables accompanying the description
of the fair-queue (WFQ) command in the Cisco IOS Quality of Service Solutions Command
Reference for the default number of dynamic queues that WFQ and CBWFQ use when they are
enabled on an interface or ATM VC.
2009 Cisco Systems, Inc. Congestion Management 5-75
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 14
Monitoring CBWFQ

Displays parameters and statistics of CBWFQ

















The show policy-map interface command displays all service policies applied to the interface.
The output displays the policing parameters and statistics.
The syntax shown in the figure for the show policy-map interface command is compatible
with the syntax for the show policy-map interface command in Cisco IOS Software
Release 12.4.
5-76 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Low-Latency Queuing
This topic describes the purpose and features of low-latency queuing (LLQ).
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 15
Low-Latency Queuing
Priority queue added to CBWFQ for real-time traffic.
High-priority classes are guaranteed:
Low-latency propagation of packets
Bandwidth
High-priority classes are also policed when congestion occurs;
then they cannot exceed their guaranteed bandwidth.
Lower-priority classes use CBWFQ.

While WFQ provides a fair share of bandwidth to every flow, and provides fair scheduling of
its queues, it cannot provide guaranteed bandwidth and low delay to select applications. For
example, voice traffic may still compete with other aggressive flows in the WFQ queuing
system because the WFQ system lacks priority scheduling for time-critical traffic classes.
The LLQ feature brings strict priority queuing to CBWFQ. Strict priority queuing allows delay-
sensitive data such as voice to be dequeued and sent first (before packets in other queues are
dequeued), giving delay-sensitive data preferential treatment over other traffic.
Without LLQ, CBWFQ provides weighted fair queuing based on defined classes with no strict
priority queue available for real-time traffic. CBWFQ allows you to define traffic classes and
then assign characteristics to that class. For example, you can designate the minimum
bandwidth delivered to the class during congestion.
For CBWFQ, the weight for a packet belonging to a specific class is derived from the
bandwidth that you assigned to the class when you configured it. Therefore, the bandwidth
assigned to the packets of a class determines the order in which packets are sent. All packets
are serviced fairly based on weight; no class of packets may be granted strict priority. This
scheme poses problems for voice traffic, which is largely intolerant of delay, especially
variation in delay. For voice traffic, variations in delay introduce irregularities of transmission
that are heard as jitter in the conversation.
2009 Cisco Systems, Inc. Congestion Management 5-77
The LLQ feature provides strict priority queuing for CBWFQ, reducing jitter in voice
conversations. Configured by the priority command, LLQ enables use of a single, strict
priority queue within CBWFQ at the class level, allowing you to direct traffic belonging to a
class to the CBWFQ strict priority queue. To enqueue class traffic to the strict priority queue,
you configure the priority command for the class after you specify the named class within a
policy map. Classes to which the priority command is applied are considered priority classes.
Within a policy map, you can give one or more classes priority status. When multiple classes
within a single policy map are configured as priority classes, all traffic from these classes is
enqueued to the same, single, strict priority queue.
5-78 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
LLQ Architecture
This topic describes how LLQ works and identifies situations in which LLQ is most
appropriate for providing QoS.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 16
LLQ Architecture

When CBWFQ is configured as the queuing system, it creates a number of queues, into which
it classifies traffic classes. These queues are then scheduled with a WFQ-like scheduler, which
can guarantee bandwidth to each class.
If LLQ is used within the CBWFQ system, it creates an additional priority queue in the WFQ
system, which is serviced by a strict priority scheduler. Any class of traffic can therefore be
attached to a service policy, which uses priority scheduling, and hence can be prioritized over
other classes.
2009 Cisco Systems, Inc. Congestion Management 5-79
LLQ Benefits
This topic describes the benefits of LLQ.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 17
LLQ Benefits
High-priority classes are guaranteed:
Low-latency propagation of packets
Bandwidth
Consistent configuration and operation across all media types.
Entrance criteria to a class can be defined by an ACL:
Not limited to UDP ports as with IP RTP priority
Defines trust boundary to ensure simple classification and
entry to a queue

The LLQ priority scheduler guarantees both low-latency propagation of packets and bandwidth
to high-priority classes. Low latency is achieved by expediting traffic using a priority
scheduler. Bandwidth is also guaranteed by the nature of priority scheduling, but is policed to a
user-configurable value. The strict PQ scheme allows delay-sensitive data such as voice to be
dequeued and sent firstthat is, before packets in other queues are dequeued. Delay-sensitive
data is given preferential treatment over other traffic.
The LLQ feature provides strict PQ on ATM virtual circuits (VCs); the IP Real-Time Transport
Protocol (RTP) priority feature only allows PQ on interfaces. Because you can configure the
priority status for a class within CBWFQ, you are not limited to User Datagram Protocol
(UDP) port numbers to stipulate priority flows (which were necessary with IP RTP). Instead,
all of the valid match criteria used to specify traffic for a class now applies to priority traffic.
Policing of priority queues also prevents the priority scheduler from monopolizing the CBWFQ
scheduler and starving nonpriority classes, as legacy PQ does. By configuring the maximum
amount of bandwidth allocated for packets belonging to a class, you can avoid starving
nonpriority traffic.
5-80 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 18
LLQ and Cisco TelePresence
Queuing must be enabled on every node along the path.
It is recommended to place Cisco TelePresence in a strict-priority queue.
Service level requirements for TelePresence are as follows:
Latency: 150 ms
Jitter: 10 ms
Packet loss: 0.05%
CE = Customer edge
PE = Provider edge
Service
Provider
Campus
Branch
Queuing
Campus
Queui ng,
Shaping
CE-PE PE-PE
Policing, Queuing
Branch
Queuing
CE CE PE PE

To achieve the high levels of service required by the Cisco TelePresence experience, queuing
must be enabled on every node along the path to provide service guarantees, regardless of how
infrequently congestion may occur on certain nodes. (Congestion can and does occur even on
very high-bandwidth mediums). If queuing is not properly configured on every node, the Cisco
TelePresence experience cannot be guaranteed.
RFC 4594 specifies the minimum queuing requirement of the Real-Time Interactive service
class to be a rate-based queue (a queue that has a guaranteed minimum bandwidth rate).
However, RFC 4594 makes an allowance that while the PHB for the Real-Time Interactive
service class should be configured to provide high bandwidth assurance, it may be configured
as a second EF PHB that uses relaxed performance parameters, a rate scheduler, and a CS4
DSCP value.
This means that Cisco TelePresence, which has been assigned to this Real-Time Interactive
service class, can be queued with either a guaranteed rate nonpriority queue such as CBWFQ or
a guaranteed-rate strict priority queue such as LLQ; in either case, Cisco TelePresence is to be
marked as Class Selector 4 (and not EF).
Therefore, since RFC 4594 allows for the real-time interactive service-class to be given a
second EF PHB and because of the low latency, low jitter, and low loss requirements of Cisco
TelePresence, it is recommended to place Cisco TelePresence in a strict-priority queue, such as
an LLQ queue or a Cisco Catalyst hardware priority queue, whenever possible.
An additional provisioning consideration must be taken into account when provisioning Cisco
TelePresence with a second EF PHB, which relates to the amount of bandwidth of a given link
that should be assigned for strict priority queuing. The well-established and widely deployed
Cisco best-practice recommendation is to limit the amount of strict priority queuing configured
on an interface to no more than one-third of the capacity of the link. This is commonly referred
to as the 33 percent LLQ rule.
2009 Cisco Systems, Inc. Congestion Management 5-81
The rationale behind this rule is that if you assign too much traffic for strict priority queuing,
the overall effect is a dampening of QoS functionality for non-real-time applications. The goal
of convergence is to enable voice, video, and data to transparently co-exist on a single network.
When real-time applications such as voice and Cisco TelePresence dominate a link, data
applications fluctuate significantly in their response times if Cisco TelePresence calls are
present versus when they are absent, thus destroying the transparency of the converged
network.
Note Cisco IOS Software allows the configuration of multiple strict-priority LLQ queues. In such a
multiple-LLQ context, this design principle means that the sum of all LLQ queues should be
within one-third of link capacity.
The 33-percent LLQ rule is a conservative and safe design ratio for merging real-time
applications with data applications. This strict priority queuing rule is simply a best-practice
design recommendation and is not a mandate. There may be cases where specific business
objectives cannot be met while holding to this recommendation. In such cases, enterprises must
provision according to their detailed requirements and constraints. However, it is important to
recognize the tradeoffs involved with over-provisioning strict priority traffic and its negative
performance impact on non-real-time-application response times.
It is also worth noting that the 33 percent rule applies only for converged networks. If you
choose to deploy dedicated WAN circuits for Cisco TelePresence traffic, the 33 percent rule
does not apply. This is because Cisco TelePresence (and perhaps some nominal amount of
management and signaling traffic) is the only traffic on the circuit. In these cases, you can use
up to 98 percent of the link capacity for Cisco TelePresence and reserve 2 percent for routing
protocols, network management traffic such as SSH and SNMP, and signaling.
Note For more information on QoS and Cisco TelePresence, refer to the Cisco TelePresence
Network Systems 2.0 Design Guide on Cisco.com.
5-82 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring and Monitoring LLQ
This topic describes the Cisco IOS commands that are used to configure and monitor LLQ on a
Cisco router.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 19
Configuring LLQ

Allocates a fixed amount of bandwidth (in kb/s) to a class and


ensures expedited forwarding.
Traffic exceeding the specified bandwidth is dropped if congestion
exists; otherwise, policing is not used.

Allocates a percentage of configured or default interface bandwidth to


a class and ensures expedited forwarding.
Traffic exceeding the specified bandwidth is dropped if congestion
exists; otherwise, policy is not used.

When you specify the priority command for a class, it takes a bandwidth argument that gives
maximum bandwidth in kb/s. You use this parameter to specify the maximum amount of
bandwidth allocated for packets belonging to the class configured with the priority command.
The bandwidth parameter both guarantees bandwidth to the priority class and restrains the flow
of packets from the priority class. The syntax for the priority command is as follows:

Parameter Description
Guaranteed allowed bandwidth, in kb/s, for the priority traffic. The
amount of guaranteed bandwidth varies according to the interface
and platform in use. Beyond the guaranteed bandwidth, the
priority traffic will be dropped in the event of congestion to ensure
that the nonpriority traffic is not starved.
Specifies that the amount of guaranteed bandwidth will be
specified by the percent of available bandwidth.
Used in conjunction with the percent keyword; specifies the
percentage of the total available bandwidth to be set aside for the
priority class. The percentage can be a number from 1 to 100.
(By default, only 75 percent can be reserved.)
(Optional) Specifies the burst size, in bytes. The range of the
burst is 32 to 2,000,000 bytes. The burst size allows temporary
bursting of traffic above the maximum limit after a period of
inactivity. The default burst value is computed as 200 ms of traffic
at the configured bandwidth rate.
2009 Cisco Systems, Inc. Congestion Management 5-83
Note The syntax shown here for the priority command is the same as the syntax for the priority
command in Cisco IOS Software Release 12.4.
In the event of congestion, if the priority class traffic exceeds the bandwidth guarantee, a
congestion-aware policer is used to drop the exceeding packets. Voice traffic enqueued to the
priority queue is UDP-based and therefore not adaptive to the early packet-drop characteristic
of WRED. Because WRED is ineffective, you cannot use the WRED random-detect command
with the priority command. In addition, because policing is used to drop packets and a queue
limit is not imposed, the queue-limit command cannot be used with the priority command.
When congestion occurs, traffic destined for the priority queue is metered to ensure that the
bandwidth allocation configured for the class to which the traffic belongs is not exceeded.
Priority traffic metering has these qualities:
It is much like committed access rate (CAR), except that priority traffic metering is
performed only under conditions of congestion. When the device is not congested, the
priority-class traffic is allowed to exceed its allocated bandwidth. When the device is
congested, the priority-class traffic above the allocated bandwidth is discarded.
Metering performed on a per-packet basis, and tokens, are replenished as packets are sent.
If not enough tokens are available to send the packet, the packet is dropped.
It restrains priority traffic to its allocated bandwidth to ensure that nonpriority traffic, such
as routing packets and other data, is not starved.
With metering, the classes are policed and rate-limited individually. That is, although a single
policy map might contain four priority classes, all of which are enqueued in a single priority
queue, they are each treated as separate flows with separate bandwidth allocations and
constraints.
Note It is important to note that because bandwidth for the priority class is specified as a
parameter to the priority command, you cannot also configure the bandwidth command for
a priority class. To do so is a configuration violation that would only introduce confusion in
relation to the amount of bandwidth to allocate.
Keep these guidelines in mind when using the priority command:
You account for Layer 2 encapsulations in the amount of bandwidth that you specify with
the priority command. However, ensure that you configure a bandwidth with room for the
cell-tax overhead.
Use the priority command for VoIP on serial links and ATM permanent virtual circuits
(PVCs).
5-84 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Calculating LLQ Bandwidth Required for VoIP
The bandwidth consumed by VoIP streams is calculated by adding the packet payload and all
the headers, then multiplying that total number by the per-second packet rate.
The example shows how to calculate the VoIP bearer bandwidth requirement for a single VoIP
call using a G.711 codec:



















2009 Cisco Systems, Inc. Congestion Management 5-85
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 20
Configuring LLQ (Cont.)


The figure shows a configuration example in which the VoIP traffic class, classified by the IP
Precedence of 5, is queued in a LLQ within the CBWFQ system. The VoIP class receives
guaranteed priority scheduling over the other classes but is limited to 10 percent of the
bandwidth.
5-86 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 21
Monitoring LLQ

Displays the packet statistics of all classes that are configured for all service policies
either on the specified interface or subinterface.

















The show policy-map interface command displays the packet statistics of all classes that are
configured for all service policies on the specified interface. Some of the key fields in the
command output are described as follows:
Parameter Description
Class of traffic being displayed. Output is displayed for each
configured class in the policy.
Rate, in kb/s, of packets coming in to the class.
Rate, in kb/s, at which packets are dropped from the class. The
drop rate is calculated by subtracting the number of successfully
transmitted packets from the offered rate.
Match criteria specified for the class of traffic.


Number of packets (also shown in bytes) matching this class that
were placed in the queue.


Number of packets discarded for this class. No-buffer indicates
that no memory buffer exists to service the packet.
Note Syntax for commands documented in this lesson may vary by platform and software version.
For more information on command syntax for your Cisco IOS Software release and router
platform, please refer to the Cisco IOS Master Command List, Release 12.4, on Cisco.com.
2009 Cisco Systems, Inc. Congestion Management 5-87
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 22
Summary
By combining basic queuing mechanisms, you can build an
advanced queuing mechanism.
CBWFQ is a mechanism that is used to overcome deficiencies
of WFQ.
CBWFQ extends the standard WFQ functionality to provide
support for traffic classes. Classes are based on user-defined
match criteria.
CBWFQ provides a minimum bandwidth guarantee according to
traffic classes.
CBWFQ uses the policy-map configuration commands to
configure such parameters as bandwidth and queue limit within
the associated class; the show policy-map interface command
is used to display the CBWFQ and LLQ statistics.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 23
Summary (Cont.)
LLQ extends the functionality of CBWFQ by adding a priority
queue for time-sensitive traffic such as voice and video; the LLQ
scheduler guarantees both low latency and bandwidth for the
traffic in the priority queue.
LLQ is implemented within CBWFQ by the addition of a priority
queue that is serviced using a strict priority scheduler. In the event
of congestion, if the priority queue traffic exceeds the bandwidth
guarantee, a congestion-aware policer is used to drop the
exceeding traffic.
LLQ allows delay-sensitive data such as voice to be given
preferential treatment over other traffic.
LLQ is configured using the priority command in policy-map class
configuration mode.

5-88 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 5
Configuring LAN Congestion
Management
Overview
In a converged network, it is imperative that you implement quality of service (QoS). You need
to be aware of how queuing is implemented across the Cisco Catalyst switching family,
because different switches offer varied mechanisms for providing QoS. This lesson describes
how several key Catalyst switches provide queuing support for QoS and how to configure those
switches for QoS. The lesson also describes priority queuing (PQ), weighted round robin
(WRR), shaped round robin (SRR), and weighted tail drop (WTD).
Objectives
Upon completing this lesson, you will be able to configure WRR on a Catalyst switch to
manage LAN congestion. This ability includes being able to meet these objectives:
Describe the different queuing capabilities available on Cisco Catalyst switches
Explain how WRR works on the Catalyst 2950 switch
Describe the commands required to configure CoS to queue mappings for PQ on Catalyst
2950 switches
Describe the commands required to configure WRR on Catalyst 2950 switches
Explain how WTD works on the Catalyst 2960 switch
Describe the commands required to configure WTD on Catalyst 2960 switches
Explain how SRR works on the Catalyst 2960 switch
Describe the commands required to configure SRR on Catalyst 2960 switches
Describe the commands required to monitor queuing on Catalyst 2950 and 2960 switches
5-90 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Queuing on Catalyst Switches
This topic describes the different queuing capabilities available on Cisco Catalyst switches.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-2
Queuing on Catalyst Switches
Multiple queues protect the queue
containing important traffic (voice)
from drops.
The number of queues available
depends upon the switch model and
port type.
On some switches, drop thresholds
can be assigned to each queue.
On some switches, queues can use
normal tail drop, WTD, or WRED
dropping.
Drops happen in data-only queue(s).

In a converged network, it is vital to ensure that voice traffic is not dropped. The use of
multiple queues in Catalyst switches protects the queue containing important traffic (voice)
from being dropped. Cisco Catalyst switches offer a variety of queuing capabilities, depending
upon the switch model and port type.
One of the key options that you can assign to queues in most Catalyst switches is drop
thresholds. You can assign one or more drop thresholds to a queue. Packets are queued until
the thresholds are exceeded.
For example, all packets with differentiated services code points (DSCPs) that are assigned to
the first threshold are dropped until the threshold is no longer exceeded. However, packets
assigned to a second threshold continue to be queued and sent as long as the second threshold is
not exceeded. The thresholds are all specified as percentages ranging from 1 to 100. A value of
10 indicates a threshold in which the buffer is 10 percent full.
On some switches, queues can use normal tail drop, WTD, or weighted random early detection
(WRED) dropping.
Drops will occur only in data queues. The purpose of using multiple queues is to prevent voice
traffic from being dropped or delayed.
2009 Cisco Systems, Inc. Congestion Management 5-91
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-3
Queuing on Catalyst Switches (Cont.)
Key queuing features depend upon the switch hardware:
Number of queues per port
Type of queues (priority or standard)
Ability to have drop thresholds for a queue
Number of drop thresholds per queue
Type of drop thresholds (tail drop or WRED)
Switch queuing capabilities are shown as:
2Q2T:
Two queues
Two drop thresholds for each queue
1P2Q2T:
One priority queue
Two additional queues
Two drop thresholds for each queue

Different Cisco Catalyst switches offer these different queuing capabilities:
The number of queues per port
The type of queues (priority or standard)
The capability to have drop thresholds for a queue
The number of drop thresholds per queue
The type of drop thresholds (tail drop or WRED)
When you view information on Cisco Catalyst switches, queuing information is displayed in an
abbreviated format, as in these examples:
2Q2T: Indicates that the switch supports two standard queues and two drop thresholds per
queue
1P2Q2T: Indicates that the switch supports one priority queue, two standard queues, and
two drop thresholds per queue
5-92 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-4
Queuing on Catalyst Switches (Cont.)
6500 4500
2960, 2970,
3560, 3750
3550 2950
Transmit
Queues
2Q2T
1P2Q2T
1P3Q1T
1P2Q1T
1P3Q1T
4Q1T
4Q3T
1P3Q3T
1P3Q2T
4Q2T
1P3Q
4Q
Receive
Queues
1Q4T
1P1Q4T
1P1Q
1P1Q8T
No
1P1Q3T
2Q3T
No No

The chart shows the capabilities of Catalyst switch models.
6500 Series Catalyst Switches
The Catalyst 6500 provides both receive (Rx) and transmit (Tx) queues. The number and type
of queues is dependent upon the line card.
The Rx queues are designed to protect voice traffic from delays or drops. An example of the
implementation of an Rx queue with a priority queue and a standard queue with drop thresholds
(1P1Q4T) is as follows:
Frames with class of service (CoS) 5 go to the priority queue.
Frames with CoS 0, 1, 2, 3, 4, 6, or 7 go to the standard Rx queue as follows:
Using standard receive-queue tail-drop threshold 1, the switch drops incoming
frames with CoS 0 or 1 when the receive-queue buffer is 50 percent or more full.
Using standard receive-queue tail-drop threshold 2, the switch drops incoming
frames with CoS 2 or 3 when the receive-queue buffer is 60 percent or more full.
Using standard receive-queue tail-drop threshold 3, the switch drops incoming
frames with CoS 4 when the receive-queue buffer is 80 percent or more full.
Using standard receive-queue tail-drop threshold 4, the switch drops incoming
frames with CoS 6 or 7 when the receive-queue buffer is 100 percent full.
An example of the implementation of a Tx queue with two queues and two drop thresholds
(2Q2T) on the Cisco Catalyst 6500 Series switch is as follows. For 2Q2T ports, each Tx queue
has two tail-drop thresholds that function as follows:
Frames with CoS 0, 1, 2, or 3 go to the low-priority Tx queue (queue 1):
Using Tx queue 1, tail-drop threshold 1, the switch drops frames with CoS 0 or 1
when the low-priority transmit-queue buffer is 80 percent full.
2009 Cisco Systems, Inc. Congestion Management 5-93
Using Tx queue 1, tail-drop threshold 2, the switch drops frames with CoS 2 or 3
when the low-priority transmit-queue buffer is 100 percent full.
Frames with CoS 4, 5, 6, or 7 go to the high-priority Tx queue (queue 2):
Using Tx queue 2, tail-drop threshold 1, the switch drops frames with CoS 4 or 5
when the high-priority transmit-queue buffer is 80 percent full.
Using Tx queue 2, tail-drop threshold 2, the switch drops frames with CoS 6 or 7
when the high-priority transmit-queue buffer is 100 percent full.
4500 Series Catalyst Switches
On the Catalyst 4500 series switch with a Supervisor III engine, each physical port has four Tx
queues (egress queues). Each packet that needs to be transmitted is enqueued to one of the Tx
queues. The Tx queues are then serviced based on the Tx queue scheduling algorithm.
When the final transmit DSCP is computed (including any markdown of DSCP), the transmit
DSCP-to-Tx queue mapping configuration determines the Tx queue. The packet is placed in the
Tx queue of the transmit port, determined from the transmit DSCP.
The four Tx queues for a transmit port share the available link bandwidth of that transmit port.
You can set the link bandwidth to be shared differently among the Tx queues using the
bandwidth command in interface Tx queue configuration mode. With this command, you
assign the minimum guaranteed bandwidth for each Tx queue.
By default, all queues are scheduled in a round-robin manner.
You can configure Tx queue 3 on each port with higher priority. When Tx queue 3 is
configured with higher priority, packets in Tx queue 3 are scheduled ahead of packets in other
queues.
When Tx queue 3 is configured at a higher priority, the packets are scheduled for transmission
before the other Tx queues only if queue 3 has not met the allocated bandwidth sharing
configurationthat is, if continuing to give priority to queue 3 would impact the minimum
guaranteed to the other queues. Any traffic that exceeds the configured shape rate will be
queued and transmitted at the configured rate. If the burst of traffic exceeds the size of the
queue, packets will be dropped to maintain transmission at the configured shape rate.
Drop thresholds can be configured as tail drop or Dynamic Buffer Limiting (DBL).
3550 Catalyst Switches
On the Cisco Catalyst 3550 Series switches, the default scheduling method is WRR with 25
percent of bandwidth per queue by default.
You can assign CoS values to queues during configuration. The default CoS-to-queue
assignment is as follows:
CoS 6 to 7 placed in queue 4
CoS 4 to 5 placed in queue 3
CoS 2 to 3 placed in queue 2
CoS 0 to 1 placed in queue 1
5-94 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
The switches support WRR scheduling, and WRR with a priority queue, as follows:
The WRR scheduling algorithm ensures that lower-priority packets are not entirely starved
for bandwidth and are serviced without compromising the priority settings administered by
the network manager.
WRR with a priority queue ensures that higher-priority packets will always get serviced
first, ahead of other traffic in lower-priority queues. The priority queue is defined as
queue 4.
Queue weights and queue depths are configurable.
Drop thresholds can be configured as tail drop or WRED.
2009 Cisco Systems, Inc. Congestion Management 5-95
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-5
Queuing on Catalyst Switches (Cont.)
Catalyst 2950 Switches
4 transmit queues
(1P3Q or 4Q)
Need to configure PQ and ensure that
CoS 5 traffic is assigned to the PQ
Configurable PQ for queue 4
Configurable CoS to specific queue
Configurable queue weight

QoS is enabled by default on Cisco Catalyst 2950 Series switches, and the default scheduling
method is strict priority. Strict priority scheduling is based on the priority of queues. Packets in
the high-priority queue always transmit first; packets in the low-priority queue do not transmit
until all the high-priority queues become empty.
CoS values can be assigned to queues during configuration. The default CoS-to-queue
assignment is:
CoS 6 to 7 placed in queue 4
CoS 4 to 5 placed in queue 3
CoS 2 to 3 placed in queue 2
CoS 0 to 1 placed in queue 1
Catalyst 2950 switches support PQ, WRR scheduling, and WRR with a priority queue, as
follows:
The WRR scheduling algorithm ensures that lower-priority packets are not entirely starved
for bandwidth and are serviced without compromising the priority settings administered by
the network manager.
WRR with a priority queue ensures that higher-priority packets will always get serviced
first, ahead of other traffic in lower priority queues. The priority queue is defined as queue
4.
Queue weights are configurable.
5-96 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-6
Queuing on Catalyst Switches (Cont.)
Catalyst 2960 Switches
2 ingress queues
(1P1Q3T or 2Q3T).
4 egress queues per port
(1P3Q3T or 4Q3T).
Enhanced version of tail-drop
called weighted tail drop used
on ingress and egress queues.
Ingress and egress queues
serviced by Shaped Round
Robin.

Cisco Catalyst 2960 switches have queues at specific points to help prevent congestion.
Because the total inbound bandwidth of all ports can exceed the bandwidth of the internal ring,
packets are sent to ingress queues after being classified, policed, and marked and before being
forwarded into the switch fabric. Because multiple ingress ports can simultaneously send
packets to an egress port and cause congestion, packets are forwarded from the internal ring to
outbound queues. Catalyst 2960 switches have the following queues:
Two configurable ingress queues for user traffic: One of the ingress queues can be the
priority queue.
WTD is used as the congestion-avoidance mechanism for managing the queue
lengths and providing drop precedences for different traffic classifications. To use
WTD, the switch must be running the LAN Base image.
Shaped round robin (SRR) is used as the scheduling service for specifying the rate at
which packets are sent to the internal ring. SRR services the priority queue for its
configured share before servicing the other queue. Sharing is the only supported
mode on ingress queues. To use ingress queueing, the switch must be running the
LAN Base image.
Four egress queues per port: One of the egress queues (queue 1) can be the expedite
queue. The expedite queue is a priority queue, and it is serviced until empty before the
other queues are serviced.
WTD is used as the congestion-avoidance mechanism.
SRR is used as the scheduling service for specifying the rate at which packets are
dequeued to the egress interface. Shaping or sharing is supported on egress queues.
Shaped egress queues are guaranteed but limited to using a share of port bandwidth.
Shared egress queues are also guaranteed a configured share of bandwidth, but can
use more than the guarantee if other queues become empty and do not use their share
of the bandwidth. To use egress queueing, the switch must be running the LAN Base
image.
2009 Cisco Systems, Inc. Congestion Management 5-97
On the Cisco Catalyst 2960 Series switches, you can prioritize traffic by placing packets with
particular DSCP or CoS values into certain queues, by allocating a large queue size, or by
servicing the queue more frequently. You can also adjust queue thresholds so that packets with
lower priorities are dropped.
By default, QoS is disabled on Cisco Catalyst 2960 Series switches. There is no concept of
trusted or untrusted ports because the packets are not modified; the CoS, DSCP, and IP
precedence values in the packet are not changed. Traffic is switched in pass-through mode.
(Packets are switched without any rewrites and classified as best effort without any policing.)
When you enable QoS with the mls qos global configuration command and all other QoS
settings are set to their defaults, traffic is classified as best effort without any policing. No
policy maps are configured. The default port trust state on all ports is untrusted, and the default
ingress and egress queue settings are in effect.
Note QoS is also disabled by default on Catalyst 3560 and 3750 switches, and the mls qos
command is used to globally enable it. As with the Catalyst 2960 switches, WTD and SRR
are used for congestion-avoidance and scheduling on these switches.
The default ingress and egress queue settings are described in the tables below.
Default Ingress Queue Configuration
Feature Queue 1 Queue 2
Buffer allocation 90 percent 10 percent
Bandwidth allocation
1
4 4
Priority queue bandwidth
2
0 10
WTD drop threshold 1 100 percent 100 percent
WTD drop threshold 2 100 percent 100 percent

1
The bandwidth is equally shared between the queues. SRR sends packets in shared mode only.
2
Queue 2 is the priority queue. SRR services the priority queue for its configured share before
servicing the other queue.
5-98 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Default Egress Queue Configuration
Feature Queue 1 Queue 2 Queue 3 Queue 4
Buffer allocation 25 percent 25 percent 25 percent 25 percent
WTD drop threshold 1 100 percent 200 percent 100 percent 100 percent
WTD drop threshold 2 100 percent 200 percent 100 percent 100 percent
Reserved threshold 50 percent 50 percent 50 percent 50 percent
Maximum threshold 400 percent 400 percent 400 percent 400 percent
SRR shaped weights (absolute)
1
25 0 0 0
SRR shared weights
2
25 25 25 25

1
A shaped weight of zero means that this queue is operating in shared mode.
2
One-quarter of the bandwidth is allocated to each queue.
2009 Cisco Systems, Inc. Congestion Management 5-99
Weighted Round Robin
This topic describes how WRR works on a Catalyst 2950 switch.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-7
Weighted Round Robin
WRR overcomes the problem of having PQ starving out the lower-
priority queues.
WRR scheduling prevents queues with a lower weight from being
completely starved during periods of heavy high-priority traffic.
Different weights are assigned to each queue.
For example, in one scheduling round, the WRR scheduler will
transmit:
Three frames from a queue assigned weight 3.
Four frames from a queue assigned weight 4.
WRR with an expedite queue: When WRR is configured on a
Catalyst 2950, the option exists to configure queue 4 as a priority
queuean expedite queue.

WRR scheduling requires that you specify a number that indicates the importance (weight) of
the queue relative to the other CoS queues. WRR scheduling prevents the low-priority queues
from being completely neglected during periods of high-priority traffic. The WRR scheduler
transmits some packets from each queue in turn. The number of packets it sends corresponds to
the relative importance of the queue. For example, if one queue has a weight of 3 and another
has a weight of 4, three packets are sent from the first queue for every four that are sent from
the second queue. By using this scheduling, low-priority queues have the opportunity to send
packets even though the high-priority queues are not empty.
WRR scheduling with an expedite priority queue (also referred to as strict PQ) uses one of the
egress queues as an expedite queue (queue 4 on a Catalyst 2950 switch). The remaining queues
participate in WRR. When the expedite queue is configured, it is a priority queue and is
serviced until it is empty before the other queues are serviced by WRR scheduling. Actions at
the egress interface include queuing and scheduling, as follows:
Queuing evaluates the internal DSCP and determines in which of the four egress queues to
place the packet. The DSCP value is mapped to a CoS value, which selects one of the
queues.
Scheduling services the four egress queues based on their configured WRR weights and
thresholds. One of the queues can be the expedite queue, which is serviced until empty
before the other queues are serviced.
5-100 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
With WRR, lower-priority queues have the opportunity to transmit packets even though the
high-priority queues have not been emptied. With WRR with an expedite queue, one queue
(queue 4 on the Catalyst 2950 and 3550 switches) can be configured as an expedite priority
queue. All traffic from the expedite queue must be serviced before the remaining three queues
are serviced. The expedite queue can be used to ensure that voice traffic incurs minimal delay
and no drops.
2009 Cisco Systems, Inc. Congestion Management 5-101
Configuring CoS-to-Queue Mappings for PQ on
Catalyst 2950 Switches
This topic describes the commands required to configure CoS-to-queue mappings for PQ on the
Cisco Catalyst 2950 switch.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-8
Configuring PQ on
Catalyst 2950 Switches

Assigns CoS values to CoS priority queues.


quid: Specifies the queue ID of the CoS priority queue. (Ranges
are 1 to 4, where 1 is the lowest CoS priority queue.)
cos1...cosn: Specifies the CoS values that are mapped to the
queue ID.
Default ID values are:
Queue ID CoS Values
1 0, 1
2 2, 3
3 4, 5
4 6, 7

To configure CoS-to-queue mappings for PQ on the Catalyst 2950 switch, specify the queue ID
of the CoS priority queue. Ranges are 1 to 4 where 1 is the lowest CoS priority queue. Then,
specify the CoS values that are mapped to the queue ID.
The syntax for the wrr-queue cos-map command is as follows:

Syntax Description
Parameter Description
The queue ID of the CoS priority queue. Ranges are 1 to 4 where
1 is the lowest CoS priority queue.
The CoS values that are mapped to the queue ID.
The default CoS-to-priority queue assignments are shown in this table.
Queue 1 2 3 4
CoS Values 0, 1 2, 3 4, 5 6, 7
5-102 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring WRR on Catalyst 2950 Switches
This topic describes the commands required to configure WRR on the Catalyst 2950 switch.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-9
Configuring WRR on
Catalyst 2950 Switches

Assigns WRR weights to the four egress queues.


Ranges for the WRR values:
For weight1, weight2, and weight3, the range is 1 to 255.
For weight4, the range is 0 to 255 (when weight4 is set to 0, queue 4 is
configured as the expedite queue).






Use the wrr-queue bandwidth global configuration command to assign WRR weights to the
four CoS priority queues on the Catalyst 2950 switch. Use the no form of this command to
disable the WRR scheduler and enable the strict priority scheduler.
For weight 1, weight 2, and weight 3, the range is 1 to 255. The range for weight 4 is 0 to 255.
Queues 1, 2, and 3 can be configured for WRR scheduling and queue 4 can be configured for
strict priority scheduling. To configure queue 4 as the expedite queue, set weight 4 to 0. When
queue 4 is empty, packets from queues 1, 2, and 3 are sent according to the assigned WRR
weights.
The syntax for the wrr-queue bandwidth command is as follows:

Syntax Description
Parameter Description
The ratio of weight 1, weight 2, weight 3, and weight 4 determines
the weights of the WRR scheduler.
Note In Cisco IOS Software releases earlier than Release 12.1(12c)EA1, the range for all queues
is 1 to 255.
2009 Cisco Systems, Inc. Congestion Management 5-103
In the example for the Catalyst 2950 switch, this configuration has been made:
The interface is set to Gigabit Ethernet 0/12.
Queue bandwidth (queue weight) is set to these weights:
Queue 1: 20
Queue 2: 1
Queue 3: 80
Queue 4: 0 (because this is 0, this is the expedite queue)
The CoS map is set to its default settings.
CoS is mapped to queues according to the following:
Queue 1: CoS 0, 1, 2, 4
Queue 2: No CoS assigned
Queue 3: CoS 3, 6, 7
Queue 4: CoS 5 (voice traffic goes to the expedite queue)
Note This is the AutoQoS configuration for the Catalyst 2950.
5-104 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Weighted Tail Drop
This topic describes how WTD works on a Catalyst 2960 switch.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 10
Weighted Tail Drop
Implemented on queues to
manage the queue lengths.
Uses the QoS label
assigned to a frame to
subject the frame to
different thresholds.
Drops the frame if the
threshold for its CoS label
is exceeded. (Each queue
has three threshold
values.)
QOS label determines
which threshold value
is applied to the frame.
100%
60%
40%
CoS 6-7
CoS 4-5
CoS 0-3
1000
600
400
0
Drop
percentage
Number of frames
that can be queued
at corresponding
percentage level
Example: Arriving frame
with CoS 5 is dropped

On Cisco Catalyst 2960 Series switches, both the ingress and egress queues use an enhanced
version of the tail-drop congestion-avoidance mechanism called weighted tail drop (WTD).
WTD is implemented on queues to manage the queue lengths and to provide drop precedences
for various traffic classifications.
As a frame is enqueued to a particular queue, WTD uses the QoS label that is assigned to the
frame to subject the frame to different thresholds. If the threshold is exceeded for that QoS
label (the space available in the destination queue is less than the size of the frame), the switch
drops the frame.
Each queue has three drop thresholds: two configurable (explicit) WTD thresholds and one
nonconfigurable (implicit) threshold preset to the queue-full state. The QOS label determines
which of the three threshold values is applied to the frame.
You can assign the two configurable WTD threshold percentages for threshold ID 1 and ID 2 to
the ingress queues by using the mls qos srr-queue input threshold command. Each threshold
value is a percentage of the total number of allocated buffers for the queue. The drop threshold
for threshold ID 3 is preset to the queue-full state, and you cannot modify it.
The figure shows an example of WTD operating on a queue whose size is 1000 frames. Three
drop percentages are configured: 40 percent (400 frames), 60 percent (600 frames), and 100
percent (1000 frames). These percentages mean that up to 400 frames can be queued at the 40-
percent threshold, up to 600 frames at the 60-percent threshold, and up to 1000 frames at the
100-percent threshold.
2009 Cisco Systems, Inc. Congestion Management 5-105
In this example, CoS values 6 and 7 have a greater importance than the other CoS values, and
they are assigned to the 100-percent drop threshold (queue-full state). CoS values 4 and 5 are
assigned to the 60-percent threshold, and CoS values 0 to 3 are assigned to the 40-percent
threshold.
Suppose the queue is already filled with 600 frames, and a new frame arrives. It contains CoS
values 4 and 5 and is subjected to the 60-percent threshold. If this frame is added to the queue,
the threshold will be exceeded, so the switch drops it.
5-106 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring WTD on Catalyst 2960 Switches
This topic describes the commands required to configure WTD on the Catalyst 2960 switch.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 11
Allocating Buffer Space to and Setting WTD
Thresholds for an Egress Queue Set

Configures the weighted tail-drop (WTD) thresholds, guarantees the


availability of buffers, and configures the maximum memory allocation to a
queue-set (four egress queues per port).

Allocates buffers to a queue-set (four egress queues per port).


Maps a port to a queue set.



You can guarantee the availability of buffers, set WTD thresholds, and configure the maximum
allocation for a queue set by using the mls qos queue-set output threshold command. A queue
set defines all the characteristics of the four egress queues per port.
Each threshold value is a percentage of the queues allocated buffers, which you specify by
using the mls qos queue-set output buffers command. The queues use WTD to support
distinct drop percentages for different traffic classes.
Note The egress queue default settings are suitable for most situations. You should change them
only when you have a thorough understanding of the egress queues and if the default
settings do not meet your QoS solution.
Complete the following steps to configure the memory allocation and to drop thresholds for a
queue set:
Step 1 Allocate buffers to a queue set. By default, all allocation values are equally mapped
among the four queues (25, 25, 25, 25). Each queue has one-fourth of the buffer
space. Allocate buffers according to the importance of the traffic. For example, give
a large percentage of the buffer to the queue with the highest-priority traffic.
2009 Cisco Systems, Inc. Congestion Management 5-107
Step 2 Configure the WTD thresholds, guarantee the availability of buffers, and configure
the maximum memory allocation for the queue set (four egress queues per port). By
default, the WTD thresholds for queues 1, 3, and 4 are set to 100 percent. The
thresholds for queue 2 are set to 200 percent. The reserved thresholds for queues 1,
2, 3, and 4 are set to 50 percent. The maximum thresholds for all queues are set to
400 percent.
Step 3 Map a port to a queue set.
The syntax for the mls qos queue-set output buffers command is as follows:


Syntax Description
Parameter Description
qset-id ID of the queue set. Each port belongs to a queue set, which
defines all the characteristics of the four egress queues per port.
The range is 1 to 2.
allocation1...allocation4 Buffer space allocation (percentage) for each queue (four values
for queues 1 to 4). For allocation1, allocation3, and allocation4,
the range is 0 to 99. For allocation2, the range is 1 to 100
(including the CPU buffer). Separate each value with a space.
The syntax for the mls qos queue-set output threshold command is as follows:



Syntax Description
Parameter Description
ID of the queue set. The range is 1 to 2.
Specific queue in the queue set on which the command is
performed. The range is 1 to 4.


Two WTD thresholds expressed as a percentage of the allocated
memory of the queue. The range is 1 to 3200 percent.
Amount of memory to be guaranteed (reserved) for the queue
and expressed as a percentage of the allocated memory. The
range is 1 to 100 percent.
Enable a queue in the full condition to get more buffers than are
reserved for it. This is the maximum memory the queue can have
before the packets are dropped. The range is 1 to 3200 percent.

The syntax for the queue-set command is as follows:

5-108 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
qset-id ID of the queue set. Each port belongs to a queue set, which
defines all the characteristics of the four egress queues per port.
The range is 1 to 2.

2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 12
Allocating Buffer Space to and Setting WTD
Thresholds for an Egress Queue Set (Cont.)




Maps a port to queue set 2
Allocates 40% of the buffer space to egress queue 1 and 20% to egress
queues 2, 3, and 4.
Configures the drop thresholds for queue 2 to 40% (threshold 1) and
60% (threshold 2) of the allocated memory.
Guarantees 100% of the allocated memory to queue 2.
Configures 200% as the maximum memory that queue 2 can have
before packets are dropped.

The example in the figure shows how to map a port to queue set 2. It allocates 40 percent of the
buffer space to egress queue 1 and 20 percent to egress queues 2, 3, and 4. It configures the
drop thresholds for queue 2 to 40 and 60 percent of the allocated memory, guarantees (reserves)
100 percent of the allocated memory, and configures 200 percent as the maximum memory that
this queue can have before packets are dropped.
2009 Cisco Systems, Inc. Congestion Management 5-109
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 13
Mapping DSCP or CoS Values to an
Egress Queue and to a Threshold ID

Maps DSCP values to an egress queue or maps DSCP values to a


queue and to a threshold ID.

Maps CoS values to an egress queue or maps CoS values to a


queue and to a threshold ID.

Maps CoS values 0 to 3 to egress queue 1 and to threshold 1.

You can prioritize traffic by placing packets with particular DSCPs or CoS values into certain
queues and adjusting the queue thresholds so that packets with lower priorities are dropped.
Note The egress queue default settings are suitable for most situations. You should change them
only when you have a thorough understanding of the egress queues and if the default
settings do not meet your QoS solution.
Use the mls qos srr-queue output dscp-map command or the mls qos srr-queue output cos-
map command to map DSCP or CoS values to an egress queue and to a threshold ID. By
default, DSCP values 0-15 are mapped to queue 2 and threshold 1. DSCP values 16-31 are
mapped to queue 3 and threshold 1. DSCP values 32-39 and 48-63 are mapped to queue 4 and
threshold 1. DSCP values 40-47 are mapped to queue 1 and threshold 1.
By default, CoS values 0 and 1 are mapped to queue 2 and threshold 1. CoS values 2 and 3 are
mapped to queue 3 and threshold 1. CoS values 4, 6, and 7 are mapped to queue 4 and
threshold 1. CoS value 5 is mapped to queue 1 and threshold 1.
The syntax for the mls qos srr-queue output dscp-map command is as follows:


5-110 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Syntax Description
Parameter Description
queue queue-id Specifies a queue number. For queue-id, the range is 1 to 4.
dscp1...dscp8 Maps DSCP values to an egress queue. For dscp1...dscp8, enter
up to eight values, and separate each value with a space. The
range is 0 to 63.
threshold threshold-id
dscp1...dscp8
Maps DSCP values to a queue threshold ID. For threshold-id, the
range is 1 to 3. For dscp1...dscp8, enter up to eight values, and
separate each value with a space. The range is 0 to 63.

The syntax for the mls qos srr-queue output cos-map command is as follows:


Syntax Description
Parameter Description
queue queue-id Specifies a queue number. For queue-id, the range is 1 to 4.
cos1...cos8 Maps CoS values to an egress queue. For cos1...cos8, enter up
to eight values, and separate each value with a space. The range
is 0 to 7.
threshold threshold-id
cos1...cos8
Maps CoS values to a queue threshold ID. For threshold-id, the
range is 1 to 3. For cos1...cos8, enter up to eight values, and
separate each value with a space. The range is 0 to 7.

2009 Cisco Systems, Inc. Congestion Management 5-111
Shaped Round Robin
This topic describes how SRR works on a Catalyst 2960 switch.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 14
Shaped Round Robin
Controls the rate at which packets are sent.
On ingress queues, sends packets to internal ring.
On egress queues, sends packets to egress port.
Has two modes:
Shaped mode (for egress queues only)
Guarantees queues a percentage of bandwidth and rate-limits them to that
amount.
Provides a more even flow of traffic over time.
Absolute value of a weight is used to compute bandwidth available for the
queues.
Shared mode
Queues share bandwidth according to configured weights.
Bandwidth is guaranteed; queues can also use unused bandwidth
allocated to another queue.
Ratio of weights controls frequency of dequeuing; absolute values are
meaningless.
Shaping and sharing are configured on a per-interface basis.

On Cisco Catalyst 2960 Series switches, both the ingress and egress queues are serviced by
SRR, which controls the rate at which packets are sent. On the ingress queues, SRR sends
packets to the internal ring. On the egress queues, SRR sends packets to the egress port.
In shaped mode, the egress queues are guaranteed a percentage of the bandwidth, and they are
rate-limited to that amount. Shaped traffic does not use more than the allocated bandwidth even
if the link is idle. Shaping provides a more even flow of traffic over time and reduces the peaks
and valleys of bursty traffic. With shaping, the absolute value of each weight is used to
compute the bandwidth available for the queues.
In shared mode, the queues share the bandwidth among them according to the configured
weights. The bandwidth is guaranteed at this level but not limited to it. For example, if a queue
is empty and no longer requires a share of the link, the remaining queues can expand into the
unused bandwidth and share it among them. With sharing, the ratio of the weights controls the
frequency of dequeuing; the absolute values are meaningless. Shaping and sharing are
configured per interface. Each interface can be uniquely configured.
5-112 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 15
Queuing and Scheduling on
Ingress Queues
Determine ingress queue number,
buffer allocation, and WTD thresholds.
Send packet to the internal ring.
Drop packet.
Yes
No
Read QoS label.
(DSCP or CoS value)
Queue the packet. Service the queue
according to the SRR weights.
Determine whether thresholds are
being exceeded.

The figure shows the queueing and scheduling flowchart for ingress ports.
You define the ratio (allocate the amount of space) with which to divide the ingress buffers
between the two ingress queues by using the mls qos srr-queue input buffers command. The
buffer allocation together with the bandwidth allocation control how much data can be buffered
and sent before packets are dropped. You allocate bandwidth as a percentage by using the mls
qos srr-queue input bandwidth command. The ratio of the weights is the ratio of the
frequency in which the SRR scheduler sends packets from each queue.
SRR services the ingress priority queue for its configured weight as specified by the
bandwidth keyword in the mls qos srr-queue input priority-queue command. SRR then
shares the remaining bandwidth with both ingress queues and services them as specified by the
weights configured with the mls qos srr-queue input bandwidth command.
2009 Cisco Systems, Inc. Congestion Management 5-113
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 16
Queuing and Scheduling on
Egress Queues
Send packet out the port.
Drop packet.
Yes
No
Receive packet from internal ring.
Read QoS label.
Rewrite DSCP or CoS value, as appropriate.
Queue packet. Service queue according to
SRR weights.
Determine egress queue number and
threshold based on label.
Determine whether thresholds are being
exceeded.

The four egress queues are configured by a queue set. All traffic leaving an egress port flows
through one of these four queues and is subjected to a threshold based on the QoS label
assigned to the packet.
5-114 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 17
Queuing and Scheduling on Egress Queues
(Cont.)
Buffer space divided between common pool and reserved pool.
Switch reserves a minimum amount of buffers for each egress queue.
Switch detects
Whether target queue is under limit or over limit.
Whether common pool is empt y (no free buffers) or not empty (free buffers).
If queue is not over limit, the switch can allocate buffer space
From the reserved pool.
From the common pool if it is not empty.
If no free buffers in common pool or if queue over limit, switch drops frame.
P1
Q1
P1
Q3
P1
Q4
P2
Q2
P2
Q1
P1
Q2
Common pool
Reserved pool

The figure shows the egress queue buffer. The buffer space is divided between the common
pool and the reserved pool. The switch uses a buffer allocation scheme to reserve a minimum
amount of buffers for each egress queue, to prevent any queue or port from consuming all the
buffers and depriving other queues, and to control whether to grant buffer space to a requesting
queue. The switch detects whether the target queue has not consumed more buffers than its
reserved amount (under limit), whether it has consumed all of its maximum buffers (over limit),
and whether the common pool is empty (no free buffers) or not empty (free buffers). If the
queue is not over limit, the switch can allocate buffer space from the reserved pool or from the
common pool if it is not empty. If there are no free buffers in the common pool or if the queue
is over limit, the switch drops the frame.
You guarantee the availability of buffers, set drop thresholds, and configure the maximum
memory allocation for a queue-set by using the mls qos queue-set output threshold
command. Each threshold value is a percentage of the memory allocated to the queue. You can
allocate memory to a queue by using the mls qos queue-set output buffers command. The
sum of all the allocated buffers represents the reserved pool, and the remaining buffers are part
of the common pool. Through buffer allocation, you can ensure that high-priority traffic is
buffered. For example, if the buffer space is 400, you can allocate 70 percent of it to queue 1
and 10 percent to queues 2 through 4. Queue 1 then has 280 buffers allocated to it, and queues
2 through 4 each have 40 buffers allocated to them.
You can guarantee that the allocated buffers are reserved for a specific queue in a queue set.
For example, if there are 100 buffers for a queue, you can reserve 50 percent (50 buffers). The
switch returns the remaining 50 buffers to the common pool. You also can enable a queue in
the full condition to obtain more buffers than are reserved for it by setting a maximum
threshold. The switch can allocate the needed buffers from the common pool if the common
pool is not empty.
2009 Cisco Systems, Inc. Congestion Management 5-115
SRR services each queue set in shared or shaped mode. You assign shared or shaped weights to
the port by using the srr-queue bandwidth share command or the srr-queue bandwidth
shape command. The buffer allocation together with the SRR weight ratios control how much
data can be buffered and sent before packets are dropped. The weight ratio is the ratio of the
frequency with which the SRR scheduler sends packets from each queue.
All four queues participate in the SRR unless the expedite queue is enabled, in which case the
first bandwidth weight is ignored and is not used in the ratio calculation. Use the priority-
queue out command to enable the expedite queue.
5-116 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring SRR on Catalyst 2960 Switches
This topic describes the commands required to configure SRR on the Catalyst 2960 switch.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 18
Allocating Bandwidth to Ingress Queues
and Configuring the Priority Queue

Configures the ingress priority queue and guarantees


bandwidth on the internal ring if the ring is congested.


Disables priority queuing.
Assigns bandwidth to the ingress queues; configures the switch
to service queue 2 three times as often as queue 1.

Assigns SRR weights to an ingress queue.



Use the mls qos srr-queue input priority-queue command to configure the ingress priority
queue and to guarantee bandwidth on the internal ring if the ring is congested. SRR services the
priority queue for its configured weight as specified by the bandwidth keyword in this
command. You should use the priority queue only for traffic that needs to be expedited, such as
voice traffic, which needs minimum delay and jitter. The priority queue is guaranteed part of
the bandwidth to reduce the delay and jitter under heavy network traffic on an oversubscribed
ring (when there is more traffic than the backplane can carry, and the queues are full and
dropping frames).
After servicing the ingress priority queue for its configured weight, SRR shares the remaining
bandwidth between the two ingress queues, servicing them according to the weights you
specify with the mls qos srr-queue input bandwidth command. The ratio of the weights is the
ratio of the frequency with which the SRR scheduler sends packets from each queue. The
bandwidth and the buffer allocation control how much data can be buffered before packets are
dropped.
The syntax for the mls qos srr-queue input priority-queue command is as follows:


2009 Cisco Systems, Inc. Congestion Management 5-117
Syntax Description
Parameter Description
queue-id Ingress queue ID. The range is 1 to 2. By default, the priority
queue is queue 2.
bandwidth weight Bandwidth percentage of the internal ring. The range is 0 to 40.
By default, 10 percent of the bandwidth is allocated to the priority
queue.
The syntax for the mls qos srr-queue input bandwidth command is as follows:

Syntax Description
Parameter Description
weight1 weight2 Ratio of weight1 and weight2 determines the ratio of the
frequency with which the SRR scheduler dequeues packets from
ingress queues 1 and 2. The range is 1 to 100. Separate each
value with a space.
The default setting for weight1 and weight2 is 4; one-half of the
bandwidth is equally shared between the two queues.
5-118 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 19
Configuring Weights on Egress Queues
and Enabling the Expedite Queue

Assigns the shared weights and enables bandwidth sharing on


the four egress queues mapped to a port.

Assigns the shaped weights and enables bandwidth shaping on


the four egress queues mapped to a port.

Enables the egress expedite queue on a port.



To assign shared weights and to enable bandwidth sharing on the four egress queues mapped to
a port, use the srr-queue bandwidth share command in interface configuration mode. By
default, all four weights are 25; one-fourth of the bandwidth is allocated to each queue.
Use the srr-queue bandwidth shape command to assign SRR shaped weights to the egress
queues. By default, weight1 is set to 25; weight2, weight3, and weight4 are set to 0, and these
queues are in shared mode.
Use the priority-queue command to enable the egress expedite queue, which is disabled by
default. When you configure this command, the SRR weight and queue size ratios are affected
because there is one less queue participating in SRR. This means that weight1 in the srr-queue
bandwidth shape command or the srr-queue bandwidth share command is ignored; it is not
used in the ratio calculation.
The shaped mode overrides the shared mode. When configuring queues for the same port for
both shaping and sharing, make sure that you configure the lowest-numbered queue for
shaping. If you set a shaped queue weight to 0, the queue participates in shared mode and the
weights specified with the srr-queue bandwidth share command come into effect for the
queue.
The syntax for the srr-queue bandwidth share command is as follows:

2009 Cisco Systems, Inc. Congestion Management 5-119
Syntax Description
Parameter Description
weight1 weight2 weight3 weight4 The ratios of weight1, weight2, weight3, and weight4 specify the
ratio of the frequency with which the SRR scheduler dequeues
packets. Separate each value with a space. The range is 1 to
255.
The syntax for the srr-queue bandwidth shape command is as follows:

Syntax Description
Parameter Description
weight1 weight2 weight3 weight4 Specify the weights to specify the percentage of the port that is
shaped. The inverse ratio (1/weight) specifies the shaping
bandwidth for this queue. Separate each value with a space. The
range is 0 to 65535.
5-120 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 20
Example: Configuring Weights on Egress
Queues and Enabling the Expedite Queue
Configures the queues for the same port for both shaping and sharing.
The bandwidth weight for queue 1 is 1/25 or 4%.
Because the weight ratios for queues 2, 3, and 4 are set to 0, they operate
in shared mode.
The bandwidth ratio allocated for the queues in shared mode is
Queue 2: 20/(20+25+25) or 28.6%.
Queue 3: 25/(20+25+25) or 35.7%.
Queue 4: 25/(20+25+25) or 35.7%.
Disables the egress expedite queue after the SRR shaped and shared
weights are configured.





The figure shows an example in which queues for the same port are configured for both
shaping and sharing. Because the shaped mode overrides the shared mode, the bandwidth
weight for queue 1 is 1/25, or 4%. The weight ratios for queues 2, 3, and 4 are set to 0, so those
queues operate in shared mode. After the SRR shaped and shared weights are configured, the
egress expedite queue is disabled.
2009 Cisco Systems, Inc. Congestion Management 5-121
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 21
Limiting the Bandwidth on an Egress
Interface


Limits the bandwidth on a port to 80%.

Limits the maximum output on a port.



You can limit the bandwidth on an egress port. For example, if a customer pays for only a small
percentage of a high-speed link, you can limit the bandwidth to that amount.
Use the srr-queue bandwidth limit command to specify the percentage of the port speed to
which the port should be limited. The range is 10 to 90. By default, the port is not rate-limited
and is set to 100 percent.
In the figure, the bandwidth on the gigabitethernet0/1 interface is limited to 80 percent. This
means that the port is idle 20 percent of the time. The line rate drops to 80 percent of the
connected speed, which is 800 Mb/s. These values are not exact, because the hardware adjusts
the line rate in increments of six.
The syntax for the srr-queue bandwidth limit command is as follows:

Syntax Description
Parameter Description
weight1 Percentage of the port speed to which the port should be limited.
The range is 10 to 90.
5-122 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Monitoring Queuing on Catalyst 2950 and 2960
Switches
This topic describes the commands required to monitor queuing on Catalyst 2950 and 2960
switches.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 22
Monitoring Queuing on
Catalyst 2950 and 2960 Switches

Displays QoS mapping information.


This command is available with enhanced software image switches.



(show mls qos maps command output from a Catalyst 2950 switch)

Use the show mls qos maps command to display QoS mapping information on the Catalyst
2950 and 2960 switches. Maps are used to generate an internal DSCP value, which represents
the priority of the traffic. The figure shows output of this command on a Catalyst 2950 switch.
The show mls qos maps command is available only if the Catalyst 2950 switch is running the
Enhanced Image (EI) software.
If the show mls qos maps command is used without any keywords, it will display all maps.
The syntax for the show mls qos maps command is as follows:

Syntax Description
Parameter Description
(Optional) Displays CoS-to-DSCP map.
(Optional) Displays DSCP-to-CoS map.

2009 Cisco Systems, Inc. Congestion Management 5-123
The syntax for the show mls qos maps command on Catalyst 2960 Series switches running
IOS Software Release 12.2(46)SE is as follows:




Syntax Description
Parameter Description
(Optional) Displays CoS-to-DSCP map.
(Optional) Display the CoS input queue threshold map.
(Optional) Display the CoS output queue threshold map.
(Optional) Displays DSCP-to-CoS map.
(Optional) Display the DSCP input queue threshold map.


(Optional) Display the specified DSCP-to-DSCP-mutation map.
(Optional) Display the DSCP output queue threshold map.
(Optional) Display the IP-precedence-to-DSCP map.
(Optional) Display the policed-DSCP map.
(Optional) Display begins with the line that matches the
expression.
(Optional) Display excludes lines that match the expression.
(Optional) Display includes lines that match the specified
expression.
Expression in the output to use as a reference point.
5-124 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 23
Monitoring Queuing on
Catalyst 2950 Switches

Displays the mapping of the CoS priority queues.


Displays the WRR bandwidth allocation for the CoS priority queues.







The show wrr-queue bandwidth command is used to display the WRR bandwidth allocation
for the four CoS priority queues.
The show wrr-queue cos-map command is used to display the mapping of the CoS priority
queues.
2009 Cisco Systems, Inc. Congestion Management 5-125
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 24

Displays QoS information at the interface level.


Monitoring Queuing on
Catalyst 2950 Switches (Cont.)









Use the show mls qos interface command to display QoS information at the interface level.
Although it will be visible in command-line interface (CLI) help strings, the policers keyword
is available only when the Catalyst 2950 switch is running the enhanced software image.
The syntax for the show mls qos interface command is as follows:

Syntax Description
Parameter Description
(Optional) Displays QoS information for the specified interface.
(Optional) Displays all the policers configured on the interface,
their settings, and the number of policers unassigned. Available
only when the switch is running the EI software.
5-126 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 25

Displays QoS information at the interface level.


Monitoring Queuing on
Catalyst 2960 Switches
Displays the buffer allocation among the queues.



Displays the queuing strategy and the weights corresponding to the queues.
The egress expedite queue overrides the configured SRR weights.







To display QoS information at the interface level, use the show mls qos interface command.
To display the buffer allocation among the queues, use the buffer keyword with this command.
To display the queuing strategy and the weights corresponding to the queues, use the queueing
keyword with this command.
You can use the show running-config command to determine whether QoS is enabled and
whether the egress expedite queue is enabled or disabled.
The syntax for the show mls qos interface command on Catalyst 2960 Series switches running
Cisco IOS Software Release 12.2(46)SE is as follows:


2009 Cisco Systems, Inc. Congestion Management 5-127
Syntax Description
Parameter Description
(Optional) Displays QoS information for the specified port. Valid
interfaces include physical ports.
(Optional) Displays the buffer allocation among the queues.
(Optional) Displays the queueing strategy (shared or shaped) and
the weights corresponding to the queues.
(Optional) Displays statistics for sent and received Differentiated
Services Code Points (DSCPs) and class of service (CoS)
values, the number of packets enqueued or dropped per egress
queue, and the number of in-profile and out-of-profile packets for
each policer.
(Optional) Display begins with the line that matches the
expression.
(Optional) Display excludes lines that match the expression.
(Optional) Display includes lines that match the specified
expression.
Expression in the output to use as a reference point.
5-128 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 26
Summary
The number and capabilities of queues on Catalyst switches depend upon
the model of the switch, supervisor, and line cards.
With WRR, which prevents the low-priority queues from being neglected
during periods of high-priority traffic, different weights are assigned to each
queue. On most Catalyst switches, a single priority queue can be
configured with WRR to ensure priority dispatch of voice traffic.
Use the following commands to configure WRR with PQ on a Catalyst 2950
switch:
wrr-queue cos-map: To configure CoS-to-queue mappings for PQ
wrr-queue bandwidth: To assign weights to the four CoS priority
queues
WTD is used as the congestion-avoidance mechanism and SRR is used
as the scheduling service on Catalyst 2960 Series switches. WTD uses the
QoS label that is assigned to a frame to subject the frame to a threshold;
if the threshold is exceeded for that QoS label, the switch drops the frame.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 27
Summary (Cont.)
Use the following commands to configure WTD on a Catalyst 2960 switch:
mls qos srr-queue input cos-map and mls qos srr-queue output cos-map:
To map CoS values to queues and threshold IDs
mls qos srr-queue input threshold: To assign threshold percentages to
ingress queues
mls qos queue-set output threshold: To guarantee availability of buffers, set
thresholds, configure maximum allocation for egress queue sets
mls qos queue-set output buffers: To allocate buffers to egress queue-sets
queue-set: To map ports to queue sets
SRR, which controls the rate at which packets are sent, has two modes:
Shaped: Queues are guaranteed a percentage of bandwidth; queues cannot
utilize unused bandwidth allocated to other queues.
Shared: Queues share bandwidth according to configured weights; bandwidth
is guaranteed; queues can use unused bandwidth allocated to other queues.

2009 Cisco Systems, Inc. Congestion Management 5-129
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.35- 28
Summary (Cont.)
Use the following commands to configure SRR on a Catalyst 2960 switch:
mls qos srr-queue input priority-queue: To configure the ingress
priority queue and guarantee bandwidth on the internal ring if the ring is
congested.
mls qos srr-queue input bandwidth: To assign SRR weights to an
ingress queue.
srr-queue bandwidth share: To assign shared weights and enable
bandwidth sharing on the four egress queues mapped to a port.
srr-queue bandwidth shape: To assign the shaped weights and enable
bandwidth shaping on the four egress queues mapped to a port.
priority-queue out: To enable the egress expedite queue on a port.
The show mls qos maps command is used to display QoS mapping
information on Catalyst 2950 and 2960 switches.

5-130 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

2009 Cisco Systems, Inc. Congestion Management 5-131
Module Summary
This topic summarizes the key points discussed in this module.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.35-1
Module Summary
Congestion can occur at any point in the network, but particularly at
points of speed mismatches and traffic aggregation. Queuing algorithms
such as FIFO, priority, and round robin are used to manage congestion.
Each physical interface has a hardware and a software queuing system.
WFQwas developed to overcome the limitations of the more basic
queuing methods.
CBWFQextends the standard WFQ functionality to provide support for
user-defined traffic classes. LLQ extends the functionality of CBWFQ by
adding priority queues for time-sensitive traffic such as voice and video.
PQ, WRR, WRR with a PQ, and SRR are queuing methods used for
Catalyst switches.

Effective congestion management is key to QoS in converged networks. Low-latency traffic
such as voice and video must be constantly moved to high-priority queues in order to ensure
reasonable quality.
Cisco routers offer a variety of simple (FIFO, PQ, and CQ) and sophisticated (WFQ, CBWFQ,
and LLQ) queuing algorithms to provide effective congestion management on converged
networks. LLQ, the most sophisticated queuing algorithm, was specifically designed to provide
the highest QoS to voice traffic.
Cisco switches offer a variety of queuing capabilities, depending upon the model of switch
being used. Queuing methods available for use on Catalyst switches include PQ, WRR, WRR
with a priority queue, and SRR.
5-132 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
References
For additional information, refer to these resources:
To learn more about congestion and queuing, refer to Understanding Delay in Packet Voice
Networks at this URL:
http://www.cisco.com/en/US/tech/tk652/tk698/technologies_white_paper09186a00800a89
93.shtml
To learn more about congestion and queuing, refer to Understanding Jitter in Packet Voice
Networks (Cisco IOS Platforms) at this URL:
http://www.cisco.com/en/US/tech/tk652/tk698/technologies_tech_note09186a00800945df.
shtml
To learn more about configuring WFQ, refer to Configuring Weighted Fair Queueing at
this URL: http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/config_wfq.html
To learn more about queuing on the Cisco Catalyst 3550 Series switches, refer to
Configuring QoS at this URL:
http://www.cisco.com/en/US/docs/switches/lan/catalyst3550/software/release/12.2_44_se/
configuration/guide/swqos.html
To learn more about queuing on the Cisco Catalyst 2950 Series switches, refer to
Configuring QoS at this URL:
http://www.cisco.com/en/US/docs/switches/lan/catalyst2950/software/release/12.1_22_ea5/
configuration/guide/swqos.html
To learn more about queuing on the Cisco Catalyst 2960 Series switches, refer to
Configuring QoS at this URL:
http://www.cisco.com/en/US/docs/switches/lan/catalyst2960/software/release/12.2_50_se/
configuration/guide/swqos.html
To learn more about queuing on the Cisco Catalyst 4500 Series switches, refer to
Configuring QoS at this URL:
http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.1/12ew/configuration/
guide/qos.html
To learn more about queuing on the Cisco Catalyst 6000 Series switches, refer to
Configuring QoS at this URL:
http://www.cisco.com/en/US/tech/tk543/tk762/technologies_white_paper09186a00800b08
28.shtml
2009 Cisco Systems, Inc. Congestion Management 5-133
Module Self-Check
Use the questions here to review what you learned in this module. The correct answers and
solutions are found in the Module Self-Check Answer Key.
Q1) What happens when the highest-priority queue becomes congested in a priority queuing
algorithm? (Source: Introducing Queuing)
A) All the other queues starve.
B) Tail dropping focuses on the highest-priority queue.
C) Other queues are served on a round-robin basis.
D) Packets in the highest-priority queue are moved to a lower-priority queue.
Q2) In WRR implementation, using a byte threshold as a measurement of each queue share
of bandwidth, given an MTU of 2000 and a byte-count of 4000, what would the router
do with the next packet for queue 2 (800 bytes) if the router had just dispatched two
packets from queue 2 (sizes 2000 and 1600) to the hardware queue? (Source:
Introducing Queuing)
A) tail drop the next packet
B) dispatch the first packet from the next queue
C) dispatch the next packet to the hardware queue
D) split the packet and transmit the first 400 bytes
Q3) Given that the hardware queue is not full, how will the next packet be serviced by the
software queue? (Source: Understanding Queuing Implementations)
A) software queue will be bypassed
B) software queue will enqueue the packet
C) software queue will expedite the packet
D) software queue will only meter the packet
Q4) How does WFQ implement tail dropping? (Source: Configuring FIFO and WFQ)
A) drops the last packet to arrive
B) drops all nonvoice packets first
C) drops the lowest-priority packets first
D) drops packets from the most aggressive flows
Q5) Consider that a WFQ system has a modest hold-queue limit of ten (HQO = 10) and a
congestive discard threshold of eight (CDT = 8), and that there are already eight
packets in the system. If a newly arriving packet had the worst finish time of all packets
in the system, what would happen to the packet? (Source: Configuring FIFO and WFQ)
A) It would be dropped.
B) It would be enqueued.
C) It would be buffered until a spot in a queue came open.
D) It would be dispatched.
Q6) Which of the following is the default dropping scheme for CBWFQ? (Source:
Configuring CBWFQ and LLQ)
A) RED
B) WRED
C) tail drop
D) class-based policing
5-134 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Q7) What does LLQ bring to CBWFQ? (Source: Configuring CBWFQ and LLQ)
A) strict priority scheduling
B) alternate priority scheduling
C) non-policed queues for low-latency traffic
D) special voice traffic classification and dispatch
Q8) Which type of traffic should you limit the use of the priority command to? (Source:
Configuring CBWFQ and LLQ)
A) critical data traffic
B) voice traffic
C) bursty traffic
D) video and teleconferencing, available (ABR) traffic
Q9) When WRR with an expedite queue has been configured on a Cisco Catalyst 2950
switch, which queue is emptied before any other queues are serviced? (Source:
Configuring LAN Congestion Management)
A) queue 1
B) queue 2
C) queue 3
D) queue 4
2009 Cisco Systems, Inc. Congestion Management 5-135
Module Self-Check Answer Key
Q1) A
Q2) C
Q3) A
Q4) D
Q5) A
Q6) C
Q7) A
Q8) B
Q9) D
5-136 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Module 6
Congestion Avoidance
Overview
Congestion is a normal occurrence in networks. Whether congestion occurs as a result of a lack
of buffer space, network aggregation points, or a low-speed wide-area link, many congestion
management techniques exist to ensure that specific applications and traffic classes are given
their share of available bandwidth when congestion occurs. Congestion management does,
however, come at a price. When congestion occurs, some traffic is delayed or even dropped at
the expense of other traffic. When drops occur, different problems may arise which can
exacerbate the congestion, such as retransmissions and TCP global synchronization in TCP/IP
networks. Network administrators can use congestion avoidance mechanisms to reduce the
negative effects of congestion by penalizing the most aggressive traffic streams as software
queues begin to fill. This module describes the problems with TCP congestion management and
the benefits of deploying congestion avoidance mechanisms in a network.
Module Objectives
Upon completing this module, you will be able to use Cisco quality of service (QoS)
congestion avoidance mechanisms to reduce the effects of congestion on the network. This
ability includes being able to meet these objectives:
Explain the problems that may result from the limitations of TCP congestion management
mechanisms on a converged network
Explain how RED can be used to avoid congestion
Configure CBWRED to avoid congestion
Configure ECN to enhance the congestion avoidance features of WRED
6-2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 1
Introducing Congestion
Avoidance
Overview
TCP supports traffic management mechanisms such as slow start and fast retransmit. When
congestion occurs, tail-dropping the TCP traffic can cause TCP global synchronization,
resulting in poor bandwidth use. This lesson describes how TCP manages the traffic flow
between two hosts, and the effects of tail-dropping on TCP traffic.
Objectives
Upon completing this lesson, you will be able to explain the problems that may result from the
limitations of TCP congestion management mechanisms on a converged network. This ability
includes being able to meet these objectives:
Explain the behavior of TCP senders and receivers when sending packets
Explain how TCP responds to congestion
Describe the default mechanism for managing interface congestion with tail drop
Describe the limitations of using tail drop as a congestion management mechanism
6-4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Behavior of TCP Senders and Receivers
This topic describes the behavior of TCP senders and receivers when sending packets.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-2
Behavior of a TCP Sender
Sender sends N bytes
(as much as credit allows).
Start credit (window size) is small
To avoid overloading network queues
Increases credit exponentially
To gauge network capability

Before any data is transmitted using TCP, a connection must first be established between the
transmitting and receiving hosts. When the connection is initially established, the two hosts
must agree on certain parameters that will be used during the communication session. One of
the parameters that must be decided is called the window size, or how many data bytes to
transmit at a time. Initially, TCP sends a small number of data bytes, and then exponentially
increases the number sent. For example, a TCP session originating from host A begins with a
window size of 1 and therefore sends one packet. When host A receives a positive ACK from
the receiver, Host A increases its window size to 2. Host A then sends 2 packets, receives a
positive ACK, and increases its window size to 4, and so on.
Note TCP tracks window size by byte count. For purposes of illustration packets, N is used.
In traditional TCP, the maximum window size is 64 KB (65,535 bytes). Extensions to TCP,
specified in RFC 1323, allow for tuning TCP by extending the maximum TCP window size to
2
30
bytes. TCP extensions for high performance, although supported on most operating systems,
may not be supported on your system.
2009 Cisco Systems, Inc. Congestion Avoidance 6-5
Example: Windowing in TCP
After connecting to a website, a file transfer using the FTP download is initiated. Watching the
progress of the transfer, the bytes-per-second counter steadily increases during the file transfer.
This is an example of TCP windowing in action.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-3
Behavior of a TCP Receiver
Receiver schedules an ACK on receipt
of next message.
TCP acknowledges the next segment it
expects to receive, not the last segment
it received.
In the example, N+1 is blocked, so
the receiver keeps acknowledging
N+1 (the next segment it expects to
receive).

When the receiver receives a data segment, the receiver checks that data segment sequence
number (byte count). If the data received fills in the next sequence of numbers expected, the
receiver indicates that the data segment was received in order. The receiver then delivers all the
data that it holds to the target application, and updates the sequence number to reflect the next
byte number in expected order.
When this process is complete, the receiver performs one of these actions:
Immediately transmits an acknowledgment (ACK) to the sender
Schedules an ACK to be transmitted to the sender after a short delay
The ACK notifies the sender that the receiver received all data segments up to but not including
the byte number in the new sequence number. Receivers usually try to send an ACK in
response to alternating data segments they receive. They send the ACK because, for many
applications, if the receiver waits out a small delay, it can efficiently piggyback its reply
acknowledgment on a normal response to the sender. However, when the receiver receives a
data segment out of order, it immediately responds with an ACK to direct the sender to
retransmit the lost data segment.
6-6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Congestion and TCP
This topic describes the TCP response to congestion.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-4
TCP Slow Start
If ACK acknowledges something:
Updates credit and sends.
If not, presumes it indicates a lost packet:
Sends first unacknowledged message
right away.
Halves current credit (slows down).
Increases slowly to gauge network
throughput.

When the sender receives an ACK, the sender determines if any data is outstanding:
If no data is outstanding, the sender determines that the ACK is a keepalive, meant to keep
the line active, and it does nothing.
If data is outstanding, the sender determines whether the ACK indicates that the receiver
has received some or none of the data.
If the ACK acknowledges receipt of some data sent, the sender determines if new
credit has been granted to allow it to send more data.
When the ACK acknowledges receipt of none of the sent data and there is
outstanding data, the sender interprets the ACK to be a repeatedly sent ACK. This
condition indicates that some data was received out of order, forcing the receiver to
remit the first ACK, and that a second data segment was received out of order,
forcing the receiver to remit the second ACK. In most cases, the receiver would
receive two segments out of order, because one of the data segments had been
dropped.
2009 Cisco Systems, Inc. Congestion Avoidance 6-7
When a TCP sender detects a dropped data segment, it retransmits the segment. Then the
sender slows its transmission rate so that the rate is half of what it was before the drop was
detected. This is known as the TCP slow-start mechanism. In the figure, a station transmits
three packets to the receiving station. Unfortunately, the first packet is dropped somewhere in
the network. Therefore the receiver sends an ACK 1, to request the missing packet. Because the
transmitter does not know if the ACK was just a duplicate ACK, it will wait for three ACK 1
packets from the receiver. Upon receipt of the third ACK, the missing packet, packet 1, is
resent to the receiver. The receiver now sends an ACK 4 indicating that it has already received
packets 2 and 3 and is ready for the next packet.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-5
Multiple Drops in TCP
If multiple drops occur in the same session:
Current TCPs wait for timeout.
Selective acknowledge may be a
workaround.
New fast retransmit phase takes
several round-trip times to recover.

Although the TCP slow-start behavior is appropriately responsive to congestion, problems can
arise when multiple TCP sessions are concurrently carried on the same router and all TCP
senders slow down transmission of packets at the same time.
If a TCP sender does not receive acknowledgement for sent segments, it cannot wait
indefinitely before it assumes that the data segment that was sent never arrived at the receiver.
TCP senders maintain the retransmission timer to trigger a segment retransmission. The
retransmission timer can impact TCP performance. If the retransmission timer is too short,
duplicate data will be sent into the network unnecessarily. If the retransmission timer is too
long, the sender will wait (remain idle) for too long, slowing down the flow of data.
The selective acknowledgment (SACK) mechanism, as proposed in RFC 2018, can improve the
time it takes for the sender to recover from multiple packet losses, because noncontiguous
blocks of data can be acknowledged, and the sender only has to retransmit data that is actually
lost. SACK is used to convey extended acknowledgement information from the receiver to the
sender to inform the sender of noncontiguous blocks of data that have been received. Using the
example in the slide, instead of sending back an ACK N + 1, the receiver can send a SACK N +
1 and also indicate back to the sender that N + 3 has been correctly received with the SACK
option.
6-8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
In standard TCP implementations, a TCP sender can only discover that a single packet has been
lost each round-trip time (RTT), causing poor TCP performance when multiple packets are lost.
Remember, the sender must receive three duplicate ACK packets before it realizes that a packet
has been lost. As a result of receiving the third ACK, the sender will immediately send the
segment referred to by the ACK. This TCP behavior is called fast retransmit.
2009 Cisco Systems, Inc. Congestion Avoidance 6-9
Managing Interface Congestion with Tail Drop
This topic describes the default mechanism for managing interface congestion with tail drop.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-6
Managing Interface Congestion
with Tail Drop
Router interfaces experience congestion when the output queue is full:
Additional incoming packets are tail-dropped.
Dropped packets may cause significant application performance
degradation.
Tail drop has significant drawbacks.

When an interface on a router cannot transmit a packet immediately, the packet is queued,
either in an interface transmit (Tx) ring, or the interface output hold queue, depending on the
switching path that is used. Packets are then taken out of the queue and eventually transmitted
on the interface.
If the arrival rate of packets to the output interface exceeds the router capability to buffer and
forward traffic, the queues increase to their maximum length and the interface becomes
congested. Tail drop is the default queuing response to congestion. Tail drop treats all traffic
equally and does not differentiate between classes of service. Applications may suffer
performance degradation due to packet loss caused by tail drop. When the output queue is full
and tail drop is in effect, all packets trying to enter (at the tail of) the queue are dropped until
the congestion is eliminated and the queue is no longer full.
Weighted fair queuing (WFQ), if configured on an interface, has a more elaborate scheme for
dropping traffic. It is able to punish the most aggressive flows via its congestive discard
threshold (CDT)-based dropping algorithm. Unfortunately, WFQ does not scale to backbone
speeds.
6-10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Tail Drop Limitations
This topic describes the limitations of using tail drop as a congestion management mechanism.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-7
Tail Drop Limitations
Tail drop should be avoided because it contains significant flaws:
TCP synchronization
TCP starvation
No differentiated drop

The simple tail-drop scheme does not work well in environments with a large number of TCP
flows or in environments in which selective dropping is required. Understanding the network
interaction between TCP stack intelligence and dropping is required to implement a more
efficient and fair dropping scheme, especially in service provider environments.
Tail drop has the following shortcomings:
When congestion occurs, dropping affects most of the TCP sessions, which simultaneously
back off and then restart again. This causes inefficient link utilization at the congestion
point (TCP global synchronization).
TCP starvation, in which all buffers are temporarily seized by aggressive flows, and normal
TCP flows experience buffer starvation.
There is no differentiated drop mechanism, and therefore premium traffic is dropped in the
same way as best-effort traffic.
2009 Cisco Systems, Inc. Congestion Avoidance 6-11
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-8
TCP Synchronization
Multiple TCP sessions start at different times.
TCP window sizes are increased.
Tail drops cause many packets of many sessions to be dropped
at the same time.
TCP sessions restart at the same time (synchronized).

A router can handle multiple concurrent TCP sessions. It is likely that when traffic exceeds the
queue limit, it exceeds this limit due to the bursty nature of packet networks. However, there is
also a high probability that excessive traffic depth caused by packet bursts are temporary and
that traffic does not stay excessively deep except at points where traffic flows merge, or at edge
routers.
If the receiving router drops all traffic that exceeds the queue limit, as is done with tail drop by
default, many TCP sessions simultaneously go into slow start. Consequently, traffic
temporarily slows down to the extreme and then all flows slow-start again. This activity creates
a condition called global synchronization.
Global synchronization occurs as waves of congestion crest only to be followed by troughs
during which the transmission link is not fully used. Global synchronization of TCP hosts can
occur because packets are dropped all at once. Global synchronization occurs when multiple
TCP hosts reduce their transmission rates in response to packet dropping. When congestion is
reduced, their transmission rates are increased. The most important point is that the waves of
transmission known as global synchronization result in significant link underutilization.
6-12 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-9
TCP Delay, Jitter, and Starvation
Constant high buffer usage (long queue) causes delay.
More aggressive flows can cause other flows to starve.
No differentiated dropping occurs.

During periods of congestion, packets are queued up to the full queue length, which also causes
increased delay for packets that are already in the queue. In addition, queuing introduces
unequal delays for packets of the same flow, thus producing jitter.
Another TCP-related phenomenon that reduces optimal throughput of network applications is
TCP starvation. When multiple flows are established over a router, some of these flows may be
much more aggressive than other flows. For instance, when a file transfer application TCP
transmit window increases, the TCP session can send a number of large packets to its
destination. The packets immediately fill the queue on the router, and other, less aggressive
flows can be starved because there is no differentiated treatment indicating which packets
should be dropped. As a result, these less aggressive flows are tail-dropped at the output
interface.
Based on the knowledge of TCP behavior during periods of congestion, you can conclude that
tail drop is not the optimal mechanism for congestion avoidance and therefore should not be
used. Instead, more intelligent congestion avoidance mechanisms should be used that slow
down traffic before actual congestion occurs.
2009 Cisco Systems, Inc. Congestion Avoidance 6-13
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 10
Summary
TCP sender sends as many bytes as credit allows. TCP receiver
acknowledges the next segment it expects to receive.
TCP uses windowing and the TCP slow-start mechanism as its
means of controlling congestion.
By default, routers resort to tail drop, relying on TCP congestion
controls when queues become full.
Tail drop causes significant issues including TCP synchronization,
starvation, and delay. TCP synchronization decreases the
average utilization of network links.

6-14 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 2
Introducing RED
Overview
Congestion avoidance techniques monitor network traffic loads in an effort to anticipate and
avoid congestion at common network bottleneck points. Congestion avoidance is achieved
through packet dropping using a more complex dropping technique than simple tail drop.
This lesson describes the congestion avoidance technique random early detection (RED) and its
scalable dropping method, which is suitable for low- and high-speed networks.
Objectives
Upon completing this lesson, you will be able to explain how RED can be used to avoid
congestion. This ability includes being able to meet these objectives:
Describe RED and how it can be used to prevent congestion
Describe the elements of a RED traffic profile used to implement the RED packet-dropping
strategy
Describe the different packet drop modes of RED
Describe the effects of using RED on TCP traffic by comparing TCP traffic flows both
before and after the application of RED
Identify the points in a network where congestion avoidance mechanisms are commonly
deployed in enterprise and service provider networks
6-16 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Random Early Detection
This topic describes RED and how it can be used to prevent congestion.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-2
Random Early Detection
Tail drop can be avoided if congestion is prevented.
RED is a mechanism that randomly drops packets before a queue
is full.
RED increases drop rate as the average queue size increases.
RED result:
TCP sessions slow down to the approximate rate of output-link
bandwidth.
Average queue size is small (much less than the maximum
queue size).
TCP sessions are desynchronized by random drops.

RED is a dropping mechanism that randomly drops packets before a queue is full. The
dropping strategy is based primarily on the average queue lengththat is, when the average
size of the queue increases, RED will be more likely to drop an incoming packet than when the
average queue length is shorter.
Because RED drops packets randomly, it has no per-flow intelligence. The rationale is that an
aggressive flow will represent most of the arriving traffic and therefore it is likely that RED
will drop a packet of an aggressive session. RED therefore punishes more aggressive sessions
with higher statistical probability and is, therefore, able to somewhat selectively slow down the
most significant cause of congestion. Directing one TCP session at a time to slow down allows
for full utilization of the bandwidth, rather than utilization that manifests itself as crests and
troughs of traffic.
As a result of implementing RED, the problem of TCP global synchronization is much less
likely to occur, and TCP can utilize link bandwidth more efficiently. In RED implementations,
the average queue size also decreases significantly, as the possibility of the queue filling up is
reduced. This is because of very aggressive dropping in the event of traffic bursts, when the
queue is already quite full.
RED distributes losses over time and normally maintains a low queue depth while absorbing
traffic spikes. RED can also utilize IP precedence or differentiated services code points
(DSCPs) to establish different drop profiles for different classes of traffic, in which case it is
referred to as weighted random early detect (WRED) or DSCP-based WRED, respectively.
2009 Cisco Systems, Inc. Congestion Avoidance 6-17
RED Profiles
This topic describes the elements of a RED traffic profile used to implement the RED packet-
dropping strategy.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-3
RED Profiles

A RED traffic profile is used to determine the packet-dropping strategy and is based on the
average queue length. The probability of a packet being dropped is based on three configurable
parameters contained within the RED profile:
Minimum threshold: When the average queue length is equal or above the minimum
threshold, RED starts dropping packets. The rate of packet drop increases linearly as the
average queue size increases, until the average queue size reaches the maximum threshold.
Maximum threshold: When the average queue size is above the maximum threshold, all
packets are dropped.
Mark probability denominator: This is the fraction of packets that are dropped when the
average queue depth is at the maximum threshold. For example, if the denominator is 512,
one out of every 512 packets is dropped when the average queue is at the maximum
threshold. The linear increase of packet drops from the minimum threshold (0 drops) to the
maximum threshold is based on this parameter and the queue size between the minimum
and maximum thresholds.
The minimum threshold value should be set high enough to maximize the link utilization. If the
minimum threshold is too low, packets may be dropped unnecessarily, and the transmission
link will not be fully used.
The difference between the maximum threshold and the minimum threshold should be large
enough to avoid global synchronization. If the difference is too small, many packets may be
dropped at once, resulting in global synchronization.
6-18 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
The mark probability has the effect of controlling the number of packets that are dropped when
the average queue length reaches the maximum threshold. If the value is set too low, it will
result in too many dropped packets. If the value is set too large, RED dropping can be rendered
ineffective.
2009 Cisco Systems, Inc. Congestion Avoidance 6-19
RED Modes
This topic describes the different packet-drop modes of RED.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-4
RED Modes
RED has three modes:
No drop: When the average queue size is between 0 and the
minimum threshold.
Random drop: When the average queue size is between the
minimum and the maximum threshold.
Full drop (tail drop): When the average queue size is at
maximum threshold or above.
Random drop should prevent congestion (prevent tail drops).

Based on the average queue size, RED has three dropping modes:
When the average queue size is between 0 and the configured minimum threshold, no drops
occur and all packets are queued.
When the average queue size is between the configured minimum threshold and the
configured maximum threshold, random drops occur, which is linearly proportional to the
mark probability denominator and the average queue length.
When the average queue size is at or higher than the maximum threshold, RED performs
full (tail) drop in the queue. This is unlikely, as RED should slow down TCP traffic ahead
of congestion. If a lot of non-TCP traffic is present, RED cannot effectively drop traffic to
reduce congestion, and tail drops are likely to occur.
6-20 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
TCP Traffic Before and After RED
This topic describes the effects of using RED on TCP traffic by comparing TCP traffic flows
both before and after the application of RED.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-5
TCP Traffic Before RED
TCP synchronization prevents average link utilization close to the
link bandwidth.
Tail drops cause TCP sessions to go into slow-start.

The figure shows TCP throughput behavior compared to link bandwidth in a congested network
scenario where the tail-drop mechanism is in use on a router. The global synchronization
phenomenon causes all sessions to slow down when congestion occurs. All sessions are
penalized when tail drop is used because it drops packets with no discrimination between
individual flows.
When all sessions slow down, congestion on the router interface is removed and all TCP
sessions restart their transmission at roughly the same time. Again, the router interface quickly
becomes congested, causing tail drop. As a result, all TCP sessions back off again. This
behavior cycles constantly, resulting in a link that is generally underutilized.
2009 Cisco Systems, Inc. Congestion Avoidance 6-21
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-6
TCP Traffic After RED
Average link utilization is much closer to link bandwidth.
Random drops cause TCP sessions to reduce window sizes.

This figure shows TCP throughput behavior compared to link bandwidth in a congested
network scenario in which RED has been configured on a router. RED randomly drops packets,
influencing a small number of sessions at a time, before the interface reaches congestion.
Overall throughput of sessions is increased, as well as average link utilization. Global
synchronization is very unlikely to occur, due to selective, but random, dropping of adaptive
traffic.
6-22 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Applying Congestion Avoidance
This topic describes the points in a network where congestion avoidance mechanisms are
commonly deployed in enterprise and service provider networks.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-7
Applying Congestion Avoidance

RED is most useful in enterprise and service provider networks on output interfaces where
congestion is expected to occur. Edge routers or switches typically classify and mark packets as
the packets enter the network. Congestion avoidance mechanisms can use these packet
markings to indicate a set of drop criteria for a traffic stream.
Congestion avoidance mechanisms are also applicable to the campus or LAN environment. In
these networks, congestion avoidance is best used on interfaces that connect to WAN gateways,
because these interfaces are typically sites for congestion to occur.
2009 Cisco Systems, Inc. Congestion Avoidance 6-23
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-8
Summary
RED is a mechanism that randomly drops packets before a queue
is full, preventing congestion and avoiding tail drop.
RED operates by increasing the rate at which packets are
dropped from queues as the average queue size increases.
RED has three modes of operation: no drop, random drop, and
full drop (tail drop).
With RED, TCP global synchronization is eliminated and the
average link utilization increases.
RED is most useful in enterprise and service provider networks
on output interfaces where congestion is expected to occur. Edge
routers or switches typically classify and mark packets as they
enter the network.


6-24 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 3
Configuring Class-Based
Weighted RED
Overview
Congestion avoidance techniques monitor network traffic loads in an effort to anticipate and
avoid congestion at common network bottleneck points using advanced packet discard
techniques.
This lesson describes the weighted random early detection (WRED) congestion avoidance
technique, which is the Cisco implementation of random early detection (RED).
Objectives
Upon completing this lesson, you will be able to configure class-based weighted random early
detection (CBWRED) to avoid congestion. This ability includes being able to meet these
objectives:
Describe WRED and how it can be used to prevent congestion
Describe the traffic profiles used in WRED implementations
Identify the Cisco IOS commands required to configure CBWRED
Identify the Cisco IOS commands required to configure DSCP-based CBWRED
Identify the Cisco IOS commands used to monitor CBWRED
6-26 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Weighted Random Early Detection
This topic describes WRED and how you can use it to prevent congestion.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-2
Weighted Random Early Detection
WRED can use multiple different RED profiles.
Each profile is identified by:
Minimum threshold
Maximum threshold
Maximum drop probability
WRED profile selection is based on:
IP precedence (8 profiles)
DSCP (64 profiles)
WRED drops less important packets more aggressively than more
important packets.
WRED can be applied at the interface, VC, or class level.

WRED combines RED with IP precedence or differentiated services code point (DSCP) and
performs packet dropping based on IP precedence (WRED) or DSCP (DSCP-based WRED).
As with RED, WRED monitors the average queue length in the router and determines when to
begin discarding packets based on the length of the interface queue. When the average queue
length is greater than the user-specified minimum threshold, WRED begins to randomly drop
packets (both TCP and User Datagram Protocol [UDP] packets) with a certain probability. If
the average length of the queue continues to increase so that it becomes larger than the user-
specified maximum threshold, WRED reverts to a tail-drop packet discard strategy, in which all
incoming packets may be dropped.
The idea behind using WRED is to maintain the queue length at a level somewhere between the
minimum and maximum thresholds, and to implement different drop policies for different
classes of traffic. WRED can selectively discard lower-priority traffic when the interface
becomes congested, and can provide differentiated performance characteristics for different
classes of service. You can also configure WRED to achieve nonweighted RED behavior.
For interfaces configured to use the Resource Reservation Protocol (RSVP), WRED chooses
packets from other flows to drop rather than the RSVP flows. Also, IP precedence or DSCP
governs which packets are dropped, because traffic at a lower priority has a higher drop rate
than traffic at a higher priority (and, therefore, lower priority is more likely to be slowed). In
addition, WRED statistically drops more packets from large users than small users. Therefore,
traffic sources that generate the most traffic are more likely to be slowed down than traffic
sources that generate little traffic.
2009 Cisco Systems, Inc. Congestion Avoidance 6-27
WRED reduces the chances of tail drop by selectively dropping packets when the output
interface begins to show signs of congestion. By dropping some packets early rather than
waiting until the queue is full, WRED avoids dropping large numbers of packets at once and
minimizes the chances of global synchronization. As a result, WRED maximizes the utilization
of transmission lines.
WRED is only useful when the bulk of the traffic is TCP traffic. With TCP, dropped packets
indicate congestion, so the packet source reduces its transmission rate. With other protocols,
packet sources might not respond or might re-send dropped packets at the same rate, and so
dropping packets might not decrease congestion.
WRED treats non-IP traffic as precedence 0, the lowest precedence. Therefore, non-IP traffic,
in general, is more likely to be dropped than IP traffic.
WRED should be used wherever there is a potential bottleneck, or congested linkthis could
possibly be an access or edge link. However, WRED is normally used in the core routers of a
network rather than at the network edge. Edge routers assign IP precedence or DSCP to packets
as they enter the network. WRED uses these assigned values to determine how to treat different
types of traffic.
WRED is not recommended for any voice queue, although WRED may be enabled on an
interface carrying voice traffic. WRED will not throttle back voice traffic because voice traffic
is UDP-based. The network itself should be designed not to lose voice packets because lost
voice packets result in reduced voice quality. WRED controls congestion by impacting
prioritized traffic other than voice, and avoiding congestion helps to ensure voice quality.
6-28 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-3
Class-Based WRED
Class-based WRED is available when configured in combination
with CBWFQ only.
Using CBWFQ with WRED allows the implementation of DiffServ
Assured Forwarding PHB.
Class-based configuration of WRED is identical to standalone
WRED.

Congestion avoidance techniques monitor the network interface load in an effort to anticipate
and avoid congestion at common network bottlenecks. Congestion avoidance is achieved
through intelligent packet dropping techniques. Traditionally, Cisco IOS Software used
standalone RED and WRED mechanisms to avoid congestion on an interface. Those
mechanisms can perform a differentiated drop based on the IP precedence or DSCP value.
The class-based weighted fair queuing (CBWFQ) system supports the use of WRED inside the
queuing system, thereby implementing CBWRED. Each class is queued in its separate queue
and has a queue limit, performing tail drop by default. WRED can be configured as the
preferred dropping method in a queue, implementing a differentiated drop based on traffic
class, and further, on the IP precedence or DSCP value.
Note The combination of CBWFQ and WRED on a single device is currently the only way to
implement the DiffServ Assured Forwarding per-hop behavior (AF PHB) using Cisco IOS
Software.
2009 Cisco Systems, Inc. Congestion Avoidance 6-29
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-4
WRED Building Blocks

The figure shows how WRED is implemented, and the parameters that are used by WRED to
influence packet-drop decisions.
The router constantly updates the WRED algorithm with the calculated average queue length,
which is based on the recent history of queue lengths.
Configured in the traffic profile are the parameters that define the drop characteristics used by
WRED (minimum threshold, maximum threshold, and mark probability denominator). These
parameters define the WRED probability slopes.
When a packet arrives at the output queue, the IP precedence or DSCP value is used to select
the correct WRED profile for the packet. The packet is then passed to WRED for processing.
Based on the selected traffic profile and the average queue length, WRED calculates the
probability for dropping the current packet and either drops the packet or passes it to the output
queue.
If the queue is already full, the packet is tail-dropped. Otherwise, the packet will eventually be
transmitted out onto the interface. If the average queue length is greater than the minimum
threshold but less than the maximum threshold, based on the drop probability, WRED will
either queue the packet or perform a random drop.
6-30 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
WRED Profiles
This topic describes the different traffic profiles that are used in WRED implementations.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-5
WRED Profiles
WRED profiles can be manually set.
WRED has 8 default value sets for precedence-based WRED.
WRED has 64 default value sets for DSCP-based WRED.

This figure shows two different WRED profiles that are used for traffic of two different QoS
classes (BE class and Premium class).
The BE traffic class has a much lower minimum (10) and maximum threshold (30). As a result,
traffic belonging to the BE class will be dropped much earlier and more aggressively than
traffic from the Premium class. When heavy congestion occurs, traffic belonging to the BE
class will ultimately be tail dropped.
The Premium traffic class has been configured with higher minimum (20) and maximum
thresholds (40). Therefore packet drop as a result of congestion will occur later (longer average
queue size) and is less likely, compared to the BE class. The differences in these traffic profiles,
as defined in the figure, maintain differentiated levels of service in the event of congestion.
To avoid the need for setting all WRED parameters in a router, 8 default values are already
defined for precedence-based WRED, and 64 DiffServ aligned values are defined for DSCP-
based WRED. Therefore, the default settings should suffice in the vast majority of
deployments.
By default, the maximum threshold for all DSCP values is 40. The default mark probability
denominator for all DSCP values is 10.
2009 Cisco Systems, Inc. Congestion Avoidance 6-31
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-6
IP Precedence and Class Selector
Profiles

A PHB is the externally observable forwarding behavior applied at a DiffServ-compliant node
to a DiffServ behavior aggregate (BA). With the ability of the system to mark packets
according to DSCP setting, collections of packets (each with the same DSCP setting and sent in
a particular direction) can be grouped into a DiffServ BA. Packets from multiple sources or
applications can belong to the same DiffServ BA.
The class selector BA is used for backward compatibility with non-DiffServ-compliant devices
(RFC 1812-compliant devices and, optionally, RFC 791-compliant devices). Therefore, the
class selector range of DSCP values is used for backward compatibility with IP precedence.
The same WRED profiles are applied to equal IP precedence and class selector values:
IP Precedence and Class Selector Profiles
IP Precedence DSCP (Class
Selector)
Default Minimum
Threshold
0 (000) Default (0) 20
1 (001) CS1 (8) (001000) 22
2 (010) CS2 (16) (010000) 24
3 (011) CS3 (24) (011000) 26
4 (100) CS4 (32) (100000) 28
5 (101) CS5 (40) (101000) 30
6 (110) CS6 (48) (110000) 32
7 (111) CS7 (56) (111000) 34
RSVP RSVP 37
6-32 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-7
DSCP-Based WRED
(Expedited Forwarding)

In DSCP, the Expedited Forwarding (EF) PHB is identified based on these parameters:
Ensures a minimum departure rate to provide the lowest possible delay to delay-sensitive
applications
Guarantees bandwidth to prevent starvation of the application if there are multiple
applications using EF PHB
Polices bandwidth to prevent starvation of other applications or classes that are not using
this PHB
Packets requiring EF should be marked with DSCP binary value 101110 (46 or 0x2E).
For the EF DiffServ traffic class, Cisco IOS DSCP-based WRED configures itself by default so
that the minimum threshold is very high, increasing the probability of no drops being applied to
that traffic class. It is expected that EF traffic will be dropped very late, compared to other
traffic classes, and the EF traffic is therefore prioritized in the event of congestion.
Expedited Forwarding Profile
DSCP (Six Bits) Default Minimum Threshold
EF (101110) 36
2009 Cisco Systems, Inc. Congestion Avoidance 6-33
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-8
DSCP-Based WRED
(Assured Forwarding)

In DSCP, the Assured Forwarding (AF) PHB is identified based on these parameters:
Guarantees a certain amount of bandwidth to an AF class.
Allows access to extra bandwidth, if available.
Packets requiring AF PHB should be marked with DSCP value aaadd0 where aaa is the
number of the class and dd is the drop preference of the traffic class.
There are four defined AF classes. Each class should be treated independently and have
bandwidth allocated that is based on the QoS policy. For each AF DiffServ traffic class, Cisco
IOS DSCP-based WRED configures itself by default for three different profiles, depending on
the drop preference bits. All AF classes are initially marked with Drop Preference 1 (lowest
drop preference), but in transit they may be marked down by policers to Drop Preference 2 or
Drop Preference 3, depending if they are exceeding or violating administratively defined traffic
rates.
6-34 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Assured Forwarding Profiles
Assured Forwarding
Class
Drop Probability (AF Class) DSCP Default Minimum
Threshold
AF Class 1 Low Drop Prob (AF11) 001010 32
Medium Drop Prob (AF12) 001100 28
High Drop Prob (AF13) 001110 24
AF Class 2 Low Drop Prob (AF21) 010010 32
Medium Drop Prob (AF22) 010100 28
High Drop Prob (AF23) 010110 24
AF Class 3 Low Drop Prob (AF31) 011010 32
Medium Drop Prob (AF32) 011100 28
High Drop Prob (AF33) 011110 24
AF Class 4 Low Drop Prob (AF41) 100010 32
Medium Drop Prob (AF42) 100100 28
High Drop Prob (AF43) 100110 24
2009 Cisco Systems, Inc. Congestion Avoidance 6-35
Configuring CBWRED
This topic describes the Cisco IOS commands that are required to configure CBWRED.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-9
Configuring CBWRED

1. Create class map: Used for matching packets to a specified class.


2. Create policy map (service policy): Specifies a traffic policy that can
be attached to one or more interfaces.

3. Attach service policy: Associates the policy map to an output


interface or VC.

To configure CBWRED (WRED at the class level with CBWFQ), configure the DSCP-based
and precedent-based arguments within MQC. Specific CBWRED configuration arguments are
applied within a policy map. You can then apply the policy map configuration wherever policy
maps are attached (for example, at the interface level, the per-virtual circuit [VC] level, or the
shaper level).
The syntax shown in the figure for the class-map, policy-map, and service-policy commands
is compatible with the syntax for those commands in Cisco IOS Software Release 12.4;
however, command options may vary by router platform. For the exact command syntax for
your router platform and software version, refer to the appropriate command reference on
Cisco.com.
Note The WRED commands shown in this lesson apply to both IPv4 and IPv6 with no changes.
6-36 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 10
Configuring CBWRED (Cont.)
Enables IP precedence-based WRED in the selected class within
the service policy configuration mode.
Default service profile is used.
Command can be used at the interface, per-VC
(with random-detect-group), or the class level (service-policy).
Precedence-based WRED is the default mode.
WRED treats non-IP traffic as precedence 0.


Use the random-detect command to enable WRED on an interface. By default, WRED is
precedence-based and uses eight default WRED profiles, one for each value of IP precedence.
Within the CBWFQ system, WRED is used to perform per-queue dropping within the class
queues. Therefore, each class queue has its own WRED method, which can be further weighed
based on the IP precedence or DSCP value. Each queue can therefore be configured with a
separate dropping policy to implement different drop policies for every class of traffic.
WRED will treat all non-IP traffic as precedence 0. As a result, non-IP traffic is more likely to
be dropped than IP traffic.
If the random-detect command is used on versatile interface processor (VIP)-based interfaces,
distributed WRED (DWRED) is enabled and the VIP CPU is responsible for WRED dropping.
This can significantly increase router performance when used in the context of distributed
Cisco Express Forwarding switching, which is a prerequisite for DWRED functionality. Also,
DWRED can be combined with distributed weighted fair queuing (DWFQ), enabling truly
distributed queuing and congestion avoidance techniques, running independently from the
central CPU.
WRED cannot be configured on the same interface as custom queuing (CQ), priority queuing
(PQ), or WFQ. However, both DWRED and DWFQ can be configured on the same interface.
In addition, CBWRED can be configured in conjunction with CBWFQ. Restricting
nondistributed, non-class-based WRED to only FIFO queuing on an interface is typically not a
major issue because WRED is usually applied in the network core, where advanced queuing
mechanisms are not typically used. WRED is suited for the network core because WRED has a
relatively low performance impact on routers. Furthermore, DWRED or CBWRED can be used
to overcome this limitation by combining WRED with WFQ.
2009 Cisco Systems, Inc. Congestion Avoidance 6-37
The syntax for the random-detect command in Cisco IOS Software Release 12.4 is as follows:

Parameter Description
dscp-based (Optional) Specifies that WRED is to use the differentiated
services code point (DSCP) value when it calculates the drop
probability for a packet. If you choose not to use either the dscp-
based or the prec-based keyword, WRED uses the IP
Precedence value (the default method) to calculate the drop
probability for the packet.
prec-based (Optional) Specifies that WRED is to use the IP Precedence
value when it calculates the drop probability for a packet. If you
choose not to use either the dscp-based or the prec-based
keyword, WRED uses the IP Precedence value (the default
method) to calculate the drop probability for the packet.
6-38 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 11
Changing the WRED Traffic Profile
Changes WRED profile for specified IP precedence value.
Packet drop probability at maximum threshold:
1 / mark-prob-denominator
Non-weighted RED is achieved by using the same WRED profile
for all precedence values.


When WRED is enabled, default values are selected for each traffic profile based on the weight
used (IP precedence or DSCP). You can then modify these default values to match their
specific administrative QoS policy goals. When modifying the default WRED profile for IP
precedence, these values are configurable:
Minimum threshold: When the average queue depth is above the minimum threshold,
WRED starts dropping packets. The rate of packet drop increases linearly as the average
queue size increases, until the average queue size reaches the maximum threshold. The
default maximum threshold is equal to the default hold queue size (40) on an interface. The
size of the hold queue is equivalent to the number of packets that can be held within a
queue. The hold queue length ranges from 0 to 4096, and, therefore, the
minimum/maximum threshold range is 1 to 4096. The default maximum threshold will
reflect the defined hold queue size. Thus, if the hold queue is changed, the maximum
threshold will change.
Maximum threshold: When the average queue size is above the maximum threshold, all
packets are dropped. If the difference between the maximum threshold and the minimum
threshold is too small, many packets might be dropped at once, resulting in global
synchronization.
Mark probability denominator: This is the fraction of packets dropped when the average
queue depth is at the maximum threshold. For example, if the denominator is 10, one out of
every 10 packets is dropped when the average queue is at the maximum threshold. The
maximum probability of drop at the maximum threshold can be expressed as 1 / mark-prob-
denominator. The maximum drop probability is 10 percent if default settings are used that
have a mark probability denominator value of 10. The value of the mark probability can
range from 1 to 65536.
2009 Cisco Systems, Inc. Congestion Avoidance 6-39
If required, you can configure RED as a special case of WRED, by assigning the same profile
to all eight IP precedence values. The default WRED parameter is based on the best available
data. Cisco recommends that these parameters not be changed from their default values unless
you have determined that your applications will benefit from the changed values.
The syntax for the random-detect precedence command in Cisco IOS Software Release 12.4
is as follows:


Parameter Description
precedence IP Precedence number. The value range is from 0 to 7. For Cisco
7000 series routers with an RSP7000 interface processor and
Cisco 7500 series routers with a VIP2-40 interface processor
(VIP2-50 interface processor strongly recommended), the
precedence value range is from 0 to 7 only.
rsvp Indicates Resource Reservation Protocol (RSVP) traffic.
min-threshold Minimum threshold in number of packets. The value range of this
argument is from 1 to 4096. When the average queue length
reaches the minimum threshold, WRED randomly drops some
packets with the specified IP Precedence. The default min-
threshold depends on the precedence. The min-threshold for IP
Precedence 0 corresponds to half of the max-threshold. The
values for the remaining precedences fall between half the max-
threshold and the max-threshold at evenly spaced intervals. For a
list of the default minimum threshold values for each IP
Precedence, refer to the Cisco IOS Quality of Service Solutions
Command Reference on Cisco.com.
max-threshold Maximum threshold in number of packets. The value range of this
argument is from the value of the min-threshold argument to
4096. When the average queue length exceeds the maximum
threshold, WRED drops all packets with the specified IP
Precedence. By default, the max-threshold is based on the output
buffering capacity and the transmission speed for the interface.
mark-probability-denominator Denominator for the fraction of packets dropped when the
average queue depth is at the minimum threshold. For example,
if the denominator is 512, 1 out of every 512 packets is dropped
when the average queue is at the minimum threshold. The value
range is from 1 to 65536. The default is 10; 1 out of every 10
packets is dropped at the minimum threshold.
6-40 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 12
Changing WRED Sensitivity to Bursts
WRED takes the average queue size to determine the current WRED
mode (no drop, random drop, full drop).
High values of N allow short bursts.
Low values of N make WRED more burst-sensitive.
Default value (9) should be used in most scenarios.
Average output queue size with N=9:
Q
ave
(t+1) = Q
ave
(t) * 0.998 + Q
t
* 0.002


WRED does not calculate the drop probability using the current queue length, but rather uses
the average queue length. The average queue length is constantly recalculated using two terms:
the previously calculated average queue size and the current queue size. An exponential
weighting constant N influences the calculation by weighing the two terms, therefore
influencing how the average queue size follows the current queue size, in this way:
For high values of N, the previous average becomes more important. A large factor will
smooth out the peaks and lows in queue length. The average queue size is unlikely to
change very quickly, avoiding drastic swings in size. The WRED process will be slow to
start dropping packets, but it may continue dropping packets for a time after the actual
queue size has fallen below the minimum threshold. The slow-moving average will
accommodate temporary bursts in traffic. If the value of N gets too high, WRED will not
react to congestion. Packets will be transmitted or dropped as if WRED were not in effect.
For low values of N, the average queue size closely tracks the current queue size. The
resulting average may fluctuate with changes in the traffic levels. In this case, the WRED
process responds quickly to long queues. When the queue falls below the minimum
threshold, the process will stop dropping packets. If the value of N gets too low, WRED
will overreact to temporary traffic bursts and drop traffic unnecessarily.
The default value of N is 9. This value should suffice for most scenarios, except perhaps those
involving extremely high-speed interfaces (such as OC12), where the value can be increased
slightly (to about 12) to allow more bursts.
Note The syntax shown in the figure for the random-detect exponential-weighting-constant
command is compatible with the syntax for the random-detect exponential-weighting-
constant command in Cisco IOS Software Release 12.4. In that release, the default value
of N is 9, and valid values range from 1 to 16. It is recommended that you use the default
value of N unless you have determined that your applications would benefit from a different
value.
2009 Cisco Systems, Inc. Congestion Avoidance 6-41
Example: CBWFQ Using IP Precedence with CBWRED

2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 13
Example: CBWFQ Using IP Precedence
with CBWRED
Enable CBWFQ to prioritize traffic according to these
requirements:
Class mission-critical is marked with IP precedence values
3 and 4 (3 is high-drop, 4 is low-drop) and should get 30%
of interface bandwidth.
Class bulk is marked with IP precedence values 1 and 2
(1 is high-drop, 2 is low-drop) and should get 20% of interface
bandwidth.
All other traffic should be per-flow fair-queued.
Use differentiated WRED to prevent congestion in all three
classes.

This example of CBWFQ with WRED focuses on a network that provides these three different
service levels for three traffic classes:
Mission-critical class: Marked with IP Precedence values 3 and 4 (3 is used for high-drop
service, and 4 is used for low-drop service within the service class), and should get 30
percent of an interface bandwidth
Bulk class: Marked with IP Precedence values 1 and 2 (1 is used for high-drop service, and
2 is used for low-drop service), and should get 20 percent of the interface bandwidth
Best-effort class: Should get the remaining bandwidth share, and should be fair-queued
To enforce this service policy, a router will use CBWFQ to perform bandwidth sharing and
WRED within service classes to perform differentiated drop.
6-42 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 14
Example: CBWFQ Using IP Precedence
with CBWRED

The figure shows the WRED traffic profile representing the QoS service policy, and the
configuration that is used to implement the example service policy. The traffic is classified
based on the precedence bits, and all noncontract traffic is classified into the default class, as
follows:
The mission-critical class is guaranteed at least 30 percent of bandwidth with a custom
WRED profile that establishes a low-drop and a high-drop per-hop behavior.
The bulk class is guaranteed at least 20 percent of bandwidth, is configured with somewhat
lower WRED drop thresholds, and is therefore more likely to be dropped than the mission-
critical class in the event of interface congestion.
All other traffic is part of the default class and is fair-queued with default WRED
parameters.
2009 Cisco Systems, Inc. Congestion Avoidance 6-43
Configuring DSCP-Based CBWRED
This topic describes the Cisco IOS commands that are required to configure DSCP-based
CBWRED.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 15
Configuring DSCP-Based CBWRED

Enables DSCP-based WRED.
Command can be used at the interface, per-VC
(with random-detect-group), or class level (service-policy).
Default service profile is used.
The WRED random-detect command and the WFQqueue-limit
command are mutually exclusive for class policy.


Use the random-detect dscp-based command to enable DSCP-based WRED on an interface.
By default, WRED is precedence-based and uses eight default WRED profiles, one for each
value of IP precedence. Changing WRED weighting to values based on DSCP increases the
number of WRED traffic profiles to 64.
You can configure WRED as part of the policy for a standard class or the default class. The
WRED random-detect command and the WFQ queue-limit command are mutually exclusive
for class policy. If you configure WRED, its packet-drop capability is used to manage the
queue when packets exceeding the configured maximum count are enqueued. If you configure
the WFQ queue-limit command for class policy, tail drop is used.
WRED cannot be configured on the same interface as CQ, PQ, or WFQ. However, both
DWRED and DWFQ can be configured on the same interface. In addition, CBWRED can be
configured in conjunction with CBWFQ. Restricting nondistributed, non-class-based WRED
only to FIFO queuing on an interface is not a major issue because WRED is usually applied in
the network core, where advanced queuing mechanisms are not typically deployed. WRED is
suited for the network core because it has a relatively low performance impact on routers.
Further, DWRED or CBWRED can be used to overcome this limitation by combining WRED
with WFQ.
Note The random-detect dscp-based command (random-detect command with the dscp-
based keyword) is also used to enable DSCP-based WRED in Cisco IOS Software
Release 12.4.
6-44 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 16
Changing the WRED Traffic Profile

Changes WRED profile for specified DSCP value.


Packet drop probability at maximum threshold:
1 / mark-prob-denominator

When DSCP-based WRED is enabled, default values are selected for each traffic profile based
on DSCP. You can use the random-detect dscp command to modify these default values to
match their specific administrative QoS policy goals. When modifying the default WRED
profile for DSCP, these values are configurable:
Minimum threshold: When the average queue depth is above the minimum threshold,
WRED starts dropping packets. The rate of packet drop increases linearly as the average
queue size increases, until the average queue size reaches the maximum threshold. The
default maximum threshold is equal to the default hold queue size (40) on an interface. The
size of the hold queue is equivalent to the number of packets that can be held within a
queue. The hold queue length ranges from 0 to 4096, and, therefore, the
minimum/maximum threshold range is 1 to 4096. The default maximum threshold will
reflect the defined hold queue size. Thus, if the hold queue is changed, the maximum
threshold will change.
Maximum threshold: When the average queue size is above the maximum threshold, all
packets are dropped. If the difference between the maximum threshold and the minimum
threshold is too small, many packets might be dropped at once, resulting in global
synchronization.
Mark probability denominator: This is the fraction of packets dropped when the average
queue depth is at the maximum threshold. For example, if the denominator is 10, one out of
every 10 packets is dropped when the average queue is at the maximum threshold. The
maximum probability of drop at the maximum threshold can be expressed as 1 / mark-prob-
denominator. The maximum drop probability is 10 percent if default settings are used that
have a mark probability denominator value of 10. The value of the mark probability can
range from 1 to 65536.
2009 Cisco Systems, Inc. Congestion Avoidance 6-45
The syntax shown in the figure for the random-detect dscp command is compatible with the
syntax for the random-detect dscp command in Cisco IOS Software Release 12.4.
Note The default WRED parameters are based on the best available data. Cisco recommends
that these parameters not be changed from their default values.
6-46 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: CBWRED Using DSCP with CBWFQ
In this example of CBWFQ with WRED, the service policy was implemented using classes of
service based on IP precedence.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 17
Example: CBWRED Using DSCP with
CBWFQ
Enable CBWFQ to prioritize traffic according to these
requirements:
Class mission-critical is marked using DSCP AF2 and should
get 30% of interface bandwidth.
Class bulk is marked using DSCP AF1 and should get 20% of
interface bandwidth.
All other traffic should be per-flow fair-queued.
Use differentiated WRED to prevent congestion in all three
classes.
Make sure the new configurations still conform to the design and
implementation from the previous example.

The same service policy will be configured in this example. In this case, however, DSCP-based
classes of service are used. Remember that the DiffServ model itself provides defined traffic
classes and their associated PHB. DiffServ-based classification is used in this example as
follows:
Mission-critical class: Marked using DSCP AF class 2, and should get 30 percent of an
interface bandwidth.
Bulk class: Marked using DSCP AF class 1, and should get 20 percent of the interface
bandwidth.
Best-effort class: Traffic should get the remaining bandwidth share, and should be fair-
queued.
To enforce this service policy, a router will use CBWFQ to perform bandwidth sharing, and
will use WRED within service classes to perform differentiated drop.
2009 Cisco Systems, Inc. Congestion Avoidance 6-47
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 18
Example: CBWRED Using DSCP with
CBWFQ (Cont.)

The configuration example shows how traffic classification is performed using DSCP-based
classes, representing the mission-critical class as the AF1 class, and the AF2 class as the bulk
class. WRED DSCP-based parameters are set reflecting the class-dependent drop strategy, as
follows:
The mission-critical class is guaranteed at least 30 percent of bandwidth, with a custom
WRED profile that establishes three different drop probabilities for AF class 2.
The bulk class is guaranteed at least 20 percent of bandwidth, is configured with three
different drop probabilities for AF class 1, and has a somewhat lower WRED maximum
threshold. As a result, bulk-class traffic is more likely to be dropped than the mission-
critical class in the event of interface congestion.
All other traffic is part of the default class, and is fair-queued, with default WRED parameters.
6-48 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Monitoring CBWRED
This topic describes the Cisco IOS commands that are required to monitor CBWRED.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 19
Monitoring CBWRED

Displays the packet statistics and configuration of all classes


configured for all service policies on the specified interface.


Use the show policy-map interface command to display the configuration of all classes
configured for all service policies on the specified interface. This includes all WRED
parameters implementing the drop policy on the specified interface.
The table explains some of the key fields of the output of the show policy-map interface
command.
show policy-map interface Output Fields
Field Description
Name of the output service policy applied to the specified
interface or VC.
Class of traffic being displayed. Output is displayed for each
configured class in the policy. The choice for implementing class
matches (for example, match-all or match-any) can also appear
next to the traffic class.
Match criteria specified for the class of traffic. Choices include
criteria such as IP precedence, IP DSCP value, Multiprotocol
Label Switching (MPLS) experimental value, access groups, and
QoS groups.
Exponent used in the average queue size calculation for a WRED
parameter group.
Average queue depth based on the actual queue depth on the
interface and the exponential weighting constant. It is a
fluctuating average. The minimum and maximum thresholds are
compared against this value to determine drop decisions.
2009 Cisco Systems, Inc. Congestion Avoidance 6-49
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 20
Summary
WRED combines RED with IP precedence or DSCP and performs
packet dropping based on IP precedence or DSCP markings.
Each WRED profile defines the minimum and maximum threshold
and the maximum drop probability. Profiles are already defined by
default for IP precedence and DSCP.
The random-detect command is used to enable WRED on an
interface.
The random-detect dscp-based command is used to enable
DSCP-based WRED on an interface.
The show policy-map interface command displays the
configuration of all classes configured for all service policies
on the specified interface. This includes all WRED parameters
implementing the drop policy on the specified interface.

6-50 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 4
Configuring Explicit
Congestion Notification
Overview
Congestion avoidance techniques monitor network traffic loads in an effort to anticipate and
avoid congestion at common network bottleneck points. You achieve congestion avoidance
through packet dropping, by using more complex techniques than simple tail drop. With the
addition of explicit congestion notification (ECN) extensions to IP, routers have an alternative
method of indicating congestion to peers.
This lesson describes the concept of ECN and the Cisco IOS commands that are required to
configure and monitor ECN.
Objectives
Upon completing this lesson, you will be able to configure ECN to enhance the congestion
avoidance features of WRED. This ability includes being able to meet these objectives:
Describe the ECN extensions to IP
Identify characteristics of the ECN field in IP
Explain how ECN interacts with WRED
Identify the Cisco IOS commands that are required to configure ECN extensions to WRED
Identify the Cisco IOS commands that are required to monitor ECN-enabled WRED
6-52 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Explicit Congestion Notification
This topic describes the ECN extensions to IP.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-2
Explicit Congestion Notification
TCP congestion controls are not suited to applications that are
sensitive to delay or packet loss.
ECN (RFC 3168) removes the need to rely on packet loss as a
congestion indicator.
ECN marks packets instead of dropping them when the average
queue length exceeds a specific threshold value.
Routers and end hosts can use ECN marking as a signal that the
network is congested and send packets at a slower rate.

TCP determines how many unacknowledged packets it can send by gradually increasing the
number of packets the session sends until it experiences a dropped packet; this is known as the
TCP window size. As a result, TCP tends to cause router queues to build up at network
bottleneck points. When queues become full, tail drop begins dropping all incoming packets
until there is room in the queue. Tail drop does not provide differential treatment and therefore
some of the fragile flow packets, sensitive to latency, may be dropped. In addition, tail drop can
lead to global synchronization of packet loss across multiple flows.
Active queue management mechanisms such as random early detection (RED) or weighted
random early detection (WRED) detect congestion before queues fill and overflow. Through
the use of selective packet discard, these mechanisms provide congestion indication to end
nodes. Therefore, active queue management (congestion avoidance) mechanisms can reduce
queuing delays for all traffic sharing a specific queue. In addition, active queue management
means that it is no longer necessary to rely on buffer overflow as the only means of indicating
congestion.
2009 Cisco Systems, Inc. Congestion Avoidance 6-53
Traditional active queue management mechanisms, such as RED, rely on the use of packet
drops to indicate congestion. Packet dropping in these mechanisms is based on the average
queue length exceeding a predefined threshold, rather than only when queues overflow.
However, because packets are dropped prior to queues actually overflowing, the router
dropping the packet is not always constrained by memory limitations and needs to actually drop
the packet. With the Addition of Explicit Congestion Notification to IP (RFC 3168), active
queue management allows routers to signal that congestion has been experienced by the router,
instead of relying on the use of packet drops. Through the use of signaling congestion,
aggressive flows can be slowed, thus reducing the impact of congestion and packet loss on
latency-sensitive flows.
6-54 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
ECN Field Defined
This topic describes the characteristics of the ECN field in IP.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-3
ECN Field Defined

The Addition of Explicit Congestion Notification to IP (RFC 3168) redefines the DiffServ field
(formerly the type of service [ToS] byte) to contain an ECN-specific field. The ECN field
consists of the last two low-order bits of the DiffServ field, and consists of the ECN-capable
transport (ECT) bit and the congestion experienced (CE) bit.
The ECT bit and the CE bit can be used to make four ECN field combinations: 00, 01, 10, and
11. The different ECT and CE bit combinations in the ECN field have these meanings:
00: The ECN field combination indicates that a packet is not using ECN.
01 and 10: The ECN field combinations, called ECT(1) and ECT(0), respectively, are set
by the data sender to indicate that the endpoints of the transport protocol are ECN-capable.
Routers will treat these two field combinations identically. Data senders can use either one
or both of these two combinations.
11: The ECN field combination indicates to the endpoints that congestion has been
experienced. Packets arriving at a full queue of a router will be dropped.
2009 Cisco Systems, Inc. Congestion Avoidance 6-55
ECN and WRED
This topic describes how ECN interacts with WRED.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-4
ECN and WRED
ECN is an extension to WRED.
Congestion in WRED is indicated based on the average queue
length exceeding a specific threshold value.
If the number of packets in the queue is below the minimum
threshold, packets are transmitted.
Treatment is identical to a network using only WRED.
If the number of packets in the queue is above the maximum
threshold, packets are tail-dropped.
Treatment is identical to a network using only WRED.

On Cisco IOS routers, ECN is an extension to WRED functionality. WRED is an active queue
management mechanism that uses packet drops as a congestion indicator to endpoints. Packets
are dropped by WRED based on the average queue length exceeding a specific set of
predefined threshold values (minimum and maximum threshold). ECN is an extension to
WRED, in that ECN marks packets instead of dropping them when the average queue length
exceeds a specific threshold value. When ECN is configured with WRED, routers and end
hosts use this marking as a signal that the network is congested and slow down the rate at
which packets are sent.
ECN must be interoperable with non-ECN-compliant devices. Because ECN is configured as
an extension to WRED, packets are treated differently by WRED when ECN has been enabled.
If the average queue length is below the defined WRED minimum threshold, all packets are
queued and transmitted normally. This behavior is identical to devices that are configured to
use non-ECN-enabled WRED.
If the average queue length is greater than the maximum threshold, packets are tail-dropped.
This behavior is identical to devices configured to use non-ECN-enabled WRED.
6-56 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-5
ECN and WRED (Cont.)
If the number of packets in the queue is between the minimum
and maximum threshold, one of these scenarios can occur:
ECN-capable endpoints and WRED determine that the packet
should be dropped based on the drop probability; the ECN bits
are marked, and the ECN process begins.
If the endpoints are not ECN-capable, the packet may be
dropped based on the WRED drop probability.

If the number of packets in the queue is below the minimum threshold, packets are transmitted.
This happens whether or not ECN is enabled, and this treatment is identical to the treatment a
packet receives when WRED only is being used on the network.
If the number of packets in the queue is between the minimum threshold and the maximum
threshold, one of these three scenarios can occur:
If the ECN field on the packet indicates that the endpoints are ECN-capable (that is, the
ECT bit is set to 1 and the CE bit is set to 0, or the ECT bit is set to 0 and the CE bit is set
to 1) and the WRED algorithm determines that the packet should have been dropped based
on the drop probability, the ECN process is used instead of the packet being dropped.
If the ECN field on the packet indicates that neither endpoint is ECN-capable (that is, the
ECT bit is set to 0 and the CE bit is set to 0), the packet may be dropped based on the
WRED drop probability. This is the identical treatment that a packet receives when WRED
is enabled without ECN configured on the router.
If the number of packets in the queue is above the maximum threshold, packets are dropped.
This is the identical treatment a packet receives when WRED is enabled without ECN
configured on the router.
2009 Cisco Systems, Inc. Congestion Avoidance 6-57
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-6
ECN and WRED Process
01
ECN
1
CWR
1
ECN
Echo
11
ECN
Host A Host B
1
4
2
3
ToS
Byte
Not ECN-Capable
ECT CE
ECN Field
0
ECN-Capable
1
ECN-Capable
0
Congestion
Experienced
1
0
0
1
1

The following steps (illustrated in the figure) explain how ECN signaling can prevent packet
drops by causing a host that is transmitting TCP packets to reduce its transmission rate:
Step 1 The sender (Host A) sets the ECN bits in the IP headers of all data packets to 01 or
10 to indicate to the network that it is capable of participating in ECN.
Step 2 If the following conditions exist, the router sets the ECN bits to 11 (Congestion
Experienced) and sends the packet on to the receiver (Host B):
The network is congested, or congestion is imminent.
The WRED algorithm determines that the packet should be dropped based on
the drop probability.
The ECN field in the packet indicates that the endpoints are ECN-capable.
Step 3 When Host B sees the "11" Congestion Experienced marking, it sets the ECN-Echo
(ECE) flag in the TCP header of the next packet it sends back to Host A. The
purpose of this flag is to tell Host A to slow down its transmissions.
Step 4 When Host A receives the packet with the ECN Echo flag set, it reduces its
congestion window to slow down its transmission rate. Host A then sets the
Congestion Window Reduced (CWR) flag in the TCP header of the first new packet
that it sends to Host B to inform Host B that it has reduced its window and slowed
transmission.
6-58 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring ECN-Enabled WRED
This topic describes the Cisco IOS commands that are required to configure ECN extensions to
WRED.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-7
Configuring ECN-Enabled WRED
Enables ECN.
ECN can be used whether WRED is based on the IP precedence
or DSCP value.
ECN must be configured through MQC.







The ECN feature must be configured through the Modular QoS command-line interface (CLI),
or MQC. ECN is configured as part of a policy map after CBWRED has been enabled. ECN
can be used whether the CBWRED configuration is based on IP precedence or differentiated
services code point (DSCP).
The syntax shown in the figure for the random-detect ecn command is the same as the syntax
for the random-detect ecn command in Cisco IOS Software Release 12.4.
Note The WRED ECN feature was introduced in Cisco IOS Software Release 12.2(8)T.
2009 Cisco Systems, Inc. Congestion Avoidance 6-59
Monitoring ECN-Enabled WRED
This topic describes the Cisco IOS commands that are required to monitor ECN-enabled
WRED.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-8
Monitoring ECN-Enabled WRED
Displays the configuration of all classes for a specified service
policy map or all classes for all existing policy maps







The show policy-map command displays the configuration of a service policy map created
using the show policy-map command. The show policy-map command will display ECN
marking information only if ECN is enabled on the interface. The table explains some of the
key fields of the output of the show policy-map command.
show policy-map Output Fields
Field Description


Indication that ECN is enabled
IP precedence value
Minimum WRED threshold in number of packets
Maximum WRED threshold in number of packets
Fraction of packets dropped when the average queue depth is at
the maximum threshold
6-60 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-9

Monitoring ECN-Enabled WRED (Cont.)


Displays the configuration of all classes configured for all service
policies on the specified interface















The show policy-map interface command displays the configuration of all classes configured
for all service policies on the specified interface. The counters displayed after you enter the
show policy-map interface command are updated only if congestion is present on the
interface. The show policy-map interface command also displays ECN marking information
only if ECN is enabled on the interface. The table explains some of the key fields of the output
of the show policy-map interface command.
show policy-map interface Output Fields
Field Description


Indication that ECN is enabled
2009 Cisco Systems, Inc. Congestion Avoidance 6-61
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 10
Monitoring ECN-Enabled WRED (Cont.)
























show policy-map interface Output Fields (Cont.)
Field Description
Average queue depth based on the actual queue depth on the
interface and the exponential weighting constant. It is a moving
average. The minimum and maximum thresholds are compared
against this value to determine drop decisions.
IP precedence value.
Number of packets (also shown in bytes) transmitted.
Number of packets (also shown in bytes) randomly dropped when
the mean queue depth is between the minimum threshold value
and the maximum threshold value for the specified IP precedence
value.
Number of packets dropped when the mean queue depth is
greater than the maximum threshold value for the specified IP
precedence value.
Minimum WRED threshold in number of packets.
Maximum WRED threshold in number of packets.
Fraction of packets dropped when the average queue depth is at
the maximum threshold.
Number of packets (also shown in bytes) marked by ECN.
6-62 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.36- 11
Summary
ECN marks packets instead of dropping them when the average
queue length exceeds a specific threshold value.
ECN defines two flow control bits as extensions to the DiffServ
field: the ECT bit and the CE bit.
ECN is an extension to WRED that removes the need to rely on
packet loss as a congestion indicator.
On Cisco IOS routers, the ECN feature must be configured
through MQC. Use the random-detect ecn command.
The show policy-map interface command displays ECN
marking information only if ECN is enabled on the interface.


2009 Cisco Systems, Inc. Congestion Avoidance 6-63
Module Summary
This topic summarizes the key points discussed in this module.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.36-1
Module Summary
By default, routers use tail drop as a means of congestion control
when an output queue is full. Tail drop treats all traffic equally and
does not differentiate between classes of service. When tail drop
is in effect, packets are dropped until the congestion is eliminated
and the queue is no longer full.
Congestion avoidance techniques, such as RED, monitor network
traffic loads in an effort to anticipate and avoid congestion at
common network bottlenecks. Congestion avoidance is achieved
through packet dropping.
WRED, the Cisco implementation of RED, combines the
capabilities of the RED algorithm with IP precedence or DSCP.
ECN is an extension to WRED that enables flow control and
congestion signaling without requiring packet drops.

Congestion management is an area of concern for all networks that require a differentiated
treatment of packet flows. Active queue management mechanisms address the limitations of
relying solely on TCP congestion management techniques, which simply wait for queues to
overflow and then drop packets to signal that congestion has occurred.
Congestion avoidance mechanisms such as RED and WRED allow for specific packet flows to
be selectively penalized and slowed by applying a traffic profile. Traffic flows are matched
against this profile and transmitted or dropped, depending upon the average length of the
interface output queue. In addition, RED and WRED are extremely effective tools at preventing
global synchronization of many TCP traffic flows.
Another active queue management technique is ECN. ECN is an extension to WRED that
allows for signaling to be sent to ECN-enabled endpoints, instructing them to reduce their
packet transmission rates. ECN also provides the benefit of not requiring packet drops when the
WRED drop probability indicates otherwise.
6-64 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
References
For additional information, refer to these resources:
Further details on TCP slow start can be found in RFC 2001 at this URL:
http://www.faqs.org/rfcs/rfc2001.html
For a detailed discussion of TCP protocol behavior, see Geoff Huston, Telstra, TCP
Performance, Internet Protocol Journal, Vol. 3, No. 2, June 2000, at this URL:
http://www.cisco.com/warp/public/759/ipj_3-2/ipj_3-2_tcp.html
For a detailed discussion of TCP congestion behavior, see Geoff Huston, Telstra, Future
for TCP, Internet Protocol Journal, Vol. 3, No. 3, September 2000, at this URL:
http://www.cisco.com/web/about/ac123/ac147/ac174/ac195/about_cisco_ipj_archive_articl
e09186a00800c83f8.html
For more information on Random Early Detection, refer to Congestion Avoidance
Overview at this URL:
http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/congestion_avoidance_ps63
50_TSD_Products_Configuration_Guide_Chapter.html
For more information on WRED and configuring WRED, refer to Configuring Weighted
Random Early Detection at this URL:
http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/config_wred_ps6350_TSD_
Products_Configuration_Guide_Chapter.html
For more information on DSCP-based WRED, refer to DiffServ Compliant Weighted
Random Early Detection at this URL:
http://www.cisco.com/en/US/docs/ios/12_1t/12_1t5/feature/guide/dtdswred.html
For information regarding WRED on Cisco GSR 12000 routers, refer to Understand and
Configure MDRR/WRED on the Cisco 12000 Series Internet Router at this URL:
http://www.cisco.com/en/US/products/hw/routers/ps167/products_tech_note09186a008009
4c00.shtml
For more information on ECN, refer to RFC 3168: The Addition of Explicit Congestion
Notification to IP at this URL: http://www.ietf.org/rfc/rfc3168.txt
For more information on using WRED with ECN, refer to WREDExplicit Congestion
Notification (ECN) at this URL:
http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/wred_ecn_ps6350_TSD_Pr
oducts_Configuration_Guide_Chapter.html
2009 Cisco Systems, Inc. Congestion Avoidance 6-65
Module Self-Check
Use the questions here to review what you learned in this module. The correct answers and
solutions are found in the Module Self-Check Answer Key.
Q1) What are two ways in which TCP manages congestion? (Choose two.) (Source:
Introducing Congestion Avoidance)
A) TCP uses tail drop on queues that have reached their queue limit.
B) TCP uses dropped packets as an indication that congestion has occurred.
C) TCP uses variable window sizes to reduce and increase the rates at which
packets are sent.
D) TCP measures the average size of device queues and drops packets, linearly
increasing the amount of dropped packets with the size of the queue.
Q2) Two stations (A and B) are communicating using TCP. Station A has negotiated a TCP
window size of 5 and as a result sends 5 packets to station B.
Station A receives 3 ACK messages from station B indicating ACK 3.
Which two of the following descriptions best describe the status of the communication
between A and B? (Choose two.) (Source: Introducing Congestion Avoidance)
A) Station B is acknowledging receipt of packets 1, 2, and 3, but has lost packets 4
and 5.
B) Station A initiates a fast-retransmit and immediately sends packet 3 to B.
C) Station B has not received packet 3.
D) Station B has received packets 1, 2, and 3, but not packet 4. It cannot be
determined where packet 5 was received at B until packet 4 has been sent.
E) Station A will send packets 4 and 5 to station B upon receipt of the station B
ACK.
Q3) What are three important limitations of using a tail-drop mechanism to manage queue
congestion? (Choose three.) (Source: Introducing Congestion Avoidance)
A) Tail drop can cause many flows to synchronize, lowering overall link
utilization.
B) Tail drop can cause starvation of fragile flows.
C) Tail drop increases the amount of packet buffer memory required, because
queues must be full before congestion management becomes active.
D) Tail drop results in variable delays, which can interfere with delay-sensitive
traffic flows.
Q4) What are three advantages of active congestion management using RED? (Choose
three.) (Source: Introducing RED)
A) RED uses selective packet discard to eliminate global synchronization of
TCP flows.
B) RED avoids congestion by ensuring that interface queues never become full.
C) RED increases the overall utilization of links.
D) RED uses selective packet discard to penalize aggressive flows.
6-66 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Q5) A specific RED profile has been configured with a mark probability denominator of 1.
What is the effect of this configuration on packet loss as the average queue length
reaches the maximum threshold? (Source: Introducing RED)
A) Given this configuration, no packets will be dropped until the average queue
length is greater than the maximum threshold.
B) For every active traffic flow, one packet will be discarded.
C) When the average queue length is at the maximum threshold, all packets are
dropped.
D) This is an invalid configuration.
Q6) Refer to the following RED traffic profile. In which two ways will the RED traffic
profile in this figure affect the traffic flows to which it is applied? (Choose two.)
(Source: Introducing RED)
RED Traffic Profile
A) Packets may be dropped unnecessarily because the minimum threshold is
too low.
B) This profile can result in global synchronization because the difference
between the minimum and maximum thresholds is too small.
C) RED will not be effective because the mark probability denominator is 50
when the average queue length reaches the maximum threshold.
D) The reduced size of the maximum threshold will prevent tail drop and
maximize link utilization.
Q7) What are the three traffic drop modes in random early detection? (Choose three.)
(Source: Introducing RED)
A) no drop
B) full drop
C) random drop
D) deferred drop
Q8) Which two QoS markers can you base the weight in WRED on when configuring
CB-WRED? (Choose two.) (Source: Configuring Class-Based Weighted RED)
A) CoS
B) DSCP
C) QoS group
D) IP precedence
Average
Queue
Size
Drop
Probability
50%
100%
8 10
Average
Queue
Size
Drop
Probability
50%
100%
8 10
2009 Cisco Systems, Inc. Congestion Avoidance 6-67
Q9) What are two requirements for configuring CB-WRED? (Choose two.) (Source:
Configuring Class-Based Weighted RED)
A) An MQC configuration that includes a policy map must be configured.
B) Cisco Express Forwarding must be enabled for IP.
C) Random detect must be enabled for DSCP-based CB-WRED.
D) A previous configuration of CBWFQ must be present.
Q10) Given the following CB-WRED configuration, which command should be entered in
the Bronze traffic class to properly enable CB-WRED using a minimum threshold of
22, a maximum threshold of 36, and a drop probability of 10 percent? (Source:
Configuring Class-Based Weighted RED)














A) random-detect dscp-based 22 36 10
B) random-detect dscp-based cs1 22 36 10
C) random-detect dscp cs1 22 36
D) random-detect dscp cs1 10 22 36
Q11) What are two active congestion management mechanisms available on Cisco IOS
routers? (Choose two.) (Source: Configuring Class-Based Weighted RED, Configuring
Explicit Congestion Notification)
A) tail drop
B) weighted round robin
C) explicit congestion notification
D) weighted random early detection
Q12) What will a router do with a newly arriving packet if its output queue is full and ECN
fields are both set to a 1? (Source: Configuring Explicit Congestion Notification)
A) drop the last packet on the queue and enqueue the newly arriving packet
B) perform a tail drop and drop the new packet
C) move the packet to the head of the queue to ensure that the receiver is signaled
about the network congestion condition
D) allocate additional interface buffers to store the packet because it contains
congestion notification information
6-68 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Q13) Given the following configuration, which Cisco IOS configuration command must be
added to the default class to enable ECN? (Source: Configuring Explicit Congestion
Notification)






A) wred ecn
B) ecn enable
C) random-detect ecn
D) random-detect ecn enable
2009 Cisco Systems, Inc. Congestion Avoidance 6-69
Module Self-Check Answer Key
Q1) B, C
Q2) B, C
Q3) A, B, D
Q4) A, C, D
Q5) C
Q6) A, B
Q7) A, B, C
Q8) B, D
Q9) A, D
Q10) C
Q11) C, D
Q12) B
Q13) C
6-70 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Module 7
Traffic Policing and Shaping
Overview
Within a network, different forms of connectivity can have significantly different costs to an
organization. Because WAN bandwidth is relatively expensive, many organizations would like
to limit the amount of traffic that specific applications can send. This is especially true when
enterprise networks use Internet connections for remote site and extranet connectivity.
Downloading non-business-critical images, music, and movie files can greatly reduce the
amount of bandwidth available to other mission-critical applications. Traffic policing and
traffic shaping are two quality of service (QoS) techniques that can be used to limit the amount
of bandwidth that a specific application can use on a link.
This module describes the operation of traffic policing and traffic shaping and how these
techniques can be used to rate-limit traffic. Frame Relay WANs have specific requirements;
therefore, class-based traffic shaping on Frame Relay networks is also covered in this module.
Module Objectives
Upon completing this module, you will be able to use Cisco QoS traffic policing and traffic-
shaping mechanisms to effectively limit the rate of network traffic. This ability includes being
able to meet these objectives:
Explain how traffic policing and traffic shaping can be used to condition traffic
Configure class-based policing to rate-limit traffic
Configure class-based shaping to rate-limit traffic
Configure class-based shaping on Frame Relay WAN interfaces to rate-limit traffic
7-2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 1
Understanding Traffic Policing
and Shaping
Overview
You can use traffic policing to control the maximum rate of traffic sent or received on an
interface. Traffic policing is often configured on interfaces at the edge of a network to limit
traffic into or out of the network. You can use traffic shaping to control the traffic going out an
interface in order to match its flow to the speed of the remote target interface and to ensure that
the traffic conforms to policies contracted for it. Traffic policing and traffic shaping differ in
the way they respond to traffic violations. Policing typically drops traffic, while shaping
typically queues excess traffic. This lesson describes the traffic-policing and traffic-shaping
quality of service (QoS) mechanisms that are used to limit the available bandwidth to traffic
classes. Because both traffic policing and traffic shaping use the token bucket metering
mechanism, this lesson also describes how a token bucket works.
Objectives
Upon completing this lesson, you will be able to explain how to use traffic policing and traffic
shaping to condition traffic. This ability includes being able to meet these objectives:
Describe the purpose of traffic conditioning using traffic policing and traffic shaping
List key benefits of traffic conditioning using traffic policing and traffic shaping
Differentiate between the features of traffic policing and traffic shaping
Explain how a token bucket can be used by network devices to measure traffic rates
Explain how traffic can be policed using a single token bucket scheme
Explain how traffic can be policed using a dual token bucket scheme
Explain how traffic can be policed using a dual-rate metering scheme
Explain how traffic can be shaped using a single token bucket scheme
Describe the key traffic policing and shaping mechanisms available in Cisco IOS Software
and how each compares to the others
Identify the points in a network where rate-limiting can most effectively be employed
7-4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Traffic Policing and Shaping Overview
This topic describes the purpose of traffic conditioning using traffic policing and traffic
shaping.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-2
Traffic Policing and Shaping Overview
These mechanisms must classify packets before policing or shaping the
traffic rate.
Traffic shaping queues excess packets to stay within the desired traffic rate.
Traffic policing typically drops or marks excess traffic to stay within a traffic
rate limit.

Both traffic shaping and policing mechanisms are traffic-conditioning mechanisms that are
used in a network to control the traffic rate. Both mechanisms use classification so that they can
differentiate traffic. They both measure the rate of traffic and compare that rate to the
configured traffic-shaping or traffic-policing policy.
The difference between traffic shaping and policing can be described in terms of their
implementation:
Traffic shaping buffers excessive traffic so that the traffic stays within the desired rate.
With traffic shaping, traffic bursts are smoothed out by queuing the excess traffic to
produce a steadier flow of data. Reducing traffic bursts helps reduce congestion in the
network.
Traffic policing drops excess traffic in order to control traffic flow within specified rate
limits. Traffic policing does not introduce any delay to traffic that conforms to traffic
policies. Traffic policing can cause more TCP retransmissions, because traffic in excess of
specified limits is dropped.
Traffic-policing mechanisms such as class-based policing or committed access rate (CAR) also
have marking capabilities in addition to rate-limiting capabilities. Instead of dropping the
excess traffic, traffic policing can alternatively mark and then send the excess traffic. This
allows the excess traffic to be re-marked with a lower priority before the excess traffic is sent
out. Traffic shapers, on the other hand, do not remark traffic; these only delay excess traffic
bursts to conform to a specified rate.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-5
Why Use Traffic Conditioners?
This topic describes the key benefits of traffic conditioning using traffic policing and traffic
shaping.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-3
Why Use Policing?
To limit access to resources when high-speed access is used but
not desired (sub-rate access)
To limit the traffic rate of certain applications or traffic classes
To mark down (re-color) exceeding traffic at Layer 2 or Layer 3

Traffic policing is typically used to satisfy one of these requirements:
Limiting the access rate on an interface when high-speed physical infrastructure is used in
transport. Rate limiting is typically used by service providers to offer customers sub-rate
access. For example, a customer may have an OC-3 connection to the service provider but
pay only for a T1 access rate. The service provider can rate-limit the customer traffic to T1
speed.
Engineering bandwidth so that traffic rates of certain applications or classes of traffic
follow a specified traffic rate policy. For example, rate-limiting traffic from file-sharing
applications to 64 kb/s maximum.
Re-marking excess traffic with a lower priority at Layer 2 and Layer 3, or both, before
sending the excess traffic out. Cisco class-based traffic policing can be configured to mark
packets at both Layer 2 and Layer 3. For example, excess traffic can be re-marked to a
lower differentiated services code point (DSCP) value and also have the Frame Relay
discard eligible (DE) bit set before the packet is sent out.
7-6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-4
Why Use Shaping?
To prevent and manage congestion in ATM and Frame Relay
networks, where asymmetric bandwidths are used along the
traffic path
To regulate the sending traffic rate to match the subscribed
(committed) rate in Frame Relay or ATM networks

Traffic shaping is typically used for the following:
To prevent and manage congestion in ATM and Frame Relay networks, where asymmetric
bandwidths are used along the traffic path. If shaping is not used, buffering can occur at the
slow (usually the remote) end, which can lead to queuing, causing delays, and overflow,
causing drops.
To prevent dropping of noncompliant traffic by the ATM or Frame Relay service provider
by not allowing the traffic to burst above the subscribed (committed) rate. This allows the
customer to keep local control of traffic regulation.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-7
Example: Traffic Policing

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-5
Traffic Policing Example
Rate-limit file-sharing application traffic to 56 kb/s.
Do not rate-limit traffic from mission-critical server.

You can use traffic policing to divide the shared resource (the upstream WAN link) between
many flows. In this example, the router Fast Ethernet interface has an input traffic-policing
policy applied to it, in which the mission-critical server traffic rate is not rate-limited, but the
User X file-sharing application traffic is rate-limited to 56 kb/s. All file-sharing application
traffic from User X that exceeds the rate limit of 56 kb/s will be dropped.
7-8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Traffic Shaping

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-6
Traffic Shaping Example
Central to remote site speed mismatch
Remote to central site over subscription
Both situations result in buffering and in delayed or dropped
packets

Traffic-shaping tools limit the transmit rate from a source by queuing the excess traffic. This
limit is typically a value lower than the line rate of the transmitting interface. Traffic shaping
can be used to account for speed mismatches that are common in nonbroadcast multiaccess
(NBMA) networks such as Frame Relay and ATM.
In the figure, these two types of speed mismatches are shown:
The central site can have a higher-speed link than the remote site. You can deploy traffic
shaping at the central-site router to shape the traffic rate out of the central-site router to
match the link speed of the remote site. For example, the central router can shape the
permanent virtual circuit (PVC) outgoing traffic rate (going to the top remote-site router) to
128 kb/s to match that remote-site link speed. At each remote-site router, traffic shaping is
also implemented to shape the remote-site outgoing traffic rate to 128 kb/s to match the
committed information rate (CIR).
The aggregate link speed of all the remote sites can be higher than the central-site link
speed, thereby over-subscribing the central-site link speed. In this case, you can configure
the remote-site routers for traffic shaping to avoid oversubscription at the central site. For
example, you can configure the bottom two remote-site routers to shape the PVC outgoing
traffic rate to 256 kb/s to avoid the central-site router from being over-subscribed.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-9
Policing vs. Shaping
This topic describes the difference between the features of traffic policing and traffic shaping.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-7
Policing vs. Shaping
Incoming and outgoing directions
Out-of-profile packets are dropped
Dropping causes TCP retransmits
Supports packet marking or
re-marking
Less buffer usage (shaping requires
an additional shaping queuing
system)
Outgoing direction only
Out-of-profile packets are queued
until a buffer gets full
Buffering minimizes TCP retransmits
Marking or re-marking not supported
Shaping supports interaction with
Frame Relay congestion indication

Shaping queues excess traffic by holding packets inside a shaping queue. Use traffic shaping to
shape the outbound traffic flow when the outbound traffic rate is higher than a configured shape
rate. Traffic shaping smoothes traffic by storing traffic above the configured rate in a shaping
queue. Therefore, shaping increases buffer utilization on a router and causes unpredictable
packet delays. Traffic shaping can also interact with a Frame Relay network, adapting to
indications of Layer 2 congestion in the WAN. For example, if the backward explicit
congestion notification (BECN) bit is received, the router can lower the rate limit to help
reduce congestion in the Frame Relay network.
You can apply policing to either the inbound or outbound direction, while you can apply
shaping only in the outbound direction. Policing drops nonconforming traffic instead of
queuing the traffic like shaping. Policing also supports marking of traffic. Traffic policing is
more efficient in terms of memory utilization than traffic shaping because no additional
queuing of packets is needed.
Both traffic policing and traffic shaping ensure that traffic does not exceed a bandwidth limit,
but each mechanism has different impacts on the traffic:
Policing drops packets more often, generally causing more retransmissions of connection-
oriented protocols such as TCP.
Shaping adds variable delay to traffic, possibly causing jitter.
7-10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Measuring Traffic Rates
This topic describes how a token bucket can be used by network devices to measure traffic
rates.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-8
Single Token Bucket
If sufficient tokens are available (conform action):
Tokens equivalent to the packet size are removed from the
bucket.
The packet is transmitted.

The token bucket is a mathematical model that is used by routers and switches to regulate
traffic flow. The model has two basic components:
Tokens: Each token represents permission to send a fixed number of bits into the network.
Tokens are put into a token bucket at a certain rate by the Cisco IOS Software.
Token bucket: A token bucket has the capacity to hold a specified number of tokens. Each
incoming packet, if forwarded, takes tokens from the bucket, representing the packet size.
If the bucket fills to capacity, newly arriving tokens are discarded. Discarded tokens are not
available to future packets. If there are not enough tokens in the token bucket to send the
packet, the traffic conditioning mechanisms may take these actions:
Wait for enough tokens to accumulate in the bucket (traffic shaping)
Discard the packet (traffic policing)
Using a single token bucket model, the measured traffic rate can conform or exceed the
specified traffic rate. The measured traffic rate is conforming if there are enough tokens in the
single token bucket to transmit the traffic. The measured traffic rate is exceeding if there are not
enough tokens in the single token bucket to transmit the traffic.
The figure shows a single token bucket traffic-policing implementation. Starting with a current
capacity of 700 bytes worth of tokens accumulated in the token bucket, when a 500-byte packet
arrives at the interface, its size is compared to the token bucket capacity (in bytes). The 500-
byte packet conforms to the rate limit (500 bytes < 700 bytes), and the packet is forwarded;
500 bytes worth of tokens are taken out of the token bucket, leaving 200 bytes worth of tokens
for the next packet.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-11
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-9
Single Token Bucket (Cont.)
If sufficient tokens are NOT available (exceed action):
Drop (or mark) the packet

When the next 300-byte packet arrives immediately after the first packet, and no new tokens
have been added to the bucket (which is done periodically), the packet exceeds the rate limit.
The current packet size (300 bytes) is greater than the current capacity of the token bucket (200
bytes), and the exceed action is performed. The exceed action can be to drop or mark the packet
when traffic policing.
Example: Token Bucket as a Coin Bank
Think of a token bucket as a coin bank. Every day you can insert a coin into the bank (the token
bucket). At any given time, you can only spend what you have saved up in the bank. On the
average, if your saving rate is a dollar per day, your long-term average spending rate will be
one dollar per day if you constantly spend what you saved. However, if you do not spend any
money on a given day, you can build up your savings in the bank to the maximum that the bank
can hold. For example, if the size of the bank is limited to five dollars, and if you save and do
not spend for five straight days, the bank will contain five dollars. When the bank fills to its
capacity, you will not be able to put any more money in it. Then, at any time, you can spend up
to five dollars (bursting above the long-term average rate of one dollar per day).
Conforming rate (using the coin bank example) means that if you have two dollars in the bank
and you try to spend one dollar, that is considered conforming, because you are not spending
more than you have saved.
Exceeding rate (using the coin bank example) means that if you have two dollars in the bank
and you try to spend three dollars, it is considered exceeding, because you are spending more
than you have saved.
7-12 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Single Token Bucket Class-Based Policing
This topic describes how traffic can be policed using a single token bucket scheme.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 10
Single Token Bucket Class-Based
Policing
Bc is normal burst size
Tc is the time interval
CIR is the committed information rate
CIR = Bc / Tc

Token bucket operations rely on parameters such as CIR, committed burst (Bc), and committed
time window (Tc). Bc is known as the normal burst size. The mathematical relationship
between CIR, Bc, and Tc is as follows:

With traffic policing, new tokens are added into the token bucket based on the interpacket
arrival rate and the CIR. Every time a packet is policed, new tokens are added back into the
token bucket. The number of tokens added back into the token bucket is calculated as follows:


An amount (Bc) of tokens is forwarded without constraint in every time interval (Tc). For
example, if 8000 bits (Bc) worth of tokens are placed in the bucket every 250 milliseconds
(Tc), the router can steadily transmit 8000 bits every 250 milliseconds if traffic constantly
arrives at the router.


Without any excess bursting capability, if the token bucket fills to capacity (Bc of tokens), the
token bucket will overflow and newly arriving tokens will be discarded. Using the example, in
which the CIR is 32 kb/s (Bc = 8000 bits and Tc = 0.25 seconds), the maximum traffic rate can
never exceed a hard rate limit of 32 kb/s.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-13
Dual Token Bucket Class-Based Policing
This topic describes how traffic can be policed using a dual token bucket scheme.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 11
Dual Token Bucket (Single Rate)
Class-Based Policing
Be: Excess burst size.
Tc: Tokens in Bc bucket.
Te: Tokens in Be bucket.
The return value is conformor exceed or violate.

You can configure class-based traffic policing to support excess bursting capability. With
excess bursting, after the first token bucket is filled to Bc, extra (excess) tokens can be
accumulated in a second token bucket. Excess burst (Be) is the maximum amount of excess
traffic over and above Bc that can be sent during the time interval after a period of inactivity.
With a single rate-metering mechanism, the second token bucket with a maximum size of Be
fills at the same rate (CIR) as the first token bucket. If the second token bucket fills up to
capacity, no more tokens can be accumulated and the excess tokens are discarded.
When using a dual token bucket model, the measured traffic rate can be as follows:
Conforming: There are enough tokens in the first token bucket with a maximum size
of Bc.
Exceeding: There are not enough tokens in the first token bucket, but there are enough
tokens in the second token bucket with a maximum size of Be.
Violating: There are not enough tokens in the first or second token bucket.
With dual token bucket traffic policing, the typical actions performed are sending all
conforming traffic, re-marking (to a lower priority), sending all exceeding traffic, and dropping
all violating traffic. The main benefit of using a dual token bucket method is the ability to
distinguish between traffic that exceeds the Bc but not the Be. This enables a different policy to
be applied to packets in the Be category. Referring to the coin bank example, think of the CIR
as the savings rate ($1 per day). Bc is how much you can save into the bank per day ($1). Tc is
the interval at which you put money into the coin bank (one day). Be ($5) allows you to burst
over the average spending rate of one dollar per day if you are not spending a dollar per day.
7-14 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 12
Dual Token Bucket (Single Rate) Class-
Based Policing (Cont.)
Traffic is conforming, exceeding, or violating

Using a dual token bucket model allows traffic exceeding the normal burst rate (CIR) to be
metered as exceeding, and traffic that exceeds the excess burst rate to be metered as violating
traffic. Different actions can then be applied to the conforming, exceeding, and violating traffic.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-15
Dual-Rate Token Bucket Class-Based Policing
This topic describes how traffic can be policed using a dual-rate metering scheme.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 13
Dual-Rate Class-Based Policing
Tc: Tokens in CIR bucket
Tp: Tokens in PIR bucket
Enforce traffic policing according to two separate rates:
Committed Information Rate
Peak Information Rate

With dual-rate metering, traffic rate can be enforced according to two separate rates: CIR and
peak information rate (PIR). Before this feature was available, you could meter traffic using a
single rate based on the CIR with single or dual buckets. Dual-rate metering supports a higher
level of bandwidth management and supports a sustained excess rate based on the PIR.
With dual-rate metering, the PIR token bucket fills at a rate based on the packet arrival rate, and
the configured PIR and the CIR token bucket fills at a rate based on the packet arrival rate and
the configured CIR.
When a packet arrives, the PIR token bucket is first checked to see if there are enough tokens in
the PIR token bucket to send the packet. The violating condition occurs if there are not enough
tokens in the PIR token bucket to transmit the packet. If there are enough tokens in the PIR
token bucket to send the packet, then the CIR token bucket is checked. The exceeding condition
occurs if there are enough tokens in the PIR token bucket to transmit the packet but not enough
tokens in the CIR token bucket to transmit the packet. The conforming condition occurs if there
are enough tokens in the CIR bucket to transmit the packet.
Dual-rate metering is often configured on interfaces at the edge of a network to police the rate
of traffic entering or leaving the network. In the most common configurations, traffic that
conforms is sent and traffic that exceeds is sent with a decreased priority or is dropped. Users
can change these configuration options to suit their network needs.
7-16 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 14
Dual-Rate Class-Based
Policing (Cont.)
Two-rate policer marks packets as either conforming,
exceeding, or violating a specified rate.
If (B > Tp), the packet is marked as violating the specified rate.
If (B > Tc), the packet is marked as exceeding the specified rate,
and the Tp token bucket is updated as
Tp = Tp B.
If the packet is marked as conforming to the specified rate, both
token buckets (Tc and Tp) are updated as Tp = Tp B and Tc =
Tc B.

In addition to rate limiting, traffic policing using dual-rate metering allows marking of traffic
according to whether the packet conforms, exceeds, or violates a specified rate.
The token bucket algorithm provides users with three different actions for each packet: a
conform action, an exceed action, and an optional violate action. Traffic entering the interface
with two-rate policing configured is placed into one of these categories. Within these three
categories, users can decide packet treatments. For example, a user may configure a policing
policy as follows:
Conforming packets are transmitted. Packets that exceed may be transmitted with a
decreased priority; packets that violate are dropped.
The violating condition occurs if there are not enough tokens in the PIR bucket to transmit
the packet.
The exceeding condition occurs if there are enough tokens in the PIR bucket to transmit the
packet but not enough tokens in the CIR bucket to transmit the packet. In this case, the
packet can be transmitted and the PIR bucket is updated to Tp B remaining tokens, where
Tp is the size of the PIR bucket and B is the size of the packet to be transmitted.
The conforming condition occurs if there are enough tokens in the CIR bucket to transmit
the packet. In this case, the packets are transmitted and both buckets (Tc and Tp) are
decremented to Tp B and to Tc B, respectively, where Tc is the size of the CIR bucket,
Tp is the size of the PIR bucket, and B is the size of the packet to be transmitted.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-17
Example: Dual-Rate Token Bucket as a Coin Bank
Using a dual-rate token bucket is like using two coin banks, each with a different savings rate.
However, you can take out money from only one of the banks at a time.
For example, you can save ten dollars per day into the first coin bank (PIR = peak spending rate
= $10 per day) and then at the same time, you can save five dollars per day into the second
bank (CIR = normal average spending rate = $5 per day). However, the maximum amount you
can spend is $10 per day, not $15 per day, because you can take out money from only one bank
at a time.
In this example, after one day of savings, your first coin bank (PIR bucket) will contain $10 and
your second coin bank (CIR bucket) will contain $5. The three different spending cases are
examined here to show how dual-rate metering operates, using the coin bank example:
Case 1: If you try to spend $11 at once, then you are violating (Tp < B) your peak-
spending rate of $10 per day. In this case, you will not be allowed to spend the $11 because
$11 is greater than the $10 you have in the first coin bank (PIR bucket). Remember, you
can only take out money from one of the banks at a time.
Case 2: If you try to spend $9 at once, then you are exceeding (Tp > B > Tc) your normal
average spending rate of $5 per day. In this case, you will be allowed to spend the $9 and
just the first coin bank (PIR bucket) will be decremented to $10 $9, or $1.
After spending $9, the maximum amount you can continue to spend on that day is
decremented to $1.
Case 3: If you try to spend $4, then you are conforming (Tp > B and Tc > B) to your
normal average spending rate of $5 per day. In this case, you will be allowed to spend the
$4, and both coin banks (PIR and CIR bucket) will be updated.
The first coin bank (PIR bucket) will be updated to $10 $4 = $6, and the second bank (CIR
bucket) will be updated to $5 $4 = $1.
Both coin banks are updated because after spending $4, the maximum amount you can continue
to spend on that day is decremented to $6, and the normal spending rate for that same day is
decremented to $1.
Therefore, after spending $4, the following will occur:
If you continue to spend $7 on that same day, then you will be violating your peak-
spending rate for that day. In this case, you will not be allowed to spend the $7 because $7
is greater than the $6 you have in the first coin bank (PIR bucket).
If you continue to spend $5 on that same day, then you will be exceeding your normal
average spending rate for that day. In this case, you will be allowed to spend the $5 and just
the first coin bank (PIR bucket) will be decremented to $6 $5, or $1.
If you continue to spend 50 cents on that same day, then you will be conforming to your
normal average spending rate for that day. In this case, you will be allowed to spend the 50
cents, and both coin banks (PIR and CIR bucket) will be updated. The first coin bank (PIR
bucket) will be updated to $6 $0.50 = $5.50, and the second coin bank (CIR bucket) will
be updated to $1 $0.50 = $0.50.
7-18 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Class-Based Traffic Shaping
This topic describes how traffic can be shaped using a single token bucket scheme.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 15
Class-Based Traffic Shaping

Cisco class-based traffic shaping only applies for outbound traffic.
Class-based traffic shaping uses the basic token bucket mechanism, in which Bc of tokens are
added at every Tc time interval. The maximum size of the token bucket is Bc + Be. You can
think of the traffic shaper operation like opening and closing of a transmit gate at every Tc
interval. If the shaper gate is opened, the shaper checks to see if there are enough tokens in the
token bucket to send the packet. If there are enough tokens, the packet is immediately
forwarded. If there are not enough tokens, the packet is queued in the shaping queue until the
next Tc interval. If the gate is closed, the packet is queued behind other packets in the shaping
queue.
For example, on a 128-kb/s link, if the CIR is 96 kb/s, the Bc is 12 kb/s, the Be is 0, and the Tc
= 0.125 seconds, then during each Tc (125 ms) interval, the traffic shaper gate opens and up to
12 KB can be sent. To send 12 KB over a 128-kb/s line will only take 91.25 ms. Therefore the
router will, on the average, be sending at three-quarters of the line rate (128 kb/s * 3/4 = 96
kb/s).
Traffic shaping also includes the ability to send more than Bc of traffic in some time intervals
after a period of inactivity. This extra number of bits in excess to the Bc is called Be.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-19
Cisco IOS Traffic Policing and Shaping
Mechanisms
This topic describes the key traffic policing and shaping mechanisms available in Cisco IOS
Software and how each compares to the others.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 16
Cisco IOS Traffic-Policing Mechanisms

The figure lists the characteristics of the class-based traffic-policing mechanism that is
available in Cisco IOS Software. Class-based policing is also available on some Cisco Catalyst
switches.
Class-based policing supports a single or dual token bucket. Class-based policing also supports
single-rate or dual-rate metering and multiaction policing. Multiaction policing allows more
than one action to be applied; for example, marking the Frame Relay DE bit and also the DSCP
value before sending the exceeding traffic.
Class-based policing is configured using Modular QoS command-line interface (CLI), or MQC,
with the police command under the policy map.
7-20 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 17
Cisco IOS Traffic-Shaping Mechanisms

The figure lists some of the different traffic-shaping mechanisms available in Cisco IOS
Software: the newer class-based traffic shaping, Distributed Traffic Shaping (DTS), and FRTS.
Class-based traffic shaping uses MQC to allow traffic to be shaped per traffic class as defined
by the class map. You can use class-based traffic shaping in combination with class-based
weighted fair queuing (CBWFQ), in which the shaped rate is used to define an upper rate limit
while the bandwidth statement within the CBWFQ configuration is used to define a minimum
rate limit.
DTS is a feature that is specific to the higher-end platforms, such as the Cisco 7500 or the
Cisco 12000 series routers. These platforms have the ability to offload traffic shaping from the
main processor to the individual interface processor (VIP or line card). In networks in which
distributed Cisco Express Forwarding is the preferred mode of switching, DTS on the VIP or
line card is the logical choice for implementing traffic shaping.
FRTS is used to shape Frame Relay traffic only. FRTS allows an individual PVC (data-link
connection identifier [DLCI]) to be shaped. FRTS can use priority queuing (PQ), custom
queuing (CQ), or weighted fair queuing (WFQ) as the shaping queue and only supports FIFO
as the software queue.
Both DTS and FRTS support FRF.12 Frame Relay fragmentation, while class-based shaping
does not support FRF.12 fragmentation for Frame Relay.
All these traffic-shaping mechanisms can interact with a Frame Relay network, adapting to
indications of Layer 2 congestion in the WAN. For example, if the BECN bit is received, the
router can lower the rate limit to help reduce congestion in the Frame Relay network. And if the
forward explicit congestion notification (FECN) bit is received, the router can generate a test
frame with the BECN bit set. This enables the sender to notice congestion even if there is no
data traffic flowing back from the receiver to the sender.
Only class-based shaping configurations are described in this module.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-21
Applying Traffic Conditioners
This topic describes the points in a network where rate-limiting can most effectively be
employed.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 18
Applying Rate Limiting

In a typical enterprise network, traffic policing is often implemented at the access or
distribution layer to limit certain traffic classes before that traffic exits the campus onto the
WAN. Traffic shaping is often implemented at the WAN edge when there are speed
mismatches or oversubscription.
In a typical service provider network, traffic policing is often implemented inbound at the
provider edge (PE) router to rate-limit incoming traffic from the customer edge (CE) router to
ensure that the customer traffic rate is not exceeding the contractual rate. Traffic shaping is
often implemented outbound at the PE and at the CE to limit the traffic rate between the PE and
CE and to allow for FRF.12 fragmentation on Frame Relay connections between the PE and
the CE.
7-22 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 22
Traffic Policing and Shaping
with Cisco TelePresence
Traffic Policing and Shaping with
Cisco TelePresence
Policing Cisco TelePresence traffic should generally be avoided whenever
possible. Exceptions include the following:
At the WAN or VPN edge
At the service provider PE routers, in t he ingress direction
At the campus access edge
It is recommended to avoid shaping Cisco TelePresence flows unless absolutely
necessary
Ser vice
Provi der
Campus
Branch
CE CE PE PE
Service Provider
PE Routers
Campus Access Edge
WAN or VPN Edge

Although some exceptions exist, policing Cisco TelePresence traffic should generally be
avoided whenever possible. Cisco TelePresence is highly sensitive to drops (with a 0.05%
packet loss target); therefore, policing its traffic rates could be extremely detrimental to its
flows and could ultimately ruin the high level of user experience that it is intended to deliver.
However, there are three places where Cisco TelePresence traffic may be legitimately policed
over the network.
At the WAN or VPN edge: The first place where Cisco TelePresence traffic may be
legitimately policed automatically occurs if Cisco TelePresence is assigned to a Low-
Latency Queue (LLQ) within Cisco IOS routers at the WAN or VPN edge. This is because
any traffic assigned to an LLQ is automatically policed by an implicit policer set to the
exact value as the LLQ rate. For example, if Cisco TelePresence is assigned an LLQ of 15
Mb/s, it is also implicitly policed by the LLQ algorithm to exactly 15 Mb/s; any excess
Cisco TelePresence traffic is dropped.
Note The implicit policer within the LLQ feature is active only when LLQ is active. LLQ never
engages unless the link is physically congested or a hierarchical QoS shaper forces LLQ to
engage prior to physical link congestion. Therefore, the implicit policer of LLQ never
engages unless there is physical congestion on the link or a hierarchical QoS shaper forces
it to engage prior to physical link congestion.
At the service provider PE routers, in the ingress direction: The second most common
place that Cisco TelePresence is likely to be policed in the network is at the service
provider's PE routers, in the ingress direction. Service providers must police traffic classes,
especially real-time traffic classes, to enforce service contracts and prevent possible
oversubscription on their networks and thus ensure service-level agreements.
At the campus access edge: The third (and optional) place where policing Cisco
TelePresence may prove beneficial in the network is at the campus access edge. You can
deploy access-edge policers for security purposes to mitigate the damage caused by the
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-23
potential abuse of trusted switch ports. Because Cisco TelePresence endpoints can mark its
flows to the recommended 802.1Q/p CoS value (CoS 4) and DSCP codepoint value (CS4),
you may choose to trust the CoS or DSCP values received from these ports.

However, if disgruntled employees gain physical access to the Cisco TelePresence switch
ports, they may send whatever traffic they choose to over these ports, and their flows are
trusted over the network. Such rogue traffic flows may hijack voice or video queues and
easily ruin call or video quality over the QoS-provisioned network infrastructure.

Therefore, you may choose to limit the scope of damage that such network abuse may
present by configuring access-edge policers on Cisco TelePresence switch ports to re-mark
or drop out-of-profile traffic originating on these ports. Supporting this approach, RFC
4594 recommends edge policing the Real-Time Interactive service class via a single-rate
policer.
Note For more information on access edge policers, refer to the Enterprise QoS Solution
Reference Network Design Guide on Cisco.com. The recommended burst parameter for
TelePresence policers is discussed in detail in the Branch QoS Design for TelePresence
section of the Cisco TelePresence Network Systems 2.0 Design Guide on Cisco.com.
It is recommended to avoid shaping Cisco TelePresence flows unless absolutely necessary
because of the QoS objective of shapers themselves. Specifically, the role of shapers is to delay
traffic bursts above a certain rate and to smooth out flows to fall within contracted rates.
Sometimes this is done to ensure that traffic rates are within a carriers Committed Information
Rate (CIR); other times, shaping is performed to protect other data classes from a bursty class.
Shapers temporarily buffer traffic bursts above a given rate and as such introduce jitter as well
as absolute delay. Because Cisco TelePresence is so sensitive to delay and especially jitter, it is
recommended not to shape Cisco TelePresence flows.
If your objective is to meet the CIRs of a carrier, you can achieve your objective by properly
provisioning the adequate bandwidth and burst allowances on the circuit. If your objective is to
protect other traffic classes from Cisco TelePresence bursts, explicitly protecting each class
with a guaranteed minimum bandwidth rate (such as a Cisco IOS CBWFQ) is a better approach
than using shaping. In either case, a shaper would be a sub-optimal tool to meet the desired
objective and would cause quality issues on the Cisco TelePresence flows.
The Cisco TelePresence traffic queue (whether you choose to place it in a CBWFQ or a second
strict priority LLQ) must be provisioned with the proper mean rate (bits per second) and burst
allowance (burst bytes exceeding the mean).
7-24 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 23
Summary
Traffic shaping and policing are mechanisms that use
classification to limit traffic rate.
Traffic shaping queues excess packets to stay within the
contractual rate. Traffic policing typically drops excess traffic to
stay within the limit; alternatively, it can re-mark, then send excess
traffic.
Both traffic policing and shaping ensure that traffic does not
exceed a bandwidth limit, but they have different impacts on the
traffic.
Traffic rate is metered using a token bucket mathematical model.
With traffic policing, new tokens are added into the token bucket
based on the CIR.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 24
Summary (Cont.)
Class-based traffic policing can be configured to support excess
bursting capability. With excess bursting, after the first token
bucket is filled to Bc, extra (excess) tokens can be accumulated
in a second token bucket.
With dual-rate metering, traffic rate can be enforced according
to two separate rates: CIR and PIR.
Class-based traffic shaping uses the basic token bucket
mechanism, in which Bc of tokens are added at every Tc time
interval.
Class-based policing is the latest Cisco IOS traffic-policing
mechanism. Class-based shaping, DTS, and FRTS are three
Cisco IOS traffic-shaping mechanisms.
Policing is often implemented at the access or distribution layer,
while shaping is implemented at the WAN edge.


Lesson 2
Configuring Class-Based
Policing
Overview
Cisco IOS Software supports two different traffic-policing mechanisms: committed access rate
(CAR) and class-based policing. CAR is an older Cisco traffic-policing feature, and class-based
policing is a newer Cisco traffic-policing mechanism based on the modular quality of service
(QoS) command-line interface (CLI), or Modular QoS CLI (MQC). Cisco recommends that
you use MQC features when possible to implement QoS in the network. You should avoid
using traffic-policing configurations with CAR, because no new features or functionality are
planned. However, Cisco will continue to support CAR for existing implementations.
This lesson describes the configuration tasks that are used to implement class-based traffic
policing to rate-limit certain traffic classes.
Objectives
Upon completing this lesson, you will be able to configure class-based policing to rate-limit
traffic. This ability includes being able to meet these objectives:
Explain the key features of class-based policing
Identify the Cisco IOS commands required to configure single-rate class-based policing
Identify the Cisco IOS commands required to configure dual-rate class-based policing
Identify the Cisco IOS commands required to configure percentage-based class-based
policing
Identify the Cisco IOS commands used to monitor class-based policing
7-26 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.
Class-Based Policing Overview
This topic describes the key features of class-based policing.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-2
Class-Based Policing Overview
Class-based policing is used to rate-limit a traffic class to a
configured bit rate.
Class-based policing can drop or re-mark and transmit exceeding
traffic.
Class-based policing can be implemented using a single or dual
token bucket scheme.
Class-based policing supports multiaction policing:
Applying two or more set parameters as a conform or exceed
or violate action
Class-based policing conforms to two RFCs:
RFC 2697, A Single Rate Three Color Marker
RFC 2698, A Two Rate Three Color Marker
Class-based policing is configured using the MQC method.

The class-based policing feature performs these functions:
Limits the input or output transmission rate of a class of traffic based on user-defined
criteria
Marks packets by setting different Layer 2 or Layer 3 markers, or both
You can implement class-based policing using a single or double token bucket method as the
metering mechanism. When the violate action option is not specified in the police MQC
command, the single token bucket algorithm is engaged; when the violate action option is
specified in the police MQC command, the dual token bucket algorithm is engaged.
A dual token bucket algorithm allows traffic to do the following:
Conform to the rate limit when the traffic is within the average bit rate
Exceed the rate limit when the traffic exceeds the average bit rate, but does not exceed the
allowed excess burst
Violate the rate limit when the traffic exceeds both the average rate and the excess bursts
Depending on whether the current packet conforms with, exceeds, or violates the rate limit, one
or more actions can be taken by class-based policing, as follows:
Transmit: The packet is transmitted.
Drop: The packet is dropped.
2009, Cisco Systems, Inc. Traffic Policing and Shaping 7-27
Set IP Precedence (or DSCP value) and transmit: The IP precedence or differentiated
services code point (DSCP) bits in the packet header are rewritten. The packet is then
transmitted. This action can be used to either color (set precedence) or recolor (modify
existing packet precedence) the packet.
Set QoS group and transmit: The QoS group is set and the packet forwarded. Because the
QoS group is only significant within the local router (that is, the QoS group is not
transmitted outside the router), the QoS group setting is used in later QoS mechanisms,
such as class-based weighted fair queuing (CBWFQ), and performed in the same router on
an outgoing interface.
Set MPLS Experimental bits and transmit: The Multiprotocol Label Switching (MPLS)
Experimental bits are set. The packet is then transmitted. These are usually used to signal
QoS parameters in an MPLS cloud.
Set Frame Relay DE bit and transmit: The Frame Relay discard eligible (DE) bit is set in
the Layer 2 (Frame Relay) header and the packet is transmitted. This setting can be used to
mark excessive or violating traffic (which should be dropped with preference on Layer 2
switches) at the edge of a Frame Relay network.
Set ATM CLP bit and transmit: The ATM cell loss priority (CLP) bit is set in the Layer
2 (ATM) header and the packet is transmitted. This setting can be used to mark excessive
or violating traffic (which should be dropped with preference on Layer 2 switches) at the
edge of an ATM network.
Multiaction policing is a mechanism that can apply more than one action to a packet; for
example, setting the DSCP as well as the CLP bit on the exceeding packets.
Class-based policing also supports single- or dual-rate metering. With the two-rate policer,
traffic policing can be enforced according to two separate rates: committed information rate
(CIR) and peak information rate (PIR). You can specify the use of these two rates, along with
their corresponding values, by using two keywords, cir and pir, in the police command.
Cisco class-based policing mechanisms conform to these two DiffServ RFCs:
RFC 2697, A Single Rate Three Color Marker: The Single Rate Three Color Marker
meters an IP packet stream and marks its packets to one of three states: conform, exceed, or
violate. Marking is based on a CIR and two associated burst sizes, a committed burst (Bc)
size and an excess burst (Be) size. A packet is marked conform if it does not exceed the Bc,
exceed if it does exceed the Bc but not the Be, and violate otherwise.
RFC 2698, A Two Rate Three Color Marker: The Two Rate Three Color Marker meters
an IP packet stream and marks its packets to one of three states: conform, exceed, or
violate. A packet is marked violate if it exceeds the PIR. Otherwise a packet is marked
either exceed or conform, depending on whether it exceeds or does not exceed the CIR.
This is useful, for example, for ingress policing of a service where a peak rate needs to be
enforced separately from a committed rate.
7-28 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.
Configuring Single-Rate Class-Based Policing
This topic describes the Cisco IOS Software commands that are required to configure single-
rate class-based policing.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-3
Configuring Single-Rate Class-Based
Policing
avg-rate: Traffic rate in b/s (8000 to 200,000,000)
B
C
: normal burst sets the size in bytes
Default is 1500 bytes or CIR / 32, whichever is higher
B
E
: Excess burst sets the size in bytes
Default is BC
Action:
transmit (default conform action)
drop (default exceed and violate action)
set-prec-transmit ip-precedence
set-dscp-transmit dscp
set-qos-transmit qos-group
set-mpls-exp-transmit mple-exp
set frde-transmit
set-clp-transmit


The MQC-based police command defines policing parameters for a specific traffic class. The
avg-rate parameter defines the policed CIR; Bc and Be define the token bucket sizes in bytes;
and the action defines an action for conforming, exceeding, and optionally violating traffic.
If Bc (in bytes) is not specified, it will default to CIR / 32, or 1500 bytes, whichever is higher.
When using the formula CIR / 32 to calculate the default Bc (in bytes), Cisco IOS Software
uses a Tc of 0.25 second, where:


If Be (in bytes) is not specified, it will default to Bc. In a single token bucket case, Cisco IOS
Software ignores the Be value. This means that excess bursting is disabled.
The Be rate can be specified when a violate action is configured, therefore using a dual token
bucket. This allows Be to be explicitly configured instead of using the default value of Be = Bc.
Be specifies the size of the second (excess) token bucket.
Dual token bucket policing with the violate action was introduced in Cisco IOS Software
Release 12.1(5)T.
The syntax for the police command in Cisco IOS Software Release 12.4 is as follows:


2009, Cisco Systems, Inc. Traffic Policing and Shaping 7-29
Syntax Description
Parameter Description
bps Average rate, in bits per second. Valid values are 8000 to
200,000,000.
burst-normal (Optional) Normal burst size in bytes. Valid values are 1000 to
51,200,000. Default normal burst size is 1500.
burst-max (Optional) Maximum burst size, in bytes. Valid values are 1000 to
51,200,000. Default varies by platform.
conform-action Specifies action to take on packets that conform to the rate limit.
exceed-action Specifies action to take on packets that exceed the rate limit.
violate-action (Optional) Specifies action to take on packets that violate the
normal and maximum burst sizes.
7-30 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.
Parameter Description
action Action to take on packets. Specify one of the following keywords:
dropDrops the packet.
set-clp-transmit valueSets the ATM Cell Loss Priority
(CLP) bit from 0 to 1 on the ATM cell and transmits the
packet with the ATM CLP bit set to 1.
set-cos-inner-transmit valueSets the inner class of
service field as a policing action for a bridged frame on the
Enhanced FlexWAN module when using bridging features on
SPAs with the Cisco 7600 SIP-200 and Cisco 7600 SIP-400
on the Cisco 7600 series router.
set-cos-transmit valueSets the COS packet value and
sends it.
set-discard-class-transmitSets the discard class attribute
of a packet and transmits the packet with the new discard
class setting.
set-dscp-transmit valueSets the IP differentiated services
code point (DSCP) value and transmits the packet with the
new IP DSCP value.
set-dscp-tunnel-transmit valueSets the DSCP value (0
to 63) in the tunnel header of a Layer 2 Tunnel Protocol
Version 3 (L2TPv3) or Generic Routing Encapsulation (GRE)
tunneled packet for tunnel marking and transmits the packet
with the new value.
set-frde-transmit valueSets the Frame Relay Discard
Eligibility (DE) bit from 0 to 1 on the Frame Relay frame and
transmits the packet with the DE bit set to 1.
set-mpls-experimental-imposition-transmit valueSets
the Multiprotocol Label Switching (MPLS) experimental
(EXP) bits (0 to 7) in the imposed label headers and
transmits the packet with the new MPLS EXP bit value.
set-mpls-experimental-topmost-transmit valueSets the
MPLS EXP field value in the topmost MPLS label header at
the input and/or output interfaces.
set-prec-transmit valueSets the IP precedence and
transmits the packet with the new IP precedence value.
set-prec-tunnel-transmit valueSets the precedence
value (0 to 7) in the tunnel header of an L2TPv3 or GRE
tunneled packet for tunnel marking and transmits the packet
with the new value.
set-qos-transmit valueSets the qos-group value and
transmits the packet with the new qos-group value.
transmitTransmits the packet. The packet is not altered.

2009, Cisco Systems, Inc. Traffic Policing and Shaping 7-31
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-4
Class-Based Policing Example:
Single-Rate, Single Token Bucket

The class-based policing configuration example shows two configured traffic classes based on
upstream media access control (MAC) addresses. Traffic from the particular web server, which
is classified by its MAC address, is policed to a fixed bandwidth with no excess burst capability
using a single token bucket. Conforming traffic is sent as-is and exceeding traffic is dropped. In
this case, the www.123.com web server is policed to a rate of 512 kb/s, and the www.456.com
web server is policed to a rate of 256 kb/s.
Because the violate action is not specified, this will use a single token bucket scheme and no
excess bursting is allowed.
In this example, the committed burst size (Bc) is not specified, and therefore it will default to
the 512,000 / 32 (16,000 bytes) and 256,000 / 32 (8000 bytes), respectively.
The default Bc setting can be examined by showing the policy map, as follows. Notice that the
Be is not displayed because no excess bursting is allowed using a single token bucket with
class-based policing.










7-32 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.
Example: Single Rate, Dual Token Bucket Class-Based Policing

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-5
Class-Based Policing Example:
Single-Rate, Dual Token Bucket

The class-based policing configuration example shows two configured traffic classes based on
upstream MAC addresses.
Traffic from the particular web server, which is classified by its MAC address, is policed to a
fixed bandwidth with excess burst capability using a dual token bucket, by configuring a violate
action. Conforming traffic will be sent as-is, exceeding traffic will be marked to IP Precedence
3 and transmitted, and all violating traffic will be dropped.
In this example, because the violate action is specified, a dual token bucket scheme with excess
bursting will be used. The committed burst size (Bc) is not specified, and therefore it will
default to the 512,000 / 32 (16,000 bytes) and 256,000 / 32 (8000 bytes), respectively. The
excess burst size (Be) is also not specified, and therefore it will default to Bc.
The default Bc and Be settings can be examined by showing the policy map, as follows:










2009, Cisco Systems, Inc. Traffic Policing and Shaping 7-33


Example: Multiaction Class-Based Policing

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-6
Class-Based Policing Example:
Multiaction Class-Based Policing
Available in Cisco IOS
Software Release
12.2(8)T
Mainly used for setting
Layer 2 and Layer 3 QoS
fields

The class-based policing configuration is an example of a multiaction class-based policing.
In this case, all Kazaa2 traffic is policed to 56 kb/s. All conforming traffic will be marked with
a DSCP value of 8, and then transmitted. All exceeding traffic will be marked with a DSCP
value of 0, and the CLP bit in the ATM header will also be set before it is transmitted. All
violating traffic will be dropped.
The multiaction feature was introduced in Cisco IOS Software Release 12.2(8)T and is
primarily used so that class-based policing can mark at Layer 2 and Layer 3 at the same time.
7-34 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.
Configuring Dual-Rate Class-Based Policing
This topic describes the Cisco IOS Software commands that are required to configure dual-rate
class-based policing.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-7
Configuring Dual-Rate Class-Based
Policing
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
Available in Cisco IOS Software Release 12.2(4)T



Dual-rate class-based policing was introduced in Cisco IOS Software Release 12.2(4)T. With
dual-rate policing, traffic policing can be enforced according to two separate rates: CIR and
PIR. The use of these two rates can be specified, along with their corresponding values, by
using two keywords, cir and pir, in the police command. The Bc and Be keywords and their
associated arguments (conform-burst and peak-burst, respectively) are optional. If Bc is not
specified, Bc (in bytes) will default to CIR / 32, or 1500 bytes, whichever is higher. If Be is not
specified, Be (in bytes) will default to PIR / 32, or 1500 bytes, whichever is higher.
The syntax for the police command for dual-rate class-based policing in Cisco IOS Software
Release 12.4 is as follows:



2009, Cisco Systems, Inc. Traffic Policing and Shaping 7-35
Syntax Description
Parameter Description
cir Committed information rate (CIR) at which the first token bucket
is updated.
cir Specifies the CIR value in bits per second. The value is a number
from 8000 to 200,000,000.
bc (Optional) Conform burst (bc) size used by the first token bucket
for policing.
conform-burst (Optional) Specifies the bc value in bytes. The value is a number
from 1000 to 51,200,000.
pir (Optional) Peak information rate (PIR) at which the second token
bucket is updated.
pir (Optional) Specifies the PIR value in bits per second. The value is
a number from 8000 to 200,000,000.
be (Optional) Peak burst (be) size used by the second token bucket
for policing.
peak-burst (Optional) Specifies the peak burst (be) size in bytes. The size
varies according to the interface and platform in use.
conform-action (Optional) Action to take on packets that conform to the CIR and
PIR.
exceed-action (Optional) Action to take on packets that conform to the PIR but
not the CIR.
violate-action (Optional) Action to take on packets exceed the PIR.
7-36 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.
Parameter Description
action (Optional) Action to take on packets. Specify one of the following
keywords:
drop: Drops the packet.
set-clp-transmit: Sets the ATM Cell Loss Priority (CLP) bit
from 0 to 1 on the ATM cell and sends the packet with the
ATM CLP bit set to 1.
set-cos-inner-transmit value: Sets the inner class of
service field as a policing action for a bridged frame on the
Enhanced FlexWAN module, and when using bridging
features on SPAs with the Cisco 7600 SIP-200 and Cisco
7600 SIP-400 on the Cisco 7600 series router.
set-dscp-transmit new-dscp: Sets the IP differentiated
services code point (DSCP) value and sends the packet with
the new IP DSCP value setting.
set-dscp-tunnel-transmit value: Sets the DSCP value (0 to
63) in the tunnel header of a Layer 2 Tunnel Protocol Version
3 (L2TPv3) or Generic Routing Encapsulation (GRE)
tunneled packet for tunnel marking and transmits the packet
with the new value.
set-frde-transmit: Sets the Frame Relay discard eligible
(DE) bit from 0 to 1 on the Frame Relay frame and sends the
packet with the DE bit set to 1.
set-mpls-exp-transmit: Sets the Multiprotocol Label
Switching (MPLS) experimental bits from 0 to 7 and sends
the packet with the new MPLS experimental bit value setting.
set-prec-transmit new-prec: Sets the IP precedence and
sends the packet with the new IP precedence value setting.
set-prec-tunnel-transmit value: Sets the precedence value
(0 to 7) in the tunnel header of an L2TPv3 or GRE tunneled
packet for tunnel marking and transmits the packet with the
new value.
set-qos-transmit new-qos: Sets the quality of service (QoS)
group value and sends the packet with the new QoS group
value setting.
transmit: Sends the packet with no alteration.
2009, Cisco Systems, Inc. Traffic Policing and Shaping 7-37
Example: Dual-Rate Class-Based Policing

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-8
Class-Based Policing Example:
Dual-Rate Class-Based Policing

In the example, dual-rate policing is configured on the HTTP traffic class to limit HTTP traffic
to an average committed rate of 500 kb/s and a peak rate of 1 Mb/s.
Conforming traffic will be sent as-is, traffic exceeding 500 kb/s (but not exceeding 1 Mb/s) will
be marked with IP Precedence 3 and then sent, and all traffic exceeding 1 Mb/s will be
dropped.
Because the Bc and Be are not specified, the default Bc in bytes will be CIR / 32 (Tc = 0.25
seconds), or 1500 bytes, whichever is higher. The default Be in bytes will be PIR / 32 (Tc =
0.25 seconds), or 1500 bytes, whichever is higher.
In this example, the default Bc = 500,000 / 32 = 15,625 bytes, and the default Be = 1,000,000 /
32 = 31,250 bytes.
The show policy-map command can be used to display the default settings of the Bc and Be
parameters, as follows:







7-38 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.
Configuring Percentage-Based Class-Based
Policing
This topic describes the Cisco IOS commands that are required to configure percentage-based
class-based policing.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-9
Configuring Percentage-Based
Class-Based Policing
Enables the same policy map for multiple interfaces with different
bandwidths
Available in Cisco IOS Software Release 12.2(13)T





The percentage-based policing feature was introduced in Cisco IOS Software Release
12.2(13)T. Before this feature, traffic policing was configured on the basis of a user-specified
amount of bandwidth available on the interface. Policy maps were then configured on the basis
of that specific amount of bandwidth, meaning that separate policy maps were required for each
interface with a different bandwidth. The percentage-based policing feature provides the ability
to configure traffic policing based on a percentage of bandwidth available on the interface.
Configuring traffic policing and traffic shaping in this manner enables customers to use the
same policy map for multiple interfaces with differing amounts of bandwidth.
Configuring traffic policing based on a percentage of bandwidth is accomplished by using the
police command.
The percentage-based policing feature also provides the option of specifying burst sizes in ms
instead of in bytes when configuring traffic policing based on a percentage of bandwidth.
In the dual-rate percentage-based policing example, the bulk-ftp traffic class is policed to a CIR
of 20 percent and a PIR of 40 percent of the interface bandwidth.
Because Bc and Be are not specified, the default Bc in bytes will be CIR / 32, or 1500 bytes,
whichever is higher. The default Be in bytes will be PIR / 32, or 1500 bytes, whichever is
higher.
2009, Cisco Systems, Inc. Traffic Policing and Shaping 7-39
Example: Configuring Percentage-Based Class-Based Policing
In the example, the CIR is 20 percent and the PIR is 40 percent (with no Bc and Be specified)
and the policy is applied to an Ethernet (10 Mb/s) interface. The CIR and PIR in bits per second
for the Ethernet interface are computed as follows:


The default values of the Bc and Be parameters will automatically be set to these settings:


7-40 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.
Monitoring Class-Based Policing
This topic describes the Cisco IOS commands that are used to monitor class-based policing.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 10
Monitoring Class-Based Policing


Use the show policy-map interface command to examine the policy map that is being applied
to an interface. The output displays the percentage-based policing policy map example shown
in the slide.
The output displays the actual value, calculated by Cisco IOS Software, of CIR and PIR in b/s
and the Bc and Be values in bytes, based on the interface bandwidth and the percentage
configurations.
2009, Cisco Systems, Inc. Traffic Policing and Shaping 7-41
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 11
Traffic Policing and Shaping for IPv6
Similar to traffic policing and shaping for IPv4 packets
Uses same commands used to configure policing and shaping
for IPv4
Police command enhanced to mark both IPv4 and IPv6 packets
when the following keywords are used with the conform-action,
exceed-action, or violate-action options:
set-dscp-transmit
set-prec-transmit

Traffic policing and shaping for IPv6 are similar to their implementations for IPv4 packets, and
the commands used to configure traffic policing and shaping for IPv6 environments are the
same commands as those used for IPv4. Traffic shaping uses flow-based queuing by default.
CBWFQ can be used to classify and prioritize the packets. Class-based policing and generic
traffic shaping or Frame Relay traffic shaping (FRTS) can be used for conditioning and
policing traffic. Although no changes to existing configuration or command usage for policing
are required for use in IPv6 environments, the police command has been enhanced to mark
both IPv4 and IPv6 packets when the following options are used with the conform-action,
exceed-action, or violate-action keywords:
set-dscp-transmit
set-prec-transmit
7-42 Implementing Cisco Quality of Service (QOS) v2.3 2009, Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 12
Summary
Class-based policing is configured using the MQC method and
is used to rate-limit a traffic class to a configured bit rate.
Class-based policing can use a single or dual token bucket
metering scheme. If a violate action is configured, a dual token
bucket will be used.
Class-based policing supports single- or dual-rate metering.
Dual-rate metering allows metering of traffic based on two rates
(the PIR and the CIR).
Class-based policing supports single actions or multiactions.
Multiaction allows the marking of Layer 2 and Layer 3 information
at the same time.
Cisco IOS Software can automatically calculate an optimal value
of Bc and Be based on the configured policed rate.


Lesson 3
Configuring Class-Based
Shaping
Overview
Traffic shaping allows you to control outgoing traffic on an interface to match the speed of
transmission to the speed of the remote interface, and to ensure that the traffic conforms to
administrative quality of service (QoS) policies. You can shape traffic adhering to a particular
profile to meet downstream requirements, thereby eliminating bottlenecks due to data-rate
mismatches.
This lesson describes the tasks that are used to configure class-based traffic shaping in order to
rate-limit certain traffic classes.
Objectives
Upon completing this lesson, you will be able to configure class-based shaping to rate-limit
traffic. This ability includes being able to meet these objectives:
Explain the key features of class-based shaping
Explain how the two rate limitsaverage rate and peak ratecan be used to rate-limit
traffic
Identify the Cisco IOS Software commands required to configure class-based shaping
Identify the Cisco IOS Software commands used to monitor class-based shaping
7-44 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Class-Based Shaping Overview
This topic describes the key features of class-based shaping.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-2
Class-based shaping is used to rate-limit packets.
Class-based shaping delays exceeding packets rather than dropping them.
Class-based shaping has no marking capabilities.
Class-based shaping is a version of generic traffic shaping using MQC.
Class-Based Shaping Overview

Traffic shaping allows you to control the traffic going out from an interface in order to match
its transmission speed to the speed of the remote, target interface, and to ensure that the traffic
conforms to policies contracted for it. You can shape traffic adhering to a particular profile to
meet downstream requirements, thereby eliminating bottlenecks in topologies with traffic-rate
mismatches or oversubscriptions. Class-based shaping has these properties:
Class-based shaping, a version of generic traffic shaping, is configured via MQC.
Class-based shaping has no packet-marking capabilities.
Class-based shaping works by queuing exceeding packets until the packets conform to the
configured shaped rate.
Class-based shaping can also be used within the class-based weighted fair queuing
(CBWFQ) queuing system. When operating within CBWFQ, the shaped rate provides an
upper bandwidth limit while the bandwidth statement within CBWFQ provides a minimum
bandwidth guarantee.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-45
Traffic Shaping Methods
This topic describes how the two rate limitsaverage rate and peak ratecan be used to rate-
limit traffic.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-3
Traffic Shaping Methods
Class-based shaping has two shaping methods:
Shaping to the configured average rate
Shaping to the peak rate
Shaping to the average rate means forwarding packets at the
configured average rate with allowed bursting up to Be when
there are extra tokens available. This is the more common
method used.
Shaping to the peak rate means forwarding packets at the peak
rate of up to Bc + Be of traffic at every Tc. However, traffic sent
above the CIR may be dropped during network congestion. Peak-
rate shaping is recommended when:
Network has additional bandwidth available
Application tolerates occasional packet loss

Class-based shaping can be configured in these two ways:
Shaping to the configured average rate: Shaping to the average rate forwards up to a
committed burst (Bc) of traffic at every committed time window (Tc) interval, with
additional bursting capability when enough tokens are accumulated in the bucket. Bc of
tokens are added to the token bucket at every Tc time interval. After the token bucket is
emptied, additional bursting cannot occur until tokens are allowed to accumulate, which
can occur only during periods of silence or when transmit rate is lower than average rate.
After a period of low traffic activity, up to Bc + excess burst (Be) of traffic can be sent.
Shaping to the peak rate: Shaping to the peak rate forwards up to Bc + Be of traffic at
every Tc time interval. Bc + Be of tokens are added to the token bucket at every Tc time
interval. Shaping to the peak rate sends traffic at the peak rate, which is defined as the
average rate multiplied by (1 + Be/Bc). Sending packets at the peak rate may result in
dropping in the WAN cloud during network congestion. Shaping to the peak rate is
recommended only when the network has additional available bandwidth beyond the CIR
and applications can tolerate occasional packet drops.
Average rate-shaping is the more common approach being deployed.
7-46 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring Class-Based Shaping
This topic describes the Cisco IOS commands that are required to configure class-based
shaping.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-4
Configuring Class-Based Shaping
It is recommended that you omit the Bc and Be to let Cisco IOS
Software select the optimal values for these variables.
Specifies the bandwidth percentage. Valid range is a number from
1 to 100.
It is recommended that you omit the Bc and Be to let Cisco IOS
Software select the optimal values for these variables.
The shape (percent) command cannot be configured for use in
nested policy maps on Cisco 7500 Series routers or below.


The shape average and shape peak commands configure average and peak shaping,
respectively. The Bc and Be value in bits can be explicitly configured, or Cisco IOS Software
can automatically calculate their optimal value. It is not recommended that you configure the
Bc and Be in order to let the Cisco IOS algorithm determine the best Bc and Be value to use.
Class-based traffic shaping uses a single token bucket with a maximum token bucket size of Bc
+ Be.
The shape percent command is often used in conjunction with the bandwidth and priority
commands. The bandwidth and priority commands can be used to calculate the total amount
of bandwidth available on an entity (for example, a physical interface). When the bandwidth
and priority commands calculate the total amount of bandwidth available on an entity, the total
bandwidth is the bandwidth on the physical interface.
The shape max-buffers command (not shown) specifies the maximum size of the shaping
queue. The shaping queue will queue excess packets until the packets conform to the shaping
rate. If the shaping queue is full, packets are tail-dropped. The default max-buffer size is 1000
packets and is usually not changed.
Note The syntax for these commands may vary by platform. For the exact syntax for your router
platform, refer to the Cisco IOS Master Command List, Release 12.4, on Cisco.com.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-47
Example: Average Rate, Peak Rate

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-5
Cisco IOS Software calculated values:
Bc = Be = 8000 bits, Tc = 500 ms
Peak Rate = AvgRate * (1 + Be / Bc)
= 16000 * (1 + 8000 / 8000)
= 32000 b/s
Class-Based Shaping Example:
Average Rate, Peak Rate




The figure shows an example configuration for standalone class-based shaping (no CBWFQ).
Citrix traffic is classified into the Shape class.
The Shape class is then shaped to different rates on two interfaces:
On the Serial 0/0 interface, traffic is shaped to the average rate. The Bc and Be values are
not configured, allowing Cisco IOS Software to automatically calculate their optimal
values.
The Citrix traffic is shaped to the average rate of 16,000 b/s. The resulting automatically
determined Be and Bc values will both be 8000 bits with a Tc of 500 ms.
On the Serial 0/1 interface, the Citrix traffic is shaped to the peak rate. Because the Be and
Bc are not specified, Cisco IOS Software automatically calculates the optimal value for Tc,
Bc, and Be. The shape statement is shape peak 16000. The resulting automatically
determined Be and Bc values will each be 8000 bits with a Tc of 500 ms. Therefore, the
peak rate will be as follows:



7-48 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Showing the policy map on the interface will display the average rate, peak rate, Bc, Be, and Tc
values:






















2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-49
Example: Class-Based Shaping with CBWFQ

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-6
Class-Based Shaping Example:
Class-Based Shaping with CBWFQ
Bandwidth statement provides a minimum bandwidth guarantee
for the traffic class.
Shape statement provides a maximum traffic rate for the traffic
class, and exceed traffic is queued.




Class-based shaping can be used in combination with CBWFQ. The shape rate provides a
maximum rate limit for the traffic class, while the bandwidth statement within CBWFQ
provides a minimum bandwidth guarantee.
In the example, the cust1 traffic class is shaped to an average rate of 384 kb/s, and is
guaranteed a minimum of 256 kb/s by the CBWFQ bandwidth statement. Because the Bc and
Be are not specified, they will be automatically calculated by the Cisco IOS Software.
7-50 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Class-Based Shaping Hierarchical Policy Maps

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-7
Class-Based Shaping Example:
Class-Based Shaping Hierarchical Policy Maps

The example uses hierarchical policy maps and configures CBWFQ inside the class-based
shaping.
The parent policy is the shape-all policy. This parent policy references a child policy named
child-cbwfq.
The parent policy map shape-all specifies an average shape rate of 384 kb/s for all the traffic
(matched by class-default) and assigns the service policy called child-cbwfq as the child policy.
The shaped traffic is further classified into three distinct traffic subclasses:
subclass-x: The subclass-x class is configured to have a minimum guarantee equal to 50
percent of the shaped bandwidth.
subclass-y: The subclass-y class is configured to have a minimum guarantee equal to
20 percent of the shaped bandwidth.
subclass-z: The subclass-z class is configured to have a minimum guarantee equal to 10
percent of the shaped bandwidth.
For example, in a service provider implementation, all traffic going to a specific customer edge
router on the S0/0 interface is shaped, then further classified as follows:
subclass-x class for interactive traffic
subclass-y class for business-critical traffic
subclass-z class for bulk traffic
The traffic going out to that specific customer edge router over the S0/0 interface is rate-limited
to 384 kb/s total. The interactive traffic has a minimal guarantee of 192 kb/s (384 x 0.5), the
business-critical traffic has a minimal guarantee of 76.8 kb/s (384 x 0.2), and the bulk traffic
has a minimal guarantee of 38.4 kb/s (384 x 0.1).
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-51
Monitoring Class-Based Shaping
This topic describes the Cisco IOS commands that are used to monitor class-based shaping.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-8
Monitoring Class-Based Shaping
Displays information about the indicated policy map, including the
configuration of all classes for a specified service policy map








The show policy-map command displays the policy-map configuration.
The output represents the CBWFQ in conjunction with the class-based shaping configuration
example shown earlier, in which the cust1 traffic class is shaped to an average rate of 384 kb/s,
with a default buffer limit of 1000 packets and a minimum bandwidth guarantee of 256 kb/s.
7-52 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-9
Monitoring Class-Based Shaping (Cont.)










The show policy-map interface command displays all service policies that are applied to the
interface.
The output represents the CBWFQ in conjunction with the class-based shaping configuration
example shown earlier, where the cust1 traffic class is shaped to an average rate of 384 kb/s
and has a minimum bandwidth guarantee of 256 kb/s.
Among the settings shown are the class-based shaping parameters like Be, Bc, and Tc, and
other statistics.
In the example, the shape average rate is 384 kb/s and the automatically calculated values for
Bc and Be are 7872 bits each, with a Tc of 207 ms.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-53
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 10
Summary
Class-based shaping delays exceeding packets rather than
dropping them and has no marking capabilities.
Class-based shaping can shape to the configured average rate
or to the peak rate for packets satisfying the match criteria for a
class. Peak rate = Average rate * (1 + Be / Bc).
Class-based shaping is configured using the MQC and various
shape commands.
The show policy-map interface command displays the
class-based traffic-shaping statistics.

7-54 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 4
Configuring Class-Based
Shaping on Frame Relay
Interfaces
Overview
Frame Relay traffic shaping (FRTS) builds upon existing Frame Relay support of forward
explicit congestion notification (FECN) and backward explicit congestion notification (BECN)
on Cisco routers by adding new capabilities that improve the scalability and performance of a
Frame Relay network. FRTS can help eliminate bottlenecks in Frame Relay networks that
consist of high-speed connections at a central hub site and low-speed connections at branch
spoke sites. Using FRTS, you can configure rate enforcement to either the committed
information rate (CIR) or some other defined value such as the excess information rate on a
permanent virtual circuit (PVC) basis. This lesson describes the tasks that are used to configure
class-based traffic shaping in order to rate-limit certain traffic classes on Frame Relay
interfaces.
Objectives
Upon completing this lesson, you will be able to configure class-based shaping on Frame Relay
WAN interfaces to rate-limit traffic. This ability includes being able to meet these objectives:
Explain the purpose of the Frame Relay FECN, BECN, and the DE bit
Explain the use of FECN and BECN as a Frame Relay congestion control mechanism
Explain how class-based shaping can adapt dynamically to available Frame Relay
bandwidth by integrating BECN signals
Explain the FECN-to-BECN propagation mechanism
Identify the Cisco IOS commands required to configure Frame Relay adaptive class-based
shaping on Frame Relay interfaces
Identify the Cisco IOS commands used to monitor class-based shaping on Frame Relay
interfaces
7-56 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Frame Relay Refresher
This topic describes the purpose of the Frame Relay FECN, BECN, and the DE bit.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-2
Frame Relay Refresher
Frame Relay explicit congestion notification
FECN
BECN
Set by the Frame Relay switch to notify an end device of
congestion in the network
Implicit congestion notification
Provides a signal to the Frame Relay network to determine
which frames to discard
DE bit

When the Frame Relay network becomes congested to the point that it cannot process new data
transmissions, it begins to discard frames. These discarded frames are detected and then
retransmitted by higher-layer protocols, thus causing more congestion. In an effort to prevent
this situation, several mechanisms have been developed to notify user devices at the onset of
congestion, so that the offered load may be reduced.
Frame Relay performs congestion notification to its Layer 2 endpoints (Frame Relay DTE) by
including congestion signaling inside the Layer 2 frame headers. The FECN, BECN, and
discard eligible (DE) bits in the Q.922 header of the frame provide in-band congestion
signaling.
The FECN and BECN bits are set by a Frame Relay switch to notify an end device (Frame
Relay DTE, which may be a router) that the end device should initiate congestion avoidance
procedures.
When there is congestion, the network must decide which frames to discard. The DE bit
provides the network with a signal to help determine which frames to discard. The DE bit
indicates that a frame may be discarded in preference to other frames, if congestion occurs, to
maintain the committed quality of service (QoS) within the network. The DE bit may be set by
the user on lower-priority frames. Alternatively, the network may set the DE bit to indicate to
other nodes that a frame should be preferentially selected for discard, if necessary.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-57
Frame Relay Congestion Control
This topic describes the use of FECN and BECN as Frame Relay congestion control
mechanisms.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-3
Frame Relay Congestion Control
Frame Relay switch detects congestion on output queue and informs:
The receiver, by setting the FECN bit on forwarded frames
The source, by setting the BECN bit on frames going in the opposite
direction

A Frame Relay switch can explicitly report congestion in two directions: forward and
backward.
When a frame queue inside a switch is congested, the switch will generate congestion signals
based on the FECN and BECN bits. If congestion occurs in a queue transmitting toward the
main receiver of traffic, FECN signals are sent to the receiving Layer 2 endpoint and BECN
signals are sent to the sending Layer 2 endpoint.
FECN and BECN bits are not sent as separate frames, but use bits in the header of data frames.
7-58 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Frame Relay Congestion Adaptation
This topic describes how class-based shaping can adapt dynamically to available Frame Relay
bandwidth by integrating BECN signals.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-4
Frame Relay Congestion Adaptation
Class-based shaping can adapt dynamically to available
Frame Relay bandwidth by integrating BECN signals:
The bit rate is reduced when BECN packets are received to
reduce the data flow through a congested Frame Relay network.
The bit rate is gradually increased when the congestion is no
longer present (BECN packets are no longer received).

Class-based shaping is able to respond to Layer 2 congestion in the Frame Relay network by
reducing its shaping rate to three-quarters of the current rate, until the Layer 2 Frame Relay
network recovers from congestion. When BECN flags are no longer received, the rate is slowly
increased to the original shaping rate.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-59
FECN-to-BECN Propagation
This topic describes the FECN-to-BECN propagation mechanism.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-5
FECN-to-BECN Propagation

Another adaptation method, FECN-to-BECN propagation, configures a router Frame Relay
subinterface to reflect received FECN bits as BECN in Q.922 Test Response messages. This
enables the sender to notice congestion in the Layer 2 Frame Relay network, even if there is no
data traffic flowing from the receiver back to the sender.
7-60 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Configuring Frame Relay Adaptive Class-Based
Shaping
This topic describes the Cisco IOS commands that are required to configure Frame Relay
adaptive class-based shaping on Frame Relay interfaces.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-6
Configuring Frame Relay
Adaptive Class-Based Shaping
Adapts the shaping rate when BECN bits are received.
min-rate: Each BECN bit causes the shaping rate to be reduced to
three-quarters of the previous rate but not below the min-rate.
This command has effect only if used on Frame Relay interfaces.
Responds to FECN bits by creating test frames in the opposite
direction with the BECN bit set.


The shape adaptive command configures the class-based shaping system to adapt the shaping
rate to BECN indications.
The min-rate (also called min-cir) parameter specifies the minimum shaping rate that is
allowed. Typically, this is set to the CIR guaranteed for the traffic class when there is
congestion in the network. Additional information about BECN integration is as follows:
If a router receives any BECNs during the current time interval, the router decreases the
transmit rate by 25 percent. The router will continue to decrement with each BECN
(limited to one decrement per time interval) until the traffic rate gets to min-rate, where
transmit-rate ceases to decrease any further.
After the traffic rate has decreased, it takes 16 time intervals of receiving no BECNs to start
to increase traffic again. The traffic increases by (Be + Bc) / 16. Thus, traffic takes much
longer to get back to CIR than it did to drop to min-rate (similar to slow start in TCP/IP).
The shape fecn-adapt command configures the class-based shaping system to respond to
FECN-marked frames with BECN test frames.
Note The syntax shown in the figure for the shape adaptive and shape fecn-adapt commands is
compatible with the syntax for these commands in Cisco IOS Software Release 12.4.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-61
Example: Class-Based Shaping with Frame Relay Adaptation
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-7






MQC-Based Frame Relay Traffic Shaping
Example
This feature was already available for routers in the Cisco 7500
Series and above product range. In the Cisco IOS Release
12.2(13)T, it became available on lower-end platforms (Cisco 1700,
2500, 2600, 7200, and 7400 Series routers; Cisco 3620, 3631, 3640,
3660, 3725, and 3745 routers).

The example shows a typical MQC-based Frame Relay traffic shaping with CBWFQ
configuration using hierarchical policy maps.
This is similar to hierarchical policy maps with class-based shaping. The difference is where
the parent policy map with the shape command is applied. In class-based shaping, the parent
policy map is applied to the main serial interface. With MQC-based Frame Relay traffic
shaping, the parent policy map is applied to the Frame Relay PVC via a Frame Relay map-
class.
If the MQC-based Frame Relay traffic-shaping feature is used, the shaping rate that was
configured in the parent policy map using MQC will be used as the total available bandwidth
for all traffic classes under the child policy map, if CBWFQ or low-latency queuing (LLQ) is
configured. If both the shape average and shape adaptive commands are used for traffic
shaping, the available bandwidth will be based on the parameters specified by the shape
adaptive command.
In the example, all traffic out of the Frame-Relay PVC data-link connection identifier (DLCI)
100 (matched by class-default) will be shaped using the parent-shape policy map to an average
rate of 192 kb/s. When the BECN bit is detected, the shape rate will start throttling down to a
min-rate of 96 kb/s. The parent-shape policy map is applied to the Frame Relay map class
called shape in this example.
In traditional (non MQC-based) FRTS configurations, all FRTS parameters such as CIR, Bc,
Be, and minimum CIR (minCIR) are all defined within the Frame Relay map class.
After the aggregate traffic is shaped, the parent-shape policy map references the child-cbwfq
policy map, where the two traffic classes (class interactive and class bulk) are defined with
different minimum bandwidth guarantees using CBWFQ. The class interactive traffic will have
a minimum bandwidth guarantee of 32 kb/s, and the class bulk traffic will have a minimum
bandwidth guarantee of 24 kb/s.
7-62 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Monitoring MQC-Based Frame Relay Traffic
Shaping
This topic describes the Cisco IOS commands that are used to monitor MQC-based shaping.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-8








Monitoring MQC-Based Frame Relay


Traffic Shaping

The show policy-map interface command is used to display the parent policy shaping statistics
as well as the child policy CBWFQ statistics.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-63
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-9











Monitoring MQC-Based Frame Relay
Traffic Shaping (Cont.)

The figure is the continuation of the previous show policy-map interface output.
Example: MQC-Based Frame Relay Traffic Shaping on
Multipoint Main Interface
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 10






MQC-Based Frame Relay Traffic Shaping
Example on Multipoint Main Interface

The example shows a typical MQC-based Frame Relay traffic shaping with CBWFQ
configuration using hierarchical policy maps being applied to a multipoint Frame Relay main
interface.
7-64 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Use the show policy-map interface command to display the parent policy-shaping statistics as
well as the child policy CBWFQ statistics.

































































2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-65












































7-66 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 11
Summary
The FECN, BECN, and DE bits in the Q.922 header of the frame
provide in-band congestion control.
A Frame Relay switch detecting congestion on the output queue
informs the receiver by setting the FECN bit on forwarded frames;
the receiver reacts by setting the BECN bit on frames going
toward the source.
Class-based shaping can adapt dynamically to available Frame
Relay bandwidth by integrating BECN signals.
FECN-to-BECN propagation enables a router Frame Relay
interface to reflect received FECN bits as BECN in Q.922 Test
Response messages if no data frames are sent in the backward
direction.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 12
Summary (Cont.)
The shape adaptive command configures the class-based
shaping system to adapt the shaping rate based on BECN
indications.
The shape fecn-adapt command configures FECN-to-BECN
propagation.
The show policy-map interface command displays the Frame
Relay class-based shaping statistics.


Lesson 5
Frame Relay Voice-Adaptive
Traffic Shaping and
Fragmentation
Overview
Prior to Cisco IOS Software Release 12.2(15)T, adaptive shaping could be configured only to
shape traffic rates sent to a Frame Relay cloud if congestion notifications such as backward
explicit congestion notification (BECN) or forward explicit congestion notification (FECN)
were received. However, in the case of voice traffic, by the time such congestion notifications
were received by the sending shaper, the VoIP packet might already have been delayed or
dropped. Furthermore, if fragmentation were required on slow-speed data-link connection
identifiers (DLCIs), FRF.12 was enabled permanently, regardless of whether voice traffic was
present.
As an alternative to congestion-adaptive traffic-shaping, Frame Relay voice-adaptive traffic
shaping was introduced in Release 12.2(15)T. Frame Relay voice-adaptive traffic shaping
enables adaptive shaping, a rating down to minimum committed information rate (CIR), or
minCIR, and the enabling of FRF.12 fragmentation and interleaving only when voice activity is
detected on the Frame Relay DLCI. Voice activity is perceived by the presence of packets in
the low-latency queueing (LLQ), or the presence of H.323 signaling packets. When voice
activity is no longer present, fragmentation is deactivated (after a specified interval) and the
shaper resumes shaping to CIR (not minCIR). By default, Frame Relay voice-adaptive traffic
shaping deactivates 30 seconds after voice activity is no longer detected, but this timeout period
can be administratively tuned with the deactivation keyword and value. This lesson describes
the features and functionality of Frame Relay voice-adaptive traffic shaping.
7-68 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Objectives
Upon completing this lesson, you will be able to configure voice-adaptive traffic shaping and
fragmentation on Frame Relay WAN interfaces. This ability includes being able to meet these
objectives:
Describe the Frame Relay voice-adaptive traffic shaping and fragmentation feature
Describe the benefits from deploying voice-adaptive traffic shaping and fragmentation
Describe the prerequisites for deploying voice-adaptive traffic shaping and fragmentation
List the router platforms that support Frame Relay voice-adaptive traffic shaping
Describe how the voice-adaptive traffic shaping and fragmentation feature works over a
Frame Relay PVC
Describe the steps in configuring voice-adaptive traffic shaping and fragmentation
Using Cisco IOS Software CLI commands, monitor voice-adaptive traffic over a Frame
Relay WAN
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-69
Frame Relay Voice-Adaptive Traffic Shaping and
Fragmentation
This topic describes Frame Relay voice-adaptive traffic shaping and fragmentation.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-2
Frame Relay Voice-Adaptive Traffic
Shaping and Fragmentation
Engaged during congestion
Mechanism activation and deactivation of traffic shaping and
fragmentation
Traffic is shaped to minimum CIR
Fragmentation per FRF.12
When not engaged, data can burst to line speed

To address the needs of voice traffic in a Frame Relay network in which shaping is desired only
when voice is present, but otherwise bursting to port-speed is desired, you can configure the
Frame Relay voice-adaptive traffic shaping feature. This feature was introduced in Cisco IOS
Software Release 12.2(15)T.
Frame Relay voice-adaptive traffic shaping monitors the Frame Relay permanent virtual circuit
(PVC), and when voice activity is present, this feature automatically shapes the CIR to the
minCIR. If no voice is present, the voice adaptive feature is turned off, allowing the data traffic
to burst to the line rate, which is the CIR. The voice adaptive feature determines the presence of
voice based on packets entering a low-latency queue. The feature then automatically turns
traffic shaping on or off. Similarly, the Frame Relay voice-adaptive traffic shaping feature is
triggered on Frame Relay Fragmentation (FRF.12) on links less than 768 kbps when voice
packets are present to prevent unnecessary serialization delays.
Because Frame Relay voice-adaptive traffic shaping automatically detects the presence of
voice, there could be brief quality degradation in the first couple of seconds of the first voice
call made across a PVC. This occurs while the interfaces in the PVC reconfigure themselves to
shape to the minimum CIR and empty out their buffers. Frame Relay voice-adaptive traffic
shaping is not a predictive algorithm, and the change in behavior is triggered by voice packets
flowing across the PVC or the presence of H.323 call-setup signaling.
7-70 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
The Frame Relay voice-adaptive traffic shaping deactivation period is tunable and, by default,
is set to 30 seconds. If you tune it, you should set the timer so that the feature will not turn off
frequently during normal business use (for example, between every two calls). The feature
works better on PVCs that always have at least one voice call present during daytime use and
relinquish shaping only at night.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-71
Benefits in Deploying Frame Relay Voice-
Adaptive Traffic Shaping
This topic describes the benefits of deploying Frame Relay voice-adaptive traffic shaping.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-3
Benefits of Deploying Frame Relay
Voice-Adaptive Traffic Shaping
Prevents delay of voice packets during congestion
Maximizes utilization of PVC
Reduces router CPU utilization

Before the introduction of the Frame Relay voice-adaptive traffic shaping feature, Frame Relay
adaptive shaping was used to reduce the sending rate when a network was congested. Because
the adaptive shaping mechanism was triggered by network congestion, voice traffic might
already have been delayed by the time the sending rate was reduced. The Frame Relay voice-
adaptive traffic shaping and fragmentation feature helps to ensure voice quality by adjusting the
rate of traffic based on the presence of voice on the PVC.
Frame Relay voice-adaptive traffic shaping and fragmentation provides these benefits:
Prevents delay of voice packets when network congestion occurs by reducing the traffic
rate to the minCIR and turning on fragmentation when voice packets are present on a PVC
Maximizes utilization of the PVC by increasing the traffic rate to the CIR when voice
packets are not present
Reduces CPU utilization by turning off fragmentation when there are no voice packets
present
7-72 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Prerequisites for Deploying Frame Relay Voice-
Adaptive Traffic Shaping
This topic describes the prerequisites for deploying Frame Relay voice-adaptive traffic shaping.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-4
Prerequisites in Deploying Frame Relay
Voice-Adaptive Traffic Shaping
Traffic shaping:
Traffic shaping and LLQ must be configured using MQC.
Link fragmentation:
End-to-end fragmentation must be configured in a map or on
the interface.
LLQ must be configured.
End-to-end fragmentation must be configured on peer router.

A prerequisite for Frame Relay voice-adaptive traffic shaping is that traffic shaping and LLQ
must be configured using the Modular quality of service (QoS) command-line interface (CLI),
or MQC.
Prerequisites for Frame Relay voice-adaptive fragmentation are as follows:
End-to-end fragmentation must be configured in a map class or on the interface.
Frame Relay traffic shaping or traffic shaping using the MQC must be configured. If end-
to-end fragmentation is configured on the interface, traffic shaping must be configured
using the MQC.
LLQ must be configured.
End-to-end fragmentation must be configured on the peer router. Although the peer router
may not see the fragmented packets that are expected from the router doing voice-adaptive
fragmentation, the peer router will be able to handle large, unfragmented packets in
addition to fragmented packets.
Note The feature supports FRF.12 fragmentation only. Neither FRF.11 Annex C nor Cisco
proprietary fragmentation is supported.

2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-73
Supported Platforms
This topic describes the router platforms that support Frame Relay voice-adaptive traffic
shaping.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-5
Supported Platforms
Introduced in Cisco IOS Software Release 12.2(15)T
Cisco 1700 Series Modular Access Routers
Cisco 2600 and 3600 Series Multiservice Platforms
Cisco 2600XM Series Multiservice Router
Cisco 2800 and 3800 Series Integrated Services Routers
Cisco 3700 Series Multiservice Access Routers
Cisco 4500 Series Switches
Cisco 7200, 7400, and 7500 Series Routers
Not supported on Versatile Interface Processors (VIPs)

The figure lists the Cisco router platforms that support Frame Relay voice-adaptive traffic
shaping.
7-74 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Frame Relay Voice-Adaptive Traffic Shaping and
Fragmentation Operation
This topic describes how priority packets and H.323 call setup signaling packets trigger the
Frame Relay voice-adaptive traffic shaping and fragmentation feature.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-6
Frame Relay Voice-Adaptive Traffic
Shaping and Fragmentation Operation
Packets detected in the priority queue or the detection of
H.323 call-setup signaling will engage the voice-adaptive
traffic shaping and fragmentation mechanism.

The figure shows how Frame Relay voice-adaptive traffic shaping is engaged and what occurs
on the interface in order for the Frame Relay voice-adaptive traffic shaping feature to be used.
After being configured, the Frame Relay voice-adaptive traffic shaping feature is automatically
triggered, throttling back CIR to minCIR, if packets enter the LLQ or if H.323 call-setup
signaling is detected. As packets enter the strict priority queue and the circuit is reshaped,
fragmentation is engaged at Layer 2 so that priority packets are interleaved with the fragmented
data packets. When the strict priority queue is void of packets, the Frame Relay circuit is
reshaped back to its CIR, when data packets can burst to CIR or line speed depending on the
service level agreement (SLA). Reshaping to the CIR only occurs when there are no strict
priority packets in the queue, and in the absence of H.323 call-setup signaling.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-75
Configuring the Frame Relay Voice-Adaptive
Feature
This topic describes how to configure voice adaptation with end-to-end fragmentation on the
interface.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-7
Configuring Voice Adaptation with
End-to-End Fragmentation on the Interface












(Enables FR-VATS [default ti mer])
(FR-VATS + FRF.12)
(Binds voice_adapti ve_cl ass to the DLCI)
(FRF.12 fragment for 384 kb/s PVC on the interface)
(CIR = 95% of PVC [768 kb/ s], Bc to minCI R / 100, Be = 0)
(Sets minimum CIR to 95% of 384 kb/s)
(Embedded LLQ to policy)
(Strict Pri ority)
(Embeds FR-VATS feature to map-class)

The figure shows an example of how to configure voice adaptation and end-to-end
fragmentation on the interface. Notice that the strict priority queue which is used by Frame
Relay voice-adaptive traffic shaping is configured within the policy map VOICE-TRAFFIC-
SHAPING and that policy is embedded within the traffic shaper policy map TRAFFIC-
SHAPE, where the voice-adaptive feature is enabled. In order to tie the voice-adaptive feature
to the interface, the policy map TRAFFIC-SHAPE must be embedded into the Frame Relay
map-class voice-adaptive-class. Data-link Connection Identifier (DLCI) 100 is bound to the
voice-adaptive feature through the map-class voice-adaptive-class The end-to-end
fragmentation configuration can be seen on the interface, and is enabled by the command
frame-relay fragment 80 end-to-end The end-to-end fragmentation configuration requires
that the peer router have the same end-to-end fragmentation configuration.
7-76 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-8
Configuring Voice Adaptation with End-to-
End Fragmentation Through a Map-Class














(Enabl es FR-VATS with defaul t timer)
(Binds voice_adaptive_class to the DLCI)
(FRF. 12 fragment for 384 kb/s PVC through the map-class)
(FR-VATS + FRF. 12)
(CIR=95% of PVC [768 kb/s] Bc to minCIR / 100 Be = 0)
(Sets minimum CI R to 95%of 384 kb/s)
(Embedded LLQ to poli cy)
(Strict Priority)
(Embeds FR-VATS feature to map-class)

The figure shows an example of how to configure the voice-adaptive feature and end-to-end
fragmentation on the interface. The only difference between this figure and the previous figure
is that end-to-end fragmentation on the previous figure was configured on the interface, and in
this example the fragmentation is enabled by being embedded within the Frame Relay map
class.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-77
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-9
Configuring Traffic Shaping and
End-to-End Fragmentation: Caveats
Frame Relay voice-adaptive traffic shaping:
Can coexist with adaptive traffic shaping
Can be used with or without voice-adaptive fragmentation
Frame Relay voice-adaptive fragmentation:
Can coexist with adaptive traffic shaping
Can be used with or without voice-adaptive traffic shaping
Frame Relay voice-adaptive traffic shaping and fragmentation will
respond to any packets, voice or data, in the priority queue.

Voice-Adaptive Traffic Shaping and end-to-end fragmentation are designed to work together,
but they can each coexist with other traffic-shaping configurations. Voice-Adaptive Traffic
Shaping and end-to-end fragmentation supports only FRF.12 fragmentation. These are some
caveats relative to Voice-Adaptive Traffic Shaping and end-to-end fragmentation:
Frame Relay voice-adaptive traffic shaping: Frame Relay voice-adaptive traffic shaping
enables a router to reduce the PVC sending rate to the minCIR when packets (usually voice
packets) are detected in the low-latency queuing priority queue, or when H.323 call-setup
signaling packets are present. When there are no packets in the priority queue and signaling
packets are not present for a configured period of time, the router increases the PVC
sending rate from minCIR to CIR to maximize throughput. Frame Relay voice-adaptive
traffic shaping can be used at the same time as other types of adaptive traffic shaping. For
example, if both Frame Relay voice-adaptive traffic shaping and adaptive shaping based on
interface congestion are configured, the router will reduce the sending rate to minCIR if
there are packets in the priority queue or the interface queue size exceeds the configured
threshold. Frame Relay voice-adaptive traffic shaping can be used in conjunction with or
independently of voice-adaptive fragmentation.
Note Although the priority queue is generally used for voice traffic, Frame Relay voice-adaptive
traffic shaping will respond to any packets (voice or data) in the priority queue.
Frame Relay Voice-Adaptive End-to-End Fragmentation: Frame Relay voice-adaptive
fragmentation enables a router to fragment large data packets when packets (usually voice
packets) are detected in the low-latency priority queue, or when H.323 call-setup signaling
packets are present. When there are no packets in the priority queue for a configured period
of time and signaling packets are not present, fragmentation is stopped. Frame Relay voice-
adaptive fragmentation can be used in conjunction with or independent of Voice-Adaptive
Traffic Shaping.
7-78 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
To use Voice-Adaptive Fragmentation, you must also have end-to-end fragmentation
configured in a map class or on the interface.
Note Although the priority queue is generally used for voice traffic, Frame Relay voice-adaptive
fragmentation will respond to any packets (voice or data) in the priority queue.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-79
Monitoring the Frame Relay Voice-Adaptive
Feature
This topic describes monitoring the Frame Relay voice-adaptive traffic shaping feature using
Cisco IOS Software commands.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 10
Monitoring Frame Relay Voice-Adaptive
Traffic Shaping





The show policy map command gives a static verification of the policy configuration only. No
dynamic counters are included in its output. The following is a sample output:









Note The highlighted section in the example shows the configuration specifics related to CIR,
minCIR, and the default Frame Relay voice-adaptive traffic shaping deactivation timer.
The show frame-relay fragment command provides verification of the fragment size, whether
static fragmentation or Voice-Adaptive Fragmentation is configured for a DLCI. Additionally,
dynamic counters monitor how many frames required fragmentation in either direction. The
following is a sample output:




7-80 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Note The highlighted section shows, on the DLCI 102, the end-to-end fragmentation type,
configured fragmentation size on the DLCI, and the total number of fragments sent by the
designated DLCI 102.
The show frame-relay pvc command provides detailed traffic counters for Frame Relay
DLCIs. Also, this command verifies that adaptive fragmentation has been enabled and is
currently active on the DLCI. The following is a sample output:















Note The highlighted section indicates that there is currently an active end-to-end session and
that there are 28 seconds left before the router throttles the Frame Relay circuit back up to
the CIR rate.
The show policy interface command is the most useful of the show commands, and verifies
that Frame Relay voice-adaptive traffic shaping is active, due to the presence of voice traffic on
the link. The following is a sample output:


















Note The highlighted section shows that the Frame Relay voice-adaptive traffic shaping feature is
active. Also, the time left for Frame Relay voice-adaptive traffic shaping to deactivate is
included in the output. The output for this command has been truncated, because it is not
directly relevant to this example, but if the total output were included, it would show the
nested queuing policies assigned to the interface.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-81
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 11
Summary
When engaged, the Voice-Adaptive Traffic-Shaping feature
reshapes the link to minimum CIR.
When engaged, voice-adaptive fragmentation interleaves voice
packets with data packets.
Both voice-adaptive traffic shaping and fragmentation respond to
packets in the priority queue.
Voice-adaptive traffic shaping can coexist with adaptive traffic
shaping.
Voice-adaptive fragmentation can be configured separately from
voice-adaptive traffic shaping.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.37- 12
Summary (Cont.)
Voice-adaptive traffic shaping requires the configuration of a
priority queue.
End-to-end fragmentation can be configured directly on the
interface or through a map-class.
The features were introduced with Cisco IOS Software Release
12.2(15)T .

7-82 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-83
Module Summary
This topic summarizes the key points discussed in this module.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.37-1
Module Summary
Traffic shaping queues excess packets to stay within the shape
rate. Traffic policing typically drops excess traffic to stay within the
rate limit; alternatively, it can re-mark, then send excess traffic.
Both traffic shaping and policing measure traffic rate using a token
bucket mathematical model.
Class-based policing features include drop or re-mark and
transmit exceeding traffic, single or dual token bucket, single- or
dual-rate policing, and multiaction policing.
Class-based shaping can shape to the average or peak rate for a
traffic class.
Class-based shaping can throttle down the traffic rate dynamically
when BECN bits are received. Class-based shaping can respond
to FECN bits by creating test frames in the opposite direction with
the BECN bit set.

Rate-limiting is the ability to prevent excess traffic from entering or leaving the network. Rate-
limiting is required because of speed mismatches, oversubscriptions, and sub-rate access, and to
prevent unwanted traffic from causing network congestion.
To measure the traffic rate, a token bucket is used. Parameters that define the operations of a
token bucket include the CIR, Bc (normal burst size), Be, and Tc.
The CIR can be calculated by using the following formula:

Both traffic policing and traffic shaping are QoS mechanisms that are used to rate-limit a traffic
class. Traffic policing operates by dropping excess traffic while traffic shaping delays excess
traffic with the aid of queuing.
In Cisco IOS Software, the most current rate-limiting mechanisms are class-based policing and
class-based shaping. Both of these rate-limiting mechanisms are configured using the MQC. On
Frame Relay interfaces, class-based shaping can be used in conjunction with CBWFQ and
supports BECN adaptation and FECN-to-BECN propagation.
7-84 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
References
For additional information, refer to these resources:
To learn more about configuring class-based policing, refer to Configuring Traffic Policing
at this URL:
http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/cnfig_traffic_polcng_ps635
0_TSD_Products_Configuration_Guide_Chapter.html
To learn more about metering in class-based policing, refer to RFC 2697: A Single Rate
Three Color Marker at this URL: http://www.faqs.org/rfcs/rfc2697.html
To learn more about metering in class-based policing, refer to RFC 2698: A Two Rate
Three Color Marker at this URL: http://www.faqs.org/rfcs/rfc2698.html
To learn more about class-based shaping, refer to Regulating Packet Flow on a Per-Class
Basis---Using Class-Based Traffic Shaping at this URL:
http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/reg_pkt_flow_per_cls_ps63
50_TSD_Products_Configuration_Guide_Chapter.html
To learn more about FRTS, refer to MQC-Based Frame Relay Traffic Shaping at this URL:
http://www.cisco.com/en/US/docs/ios/wan/configuration/guide/wan_mqc_fr_tfshp.html
To learn more about FRTS, refer to Frame Relay Traffic Shaping at this URL:
http://www.cisco.com/warp/public/125/21.pdf
To learn more about traffic policing and traffic shaping, refer to Policing and Shaping
Overview at this URL:
http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/polcing_shping_oview_ps63
50_TSD_Products_Configuration_Guide_Chapter.html
For information on other traffic shaping mechanisms, refer to the software configuration
documentation for your Cisco IOS Software release.
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-85
Module Self-Check
Use the questions here to review what you learned in this module. The correct answers and
solutions are found in the Module Self-Check Answer Key.
Q1) Which of the following is a major difference between traffic policing versus traffic
shaping? (Source: Understanding Traffic Policing and Traffic Shaping)
A) Traffic policing drops excess traffic while traffic shaping delays excess traffic
by queuing it.
B) Traffic policing is applied only in the outbound direction while traffic shaping
can be applied to both the inbound and outbound directions.
C) Traffic policing is not available on the Catalyst switches such as the 2950,
while traffic shaping is available on Catalyst switches such as the 2950.
D) Traffic policing requires policing queues to buffer excess traffic, while traffic
shaping does not require any queues to buffer excess traffic.
Q2) Which mathematical model is used by traffic policing mechanisms to meter traffic?
(Source: Understanding Traffic Policing and Traffic Shaping)
A) token bucket
B) RED
C) FIFO metering
D) Predictor or Stacker
Q3) Which three situations typically require the use of a rate-limiting mechanism? (Choose
three.) (Source: Understanding Traffic Policing and Traffic Shaping)
A) Frame Relay connection with mismatch speeds at the two end points
B) hub-and-spoke Frame Relay topology with oversubscription at the hub site
C) service provider providing sub-rate access
D) in the service provider high-speed backbone to avoid congestion
Q4) When configuring single-rate class-based policing, which configuration parameter is
used to enable a dual token bucket? (Source: Configuring Class-Based Policing)
A) configuring a violate action
B) configuring an exceed action
C) configuring the PIR in addition to the CIR
D) configuring Be
Q5) What is the main advantage of using multiaction policing? (Source: Configuring Class-
Based Policing)
A) to distinguish between exceeding and violating traffic
B) to distinguish between conforming and exceeding traffic
C) to allow the setting of both Layer 2 and Layer 3 QoS markers at the same time
D) to allow marking of the traffic before transmission
7-86 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Q6) Which two statements are true when class-based shaping is used in conjunction with
CBWFQ? (Choose two.) (Source: Configuring Class-Based Shaping)
A) The bandwidth command defines the minimum guaranteed bandwidth for the
traffic class.
B) The bandwidth command defines the maximum guaranteed bandwidth for the
traffic class.
C) The shape peak command defines the maximum rate limit for the traffic class.
D) The shape average command defines the minimum bandwidth guaranteed for
the traffic class.
Q7) Which are the two configuration options when configuring class-based traffic shaping?
(Choose two.) (Source: Configuring Class-Based Shaping)
A) shape average
B) shape peak
C) single or dual token bucket
D) single or multiaction traffic shaping
E) single- or dual-rate traffic shaping
Q8) Which three items are features of class-based policing? (Choose three.) (Source:
Configuring Class-Based Shaping)
A) single or dual token bucket
B) single or multiaction policing
C) single- or dual-rate policing
D) single or dual FIFO queuing
E) single or dual drop threshold
Q9) What is the min-rate? (Source: Configuring Class-Based Shaping on Frame Relay
Interfaces)
A) the minimum bandwidth guaranteed by CBWFQ for the traffic class
B) the minimum bandwidth guaranteed by the LLQ for the traffic class
C) the minimum speed the traffic rate will slow down to when the BECN bits are
being received
D) the minimum speed the traffic rate will slow down to when the FECN bits are
being received
E) the minimum class-based policing traffic rate for a traffic class
Q10) What is the function of FECN-to-BECN propagation? (Source: Configuring Class-
Based Shaping on Frame Relay Interfaces)
A) to allow a receiving router to send back a test frame with the BECN bit set to
the sender when the receiver has no data to send back to the sender after
receiving the FECN bit
B) to allow a router to slow down the traffic rate to the min-rate when either the
FECN or BECN bit is received
C) to allow a router to slow down the traffic rate to the min-rate when the BECN
bit is received
D) to allow a router to slow down the traffic rate to the min-rate when the FECN
bit is received
E) to allow a receiving router to set the BECN bit on a user dataframe going back
to the sender after receiving the FECN bit
2009 Cisco Systems, Inc. Traffic Policing and Shaping 7-87
Module Self-Check Answer Key
Q1) A
Q2) A
Q3) A, B, C
Q4) A
Q5) C
Q6) A, C
Q7) A, B
Q8) A, B, C
Q9) C
Q10) A
7-88 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Module 8
Link Efficiency Mechanisms
Overview
In networks consisting of a large WAN covering many sites, the monthly recurring cost of even
the smallest link upgrade can be too high. In some cases, the only option for low-bandwidth
remote sites is to upgrade their wide-area circuit. In other cases, a set of quality of service
(QoS) techniques can be used that improves the efficiency of these low-speed WAN links,
which, in this context, typically refer to links of speeds less than or equal to 768 kb/s. Header
compression and payload compression mechanisms reduce the size of packets, reducing delay
and increasing available bandwidth on a link. Other QoS link-efficiency techniques, such as
Link Fragmentation and Interleaving (LFI), allow fragile traffic types such as voice and
interactive traffic to be sent either ahead or interleaved with larger, more aggressive flows.
These techniques decrease latency and assist in meeting the service-level requirements of
delay-sensitive traffic types such as voice.
This module describes the different link efficiency mechanisms that are available in Cisco IOS
Software to implement header compression, payload compression, and LFI.
Module Objectives
Upon completing this module, you will be able to use Cisco link efficiency mechanisms to
improve the bandwidth efficiency of low-speed WAN links. This ability includes being able to
meet these objectives:
Explain how link efficiency mechanisms can be used to improve bandwidth efficiency and
reduce delay
Configure class-based TCP and class-based RTP header compression to improve
bandwidth efficiency and reduce delay
Configure LFI to improve bandwidth efficiency and reduce delay
8-2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 1
Understanding Link Efficiency
Mechanisms
Overview
Interactive traffic such as Telnet and VoIP are susceptible to increased latency when network
processes using large packets, such as bulk FTP, traverse WAN links. Packet delay is especially
significant when FTP packets are queued on slower links (in this context, links with speeds less
than or equal to 768 kb/s) within the WAN. To solve delay problems on slow bandwidth links,
a method for fragmenting larger frames and then queuing the smaller frames between fragments
of the larger frames is required. To meet this requirement, Cisco IOS Software supports PPP
Multilink Link Fragmentation and Interleaving (MLP LFI) and Frame Relay Fragmentation
(FRF.12). In addition, you can use other tools, such as header and payload compression
techniques, to reduce the size of frames that are sent on WAN links.
This lesson describes different approaches for improving the efficiency of WAN links. The
lesson describes link efficiency mechanisms that either compress the payload or reduce packet
headers. It also describes the different Layer 2 LFI mechanisms and Frame Relay
fragmentation.
Objectives
Upon completing this lesson, you will be able to explain how link efficiency mechanisms can
be used to improve bandwidth efficiency and reduce delay. This ability includes being able to
meet these objectives:
Explain the various link efficiency mechanisms and their functions
Describe the purpose of Layer 2 payload compression and explain how it affects
throughput and delay
Describe the purpose of header compression and explain how it affects throughput and
delay
Explain how VoIP packets are susceptible to increased latency when large packets such as
FTP transfers traverse slow WAN links
8-4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Explain LFI operation and how LFI reduces the delay and jitter of VoIP packets
Identify the points in a network where link efficiency mechanisms can most effectively be
employed
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-5
Link Efficiency Mechanisms Overview
This topic describes the various link efficiency mechanisms and their functions.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-2
Link Efficiency Mechanisms Overview
Link efficiency mechanisms are often deployed on WAN links to
increase the throughput and to decrease delay and jitter.
Cisco IOS link efficiency mechanisms include:
L2 payload compression (Stacker, Predictor, MPPC)
Header compression (TCP, RTP, class-based TCP, and class-
based RTP)
LFI (MLP, FRF.12, and FRF.11.C)

While many QoS mechanisms exist for optimizing throughput and reducing delay in network
traffic, QoS mechanisms do not create bandwidth. QoS mechanisms optimize the use of
existing resources, and enable the differentiation of traffic according to a policy. Link
efficiency QoS mechanisms such as payload compression, header compression, and LFI are
deployed on WAN links to optimize the use of WAN links.
Payload compression increases the amount of data that can be sent through a transmission
resource. Payload compression is primarily performed on Layer 2 frames and therefore
compresses the entire Layer 3 packet. The Layer 2 payload compression methods include
Stacker, Predictor, and Microsoft Point-to-Point Compression (MPPC).
Compression methods are based on eliminating redundancy. The protocol header is an item of
repeated data. The protocol header information in each packet in the same flow does not change
much over the lifetime of that flow. Using header compression mechanisms, most header
information can be sent only at the beginning of the session, stored in a dictionary, and then
referenced in later packets by a short dictionary index. Cisco IOS header compression methods
include TCP header compression, Real-Time Transport Protocol (RTP) header compression,
class-based TCP header compression, and class-based RTP header compression.
8-6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
LFI is a Layer 2 technique in which large frames are broken into smaller, equal-sized
fragments, and transmitted over the link in an interleaved fashion with more latency-sensitive
traffic flows (like VoIP). Using LFI, smaller frames are prioritized, and a mixture of fragments
is sent over the link. LFI reduces the queuing delay of small frames because the frames are sent
almost immediately. Link fragmentation, therefore, reduces delay and jitter by expediting the
transfer of smaller frames through the hardware transmit (Tx) queue. The LFI methods
available include Multilink PPP (MLP), FRF.12, and FRF.11 Annex C.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-3
Compression
Payload compression reduces the size of the payload.
Header compression reduces the header overhead.
Compression increases throughput and decreases latency.

Layer 2 payload compression squeezes Layer 2 payloads (the entire Layer 3 packet). Layer 2
payload compression increases the throughput and decreases the latency in transmission,
because smaller packets (with compressed payloads) take less time to transmit than the larger,
uncompressed packets. Layer 2 payload compression is performed on a link-by-link basis.
Header compression methods work by not transmitting repeated information in packet headers
throughout a session. The two peers on a PPP Layer 2 connection (a dial-up link) agree on
session indices which index a dictionary of packet headers. The dictionary is built at the start of
every session and is used for all subsequent (non-initial) packets. Only changing, or non-
constant, parameters in the headers are actually sent along with the session index.
It is important to note that header compression is performed on a link-by-link basis. Header
compression cannot be performed across multiple routers because routers need full Layer 3
header information to be able to route packets to the next hop.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-7
Example: Indexing Operations
Compressed RTP (cRTP) maintains the state for session contexts. A session context is defined
by the combination of the IP source and destination addresses, the User Datagram Protocol
(UDP) source and destination ports, and the RTP synchronization source (SSRC) field. A
compressor implementation might use a hash function on these fields to index a table of stored
session contexts. The compressed packet carries a small integer, called the session context
identifier, to indicate in which session context that packet should be interpreted. The
decompressor can use the context identifier to index its table of stored session contexts directly.
Note Refer to RFC 2507, 2508, and 1144 for more information on header compression
operations.
8-8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
L2 Payload Compression
This topic describes the purpose of Layer 2 payload compression and how Layer 2 payload
compression affects throughput and delay.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-4
L2 Payload Compression
L2 payload compression reduces the size of the frame payload.
Entire IP packet is compressed.
Software compression can add delay due to its complexity.
Hardware compression reduces the compression delay.
Serialization delay is reduced; overall latency might be reduced.

The figure shows a basic block diagram of a Layer 2 payload compression method. When a
router forwards a packet, the packet is subjected to the Layer 2 compression method after it has
been encapsulated at the output. The compression method squeezes the payload of the Layer 2
frame (the entire Layer 3 packet), and transmits the packet on the interface.
Layer 2 payload compression is a CPU-intensive task and can add per-packet compression
delay due to the application of the compression method to each frame. The serialization delay,
however, is reduced, because the resulting frame is smaller. Serialization delay is the fixed
delay that is required to clock the frame onto the network interface. Depending on the
complexity of the Layer 2 payload compression algorithm, overall latency might be reduced,
especially on low-speed links.
Cisco routers support hardware-assisted compression to reduce the CPU load and the Layer 2
payload compression delay.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-9
Example: L2 Payload Compression Results
The figure compares three throughput and latency scenarios on a PPP link.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-5
L2 Payload Compression Results
Compression increases throughput and decreases delay.
Use hardware compression when possible.
Examples: Stacker, Predictor, MPPC.

If no compression is used, the throughput is limited by the link bandwidth, and the average
delay is influenced by the forwarding or buffering delay, the serialization, and the propagation
delay.
If compression is enabledeven if the serialization delay is now shorter because the frame is
smallerthe compression or decompression delay may increase the overall latency between the
two hops. The perceived throughput is generally increased because the size of the Layer 2
payload is reduced, therefore allowing more Layer 2 frames to be sent through a transmission
resource in a given time period. The throughput is limited by the effectiveness of the Layer 2
payload compression algorithm and may be significantly higher than the link bandwidth limit.
If hardware-assisted Layer 2 payload compression is used, the compression or decompression
delays may become insignificant compared to forwarding and serialization delays, and overall
latency may decrease. The throughput is again limited by the effectiveness of the Layer 2
payload compression method and may be significantly higher than the link bandwidth limit.
Note Layer 2 payload compression configuration will not be covered in this module. Refer to the
latest Cisco IOS documentation for configuration details.
8-10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Header Compression
This topic describes the purpose of header compression and how header compression affects
throughput and delay.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-6
Header Compression
Header compression reduces the size of the packet headers.
The payload size is not changed.
Example: (class-based) TCP and (class-based) RTP header
compression.

Header compression increases the throughput and reduces the delay by compressing the
protocol headers. Header compression is most useful for applications that generate small
payloads because the protocol headers of such applications use a significant percentage of
bandwidth on a link relative to their payload. Real-time applications typically generate small
payloads. Target applications for header compression include Telnet and RTP applications.
TCP and RTP header compression applies to all TCP and RTP flows. For example, if TCP
compression is enabled on a link, there is no mechanism to restrict its function to specific
application types. TCP header compression for bulk data transfer yields little bandwidth
savings. Class-based TCP header compression can be performed only on a certain traffic class,
such as the Telnet traffic class.
The header compression algorithm tracks active transport-layer connections over an interface.
After the packet has been forwarded, the header compression algorithm compresses the Layer 3
and Layer 4 headers within the frame, and replaces the headers with a session index from the
session dictionary (table). Only the non-constant parameters in the headers will be sent along
with the session index. The packet is then sent to the output queue, and transmitted to the
remote peer. When the remote peer receives the packet, the header is decompressed using the
local session table, and passed to the forwarding process.
For example, without RTP header compression, the IP/UDP/RTP header overhead of the voice
packet shown in the figure is about 67 percent (40 / 60 x 100 percent). With RTP header
compression, the IP/UDP/RTP header can be reduced to 2 or 4 bytes (without and with
checksum, respectively) for most packets. Therefore, the IP/UDP/RTP header overhead can be
reduced to about 9 percent (2 / 22 x 100 percent) or 17 percent (4 / 24 x 100 percent).
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-11
Example: Header Compression Results
The figure compares two throughput and latency scenarios on a PPP link.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-7
Header Compression Results
Header compression increases compression delay and reduces
serialization delay.

If header compression is not used, the throughput is limited by the link bandwidth, and the
average delay is influenced only by the forwarding or buffering delay, the serialization, and the
propagation delay.
If header compression is enabled, compressing the protocol headers causes the packet to
become smaller, therefore allowing more packets to be sent through a transmission resource in
a given time period to increase the throughput. Because the packet size is smaller, the
serialization delay also becomes smaller, thus reducing the overall delay. Header compression
has a low compression delay and a relatively low CPU overhead and is recommended on links
slower than 2 Mb/s.
8-12 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Large Packets Freeze Out Voice on Slow WAN
Links
This topic describes how VoIP packets are susceptible to increased latency when large packets
such as FTP transfers traverse slow WAN links.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-8
Large Packets Freeze Out Voice on
Slow WAN Links
Problems:
Excessive delay due to slow link and MTU-sized (large) packets
Jitter (variable delay) due to variable link utilization

When considering delay between two hops in a network, queuing delay in a router must be
considered because it may be comparable toor even exceedthe serialization and
propagation delay on a link. In an empty network, an interactive or voice session experiences
low or no queuing delay, because the session does not compete with other applications on an
interface output queue. Also, the small delay does not vary enough to produce considerable
jitter on the receiving side.
In a congested network, interactive data and voice applications compete in the router queue
with other applications. Queuing mechanisms may prioritize voice traffic in the software queue,
but the hardware queue (Tx ring) always uses a FIFO scheduling mechanism. Therefore, after
packets of different applications leave the software queue, the packets will mix with other
packets in the hardware queue (TxQ), even if their software queue processing was expedited.
Therefore, a voice packet may be immediately sent to the hardware TxQ where two large FTP
packets may still be waiting for transmission. The voice packet must wait until the FTP packets
are transmitted, thus producing an unacceptable delay in the voice path. Because links are used
variably, the delay varies with time and may produce unacceptable jitter in jitter-sensitive
applications such as voice.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-13
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-9
Serialization Delays

Serialization delay is the fixed delay that is required to clock a voice or data packet onto the
network interface. Serialization delay is directly related to the link speed and the size of the
packet.
The figure shows the serialization delay as a function of the link speed and packet size.
For example, the serialization delay for a 1500-byte packet over a 56-kb/s link will be 214 ms,
while the serialization delay is only 7.5 ms over a 1.536-Mb/s link for the same 1500-byte
packet.
8-14 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Link Fragmentation and Interleaving
This topic describes LFI operation and how LFI reduces the delay and jitter of VoIP packets.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 10
Link Fragmentation and Interleaving
LFI reduces the delay and jitter of small packets
(for example, VoIP).

The use of a hybrid queuing method such as low-latency queuing (LLQ) can provide low
latency and low jitter for VoIP packets, while servicing other data packets in a fair manner. But
even if VoIP packets are always sent to the front of the software queue, there is still the issue of
serialization delay. A large packet may be on its way out of the hardware TxQ, which uses
FIFO when a VoIP packet is sent to the front of the software queue. The serialization of the
large packet can cause the VoIP packet to wait for a long time before it can be transmitted out.
For example, the serialization delay of a 1500-byte packet over a 56-kb/s link will be 214 ms.
For VoIP traffic, the maximum recommended one-way, end-to-end delay is 150 ms. Therefore,
having a 1500-byte packet ahead of a VoIP packet in the hardware TxQ on a 56-kb/s link can
cause the end-to-end delay of the voice packet to be over the budget of 150 ms.
The solution to this problem is to fragment the large packets so that they never cause a VoIP
packet to wait for more than a predefined amount of time. The VoIP packets must also be
allowed to transmit in between the fragments of the larger packets (interleaving), or there will
be no point in doing the fragmenting.
When configuring the proper fragment size to use on a link, a typical goal is to have a
maximum serialization delay of around 10 to 15 milliseconds. Depending on the LFI
mechanisms being configured, the fragment size is either configured in bytes or in
milliseconds.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-15
Applying Link Efficiency Mechanisms
This topic describes the points in a network where link efficiency mechanisms can most
effectively be employed.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 11
Applying Link Efficiency Mechanisms

Header compression and LFI are typically configured at the WAN edge for WAN links below
T1 or E1 speeds to optimize the use of the WAN link and to prevent long serialization delay.
Layer 2 payload compression is less commonly deployed on WAN links, especially without the
use of hardware-assisted payload compression.
8-16 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 12
Link Efficiency Mechanisms and Cisco
TelePresence
LFI and cRTP are recommended for slow links (768 kb/s or less).
Enabling cRTP on links carrying TelePresence is not recommended.
Large CPU impact
Negligible returns in bandwidth savings at TelePresence circuit speeds
Enabling LFI on links carrying TelePresence is not recommended.
Large CPU impact
Unwanted jitter and out-of-order and late packets introduced by fragmentation
Campus
Branch
Service
Provider
Tel ePresence Packet:
Average Payload
1100 Bytes
TelePresence Bandwidth Needs: 1+ Mb/s

Cisco TelePresence, like VoIP, is encapsulated by IP, UDP, and RTP headers. These headers,
when combined, account for 40 bytes per packet (at Layer 3). To enhance bandwidth
efficiency, compression tools like cRTP can reduce this overhead from 40 bytes to 2 to 5 bytes
per packet. However, cRTP is the most computationally intensive QoS operation in the Cisco
IOS toolset. Furthermore, it is recommended only on slow-speed links (usually 768 kb/s or less,
as it is at these speeds that the bandwidth gain offsets the increased CPU cost of the operation)
and it is useful only for RTP-based applications that have a small amount of payload per
packet. On high-speeds links and applications like Cisco TelePresence, in which the payload of
each packet averages 1100 bytes, cRTP offers no benefit and results in high CPU usage.
Therefore, enabling cRTP on links carrying Cisco TelePresence is not recommended.
LFI is also not recommended on links carrying Cisco TelePresence. Like cRTP, LFI is useful
only on slow-speed links. It therefore offers no benefit and results only in high CPU usage on
the router. Furthermore, LFI fragments large data packets into smaller chunks. Because Cisco
TelePresence packets average 1100 bytes payload per packet, LFI would fragment them. This
would introduce unwanted jitter and late, out-of-order packets into the Cisco TelePresence
stream.

2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-17
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 13
Summary
Link efficiency mechanisms (including L2 payload compression,
header compression, and LFI) deployed on WAN links can
increase throughput and decrease delay and j itter.
Payload compression uses a compression algorithm to compress
the payload of Layer 2 frames.
Header compression reduces overhead by compressing the IP
and upper-layer headers.
A VoIP packet may be sent to the hardware TxQ, where large
FTP packets may still be waiting for transmission. The VoIP
packet must wait until the large packets are transmitted,
producing an unacceptable delay in the voice path.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 14
Summary (Cont.)
LFI reduces the delay and jitter of small packets (for example,
VoIP) by fragmenting the large packets to allow a VoIP packet to
wait no more than a predefined amount of time.
Header compression and LFI are typically configured at the WAN
edge for WAN links below T1 or E1 speeds, to optimize the use of
the WAN link and to prevent long serialization delay. Layer 2
payload compression is less commonly deployed on WAN links.


8-18 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 2
Configuring Class-Based
Header Compression
Overview
Headers exist on almost every communication layer of the OSI stack. When data is sent
between workstations, headers will typically be applied at the session, transport, network, and
data-link layers. Real-Time Transport Protocol (RTP) is a protocol for the transport of real-time
data. RTP includes a data portion and a header portion. The data portion of RTP is a thin
protocol that provides support for the real-time properties of applications, such as continuous
media, including timing reconstruction, loss detection, and content identification. The header
portion of RTP is considerably larger, especially when compared to the payload data that it
supports. To avoid the unnecessary consumption of available bandwidth, compressed RTP
(cRTP) is used on a link-by-link basis.
TCP header compression is also supported on Cisco routers to reduce the overhead that is
associated with TCP and IP headers in TCP/IP packets. TCP header compression is most
effective for interactive traffic with small packet size such as Telnet on slow WAN links. The
modular quality of service (QoS) command-line interface (CLI), or MQC, method supports
class-based RTP and TCP header compression, so that the header compression can be
performed on a specific traffic class. This lesson describes class-based RTP and class-based
TCP header compression, including configuration and monitoring.
Objectives
Upon completing this lesson, you will be able to configure class-based TCP and class-based
RTP header compression to improve bandwidth efficiency and reduce delay. This ability
includes being able to meet these objectives:
Explain the purpose of header compression
Calculate the overhead that you can save by using class-based TCP header compression
Calculate the overhead that you can save on VoIP packets using class-based RTP header
compression
Identify the Cisco IOS commands required to configure class-based header compression
Identify the Cisco IOS commands used to monitor class-based header compression
8-20 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Header Compression Overview
This topic describes the purpose of header compression.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-2
Header Compression Overview
TCP header compression and class-based TCP header
compression:
Compresses IP and TCP headers
Is used to reduce the overhead of TCP segments
Is most effective on slow links with many TCP sessions with small
payloads (for example, Telnet)
RTP header compression and class-based RTP header
compression:
Compresses IP, UDP, and RTP headers
Is used to reduce delay and increase throughput for RTP
Improves voice quality
Is most effective on slow links
Class-based header compressionCisco IOS Software Release
12.2(13)T.
Header compression is enabled on a link-by-link basis.

Three methods are standardized by the Internet Engineering Task Force (IETF) for use with IP
protocols:
TCP header compression: Also known as the Van Jacobson or VJ header compression,
TCP header compression is used to compress the packet IP and TCP headers over slow
links, thus considerably improving the interactive application performance (RFC 1144).
RTP header compression: Used to compress the packet IP, User Datagram Protocol
(UDP), and RTP headers, thus lowering the delay for transporting real-time data, such as
voice and video, over slower links (RFC 2508).
IP header compression: Not discussed in this lesson. (RFC 2507).
When TCP and RTP header compression is enabled, the compression occurs by default in the
fast-switched path or the Cisco Express Forwarding-switched path, depending on which
switching method is enabled on the interface. Class-based header compression enables RTP or
TCP header compression on a per-class basis. This feature was introduced in Cisco IOS
Software Release 12.2(13)T. Decompression is not based on the class map. The receiving end
will decompress all packets that come compressed from the other side. Header compression is
performed on a link-by-link basis. Header compression cannot be performed across multiple
routers because routers need full Layer 3 header information to be able to route packets to the
next hop.
Example: RTP Header Compression
RTP header compression is often implemented on WAN links to reduce the IP, UDP, and RTP
header overhead for VoIP packets. Reducing the protocol header overhead results in an
increase in throughput and a decrease in serialization delay.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-21
Class-Based TCP Header Compression
This topic describes how to calculate the approximate overhead that can be saved by using
class-based TCP header compression.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-3
Class-Based TCP Header Compression
Most Internet applications use TCP as the transport protocol.
Most of the information in the headers (IP and TCP) is static or
predictable throughout the session.
IP (20 bytes) and TCP (20 bytes) use 40 bytes.
TCP header compression can squeeze these two headers into 3
to 5 bytes.
Class-based TCP header compression allows compression on a
traffic class.
Class-based TCP header compression is configured via MQC.

In TCP header compression, the IP and TCP headers, which normally use 20 bytes each, are
reduced to a session index, and the variable part of the header. With all optimizations, the
combined header length of 40 bytes can be reduced to a 3- to 5-byte compressed header.
After you configure a class within a policy map, class-based TCP header compression occurs
on a per-class basis. Policy maps are created using the MQC. Attach the policy maps to an
interface by using the service-policy command. The service-policy command gives you the
option of specifying either an input service policy (for input interfaces), or an output service
policy (for output interfaces). For the TCP header compression feature, only output service
policies can be specified.
Enabling TCP header compression on an interface applies header compression to all TCP flows
out of the interface. If TCP compression is enabled on a link, there is no mechanism to restrict
its function to specific application types. TCP header compression for bulk data transfer
(packets with a large payload) yields little bandwidth savings. Using the newer class-based
TCP header compression, TCP header compression can be performed only on certain traffic
classes; for example, you can only perform TCP header compression on the interactive traffic
class where the packet payload sizes are small.
8-22 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Class-Based TCP Header Compression

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-4
Class-Based TCP Header Compression
Example
Link bandwidth is 64 kb/s.
The link is used for a number of interactive TCP sessions.
PPP encapsulation is used.
Average packet size is 5 bytes.
Each segment has 46 bytes of overhead
(PPP, IP, and TCP headers).

The example shows the benefits of TCP header compression on slow links.
A 64-kb/s link is used to transport a TCP-based application using PPP as the Layer 2 framing
protocol. For the case study application (Telnet), the average packet payload size is 5 bytes.
Because PPP has 6 bytes of frame header, the total header overhead is 6 + 20 + 20 = 46 bytes,
including the PPP, IP, and TCP headers.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-23
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-5
Class-Based TCP Header Compression
Example (Cont.)

The figure shows the packet size before and after TCP header compression. After TCP header
compression, the IP and TCP headers are reduced to 4 bytes, resulting in 10 bytes of overall
headers. The overhead is reduced from 90 percent to 67 percent when small packets are used.
Because of the packet size reduction, the serialization delay decreases from 6 ms to 2 ms on the
same 64-kb/s link.
The table in the figure shows how TCP header compression impacts performance when
different packet sizes are used. TCP header compression is most effective on small packets, and
is often used on slow links.
8-24 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Class-Based RTP Header Compression
This topic describes how to calculate the overhead that can be saved on VoIP packets using
class-based RTP header compression.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-6
Class-Based RTP Header Compression
Voice sessions use RTP.
RTP uses UDP for transport.
Most of the information in the headers (IP, UDP, and RTP) is
static throughout the session.
IP (20 bytes), UDP (8 bytes), and RTP (12 bytes) use 40 bytes.
RTP header compression can squeeze these three headers into 2
or 4 bytes.
Class-based RTP header compression allows compression on a
traffic class.
Class-based RTP header compression is configured via MQC.

RTP is the standard protocol (RFC 1889) for the transport of real-time data. RTP is intended to
provide end-to-end network transport functions for applications that support audio, video, or
simulation data over multicast or unicast network services. RTP is used in most VoIP
applications to transport voice packets.
RTP includes a data portion and a header portion. The data portion of RTP is a thin protocol
that provides support for the real-time properties of applications, such as continuous media, and
includes timing reconstruction, loss detection, and content identification. RTP contains a
relatively large-sized header. The 12 bytes of the RTP header, combined with 20 bytes of IP
header and 8 bytes of the UDP header, create a 40-byte header. For compressed-payload audio
applications, the RTP packet typically has a 20- to 160-byte payload, depending on the audio
compression codec. Given the size of the IP, UDP, and RTP header combinations, it is
inefficient to send the header without compressing it.
To avoid unnecessary consumption of available bandwidth, the RTP header compression
feature, cRTP, is used on a link-by-link basis. cRTP can reduce the header from 40 bytes to 2 or
4 bytes (4 bytes with UDP checksum enabled), which significantly reduces delay on slow links.
After you configure a class within a policy map, class-based RTP header compression occurs
on a per-class basis. Policy maps are created using the MQC. Attach the policy maps to an
interface by using the service-policy command. The service-policy command gives customers
the option of specifying either an input service policy (for input interfaces), or an output service
policy (for output interfaces). For the cRTP feature, only output service policies can be
specified.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-25
Example: Class-Based RTP Header Compression

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-7
Class-Based RTP Header Compression
Example
Link bandwidth is 64 kb/s.
The link is used for VoIP.
PPP encapsulation is used.
G.729 codec is used (8 kb/s of voice data, 50 samples per
second, 20 bytes per sample).
Each segment has 46 bytes of overhead (PPP, IP, UDP, and RTP
headers).

The example shows the benefits of RTP header compression on slow links.
A 64-kb/s link is used to transport VoIP using PPP as the Layer 2 framing protocol.
For the case study application (voice, using the G.729 audio compression codec), the payload
size is 20 bytes. Because PPP has 6 bytes of frame header, the total header overhead is 6 + 20 +
8 + 12 = 46 bytes, including the PPP, IP, UDP, and RTP headers.
8-26 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-8
Class-Based RTP Header Compression
Example (Cont.)

The figure shows the packet size before and after RTP header compression. The IP, UDP, and
RTP headers are reduced to 4 bytes, resulting in 10 bytes of overall headers. The overhead is
reduced from 70 percent to 33 percent when small packets are used. Because of the packet size
reduction, the serialization delay decreases from 8 ms to 4 ms, and the bandwidth that is used to
transport a single voice call (using the G.729 codec) is reduced from 26.4 kb/s (66 bytes per
frame * 50 frames per second * 8 bits per byte) to 12 kb/s (30 bytes per frame * 50 frames per
second * 8 bits per byte). Therefore, a 64-kb/s link can support up to two G.729 voice calls
without cRTP, but up to five G.729 voice calls with cRTP.
The table in the figure shows how RTP header compression impacts performance when a
different audio codec is used. For the traditional G.711 voice codec, RTP header compression
still optimizes its transmission over slow links. However, the difference is more obvious when
using advanced, low-bandwidth codecs.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-27
Configuring Class-Based Header Compression
This topic describes the Cisco IOS commands that are required to configure class-based header
compression.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-9
Configuring Class-Based Header
Compression
Enables RTP or TCP IP header compression 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.


Configure class-based TCP and RTP header compression within a policy map using the
compression header ip command.
If you do not specify either RTP or TCP header compression, both RTP and TCP header
compressions will be configured.
The syntax shown in the figure for the compression header ip command is the same as the
syntax for the compression header ip command in Cisco IOS Software Release 12.4.
Note Header compression is auto-negotiated only on PPP links. On Frame Relay or high-level
data link control (HDLC) links, both ends of the links have to match.
8-28 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: Configuring Class-Based TCP Header Compression

2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 10
Example: Configuring Class-Based
TCP Header Compression





In the figure, the compression header ip command is configured to use TCP header
compression for a traffic class called interactive. The interactive traffic class is part of a
policy map called cust1. This cust1 policy map is applied to the s0/0 interface in the
outbound direction.
This policy provides a minimum bandwidth guarantee of 64 kb/s for the interactive traffic
class and will perform TCP header compression on the interactive traffic class (all Telnet
packets in this example) leaving the s0/0 interface.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-29
Example: Configuring Class-Based RTP Header Compression

2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 11
Example: Configuring Class-Based
RTP Header Compression





In the figure, the compression header ip command has been configured to use RTP header
compression for a traffic class called voip. The voip traffic class is part of a policy map
called cust1. This cust1 policy map is applied to the s0/0 interface in the outbound direction.
This policy provides a maximum bandwidth guarantee of 384 kb/s for the voip traffic class and
will perform RTP header compression on the voip traffic class (all RTP packets in this
example) leaving the s0/0 interface.
8-30 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Monitoring Class-Based Header Compression
This topic describes the Cisco IOS commands that are used to monitor class-based header
compression.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 12
Monitoring Class-Based Header
Compression
Displays the packet statistics of all classes configured for all
service policies on the specified interface








The show policy-map interface command output displays the type of header compression
configured (RTP in this example), the interface to which the policy map called cust1 is
attached (serial 0/0), the number of packets sent, the number of packets compressed, the
number of bytes saved, and the number of bytes sent.
Other statistical information provided in the output includes the efficiency improvement
factor, which indicates the percentage of increased bandwidth efficiency as a result of header
compression. For example, an efficiency improvement factor of 3.33 means 330 percent
efficiency improvement. The hit ratio is the percentage of packets that are found in the
context database. In most instances, this percentage should be high. The five-minute miss
rate is the number of traffic flows in the last five minutes that were not found in the context
database. The rate is the actual traffic rate after the packets are compressed.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-31
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 13
Summary
TCP header compression compresses the IP and TCP headers.
RTP header compression compresses the IP, UDP, and RTP
headers. Header compression reduces delay.
Class-based TCP header compression enables TCP header
compression on a per-class basis. TCP header compression can
reduce the header from 40 bytes to 3 to 5 bytes.
RTP header compression feature (cRTP) can reduce the header
from 40 bytes to a 2- or 4-byte header (4 bytes with UDP
checksum enabled), which significantly reduces delay on slow
links.
Class-based TCP and RTP header compression is configured by
using the compression header ip command in policy-map class
configuration mode.
The show policy-map interface command output displays the
type and statistics of the header compression configured.

8-32 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 3
Configuring Link
Fragmentation and
Interleaving
Overview
Because the hardware transmit queue (TxQ) is a FIFO queue, having a large packet such as an
FTP packet in front of a small packet like a VoIP packet can cause excessive delay for the VoIP
packet. Link fragmentation and interleaving (LFI) allows the large packets to be fragmented
into smaller fragments, and then the small unfragmented packets are interleaved in between the
fragments. LFI reduces the delay and jitter of small packets such as VoIP packets over a WAN
link.
This lesson describes the configuration and monitoring of two different LFI mechanisms
supported in Cisco IOS Software, Multilink PPP LFI (MLP LFI) and Frame Relay
Fragmentation (FRF.12).
Objectives
Upon completing this lesson, you will be able to configure LFI to improve bandwidth
efficiency and reduce delay. This ability includes being able to meet these objectives:
Identify the different options available for link fragmentation
Given a list of link speeds and a specific delay requirement, determine the proper fragment
size to use at each link speed and the typical delay requirements for VoIP packets
Identify the Cisco IOS commands required to configure MLP LFI
Identify the Cisco IOS commands used to monitor MLP LFI
Explain when FRF.12 can be used and how FRF.12 affects VoIP packets
Identify the Cisco IOS commands required to configure FRF.12
Identify the Cisco IOS commands required to monitor FRF.12
8-34 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Fragmentation Options
This topic describes the different options that are available for link fragmentation.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-2
Fragmentation Options
Cisco IOS Software LFI mechanisms include:
Multilink PPP with interleaving: PPP links
FRF.12: Frame Relay PVC carrying data traffic, including VoIP
over Frame Relay traffic
FRF.11 Annex C: Frame Relay PVC carrying VoFR traffic

LFI is a Layer 2 technique, in which all Layer 2 frames are broken into small, equal-sized
fragments, and transmitted over a link in an interleaved fashion. LFI reduces delay and jitter by
expediting transfer of smaller frames through the hardware TxQ.
There are three LFI mechanisms implemented in Cisco IOS Software:
MLP LFI: By far the most common and widely used form of LFI
FRF.12 Frame Relay LFI: Used with Frame Relay data connections
FRF.11 Annex C LFI: Used with Voice over Frame Relay (VoFR)
Note For configuration information on FRF.11.C, refer to the latest Cisco IOS documentation.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-35
Serialization Delay and Fragment Sizing
This topic describes the proper fragment size to use on links based on their speed, and identifies
the typical delay requirements for VoIP packets.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-3
Serialization Delays
For 1500-byte packets, fragmentation is not necessary above T1
(1.5 Mb/s)

Serialization delay is the fixed delay required to clock a voice or data packet onto the network
interface. Serialization delay is directly related to the link speed and the size of the packet.
The figure shows the serialization delay as a function of the link speed and packet size. For
example, the serialization delay for a 1500-byte packet over a 64-kb/s link will be:

To ensure low delay and jitter for voice packets on slow links, the recommended standard goal
for serialization delay is about 10 to 15 ms. Therefore, on a T1 or higher speed link, LFI is not
necessary because the serialization delay for a 1500-byte packet is only 7.5 ms on a T1 link. A
T1 link has a bandwidth of 1536 kb/s, excluding the T1 framing overhead.
8-36 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-4
Fragment Size Recommendation
for Voice

To meet the standard serialization delay goal of no more than 10 to 15 ms to ensure low delay
and jitter for voice packets, you should configure a fragment size of about 80 bytes per every
64 kb/s of the clocking rate for the interface.
Depending on the LFI mechanism, the fragment size is either configured in bytes or in
milliseconds. For example, MLP LFI maximum fragment size is configured in milliseconds,
while FRF.12 maximum fragment size is configured in bytes.
Example: Determining the Proper Fragment Size
The following are example values of fragment size, based on the rule that a fragment size of
about 80 bytes per every 64 kb/s of the clocking rate should be configured:
On a 64-kb/s link, the proper fragment size to use is 80 bytes.
On a 128-kb/s link, the proper fragment size to use is 160 bytes (80 * 2).
On a 192-kb/s link, the proper fragment size to use is 240 bytes (80 * 3).
On a 256-kb/s link, the proper fragment size to use is 320 bytes (80 * 4).
And so on.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-37
Configuring MLP with Interleaving
This topic describes the Cisco IOS commands required to configure MLP with interleaving.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-5
Configuring MLP with Interleaving
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.

To configure MLP with interleaving, you must perform these configuration steps:
Step 1 Enable MLP on a PPP interface.
Step 2 On the multilink interface, enable interleaving within MLP.
Step 3 In the multilink interface configuration, specify the maximum fragment size by
specifying the maximum desired serialization delay in ms.
8-38 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-6
Configuring MLP with Interleaving
Enables MLP.
Enables interleaving of frames with fragments.

Configures maximum fragment delay in ms.


The router calculates the maximum fragment size from the
interface bandwidth and the maximum fragment delay.
Fragment size = interface bandwidth * maximum fragment delay.
Default maximum fragment delay is 30 ms.

The ppp multilink command enables MLP on a PPP interface.
The ppp multilink interleave command enables interleaving of fragments within the multilink
connection.
The ppp multilink fragment delay delay command specifies the maximum desired fragment
delay for the interleaved multilink connection. The maximum fragment size is calculated from
the interface bandwidth and the specified maximum delay. The default is set at 30 ms. To
support voice packets, a maximum fragment size of 10 to 15 ms should be used.
If distributed Cisco Express Forwarding is configured on a Versatile Interface Processor (VIP)
interface, MLP with interleaving will run in distributed mode on the VIP.
The syntax shown in the figure for the ppp multilink command is compatible with the syntax
for the ppp multilink command in Cisco IOS Software Release 12.4. The syntax shown in the
figure for the ppp multilink interleave command is the same as the syntax for the ppp
multilink interleave command in Cisco IOS Software Release 12.4.
The syntax for the ppp multilink fragment delay command in Cisco IOS Software Release
12.4 is as follows:

2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-39
Syntax Description
Parameter Description
milliseconds Maximum amount of time, in milliseconds, that should be required
to transmit a fragment. Valid values range from 0 to 1000
milliseconds. The default is 30 milliseconds. If the desired delay
should be in microseconds, set the milliseconds argument to 0
and enter a value for the microseconds argument.
microseconds (Optional) Maximum amount of time, in microseconds, that
should be required to transmit a fragment. Valid values range
from 1 to 999 microseconds.
8-40 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: MLP with Interleaving

2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-7
MLP with Interleaving Example















The figure shows an example configuration of MLP with interleaving on a multilink group
interface.
A non-default maximum desired delay of 10 ms is configured.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-41
Monitoring MLP with Interleaving
This topic describes the Cisco IOS commands that are used to monitor MLP with interleaving.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-8
Monitoring MLP Interleaving
Displays MLP statistics including the number of interleaved
frames






















The show interfaces multilink command output includes MLP LFI statistics information and
indicates whether MLP interleaving is enabled on the interface. Multilink should be in the open
state along with Link Control Protocol (LCP) and IP Control Protocol (IPCP).
8-42 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.38-9
Monitoring MLP Interleaving (Cont.)
Displays information about individual multilink fragments and
interleaving events


















The debug ppp multilink fragments command is a valuable troubleshooting tool when
monitoring MLP LFI operations. This command outputs the result of every fragmentation
operation, indicating whether the packets are fragmented into correct-sized fragments.
Caution This command should be used with extreme caution in a production environment, because
of the amount of output that is created.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-43
FRF.12 Frame Relay Fragmentation
This topic describes when FRF.12 can be used and how FRF.12 affects VoIP packets.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 10
FRF.12 Frame Relay Fragmentation
FRF.12 specifies fragmentation of Frame Relay data
frames:
Frame Relay data frames that exceed the specified fragmentation
size are fragmented.
Smaller time-sensitive packets can be interleaved.
This is the recommended Frame Relay fragmentation method to
be used with VoIP over Frame Relay.
Fragments VoIP over Frame Relay packets if the fragment size is
set to a value smaller than the voice packet size.
FRF.12 requires FRTS or DTS.

FRF.12 is the recommended fragmentation to be used with VoIP over Frame Relay while
FRF.11 Annex C is the recommended fragmentation to be used with VoFR.
The FRF.12 Implementation Agreement defines FRF.12 fragmentation, and was developed to
allow long data frames to be fragmented into smaller pieces and interleaved with real-time
frames. In this way, real-time voice and non-real-time data frames can be carried together on
lower-speed Frame Relay links without causing excessive delay and jitter to the real-time
traffic like VoIP.
Because Frame Relay is a Layer 2 protocol, it has no way to tell which frame contains voice
(VoIP) or data. Therefore, Frame Relay will fragment all packets larger than the fragment size
into smaller frames, including VoIP packets. In a VoIP over Frame Relay network, it is
important to configure the fragment size on the Data-Link Connection Identifier (DLCI) so that
VoIP frames will not get fragmented. For example, a G.711 VoIP packet without cRTP is 200
bytes long. For this DLCI, do not set the fragment size to less than 200 bytes.
Frame Relay permanent virtual circuits (PVCs) not configured for VoFR use normal Frame
Relay (FRF.3.1) data encapsulation. If fragmentation is turned on for this DLCI, it uses FRF.12
for the fragmentation headers.
8-44 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
FRF.12 specifies three types of fragmentation, of which only one form is supported in Cisco
IOS Software:
End-to-end: Supported in Cisco IOS Software
Packets contain the FRF.12 fragmentation header
Occurs at the PVC level
LMI packets are not fragmented
User-Network Interface (UNI): Not supported in Cisco IOS Software releases
Network-to-Network Interface (NNI): Not supported in Cisco IOS Software releases
FRF.12 is configured on a per-PVC basis. If one PVC or subinterface has fragmentation but
another does not on the same physical interface, large packets can and will delay smaller
packets. For applications where fragmentation is needed, you must turn on fragmentation on all
PVCs or subinterfaces that carry large packets. FRF.12 fragmentation is configured within a
Frame Relay map class using the frame-relay fragment command. The configured map class
is then associated with the specific DLCIs. In addition, you must enable Frame Relay traffic
shaping (FRTS) on the interface in order for FRF.12 fragmentation to work.
Cisco IOS Software Release 12.1(5)T introduces a distributed version of FRF.12 Frame Relay
fragmentation to use with Distributed Traffic Shaping (DTS).
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-45
Configuring FRF.12 Frame Relay Fragmentation
This topic describes the Cisco IOS commands that are required to configure FRF.12.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 11
Configuring FRF.12 Frame Relay
Fragmentation
Specifies a map class to define QoS values for a virtual circuit
Enables fragmentation of Frame Relay frames for a Frame Relay
map class
Sets the maximum fragment size in bytes



Associates a map class with an interface or subinterface

FRF.12 fragmentation is configured within the Frame Relay map class. The frame-relay
fragment command sets the maximum fragment size in bytes. On an interface, the frame-relay
class command applies the map class to the interface or subinterface. To associate a map class
with a DLCI, use the class command in Frame Relay DLCI configuration mode or Frame Relay
VC-bundle-member configuration mode.
FRF.12 requires FRTS to be enabled.
8-46 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Example: FRF.12 Frame Relay Fragmentation

2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 12
FRF.12 Frame Relay Fragmentation
Example













The figure shows a configuration example where FRF.12 fragmentation is applied to a data
Frame Relay circuit configured on the serial 0/0.1 subinterface.
The maximum fragment size is set to 80 bytes. This would be used in a VoIP over Frame Relay
environment.
FRTS is enabled on the interface and the FRTS token bucket parameters are configured within
the Frame Relay map class. In this figure, FRTS is enabled with a Committed Information Rate
(CIR) of 64 kb/s, a committed burst (Bc) (normal burst size) of 640 bits, and uses weighted fair
queuing (WFQ) as the shaping queue.
Note The purpose of fragmentation is to decrease serialization delays so that large data frames
cannot block small voice packets for excessive periods of time. Both voice and data packets
are subject to the shaping rate. FRTS token bucket operation is based on burst of credits in
bits. If a large data packet gets through the shaper and uses up all the credits, the voice
packets will be delayed until more credit becomes available. But if only a small fragment of a
data packet can get through the shaper, the voice packet will be delayed for less time. So
with FRTS and FRF.12, the bottleneck is at the shaper, not at the port. Therefore, the
fragment size should be determined based on the CIR and not the physical interface
clocking rate.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-47
FRTS doesn't take into account the flags and cyclic redundancy checks (CRCs) in the shaping
algorithm. Because a flag and CRC need to be added for every fragment, on lower-speed links
(768 kb/s and below), you should shape to a value slightly lower than the actual CIR to account
for the flags and CRCs. For example, on a 128-kb/s Frame Relay PVC, the recommended
frame-relay CIR value to use will be 124,872 b/s with a Bc of 1250 bits per committed time
window (Tc).
PVC
Speed
Fragment Size
(for 10-ms Delay)
Recommended
CIR
Recommended
Bc (CIR/100)
56 kb/s 70 bytes 52968 b/s 530 bits

64 kb/s 80 bytes 60952 b/s 610 bits

128 kb/s 160 bytes 124872 b/s 1250 bits
256 kb/s 320 bytes 252832 b/s 2530 bits
512 kb/s 640 bytes 508816 b/s 5090 bits
768 kb/s 960 bytes 764940 b/s 7560 bits

8-48 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Monitoring FRF.12 Frame Relay Fragmentation
This topic describes the Cisco IOS commands that are required to monitor FRF.12.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 13
Monitoring FRF.12 Frame Relay
Fragmentation
Displays information about the Frame Relay fragmentation




The show frame-relay fragment command displays information about the FRF.12 Frame
Relay fragmentation process. The fragment type will always display end-to-end because this is
the only type currently supported on Cisco IOS Software. In addition to fragment type, the
fragment size in bytes and associated DLCI is displayed.
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-49
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 14
Monitoring FRF.12 Frame Relay
Fragmentation (Cont.)
Displays statistics about PVCs for Frame Relay interfaces

















The show frame-relay pvc command output includes settings related to the FRF.12
fragmentation process. This output shows the fragment size (80 bytes in this example) used on
the Frame Relay PVC. The fragment type is end-to-end because Cisco IOS Software currently
supports only end-to-end FRF.12 fragmentation.
8-50 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 15
Summary
Cisco LFI options are Multilink PPP with interleaving, FRF.12, and
FRF.11 Annex C.
Serialization delay is a function of the link speed and packet size.
To ensure low delay and jitter for voice packets on slow links, the
recommended standard goal for serialization delay is to not
exceed 10 to 15 ms.
The ppp multilink command enables MLP on a PPP interface.
The ppp multilink interleave command enables interleaving of
fragments within the multilink connection. The ppp multilink
fragment-delay command specifies the maximum desired
fragment delay for the interleaved multilink connection.
The show interface multilink command output includes MLP LFI
statistics information and indicates whether MLP interleaving is
enabled on the interface.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.38- 16
Summary (Cont.)
FRF.12 specifies fragmentation of Frame Relay data frames when
they exceed a specified size or when there are smaller time-
sensitive packets that can be interleaved, and will fragment VoIP
if fragment size is set to a smaller value than the VoIP size.
The frame-relay fragment map-class command sets the
maximum fragment size in bytes. On an interface, the frame-
relay class command applies the map class to the interface,
subinterface, or a DLCI.
The show frame-relay fragment command displays information
about the FRF.12 Frame Relay fragmentation statistics.


2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-51
Module Summary
This topic summarizes the key points discussed in this module.
2009 CiscoSystems, Inc. All r ights reserved. Cour se acronymvx.x#-1
2009 Cisco Systems, I nc. All rights reserved. QoSv2.38-1
Module Summary
Link efficiency mechanisms are used to increase the perceived
throughput and decrease the latency on WAN links.
Class-based TCP and class-based RTP header compression
enable header compression on specific traffic classes using the
MQC method.
LFI improves the serialization delay for packets leaving the router
and prevents the voice packets from waiting on large data packets
to be processed.

The various link efficiency mechanisms available in Cisco IOS Software include class-based
TCP and RTP header compression, Layer 2 payload compression, MLP link fragmentation and
interleaving (MLP LFI), and Frame Relay Fragmentation (FRF.12). You can use these QoS
mechanisms on slower WAN links, such as 768 kb/s and slower, to improve the link efficiency
by increasing the throughput and decreasing the overall delay.
Class-based TCP and RTP header compressions are configured using the MQC method to
reduce the protocol header overhead. Header compression is most effective for packets with
small payload size.
Layer 2 payload compression is not used much because of the software compression delay
overhead. Using a hardware compression module can help reduce the software compression
delay.
MLP LFI is supported on leased-line interfaces, while FRF.12 (for VoIP) and FRF.11 Annex C
(for VoFR) are supported on Frame Relay interfaces. LFI is used to reduce the serialization
delay of large packets. Serialization delay is based on the link speed and packet size. To ensure
high voice quality, the recommended serialization delay is 10 to 15 ms maximum. As a general
rule, a fragment size of 80 bytes for every 64 kb/s of link speed is recommended.
8-52 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
References
For additional information, refer to these resources:
For more information on link efficiency mechanisms, refer to Link Efficiency Mechanisms
Overview at this URL:
http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/lem_oview_ps6350_TSD_P
roducts_Configuration_Guide_Chapter.html
For more information on Layer 2 payload compression, refer to Understanding Data
Compression at this URL:
http://www.cisco.com/en/US/tech/tk713/tk802/technologies_tech_note09186a00801b3b86.
shtml
For more information on TCP and RTP header compression, refer to these RFCs:
RFC 2508 (RTP header compression)
RFC 1144 (TCP header compression)
RFC 2507 (IP header compression)
For more information on FRF.12 and DTS configuration, refer to Frame Relay Traffic
Shaping With Distributed QoS on the Cisco 7500 Series at this URL:
http://www.cisco.com/en/US/tech/tk543/tk545/technologies_tech_note09186a00800a96b5.
shtml
For information on FRF.11 Annex C, refer to VoFR Encapsulation and Fragmentation at
this URL:
http://www.cisco.com/en/US/tech/tk1077/technologies_tech_note09186a00800942e1.shtml
For more information on Cisco class-based TCP and RTP header compression, refer to
Configuring Class-Based RTP and TCP Header Compression at this URL:
http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/config_cb_hdr_comp_ps635
0_TSD_Products_Configuration_Guide_Chapter.html
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-53
Module Self-Check
Use the questions here to review what you learned in this module. The correct answers and
solutions are found in the Module Self-Check Answer Key.
Q1) With Layer 2 payload compression, what can be done to improve the
compression/decompression delay of the router? (Source: Understanding Link
Efficiency Mechanisms)
A) enable CEF switching
B) enable fast switching
C) use the Stacker or Predictor compression algorithm
D) use hardware-assisted compression
Q2) Which two of these statements are true, based on the following show output? (Choose
two.) (Source: Configuring Class-Based Header Compression)






















A) Both class-based TCP and RTP header compression are enabled for the VoIP
traffic class.
B) IP payload compression is enabled for the VoIP traffic class.
C) LLQ is enabled for the VoIP traffic class.
D) Class-based RTP header compression is enabled for all RTP traffic.
8-54 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Q3) Which two of these statements are correct regarding TCP and RTP header
compression? (Choose two.) (Source: Configuring Class-Based Header Compression)
A) Hardware-assisted header compression is required to reduce the header
compression delay.
B) TCP header compression compresses both the IP and TCP headers.
C) RTP header compression compresses the IP, UDP, and RTP headers.
D) TCP and RTP header compression can compress the respective protocol
headers down to 10 bytes.
Q4) TCP header compression is most effective on which of these applications? (Source:
Configuring Class-Based Header Compression)
A) VoIP
B) FTP
C) video streaming
D) Telnet
E) TFTP
Q5) RTP header compression is most effective on which of the following applications?
(Source: Configuring Class-Based Header Compression)
A) FTP
B) VoIP
C) TFTP
D) Telnet
E) HTTP
Q6) Which three statements about FRF.12 and FRF.11 Annex C are correct? (Choose
three.) (Source: Configuring Link Fragmentation and Interleaving)
A) FRF.12 fragmentation is used on DLCIs configured for VoIP.
B) FRF.12 fragmentation is used on DLCIs configured for VoFR.
C) FRF.11 Annex C fragmentation is used on DLCIs configured for VoIP.
D) FRF.11 Annex C fragmentation is used on DLCIs configured for VoFR.
E) FRF.12 fragmentation requires FRTS to be enabled.
F) Cisco IOS Software supports UNI and NNI FRF.12 fragmentation, and not
end-to-end fragmentation.
Q7) When configuring Multilink PPP with interleaving, where is the fragment size
configured? (Source: Configuring Link Fragmentation and Interleaving)
A) The fragment size in milliseconds is configured under the physical serial
interfaces with PPP encapsulation and Multilink PPP enabled.
B) The fragment size in milliseconds is configured under the logical multilink
interface.
C) The fragment size in bytes is configured under the map class.
D) The fragment size in bytes is configured within the policy map.
Q8) Which two factors will influence the serialization delay? (Choose two.) (Source:
Configuring Link Fragmentation and Interleaving)
A) link speed
B) speed of light in the media
C) router CPU processing power
D) packet size
2009 Cisco Systems, Inc. Link Efficiency Mechanisms 8-55
Q9) To ensure good voice quality, what is the recommended fragment size? (Source:
Configuring Link Fragmentation and Interleaving)
A) 80 bytes per every 64 kb/s of the clocking, which will result in a 10-ms
serialization delay
B) 40 bytes per every 64 kb/s of the clocking, which will result in a 20-ms
serialization delay
C) 20 bytes per every 64 kb/s of the clocking, which will result in a 10-ms
serialization delay
D) 120 bytes per every 64 kb/s of the clocking, which will result in a 150-ms
serialization delay
Q10) From the show interface multilink output, which state(s) should be in the open state to
indicate proper Multilink PPP operation over an IP interface? (Source: Configuring
Link Fragmentation and Interleaving)
A) LCP, Multilink, and IPCP
B) LCP, IPCP, LFICP
C) LCP and MLP
D) LCP and IPCP
8-56 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Module Self-Check Answer Key
Q1) D
Q2) C, D
Q3) B, C
Q4) D
Q5) B
Q6) A, D, E
Q7) B
Q8) A, D
Q9) A
Q10) A


Module 9
QoS Best Practices
Overview
IP was designed to provide best-effort service for delivery of data packets and to run across
virtually any network transmission media and system platform. To manage applications such as
voice over IP, streaming video, e-commerce, enterprise resource planning (ERP) applications,
and others, a network requires quality of service (QoS). Different applications have varying
needs for delay, delay variation (jitter), bandwidth, packet loss, and availability. These
parameters form the basis of QoS. The IP network should be designed to provide the requisite
QoS to applications.
To facilitate true end-to-end QoS on an IP network, the Internet Engineering Task Force (IETF)
has defined two models: Integrated Services (IntServ) and Differentiated Services (DiffServ).
IntServ follows the signaled QoS model, in which the end-hosts signal their QoS need to the
network. DiffServ works on the provisioned QoS model, in which network elements are set up
to service multiple classes of traffic with varying QoS requirements.
This module describes the implementation of the DiffServ model in service provider and
enterprise networks. The first lesson describes baseline traffic classifications. The second
lesson describes a DiffServ implementation in a typical enterprise campus and service provider
network. The third lesson describes how QoS tools can mitigate DoS attacks through the use of
control plane, data plane, and Network-Based Application Recognition (NBAR) known-worm
policing.
Module Objectives
Upon completing this module, you will be able to correctly select the most appropriate QoS
mechanisms for providing QoS using Cisco best practices in service provider and enterprise
networks. This ability includes being able to meet these objectives:
Describe the set of classification practices that most closely represent Cisco QoS best
practices
Describe the set of QoS mechanisms used to implement Cisco end-to-end QoS best
practices in a typical enterprise network connected through a service provider that is
providing Layer 3 IP services
Describe steps recommended to mitigate DoS attacks and worm attacks using QoS tools
9-2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 1
Understanding Traffic
Classification Best Practices
Overview
Traffic classification means using a traffic descriptor to categorize a packet within a specific
group and to define that packet to make it accessible for quality of service (QoS) handling on
the network. Using proper traffic classification, the network traffic is partitioned into multiple
priority levels or classes of service. This lesson describes traffic classification best practices.
Objectives
Upon completing this lesson, you will be able to describe the set of classification practices that
most closely represents Cisco QoS best practices. This ability includes being able to meet these
objectives:
List and describe the steps for optimally deploying QoS within an enterprise
Explain how to begin a successful QoS deployment by strategically defining the business
objectives to be achieved
Explain the QoS requirements of the various application types
Define some of the key QoS best-practices recommendations
Explain how to map enterprise traffic classes into appropriate service provider traffic
classes
9-4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Optimally Deploying QoS Within the Enterprise
This topic describes the steps required for optimally deploying QoS within an enterprise.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3#-2
Steps for Optimally Deploying QoS
Within the Enterprise
A successful QoS deployment comprises multiple
phases, including the following:
1. Strategically defining QoS obj ectives
2. Analyzing application service-level requirements
3. Designing QoS policies
4. Rolling out the QoS policies
5. Monitoring the service levels

A successful QoS deployment comprises multiple phases, including the following:
1. Strategically defining the business objectives to be achieved via QoS.
2. Analyzing the service-level requirements of the various traffic classes to be provisioned
for.
3. Designing and testing QoS policies prior to production-network rollout.
4. Rolling out the tested QoS designs to the production network.
5. Monitoring service levels to ensure that the QoS objectives are being met.
These phases may need to be repeated as business conditions change and evolve.
2009 Cisco Systems, Inc. QoS Best Practices 9-5
Strategically Defining QoS Objectives
This topic explains how to begin a successful QoS deployment by strategically defining the
business objectives to be achieved and using the Cisco modified RFC 4594-based marking
recommendations as a guide.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3#-3
QoS Objectives and Traffic Classification
Begin QoS deployment by clearly defining organizational
objectives; this step will determine how many traffic classes will
be required and what those classes will be.
Use the Cisco modified RFC 4594-based marking
recommendations as a guide for determining traffic classes.
Consider the factors that can affect the number of classes.
Platform-specific constraints
Service-provider constraints
Seek executive approval of QoS objectives before design and
deployment.
Acquire a solid understanding of service-level requirements of
network applications.

QoS technologies are the enablers for business and organizational objectives. Therefore, the
way to begin a QoS deployment is not to activate QoS features simply because they exist, but
to start by clearly defining the objectives of the organization. For example, one of the first
questions that should arise during QoS planning is: How many traffic classes should be
provisioned for, and what should they be?
To help answer these fundamental questions, organizational objectives such as the following
must be defined:
Is the objective to enable VoIP only, or is video also required?
If video is required, is video-conferencing required or streaming video? Are both required?
Are some applications considered mission-critical, and if so, which ones?
Does the organization wish to suppress certain types of traffic, and if so, which types?
To help address these crucial questions and to simplify QoS, Cisco has adopted an initiative
called the Cisco modified RFC 4594-based marking recommendations. The document is
strategically designed to unify QoS within Cisco, from enterprise to service provider, and from
engineering to marketing. It also provides uniform, standards-based recommendations to help
ensure that QoS designs and deployments are unified and consistent.
9-6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3#-4
Cisco Modified RFC 4594-Based Marking
Recommendations
Network Control CS6 48 RFC 2474
VoIP Telephony EF 46 RFC 3246
Broadcast Video CS5 40 RFC 2474
Multimedia Conferencing AF41 34 RFC 2597
Real-Time Interactive/TelePresence CS4 32 RFC 2474
Multimedia Streaming AF31 26 RFC 2597
Call Signaling CS3 24 RFC 2474
Low-Latency/Transactional Data AF21 18 RFC 2597
OAM CS2 16 RFC 2474
High-Throughput/Bulk Data AF11 10 RFC 2597
Best Effort DF 0 RFC 2474
Low-Priority/Scavenger Data CS1 8 RFC 3662
Application
L3 Classification
PHB DSCP RFC
IETF

Enterprises do not need to deploy all 12 classes of the modified RFC 4594-based marking
recommendations model. This model is intended to be a forward-looking guide that considers
as many classes of traffic with unique QoS requirements as possible. Familiarity with this
model can assist in the smooth expansion of QoS policies to support additional applications as
future requirements arise. However, at the time of QoS deployment, the enterprise needs to
clearly define its organizational objectives, which will correspondingly determine how many
traffic classes will be required.
This consideration should be tempered with the determination of how many application classes
the networking administration team feels comfortable with deploying and supporting. Platform-
specific constraints or service-provider constraints may also affect the number of classes of
service.
At this point you should also consider a migration strategy to allow the number of classes to be
smoothly expanded as future needs arise, as shown in the figure.
Always seek executive endorsement of the QoS objectives prior to design and deployment.
QoS is a system of managed unfairness and as such almost always bears political and
organizational repercussions when implemented. To minimize the effects of these non-technical
obstacles to deployment, address these political and organizational issues as early as possible,
garnering executive endorsement whenever possible.
A strategic standards-based guide such as the Cisco modified RFC 4594-based marking
recommendations coupled with a working knowledge of QoS tools and syntax is a prerequisite
for any successful QoS deployment. However, you must also understand the service-level
requirements of the various applications requiring preferential or deferential treatment within
the network.
2009 Cisco Systems, Inc. QoS Best Practices 9-7
Analyzing Application Service-Level
Requirements
This topic describes the QoS requirements of the various application types.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3#-5
QoS Traffic Requirements and
Recommendations: Voice
Voice bearer traffic
Marked to DSCP EF
Latency < 150 ms*
Jitter < 30 ms*
Loss < 1%*
Guaranteed priority bandwidth
per call
Call-signaling traffic
Marked as DSCP CS3
150 b/s (+ Layer 2 overhead) per
phone of guaranteed bandwidth
*One-way r equirements

VoIP deployments require provisioning explicit priority servicing for VoIP (bearer stream)
traffic and a guaranteed bandwidth service for call-signaling traffic. The key QoS requirements
and recommendations for voice bearer traffic are as follows:
Voice traffic should be marked to DSCP EF per the modified RFC 4594-based marking
recommendations.
Packet loss should be no more than 1 percent.
One-way latency (mouth-to-ear) should be no more than 150 ms.
Average one-way jitter should be targeted under 30 ms.
Depending on the sampling rate, VoIP codec and Layer 2 media overhead, 21-320 kb/s of
guaranteed priority bandwidth is required per call.
Voice quality is directly affected by all three QoS quality factors: loss, latency, and jitter.
Loss: Loss causes voice clipping and skips. The industry-standard coded algorithms that
are used in Cisco digital signal processors (DSPs) can correct for up to 30 ms of lost voice.
For example, if a 20-ms sample of voice payload is used per VoIP packet, only a single
voice packet can be lost during any given time. If two successive voice packets are lost, the
30-ms correctable window is exceeded and voice quality begins to degrade. VoIP networks
are typically designed for very close to zero percent VoIP packet loss, with the only actual
packet loss being due to L2 bit errors or network failures.
9-8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Latency: Excessive latency can cause voice quality degradation. The goal commonly used
in designing networks to support VoIP is the target specified by ITU standard G.114, which
states that 150 ms of one-way, end-to-end (mouth-to-ear) delay ensures user satisfaction for
telephony applications. A design should apportion this budget to the various components of
network delay (propagation delay through the backbone, scheduling delay due to
congestion, and the access link serialization delay) and service delay (due to VoIP gateway
codec and de-jitter buffer). While the ITU G.114 states that a 150-ms, one-way delay
budget is acceptable for high voice quality, lab testing has shown that there is a negligible
difference in voice quality Mean Opinion Scores (MOS) using networks built with 200-ms
delay budgets. Cisco thus recommends designing to the ITU standard of 150 ms, but if
constraints exist where this delay target cannot be met, the delay boundary can be extended
to 200 ms without significant impact on voice quality.
Jitter: Jitter buffers, which are also known as play-out buffers, are used to change
asynchronous packet arrivals into a synchronous stream by turning variable network delays
into constant delays at the destination end systems. The role of the jitter buffer is to balance
the delay and the probability of interrupted playout due to late packets. Late or out-of-order
packets are discarded. If the jitter buffer is arbitrarily either large or small, it imposes
unnecessary constraints on the characteristics of the network. A jitter buffer that is set too
large adds to the end-to-end delay; this means that less delay budget is available for the
network, so the network needs to support a delay target tighter than practically necessary. If
a jitter buffer is too small to accommodate the network jitter, buffer underflows or
overflows can occur. An underflow occurs when the buffer is empty when the codec needs
to play out a sample. An overflow occurs when the jitter buffer is full and newly-arriving
packets cannot be enqueued in the jitter buffer. Both jitter buffer underflows and overflows
cause packets to be discarded. Adaptive jitter buffers aim to overcome these issues by
dynamically tuning the jitter buffer size to the lowest acceptable value. Alternatively, the
30-ms value can be used as a jitter target; extensive lab testing has shown that when jitter
consistently exceeds 30 ms, voice quality degrades significantly.
Because of its strict service-level requirements, VoIP is well suited to the Expedited
Forwarding Per-Hop Behavior, as defined in RFC 3246 (formerly RFC 2598). It should
therefore be marked to DSCP EF (46) and assigned strict priority servicing at each node,
regardless of whether such servicing is done in hardware (as in Catalyst switches via hardware
priority queuing) or in software (as in Cisco IOS routers via LLQ).
The following are key QoS requirements and recommendations for call-signaling traffic:
Call-signaling traffic should be marked as DSCP CS3 per the modified RFC 4594-based
marking recommendations. During migration, it may also be marked the legacy value of
DSCP AF31.
Voice control traffic requires 150 b/s (plus Layer 2 overhead) per phone of guaranteed
bandwidth. More may be required, depending on the call signaling protocols in use.
Call-Signaling traffic was originally marked by Cisco IP Telephony equipment to DSCP AF31.
However, the Assured Forwarding classes, as defined in RFC 2597, were intended for flows
that could be subject to markdown and subsequently the aggressive dropping of marked-down
values. Marking down and aggressively dropping call-signaling could result in noticeable
delay-to-dial-tone (DDT) and lengthy call setup times, both of which generally translate to poor
user experiences. The QoS Baseline (and subsequently, the modified RFC 4594-based marking
recommendations) changed the marking recommendation for call-signaling traffic to DSCP
CS3 because Class Selector code points, as defined in RFC 2474, were not subject to
markdown and aggressive dropping. Each call signaling protocol has unique TCP/UDP ports
and traffic patterns that should be taken into account when provisioning QoS policies for them.
2009 Cisco Systems, Inc. QoS Best Practices 9-9
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3#-6
Provisioning for Voice:
VoIP Bandwidth Reference Tables

The bandwidth consumed by VoIP streams (in b/s) is calculated by adding the VoIP sample
payload (in bytes) to the 40-byte IP/UDP/RTP headers (assuming that cRTP is not in use),
multiplying this value by the packetization rate (default of 50 packets per second) and then
multiplying again by 8 to convert it to bits.
The first table in the figure details the bandwidth per VoIP flow at a default packet rate of 50
packets per second (p/s). This does not include Layer 2 overhead and does not take into account
any possible compression schemes, such as cRTP.
Note The Service Parameters menu in Cisco CallManager Administration can be used to adjust
the packet rate. It is possible to configure the sampling rate above 30 ms, but this usually
results in poor voice quality.
A more accurate method for provisioning VoIP is to include the Layer 2 overhead, which
includes preambles, headers, flags, cyclic redundancy checks (CRCs), and ATM cell-padding.
The amount of overhead per VoIP call depends on the Layer 2 technology used:
802.1Q Ethernet adds up to 32 bytes of Layer 2 overhead.
Point-to-point protocol (PPP) adds 12 bytes of Layer 2 overhead.
Multilink PPP (MLP) adds 13 bytes of Layer 2 overhead.
Frame Relay adds 4 bytes of Layer 2 overhead; Frame Relay with FRF.12 adds 8 bytes.
ATM adds varying amounts of overhead, depending on the cell padding requirements.
The second table in the figure shows a bandwidth provisioning example for voice that includes
Layer 2 overhead. When determining the per-call bandwidth requirement for voice traffic, keep
the following in mind:
Codec type
9-10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Packetization interval
Layer 2 protocol overhead
Bandwidth required for the voice control (signaling) traffic
Note A tool for quickly and accurately calculating VoIP bandwidth requirements can be found at
the following site: http://tools.cisco.com/Support/VBC/jsp/Codec_Calc1.jsp.
2009 Cisco Systems, Inc. QoS Best Practices 9-11
Example: G.711 Voice Bearer Bandwidth Requirement
Calculation
This example shows how to calculate the VoIP bearer bandwidth requirement for a single VoIP
call using a G.711 codec (Layer 2 overhead not included):















9-12 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3#-7
QoS Traffic Requirements and
Recommendations: IP Videoconferencing
Marked to DSCP AF41
Latency < 150 ms*
Jitter < 30 ms*
Loss < 1%*
Minimum priority bandwidth
guarantee overprovisioned by
20%
For example, a 384-kb/s
stream would require
460 kb/s of bandwidth.
*One-way requi rements

When provisioning for IP Videoconferencing (IP/VC) traffic (referred to as Multimedia
Conferencing in the modified RFC 4594-based marking recommendations), the following
guidelines are recommended:
IP/VC traffic should be marked to DSCP AF41; excess IP/VC traffic can be marked down
by a policer to AF42 or AF43.
Loss should be no more than one percent.
One-way latency should be no more than 150 ms.
Jitter should be no more than 30 ms.
IP/VC queues should be overprovisioned by 20 percent to accommodate bursts.
Because IP/VC includes a G.711 audio codec for voice, it has the same loss, delay, and delay
variation requirements as voice, but the traffic patterns of IP/VC are radically different from
voice. For example, IP/VC traffic has varying packet sizes and extremely variable packet rates.
The IP/VC rate is the sampling rate of the video stream, not the actual bandwidth the video call
requires. In other words, the data payload of IP/VC packets is filled with 384 kb/s worth of
video and voice samples.
IP, UDP, and RTP headers (40 bytes per packet, uncompressed) need to be included in IP/VC
bandwidth provisioning, as does the Layer 2 overhead of the media in use. Because (unlike
VoIP) IP/VC packet sizes and rates vary, the header overhead percentage will vary as well, so
an absolute value of overhead cannot be accurately calculated for all streams. Testing, however,
has shown that a conservative rule of thumb for IP/VC bandwidth provisioning is to
overprovision the priority bandwidth guarantee by 20 percent. For example, a 384-kb/s IP/VC
stream would be adequately provisioned with an LLQ and CBWFQ of 460 kb/s.
2009 Cisco Systems, Inc. QoS Best Practices 9-13
Note The Cisco LLQ algorithm has been implemented to include a default burst parameter
equivalent to 200 ms worth of traffic. Testing has shown that this burst parameter does not
require additional tuning for a single IP/VC stream. For multiple streams, this burst
parameter may be increased as required.
When addressing the QoS needs of streaming video traffic, the following guidelines are
recommended:
Streaming video (Multimedia Streaming), should be marked to AF31, as designated by the
modified RFC 4594-based marking recommendations.
Loss should be no more than 5 percent.
Latency should be no more than 4 to 5 seconds, depending on video application buffering
capabilities.
There are no significant jitter requirements.
Guaranteed bandwidth (CBWFQ) requirements depend on the encoding format and rate of
the video stream.
Non-organizational streaming video applications, such as entertainment videos, may be
marked as scavenger (DSCP CS1) and assigned a minimal bandwidth (CBWFQ)
percentage.
Streaming video applications may have more lenient QoS requirements for two reasons. First,
they can be delay-insensitive. Second, they may be jitter-insensitive due to application
buffering. However, streaming video may contain valuable content, such as e-learning
applications or multicast company meetings, and therefore may require service guarantees.
Non-organizational video content (or video that is strictly entertainment-oriented in nature,
such as music videos and humorous commercials) might be considered for a scavenger service.
This means that these streams play if bandwidth exists, but they are the first to be dropped
during periods of congestion.
Example: Calculating the Bandwidth Requirement for a
384-kb/s Videoconference Stream
This example shows how to calculate the bandwidth requirement for a 384-kb/s IP/VC stream:


9-14 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3#-8
QoS Traffic Requirements: Data
Best-Effort Data traffic
Marked to DSCP DF
At least 25% of bandwidth
Bulk (High-Throughput) Data traffic
Marked to DSCP AF11
Moderate bandwidth guarantee
Transactional (Low-Latency) Data
traffic
Marked to DSCP AF21
Adequate bandwidt h guarantee for
interactive, foreground operations
Scavenger (Low-Priority) Data traffic
Marked to DSCP CS1
Minimal bandwidth queue that is
the first to starve during congestion

There are hundreds of thousands of data networking applications. Some are TCP, others are
UDP; some are delay sensitive, others are not; some are bursty in nature, others are steady;
some are lightweight, others require high bandwidth. Not only do applications vary one from
another, but the same application can vary significantly from one version to another. The
modified RFC 4594-based marking recommendations identify four main classes of data traffic,
according to their general networking characteristics and requirements. These classes are best
effort, high-throughput data, low-latency data, and low-priority data.
The best-effort class is the default class for all data traffic. An application is removed from the
default class only if it is selected for preferential or deferential treatment. For best-effort data
traffic, Cisco recommends the following guidelines:
Best-effort traffic should be marked to default forwarding (DF) or DSCP 0.
Adequate bandwidth should be assigned to the best-effort class as a whole, because the
majority of applications default to this class. Traffic in this class should be provisioned
with a dedicated queue. It is also recommended that you enable WRED on this class.
However, because all the traffic in this class is marked to DSCP 0, the congestion
avoidance mechanism is essentially random early detection (RED).
The bulk (high-throughput) data class is intended for applications that are relatively non-
interactive and drop-insensitive and that typically span their operations over a long period of
time as background occurrences. Such applications include FTP, backup operations, database
synchronizing or replicating operations, content distribution, and any other type of background
operation. Because most background applications are TCP-based file transfers, these
applications, if left unchecked, can take excessive network resources away from more
interactive, foreground applications.
2009 Cisco Systems, Inc. QoS Best Practices 9-15
For bulk data traffic, Cisco recommends the following guidelines:
Bulk data traffic should be marked to DSCP AF11; excess bulk data traffic can be marked
down by a policer to AF12; violating bulk data traffic may be marked down further to
AF13 or dropped.
Traffic in this class should be provisioned with a moderate bandwidth guarantee.
The transactional (low-latency) data class is a combination of two similar types of applications:
transactional data client-server applications and interactive messaging applications. The
response time requirement separates transactional data client-server applications from generic
client-server applications. For example, with transactional data client-server applications such
as SAP, PeopleSoft, and Data-Link Switching (DLSw+), the transaction is a foreground
operation; the user waits for the operation to complete before proceeding. Email is not
considered a transactional data client-server application, because most email operations occur
in the background and users do not usually notice even several-hundred-millisecond delays in
mailspool operations.
For transactional data traffic, Cisco recommends the following guidelines:
Transactional data traffic should be marked to DSCP AF21; excess transactional data
traffic can be marked down by a policer to AF22; violating transactional data traffic can be
marked down further to AF23 or dropped.
Transactional data traffic should have an adequate bandwidth guarantee for the interactive,
foreground operations that they support.
The scavenger (low-priority) data class is intended for non-business related traffic flows, such
as data or media applications that are entertainment-oriented. The approach of a less-than-best-
effort service class for non-business applications (as opposed to shutting them down entirely)
has proven to be a popular, political compromise. These applications are permitted on
enterprise networks as long as resources are always available for business-critical applications.
However, as soon the network experiences congestion, this class is the first to be penalized and
is aggressively dropped. Furthermore, the scavenger class can be utilized as part of an effective
strategy for DoS and worm attack mitigation. Examples of scavenger traffic include YouTube,
Xbox 360 movies, iTunes, and BitTorrent.
For scavenger data traffic, the following guidelines are recommended:
Scavenger data traffic should be marked CS1.
Scavenger data traffic should be provisioned with a minimal bandwidth queue that is the
first to starve if network congestion occurs.
9-16 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3#-9
Grouping Data Applications into Classes
Application
Class
Example Applications
Applications/
Traffic Properties
Packet/
Message Sizes
Transactional Peopl eSoft (Vantive), Mi crosoft
SQL Server
Typically use a cli ent-server
protocol model.
User initiated client-based
queri es followed by server
response.
Quer y response may consist
of many messages between
client and server or of many
TCP and FTP sessions
runni ng simultaneously.
Depends on
application; could
be anywhere from
1 KB to 50 MB
Bulk Network-based backups,
Microsoft Outlook
Long file transfers.
Always invokes TCP
congestion management.
Average message
size 64 KB or
greater
Best Effor t All non-criti cal traffic, HTTP web
browsing, other miscellaneous
traffic
Varies Varies

When classifying the different network applications into traffic classes, try to group
applications with common characteristics and QoS requirements together into the same traffic
class. The figure shows some applications and the generic networking characteristics that
determine the data application class for which they are best suited.
2009 Cisco Systems, Inc. QoS Best Practices 9-17
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 10
QoS Traffic Requirements and
Recommendations: Control Plane
Cisco IOS Software internal mechanism for granting internal priority to important
control datagrams:
PAK_PRIORITY
Not configurable
Cisco IOS Software defaults:
Marks IGP traffic (RIP, OSPF, EIGRP) to DSCP CS6
Marks EGP traffic such as BGP to DSCP CS6 but does not give it
PAK_PRIORITY preferential treatment
Recommendations for IP routing (Network Control) traffic:
Marked to DSCP CS6
Moderate, but dedicated, guaranteed bandwidth queue
No WRED
Recommendations for network management (OAM) traffic:
Marked to DSCP CS2
Moderate, but dedicated, guaranteed bandwidth queue
No WRED

Unless the network is up and running, QoS is irrelevant. Therefore, it is critical to provision
QoS for control plane traffic, which includes IP routing traffic and network management.
By default, Cisco IOS Software (in accordance with RFC 791 and RFC 2474) marks interior
gateway protocol (IGP) traffic such as Routing Information Protocol (RIP/RIPv2), Open
Shortest Path First (OSPF), and Enhanced Interior Gateway Routing Protocol (EIGRP) to
DSCP CS6. However, Cisco IOS Software also has an internal mechanism for granting internal
priority to important control datagrams as they are processed within the router. This mechanism
is called PAK_PRIORITY.
As datagrams are processed though the router and down to the interfaces, they are internally
encapsulated with a small packet header, referred to as the PAKTYPE structure. Within the
fields of this internal header there is a PAK_PRIORITY flag that indicates the relative
importance of control packets to the internal processing systems of the router.
PAK_PRIORITY designation is a critical internal Cisco IOS Software operation and, as such,
is not administratively configurable in any way.
Exterior gateway protocol (EGP) traffic such as Border Gateway Protocol (BGP) traffic is
marked by default to DSCP CS6, but does not receive such PAK_PRIORITY preferential
treatment and may need to be explicitly protected in order to maintain peering sessions.
When addressing the QoS needs of IP routing (network control) traffic, Cisco recommends the
following guidelines:
IP routing traffic should be marked to DSCP CS6; this is default behavior on Cisco IOS
platforms. Cisco IOS Software automatically marks IP routing traffic to DSCP CS6.
IP routing traffic should be provisioned with a moderate, but dedicated, guaranteed
bandwidth queue.
WRED should not be enabled on this class, because network control traffic should not be
dropped. If the network control class is experiencing drops, the bandwidth allocated to it
should be re-provisioned.
9-18 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
When addressing the QoS needs of network management (OAM) traffic, Cisco recommends
the following guidelines:
Network management traffic should be marked to DSCP CS2.
Network management traffic should be provisioned with a moderate, but dedicated,
guaranteed bandwidth queue.
WRED should not be enabled on this class. If the OAM class is experiencing drops, the
bandwidth allocated to it should be re-provisioned.
2009 Cisco Systems, Inc. QoS Best Practices 9-19
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 11
QoS Requirements Summary

The table summarizes the key QoS requirements (bandwidth, packet loss, delay, and jitter) for
some of the major categories of applications.
Example: QoS Requirements of the Major Applications
Category
VoIP and IP/VC applications share the same low-drop, low-delay, and low-jitter requirements.
For example, a latency of less than 150 ms, a jitter of less than 30 ms, and a packet loss of less
than one percent are typically required.
Bulk applications such as FTP are less sensitive to drop, delay, and jitter, but generally require
more bandwidth than real-time traffic such as voice.
9-20 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Designing the QoS Policies
This topic describes best-practice QoS design principles.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 12
Design Approach to Enabling QoS

Once a QoS strategy has been defined and the application requirements are understood, end-to-
end QoS policies can be designed for each device and interface, as determined by its role in the
network infrastructure. Because the Cisco QoS toolset provides many QoS design and
deployment options, a few succinct design principles can help simplify strategic QoS
deployments.
For example, one such design principle is to always enable QoS policies in hardware, rather
than software, whenever a choice exists. Cisco IOS routers perform QoS in software, which
places incremental loads on the CPU, depending on the complexity and functionality of the
policy. Cisco Catalyst switches, on the other hand, perform QoS in dedicated hardware ASICS
and therefore do not tax their main CPUs to administer QoS policies. This allows complex
policies to be applied at line rates at even gigabit or ten-gigabit speeds.
Other simplifying best-practice QoS design principles include the following:
Classification and marking principles
Policing and markdown principles
Queueing and dropping principles
2009 Cisco Systems, Inc. QoS Best Practices 9-21
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 13
QoS Classification Best Practices
for Enterprise Networks
Classify and mark traffic as close to the source as possible.
Use DSCP markings whenever possible.
Follow standards-based DSCP PHB markings to ensure
interoperability and future expansion.

The first element of a QoS policy is to identify the traffic to be treated differently. By
classifying the application traffic into different traffic classes, a baseline methodology is set to
provide end-to-end QoS. DiffServ enables this classification by using the differentiated services
code point (DSCP) field. Using DiffServ, a properly designed network can deliver assured
bandwidth, low latency, low jitter, and low packet loss for voice while simultaneously ensuring
slices of available bandwidth to other traffic classes. Packets entering a DiffServ domain (a
collection of DiffServ routers) can be classified in a variety of ways, as follows:
IP source and destination addresses
Layer 4 protocol and port numbers
Incoming interface
MAC address
IP Precedence
DSCP value
Layer 2 information (Frame Relay discard eligible [DE] bits, Ethernet 802.1p bits)
NBAR, the Cisco value-added mechanism
It is best practice to classify and mark applications as close to their sources as technically and
administratively feasible. This principle promotes end-to-end Differentiated Services and Per-
Hop Behaviors (PHBs). Do not trust markings that can be set by users on their PCs or other
similar devices, because users can easily abuse provisioned QoS policies if permitted to mark
their own traffic. For example, if DSCP EF receives priority services throughout the enterprise,
a PC can be easily configured to mark all the traffic of the user to DSCP EF, thus hijacking
network priority queues to service non-real-time traffic. Such abuse could easily ruin the
service quality of real-time applications like VoIP throughout the enterprise.
9-22 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Following this rule, it is further recommended to use DSCP markings whenever possible,
because these are end-to-end, more granular and more extensible than Layer 2 markings. Layer
2 markings are lost when media changes (such as a LAN-to-WAN/VPN edge). There is also
less marking granularity at Layer 2. For example, 802.1Q/p CoS supports only 3 bits (values 0
to 7), as does MPLS EXP. Therefore, only up to eight classes of traffic can be supported at
Layer 2, and inter-class relative priority (such as RFC 2597 Assured Forwarding Drop
Preference markdown) is not supported. On the other hand, Layer 3 DSCP markings allow for
up to 64 classes of traffic, which is more than enough for most enterprise requirements for the
foreseeable future.
As the line between enterprises and service providers continues to blur and the need for
interoperability and complementary QoS markings is critical, you should follow standards-
based DSCP PHB markings to ensure interoperability and future expansion. Because the
modified RFC 4594-based marking recommendations are standards-based, enterprises can
easily adopt these markings to interface with service provider classes of service. Network
mergers are also easier to manage when you use standards-based DSCP markings.
In an enterprise environment, the QoS policies should allow critical business applications to
receive requisite resources, while ensuring that other applications are not neglected. QoS
policies should also ensure the quality of real-time traffic, such as voice and video. QoS
policies may also need to prevent non-business-related network traffic (scavenger traffic), such
as file-sharing, from taking up too much of the network bandwidth.
Network administrators often cannot justify continual upgrade of the link speeds in their
networks. Cisco IOS Software QoS features provide an alternative solution to link upgrade by
managing the links efficiently to meet the application demands. Use QoS mechanisms such as
Multilink PPP link fragmentation and interleaving (MLP LFI), compressed Real-Time
Transport Protocol (cRTP), class-based weighted fair queuing (CBWFQ), and low-latency
queuing (LLQ) to allow the most efficient distribution of the available bandwidth among the
applications.
2009 Cisco Systems, Inc. QoS Best Practices 9-23
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 14
QoS Policing and Markdown Best Practices
for Enterprise Networks
Police traffic flows as close to their sources as possible.
Whenever supported, markdown should be done according
to standards-based rules.

There is little reason to forward unwanted traffic only to police and drop it at a subsequent
node, especially when the unwanted traffic is the result of DoS or worm attacks. The
overwhelming volume of traffic that such attacks can create can cause network outages by
driving network device processors to their maximum levels. Therefore, you should police
traffic flows as close to their sources as possible. This principle applies also to legitimate flows.
DoS and worm-generated traffic can masquerade under legitimate, well-known TCP and UDP
ports and cause extreme amounts of traffic to be poured onto the network infrastructure. Such
excesses should be monitored at the source and marked down appropriately.
Whenever supported, markdown should be done according to standards-based rules, such as
RFC 2597 (Assured Forwarding PHB Group). For example, excess traffic marked to AFx1
should be marked down to AFx2 (or AFx3, whenever dual-rate policing such as that defined in
RFC 2698 is supported). Following such markdowns, congestion management policies, such as
DSCP-based WRED, should be configured to drop AFx3 more aggressively than AFx2, which
in turn should be dropped more aggressively than AFx1.
However, Cisco Catalyst switches do not currently perform DSCP-based WRED, so this
standards-based strategy cannot be implemented fully at this time. As an alternative
workaround, single-rate policers can be configured to mark down excess traffic to DSCP CS1
(scavenger); dual-rate policers can be configured to mark down excess traffic to AFx2, while
marking down violating traffic to DSCP CS1. Traffic marked as scavenger would then be
assigned to a less-than-best-effort queue. Such workarounds yield an overall effect similar to
the standards-based policing model. However, when DSCP-based WRED is supported on all
routing and switching platforms, you should mark down assured forwarding classes by RFC
2597 rules to comply more closely with this standard.
9-24 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 15
QoS Queuing and Dropping Best Practices
for Enterprise Networks
Enable queuing at any node that has the potential for congestion.
Assign a dedicated queue to each medianet application class.
Reserve at least 25 percent of link bandwidth for the default best-
effort class.
Limit the amount of strict priority queuing to 33 percent of link
capacity.
Use an admission control mechanism with any traffic assigned to
a strict-priority queue.
Whenever the Scavenger queuing class is enabled, assign a
minimal amount of bandwidthsuch as 1 percentto it.

Critical applications such as VoIP require service guarantees regardless of network conditions.
The only way to provide service guarantees is to enable queuing at any node that has the
potential for congestion, regardless of how rarely this may occur. This principle applies not
only to campus-to-WAN or VPN edges, where speed mismatches are most pronounced, but
also to campus access-to-distribution or distribution-to-core links, where oversubscription
ratios create the potential for congestion. There is simply no other way to guarantee service
levels than by enabling queuing wherever a speed mismatch exists.
Additionally, because each medianet application class has unique service-level requirements,
each should optimally be assigned a dedicated queue. However, on platforms bounded by a
limited number of hardware or service provider queues, no fewer than four queues would be
required to support medianet QoS policies, specifically:
Real-time queue (to support an RFC 3246 EF PHB service)
Guaranteed-bandwidth queue (to support RFC 2597 AF PHB services)
Default queue (to support an RFC 2474 DF service)
Bandwidth-constrained queue (to support an RFC 3662 scavenger service)
When provisioning queuing, some best-practice principles also apply. For example, as
discussed previously, the best-effort class is the default class for all data traffic. Only if an
application has been selected for preferential or deferential treatment is it removed from the
default class. Because many enterprises have several hundred data applicationsif not
thousandsrunning over their networks, you must provision adequate bandwidth for this class
as a whole to handle the sheer volume of applications that default to it. Therefore, it is
recommended that you reserve at least 25 percent of link bandwidth for the default best-effort
class.
2009 Cisco Systems, Inc. QoS Best Practices 9-25
Not only does the best-effort class of traffic require special bandwidth provisioning
consideration, so does the highest class of traffic, sometimes referred to as the real-time or
strict priority class (which corresponds to RFC 3246: An Expedited Forwarding Per-Hop
Behavior). The amount of bandwidth assigned to the real-time queuing class is variable.
However, if you assign too much traffic for strict priority queuing, the overall effect is a
dampening of QoS functionality for non-real-time applications. The goal of convergence is to
enable voice, video, and data to transparently co-exist on a single network. When real-time
applications such as voice or interactive video dominate a link (especially a WAN or VPN
link), data applications will fluctuate significantly in their response times, destroying the
transparency of the converged network.
Cisco Technical Marketing testing has shown a significant decrease in data application
response times when real-time traffic exceeds one-third of link bandwidth capacity. Extensive
testing and customer deployments have shown that a general best-queuing practice is to limit
the amount of strict priority queuing to 33 percent of link capacity. This strict priority queuing
rule is a conservative and safe design ratio for merging real-time applications with data
applications.
Cisco IOS Software allows the abstraction (and thus configuration) of multiple strict-priority
LLQs. In such a multiple LLQ context, this design principle would mean that the sum of all
LLQs should be within one-third of link capacity.
This strict priority queuing rule (limit to 33 percent) is simply a best-practice design
recommendation and is not a mandate. There may be cases where specific business objectives
cannot be met while holding to this recommendation. In such cases, enterprises must provision
according to their detailed requirements and constraints. However, it is important to recognize
the tradeoffs involved with over-provisioning strict priority traffic and its negative performance
impact on non-real-time-application response times.
Whenever a scavenger queuing class is enabled, it should be assigned a minimal amount of
bandwidth. On some platforms, queuing distinctions between bulk data and scavenger traffic
flows cannot be made because queuing assignments are determined by CoS values and these
applications share the same CoS value of 1. In such cases, you can assign the scavenger and
bulk queuing class a bandwidth percentage of 5. If you can uniquely assign scavenger and bulk
data to different queues, you should assign the scavenger queue a bandwidth percentage of 1.
9-26 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 16
Compatible Four-Class and Twelve-Class
Medianet Queuing Models
Best Effort
< 25%
Guaranteed
bandwidth
Scavenger/
Bulk < 5%
Real-time
> 33%
Multimedia
Conferencing
10%
Network
Control 2%
Transactional
Data 10 %
Signaling
2%
Multimedia
Streaming
10%
Br oadcast
Video 10%
VoIP Telephony
10%
Best Effort
25%
Scavenger 1%
Bulk 5%
Real-Time
Interactive 13%
OAM
2%

The queuing rules presented in this topic are summarized in the figure, where the inner pie
chart represents a hardware or service provider queuing model that is limited to four queues,
and the outer percentages represent a corresponding, more granular queuing model that is not
bound by such constraints.
2009 Cisco Systems, Inc. QoS Best Practices 9-27
Example: LLQ Example on the Enterprise WAN Edge Router

2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 17
WAN Edge LLQ Configuration Example












































Configuring the default class with the


bandwidth command disqualifies the
default class as flow-based WFQ.

The figure illustrates an example of an enterprise WAN-edge router configuration using LLQ
with class-based WRED on certain data traffic classes. In this example, the maximum
reservable bandwidth on the link is set to 100 percent, so that up to 100 percent of the link
bandwidth can be guaranteed among the various classes.
The example in the figure assumes that the markings for the different traffic classes are already
done at the access or distribution layer within the campus network.
Currently (except for the Cisco 7500 Series routers) all traffic classes except for the default
traffic class support only FIFO queuing within the class. The default traffic class can support
either FIFO or WFQ within the class. However, if the default traffic class is allocated a
minimum bandwidth, WFQ is not supported in the default traffic class.
Note In Cisco IOS Software Release 12.4, the match ip dscp command is replaced by the
match dscp command.
9-28 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Enterprise-to-Service Provider QoS Class
Mapping
This topic describes how to map enterprise traffic classes into traffic classes that are
appropriate for service-provider use.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 18
Customer-Edge QoS Design
Considerations
MPLS VPNs are gaining popularity as private-WAN alternatives; MPLS
VPNs require enterprise customer subscribers to
Closely cooperate with their service providers to ensure end-to-end
service levels.
Collapse the number of classes that they have provisioned in order to
integrate into the QoS models of their service providers (when the service
provider offers only a limited number of classes within its MPLS VPN
cloud, which is often the case).
Consider the following when deciding how best to collapse and integrate
enterprise classes into service-provider QoS models:
Service providers typically offer only one real-time class or priority class of
service.
Service providers do not always offer a suitable class for call signaling
traffic.
It is a general best practice to avoid mixing TCP-based traffic with UDP-
based traffic within a single service-provider class.

MPLS VPNs are rapidly gaining popularity as private-WAN alternatives. The migration to a
MPLS VPN from a private-WAN requires a significant paradigm shift when addressing QoS
designs. This is because enterprise customer subscribers must closely cooperate with their
service providers to ensure end-to-end service-levels; they can no longer achieve these service
levels independent of the policies of their service provider.
Most service providers offer only a limited number of classes within their MPLS VPN clouds.
At times, this might require enterprises to collapse the number of classes that they have
provisioned to integrate into the QoS models of their service provider. The following caveats
should be considered when deciding how best to collapse and integrate enterprise classes into
various service-provider QoS models.
Voice and Video
Service providers typically offer only one real-time class or priority class of service. If an
enterprise wants to deploy both voice and IP/VC (each of which should be provisioned with
strict priority treatment) over the MPLS VPN, they might be faced with a dilemma. Which one
should be assigned to the real-time class? Are there any implications about assigning both to
the real-time class?
2009 Cisco Systems, Inc. QoS Best Practices 9-29
Keep in mind that voice and video should never both be assigned low-latency queuing on link
speeds where serialization is a factor (less than 768 kb/s). Packets offered to the LLQ typically
are not fragmented; thus, large IP/VC packets can cause excessive delays for VoIP packets on
slow-speed links.
An alternative is to assign IP/VC to a nonpriority class, which entails not only the obvious
caveat of lower service levels, but also possible traffic-mixing concerns.
Call-Signaling
VoIP requires provisioning not only of RTP bearer traffic, but also of call-signaling traffic,
which is very lightweight and requires only a moderate amount of guaranteed bandwidth.
Because the service levels applied to call-signaling traffic directly affect delay to the dial tone,
it is important that call signaling be protected. Service providers might not always offer a
suitable class for call-signaling traffic itself. Therefore, the enterprise must determine which
other traffic classes to mix with call signaling.
On links where serialization is not an issue, call signaling could be provisioned into the real-
time class, along with voice. However, this is not recommended on slow-speed links where
serialization is a factor. On such slow-speed links, call signaling is best assigned to one of the
preferential data classes for which the service provider provides a bandwidth guarantee.
It is important to realize that a guarantee applied to a service-provider class as a whole does not
itself guarantee adequate bandwidth for an individual enterprise application within the class.
Mixing TCP with UDP
It is a general best practice to avoid mixing TCP-based traffic with UDP-based traffic
(especially streaming video) within a single service-provider class because of the behaviors of
these protocols during periods of congestion. Specifically, TCP transmitters throttle back flows
when drops are detected. Although some UDP applications have application-level windowing,
flow control, and retransmission capabilities, most UDP transmitters are completely oblivious
to drops and, thus, never lower transmission rates because of dropping.
When TCP flows are combined with UDP flows within a single service-provider class and the
class experiences congestion, TCP flows continually lower their transmission rates, potentially
giving up their bandwidth to UDP flows that are oblivious to drops. This effect is called TCP
starvation and UDP dominance.
TCP starvation and UDP dominance likely occurs if (TCP-based) mission-critical data is
assigned to the same service-provider class as (UDP-based) streaming video and the class
experiences sustained congestion. Even if WRED is enabled on the service-provider class, the
same behavior is observed because WRED (for the most part) manages congestion only on
TCP-based flows.
It is not always possible to separate TCP-based flows from UDP-based flows, but it is
beneficial to be aware of this behavior when making such application-mixing decisions within a
single service-provider class.
9-30 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 19
Customer-Edge QoS Design
Considerations (Cont.)
Most service providers use the Layer 3 marking attributes (IP precedence
or DSCP) of packets that are sent to them to determine to which service
provider class of service a packet should be assigned. Therefore,
enterprises must mark
or re-mark their traffic in a way that is consistent with the service provider
admission criteria.

Marking and Re-Marking
Most service providers use the Layer 3 marking attributes (IP precedence or DSCP) of packets
that are sent to them to determine to which service provider class of service a packet should be
assigned. Therefore, enterprises must mark or re-mark their traffic in a way that is consistent
with the service-provider admission criteria. Additionally, service providers might re-mark at
Layer 3 out-of-contract traffic within their cloud; this can affect enterprises that require
consistent end-to-end Layer 3 markings.
A general DiffServ principle is to mark or trust traffic as close to the source as administratively
and technically possible; however, certain traffic types might need to be re-marked before
handoff to the service provider to gain admission to the correct class. If such re-marking is
required, it is recommended that the re-marking be performed at the egress edge of the
customer edge (CE), rather than within the campus. This is because service-provider service
offerings are likely to evolve or expand over time, and adjusting to such changes will be easier
to manage if re-marking is performed only at the CE egress edge.
Additionally, in some cases, multiple types of traffic must be marked to the same DiffServ code
point value to gain admission to the appropriate queue. For example, on high-speed links, you
might want to send voice, IP/VC, and call signaling to the service provider real-time class. If
the service-provider class admits only DSCP EF and CS5, two of these applications would have
to share a common code point. The following example, in which IP/VC and call signaling are
re-marked to share DSCP CS5, shows how this can be done.









2009 Cisco Systems, Inc. QoS Best Practices 9-31










Service providers might re-mark traffic at Layer 3 to indicate whether certain flows are out of
contract. Although this is consistent with DiffServ standards, it might present minor difficulties
to enterprises that require consistent end-to-end Layer 3 marking. In such cases, the enterprise
can choose to apply re-marking policies as traffic is received back from the service provider
MPLS VPN (on the ingress direction of the enterprise CE). Class-based marking can be used
again because it supports not only access lists for classification, but also NBAR.
Continuing and expanding on the previous example, the enterprise wants to restore the original
markings that it set for IP/VC and call signaling. Additionally, it wants to restore original
markings for Oracle traffic (which it originally marked AF21 and is using TCP port 9000 with)
and DLSw+ traffic (originally marked AF21). Both of these data applications were handed off
to the service provider marked as AF21, but they might have been marked down to AF22
within the service-provider cloud. The following example shows a configuration that enables
such re-marking from the MPLS VPN. The match-all criteria of the class maps performs a
logical AND operation against the potential markings and re-markings, and the access list (or
NBAR-supported protocol) that sifts the applications apart. The policy is applied on the same
CE link, but in the ingress direction.

































9-32 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 20
Enterprise-to-Service Provider QoS Class
Mapping: Four Service-Provider Classes
Real-Time
(RTP, UDP)
30%
Critical 1
(TCP)
20%
Critical 2
(UDP)
20%
CS6
AF3
CS3
EF
CS5
Best Effort
30%
AF2
CS2
DF
Four-Class SP Model
Best Effort
Network Control CS6
VoIP Telephony EF
Multimedia Conferencing AF4 AF2
OAM CS2
Transactional Data AF2 AF3
Call-Signaling CS3
Scavenger CS1
0
Broadcast Video CS5 CS2
Cisco TelePresence CS4 CS5
Multimedia Streaming AF3 AF2
Bulk Data AF1
Application DSCP

In the model shown in the figure, the service provider offers four classes of service. Because
there are so few classes to choose from in this example, Cisco TelePresence may need to be
combined with another application. It is highly recommended not to combine Cisco
TelePresence with any unbounded application (an application without admission control)
within a single service provider class, because doing so could lead to class congestion and
result in Cisco TelePresence drops (with or without WRED enabled on the service provider
class). Therefore, there are two options in such a design:
Assign Cisco TelePresence to the service provider real-time class along with voice.
Assign Cisco TelePresence to a dedicated non-priority service-provider class.
In this example, Cisco TelePresence is assigned to the service provider real-time class.
In the four-class service provider model, there is a real-time class, a default best-effort class,
and two additional non-priority traffic classes. In this case, the enterprise administrator may
elect to separate TCP-based applications from UDP-based applications by using these two non-
priority service provider traffic classes. Specifically, if voice and Cisco TelePresence are the
only applications to be assigned to the service provider real-time class, broadcast video,
multimedia conferencing, multimedia streaming, and OAM traffic (which is largely UDP-
based) can all be assigned to the service provider UDP Critical 2 class. This leaves the other
non-priority service provider class (Critical 1) available for control plane applications, such as
network control and call signaling, along with TCP-based transactional data applications. The
figure shows the per-class re-marking requirements from the CE edge to gain access to the
classes within the four-class service-provider model, with Cisco TelePresence assigned to the
service-provider real-time class, along with voice.
2009 Cisco Systems, Inc. QoS Best Practices 9-33
In this example, Cisco TelePresence traffic must be re-marked on the CE egress edge to CS5 to
gain access to the service provider real-time class. Also, broadcast video must be re-marked to
CS2 to assign it to the service provider UDP class (Critical 2). Similarly, multimedia
conferencing and multimedia streaming must be re-marked to AF2 to assign these also to the
service-provider UDP class. Correspondingly, transactional data traffic must be re-marked to
AF3 to gain access to the service-provider TCP class (Critical 1). All other traffic does not
require re-marking to gain admission to the desired classes; this includes bulk and scavenger,
because these default to the service provider best-effort class without any explicit re-marking.
Additionally, the relative per-class bandwidth allocations must be aligned, so that the enterprise
CE edge queuing policies are consistent with the service-provider PE edge queuing policies to
ensure compatible PHBs.
9-34 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 21
Enterprise-to-Service Provider QoS Class
Mapping: Six Service-Provider Classes
Application DSCP
Best Effort
Network Control CS6
VoIP Telephony EF
Multimedia Conferencing AF4 AF2
OAM CS2
Transactional Data AF2 AF3
Call-Signaling CS3
Scavenger CS1
0
Broadcast Video CS5 CS2
Cisco TelePresence CS4
Multimedia Streaming AF3 AF2
Bulk Data AF1
Six-Class SP Model
Real-Time
(RTP, UDP)
20%
Critical 1
(TelePresence)
10%
Critical 3
(UDP)
20%
CS4
EF
CS5
Best Effort
25%
AF2
DF
Critical 2
(TCP)
20%
Scavenger
5%
CS6
AF3
CS3
CS2
AF1
CS1

The six-class service-provider model is illustrated in the figure. In this model, there is a real-
time class, a default best-effort class, a "less-than-best-effort" scavenger class, and three
additional non-priority traffic classes. To illustrate more design options, Cisco TelePresence is
assigned to a non-priority service provider class in this example; but of course, Cisco
TelePresence can also be assigned (in combination with voice) to the service-provider real-time
class.
In this case, the enterprise administrator can dedicate one of the non-priority classes (such as
the service provider Critical 1) for Cisco TelePresence. It bears repeating that it is not
recommended to assign Cisco TelePresence in conjunction with any unbounded application
into a single service-provider class, because the other application could potentially cause the
combined class to congest, resulting in Cisco TelePresence drops and loss of call quality.
This leaves two additional non-priority classes, which again allows the administrator to
separate TCP-based applications from UDP-based applications. Specifically, broadcast video,
multimedia conferencing, multimedia streaming, and OAM traffic can all be assigned to the
service provider UDP class, Critical 3. This leaves the other non-priority service-provider class,
Critical 2, available for control plane applications, such as network control and call signaling,
along with TCP-based transactional data applications. The figure shows the per-class re-
marking requirements from the CE edge to gain access to the classes within the six-class
service provider model, with Cisco TelePresence assigned to a non-priority service-provider
class.
2009 Cisco Systems, Inc. QoS Best Practices 9-35
As shown in the figure, in this second example Cisco TelePresence traffic does not need to be
re-marked to gain access to the dedicated, non-priority service-provider class to which it is
assigned (Critical 1). However, as before, Broadcast Video must be re-marked to CS2 to assign
it to the service-provider UDP class, Critical 3; multimedia conferencing and multimedia
streaming must be re-marked to AF2 to assign these also to the service-provider UDP class.
Correspondingly, transactional data traffic must be re-marked to AF3 to gain access into the
service-provider TCP class, Critical 2. All other traffic does not require re-marking to gain
admission to the desired classes. However, it may be noted that bulk and scavenger no longer
default to the service provider best-effort class, but now default to the service-provider
scavenger class, which is the desired policy to bind these applications that potentially use much
bandwidth. Additionally, the relative per-class bandwidth allocations again need to be aligned,
so that the enterprise CE edge queuing policies are consistent with the PE edge queuing policies
of the service provider.

9-36 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 22
Summary
Before deploying QoS on your network, you should complete
the following tasks:
Strategically define the business objectives to be achieved
via QoS.
Analyze service-level requirements of the various traffic
classes to be provisioned.
Design and test your QoS policies.
By clearly defining organizational objectives and using the Cisco
modified RFC 4594-based marking recommendations as guide,
you can determine how many traffic classes you need and what
those classes should be.
Each enterprise traffic class has delay, jitter, packet loss, and
bandwidth requirements.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3#- 23
Summary (Cont.)
Because the Cisco QoS toolset provides many QoS design and
deployment options, a few succinct design principles for
classification, policing and markdown, and queuing and dropping
can help simplify strategic QoS deployments. QoS classification
best practice is achieved by:
Classifying and marking traffic as close to the source as
possible.
Using DSCP markings whenever possible.
Following standards-based DSCP PHB markings to ensure
interoperability and future expansion.
Different enterprise traffic classes must be mapped into the
specific traffic classes offered by the service provider.



Lesson 2
Deploying End-to-End QoS
Overview
When using public transportation, a traveler may benefit from contractual commitments from
the transportation provider; for example, a guarantee from an airline that 95 percent of their
flights will arrive within 5 minutes of the scheduled time. The commitments may include other
parameters or metrics such as the number of stops en route. The more competitive the market
for the particular service, the more comprehensive and tighter the commitments, or service
level agreements (SLAs), that are offered.
In the same way, the increased competition between IP service providers and the heightened
importance of IP to business operations has led to an increased demand and supply of IP
services with tighter SLAs for IP performance.
The DiffServ architecture enables IP networks to be engineered to support tight SLA
commitments. This lesson describes how the various quality of service (QoS) tools that we
have discussed can be deployed in an end-to-end manner to achieve an end-to-end SLA.
Objective
Upon completing this lesson, you will be able to describe the set of QoS mechanisms that are
used to implement Cisco end-to-end QoS best practices in a typical enterprise network
connected through a service provider providing Layer 3 IP services. This ability includes being
able to meet these objectives:
Describe QoS SLA
Explain the typical network requirements within each functional block (campus LAN,
WAN edge, service provider backbone, and branch) that makes up an end-to-end network
Explain the best-practice QoS implementations and configurations within a campus LAN
Describe access edge trust models
Describe unique considerations for branch router QoS design
Explain the best-practice QoS implementations and configurations on WAN CE and PE
routers
Explain the best-practice QoS implementations and configurations on the service provider
IP core and PE routers
9-38 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Describe QoS design principles and designs to achieve end-to-end service levels over
MPLS VPNs
List general recommendations for end-to-end QoS
2009 Cisco Systems, Inc. QoS Best Practices 9-39
QoS Service Level Agreements
This topic describes QoS SLAs and provides some SLA examples.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-2
QoS Service-Level Agreements
QoS SLAs provide contractual assurance for meeting the different
traffic QoS requirements.
QoS SLAs typically provide contractual assurance for parameters
such as:
Delay (fixed and variable)
Jitter
Packet loss
Throughput
Availability
QoS SLAs are a key differentiator for service providers.

An SLA specifies the delivery and pricing of numerous service levels and spells out penalties
for shortfalls. SLAs can cover an assortment of data services such as Frame Relay, leased lines,
Internet access, web hosting, and so on. The best way to understand an SLA is to break it into
two activities: negotiating the technology agreement and verifying compliance with the
agreement.
To support integrated voice, video, and data services, service providers are under increasing
pressure to offer differentiated service levels to their customers, often in conjunction with SLAs
that provide contractual assurance for meeting the different traffic QoS requirements. A QoS
SLA typically provides contractual assurance for parameters such as delay, jitter, packet loss,
throughput, and availability.
With the rapid growth of new multimedia real-time applications such as IP telephony, web
conferencing, and e-learning, QoS SLA is becoming a key service differentiator for service
providers.
9-40 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-3
Enterprise Network with Traditional
Layer 2 Service
Provider sells the customer a
Layer 2 service
Point-to-point SLA from the
provider
Enterprise WAN likely to get
congested
QoS required for voice, video,
data integration
Service provider is not involved
in QoS

This figure illustrates a service provider providing only Layer 2 services to the enterprise
customer. The customer edge (CE) routers at the various customer sites are interconnected by
Frame Relay virtual circuits (VCs). These VCs can be fully meshed, partially meshed, or set up
as hub-and-spokes, depending on the customer requirements.
In this environment, the service provider is responsible only for the end-to-end Layer 2 VC
connections. The service provider provides only a point-to-point SLA guarantee for each VC
connection, and is not involved with providing QoS to the customer.
To provide QoS for voice, video, and data integration over the Frame Relay VCs, the customer
must configure the proper QoS mechanisms such as traffic shaping, low-latency queuing
(LLQ), FRF.12, and compressed Real-Time Transport Protocol (cRTP) at the WAN customer
edge (CE) routers, because the Frame Relay WAN link is likely to become congested.
2009 Cisco Systems, Inc. QoS Best Practices 9-41
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-4
Enterprise Network with IP Service
Customer buys Layer 3 service from
the provider
Point-to-cloud SLA from provider for
conforming traffic
Enterprise WAN likely to get
congested
Service provider is involved in QoS

The figure illustrates a service provider that is providing Layer 3 services to the enterprise
customer. The CE routers at the various customer sites connect to the provider edge (PE) of the
service provider router. From a particular customer site perspective, every IP address that is not
located on-site is reachable via the service provider IP backbone network.
In this environment, the service provider can provide value-added IP services to the customer
by providing point-to-cloud SLAs for the conforming traffic from the customer. An SLA can,
for example, divide customer traffic at the network edge into controlled latency, controlled load
1, and controlled load 2 classes, and then provide QoS assurances to each traffic class
conforming to the contractual rate over a DiffServ IP backbone. For all nonconforming
(exceeding) traffic, the service provider can re-mark and deliver all nonconforming traffic with
best-effort service.
9-42 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-5
Know the SLA Offered by Your SP
SLA typically includes
three to five classes.
Real-time traffic gets fixed
bandwidth allocation.
Data traffic gets variable
bandwidth allocation with
minimum guarantee.
Additional classes not
visible to customer may
exist at the edge.

A typical QoS SLA offered by most service providers typically includes three to five traffic
classes; for example, a real-time traffic class, a mission-critical data traffic class, one or two
other data traffic classes, and a best-effort traffic class. The SLA for the real-time traffic class
should be guaranteed a fixed maximum bandwidth, while the data traffic classes should be
guaranteed a minimum bandwidth. Typically, the bandwidth allocation is configured as a
percentage of the interface bandwidth. Each traffic class can also have a latency, delay, jitter,
and packet-loss guarantee.
Between the CE and PE, there may be additional traffic classes that are used by the service
providers only. For example, there may be a management traffic class for traffic such as Telnet
or Simple Network Management Protocol (SNMP) from the service provider to the service
provider-managed CE routers.
If a single physical interface is serving only one customer, the SLA is typically set up per
interface. To provide easy bandwidth upgrades, service providers often install a high-speed link
to the customer and then offer a sub-rate access.
If a single physical interface is serving many different customers, the SLA is typically set up
per-permanent virtual circuit (PVC) or per-VLAN. To provide easy bandwidth upgrades, the
service provider often installs a high-speed link to the customer and then offers sub-rate access.
2009 Cisco Systems, Inc. QoS Best Practices 9-43
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-6
Typical SLA Requirements for Voice

To meet QoS requirements for different traffic types, both the enterprise and the service
provider must implement the proper QoS mechanisms to provide end-to-end QoS for the
packets traversing a service provider IP network. In the figure, the enterprise headquarters and
the enterprise branch office are connected to a service provider that is providing Layer 3
services.
In this example, the service provider is providing an SLA for voice traffic with a latency of 60
ms or less, a jitter of 20 ms or less, and a packet loss of 0.5 percent or less. To meet the end-to-
end QoS requirements for voice packets, the entire enterprise network must contribute less than
90 ms of delaythat is, 90 ms (enterprise network) + 60 ms (service provider network) <= 150
ms total one way delay. Similarly, jitter must be less than 10 msthat is, 10 ms + 20 ms <= 30
ms total one way jitter. Finally, packet loss must be less than 0.5 percentthat is, 0.5 percent +
0.5 percent <= 1.0 percent total packet loss.
9-44 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-7
Service Provider SLA Example
This is just an example. The actual SLA offered by
service providers may vary.

The figure shows an example of a typical QoS SLA from an IP service provider. In this
example, the service provider offers three service classes to the customer: controlled latency,
controlled load, and best effort. The SLA guarantees in this example include the following:
For the controlled latency class:
A one-way delay of 40 ms that is guaranteed 90 percent of the time
A jitter of 2 ms that is guaranteed 90 percent of the time
A packet loss of 0.5 percent that is guaranteed 90 percent of the time
For the controlled load class:
A one-way delay of 40 ms that is guaranteed 75 percent of the time
A jitter of 2 ms that is guaranteed 75 percent of the time
A packet loss of 0.5 percent that is guaranteed 75 percent of the time
For the best-effort class:
A one-way delay of 40 ms that is guaranteed 50 percent of the time
A jitter of 2 ms that is guaranteed 50 percent of the time
A packet loss of 0.5 percent that is guaranteed 50 percent of the time
This is just an example. Actual SLA offered by service providers may vary.
In the U.S. tier 1 Internet backbone, a typical round-trip time (RTT) delay between two service
provider points of presence (POPs) is about 40 ms. It is typical for a service provider to offer a
monthly average loss on its network of less than 1 percent.
2009 Cisco Systems, Inc. QoS Best Practices 9-45
Deploying End-to-End QoS
This topic describes the typical network requirements within each functional block which
makes up an end-to-end network (headquarters, campus LAN, WAN edge, service provider
backbone, and branch office).
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-8
Deploying End-to-End QoS

To meet the QoS requirements for different traffic types, both the enterprise and the service
provider must implement the proper QoS mechanisms to provide end-to-end QoS for the
packets traversing a service provider network.
9-46 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-9
Deploying End-to-End QoS (Cont.)

To provide end-to-end QoS, both the enterprise and the service provider must implement the
proper QoS mechanisms to ensure the proper per-hop behavior (PHB) for each traffic class
across the whole network. Until recently, QoS was not an issue in an enterprise campus
network where bandwidth is plentiful. But as more applications such as IP telephony,
interactive video (or IP videoconferencing, known also as IP/VC), e-learning, and mission-
critical data applications are being implemented in the campus, it has become evident that
buffer management, not just bandwidth, is an issue that must be addressed. QoS functions such
as classification, scheduling, and provisioning are also now required within the campus to
manage bandwidth and buffers to minimize loss, delay, and jitter.
The figure lists some of the requirements within the different building blocks that make up the
end-to-end network. Most of the more complex QoS configurations occur at the WAN edge. In
the IP core (service provider cloud), only queuing, such as LLQ with class-based weighted fair
queuing (CBWFQ) or modified deficit round robin (MDRR), and weighted random early
detection (WRED) should be required.
2009 Cisco Systems, Inc. QoS Best Practices 9-47
Enterprise Campus QoS General Guidelines
This topic describes some of the best-practice QoS implementations and configurations within
the campus LAN.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 10
Campus QoS Implementation
Campus QoS General Guidelines:
Classify and mark applications as close to their sources as
technically and administratively feasible.
Police unwanted traffic flows as close to their sources as possible.
Always perform QoS in hardware rather than software when a
choice exists.

Although network administrators sometimes equate QoS only with queuing, the QoS toolset
extends considerably beyond queuing tools. Classification, marking, and policing are all
important QoS functions that are optimally performed within the campus network, particularly
at the access layer ingress edge (the access edge).
Three QoS design principles are important when deploying campus QoS policies:
Classify and mark applications as close to their sources as technically and administratively
feasible. This principle promotes end-to-end Differentiated Services PHBs. Sometimes
endpoints can be trusted to set Class of Service (CoS) or Differentiated Services Code Point
(DSCP) markings correctly, but this is not recommended because users can easily abuse
provisioned QoS policies if permitted to mark their own traffic. For example, if DSCP
Expedited Forwarding (EF) received priority services throughout the enterprise, users could
easily configure the NIC on a PC to mark all traffic to DSCP EF, thus hijacking network
priority queues to service their non-real time traffic. Such abuse could easily ruin the
service quality of real-time applications, such as VoIP, throughout the enterprise. For this
reason, the phrase "as close as... administratively feasible" is included in the design
principle.
Police unwanted traffic flows as close to their sources as possible. There is little sense in
forwarding unwanted traffic only to police and drop it at a subsequent node. This is
especially the case when the unwanted traffic is the result of Denial of Service (DoS) or
worm attacks. Such attacks can cause network outages by overwhelming network device
processors with traffic.
9-48 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Always perform QoS in hardware rather than software when a choice exists. Cisco IOS
routers perform QoS in software. This places additional demands on the CPU, depending
on the complexity and functionality of the policy. Cisco Catalyst switches, on the other
hand, perform QoS in dedicated hardware ASICS and therefore do not tax their main CPUs
to administer QoS policies. You can therefore apply complex QoS policies at gigabit or
10 Gigabit Ethernet line speeds in these switches.
For these reasons, you should enable QoS policies such as classification and marking policies
to establish and enforce trust boundaries as well as policers to protect against undesired flows at
the access edge of the LAN.
Most campus links are underutilized. Some studies have shown that 95 percent of campus
access layer links are utilized at less than 5 percent of their capacity. This means that you can
design campus networks to accommodate oversubscription between access, distribution, and
core layers. Oversubscription allows for uplinks to be utilized more efficiently, and more
importantly, it reduces the overall cost of building the campus network. Common campus
oversubscription values are 20:1 for the access-to-distribution layers and 4:1 for the
distribution-to-core layers.
It is quite rare under normal operating conditions for campus networks to suffer congestion. If
congestion does occur, it is usually momentary and not sustained, as at a WAN edge. However,
critical applications like VoIP still require service guarantees regardless of network conditions.
The only way to provide service guarantees is to enable queuing at any node that has the
potential for congestion, regardless of how rarely this may actually occur. The potential for
congestion exists in campus uplinks because of oversubscription ratios and speed mismatches
in campus downlinks (for example, Gigabit Ethernet to Fast Ethernet links). The only way to
provision service guarantees in these cases is to enable queuing at these points.
Queuing helps to meet network requirements under normal operating conditions, but enabling
QoS within the campus is even more critical under abnormal network conditions such as DoS
or worm attacks. During such conditions, network traffic may increase exponentially until links
are fully utilized. Without QoS, the worm-generated traffic drowns out applications and causes
denial of service through unavailability. Enabling QoS policies within the campus maintains
network availability by protecting and servicing critical applications such as VoIP and even
best-effort traffic.
2009 Cisco Systems, Inc. QoS Best Practices 9-49
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 11
QoS Implementation in Campus
Switches

Access switches require the following QoS policies:
Appropriate (endpoint-dependant) trust policies or classification and marking policies
Policing and markdown policies
Queuing policies
Distribution and core switches require the following QoS policies:
DSCP trust policies
Queuing policies
Optional per-user microflow policing policies (only on supported platforms)
9-50 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Access Edge Trust Models
This topic describes access edge trust models, including trusted endpoints, untrusted endpoints,
and conditionally trusted endpoints.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 12
Establishing Trust Boundaries
3
2
1
Endpoints Access Distribution Core
WAN
Aggregators
Trust Boundary
3 2 1 Optimal Trust Boundary:
Trusted Endpoint
Optimal Trust Boundary:
Untrusted Endpoint
Suboptimal Trust Boundary
Si Si
Si Si
Si Si
Si Si

The primary function of access edge policies is to establish and enforce trust boundaries. A
trust boundary is the point within the network where markings such as CoS or DSCP begin to
be accepted. Previously set markings are overridden as required at the trust boundary. You
should enforce trust boundaries as close to the endpoints as technically and administratively
possible, as shown in the figure.
The definition of the trust boundary depends on the capabilities of the endpoints that are being
connected to the access edge of the LAN. The following are the three main categories of
endpoints as they relate to trust boundaries:
Trusted endpoints
Untrusted endpoints
Conditionally trusted endpoints
2009 Cisco Systems, Inc. QoS Best Practices 9-51
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 13
Trusted Endpoints
Characteristics of trusted endpoints:
Can mark application traffic to the appropriate CoS or DSCP values
Can re-mark traffic that may have been previously marked by an
untrusted device
Are not typically mobile devices
Examples of trusted endpoints include the following:
Analog gateways
IP conferencing stations
Videoconferencing gateways and systems
Use the mls qos trust command to set the trusted state of an interface
(when trusted endpoints are connected to a switch port).
OR
If you know the traffic rate of the trusted application, apply an access
layer policer to protect against out-of-profile rates, in case the trusted
endpoint is compromised.
Cisco IP Phones, which often change switch ports as users move, are more
appropriately classified as conditionally trusted endpoints.

Trusted endpoints have the capabilities and intelligence to mark application traffic to the
appropriate CoS or DSCP values. Trusted endpoints also have the ability to re-mark traffic that
may have been previously marked by an untrusted device. Trusted endpoints are not typically
mobile devices, which means that the switch port into which they are plugged does not usually
change.
Note Cisco IP Phones, which often change switch ports as users move, are more appropriately
classified as conditionally trusted endpoints.
Examples of trusted endpoints include the following:
Analog gateways: These devices connect analog devices such as fax machines, modems,
TDD TTYs, and analog phones to the VoIP network, such that the analog signals can be
packetized and transmitted over the IP network. Cisco VG224 Voice Gateway and Cisco
VG248 Analog Phone Gateway are examples of analog gateways.
IP conferencing stations: These devices are specialized IP Phones with 360-degree
microphones and advanced speakerphones designed for meeting room VoIP conferencing.
Examples of such devices include the Cisco Unified IP Conference Station 7935 and 7936.
IP/VC gateways and systems: These devices transmit interactive video across the IP
network. Examples of such devices capable of setting DSCP markings include the Cisco
Unified Videoconferencing systems 3511, 3521, 3526 and 3540. If a video-conferencing
device does not have the ability to set DSCP markings correctly, it should be treated as an
untrusted device.
Video surveillance units: These third-party devices are used for security and remote
monitoring purposes over an IP (as opposed to a closed-circuit) network. They may support
DSCP marking, in which case they may be considered trusted endpoints.
9-52 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Servers: Certain servers, within the data center or otherwise, might be capable of correctly
marking their traffic on their NICs. In such cases, you can choose to trust such markings.
However, enforcing such a trust boundary requires cooperation between network
administrators and system or server administrators, an alliance that is often fragile.
Additionally, the majority of DoS and worm attacks target servers. Infected servers not
only might send profuse amounts of traffic onto the network, but, in such cases, they might
do so with trusted markings. There is no hard-and-fast rule that applies to every situation.
Some administrators prefer to trust certain servers (such as Cisco Unified Communications
Manager) to provide services, due to the large number of ports that may be in use, rather
than administer complex access control lists (ACLs).
Wireless access points: Some wireless access points (APs) have the ability to mark or
remark 802.1p CoS and DSCP values and therefore qualify as trusted endpoints. Examples
include Cisco Aironet 350, 1100 and 1200 series APs.
Wireless IP Phones: Mobile wireless IP Phones can mark DSCP values for VoIP and call
signaling and pass these on to the wireless AP with which they are associated. The Cisco
Unified Wireless IP phone 7920G is an example.
When trusted endpoints are connected to a switch port, all that is typically required is using the
mls qos trust dscp command in interface configuration mode.
Optionally, if you know the traffic rate of the trusted application, you can apply an access layer
policer to protect against out-of-profile rates, in case the trusted endpoint is somehow
compromised. For example, consider the case of an IP videoconferencing (IP/VC) station that
transmits 384 kb/s of video (not including Layer 2-4 overhead) and correctly marks this traffic
to DSCP AF41. An access edge ingress policer could be applied to the switch port to which this
IP/VC station is connected and be configured to trust up to 500 kb/s, allowing for Layer 2-4
overhead and policer granularity of interactive video traffic marked AF41. Excess traffic could
be marked to CS1. Such a policy prevents network abuse if another device is inserted, perhaps
via a hub, into the path, or if the trusted endpoint itself becomes compromised.
2009 Cisco Systems, Inc. QoS Best Practices 9-53
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 14
Untrusted Endpoints
Start
UDP
16384 to
32767
TCP
20002002
No
Yes
Yes
< 128 kb/s or <
320 kb/s
Yes
No
< 32 kb/s
< 5 Mb/s
Yes
Yes
No
No
No
Re-mark to DSCP EF
and Transmit
Re-mark to DSCP CS1
and Transmit
Re-mark to DSCP CS3
and Transmit
Re-mark to DSCP CS1
and Transmit
Re-mark to DSCP 0
and Transmit
Re-mark to DSCP CS1
and Transmit

As previously mentioned, trusting end-user PCs is generally a bad idea because newer
operating systems, such as Windows XP and Linux, make it relatively easy to set CoS or DSCP
markings on PC NICs. Such markings may be set deliberately or even inadvertently. In either
case, improperly set QoS markings can affect the service levels of multiple users within the
enterprise and make troubleshooting very difficult. Also, marking application traffic on server
NICs has disadvantages (as discussed in the previous section) that may make it preferable to
treat PCs as untrusted devices. While client PCs and data center servers are related and
complimentary, they also have unique considerations that affect their classification and
marking policies. Some of these considerations follow:
Untrusted PC + SoftPhone with Scavenger-Class QoS
Cisco generally recommends not trusting end-user PC traffic. However, some PCs may be
running applications that critically require QoS treatment. A classic example is a PC running
the Cisco IP SoftPhone application. In such a case, the critical application must be identified
using ACLs and marked or re-marked at the access edge. Re-marking can be done with either
an MLS QoS set ip dscp command or with a policer.
A policer is recommended in this case, because limits on the amount of traffic being marked
can then be imposed to prevent abuse. A Cisco SoftPhone can use regular G.711 codecs, in
which case 128 kb/s is adequate, or they can be configured use a G.722 (wide codec), in which
case 320 kb/s is required. The tighter the policer, the better, provided that adequate bandwidth
has been allocated for application requirements.
Additionally, you can explicitly define the UDP ports used by Cisco SoftPhone within the
application as opposed to simply choosing random ports within the UDP range of 16383 to
32767. This is recommended because it allows for a more granular ACL to match legitimate
Cisco SoftPhone traffic, thereby tightening the overall security of the policy.
9-54 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Note In this context, SoftPhone can refer to any PC-based IP telephony application, including
Cisco IP Communicator and similar products.
The logic of such an access edge policer marking Cisco SoftPhone traffic from an untrusted PC
endpoint is shown in the figure. The syntax for implementing such a policer may vary slightly
from platform to platform.
Untrusted Server with Scavenger-Class QoS
Servers as well as PCs are subject to attack and infection by worms and viruses, so they should
also be policed as to the amounts of traffic they admit onto the network. The values are greater
than PC endpoints, so you should profile traffic patterns from servers to establish a baseline of
normal and abnormal behavior.
For example, assume that a single server is running multiple applications, in this case, SAP
(TCP ports 3200-3203 and 3600), Lotus Notes (TCP port 1352), and Internet Message Access
Protocol (IMAP) (TCP ports 143 and 220). SAP is considered a mission-critical application,
and until call signaling marking on IP telephony equipment fully migrates from DSCP AF31 to
CS3, it should be marked to DSCP 25. Lotus Notes is classed as a transactional data application
and should be marked to DSCP AF21. IMAP is considered a bulk application and should be
marked to DSCP AF11.
Application baselining has shown that 95 percent of the traffic rates for SAP, Lotus Notes and
IMAP are less than 15 Mb/s, 35 Mb/s and 50 Mb/s, respectively. To ensure that no other traffic
comes from the server, a final policer to catch any other type traffic is included. In the event of
legitimate traffic that temporarily exceeds these values, no dropping or re-ordering of packets
occurs. However, should this server become infected and begin sending sustained traffic in
excess of these normal rates, the excess is subject to aggressive dropping in the event of link
congestion.
Remember that when deploying QoS designs for untrusted servers, the applications are usually
identified by source ports, rather than destination ports (as is the case with client-to-server
ACLs). Thus, the ACL becomes the following:

as opposed to:

This is a subtle but critical difference.
2009 Cisco Systems, Inc. QoS Best Practices 9-55
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 15
Conditionally Trusted Endpoints
Switch and phone exchange Cisco Discovery Protocol; trust boundary is extended
to IP phone.
Phone sets CoS to 5 for VoIP and to 3 for call-signaling traffic.
Phone rewrites CoS from PC port to 0.
Switch trusts CoS from phone and maps CoS DSCP for output queuing.
IP Phone
PC VLAN 10
Phone VLAN 110
I see youre an IP phone.
So I will trust your CoS.
Trust Boundary
1
4
3
2
CoS 5 DSCP 46
CoS 3 DSCP 24
CoS 0 DSCP 0
Voice 5, Signaling 3
All PC traffic is reset to CoS 0. PC sets CoS to 5 for all traffic.

One of the main business advantages of IP telephony is the simplicity and related cost savings
of user additions, moves, and changes. To move, users simply pick up their IP phones, plug
them in at their new locations, and carry on business as usual. If their infrastructure supports
inline power, it is literally a matter of unplugging a single RJ-45 cable and plugging it in at the
new location.
IP phones are trusted devices, while PCs are not. This can be a problem when provisioning trust
in a mobile environment. Consider the following example: Port A is configured to trust the
endpoint connected to it, which initially is an IP phone. Port B is configured not to trust the
endpoint connected to it, which initially is a PC. Because of a move, these endpoints are
plugged into the opposite ports. This breaks the VoIP quality of calls made from the IP phone
(now plugged into untrusted Port B) and opens the network up for unintentional or deliberate
abuse of provisioned QoS by the PC (now plugged into the trusted Port A).
One solution is to place a call to the networking help desk when the move is scheduled, so that
the switch ports can be reconfigured to trust or untrust the endpoints, as required. However, this
approach dampens the mobility business advantage of IP telephony, because manual network
administration is then required to complete the move.
Another solution is to have an intelligent exchange of information between the switch and the
devices plugged into its ports. If the switch discovers a device that is trustworthy, it can extend
trust to the device dynamically.
Cisco IP phones use the latter solution. In the current Cisco implementation, the intelligent
exchange of information is performed using Cisco Discovery Protocol, a lightweight,
proprietary protocol engineered to perform neighbor discovery. It was never intended as a
security or authentication protocol. Therefore, to improve the security of conditional trust
extension, the next generation of Cisco IP telephony products will incorporate the use of
advanced protocols to perform authentication.
9-56 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
The figure shows a conditional trust boundary extension granted to an IP Phone that has passed
a Cisco Discovery Protocol exchange. The sequence shown is as follows:
1. The switch and the phone exchange Cisco Discovery Protocol; the trust boundary is
extended to the IP phone.
2. The phone sets CoS to 5 for VoIP and to 3 for call-signaling traffic.
3. The phone rewrites CoS from the PC to 0.
4. The switch trusts CoS from the phone and maps CoS to DSCP for output queuing.
Note For an overview of some of the main Cisco IP phones and their impact on access edge QoS
design, refer to the Campus QoS Design section of the Enterprise QoS Solution Reference
Network Design Guide at the following URL:
http://www.cisco.com/en/US/docs/solutions/Enterprise/WAN_and_MAN/QoS_SRND/QoSDe
sign.html#wp998284
2009 Cisco Systems, Inc. QoS Best Practices 9-57
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 16
Conditionally Trusted Endpoints:
AutoQoS VoIP
AutoQoS VoIP
Useful if main business objective of QoS deployment is to enable
QoS for IP telephony only (in other words, without scavenger-
class QoS)
Automatically configures the best-practice QoS configurations,
based on previous Cisco Enterprise QoS Solution Reference
Network Designs (SRNDs), for VoIP on Cisco Catalyst switches
and IOS routers

If the main business objective of the QoS deployment is to enable QoS for IP telephony only
(that is, without scavenger-class QoS), you may choose to take advantage of the Cisco
AutoQoS VoIP feature. Cisco AutoQoS VoIP is essentially an intelligent macro that enables
you to enter one or two simple Cisco AutoQoS commands to enable all the appropriate features
for the recommended QoS settings for a VoIP and IP telephony for a specific platform and a
specific interface.
Cisco AutoQoS VoIP automatically configures the best-practice QoS configurations, based on
previous Cisco Enterprise QoS Solution Reference Network Designs (SRNDs), for VoIP on
Cisco Catalyst switches and Cisco IOS routers. For example, on Cisco Catalyst switches,
AutoQoS performs the following automatically:
Enforces a conditional-trust boundary with any attached Cisco IP phones
Enforces a trust boundary on Catalyst switch access ports and uplinks or downlinks
Modifies CoS-to-DSCP (and IP Precedence-to-DSCP) mappings, as required
Enables Catalyst strict priority queuing for voice (CoS 5/DSCP EF) and preferential
queuing for Call-Signaling traffic (CoS 3/DSCP CS3)
Enables best-effort queuing for all other data (CoS 0/DSCP 0) traffic
Modifies queue admission criteria (such as CoS-to-queue mapping)
Modifies queue sizes and queue weights where required
9-58 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 17
Conditionally-Trusted IP Phone + PC
with Scavenger-Class QoS
Yes
Yes
Yes
Yes
No
Start
VVLAN +
DSCP AF31
or CS3
No
Yes
< 128 kb/s
< 5 Mb/s
No
VVLAN
ANY
DVLAN
ANY
No
VVLAN +
DSCP EF
No
Yes
Yes
Yes
< 32 kb/s
< 32 kb/s
No
No
Trust and Transmit
Drop
Re-mark to DSCP CS3
and Transmit
Re-mark to DSCP CS1
and Transmit
Re-mark to DSCP 0
and Transmit
Re-mark to DSCP CS1
and Transmit
Re-mark to DSCP 0
and Transmit
Re-mark to DSCP CS1
and Transmit

Conditionally Trusted IP Phone Plus PC with Scavenger-Class
QoS (Basic) Model
In the conditionally trusted IP phone plus PC with scavenger-class QoS basic model, trust of
CoS markings is extended to Cisco Discovery Protocol verified IP phones. An additional layer
of protection can be offered by access edge policers. As stated previously, the tighter the
policers, the better, provided that adequate bandwidth is permitted for legitimate applications.
The most granular policing can be achieved by the use of per-port per-VLAN policers.
Note Currently, only the Catalyst 3550 Series family supports per-port per-VLAN policing as a
feature. For platforms that do not yet support this feature, equivalent logic can be achieved
by including subnet information within the access lists being referenced by the class maps.
For example, the peak amounts of legitimate traffic originating from the voice VLAN
(VVLAN) on a per-port basis are as follows:
128 kb/s for voice traffic, marked CoS 5/DSCP EF (320 kb/s in the case of G.722 codecs)
32 kb/s for call signaling traffic (marked CoS 3/DSCP AF31 or CS3)
32 kb/s of best-effort services traffic (marked CoS 0)
There should not be any other traffic originating from the VVLAN; therefore, the policer can
be configured to remark anything else from the VVLAN, because such traffic is considered
illegitimate and indicative of an attack.
These policers can then be combined with a policer to meter traffic from the data VLAN
(DVLAN), marking down traffic in excess of 5 percent (5 Mb/s for FE ports) to scavenger
(CS1). The logic of these policers is shown in the figure.
2009 Cisco Systems, Inc. QoS Best Practices 9-59
Conditionally Trusted IP Phone Plus PC with Scavenger-Class
QoS (Advanced) Model
Building on the previous model, you can add additional marking and policing for PC-based
video-conferencing and multiple levels of data applications. Desktop videoconferencing
applications use the same UDP port range by default as does Cisco IP SoftPhone. If the UDP
ports used by the desktop videoconferencing application can be explicitly defined within the
application, as with Cisco IP SoftPhone, you can use two policers: one for IP/VC and another
for Cisco IP SoftPhone. Otherwise, a single policer covering the UDP port range of 16384 to
32767 is required, which would be provisioned for the worst-case scenario of legitimate traffic.
In this case, this is the videoconferencing application requirement of 500 kb/s (for a 384 kb/s
desktop IP/VC application), as compared to the Cisco IP SoftPhone requirement of 128 kb/s (or
320 kb/s for G.722 codecs).
Policer thresholds should be set according to the requirements of the video application. Some
interactive video applications may have higher bandwidth requirements for their codecs.
You can add data VLAN policers to meter transactional data and bulk (High-Throughput) data
flows. Each of these classes can be policed on ingress to the switch port to an in-profile
amount, such as 5 percent each.
Note Because transactional data applications are interactive foreground applications requiring
user input, it is highly unlikely that these types of applications will simultaneously generate 5
Mb/s each from a client PC. However, in the rare case that they do, these flows will be
policed further by any per-user microflow policing policies that may be deployed on
distribution layer Catalyst 6500 Series Supervisor 720s (PFC3s).
Another factor to remember is that certain Catalyst platforms allow only up to 8 policers per
Fast Ethernet port. Therefore, the model presented here is made to conform to this constraint to
make it more generic and modular. For this reason, a separate policer has not been defined for
call signaling traffic from SoftPhone. An access list to identify such traffic could be included
within the mission-critical data ACLs.
Note For more information on Access Edge Trust Models, refer to the Campus QoS Design
section of the Enterprise QoS Solution Reference Network Design Guide on Cisco.com.
9-60 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 18
Catalyst 3750 Series Switch
1P3Q3T(recommended) or 4Q3T
Priority queue (Queue 1)
Should be enabled in converged
campus environment
3 WTD thresholds per queue
2 configurable.
1 nonconfigurable (set to queue-
full state, 100%).
Queue 2: Set first threshold to
70% and second to 80%.
Queue 4: Set first threshold to
40% and accept default value for
second and third thresholds
(100%).
QoS disabled globally by default
When QoS is enabled, all DSCP
and CoS values are set by
default to 0.
SRR (shaped or shared)

The Catalyst 3750 switch supports Layer 3 routing and may be found in either the access layer
or the distribution layer. QoS is globally disabled by default on the Catalyst 3750 switch. While
QoS is disabled, all frames and packets are passed through the switch unaltered (which is
equivalent to a trust CoS and trust DSCP state on all ports). When QoS is globally enabled,
however, all DSCP and CoS values are set by default to 0 (which is equivalent to an untrusted
state on all ports). QoS must be enabled globally for configured policies to become effective.
The Catalyst 3750 switch supports four egress queues, which can be configured on a per-
interface basis to operate in either 4Q3T or 1P3Q3T modes. Additionally, the Catalyst 3750
switch supports two queue-sets, allowing certain interfaces to be configured in one manner and
others to be configured in a different manner. For example, some interfaces may be assigned to
queue Set (qset) 1 operating in 4Q3T mode, while others may be assigned to queue Set 2
operating in 1P3Q3T mode.
The Catalyst 3750 switch has queue 1 as the optional priority queue. In a converged campus
environment, it is recommended to enable the priority queue. The three remaining egress
queues on the Catalyst 3750 switch are scheduled by a shaped round-robin (SRR) algorithm,
which can be configured to operate in shaped mode or in shared mode.
Note The Catalyst 3750 switch also supports two configurable ingress queues (normal and
expedite). Ingress scheduling, however, is rarely (if ever) required; it becomes enabled only
if the combined input rates from any or all switch ports exceed the capacity of the switch
fabric. Such cases are extremely difficult to achieve, even in controlled lab environments. In
the extreme case where such a scenario develops in a production environment, the default
settings of the ingress queues are acceptable to maintain VoIP quality and network
availability.
2009 Cisco Systems, Inc. QoS Best Practices 9-61
The Catalyst 3750 switch supports three weighted tail drop (WTD) thresholds per queue. Two
of these thresholds are configurable (explicit); the third is non-configurable (implicit), because
it is set to the queue-full state (100 percent). The only queues that need to have these thresholds
defined (away from the defaults) are queues 2 and 4. In queue 2, it is recommended to set the
first threshold to 70 percent and the second to 80 percent. In queue 4, it is recommended to set
the first threshold to 40 percent and leave the default values for both the second and third
thresholds at 100 percent.
9-62 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 19
Catalyst 3750 1P3Q3T Queuing Model
DSCP 25
Application DSCP
Network Control
Internetwork Control
Voice
Mission-Critical Data
Call-Signaling
Transactional Data
Network Management
Bulk Data
Scavenger
Best Effort
-
CS6
EF
CS2
AF21
AF31/CS3
CS1
0
Interactive Video AF41
Streaming Video CS4
AF11
CoS3
CoS
CoS7
CoS6
CoS5
CoS2
CoS2
CoS3
CoS1
0
CoS4
CoS4
CoS1
1P3Q3T
Q4
5%
Q1
Priority Queue
CoS1
Q2
70%
Q2T3
Q4T2
Q4T1
Q3
25%
CoS0
CoS7
CoS6
CoS3
Q2T2
CoS4
CoS2
Q2T1
CoS5

Once the queues and thresholds have been defined, traffic can be assigned to queues and
thresholds either by CoS values or DSCP values. While DSCP-to-queue and threshold maps
override CoS-to-queue and threshold maps, these mappings should be as consistent as possible
to ensure predictable behavior and simplify troubleshooting. The following mappings are
recommended:
CoS 0 or DSCP 0 (best-effort traffic) should be mapped to queue 3 threshold 3 (the tail of
the queue), because no other traffic is to be assigned to queue 3.
CoS 1 (scavenger and bulk) should be mapped to queue 4 threshold 3. Scavenger traffic can
then be further contained by a DSCP-to-queue and threshold mapping assigning DSCP CS1
to queue 4 threshold 1 (previously set at 40 percent); bulk data using DSCP values AF11,
AF12, or AF13 (decimal values 10, 12, and 14, respectively) can then use the remainder of
the queue. Bulk data can use either threshold 2 or threshold 3 as its WTD limit (both of
which are set to 100 percent).
CoS 2 and DSCP CS2, AF21, AF22, and AF23 (decimal values 16, 18, 20, and 22,
respectively) can be assigned to queue 2 threshold 1 (previously set at 70 percent). This
limits network management and transactional data to a subset of queue 2. The temporary
marking value for mission-critical traffic, DSCP 25, should also be assigned to queue2
threshold 1.
CoS 3, along with DSCP CS3 and AF31 (decimal values 24 and 26, respectively) can be
assigned to queue 2 threshold 2 (previously set to 80 percent). This allows for preferential
treatment of call signaling traffic within queue 2.
CoS 4 and DSCP CS4, AF41, AF42, and AF43 (decimal values 32, 34, 36, and 38,
respectively) can be assigned to queue 2 threshold 1. In this manner, video (both interactive
and streaming) does not drown out call signaling or network and internetwork control
traffic within queue 2.
CoS 5 and DSCP EF (decimal value 46) should be assigned to queue 1 threshold 3, because
voice is the only traffic to be assigned to the strict-priority queue.
2009 Cisco Systems, Inc. QoS Best Practices 9-63
CoS 6 and DSCP CS6 (decimal value 48) and CoS 7 and DSCP CS7 (decimal value 56)
should be assigned to queue 2 threshold 3. In this manner, there is always some room
available in queue 2 to service network and internetwork control traffic.
Note The QoS features and configuration syntax are identical for the Catalyst 2970, 3560 and
3750 Series switches.
9-64 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 20
QoS Design Options for Access-Layer
Catalyst 3750 Switches
Trusted Endpoint Model
Auto QoS VoIP Model
Untrusted PC + SoftPhone
with Scavenger-Class QoS
Model
Untrusted Server with
Scavenger-Class QoS Model
Conditionally Trusted IP
Phone + PC with Scavenger-
Class QoS (Basic) Model
Conditionally Trusted IP
Phone + PC with Scavenger-
Class QoS (Advanced) Model

The following are QoS design options for access-layer Catalyst 3750 switches:
Trusted Endpoint Model: You can use the mls qos trust dscp command in interface
configuration mode to configure the switch to trust an endpoint. The trusted endpoint
should be assigned either the VVLAN or the data VLAN (DVLAN) with the appropriate
switchport commands.
Auto QoS VoIP Model: When you enable AutoQoS VoIP on the Catalyst 3750 switch, the
switch automatically generates a QoS configuration based on the traffic type and ingress
packet label. If you use the auto qos voip trust command, the switch automatically sets the
ingress classification to trust the CoS value received in the packet on a nonrouted port by
using the mls qos trust cos command. If you use the auto qos voip cisco-phone command,
the switch automatically enables the trusted boundary feature, which uses the Cisco
Discovery Protocol to detect the presence or absence of a Cisco IP phone. If you use the
auto qos voip cisco-softphone command, the switch automatically creates class maps and
policy maps. After creating the class maps and policy maps, the switch automatically
applies the policy map called AutoQoS-Police-SoftPhone to an ingress interface on which
auto-QoS with the Cisco SoftPhone feature is enabled.
Note For a list of the commands that the switch applies when you enable AutoQoS VoIP, refer to
the Campus QoS Design section of the Enterprise QoS Solution Reference Network
Design Guide on Cisco.com.
Untrusted PC Plus Cisco SoftPhone with Scavenger-Class QoS Model: Configure the
switch as follows:
Use ACLs to identify Cisco SoftPhone traffic.
Mark down out-of-profile Cisco SoftPhone voice traffic, out-of-profile signaling
traffic, and out-of-profile data traffic to scavenger (CS1).
Remark excess traffic that is marked 0, CS3, or EF to CS1.
2009 Cisco Systems, Inc. QoS Best Practices 9-65
Untrusted Server with Scavenger-Class QoS Model: Configure the switch as follows:
Remark excess traffic that is marked 0, AF11, AF21, or DSCP 25 to CS1.
Mark down out-of-profile excess data traffic to scavenger (CS1).
Mark down out-of-profile network application traffic to scavenger (CS1)
Conditionally Trusted IP Phone Plus PC with Scavenger-Class QoS (Basic) Model:
Configure the switch as follows:
Modify the CoS-to-DSCP mapping to map CoS 5 to DSCP EF.
Remark excess VVLAN and DVLAN traffic to scavenger (CS1).
Permit only one voice call per switchport VVLAN.
Mark down out-of-profile call signaling and out-of-profile data traffic to scavenger
(CS1).
Mark down unauthorized VVLAN traffic to scavenger (CS1).
Configure an ACL to match voice traffic by VVLAN subnet and VoIP UDP port-
range.
Configure an ACL to match call signaling by VVLAN subnet and call-signaling
TCP port-range
Configure an ACL to match all other traffic sourced from the VVLAN subnet
Note The Catalyst 3750 switch currently does not fully support per-port per-VLAN policing due to
hardware restrictions. For more information on this and other considerations for the Catalyst
3750 switch, refer to the Campus QoS Design section of the Enterprise QoS Solution
Reference Network Design Guide on Cisco.com.
Conditionally Trusted IP Phone Plus PC with Scavenger-Class QoS (Advanced)
Model: Configure the switch as follows:
Modify CoS-to-DSCP mapping to map CoS 5 to DSCP EF.
Remark excess DVLAN traffic that is marked 0, AF11, AF21, CS3, DSCP 25, or
AF41 to scavenger (CS1).
Permit only one IP/VC stream per switchport.
Permit only one voice call per switchport VVLAN.
Mark down unauthorized VVLAN traffic to scavenger (CS1).
Mark down all call-signaling and data traffic that is out-of profile to scavenger
(CS1).
Configure an ACL to match voice traffic by VVLAN subnet and DSCP EF.
Configure an ACL to match call-signaling traffic by VVLAN subnet call-signaling
TCP port-range.
Configure ACLs to identify PC applications such as interactive video, mission-
critical data, transactional data, and bulk data.
Configure an ACL to match all other traffic sourced from the VVLAN subnet.
9-66 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 21
Catalyst 3750 Access Switch
Configuration















The figure shows the Conditionally-Trusted IP Phone + PC + Scavenger (Basic) Model
configuration on a Catalyst 3750 access switch. The mls qos map cos-dscp command modifies
CoS-to-DSCP mapping to map CoS 5 to DSCP EF. The mls qos map policed-dscp command
configures the switch to remark excess VVLAN and DVLAN traffic to scavenger (CS1).
This configuration uses three class maps to classify traffic into three classes (VVLAN-VOICE,
VVLAN-CALL-SIGNALING, and VVLAN-ANY) using three extended IP access control lists
(ACLs).
The policy map called IPPHONE+PC-BASIC is used to configure the switch to behave as
follows:
Permit only one voice call per switchport VVLAN.
Mark down out-of-profile call signaling to scavenger (CS1).
Mark down unauthorized VVLAN traffic to scavenger (CS1).
Mark down out-of-profile data traffic scavenger (CS1)
2009 Cisco Systems, Inc. QoS Best Practices 9-67
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 22
Catalyst 3750 Access Switch
Configuration (Cont.)










The service-policy command applies the IPPHONE+PC-BASIC policy to the
GigabitEthernet0/1 interface. The three extended access lists identify traffic as follows:
The ACL named VVLAN-VOICE identifies voice traffic by matching the VVLAN subnet
and a VoIP UDP port-range.
The ACL named VVLAN-CALL-SIGNALING identifies call signaling traffic by matching
the VVLAN subnet and a Call-Signaling TCP port-range.
The ACL named VVLAN-ANY identifies all other traffic sourced from the VVLAN
subnet.
9-68 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 23
QoS in Catalyst 4500 (SUP II+, III, IV,
and V): Distribution
4 egress queues: 1P3Q1T
(recommended) or 4Q1T
Configurable PQ for queue 3
QoS disabled globally by default
When QoS is enabled, all DSCP and
CoS values are set by default to 0.
Round-robin scheduling for all
queues by default
Recommendations:
Trust DSCP on interswitch
links
Use the 1P3Q1T queuing
model and WTD on
interswitch links
Enable Q3 as the strict-
priority queue on all
interfaces

Like the Catalyst 3750 switch, the Cisco Catalyst 4500 Series switches with Supervisors II+,
III, IV, and V can be found at either the access layer or the distribution layer of the campus.
Furthermore, due to their high performance, they may also be found at the core layer of some
campus networks. The QoS design recommendations for the distribution layer on the Catalyst
4500 Series switch are as follows:
Trust DSCP on interswitch links.
Use the 1P3Q1T queuing model and WTD on interswitch links.
QoS is globally disabled on Catalyst 4500 Series switches by default. The command to enable
QoS globally on a Catalyst 4500 Series switch is simply qos. When QoS is globally enabled, all
DSCP and CoS values are set by default to 0 (which is equivalent to an untrusted state on all
ports).
The Catalyst 4500 Series switch supports four egress queues for scheduling, which may be
configured in either 4Q1T or 1P3Q1T modes. By default, all queues are scheduled in a round-
robin manner. The third transmit queue can be designated as an optional strict-priority queue.
This can be enabled by using the tx-queue command in interface configuration mode followed
by the priority high command in interface transmit-queue configuration mode. This queue can
be configured to be shaped to a peak limit, such as 30 percent, to allow bandwidth to be
available to non-voice applications. This is useful in situations where a trust boundary has been
compromised and a DoS or worm attack is saturating voice queues.
This example shows how to configure transmit queue 3 as the high priority queue:


Bandwidth allocations can also be assigned to queues (for certain interfaces) using the tx-
queue command in interface configuration mode followed by the bandwidth sub-command.
Bandwidth allocations to queues can only be assigned on the following interface types:
2009 Cisco Systems, Inc. QoS Best Practices 9-69
Uplink ports on supervisor engines
Ports on the WS-X4306-GB line card
The two 1000BASE-X ports on the WS-X4232-GB-RJ line card
The first two ports on the WS-X4418-GB line card
The two 1000BASE-X ports on the WS-X4412-2GB-TX line card
The Cisco Catalyst 4500 Series switches do not support CoS-to-queue mappings, but they do
support DSCP-to-queue mappings. DSCP-to-queue mappings can be defined with the qos map
dscp to tx-queue global command.
While tail-drop or WRED thresholds are not supported on the Catalyst 4500, the switch does
support one of the most advanced congestion avoidance mechanisms in the Catalyst family.
This congestion avoidance feature is performed by Dynamic Buffer Limiting (DBL). DBL
tracks the queue length for each traffic flow in the switch and when the queue length of a flow
exceeds its limit, DBL drops packets or sets the (RFC 3168) Explicit Congestion Notification
(ECN) bits in the IP packet headers. DBL can be enabled globally with the qos dbl global
command, as well as on a per-class basis within a policy map with the dbl command. A default
DBL policy can be applied to all transmit queues.
Given these features and the objective to make queuing consistent across platforms, it is
recommended to enable DBL globally on the Catalyst 4500, as well as enable Q3 as the strict-
priority queue on all interfaces such that the switch operates in 1P3Q1T mode. This queue can
be shaped to 30 percent of the link capacity. Furthermore, Q1 can then be used as the scavenger
and bulk queue, Q2 as the best-effort queue, and Q4 as the preferential queue.
On interfaces that support bandwidth allocation, 5 percent could be assigned to Q1, 25 percent
to Q2, and 40 percent to Q3. Unlike bandwidth-weights that are used on other platforms, these
bandwidth allocations are defined in absolute b/s or as relative percentages of the link
bandwidth. In either case, they should not total more than the bandwidth-limit of the link (1
Gb/s or 100 percent), including the priority-bandwidth allocation for Q3.
Note Much of the Catalyst MLS QoS syntax is supported on the Catalyst 4500; however, the mls
prefix keyword is usually omitted from the configuration commands.
9-70 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 24
Catalyst 4500 Series 1P3Q1T Queuing
Model
DSCP 25
Application
DSCP
Network Control
Internetwork Control
Voice
Mission-Critical Data
Call-Signaling
Transactional Data
Network Management
Bulk Data
Scavenger
Best Effort
CS7
CS6
EF
CS2
AF21
AF31/CS3
CS1
0
Interactive Video AF41
Streaming Video CS4
AF11
1P3Q1T
Q4 (40%)
Q1 (5%)
CS6/CS7
Q2 (25%)
Q3 (30%)
Priority Queue
CS4/AF41
CS1/AF11
DSCP 25
CS3/AF31
CS2/AF21
EF
0

By default, the DSCP-to-queue assignments are as follows:
DSCP 0-15: queue 1
DSCP 16-31: queue 2
DSCP 32-47: queue 3
DSCP 48-63: queue 4
The recommended DSCP-to-queue assignments for the Catalyst 4500 Series switches are as
follows:
DSCP 0: queue 2
DSCP CS1 (scavenger) and DSCP AF11/AF12/AF13 (bulk data): queue 1
DSCP CS2 (network management) and AF21/AF22/AF23 (transactional data): queue 4
DSCP CS3 and AF31 (call-signaling): queue 4
DSCP 25 (temporary marking for mission-critical data): queue 4
DSCP CS4 (streaming video) and AF41/AF42/AF43 (interactive video): queue 4
DSCP EF (Voice): queue 3 (the strict priority queue)
DSCP CS6 (internetwork control) and CS7 (network control/STP): queue 4
The queuing recommendations for the Catalyst 4500 Series switches (Supervisors II+, III, IV
and V) are shown in the figure.
2009 Cisco Systems, Inc. QoS Best Practices 9-71
Branch Router QoS Design
This topic describes unique considerations for branch router QoS design.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 25
Branch Router QoS Design
Branch switch
VVLAN
Branch router
DVLAN
WAN
Edge
LAN
Edge
Optional: DSCP-to-CoS mapping
policies for campus-to-branch traffic
Queuing/dropping/shaping/link-efficiency
policies for branch-to-campus traffic
Classification and marking +
NBAR worm-dropping policies for
branch-to-campus traffic
WAN

The following topic discusses the QoS design recommendations for WAN aggregators. For the
most part, these designs also apply to branch routers located at the far end of the WAN links.
However, at least four unique considerations must be made for branch router QoS design.
One of the first considerations is whether to configure the QoS policies manually or to utilize
the Cisco Automatic QoS for the Enterprise (AutoQoS for the Enterprise) feature. AutoQoS for
the Enterprise can automatically detect and provision bandwidth for up to 10 classes of traffic.
This feature is well suited to smaller branch networks managed by administrators with
moderate QoS expertise. However for larger branch networks, where centralized policies are
generally preferred, this feature may not be appropriate.
If QoS policies are to be defined manually, other considerations must also be taken into
account, such as the presence of unidirectional applications. Some applications, such as
streaming video (whether unicast or multicast), require bandwidth allocation only on the WAN
edge of the WAN aggregator, not on the WAN edge of the branch router. Therefore, bandwidth
allocated to unidirectional applications on the WAN aggregator WAN edge can be redistributed
among other preferential classes on the WAN edge of the branch router.
Another characteristic common to branches is that traffic destined to the campus might not be
correctly marked on the branch access switches. These switches, which are usually lower-end
switches, might or might not have the capabilities to classify by Layer 3 or 4 parameters and
mark DSCP values for data applications. Therefore, classification and marking might need to
be performed on the LAN edge of the branch router in the ingress direction. Furthermore,
branch routers provide the capability to use NBAR to classify and mark flows that require
stateful packet inspection.
9-72 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Related to classification and NBAR, another consideration unique to branch QoS design is that
branch routers are a strategic place to deploy NBAR policies for worm identification and
policing. NBAR policies can be used to identify and drop Code Red, NIMDA, SQL Slammer,
Sasser, and other worms.
The figure shows the QoS policies required on a remote branch router.
2009 Cisco Systems, Inc. QoS Best Practices 9-73
WAN Edge QoS Design Considerations
This topic provides design guidance for enabling QoS over the WAN. The recommendations in
this topic are not autonomous. They are critically dependent on the recommendations for the
enterprise campus discussed in the previous topics.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 26
WAN Edge (CE-PE) QoS Implementation
Queuing policies
Shaping policies
Selective dropping policies
Link-efficiency policies

A fundamental principle of economics states that the more scarce a resource is, the more
efficiently it should be managed. In an enterprise network infrastructure, bandwidth is the
prime resource and also is the scarcest (and, likewise, most expensive) over the WAN.
Therefore, the case for efficient bandwidth optimization using QoS technologies is strongest
over the WAN, especially for enterprises that are converging their voice, video, and data
networks.
The design principles described in this topic apply primarily to Layer 2 WANs, such as leased
lines, Frame Relay, and ATM (including ATM-to-Frame Relay Service Interworking).
However, many service providers use these Layer 2 WAN technologies to access Layer 3 VPN
services. Therefore, many of the design principles and examples presented in this topic also
apply to such VPN access scenarios.
Within typical WAN environments, routers play one of two roles: a WAN aggregator or a
branch router. In some very complex WAN models, enterprises might have distributed WAN
aggregators to cover regional branches, but the role of such middle-tier routers is not
significantly different from that of a WAN aggregator located at a campus edge. This topic
focuses on WAN edge recommendations (primarily for WAN aggregator routers), but these
correspondingly apply to the WAN edge designs of branch routers. QoS policies required on
WAN edges are shown in the figure.
9-74 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 27
WAN Edge QoS Design Considerations
Design QoS policies to limit the average CPU utilization of the
WAN aggregator to 75% or lower.
Reserve at least 25% of the bandwidth of a WAN link for the
default best-effort class.
Limit the sum of all LLQ queues to 33%.
Enable an LFI tool on links with speeds at or below 768 kb/s (on
both ends of the link).
Enable the LFI tool during a scheduled downtime.
Avoid deploying interactive video on slow-speed links.
Use cRTP primarily on slow-speed (< 768 kb/s) links.

QoS policies required on WAN aggregators include queuing, shaping, selective dropping, and
link-efficiency policies in the outbound direction of the WAN link. Traffic is assumed to be
correctly classified and marked at Layer 3 before WAN aggregator ingress. Layer 3 markings
(preferably DSCP) are media independent and traverse the WAN media, whereas Layer 2 CoS
is lost when the media switches from Ethernet to WAN media. Several factors must be kept in
mind when designing and deploying QoS polices on WAN edges.
QoS CPU Utilization
WAN edge QoS is performed within Cisco IOS Software. If the WAN aggregator is homing
several hundred remote branches, the collective CPU required to administer complex QoS
policies might be more than some older devices can provide. The main point is that QoS entails
a marginal CPU load. WAN topologies and QoS policies should be designed to limit the
average CPU utilization of the WAN aggregator to 75 percent or lower; this allows the router to
respond efficiently to routing updates.
Bandwidth Provisioning for Best-Effort Traffic
Reserve at least 25 percent of the bandwidth of a WAN link for the default best-effort class.
Because many enterprises have several hundreds, if not thousands, of data applications running
over their networks, adequate bandwidth must be provisioned for this class as a whole to handle
the sheer volume of applications that default to it.
Bandwidth Provisioning for Real-time Traffic
Limit the sum of all LLQ queues to 33 percent. If too much traffic is assigned to Real-Time
(strict-priority/low-latency) queuing, the overall effect is a dampening of QoS functionality for
data applications. When real-time applications (such as voice or interactive-video) dominate a
WAN link, data applications fluctuate significantly in their response times, destroying the
transparency of the "converged" network.
2009 Cisco Systems, Inc. QoS Best Practices 9-75
Furthermore, if VoIP traffic is set to dominate a link via low-latency queuing (which is
essentially strict-priority FIFO queuing), VoIP actually could negatively impact other VoIP
traffic because of extensive FIFO queuing. This easily could result in excessive serialization
delays even on medium-speed links (T1/E1 links) where serialization delays ordinarily would
not be a consideration. Such excessive serialization delays from VoIP LLQ overprovisioning
would increase VoIP jitter and, thus, decrease overall call quality.
Note The 33-percent limit for LLQ queues is a best-practice design recommendation, not a
mandate.
Serialization
Over the WAN, lower link speeds can cause sufficient serialization delay to adversely affect
real-time streams. Serialization delays are variable because they depend not only on the line
rate of the link speed, but also on the size of the packet being serialized. Variable delay is also
known as jitter. Because the end-to-end, one-way jitter target has been set as 30 ms, the typical
per-hop serialization delay target is 10 ms, which allows for up to three intermediate hops per
direction of VoIP traffic flow. This 10 ms per-hop target leads to the recommendation that a
link fragmentation and interleaving (LFI) tool (either MLP LFI or FRF.12) be enabled on links
with speeds at or below 768 kb/s; this is because the serialization delay of a maximum-size
Ethernet packet (1500 bytes) takes more than 10 ms to serialize at 768 kb/s and below.
Naturally, LFI tools need to be enabled on both ends of the link.
It is recommended that the LFI tool be enabled during a scheduled downtime. Assuming that
the network administrator is within the enterprise campus, it is recommended that LFI be
enabled on the branch router first (which is on the far end of the WAN link) because this
generally takes the WAN link down. The administrator can then enable LFI on the WAN
aggregator (the near end of the WAN link), and the link will come back up. Otherwise, if the
administrator enables LFI on the WAN aggregator first, the link will go down, along with any
in-band management access to the branch router. In such a case, the administrator would need
to remove LFI from the WAN aggregator (bringing the link back up), enable LFI on the branch
router, and then re-enable LFI on the WAN aggregator.
Additionally, since traffic assigned to LLQ escapes fragmentation, you should not deploy
interactive video on slow-speed links; the large interactive video packets (such as 1500-byte
full-motion I-frames) could cause serialization delays for smaller interactive video packets.
IP RTP Header Compression Usage
Use cRTP primarily on slow-speed (less than 768 kb/s) links. Compressing IP, UDP, and RTP
headers (cRTP) for VoIP calls can result in significant bandwidth gains over WAN links.
However, cRTP is one of the most CPU-intensive features within the Cisco IOS Software QoS
toolset. Therefore, it is recommended that you use cRTP primarily on slow-speed links and
carefully monitor CPU usage, especially for WAN aggregators that home a large number of
remote branches.
9-76 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 28
WAN Edge QoS Design Considerations
(Cont.)
Reduce Tx-rings on slow-speed links to avoid excessive
serialization delay (on some older versions of Cisco IOS
Software).
Provision a bandwidth class for routing and control traffic
that is not adequately protected by PAK_priority (the
internal Cisco IOS mechanism for protecting routing and
control traffic). Layer 2 and Layer 3 control traffic on
moderately congested WAN links typically is protected
adequately with the default PAK_priority treatment within
the router and the IP ToS byte markings of IPP6 or CS6.
On heavily congested links, it might be necessary to explicitly
provision a CBWFQ bandwidth class for routing and control traffic.
Provision a separate bandwidth class to protect BGP sessions, even
on moderately congested links; BGPs do not receive PAK_priority
treatment within the routers.

Tx-ring Tuning
Newer versions of Cisco IOS Software automatically size the final interface output buffer (Tx-
ring) to optimal lengths for Real-Time applications, such as voice or video. On some older
versions of Cisco IOS Software, Tx-rings might need to be reduced on slow-speed links to
avoid excessive serialization delay.
To determine the value of the Tx-ring on an interface, use the variation of the show controllers
command, shown in the following example.


The value within the parentheses following the tx_limited keyword reflects the value of the
Tx-ring. In this particular example, the Tx-ring is set to 64 packets. This value can be tuned to
the recommended setting of 3 on T1/E1 (or slower) links using the command shown in the
following example:


The new setting can be verified with the show controllers command that is shown above.


Note In ATM, the length of the Tx-ring is defined in (576-byte) particles, not packets, and is tuned
on a per-PVC basis. On some non-ATM interfaces, the Tx-ring even can be tuned to a
minimum of 1 (packet). In either case, the Tx-ring can be tuned (on < 768 kb/s links) to
approximately 1500 bytes, which is the MTU of Ethernet.
2009 Cisco Systems, Inc. QoS Best Practices 9-77
PAK_Priority
PAK_priority is the internal Cisco IOS Software mechanism for protecting routing and control
traffic. The design implications of PAK priority are summarized in the following list:
Layer 2 and Layer 3 control traffic on moderately congested WAN links typically is
protected adequately with the default PAK_priority treatment within the router and the IP
ToS byte markings of IPP6 or CS6.
On heavily congested links, it might be necessary to explicitly provision a CBWFQ
bandwidth class for routing and control traffic, as identified by either IPP or CS6.
Although IS-IS traffic receives PAK_priority within the router, it cannot be marked to IPP6
or CS6 because IS-IS uses a CLNS protocol; it does not use IP. This is important if explicit
bandwidth provisioning is required for IS-IS traffic because it cannot be matched against
IPP6 or CS6 like most other IGPs. However, NBAR can be used within a class map to
match IS-IS traffic.
Although BGPs (both eBGPs and iBGPs) are marked to IPP6 or CS6, they do not receive
PAK_priority treatment within the routers. Therefore, it may be necessary to provision a
separate bandwidth class to protect BGP sessions, even on moderately congested links
where the underlying IGPs are stable.
On Catalyst 6500 switches running Cisco IOS Software on both the supervisors and MSFC,
IGP packets marked internally with PAK_priority additionally are marked with IPP6 or
CS6 and the Layer 2 CoS value of 6. This is because scheduling and congestion avoidance
within Cisco Catalyst switches is performed against Layer 2 CoS values.
9-78 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 29
WAN Edge QoS Design Considerations
(Cont.)
Slow link speed
Avoid deployment of interactive video on these links, if possible.
Enable LFI if VoIP is to be deployed.
Use cRTP with careful CPU monitoring.
Check Tx-ring sizes and tune to 3, if necessary.
Use three- to five-class traffic models.
Medium link speed
Assign either VoIP or interactive video to the LLQ, or place interactive
video in a CBWFQ queue.
Use three- to five-class traffic models.
High link speed
Use cRTP only if the benefits of the amount of bandwidth saved
outweigh the cost of increased CPU levels.
Use five- to 11-class traffic models.

Link Speeds
In the context of WAN links, there are three main groupings of link speeds. These link speeds
and their respective design implications are summarized in the following list:
Slow (link speed 768 kb/s):
Deployment of interactive video generally is not recommended on these links
because of serialization implications.
These links require LFI to be enabled if VoIP is to be deployed over them.
cRTP is recommended (with careful CPU monitoring).
Check Tx-ring sizes (especially on slow-speed ATM PVCs); tune to 3, if needed.
Three- to five-class traffic models are recommended.
Medium (768 kb/s link speed T1/E1 link speeds):
VoIP or interactive video can be assigned to LLQ. There is not typically enough
bandwidth to assign both to LLQ and still keep LLQ provisioned at less than 33
percent. Alternatively, interactive video can be placed in a CBWFQ queue.
LFI is not required.
cRTP is optional.
Three- to five-class traffic models are recommended.
High (T1/E1 link speeds):
LFI is not required.
cRTP generally is not recommended because the cost of increased CPU levels
typically offsets the benefits of the amount of bandwidth saved.
Five- to 11-class traffic models are recommended.
2009 Cisco Systems, Inc. QoS Best Practices 9-79
It is important to keep in mind that minor differences might exist between QoS configurations
on distributed platforms (such as the Cisco 7500 Series Routers with VIPs) and those on
nondistributed platforms (such as the 7200 or 1700 Series Routers). The most common
difference is the inclusion of the distributed keyword after commands such as ip cef on
distributed platforms.
9-80 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 30
Traffic Leaving Enterprise Network
Output QoS policy on CE
controlled by service provider
Service provider enforces SLA
using t he output QoS policy on CE
Output policy uses queuing,
dropping, and possibly shaping
Elaborate traf fic classification or
mapping of existing markings
May require LFI or cRTP
Output QoS policy on CE not
controlled by service provider
Service provider enforces SLA
using input QoS policy on PE
Input policy uses policing and
marking
Elaborate traffic classification or
mapping of existing markings
on PE

The QoS requirements on the CE and PE router will differ, depending on whether the CE is
managed by the service provider.
The figure illustrates the general QoS requirements on the CE and PE routers for traffic leaving
the enterprise CE router and moving toward the service provider PE router.
For managed CE service, the WAN edge output QoS policy on the CE will be managed and
configured by the service provider.
For unmanaged CE service, the WAN edge output QoS policy on the CE will be managed and
configured by the enterprise customer.
For managed CE service, the service provider can enforce the SLA for each traffic class using
the output QoS policy on the CE. For example, you can use LLQ or CBWFQ to give a
maximum bandwidth guarantee to the real-time voice and video traffic class, give a minimum
bandwidth guarantee to the data traffic class, and use class-based shaping to provide a
maximum rate limit to each data traffic class.
For unmanaged CE service, because the service provider has no control of the CE, the service
provider can only enforce the SLA for each traffic class at the input of the PE router. For
example, you can use class-based policing to rate-limit the input traffic rate of the different
traffic classes and to re-mark the exceeding traffic.
2009 Cisco Systems, Inc. QoS Best Practices 9-81
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 31
Traffic Leaving Enterprise Network
(Cont.)
CE
Output Policy
Classification /
Marking / Mapping
LLQ
WRED
[Shaping]
[LFI or cRTP]
PE
Input Policy
<Not required>
CE
Output Policy
<irrelevant>
PE
Input Policy
Classification /
Marking / Mapping
Policing

For traffic leaving the CE router, the figure illustrates the different QoS mechanisms that are
commonly implemented at the CE and PE routers, depending on whether the CE is managed by
the service provider.
For unmanaged CE, the CE output policy is managed and configured by the enterprise
customer; therefore, it is irrelevant to the service provider. At the PE input interface, the service
provider will have a policy to classify, mark, or map the traffic. The service provider also
typically implements traffic policing to rate-limit the input traffic rate from the enterprise
customer, so that the traffic rate does not exceed the contractual rate as specified in the SLA.
For managed CE, the CE output policy is managed and configured by the service provider. The
service provider typically has an output policy on the CE router to classify and mark the traffic
exiting the CE router. LLQ or CBWFQ (or both) and WRED are used for congestion
management and congestion avoidance. To compensate for speed mismatch or
oversubscription, traffic shaping may be required. To improve link efficiency, LFI and cRTP
are used.
9-82 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 32
Traffic Leaving Service Provider Network
Service provider enforces
SLA using the output QoS
policy on PE.
Output policy uses queuing,
dropping, and, optionally,
shaping.
May require LFI or cRTP.
No input QoS policy on CE
needed.
Service provider enforces
SLA using the output QoS
policy on PE.
Output policy uses queuing,
dropping, and, optionally,
shaping.
May require LFI or cRTP.
Input QoS policy on CE
irrelevant.

The figure illustrates the general QoS requirements on the CE and PE routers for traffic leaving
the service provider PE router toward the enterprise CE router.
For both managed and unmanaged CE service, the service provider can enforce the SLA for
each traffic class using the output QoS policy on the PE. For example, use LLQ or CBWFQ to
give a maximum bandwidth guarantee to the real-time voice and video traffic class, give a
minimum bandwidth guarantee to the data traffic classes, and use class-based shaping to
provide a maximum rate limit to each data traffic class.
2009 Cisco Systems, Inc. QoS Best Practices 9-83
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 33
Traffic Leaving Service Provider Network
(Cont.)
CE
Input Policy
<Not needed>
PE
Output Policy
LLQ
WRED
[Shaping]
[LFI or cRTP]
CE
Input Policy
<Irrelevant>
PE
Output Policy
LLQ
WRED
[Shaping]
[LFI or cRTP]

The figure illustrates the different QoS mechanisms that are commonly implemented at the PE
router for traffic leaving the service provider PE router toward the enterprise CE router.
For both managed and unmanaged CE service, the service provider typically has an output
policy on the PE router using either LLQ or CBWFQ (or both) and WRED, for congestion
management and congestion avoidance. To compensate for speed mismatch or
oversubscription, traffic shaping may be required. To improve the link efficiency, LFI and
cRTP are used.
A customer edge input policy is not required for managed and unmanaged CE services.
9-84 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Service Provider Backbone QoS Implementations
This topic describes some of the best-practice QoS implementations and configurations on a
service provider IP core PE and provider (P) routers.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 34
Service Provider Backbone QoS
Implementation
Marking, policing, and
shaping should be
done at the edges
of the network.
Queuing and dropping are
done in the core based on
packet marking done at the
edge.

The figure illustrates the typical QoS configurations required at the PE and P routers within the
service provider IP core network.
The service provider IP core is used to provide high-speed packet transport. Therefore, all the
markings, policing, and shaping should be performed only at the PE router on the PE-to-CE
link and not at the core.
Using the DiffServ model, only the edge requires a complex QoS policy. At the core, only
queuing and WRED are required. The operation of queuing and WRED will be based on the
markings done at the PE.
It is common to implement gigabit switch routers (GSRs) within the service provider IP core.
With the GSRs, the queuing mechanism is MDRR. If a router such as the Cisco 7500 Series
Router is used in the core, LLQ will be the queuing mechanism.
2009 Cisco Systems, Inc. QoS Best Practices 9-85
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 35
Service Provider Backbone
Overprovisioning best-
effort backbone is an
alternative, but has
these drawbacks:
Expensive
Fate sharing
Planning mistakes
Failure conditions
Unexpected traffic demand
DiffServ backbone is
better

Two of the IP backbone design methods include a best-effort backbone with overprovisioning
and a DiffServ backbone.
The more traditional approach is to use a best-effort backbone with overprovisioning. However,
to meet the application needs of today (VoIP, videoconferencing, e-learning, and so on),
deploying a DiffServ backbone and offering different SLAs for the different traffic classes can
greatly reduce the cost and improve the delay, jitter, and packet loss and meet network QoS
requirements.
With overprovisioning, a service provider typically uses an overprovisioning factor of 2. For
example, if the aggregate traffic load on the network is 10 Gb/s, the network is provisioned for
20 Gb/s of maximum capacity. Some of the problems with a best-effort backbone with
overprovisioning include:
If the capacity planning is not accurate and congestion occurs, because the traffic types are
not differentiated, the VoIP packets will not be treated with higher priority than other data
traffic, resulting in suboptimal treatment for VoIP packets.
Overprovisioning for all traffic is very expensive to implement.
During capacity planning, all of the failure scenarios might not be analyzed. Unplanned
failures can cause unexpected congestion in the network. A link or node failure leading to
traffic re-routing can take up all the excess capacity.
The network can experience unexpected traffic demands, which can cause congestions in
the network.
Denial of service attacks on one service will affect all other services.
Using DiffServ, the traffic is isolated into different classes, and each traffic class is provisioned
with a different traffic policy based on the QoS requirements of the traffic class. This will
reduce the cost and provide better overall latency, delay, and jitter.
9-86 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 36
What Are the Benefits of Using a DiffServ
Backbone?
DiffServ allows support of multiple classes of traffic with different
underprovisioning and overprovisioning ratios per class of service.
Maximum potential economic benefit of DiffServ is when traffic
requiring the highest SLA represents a minor proportion of the
overall capacity.

The figure lists two of the main benefits of using DiffServ over a best-effort with
overprovisioning backbone.
Instead of overprovisioning based on the aggregate bandwidth of all traffic, with DiffServ, each
traffic class can be designed with different provisioning ratios. If the premium traffic class is
only 20 percent of the total capacity, overprovisioning for 100 percent of the traffic load is
expensive and not necessary to guarantee the QoS requirements for the premium traffic class.
The following example illustrates an overprovisioning example with and without DiffServ:
If the total aggregate bandwidth is 10 Gb/s, where the premium class = 2 Gb/s, the business
class = 3 Gb/s, and the default class = 5 Gb/s:
With best effort and an overprovisioning ratio of 2:1, the provisioned bandwidth = 10 Gb/s
* 2 = 20 Gb/s.
With DiffServ, and the premium class having an overprovisioning ratio of 2:1, the business
class having a lower overprovisioning ratio of 1.5:1, and the default class not having any
overprovisioning, the provisioned bandwidth = (2 Gb/s * 2) + (3 Gb/s * 1.5) + 5 Gb/s =
13.5 Gb/s.
By isolating the traffic into different traffic classes, then treating the different traffic classes
with different PHBs, DiffServ can reduce the bandwidth requirement on the network while
achieving the same SLA when compared to the non-DiffServ case.
2009 Cisco Systems, Inc. QoS Best Practices 9-87
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 37
PE-to-P QoS PE Outbound

The figure illustrates the typical QoS configurations required at the service provider core PE
and P routers.
The complex QoS policies of classification and marking, policing, shaping, LFI, and cRTP are
required only at the edge. In the core, only LLQ (or MDRR for GSR) and WRED are needed.
The figure shows the QoS configurations on the ingress PE router outbound interface to the P
router.
In this case, a traffic policy called OUT-POLICY is configured to provide LLQ or CBWFQ
and WRED. Each traffic class bandwidth guarantee is configured using a percentage rather than
a fixed bandwidth in kb/s.
No inbound policy is required on the P router.
9-88 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 38
P-to-P QoS P Outbound

The figure shows the QoS configurations on the P router outbound interface to another P router.
In this case, a traffic policy called OUT-POLICY is configured to provide LLQ or CBWFQ
and WRED. Each traffic class bandwidth guarantee is configured using a percentage rather than
a fixed bandwidth in kb/s.
No inbound policy is required on the receiving P router.
2009 Cisco Systems, Inc. QoS Best Practices 9-89
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 39
P-to-PE QoS P Outbound

The figure shows the QoS configurations on the P router outbound interface to the egress PE
router.
In this case, a traffic policy called OUT-POLICY is configured to provide LLQ or CBWFQ
and WRED. Each traffic class bandwidth guarantee is configured using a percentage rather than
a fixed bandwidth in kb/s.
No inbound policy is required on the egress PE router.
9-90 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 40
PE-to-CE QoS for Frame Relay Access
PE Outbound

The figure shows the QoS configurations on the egress PE router outbound interface to
implement the required QoS policy required for each of the three service provider traffic
classes.
In this case, a traffic policy called OUT-POLICY is configured to provide LLQ or CBWFQ
and WRED. Each traffic class bandwidth guarantee is configured using a percentage rather than
a fixed bandwidth in kb/s.
No inbound policy is required on the CE router.
2009 Cisco Systems, Inc. QoS Best Practices 9-91
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 41
PE-to-CE QoS for Frame Relay Access
PE Outbound (Cont.)

In this example, the PE-CE link is a Frame Relay link and FRTS is enabled on the PVC.
FRTS is configured using a Frame Relay map class with a CIR of 512 kb/s, a Bc of 5120 bits, a
Be of 0 (no bursting), and a minCIR of 512 kb/s. The CIR is the rate at which you want to
normally send when there is no congestion. The CIR needs to be the remote end-link speed or
the actual CIR on a virtual circuit. The Bc is the amount you will send per time interval. The
CIR and Bc will be used to compute a Tc, where Tc = Bc / CIR. For FRTS, CLI will only allow
Bc values that would result in a 125 ms > Tc >10 ms. A recommended value for Tc is 10 ms.
To get a Tc of 10 ms, the Bc should set to 1/100 of the CIR.
FRF.12 fragmentation and interleaving and cRTP are also enabled within the Frame Relay map
class. The fragment size in bytes is set to derive a maximum delay of 10 ms to 15 ms. The
fragment size should be the same on both ends.
The OUT-POLICY traffic policy is applied within the Frame Relay map class.
Note If the FR PVC is carrying VoIP traffic, the recommendation is to set the minCIR = CIR and
not use adaptive traffic shaping, because by the time the BECNs are received by the
sender, drops are already happening on the Frame Relay switch.
9-92 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
MPLS VPN QoS Design
This topic presents QoS design principles and designs to achieve end-to-end service levels over
MPLS VPNs.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 42
Where QoS Is Required in MPLS VPN
Architectures
Required
Optional
CE-to-PE queuing, shaping,
remarking, LFI
IP routers
MPLS VPN
PE router CE router PE router CE router
PE-to-CE queuing,
shaping, LFI
PE ingress policing
and re-marking
Optional: Core DiffServ or MPLS TE policies

As noted in the previous lesson, MPLS VPNs are rapidly gaining popularity as private WAN
alternatives. MPLS VPN QoS design can be viewed from two distinct perspectives:
The enterprise customer subscribing to the MPLS VPN service
The service provider provisioning edge and core QoS within the MPLS VPN service
To achieve end-to-end service levels, enterprise and service-provider QoS designs must be
consistent and complimentary.
MPLS is a combination of routing and switching technologies that can provide scalable VPNs
with end-to-end quality of service. Many enterprise customers are turning to service providers
that offer MPLS VPN services as private WAN alternatives. One of the main reasons for this is
the any-to-any connectivity capabilities of MPLS VPNs. However, this full-mesh nature in
itself poses significant QoS implications to enterprise customers and service providers alike,
namely that they need to co-manage QoS in a cooperative and complementary fashion to
achieve end-to-end service levels.
MPLS VPN architectures are comprised of customer edge (CE) routers, provider-edge (PE)
routers, and provider (P) routers. MPLS VPNs provide fully meshed Layer 3 virtual WAN
services to all interconnected CE routers, as outlined by RFC 2547. This fully meshed
characteristic of MPLS VPNs presents a significant design implication to traditional Layer 2
WAN QoS design.
2009 Cisco Systems, Inc. QoS Best Practices 9-93
Because of cost, scalability, and manageability constraints, traditional private WAN designs
rarely use full-mesh models. Instead, most Layer 2 WAN designs revolve around a hub-and-
spoke model, implementing either a centralized hub design or the more efficient regional hub
design. Under such hub-and-spoke designs, QoS primarily is administered at the hub router by
the enterprise. As long as the service provider meets the contracted service levels, the packets
received at remote branches will reflect the scheduling policies of the WAN aggregator router.
The WAN aggregator controls not only campus-to-branch traffic, but also branch-to-branch
traffic. Under traditional hub-and-spoke models, QoS is principally administered by the
enterprise customer.
With the advent of MPLS VPN service offerings that inherently offer full-mesh connectivity,
the QoS administration paradigm shifts. Under a full-mesh design, the hub router still
administers QoS for all campus-to-branch traffic, but it no longer fully controls the QoS for
branch-to-branch traffic. Although it might appear that the only required workaround for this
new scenario is to ensure that QoS is provisioned on all branch routers, this is insufficient
because it addresses only part of the issue.
For example, consider the case of provisioning any-to-any IP/VC. As with a traditional Layer 2
WAN design, a scheduling policy to prioritize IP/VC on the WAN aggregator is required. The
enterprise must also properly provision similar priority scheduling for IP/VC on the branch
routers. In this manner, any IP/VC calls from the campus to the branch (and also from branch to
branch) are protected against traffic of lesser importance flowing between the same sites. The
complexity of the fully meshed model arises when considering that contending traffic might not
always come for the same sites, but could come from any site. Furthermore, the enterprise no
longer fully controls QoS for branch-to-branch traffic because this traffic no longer is homed
through a hub. Continuing the example, if a videoconferencing call is set up between two
branches and a user from one of the branches also initiates a large FTP download from the
central site, the potential for oversubscription of the PE-to-CE link from the fully meshed
MPLS VPN cloud into one of the branches becomes very real, likely causing drops from the
IP/VC call.
The only way to guarantee service levels in such a scenario is for the service provider to
provision QoS scheduling that is compatible with the enterprise policies on all PE links to
remote branches. This is what creates the paradigm shift in QoS administration for fully
meshed topologies. Namely, enterprises and service providers must cooperate to jointly
administer QoS over MPLS VPNs.
Queuing policies are mandatory on CE and PE routers because of the full-mesh implications of
MPLS VPNs. PE routers also typically have policing (and markdown) policies on ingress to
enforce SLAs.
QoS policies on P routers are optional. Such policies are optional because some service
providers overprovision their MPLS core networks and, as such, do not require any additional
QoS policies within their backbones; on the other hand, other providers might implement
simplified DiffServ policies within their cores or might even deploy MPLS traffic engineering
(MPLS TE) to handle congestion scenarios within their backbones. The figure summarizes the
points where QoS policies can be provisioned within MPLS VPN architectures.
9-94 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 43
Customer Edge QoS Design
Considerations
Service Provider
Enterprise
Campus
Enterpri se
Branch
Maximum One-Way,
Edge-to-Edge SP
Service Levels
Latency 60 ms
Jitter 20 ms
Loss 0.5%
Maximum One-Way, End-to-End Service Levels
Latency 150 ms / Jitter 30 ms / Loss 1%

In addition to the full-mesh implication of MPLS VPNs, these considerations should be kept in
mind when considering MPLS VPN CE QoS design:
Layer 2 Access (Link-Specific) QoS Design
Although MPLS VPNs are essentially Layer 3 WANs, a Layer 2 access medium to connect to
the MPLS VPN service provider is an obvious requirement. Most providers support Frame
Relay and ATM as access media because this makes migration from Layer 2 WANs to Layer 3
MPLS VPNs easier and cheaper to manage; customers are not forced to convert hardware on
hundreds (or, in some cases, thousands) of remote branch routers to connect to MPLS VPN
providers.
It is important to recognize that Layer 2 QoS link-specific issues and designs remain the same
with regular Layer 2 WAN edges or with Layer 3 MPLS VPN CE/PE edges. For example,
shaping and LFI recommendations for slow-speed FR links are identical whether the link is
used for a Layer 2 WAN or for a Layer 3 MPLS VPN access link. This makes migration easier
to manage because link-specific QoS designs do not need to be changed, although the service
policy itself might require minor modification.
In addition to FR and ATM for access, some service providers support Ethernet and Fast
Ethernet as access media but usually guarantee a CIR of only subline rate. In such cases,
hierarchical shaping and queuing policies on the CE edges are recommended, as illustrated later
in this lesson.
Service Provider Service-Level Agreements
End-to-end QoS is like a chain that is only as strong as the weakest link. Therefore, it is
essential for enterprises (with converged networks) subscribing to MPLS VPN services to
choose service providers that can provide the required SLAs for their converged networks. For
example, these are the end-to-end SLA requirements of voice and interactive video:
2009 Cisco Systems, Inc. QoS Best Practices 9-95
No more than 150 ms of one-way latency from mouth to ear (per ITU G.114 standard)
No more than 30 ms of jitter
No more than 1 percent loss
As a subset of the trip, the service provider component of the SLA must be considerably
tighter. These SLAs are defined for Cisco-Powered Networks-IP Multiservice Service
Providers:
No more than 60 ms of one-way latency from edge to edge
No more than 20 ms of jitter
No more than 0.5 percent loss
The figure illustrates the interrelationship of these SLAs.
To achieve such end-to-end SLAs, enterprise customers (managing CEs) and service providers
(managing PEs and core Ps) must cooperate and be consistent in classifying, provisioning, and
integrating their respective QoS designs. To this end, various mapping models have been
developed to integrate enterprise requirements into service-provider solutions.
Enterprise-to-Service Provider Mapping Models
Most service providers offer only a limited number of classes within their MPLS VPN clouds.
At times, this might require enterprises to collapse the number of classes that they have
provisioned to integrate into the QoS models of their service providers. For information on how
best to collapse and integrate enterprise classes into various service-provider QoS models, refer
to Module 9, Lesson 1.
9-96 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 44
Provider Edge QoS Considerations
There are two unique considerations for PE QoS design:
Service Provider-to-Enterprise Models: The PE edges facing customer CEs are
complementary to the enterprise-to-service provider mapping models.
Three-Class Provider-Edge Model (PE Design): Real-Time, Critical Data, and
Best-Effort
Four-Class Provider-Edge Model (PE Design): Fourth class for Bulk (High-
Throughput) Data or Streaming-Video added to three-class model
Five-Class Provider-Edge Model (PE Design): Fifth class added for Bulk Data
or Video
MPLS DiffServ Tunneling Modes: Allow you to preserve Layer 3 DiffServ markings
through a service provider MPLS VPN cloud while still performing re-marking (via
MPLS EXP bits) within the cloud to indicate in- or out-of-contract traffic. There are
three modes of MPLS DiffServ tunneling:
Uniform Mode
Short Pipe Mode
Pipe Mode

PE designs are relevant for service providers and for enterprises that are self-managing their
own MPLS VPNs. There are two unique considerations for PE QoS design:
Service provider-to-enterprise models
MPLS DiffServ tunneling modes
Service Provider-to-Enterprise Models
The PE edges facing customer CEs are complementary to the enterprise-to-service provider
mapping models discussed previously.
Three-Class Provider-Edge Model (PE Design): In this model, the service provider
offers three classes of service: real-time (strict priority, available in 5-percent increments),
critical data (guaranteed bandwidth), and best-effort. The admission criterion for the real-
time class is either DSCP EF or CS5; the admission criterion for critical data is DSCP CS6
(for customer routing traffic), AF31, or CS3. All other code points are re-marked to 0 by an
ingress policer. Additionally, service-provider policers can re-mark out-of-contract AF31
traffic down to AF32, which results in a higher drop preference because DSCP-based
WRED is enabled on this class.
Four-Class Provider-Edge Model (PE Design): Building on the previous model, a fourth
class is added to this SP model, which can be used for either bulk data or streaming video.
The admission criterion for this new class is either DSCP AF21 or CS2. Out-of-contract
AF21 traffic offered to this class can be marked down to AF22.
Five-Class Provider-Edge Model (PE Design): Building again on the previous model, a
fifth class is added that can be used for either bulk data or video (whichever was not used
under the four-class model).
2009 Cisco Systems, Inc. QoS Best Practices 9-97
Note For more information on the provider edge mapping models, refer to Module 9, Lesson 1 of
this course and to the MPLS VPN QoS Design section of the Enterprise QoS Solution
Reference Network Design Guide on Cisco.com.
MPLS DiffServ Tunneling Modes
Some service providers re-mark packets at Layer 3 to indicate whether traffic is in contract or
out-of-contract. Although this conforms to DiffServ standards, such as RFC 2597, this is not
always desirable from the standpoint of the enterprise customer. Because MPLS labels include
3 bits that commonly are used for QoS marking, it is possible to tunnel DiffServ, that is,
preserve Layer 3 DiffServ markings through a service provider MPLS VPN cloud while still
performing re-marking (via MPLS EXP bits) within the cloud to indicate in- or out-of-contract
traffic. RFC 3270 defines three distinct modes of MPLS DiffServ tunneling; each is discussed
further in the following pages:
Uniform Mode
Short Pipe Mode
Pipe Mode
9-98 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 45
MPLS DiffServ Tunneling Modes
Three modes of interaction defined between markings:
Uniform mode:
EXP value is changed in the provider core. At the egress PE,
subscriber DSCP/ToS field values are altered. Subscriber will
have to reset the original value on the CE device.
Pipe mode:
Provider uses own EXP values including egress-PE-CE link but
does not alter subscriber DSCP/ToS values. Subscribers receive
traffic with their original DSCP/ToS marked values.
Short pipe mode:
Provider changes EXP values in the core, but honors subscriber
DSCP/ToS values on the egress-PE-CE link. Subscribers receive
traffic marked with the original DSCP/ToS value.
MPLS
Core
IP IP
P2 PE2 P1 PE1 CE2 CE1

As described in previous examples, some service providers re-mark packets at Layer 3 to
indicate whether traffic is in contract or out of contract. Although this conforms to DiffServ
standards, such as RFC 2597, this is not always desirable from the standpoint of an enterprise
customer.
Because MPLS labels include 3 bits that commonly are used for QoS marking, it is possible to
"tunnel DiffServ"that is, preserve Layer 3 DiffServ markings through a service provider
MPLS VPN cloud while still performing re-marking (via MPLS EXP bits) within the cloud to
indicate in- or out-of-contract traffic.
RFC 3270 defines the following modes of MPLS DiffServ tunneling:
Uniform mode
Short pipe mode
Pipe mode
2009 Cisco Systems, Inc. QoS Best Practices 9-99
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 46
Uniform Mode
MPLS
Core
P PE P PE CE CE
Packet initially
marked to
IPP3/DSCP AF31
Direction of Traffic Flow
IPP3/DSCP AF31
IPP3/DSCP AF31
IPP3/DSCP AF31
MPLS EXP 3 MPLS EXP 3
By default, IPP
values copied to
MPLS EXP labels
Assume that a policer re-marks
out-of-contract traffic topmost
label to MPLS EXP 0 here.
Topmost label
popped and EXP
value copied to
underlying label
Topmost label
marked down by a
policer
MPLS EXP
value copied
to IP ToS byte
MPLS EXP 0 MPLS EXP 0 IPP3/DSCP AF31 MPLS EXP 3 IPP0/DSCP 0

Uniform mode generally is utilized when the customer and service provider share the same
DiffServ domain, as in the case of an enterprise deploying its own MPLS VPN core.
In uniform mode, which is the default mode, the first 3 bits of the IP ToS field (IP Precedence
bits) automatically are mapped to the MPLS EXP bits on the ingress PE as labels are pushed
onto the packets.
If policers or any other mechanisms re-mark the MPLS EXP values within the MPLS core,
these marking changes are propagated to lower-level labels and eventually are propagated to
the IP ToS field (MPLS EXP bits are mapped to IP precedence values on the egress PE). The
figure shows the behavior of uniform mode MPLS DiffServ tunneling.
The mapping of IP precedence to MPLS EXP is performed by default on PEs for customer-to-
provider traffic. However, for provider-to-customer egress traffic (from the MPLS VPN cloud),
additional configuration is required on the PE to achieve mapping of MPLS EXP to IP
precedence. This is because the final label is popped (and discarded) when it is received from
the MPLS VPN cloud and, therefore, cannot be used as a match criterion for policies applied to
the egress interface of the final PE router (facing the destination CE). The solution is to copy
the final MPLS EXP bit values to a temporary placeholder on PE ingress from the MPLS core
(before the label is discarded) and then use these temporary placeholder values for setting the
IP precedence bits on egress to the customer CE.
Cisco IOS Software provides two such temporary placeholders, the QoS group and the discard
class. For uniform mode scenarios, it is recommended to copy the MPLS EXP values to QoS
group values on ingress from the MPLS VPN cloud. (The discard class is recommended for use
in pipe mode scenarios only.) Then QoS group values can be copied to IP precedence values
(on egress to the customer CE).
Note For more information on MPLS VPNs, please refer to the MPLS VPN QoS Design section
of the Enterprise QoS Solution Reference Network Design Guide on Cisco.com.
9-100 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 47
Short Pipe Mode
MPLS
Core
P PE P PE CE CE
Packet initially
marked to
IPP3/DSCP AF31
Direction of traffic flow
IPP3/DSCP AF31
IPP3/DSCP AF31
IPP3/DSCP AF31
MPLS EXP 4 MPLS EXP 4
MPLS EXP values
set independently
from IPP/DSCP
values
Topmost label
popped and EXP
value copied to
underlying label
Topmost label
marked down by a
policer
Original
customer-
marked IP
ToS values
preserved
MPLS EXP 0 MPLS EXP 0 IPP3/DSCP AF31 MPLS EXP 4 IPP3/DSCP AF31
Shaded area = Provi der
Di ffServ domain
Assume that a policer
remarks out-of-contract
traffic topmost label to
MPLS EXP 0 here.
Unshaded areas = Customer
Di ffServ domain
PE Edge (to CE)
pol icies based on
customer markings

Short-pipe mode is utilized when the customer and service provider are in different DiffServ
domains. (The DiffServ domain of the service provider begins at the ingress interface of the
ingress PE and terminates on the ingress interface of the egress PE.)
This mode is useful when the service provider wants to enforce its own DiffServ policy and the
customer requests that its DiffServ information be preserved through the MPLS VPN cloud.
Short-pipe tunneling mode provides DiffServ transparency through the service provider
network.
The outmost label is utilized as the single most meaningful information source as it relates to
the service provider QoS PHB. On MPLS label imposition, the IP classification is not copied
into the EXP of the outermost label. Instead, the value for the MPLS EXP is set explicitly on
the ingress interface of the ingress PE, according to the administrative policies of the service
provider.
In the case of any re-marking occurrence within the service provider MPLS VPN cloud,
changes are limited to MPLS EXP re-marking only and are not propagated down to the ToS
byte of the underlying IP packet. The figure shows the operation of short-pipe mode MPLS
DiffServ tunneling.
MPLS EXP values can be marked in any way that the provider wants to provide local
significance.
2009 Cisco Systems, Inc. QoS Best Practices 9-101
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 48
Pipe Mode
MPLS
Core
P PE P PE CE CE
Packet initially
marked to
IPP3/DSCP AF31
Direction of traffic flow
IPP3/DSCP AF31
IPP3/DSCP AF31
IPP3/DSCP AF31
MPLS EXP 4 MPLS EXP 4
MPLS EXP values
set independently
from IPP/DSCP
values
Topmost label
popped and EXP
value copied to
underlying label
Topmost label
marked down by
a policer
Original
customer-
marked IP
ToS values
preserved
MPLS EXP 0 MPLS EXP 0 IPP3/DSCP AF31 MPLS EXP 4 IPP3/DSCP AF31
Shaded area = Provi der
Di ffServ domain
Assume that a policer
remarks out-of-contract
traffic topmost label to
MPLS EXP 0 here.
Unshaded areas = Customer
Di ffServ domain
PE Edge to CE
pol icies based on
provider markings

Like short-pipe mode, pipe mode provides DiffServ transparency through the service provider
network. The main difference between short-pipe mode and pipe mode MPLS DiffServ
tunneling is that the PE egress policies (toward the customer CEs) are provisioned according to
the explicit markings and re-markings of the service provider, not the IP DiffServ markings of
the enterprise customer (although these are preserved). As with short-pipe mode, any changes
to label markings that occur within the service provider cloud do not get propagated to the IP
ToS byte when the packet leaves the MPLS network.
Because egress PE-to-CE QoS policies in pipe-mode are dependent on the last MPLS EXP
value, this value must be preserved before the final label is popped. A temporary placeholder
(as used in uniform mode operation) is again required. On the final PE router in a given path,
the MPLS EXP value is copied to the QoS Group value. Optionally, a discard class value also
might set drop preference at the same time. Thereafter, egress queuing or dropping policies are
performed based on these QoS group and discard class values. The figure illustrates the pipe
mode MPLS DiffServ tunneling operation.
QoS groups and discard classes can be combined to provide virtual DiffServ PHB
classification. For example, RFC 2597 assured-forwarding PHBs can be mimicked using QoS
group values 1 through 4 (to represent the AF class) coupled with discard class values 1
through 3 (to represent the drop preference). In general, QoS Group and discard class values are
arbitrary and have only local significance. However, an exception is found when WRED is
configured to selectively drop based on discard class values, in which case the lower discard
class values are dropped first (by default). If no discard class value is assigned explicitly, the
value defaults to 0.
9-102 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 49
Pipe and Hose Models
Access bandwidth is a commodity that can be defined in two ways:
Pipe model: point-to-point bandwidth
Hose model: defines point to multipoint commodity for VPN QoS
The hose model is specified in terms of ingress committed rate (ICR) and
egress committed rate (ECR).
If access bandwidth costs dominate, normally ICR = ECR
Pipe Model
VPN_A
site 1
VPN_A
si te 1
VPN_A
site 3
VPN_A
si te 4
VPN_A
site 2
Customer
pipe =
Service Provider
Network
Hose Model
Service Provider
Core IP / MPLS
Network
ECR
1 Mb/s
VPN_A
site 1
ICR
1 Mb/s
ICR
256 kb/s
ICR
512 kb/s
VPN_A
site 3
ICR
512 kb/s
ECR
512 kb/s
ECR
256 kb/s
VPN_A
site 4
VPN_A
site 2
ECR
512 kb/s

There are two models used in the context of MPLS VPNs that refer to how QoS guarantees are
offered.
Point-to-point (pipe model)
Point-to-cloud (hose model)
In the point-to-point model, VPN sites have specific QoS guarantees to other VPN sites. In a
VPN with three sites, each site will have specific QoS guarantees to the other two sites that
belong to the VPN. This approach can be used to offer hard QoS guarantees equivalent to the
guarantees available with ATM or Frame Relay.
In the point-to-cloud model, each site receives a single QoS guarantee for traffic sent to and
received from all other VPN sites. Two parameters are defined for this purpose, ingress
committed rate (ICR) and egress committed rate (ECR). In a VPN with three sites, each site
will have a single QoS guarantee for all incoming traffic (regardless of the traffic source) and
all outgoing traffic (regardless of the traffic destination).
These two models are not mutually exclusive. A service provider can offer VPN services to a
customer where some sites have a hard (point-to-point) guarantee to some other sites while yet
other sites have just a soft (point-to-cloud) guarantee.
2009 Cisco Systems, Inc. QoS Best Practices 9-103
QoS Recommendation Summary
This topic summarizes the recommendations for end-to-end QoS.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 50
Enterprise Medianet QoS Design
Medianet Services
Call Agent(s)
QoS-Enabled, High-Availability Network Desi gn
Branch
MAN/WAN, Metro
Ethernet, SONET,
DWDM/CWDM
Campus Data Center
Clients
Media Endpoint
Media
Content
User
Interface
Media I/O
C
o
d
e
c
Access Services
Identi ty Services
Confi denti al ity
Mobility Services
Location/Context
Transport Servi ces
Packet Del ivery
Qual ity of Service
Session Admissi on
Optimization
Bridging Services
Conferencing
Transcoding
Recording
Storage Services
Capture/Storage
Content Mgmt
Di stributi on
Call Agent(s)
Session Control Services
Session/Border Controllers Gateways

As media applications increase on the IP network, QoS will play a progressively vital role to
ensure the required service level guarantees to each set of media applications, all without
causing interference to each other. Therefore, the QoS strategies must be consistent at each
place in the network, including the campus, data center, branch WAN/MAN/VPN, and branch.
Integration will play a key role in two ways. First, media streams and endpoints will be
increasingly leveraged by multiple applications. For example, desktop video endpoints may be
leveraged for desktop video conferencing, web conferencing, and for viewing stored streaming
video for training and executive communications.
Additionally, many media applications will require common sets of functions, such as
transcoding, recording, and content management. To avoid duplication of resources and higher
implementation costs, common media services need to be integrated into the IP network so they
can be leveraged by multiple media applications.
Furthermore, because of the effectiveness of multimedia communication and collaboration, the
security of media endpoints and communication streams becomes an important part of the
media-ready strategy. Access controls for endpoints and users, encryption of streams, and
securing content files stored in the data center are all part of a required comprehensive media
application security strategy.
9-104 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Finally, as the level of corporate intellectual property migrates into stored and interactive
media, it is critical to have a strategy to manage the media content, setting and enforcing clear
policies, and having the ability to protect intellectual property in secure and managed systems.
Just as companies have policies and processes for handling intellectual property in document
form, they also must develop and update these policies and procedures for intellectual property
in media formats.
Therefore, to meet all these media application requirements, Cisco recommends a medianet
architecture. A medianet is built upon an architecture that supports the different models of
media applications and optimizes their delivery, such as those shown in the architectural
framework in the figure.
An enterprise medianet framework starts with and end-to-end QoS-enabled network
infrastructure designed and built to achieve high availability, including the data center, campus,
WAN, and branch office networks. The network provides a set of services to video
applications, including:
Access services: Provide access control and identity of video clients, as well as mobility
and location services.
Transport services: Provide packet delivery, ensuring the service levels with QoS and
delivery optimization.
Bridging services: Provide transcoding, conferencing, and recording services.
Storage services: Provide content capture, storage, retrieval, distribution, and management
services.
Session control services: Provide signaling and control to setup and tear-down sessions, as
well as gateways.
When these media services are made available within the network infrastructure, endpoints can
be multi-purpose and rely upon these common media services to join and leave sessions for
multiple media applications. Common functions such as transcoding and conferencing different
media codecs within the same session can be deployed and leveraged by multiple applications,
instead of being duplicated for each new media application.
2009 Cisco Systems, Inc. QoS Best Practices 9-105
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 51
Enterprise Medianet QoS
Recommendations
Cisco IP Video Surveillance
Signaling
Ops/Admin/Maint (OAM)
Transactional Data
Bul k Data
Network Control
Multimedia Streaming
Multimedia Conferencing
Broadcast Video
VoIP Telephony
Application Cl ass
Real -Time Interactive
Best Effort
Scavenger
EF
CS1
AF2
AF1
DF
CS2
CS3
CS6
AF3
AF4
CS5
CS4
Per Hop
Behavior
Admission
Control
Required
Recommended
Required
Required
Required
Priority Queue (PQ)
Queuing and Droppi ng
Optional (PQ)
Optional (PQ)
BW Queue + DSCP WRED
BW Queue
BW Queue + DSCP WRED
BW Queue
BW Queue
BW Queue + DSCP WRED
BW Queue + DSCP WRED
Default Queue + RED
Min BW Queue
Media Application Examples
Cisco IP Phones (G.711,G.729)
Cisco Uni fied Personal
Communicator
Cisco TelePresence
Cisco Di gital Media System
SCCP, SIP, H.323
EIGRP, OSPF, IKE
Cisco WebEx, Meeting Place
SNMP, SSH, Syslog
Emai l, FTP, Backup Apps
Default Class
YouTube, iTunes, Xbox Live

The 12 classes of applications within this enterprise medianet QoS model, which have unique
service level requirements and thus require explicit QoS PHBs, are outlined as follows:
VoIP telephony
Broadcast video
Real-time interactive
Multimedia conferencing
Network control
Signaling
Operation, Administration, and Management (OAM)
Transactional data and low-latency data
Bulk data and high-throughput data
Best effort
Scavenger and low-priority data
Note For further information on the enterprise medianet QoS model, refer to the Enterprise
Medianet Quality of Service Design 4.0 Overview on Cisco.com.
9-106 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 52
QoS Recommendation Summary
Always deploy QoS in hardware whenever possible.
Mark as close to the source as possible with standards-based DSCP
values.
Police as close to the source as possible.
Markdown according to standards-based rules.
Deploy queuing policies on all network nodes.
Optimally assign each medianet class a dedicated queue.
Limit strict-priority queuing to 33% of link-capacity whenever
possible.
Provision at least 25% of the capacity of a link for best effort
applications.
Provision a minimal queue (such as 1%) for the scavenger
applications class.
Enable control plane policing on platforms that support this feature.
Deploy data plane policing (scavenger-class QoS) polices whenever
possible.

The following design principles can help simplify strategic QoS deployments:
Hardware versus Software QoS
A fundamental QoS design principle is to always enable QoS policies in hardware rather than
software whenever a choice exists. Cisco Catalyst switches perform QoS in dedicated hardware
ASICS on Ethernet-based ports and therefore do not tax their main CPUs to administer QoS
policies. This allows complex policies to be applied at line rates at even gigabit or ten-gigabit
speeds.
Classification and Marking Best Practices
When classifying and marking traffic, a recommended design principle is to classify and mark
applications as close to their sources as technically and administratively feasible. This principle
promotes end-to-end differentiated services and PHBs.
In general, it is not recommended to trust markings that can be set by users on their PCs or
other similar devices, because users can easily abuse provisioned QoS policies if permitted to
mark their own traffic. On the other hand, if enterprise controls are in place that centrally
administer PC QoS markings, then it may be possible and advantageous to trust these.
Following this rule, it is further recommended to use DSCP markings whenever possible,
because these are end-to-end, more granular, and more extensible than Layer 2 markings.
2009 Cisco Systems, Inc. QoS Best Practices 9-107
Policing and Markdown Best Practices
It is recommended to police traffic flows as close to their sources as possible. This principle
applies also to legitimate flows, because worm-generated traffic can masquerade under
legitimate, well-known TCP and UDP ports and cause extreme amounts of traffic to be poured
onto the network infrastructure. Such excesses should be monitored at the source and marked
down appropriately. Whenever supported, markdown should be done according to standards-
based rules, such as RFC 2597 (AF PHB).
Queuing and Dropping Best Practices
Critical media applications require service guarantees regardless of network conditions. The
only way to provide service guarantees is to enable queuing at any node that has the potential
for congestion. This principle applies not only to campus-to-WAN and VPN edges, where
speed mismatches are most pronounced, but also to campus interswitch links, where
oversubscription ratios create the potential for congestion. There is simply no other way to
guarantee service levels than by enabling queuing wherever a speed mismatch exists.
Additionally, because each medianet application class has unique service level requirements,
each should optimally be assigned a dedicated queue. However, on platforms bounded by a
limited number of hardware or service provider queues, no fewer than four queues would be
required to support medianet QoS policies, specifically:
Real-time queue (to support a RFC 3246 EF PHB service)
Guaranteed-bandwidth queue (to support RFC 2597 AF PHB services)
Default queue (to support a RFC 2474 DF service)
Bandwidth-constrained queue (to support a RFC 3662 Scavenger service)
Strict-Priority Queuing Recommendations: The 33% LLQ Rule
If the majority of bandwidth is provisioned with strict priority queuing (which is effectively a
FIFO queue), the overall effect is a dampening of QoS functionality, both for latency and jitter
sensitive real-time applications (contending with each other within the FIFO priority queue)
and also for non-real-time applications (as these may periodically receive wild bandwidth
allocation fluctuations, depending on the instantaneous amount of traffic being serviced by the
priority queue). Any traffic assigned to a strict-priority queue should be governed by an
admission-control mechanism.
Best-Effort Queuing Recommendation
Because most enterprises have several thousand applications running over their networks,
adequate bandwidth must be provisioned for this class as a whole in order to handle the sheer
number and volume of applications that default to it. Therefore, it is recommended to reserve at
least 25 percent of link bandwidth for the default best-effort class.
Scavenger Class Queuing Recommendations
Whenever scavenger queuing class is enabled, it should be assigned a minimal amount of
bandwidth, such as 1 percent (or whatever the minimal bandwidth allocation that the platform
supports). On some platforms, queuing distinctions between bulk data and scavenger traffic
flows cannot be made. In such cases, the scavenger/bulk queue can be assigned a moderate
amount of bandwidth, such as 5 percent.
9-108 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 53
Summary
An SLA stipulates the delivery and pricing of numerous service
levels. SLAs cover an assortment of data services such as Frame
Relay, leased lines, Internet access, web hosting, etc.
There are QoS requirements for different traffic types. Both the
enterprise and the service provider must implement the proper QoS
mechanisms to provide end-to-end QoS.
These QoS design principles are important when deploying campus
QoS policies:
Classify and mark applications as close to their sources as
technically and administratively feasible.
Police unwanted traffic flows as close to their sources as possible.
Always perform QoS in hardware rather than software when a
choice exists.
You should enforce trust boundaries as close to the endpoints as
technically and administratively possible; the definition of the trust
boundary depends on the capabilities of the endpoints that are being
connected to the access edge of the LAN.


2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 54
Summary (Cont.)
On WAN edges, queuing policies, shaping policies, selective
dropping policies, and link-efficiency policies are typically
required.
For the most part, QoS design recommendations for WAN
aggregators also apply to branch routers located at the far end of
the WAN links; however, there are a few unique considerations for
branch router QoS design.
The service provider IP core is used to provide high-speed packet
transport. Therefore, all markings, policing, and shaping should
be performed only at the PE router on the PE-to-CE link and not
at the core. Using the DiffServ model, only the edge requires
complex QoS policy. At the core, only queuing and WRED are
required. The operation of queuing and WRED will be based on
the markings done at the edge (PE).

2009 Cisco Systems, Inc. QoS Best Practices 9-109
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 55
Summary (Cont.)
To achieve end-to-end service levels over MPLS VPNs, enterprise
and service-provider QoS designs must be consistent and
complimentary.
General guidelines for enterprise QoS implementations include the
following:
Deploy QoS in hardware whenever possible.
Mark as close to the source as possible with standards-based
DSCP values.
Police as close to the source as possible.
Markdown according to standards-based rules.
Deploy queuing policies on all network nodes.
Assign each medianet class a dedicated queue.
Limit strict-priority queuing to 33% of link-capacity.
Provision at least 25% of the capacity of a link for best effort
applications.
Provision a minimal queue for the Scavenger applications class.
Use control plane policing and data plane policing.

9-110 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

Lesson 3
Providing QoS for Security
Overview
Denial of service (DoS) and worm attacks are increasing in frequency, complexity, and scope
of damage. Quality of service (QoS) tools and strategic designs can mitigate the effects of
worms and keep critical applications available during DoS attacks. One such strategy, referred
to as scavenger-class QoS, uses a tactical approach to provide anomaly detection and reaction
to DoS resulting from worm attack-generated traffic. This lesson describes how QoS tools can
mitigate DoS attacks through the use of control plane, data plane, and Network-Based
Application Recognition (NBAR) known-worm policing. This lesson does not provide the best
practices in step-by-step configuration, but rather provides the reasons for deploying the
policers.
Objective
Upon completing this lesson, you will be able to describe steps recommended by Cisco to
mitigate DoS attacks and worm attacks using QoS tools. This ability includes being able to
meet these objectives:
Describe tools and tactics used to increase security
Explain how Control Plane Policing can be used to mitigate DoS attacks
Explain how scavenger-class QoS can be used to mitigate DoS and Internet worm attacks
Explain how NBAR can be used to mitigate Internet worms
9-112 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Tools and Tactics for Security
This topic describes the QoS tools that can be used to defend networks.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-2
Impact of an Internet Worm Attack
Worms exploit security vulnerabilities in their targets; carry harmful payloads;
usually include a self-propagat ing mechanism.
Network infrastructure usually not direct target of worm attack but can become
collateral damage.
Rapidly multiplying volume of t raffic flows drowns hardware resources of devices
in their paths, indirectly causing denial of service.
End systems overload:
High CPU
Applications impacted
System
Under
Attack
Distribution
Access
Core
Router overload:
High CPU
Instability
Loss of management
Network links overload:
High packet loss
Media appl ications
impacted

While the primary objective of most QoS deployments is to provision preferential, and
sometimes deferential, service to various application classes, QoS policies can also provide a
additional layer of security to the network infrastructure, especially in the case of mitigating
denial of service (DoS) and worm attacks.
There are two main classes of DoS attacks:
Spoofing attacks: The attacker pretends to provide a legitimate service, but provides false
information or no information to the requester.
Slamming attacks: The attacker exponentially generates and propagates traffic until
service resources such as servers and network infrastructure are overwhelmed.
Spoofing attacks are best addressed by authentication and encryption technologies. Slamming
(also known as "flooding") attacks, on the other hand, can be effectively mitigated through QoS
technologies.
In contrast, worms exploit security vulnerabilities in their targets and carry harmful payloads
that usually include a self-propagating mechanism. Network infrastructure usually is not the
direct target of a worm attack but can become collateral damage as worms exponentially self-
propagate. The rapidly multiplying volume of traffic flows eventually drowns the hardware
resources of routers and switches in their paths, indirectly causing denial of service to
legitimate traffic flows, as shown in the figure.
2009 Cisco Systems, Inc. QoS Best Practices 9-113
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-3
QoS Tools and Tactics for Security
Proactive approach:
Control Plane Policing
Data plane policing (using scavenger class)
Reactive approach:
NBAR for known-worm policing

A reactive approach to mitigating such attacks is to reverse-engineer the worm and set up
intrusion detection mechanisms, ACLs, or NBAR policies to limit its propagation. However,
the increased sophistication and complexity of worms make them harder and harder to separate
from legitimate traffic flows. This exacerbates the finite time lag between when a worm begins
to propagate and when the following events can take place:
Sufficient analysis has been performed to understand how the worm operates and what its
network characteristics are.
An appropriate patch, plug, or ACL is disseminated to network devices that may be in the
path of worm; this task may be hampered by the attack itself, as network devices may
become unreachable for administration during the attacks.
These time lags may not seem long in absolute terms, such as in minutes, but the relative
window of opportunity for damage is huge. For example, in 2003, the number of hosts infected
with the Slammer worm (a Sapphire worm variant) doubled every 8.5 seconds on average,
infecting over 75,000 hosts in just 11 minutes and performing scans of 55 million more hosts
within the same time period.
A proactive approach to mitigating DoS and worm attacks within enterprise networks is to have
control plane policing and data plane policing policies in place within the infrastructure which
immediately respond to out-of-profile network behavior indicative of DoS or worm attacks.
Control Plane Policing serves to protect the CPU of network devices such as switches and
routers from becoming bogged down with interruption-handling and thus not having enough
cycles to forward traffic. Data plane policing (also referred to as Scavenger-class QoS) protects
link bandwidth from being consumed by forwarding DoS worm traffic.
9-114 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Control Plane Policing
This topic explains how Control Plane Policing can be used to increase network security.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-4
Control Plane Policing
The route processor handles routing updates,
keepalives, and network management traffic
(control and management plane traffic).
Control Plane Poli cing protects the route
processor.
Uses a dedicated control plane
configuration to provide filteri ng and rate
limiting for control plane packets
Configured via the Modular QoS CLI
(MQC)
Helps ensure router and network stability
during attacks
Packets destined for the control plane are
subj ect to control plane policy checking.
Recommendation: Deploy Control Plane
Policing on all routers and switches that
support it.
Steps for properly defining a Control Plane
Policing policy:
Define liberal pol icies that permit most
traffic.
Monitor traffic pattern stati stics collected
by the liberal policy.
Use the statistics gathered to tighten the
control plane policies.
Interrupt Level Feature
Checks and Switching
Input Interface Output Int erface
Process Level
Control Plane
Services

A router or switch can be logically divided into four functional components or planes:
Data plane
Management plane
Control plane
Services plane
The vast majority of traffic travels through the router via the data plane. However the route
processor must handle certain packets, such as routing updates, keepalives, and network
management. This is often referred to as control and management plane traffic.
Because the route processor is critical to network operations, any service disruption to the route
processor or the control and management planes can result in business-impacting network
outages. A DoS attack targeting the route processor, which can be perpetrated either
inadvertently or maliciously, typically involves high rates of traffic that result in excessive CPU
utilization on the route processor itself. This type of attack, which can be devastating to
network stability and availability, may display the following symptoms:
Route processor CPU utilization is high. (near 100 percent)
Line protocol keepalives and routing protocol updates are lost, leading to route flaps and
major network transitions.
Interactive sessions via the Command Line Interface (CLI) are slow or completely
unresponsive due to high CPU utilization.
2009 Cisco Systems, Inc. QoS Best Practices 9-115
Route processor resource exhaustionresources such as memory and buffers are
unavailable for legitimate IP data packets
Packet queue backup, which leads to indiscriminate drops (or drops due to lack of buffer
resources) of other incoming packets
Control Plane Policing addresses the need to protect the control and management planes,
ensuring routing stability, availability, and packet delivery. It uses a dedicated control plane
configuration via the Modular QoS CLI (MQC) to provide filtering and rate limiting
capabilities for control plane packets.
The figure illustrates the flow of packets from various interfaces. Packets destined to the
control plane are subject to control plane policy checking, as depicted by the control plane
services block.
By protecting the route processor, Control Plane Policing helps ensure router and network
stability during an attack. For this reason, a best-practice recommendation is to deploy Control
Plane Policing as a key protection mechanism on all routers and switches that support it.
To successfully deploy Control Plane Policing, the existing control and management plane
access requirements must be understood. While it can be difficult to determine the exact traffic
profile required to build the filtering lists, the following summarizes the recommended steps
necessary to properly define a Control Plane Policing policy:
1. Start the deployment by defining liberal policies that permit most traffic.
2. Monitor traffic pattern statistics collected by the liberal policy.
3. Use the statistics gathered in the previous step to tighten the control plane policies.
9-116 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-5
Control-Plane Policing Example




The example in the figure shows how to apply a QoS policy for aggregate control plane
services to Telnet traffic that is received on the control plane. Trusted hosts with source
addresses 10.1.1.1 and 10.1.1.2 are allowed to forward Telnet packets to the control plane
without constraint; all other Telnet packets are policed at the specified rate.
In this example, the access-list commands that make up ACL 140 identify all Telnet traffic
except Telnet traffic from trusted hosts 10.1.1.1 and 10.1.1.2. The class-map command defines
a class-map called TELNET-CLASS, which is configured to match ACL 140. ACL 140 traffic
is then associated with the policing action in policy-map CONTROL-PLANE-IN. The control-
plane command enters control-plane configuration mode where the service-policy command is
used to apply the CONTROL-PLANE-IN policy for aggregate control plane services to all
packets that are entering the control plane from all line cards in the router.
Note The use of the deny rule in access lists used in MQC is somewhat different from regular
interface ACLs. Packets that match a deny rule are excluded from that class. This is in
contrast to packets matching a permit rule, which are included in that class.
2009 Cisco Systems, Inc. QoS Best Practices 9-117
Data Plane Policing
This topic describes how to use policing and the scavenger class to protect the data plane.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-6
Scavenger-Class QoS Recommendations
Profile applications to determine what constitutes normal as opposed to abnormal
flows, within a 95% confidence interval.
Contain abnormal flows by deploying campus access edge policers to re-mark
abnormal traffic to scavenger (CS1).
Whenever possible, also deploy a second line of policing defense at the
distribution layer.
Enforce deferential scavenger-class queuing policies throughout the network.
Implement an integrated network security architecture.
Access-edge policers remark
abnor mal flows but do not dr op.
Campus queuing
pol icies include a
scavenger class.
WAN queuing
policies include a
scavenger class.

The logic applied to protecting the control plane can also be applied to the data plane. Data
plane policing (scavenger-class QoS) has two components, as illustrated in the figure:
Campus access-edge policers that meter traffic flows from endpoint devices and remark
abnormal flows to CS1, the scavenger marking value.
Queuing policies on all nodes that include a deferential service class for scavenger traffic.
To implement data plane policing, you must first profile applications to determine what
constitutes normal as opposed to abnormal flows, within a 95 percent confidence interval.
Thresholds demarking normal and abnormal flows vary from enterprise to enterprise and from
application to application. Beware of over-scrutinizing traffic behavior because this could
exhaust time and resources and could easily change daily. Remember, legitimate traffic flows
that temporarily exceed thresholds are not penalized by the data plane policing strategy. Only
sustained, abnormal streams generated simultaneously by multiple hosts (highly indicative of
DoS or worm attacks) are subject to aggressive dropping only after legitimate traffic has been
serviced.
To contain such abnormal flows, deploy campus access edge policers to remark abnormal
traffic to scavenger (CS1). Additionally, whenever possible, deploy a second line of policing
defense at the distribution layer. To complement these remarking policies, enforce deferential
scavenger class queuing policies throughout the network.
9-118 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
It is important to recognize the distinction between mitigating an attack and preventing it
entirely. Control plane policing and data plane policing policies do not guarantee that DoS or
worm attacks will never happen, but serve only to reduce the risk and the impact that such
attacks could have on the network infrastructure. Therefore, it is vital to overlay a
comprehensive security strategy on the QoS-enabled network infrastructure.
2009 Cisco Systems, Inc. QoS Best Practices 9-119
NBAR Worm Policing
This topic describes the use of NBAR to suppress worm attacks.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-7
NBAR Worm Policing
Branch routers are a strategic place to deploy NBAR policies for identification and
policing of worms.
A worm is a self-contained program that attacks a system and tries to exploit a
vulnerability in the target. Upon successfully exploiting the vulnerability, the worm
copies its program from the attacking host to the newly exploited system to begin
the cycle again.
NBAR policies can be used to identify and drop known worms such as
Code Red
NIMDA
SQL Slammer
RPC DCOM/W32/MS Blaster
Sasser
NBAR policies can also be used to identify new worms that may be released in the
future.
After traffic generated by known worms has been positively identified, it should not
be re-marked or limited; it should be dropped immediately.
Branch
router
Branch
switch

Branch routers are a strategic place to deploy NBAR policies for worm identification and
policing. NBAR policies can be used to identify and drop Code Red, NIMDA, SQL Slammer,
RPC DCOM/W32/MS Blaster, Sasser, and other known worms. NBAR policies can also be
used to identify new worms that may be released in the future.
Typically, worms are self-contained programs that attack a system and try to exploit a
vulnerability in the target. Upon successfully exploiting the vulnerability, the worm copies its
program from the attacking host to the newly exploited system to begin the cycle again.
Note A virus, which is slightly different from a worm, requires a vector to carry the virus code from
one system to another. The vector can be either a word-processing document, an email
message, or an executable program. The main element that distinguishes a worm from a
virus is that a computer virus requires human intervention to facilitate its spreading, whereas
worms (once released) propagate without requiring additional human intervention.
Worms are comprised of three primary components:
The enabling exploit code: The enabling exploit code is used to exploit a vulnerability on
a system. Exploitation of this vulnerability provides access to the system and the capability
to execute commands on the target system.
A propagation mechanism: When access has been obtained through the enabling exploit,
the propagation mechanism is used to replicate the worm to the new target. The method
used to replicate the worm can be achieved through the use of the Trivial File Transfer
Protocol (TFTP), FTP, or another communication method. When the worm code is brought
to the new host, the cycle of infection can be started again.
9-120 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
A payload: Some worms also contain payloads, which might include additional code to
further exploit the host, modify data on the host, or change a web page. A payload is not a
required component, and, in many cases, the worm's enabling exploit code itself can be
considered the payload.
Some worms use unique TCP and UDP ports to propagate. These types of worms are fairly
simple to block using access lists (when the ports are known). Such ACLs can be configured on
the branch switch (whenever supported) or on the LAN edge of the branch router.
Other worms hijack legitimate TCP and UDP ports to carry their harmful payloads. For these
latter types of worms, NBAR can be used at the branch LAN edge to perform deep-packet
analysis and drop any packets that are carrying the payloads of known worms. Code Red,
NIMDA, SQL Slammer, RPC DCOM/W32/MS Blaster, and Sasser are examples of known
worms.
2009 Cisco Systems, Inc. QoS Best Practices 9-121
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-8
8888
Example: NBAR Versus Code Red
First released in May 2001
Exploited a vulnerability in Microsoft IIS and infected 360,000 hosts in
14 hours
Several strains (CodeRed, CodeRedv2,
CodeRed II, Code Redv3, CodeRed.C.)
Newer strains replaced home page of web
servers and caused DoS flooding attacks
Attempts to access a file
with .ida extension

NBAR Versus Code Red
First released in July 2001, Code Red targeted Microsoft Internet Information Server (IIS)
using a vulnerability in the IIS Indexing Service. Although the first variant of this worm did
little damage because of a flaw in the random number-generator code used to generate
addresses of hosts to exploit, a second variant appeared with the flaw fixed.
This worm, CodeRedv2, spread quickly and became the most widespread and damaging worm
to hit the Internet since the Morris worm. The success of CodeRedv2 as a worm relied on the
fact that the worm exploited the vulnerability in the IIS Indexing Service only as a means of
gaining access to the host. This, coupled with the wide deployment of IIS as well as the large
number of unpatched IIS web servers, contributed to the quick and wide-ranging spread of the
worm. An estimated 360,000 hosts were infected within a period of 14 hours.
CodeRedv2 temporarily replaced the home page of the web servers that it struck with a new
page. Additionally, the code of the worm indicated that it was programmed to begin a packet-
flooding DoS attack against a hard-coded IP address. (At the time, this was the IP address of
the White House web server at http://www.whitehouse.gov.)
The initial infection attempt sends a large HTTP GET request to the target IIS server. In both
the original Code Red and CodeRedv2, the GET request looks for a file named default.ida.
However, this filename changes in newer variants, such as CodeRedv3/CodeRed.C. Although
the filename has changed, the .ida suffix remains the same.
Code Red variants can include payloads that execute cmd.exe or root.exe functions to program
scripts within the IIS scripts directory, thus providing a ready-made back door to the server for
any attacker to use. Therefore, to combat Code Red, NBAR policies can be configured to check
the payload of HTTP packets for .ida, cmd.exe, and root.exe, as shown in the figure.
9-122 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
NBAR Versus SQL Slammer
In January 2003, a new worm infected the Internet at such a high rate that it was categorized as
a flash worm. This worm, termed SQL Slammer, once again targeted Microsoft Windows
servers; specifically, this worm targeted servers running Microsoft Structured Query Language
(SQL) Server software. The vulnerability exploited by SQL Slammer had been published in
July 2002, and a patch from Microsoft was available at that time as well. Even though this
patch was available for almost six months, SQL Slammer spread with incredibly high
efficiency.
SQL slammer is a 376-byte User Datagram Protocol (UDP)-based worm that infects Microsoft
SQL servers through UDP port 1434. Because of its small size, the SQL Slammer worm is
contained in a single packet. The fast scanning rate of SQL Slammer is achieved not only
because of this small size, but also because the worm is UDP based. The worm does not have to
complete a handshake to connect with a target system.
SQL Slammer reached its full scanning rate of 55 million scans per second within 3 minutes of
the start of the infection and infected the majority of vulnerable hosts on the Internet within 10
minutes of the start of the infection, with an estimated 300,000 infected hosts overall. A major
consequence of such a fast scanning rate was that edge networks were overwhelmed by the
amount of traffic generated by the worm. The doubling rate of SQL Slammer was
approximately 8.5 seconds. In contrast, the doubling rate of CodeRedv2 was about 37 minutes.
SQL Slammer does not carry an additional harmful payload (beyond its enabling exploit code),
and its primary purpose is to cause DoS through exponential self propagation.
NBAR can be used to detect the SQL Slammer worm by mapping a custom PDLM to UDP port
1434 and matching on the packet length (376-byte worm + 8 bytes of UDP header + 20 bytes of
IP header = 404 bytes). This is shown in the following example:




You can use the show policy command and the show ip nbar port-map command to verify
your configuration.
Note For further information on NIMDA, Sasser, and RPC DCOM/W32/MS Blaster, as well as
details on how to configure NBAR policies that identify and drop these known worms, refer
to the Branch Router QoS Design section of the Enterprise QoS Solution Reference
Network Design Guide on Cisco.com.
2009 Cisco Systems, Inc. QoS Best Practices 9-123
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-9
9999
NBAR Versus Future Worms
Future worms are likely to be
More complex
More efficient in their propagation
More damaging
NBAR can identify proprietary applications that otherwise could not be matched.
Example: Fictitious worm called Moonbeam
Scans and propagates itself on randomly-generated TCP ports within the
range of 21000 through 21999; carries the word Moonbeam within the
payload, beginning with the ninth ASCII character of the string
Custom NBAR PDLM can be used to
Examine TCP packets within the range of 21000 through 21999
Offset the scan by 8 ASCII characters
Check for the string "Moonbeam"




There is every reason to believe that new worms will be released in the future. These worms
will be not only more complex, but also more efficient in their propagation, and thus more
damaging in their scope.
An NBAR feature that was introduced in Cisco IOS Software Release 12.3[4]T enables you to
extend the capability of NBAR to classify and monitor additional static port applications or to
allow NBAR to classify unsupported static port traffic. Specifically, it enables you to define the
strings that you want to search for in the application payload in order to identify a given
application. This applies to any application, not just HTTP URLs.
This functionality can be used to identify proprietary applications that otherwise could not be
matched. However, it also can be very useful in plugging holes that future worms might open.
The figure shows an example that uses a fictitious worm called Moonbeam. Moonbeam scans
and propagates itself on randomly generated TCP ports within the range of 21000 through
21999. Furthermore, the worm carries the word Moonbeam within the payload, beginning with
the ninth ASCII character of the string. The payload of Moonbeam might look like the
following:



Moonbeam could be identified by a custom NBAR PDLM that examines TCP packets within
the range of 21000 through 21999, offsets the scan by 8 ASCII characters, and checks for the
string "Moonbeam" (case sensitive), as shown in the figure.
You can use the ip nbar custom command in global configuration mode to create the custom
NBAR PDLM. You can then use the show policy and show ip nbar port-map commands to
verify your configuration. The ip nbar port-map command displays the current protocol-to-
port mappings in use by NBAR.
9-124 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Summary
This topic summarizes the key points discussed in this lesson.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.39- 10
Summary
QoS tools and tactics for mitigating DoS and worm attacks include
the following:
Control Plane Policing
Data plane policing plus scavenger class (Scavenger Class QoS)
NBAR signature of known worms for policing
Control Plane Policing protects the route processor, ensuring routing
stability, availability, and packet delivery.
Data plane policing uses two components to protect the network by
aggressively dropping abnormal traffic flows during congestion:
Campus access-edge policers to meter traffic flows from endpoint
devices and remark abnormal flows to CS1
Queuing policies on all nodes that include a deferential service
class for scavenger traffic
Branch routers are a strategic place to deploy NBAR policies for
identification and policing of known and unknown worms.

2009 Cisco Systems, Inc. QoS Best Practices 9-125
Module Summary
This topic summarizes the key points discussed in this module.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.39-1
Module Summary
QoS best practices include, among others:
Always deploy QoS in hardware whenever possible.
Mark as close to the source as possible wit h standards-based DSCP values.
Police as close to the source as possible.
Deploy queuing policies on all network nodes.
Limit strict-priority queuing to 33% of link capacity whenever possible.
Provision at least 25% of the capacity of a link for best effort applications.
Provision a minimal queue (such as 1%) for the scavenger applications class.
Enable control plane policing on platforms that support this feature.
Deploy data plane policing (scavenger-class QoS) polices whenever possible.
QoS SLA is a key differentiator for service providers. SLAs typically include three
to five classes. Additional classes not visible to customers may exist at the edge
(for example, f or management/traffic control).
Different QoS design options are required for managed versus unmanaged CE.
DiffServ backbone allows support for multiple classes of traffic with different
underprovisioning and overprovisioning ratios per service class.
DiffServ can reduce the bandwidth requirement on the network while achieving the
same SLA when compared to the non-DiffServ case.

When an enterprise network is connected by a service provider that provides Layer 3 IP
services, both the enterprise and the service provider must implement the proper quality of
service (QoS) mechanisms. This is necessary to satisfy the end-to-end QoS requirements of the
different applications running at the enterprise. A key differentiator for service providers when
offering Layer 3 IP services is to offer service level agreements (SLAs) for each of the traffic
classes supported by the service provider. SLAs provide the needed assurance to the enterprise
customers that the service provider network can meet the QoS requirements of the enterprise
applications traversing the service provider network.
This module discusses some of the key best practices for deploying QoS at the enterprise and at
the service provider network. The first lesson of the module includes a baseline traffic
classification recommendation detailing the per-hop behavior (PHB), differentiated services
code point (DSCP), IP precedence, and Layer 2 class of service (CoS) values for some of the
common enterprise traffic types. The traffic classification recommendation serves as a guide for
overall system design and QoS feature implementation.
The second lesson of the module provides a case study illustrating typical QoS implementations
at the enterprise campus LAN, at the WAN edge (customer edge [CE] and provider edge [PE]
routers), and at the service provider core.
Within the enterprise campus LAN, a hierarchical design is required along with proper buffer
management at the LAN switches. Classification and marking should be performed as close to
the source as possible. Class-based policing can be implemented to rate-limit certain non-
business-related applications (like peer-to-peer file-sharing applications, Napster, and so on).
9-126 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
More complex QoS configurations are required at the WAN edge. The QoS configuration
required at the WAN edge CE and PE routers is different depending on whether or not the CE
is managed by the service provider or by the enterprise customer. Low-latency queuing (LLQ)
and class-based weighted fair queuing (CBWFQ) are required for congestion management.
Traffic shaping is required on Frame Relay permanent virtual circuits (PVCs). Link efficiency
mechanisms like link fragmentation and interleaving (LFI) and compressed Real-Time
Transport Protocol (cRTP) are required to improve the WAN link efficiency. Class-based
marking is also required if the enterprise customer traffic classes need to be remapped into the
service provider traffic classes.
At the service provider high-speed core, typically only weighted random early detection
(WRED), LLQ, or modified deficit round robin (MDRR) are required, based on the previous
packet QoS marking. In the service provider core (backbone), two of the design options include
implementing a best-effort backbone with overprovisioning, or implementing a DiffServ
backbone with a different provisioning ratio for each traffic class. By deploying a DiffServ
backbone, service providers can significantly reduce their cost while providing the required
SLAs for their customers.
References
For additional information on Enterprise QoS Design, refer to Cisco Enterprise Quality of
Service Solution Reference Network Design Guide at this URL:
http://www.cisco.com/en/US/docs/solutions/Enterprise/WAN_and_MAN/QoS_SRND/
QoSIntro.html
2009 Cisco Systems, Inc. QoS Best Practices 9-127
Module Self-Check
Use the questions here to review what you learned in this module. The correct answers and
solutions are found in the Module Self-Check Answer Key.
Q1) Which three are QoS requirements for voice? (Choose three.) (Source: Understanding
Traffic Classification Best Practices)
A) latency 150 ms
B) jitter < 30 ms
C) loss 1 percent
D) bandwidth = 80 kbps per call minimum for all codecs
E) retransmit interval 10 ms
Q2) Which two statements are general guidelines for implementing campus QoS? (Source:
Deploying End-to-End QoS)
A) Police unwanted traffic flows as close to their destinations as possible.
B) Classification or marking should be done at the high-speed core layer.
C) Always use NBAR to classify traffic because all Cisco Catalyst switches
support NBAR.
D) Classify and mark applications as close to their sources as technically and
administratively feasible.
E) QoS in the campus is generally not a buffer management issue as much as it is
a bandwidth management issue. Therefore, link efficient mechanisms should
be implemented between the access and distribution layer links.
Q3) Based on the following configuration, which two statements are true? (Choose two.)
(Source: Deploying End-to-End QoS)

















A) The premium traffic class has a maximum bandwidth guarantee equal to 25
percent of the available interface bandwidth.
B) The business traffic class has a maximum bandwidth guarantee equal to 75
percent of the interface bandwidth.
C) The default traffic class has a maximum bandwidth guarantee equal to 25
percent of the interface bandwidth.
D) Tail drop is used on the business traffic class.
E) WRED is used on the premium traffic class.
F) WRED is used on the default traffic class.
9-128 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Q4) The QoS requirements on the CE and PE router differ depending on which factor?
(Source: Deploying End-to-End QoS)
A) whether or not the PE router is managed by the service provider
B) whether or not the CE router is managed by the service provider
C) whether or not the service provider is using an MPLS core
D) the number of traffic classes supported by the service provider
E) the SLAs offered by the service provider
2009 Cisco Systems, Inc. QoS Best Practices 9-129
Module Self-Check Answer Key
Q1) A, B, C
Q2) D
Q3) A, F
Q4) B
9-130 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

QoS
Implementing Cisco
Quality of Service
Version 2.3
Lab Guide
Text Part Number: 97-2813-01
Lab Guide 2009 Cisco Systems, Inc. All Rights Reserved.
DISCLAIMER WARRANTY: THIS CONTENT IS BEING PROVIDED AS IS. CISCO MAKES AND YOU RECEIVE NO WARRANTIES IN
CONNECTION WITH THE CONTENT PROVIDED HEREUNDER, EXPRESS, IMPLIED, STATUTORY OR IN ANY OTHER PROVISION OF
THIS CONTENT OR COMMUNICATION BETWEEN CISCO AND YOU. CISCO SPECIFICALLY DISCLAIMS ALL IMPLIED
WARRANTIES, INCLUDING WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR
PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. This learning product may contain early release
content, and while Cisco believes it to be accurate, it falls subject to the disclaimer above.
Table of Contents
Lab Guide 1
Overview 1
Outline 1
Case Study 2-1: QoS Mechanisms 2
Activity Objective 2
Visual Objective 2
Required Resources 2
Apply QoS Mechanisms 3
Case Study 2-1 Answer Key: QoS Mechanisms 8
Lab 2-1: QoS Lab Setup and Initialization 11
Activity Objective 11
Visual Objective 11
Required Resources 14
Command List 15
Job Aid 16
Task 1: Configure Routers and Switch and Verify Connectivity 16
Task 2: Configure Workgroup Switch for Connectivity 18
Task 3: Verify Network Connectivity 20
Lab 2-1 Answer Key: QoS Lab Setup and Initialization 23
Lab 2-2: Baseline QoS Measurement 26
Activity Objective 26
Visual Objective 26
Required Resources 28
Command List 28
Job Aid 28
Task 1: Baseline Measurement of Network Traffic 28
Task 2: Identify Interface Statistics 29
Task 3: Use Commands and Tools to Gather Network Response Time Data After Both Pagent
and Callgen Traffic Generators Are Sending Traffic 30
Lab 2-2 Answer Key: Baseline QoS Measurement 34
Lab 3-1: Configuring QoS with Cisco AutoQoS 35
Activity Objective 35
Visual Objective 35
Required Resources 36
Command List 36
Job Aid 37
Task 1: Configuring Cisco AutoQoS on Cisco IOS Routers 37
Task 2: Configuring Cisco AutoQoS on the Catalyst 2950 Switch 39
Task 3: QoS Baseline with Cisco AutoQoS 40
Lab 3-1 Answer Key: Configuring QoS with Cisco AutoQoS 44
Case Study 4-1: Classification and Marking 46
Activity Objectives 46
Visual Objective 46
Required Resources 46
Case Study Classification and Marking 47
Task 1: Classification and Marking 47
Activity Verification 55
Case Study 4-1 Answer Key: Classification and Marking 56
Lab 4-1: Classification and Marking Using MQC 59
Activity Objective 59
Visual Objective 59
Required Resources 60
Command List 60
Job Aid 61
Task 1: IP Extended Access List 61
Task 2: Configure MQC Classification 61
Task 3: Configure Class-Based Marking 62
Lab 4-1 Answer Key: Classification and Marking Using MQC 63
ii Implementing Cisco Quality of Service (QoS) v2.3 2009 Cisco Systems, Inc.
Lab 4-2: Classification Using NBAR 64
Activity Objective 64
Visual Objective 64
Required Resources 65
Command List 65
Job Aid 66
Task 1: Discover Applications and Traffic Using NBAR 66
Task 2: Configure Classification Using NBAR 68
Lab 4-2 Answer Key: Classification Using NBAR 71
Lab 4-3: Configuring QoS Preclassify 73
Activity Objective 73
Visual Objective 73
Required Resources 74
Command List 74
Job Aid 74
Task 1: Configure GRE Tunnel 75
Task 2: Configure QoS Preclassify 77
Task 3: Monitor QoS Preclassify 78
Lab 4-3 Answer Key: Configuring QoS Preclassify 79
Lab 4-4: LAN-Based Packet Classification and Marking 80
Activity Objective 80
Visual Objective 80
Required Resources 81
Command List 81
Job Aid 82
Task 1: Configure Trust Boundary 82
Task 2: Configure CoS-to-DSCP Mapping 83
Task 3: Configure IP Access Lists and Class-Based Marking 84
Task 4: Verify QoS Markings 85
Lab 4-4 Answer Key: LAN-Based Packet Classification and Marking 87
Lab 5-1: Configuring Basic Queuing 88
Activity Objective 88
Visual Objective 88
Required Resources 89
Command List 89
Job Aid 89
Task 1: Configure FIFO Queuing 90
Task 2: Configure WFQ 91
Task 3: Monitor and Verify WFQ 92
Task 4: Gather Network Response Time Data 95
Lab 5-1 Answer Key: Configuring Basic Queuing 96
Lab 5-2: Configuring LLQ 98
Activity Objective 98
Visual Objective 98
Required Resources 99
Command List 99
Job Aid 100
Task 1: Configure LLQ 101
Task 2: Monitor and Verify LLQ Operation 103
Task 3: Gather Network Response Time Data 105
Lab 5-2 Answer Key: Configuring LLQ 107
2009 Cisco Systems, Inc. Implementing Cisco Quality of Service (QoS) v2.3 iii
Lab 5-3: Configuring Queuing on a Catalyst Switch 109
Activity Objective 109
Visual Objective 109
Required Resources 110
Command List 110
Job Aid 110
Task 1: Queuing Configurations on the Cisco Catalyst 2950 Switch 111
Task 2: Configure and Monitor CoS-to-Queue Mapping 112
Task 3: Configure and Monitor WRR Queuing 112
Lab 5-3 Answer Key: Queuing on Catalyst Switches 114
Case Study 6-1: WRED Traffic Profiles 115
Activity Objective 115
Visual Objective 115
Required Resources 115
QoS Administrative Policy Requirements 116
Task 1: Creating WRED Traffic Profiles 116
Case Study 6-1 Answer Key: WRED Traffic Profiles 122
Lab 6-1: Configuring DSCP-Based WRED 123
Activity Objective 123
Visual Objective 123
Required Resources 124
Command List 125
Job Aid 125
Task 1: Configure DSCP-Based WRED 126
Task 2: Monitor DSCP-Based WRED 127
Task 3: Configure DSCP-Based CB-WRED with ECN 131
Task 4: Monitor DSCP-Based WRED with ECN 131
Lab 6-1 Answer Key: Configuring DSCP-Based WRED 137
Lab 7-1: Configuring Class-Based Policing 139
Activity Objective 139
Visual Objective 139
Required Resources 140
Command List 141
Job Aid 141
Task 1: Configure Single-Token Bucket Class-Based Policing 142
Task 2: Monitor Single-Token Bucket Class-Based Policing 142
Task 3: Configure Dual-Token Bucket Class-Based Policing 144
Task 4: Monitor Dual-Token Bucket Class-Based Policing 144
Lab 7-1 Answer Key: Configuring Class-Based Policing 146
Lab 7-2: Configuring Class-Based Shaping 147
Activity Objective 147
Visual Objective 147
Required Resources 148
Command List 148
Job Aid 148
Task 1: Configure Class-Based Shaping 149
Task 2: Monitor Class-Based Shaping 150
Lab 7-2 Answer Key: Configuring Class-Based Shaping 151
Lab 8-1: Configuring Class-Based Header Compression 152
Activity Objective 152
Visual Objective 152
Required Resources 153
Command List 153
Job Aid 153
Task 1: Configure Class-Based Header Compression 154
Task 2: Monitor Class-Based Header Compression 154
Lab 8-1 Answer Key: Configuring Class-Based Header Compression 155
iv Implementing Cisco Quality of Service (QoS) v2.3 2009 Cisco Systems, Inc.
Lab 8-2: Configuring LFI 156
Activity Objective 156
Visual Objective 156
Required Resources 157
Command List 157
Job Aid 158
Task 1: Configure LFI 158
Task 2: Monitor LFI 160
Lab 8-2 Answer Key: Configuring LFI 161
Final Workgroup Device Configurations 162
QOS
Lab Guide
Overview
This guide presents the instructions and other information concerning the activities for this
course. You can find the solutions in the lab activity Answer Key.
Outline
This guide includes these activities:
Case Study 2-1: QoS Mechanisms
Lab 2-1: QoS Lab Setup and Initialization
Lab 2-2: Baseline QoS Measurement
Lab 3-1: Configuring QoS with Cisco AutoQoS
Case Study 4-1: Classification and Marking
Lab 4-1: Classification and Marking Using MQC
Lab 4-2: Classification Using NBAR
Lab 4-3: Configuring QoS Preclassify
Lab 4-4: LAN-Based Packet Classification and Marking
Lab 5-1: Configuring Basic Queuing
Lab 5-2: Configuring LLQ
Lab 5-3: Configuring Queuing on a Catalyst Switch
Case Study 6-1: WRED Traffic Profiles
Lab 6-1: Configuring DSCP-Based WRED
Lab 7-1: Configuring Class-Based Policing
Lab 7-2: Configuring Class-Based Shaping
Lab 8-1: Configuring Class-Based Header Compression
Lab 8-2: Configuring LFI
2 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Case Study 2-1: QoS Mechanisms
This case study enables you to practice the skills and knowledge learned in the modules
Introduction to QoS and The Building Blocks of QoS.
Activity Objective
In this activity, you will correctly identify which QoS mechanisms can be used, and where QoS
mechanisms should be applied to the network to implement an administrative QoS policy. After
completing this activity, you will be able to meet these objectives:
Review customer QoS requirements
Identify QoS service class requirements
Identify where QoS mechanisms should be applied to the network to meet customer
requirements
Present a solution to the case study
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3Lab Guide-2
Visual Objective for Case Study 2-1: QoS
Mechanisms
1. Review customer QoS requirements. Completely read the
customer requirements provided.
2. Identify QoS service class requirements. With the aid of your
partner, identify the service classes required to implement the
administrative QoS policy based on customer requirements.
3. Identify where QoS mechanisms should be applied to the
network. Identify locations in the network where QoS
mechanisms should be applied to meet customer requirements.
4. Present your solution. After the instructor presents a solution to
the case study, present your solution to the class with your
partner.
Required Resources
These are the resources and equipment required to complete this activity.
Case Study Activity: QoS Mechanisms
A workgroup consisting of two learners
2009 Cisco Systems, Inc. Lab Guide 3
Apply QoS Mechanisms
This case study activity provides information regarding the QoS administrative policy
requirements of a large, multisite network. Your task is to work with a partner to evaluate the
QoS requirements, and based on the requirements, identify where QoS mechanisms should be
applied. You will discuss your solution with the instructor and other classmates, and the
instructor will present a solution for the case study to the class.
Task 1: Apply QoS Mechanisms
Step 1 Review customer QoS requirements.
Company Background
Nuevo Health Care Systems (NHCS) provides health care information to health care
professionals in ten major regions of the country.
Customer Situation
The NHCS network currently has limited bandwidth capacity in its WAN links, and the
company does not envision being able to increase bandwidth in the near future. All ten remote
sites (two are pictured in the network illustration) connect to the central site through a service
provider through a Frame Relay, Layer 2, 768-kb/s link service. The NHCS headquarters site
also connects to the service provider via a Frame Relay, Layer 2, and 768-kb/s link. NHCS
LAN bandwidth is 10 Mb/s. NHCS connects to the Internet through its headquarters site.
Since the installation of a new IP telephony system, NHCS has been encountering the following
increasingly serious problems with their network:
Users of the ERP applications have been complaining of unacceptable response times.
Their subsecond response time has now stretched to multiple seconds in many cases and up
to a minute in some cases.
Key patient information files that used to arrive almost instantly are now taking 10 to 15
minutes to be transferred from headquarters to users at the remote sites. (These are
moderate sized, mostly text files.)
Patient graphics files (x-rays, MRIs) that used to take 20 to 30 minutes to transfer between
the remote sites and headquarters now often have to be transferred overnight. (This is
acceptable because these files are usually not needed immediately and tend to be extremely
large graphics files.)
Users of the new IP telephony devices are the most upset. The quality of their calls is very
poor, and their calls often just drop.
4 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3Lab Guide-3
Nuevo Health Systems Applications
The key applications running on NHCS network are shown in the figure.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3Lab Guide-4
Nuevo Health Care Systems Network
2009 Cisco Systems, Inc. Lab Guide 5
Device Number Device Type
1 IP phone
2 LAN switch
3 Customer edge router
4 Service provider router
Step 2 Identify QoS service class requirements.
Given the NHCS network as described, how would you recommend classifying network
traffic?
Traffic Classification and Prioritization
Type of Traffic (Application) Traffic Priority
(Rank from 1 to 5)
Step 3 Identify network locations where QoS mechanisms should be applied.
Given the NHCS network as described, how would you recommend deploying QoS
mechanisms? Check each box (X) where you believe that QoS mechanisms could be applied to
effectively resolve QoS problems at NHCS.
6 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Where to Apply QoS Mechanisms: Classification and Marking
Device
No.
Network Device Interface Classification
on Input
Classification
on Output
Marking
on Input
Marking
on
Output
1 IP phoneInterface to
workstation

1 IP phoneInterface to switch
2 SwitchInterface to IP phone
2 SwitchInterface to
customer edge router

3 Customer edge router
Interface to switch

3 Customer edge router
Interface to WAN (service
provider router)

4 Service provider router
Interface to customer edge
router

Where to Apply QoS Mechanisms: Congestion Management and Avoidance
Device
No.
Network Device
Interface
Congestion
Management
on Input
Congestion
Management
on Output
Congestion
Avoidance
on Input
Congestion
Avoidance
on Output
2 SwitchInterface to IP
phone

2 SwitchInterface to
customer edge router

3 Customer edge router
Interface to switch

3 Customer edge router
Interface to WAN
(service provider router)

4 Service provider router
Interface to customer
edge router

2009 Cisco Systems, Inc. Lab Guide 7
Where to Apply QoS Mechanisms: Traffic Policing and Traffic Shaping
Device
No.
Network Device Interface Traffic
Policing
on Input
Traffic
Policing
on Output
Traffic
Shaping
on Input
Traffic
Shaping
on Output
2 SwitchInterface to IP phone
2 SwitchInterface to customer edge
router

3 Customer edge routerInterface to
switch

3 Customer edge routerInterface to
WAN (service provider router)

4 Service provider routerInterface
to customer edge router

Where to Apply QoS Mechanisms: Link Efficiency
Device
No.
Network Device Interface Compression
on Input
Compression
on Output
LFI on
Input
LFI on
Output
2 SwitchInterface to IP phone
2 SwitchInterface to customer
edge router

3 Customer edge routerInterface
to switch

3 Customer edge routerInterface
to WAN (service provider router)

4 Service provider router
Interface to customer edge router

Step 4 Present your solution.
Together with your partner, present your solution to the class. Include the following
information:
Customer service class requirements
Network diagrams indicating where classification and marking should be applied
Justification for differences from the solution presented by the instructor
Activity Verification
You have completed this activity when the instructor has verified your case study solution and
you have justified any major deviations from the solution supplied by the instructor.
8 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Case Study 2-1 Answer Key: QoS Mechanisms
Your case study discussion and solution should include:
Traffic classification and prioritization
Location of QoS mechanisms for
Classification and marking
Congestion management and avoidance
Link efficiency
Traffic Classification and Prioritization
Type of Traffic (Application) Traffic Priority
IP Telephony Highest1
ERP High2
Patient information files Moderate3
Patient graphics files Low4
Browser traffic Low4
Where to Apply QoS Mechanisms: Classification and Marking
Device
No.
Network Device Interface Classification
on Input
Classification
on Output
Marking
on Input
Marking
on
Output
1 IP phoneLink to workstation X X*
1 IP phoneLink to switch X
2 SwitchLink to IP phone X No,
trusted*
2 SwitchLink to customer
edge router
X
3 Customer edge routerLink
to switch
X
3 Customer edge routerLink
to WAN (service provider
router)
X
4 Service provider routerLink
to customer edge router
X
Note *The IP phone will normally be set to re-mark any traffic coming from its downstream
workstation (the IP phone connection to the workstation is untrusted). The switch will not
re-mark traffic coming from the IP phone (traffic from the IP phone is trusted). Further
explanation of trusted and untrusted interfaces is provided in the Classification and
Marking module of this course.
2009 Cisco Systems, Inc. Lab Guide 9
Where to Apply QoS Mechanisms: Congestion Management and Avoidance
Device
No.
Network Device
Interface
Congestion
Management
on Input
Congestion
Management
on Output
Congestion
Avoidance
on Input
Congestion
Avoidance
on Output
2 SwitchLink to IP
phone
X
2 SwitchLink to
customer edge router
X Possible
3 Customer edge router
Link to switch
X
3 Customer edge router
Link to WAN (service
provider router)
X Possible
4 Service provider
routerLink to
customer edge router
X Possible
Where to Apply QoS Mechanisms: Traffic Policing and Traffic Shaping
Device
No.
Network Device Interface Traffic
Policing
on Input
Traffic
Policing
on Output
Traffic
Shaping
on Input
Traffic
Shaping
on Output
2 SwitchLink to IP phone X
2 SwitchLink to customer edge
router

3 Customer edge routerLink to
switch
X
3 Customer edge routerLink to
WAN (service provider router)
Possible
4 Service provider routerLink to
customer edge router
X Possible
10 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Where to Apply QoS Mechanisms: Link Efficiency
Device
No.
Network Device Interface Compression
on Input
Compression
on Output
LFI on
Input
LFI on
Output
2 SwitchLink to IP phone
2 SwitchLink to customer edge
router

3 Customer edge routerLink to
switch

3 Customer edge routerLink to
WAN (service provider router)
X X
4 Service provider routerLink to
customer edge router
X X
Note Because this is a Frame Relay network, the service provider will pass frames through
transparently without compressing or fragmenting the frames.
2009 Cisco Systems, Inc. Lab Guide 11
Lab 2-1: QoS Lab Setup and Initialization
Complete this lab activity to practice what you learned in the modules Introduction to QoS
and The Building Blocks of QoS.
Activity Objective
In this activity, you will prepare your student workgroup for the lab practice exercises that
accompany the Implementing Cisco Quality of Service (QOS) v2.3 course. After completing
this activity, you will be able to meet these objectives:
Configure your workgroup routers for basic network connectivity
Configure your workgroup switch for basic network connectivity
Verify network connectivity using the Cisco IOS tools: ping and traceroute
Visual Objective
The figures illustrate what you will accomplish in this activity.
The lab topology for the course is split into a number of workgroups and three separate
backbones.
Each workgroup is designated to service two learners and has been designed to interface with
two traffic generation backbones named Traffic Gen 1 and Traffic Gen 2 and a shared
provider backbone named Provider.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3Lab Guide-5
Visual Objective for Lab 2-1: QoS Lab
Setup and Initialization
12 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
The figure shows the physical topology of a single workgroup and its connectivity into the
three lab backbones. Each workgroup consists of two user-controlled Cisco 2610XM routers
and one user-controlled Cisco 2950T-24 workgroup switch. Each student workgroup connects
to each backbone as shown in the figure.
Although depicted as two different workgroup switches in the Logical Lab Backbone figure,
each student workgroup consists of a single workgroup switch configured to support two
different virtual LANs. In this figure, the single workgroup switch has been depicted as two
different switches to simplify the diagram only. Notice that the same name has been used to
identify the Cisco 2950T, indicating that it is, in fact, the same device.
Traffic for each pod can bypass the high-speed service provider backbone (using the slow 384-
kb/s link) or travel via the high-speed provider backbone itself (using the fast 768-kb/s serial
link). Traffic flow through both the slow and fast serial links will be tested in the QoS labs.
In this figure, the logical topology configuration of each workgroup and the devices contained
within each of the three lab backbones is shown. In the Provider Backbone in the figure, each
of the backbone routers (SPNorth and SPSouth) contains a serial connection to each
workgroup.
The QoS lab uses the two routers called Pagent-1 and Pagent-2 to generate traffic from
different applications, including SQL, Napster, FTP, Citrix, HTTP, Microsoft Outlook, and
Kazaa. The two routers called Callgen-1 and Callgen-2 are used in the lab to generate (G.711)
VoIP traffic.
Note The SPNorth router, the SPSouth router, the core switch, and the traffic generation routers
(Pagent-1, Pagent-2, Callgen-1, and Callgen-2) are preconfigured and managed by the
instructor.
2009 Cisco Systems, Inc. Lab Guide 13
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3Lab Guide-6
Logical Lab Backbone Topology
Each Pagent and Callgen router is set up with connections to eight VLANs (one for each lab
workgroup) as follows:
Pagent-1 and Callgen-1 are configured with VLANs 11 to 18.
Pagent-2 and Callgen-2 are configured with VLANs 21 to 28.
Traffic flow to and from the Pagent and Callgen lab routers is designed to traverse the network
through each workgroup as follows:
Pagent-1 and Callgen-1 (VLAN 11) send traffic to Pagent-2 and Callgen-2 (VLAN 21) via
pod 1.
Pagent-1 and Callgen-1 (VLAN 12) send traffic to Pagent-2 and Callgen-2 (VLAN 22) via
pod 2.
Pagent-1 and Callgen-1 (VLAN 13) send traffic to Pagent-2 and Callgen-2 (VLAN 23) via
pod 3.
Pagent-1 and Callgen-1 (VLAN 14) send traffic to Pagent-2 and Callgen-2 (VLAN 24) via
pod 4.
Pagent-1 and Callgen-1 (VLAN 15) send traffic to Pagent-2 and Callgen-2 (VLAN 25) via
pod 5.
Pagent-1 and Callgen-1 (VLAN 16) send traffic to Pagent-2 and Callgen-2 (VLAN 26) via
pod 6.
Pagent-1 and Callgen-1 (VLAN 17) send traffic to Pagent-2 and Callgen-2 (VLAN 27) via
pod 7.
Pagent-1 and Callgen-1 (VLAN 18) send traffic to Pagent-2 and Callgen-2 (VLAN 28) via
pod 8.
14 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
The logical configuration of each of these VLANs is as follows:
Lab VLAN Logical Address Assignments
Workgroup Pod VLANs Assigned IP Subnets
1 11 and 21 10.1.1.0/24 (VLAN 11) and 10.3.1.0/24 (VLAN 21)
2 12 and 22 10.1.2.0/24 (VLAN 12) and 10.3.2.0/24 (VLAN 22)
3 13 and 23 10.1.3.0/24 (VLAN 13) and 10.3.3.0/24 (VLAN 23)
4 14 and 24 10.1.4.0/24 (VLAN 14) and 10.3.4.0/24 (VLAN 24)
5 15 and 25 10.1.5.0/24 (VLAN 15) and 10.3.5.0/24 (VLAN 25)
6 16 and 26 10.1.6.0/24 (VLAN 16) and 10.3.6.0/24 (VLAN 26)
7 17 and 27 10.1.7.0/24 (VLAN 17) and 10.3.7.0/24 (VLAN 27)
8 18 and 28 10.1.8.0/24 (VLAN 18) and 10.3.8.0/24 (VLAN 28)
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for the QoS course
Learner workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
2009 Cisco Systems, Inc. Lab Guide 15
Command List
The table describes the commands used in this activity.
QoS Course Lab Setup and Initialization Lab Router Commands
Command Description
Specifies or modifies the hostname
Configures the password for users to enter enable mode
Enters interface configuration mode and the physical interface
identification


Sets a primary or secondary IP address for an interface
Configures the clock rate for the hardware connections on serial
interfaces
Sets and communicates to higher-level protocols the current
bandwidth value for an interface


Sets the encapsulation method used by the interface


Lists a summary of interface IP information and status
Configures an OSPF routing process


Defines the interfaces on which OSPF protocol runs and defines
the area ID for those interfaces
Displays OSPF-neighbor information on a per-interface basis
Disables an interface


Saves your entries in the configuration file
QoS Course Lab Setup and Initialization Lab Switch Commands
Command Description
Specifies or modifies the hostname
Configures password for users to enter enable mode
Enters interface configuration mode and the physical interface
identification


Lists a summary of interface IP information and status


Displays the administrative and operational status of all interfaces
or a specified interface


Saves your entries in the configuration file
16 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Job Aid
This job aid is available to help you complete the lab activity:
Your assigned workgroup pod number provided by the instructor
Task 1: Configure Routers and Switch and Verify Connectivity
You will configure your workgroup routers for basic network connectivity.
Activity Procedure
Complete these steps:
Step 1 Configure the host name and passwords on both of the workgroup routers in your
assigned workgroup pod as shown in this table (where x is your assigned workgroup
pod number).
Host Name Enable Secret Password VTY Login Password
WGxR1 cisco cisco
WGxR2 cisco cisco
Step 2 Configure the IP address on the S0/0, S0/1, and Fa0/0 interfaces of the workgroup
routers in your assigned workgroup pod as shown in this table.
Interface WGxR1 WGxR2
Fa0/0 10.1.x.1/24 10.3.x.2/24
S0/0 10.2.x.1/24 10.2.x.2/24
S0/1 10.4.x.1/24 10.5.x.2/24
Step 3 Configure the clock rate on the S0/0 serial interface of your WGxR1 router to 384
kb/s.
Interface WGxR1 S0/0 clock rate
S0/0 384000 b/s
Note In the service provider backbone, each of the backbone routers (SPNorth, SPSouth)
contains a serial connection to each workgroup router. The Sy/x table lists the IP
addressing requirements of these connections. Both service provider routers are the data
DCE with the clock rate configured by the instructor as 768 kb/s.
2009 Cisco Systems, Inc. Lab Guide 17
Sy/x SPNorth IP Address SPSouth IP Address
S0/0 to pod 1 10.4.1.100 10.5.1.100
S0/1 to pod 2 10.4.2.100 10.5.2.100
S0/2 to pod 3 10.4.3.100 10.5.3.100
S0/3 to pod 4 10.4.4.100 10.5.4.100
S1/0 to pod 5 10.4.5.100 10.5.5.100
S1/1 to pod 6 10.4.6.100 10.5.6.100
S1/2 to pod 7 10.4.7.100 10.5.7.100
S1/3 to pod 8 10.4.8.100 10.5.8.100
Step 4 Configure the S0/0 and S0/1 serial interfaces of your workgroup routers for PPP
encapsulation and set the bandwidth to match the clock rate configured in Step 3 of
this lab exercise.
Step 5 Administratively enable the S0/0, S0/1, and Fa0/0 interfaces on both of your
workgroup routers and verify that these interfaces are all in the up state
(administratively up, line protocol up).
If the Fa0/0 interface is down, log in to your workgroup switch to ensure that the
switch port is also administratively enabled.


















Step 6 Configure an OSPF routing process on your workgroup routers and place the S0/0,
S0/1, and Fa0/0 interfaces into OSPF area 0.



Step 7 Verify that both OSPF neighbors of your workgroup routers are in the FULL state.
Each of your workgroup routers should have a FULL neighbor relationship to the
service provider router and to the other workgroup router in your pod.









18 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.




Step 8 Verify that the serial ports on both of your workgroup routers (WGxR1 and
WGxR2) have their queuing strategy set to WFQ.
Step 9 Configure the host name and password on the workgroup switch in your assigned
workgroup pod as shown in this table.
Host Name Enable Secret Password
WGxS1 cisco
Activity Verification
You have completed this task when you attain this result:
You have configured your workgroup routers for basic network connectivity.
Task 2: Configure Workgroup Switch for Connectivity
You will configure your workgroup switch for basic network connectivity.
Activity Procedure
Complete these steps:
Step 1 From the global configuration mode, configure the VTP domain name and mode,
and VLANs 1x and 2x on your workgroup switch.











Step 2 Configure 802.1Q trunking and access ports on the workgroup switch by
configuring the Fa0/1, Fa0/2, and Fa0/3 interfaces of your workgroup switch as
follows:
Fa0/1 is an 802.1Q trunk connected to the core switch. Only VLANs 1x and 2x
should be allowed on the trunk.
Fa0/2 should be an access port in VLAN 1x connected to the WGxR1 router.
Fa0/3 should be an access port in VLAN 2x connected to the WGxR2 router.











2009 Cisco Systems, Inc. Lab Guide 19







Step 3 Verify that the Fa0/1, Fa0/2, and Fa0/3 interfaces on the workgroup switch are all
up. Administratively enable any interfaces in the shutdown state.











Note In the lab, there is no requirement to ping to or from the workgroup switch. The workgroup
switch will not need an IP address configured on Interface VLAN 1 and will not need an IP
default gateway configuration.
Step 4 From your WGxS1 switch, use the show interface fa0/x switchport command to
verify that the Fa0/1 interface 802.1Q trunking is on and only allow VLANs 1x and
2x on the trunk.





















Step 5 Verify that the Fa0/2 interface is in VLAN 1x.











20 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.










Step 6 Verify that the Fa0/3 interface is in VLAN2x.





















Activity Verification
You have completed this task when you attain this result:
You have configured your workgroup switch for basic network connectivity.
Task 3: Verify Network Connectivity
You will verify network connectivity using the Cisco IOS tools: ping and traceroute.
Activity Procedure
Complete these steps:
Step 1 From the WGxR1 router, perform the following pings to confirm connectivity and
routing protocol operation:

Ping the SPNorth router (10.4.x.100).








Ping the SPSouth router Internet connection (10.10.10.200).


2009 Cisco Systems, Inc. Lab Guide 21





Ping the WGxR2 router (10.2.x.2).








Ping the Pagent-1 (10.1.x.10) and Callgen-1 (10.1.x.11) routers.















Step 2 From the WGxR2 router, perform the following pings to confirm connectivity and
routing protocol operation:
Ping the SPSouth router (10.5.x.100).









Ping the SPNorth router Internet connection (10.10.10.100).








Ping the Pagent-2 (10.3.x.10) and Callgen-2 (10.3.x.11) routers.











22 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.



Step 3 On the WGxR1 and WGxR2 routers, administratively disable the serial 0/0
interface.
Step 4 From the WGxR1 router, use Telnet to connect to the Pagent-1 router
(10.1.x.10) and perform a traceroute to the Pagent-2 router (10.3.x.10) to
confirm that the path from Pagent-1 to Pagent-2 flows through your pod (via the
SPNorth and SPSouth routers). Use the diagram in Figure 3 to verify your
traceroute.























Step 5 From the WGxR1 router, use Telnet to connect to the Callgen-1 (10.1.x.11) router
and perform a traceroute to the Callgen-2 router (10.3.x.11) to confirm that the path
from Callgen-1 to Callgen-2 flows through your pod (via the SPNorth and SPSouth
routers). Use the diagram in Figure 3 to verify your traceroute.






















Step 6 On the WGxR1 and WGxR2 routers, administratively enable the serial 0/0 interface.
2009 Cisco Systems, Inc. Lab Guide 23
Step 7 Use Telnet to connect to the Pagent-1 router (10.1.x.10) and perform a traceroute to
the Pagent-2 router (10.3.x.10) to confirm that the path from Pagent-1 to Pagent-2
now flows through your pod and via the slow 384-kb/s serial connection between
your WGxR1 and WGxR2 routers. Use the diagram in Figure 3 to verify your
traceroute.





















Step 8 Save your running configurations of the workgroup routers and the workgroup
switch to the startup configuration in NVRAM.
Step 9 Notify your instructor when you have completed this initial setup lab.
Activity Verification
You have completed this task when you attain these results:
Pings from the WGxR1 router to the SPNorth, WGxR2, Pagent-1, and Callgen-1 routers
are successful.
Pings from the WGxR2 router to the SPSouth, Pagent-2, and Callgen-2 routers are
successful.
A traceroute from the Pagent-1 router to the Pagent-2 router flows through your pod (via
the SPNorth and SPSouth routers) with the S0/0 interface in the shutdown state.
A traceroute from the Callgen-1 router to the Callgen-2 router flows through your pod (via
the SPNorth and SPSouth routers) with the S0/0 interface in the shutdown state.
A traceroute from the Pagent-1 router to the Pagent-2 router flows through your pod 384-
kb/s serial link with all WGxR1 and WGxR2 serial interfaces administratively enabled.
Lab 2-1 Answer Key: QoS Lab Setup and Initialization
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.
WG1R1





24 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.


































WG1R2
































2009 Cisco Systems, Inc. Lab Guide 25



WG1S1






































26 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 2-2: Baseline QoS Measurement
Complete this lab activity to practice what you learned in the modules Introduction to QoS
and The Building Blocks of QoS.
Activity Objective
In this activity, you will create a baseline measurement of network traffic for use in evaluating
the effectiveness of applied QoS mechanisms. After completing this activity, you will be able
to meet these objectives:
Clear interface counters on Cisco routers and switches
Identify interface statistics, which are meaningful in traffic baselines
Use Cisco IOS monitoring commands and network connectivity tools (ping command) to
gather network response time data
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3Lab Guide-7
In this lab, when the connectivity is properly established for your pod, you will record traffic
statistics without any QoS configuration on your workgroup routers or workgroup switch. This
record of the workgroup traffic statistics will form a rough baseline QoS measurement for your
pod.
For this lab, no special tools, such as QPM, will be used to monitor QoS statistics. Instead,
Cisco IOS show commands and extended pings are used to form a rough baseline
measurement.
2009 Cisco Systems, Inc. Lab Guide 27
Company Background
E-Commerce University is one of the most respected private universities in California based on
its progressive educational offerings, which include a Master of Science degree in E-Commerce
Administration and Implementations. E-Commerce University has a northern and southern
campus. The northern campus is located in Seattle, Washington, and the southern campus is
located in Santa Monica, California. Each of the campuses has a population of 500 students and
a faculty staff of 50 professors and administrators.
Customer Situation
The E-Commerce University network currently has limited bandwidth capacity on its 384-kb/s,
leased-line PPP WAN link that connects the northern and southern campuses, and the
university does not envision being able to increase bandwidth in the near future. Both campuses
also have a 768-kb/s Internet connection. The preferred traffic path between the E-Commerce
University campuses is the 384-kb/s link, because the 768-kb/s link connects to the Internet and
will have a high path cost, even though it is a directly connected link with a higher bandwidth
of 768 kb/s.
The university has recently implemented these three new applications:
An IP telephony system between the northern and southern campus
An Oracle (SQL) student administration database system
Wireless Internet access for the students and faculties
Some of the other key applications currently running on the E-Commerce University network
that the university IT staff is aware of include the following:
Faculty remote access (Citrix)
MS Outlook email (Microsoft Exchange)
Web server for accessing university information (HTTP)
Online courseware transfer between the northern and southern campuses (FTP)
Because of the deployment of these applications, the E-Commerce University has been
encountering these increasingly serious problems with their network:
Users of the Oracle (SQL) student administrations database system have been complaining
of unacceptable response times. Their subsecond response time has now stretched to
multiple seconds in many cases and up to a minute in some cases.
Users of the new IP telephony devices are the most upset. The quality of their calls is very
poor, and their calls often just drop.
Customer Requirements
At this point, E-Commerce University is most concerned about the low VoIP voice quality and
has called upon you (the new network engineer they hired in the last month) to perform a
baseline measurement of the VoIP traffic via the low-speed, 384-kb/s leased-line connection
between the northern and southern campuses.
28 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS course
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Baseline QoS Measurement Lab Commands
Command Description


Lists a summary of an interface IP information and status
Clears the interface counters


Displays the administrative and operational status of all interfaces
or a specified interface
Disables an interface


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity:
Your assigned workgroup pod number provided by the instructor
Task 1: Baseline Measurement of Network Traffic
You will clear interface counters on Cisco routers and switches.
Activity Procedure
Complete these steps:
Step 1 Verify that the S0/0 and S0/1 interfaces on both of your workgroup routers (WGxR1
and WGxR2) are administratively enabled.
Step 2 Clear the interface counters on both of your workgroup routers using the clear
counters command.
Note At this time, your instructor has not yet started the Pagent and Callgen router traffic
generations.
2009 Cisco Systems, Inc. Lab Guide 29
Activity Verification
You have completed this task when you attain this result:
You have cleared interface counters on Cisco routers and switches.
Task 2: Identify Interface Statistics
You will identify interface statistics.
Activity Procedure
Complete these steps:
Step 1 From the WGxR1 workgroup router, perform an extended ping to the WGxR2 router
serial 0/0 interface, then record the ping response time in the table at the end of the
lab. For the extended ping, use a repeat count of 100 and a datagram size of 160.












Step 2 Repeat the extended ping two more times and record your results in the table at the
end of this lab.
Step 3 Repeat Step 1 and Step 2, but ping from the WGxR2 to WGxR1 serial 0/0 interface
and record the response time results in the table at the end of this lab.
Step 4 From both of your workgroup routers, issue the show interfaces serial 0/0
command and record the highlighted stats below in the table at the end of the lab.
























30 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.



Step 5 Clear the interface counters on both of your workgroup routers using the clear
counters command.
Step 6 Notify your instructor when you are done with the prior steps. Your instructor will
start both Pagent and Callgen traffic generators. Your instructor will advise you
when all traffic streams are operational.
Activity Verification
You have completed this task when you attain this result:
You have identified interface statistics.
Task 3: Use Commands and Tools to Gather Network Response
Time Data After Both Pagent and Callgen Traffic Generators
Are Sending Traffic
You will use Cisco IOS monitoring commands and network connectivity tools (ping) to gather
network response time data.
Activity Procedure
Complete these steps:
Step 1 From the WGxR1 workgroup router, perform an extended ping to the WGxR2 router
serial 0/0 interface, then record the ping response time in the table at the end of the
lab. For the extended ping, use a repeat count of 100 and a datagram size of 160.
Caution Before initiating the extended ping command, wait for the Pagent and Callgen traffic to run
for at least one minute so that the traffic generation can stabilize.











Caution After the Pagent traffic generation has been started, it is important that the Pagent routers
not be used for network measurements using ping and traceroute commands, because the
Pagent routers maintain a very high CPU load in generating the traffic demands for the QoS
course labs.

Step 2 Repeat the extended ping command two more times and record your results in the
table at the end of this lab.
2009 Cisco Systems, Inc. Lab Guide 31
Step 3 Repeat Step 1 and Step 2 but ping from the WGxR2 to WGxR1 serial 0/0 interface
and record the response time results in the table at the end of this lab.
Step 4 From both of your workgroup routers, issue the show interfaces serial 0/0
command and record the highlighted statistics below in the table at the end of the
lab.



























Note The traffic sent between Pagent-1 and Pagent-2 is set up so that the traffic rate varies
constantly and will be different between Pagent-1 and Pagent-2. When the traffic rate from
Pagent-1 to Pagent-2 is high and increasing, the traffic rate from Pagent-2 to Pagent-1 will
be low and decreasing, and vice versa. As a result, the drop rate on your workgroup router
serial 0/0 interface may be different between your workgroup R1 and R2 routers.
Note For Callgen, both Callgen routers will generate VoIP calls at a constant rate.
Step 5 Compare the resulting statistics with and without the Pagent and Callgen traffic
generations enabled.
You should notice that many of the pings would have a longer response time in the
event of congestion on the lowbandwidth, 384-kb/s PPP serial link.
32 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Baseline QoS Measurement Lab Results
These four tables are used to record the results of your lab testing in this exercise. Record your
extended ping results in these two tables:
WGxR1 to WGxR2 QoS Baseline Ping Results
Packet Size
Without Pagent and
Callgen
With Pagent and
Callgen
160 bytes min/avg/max min/avg/max
Extended ping 1
Extended ping 2
Extended ping 3
success rate % success rate %
Extended ping 1
Extended ping 2
Extended ping 3
WGxR2 to WGxR1 QoS Baseline Ping Results
Packet Size
Without Pagent and
Callgen
With Pagent and
Callgen
160 bytes min/avg/max min/avg/max
Extended ping 1
Extended ping 2
Extended ping 3
success rate % success rate %
Extended ping 1
Extended ping 2
Extended ping 3
2009 Cisco Systems, Inc. Lab Guide 33
Record your WGxR1 show interfaces serial 0/0 command results in this table.
WGxR1 QoS Baseline show interfaces Command Results
Without Pagent and
Callgen
With Pagent and Callgen
Queuing Strategy
Reliability, Txload, Rxload
Total Output Drops
Output Queue: size/max total
Output Queue: threshold/drops
Packets Output
Drop % (Calculated by you as:
Total Output Drop / Packets
Output)
Record your WGxR2 show interfaces serial 0/0 command results in this table.
WGxR2 QoS Baseline show interfaces Command Results
Without Pagent and
Callgen
With Pagent and Callgen
Queuing Strategy
Reliability, Txload, Rxload
Total Output Drops
Output Queue: size/max total
Output Queue: threshold/drops
Packets Output
Drop % (Calculated by you as:
Total Output Drop / Packets
Output)
Activity Verification
You have completed this task when you attain this result:
You have successfully completed the QoS baseline measurement by recording ping and
interface statistics both before and after network traffic generation.
34 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 2-2 Answer Key: Baseline QoS Measurement
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.
Sample WGxR1 to WGxR2 QoS Baseline ping Results
Packet Size
Without Pagent and
Callgen
With Pagent and
Callgen
160 bytes min/avg/max min/avg/max
Extended ping 1 8/8/12 8/43/120
Extended ping 2 8/8/12 16/42/116
Extended ping 3 8/9/16 12/43/112
success rate % success rate %
Extended ping 1 100% 100%
Extended ping 2 100% 100%
Extended ping 3 100% 100%
Sample WGxR1 QoS Baseline show interfaces Results
Without Pagent and
Callgen
With Pagent and Callgen
Queuing Strategy WFQ (fair queue) WFQ (fair queue)
Reliability, Txload, Rxload 255, 1, 1 255, 209, 39
Total Output Drops 0 1975
Output Queue: size/max total 0/1000 61/1000
Output Queue: threshold/drops 64/0 64/1975
Packets Output 3001 131760
Drop % (Calculated by you as:
Total Output Drop / Packets
Output)
0/3001 = 0 1975/131760 = 1.5%
2009 Cisco Systems, Inc. Lab Guide 35
Lab 3-1: Configuring QoS with Cisco AutoQoS
Complete this lab activity to practice what you learned in the module Introduction to MQC
and Cisco AutoQoS.
Activity Objective
In this activity, you will configure QoS for VoIP on Cisco IOS routers and Catalyst switches
using Cisco AutoQoS. After completing this activity, you will be able to meet these objectives:
Configure Cisco AutoQoS on Cisco IOS routers
Configure Cisco AutoQoS on the Catalyst 2950 workgroup switch
Use Cisco IOS monitoring commands and network connectivity tools (ping) to gather
network response time data
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3Lab Guide-8
From the baseline measurement results, the E-Commerce University IT staff has determined
that the drop rate and the latency of the VoIP traffic must be improved. At this point, the E-
Commerce University has called upon you (the new CCNA network engineer they hired last
month) to improve the voice quality as quickly as possible over the weekend.
By the way, the E-Commerce University network is built using Cisco Catalyst 2950 switches,
Cisco 2610XM routers, and Cisco Aironet Wireless Access Points.
36 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Through Cisco online e-learning, you discovered the new Cisco AutoQoS for VoIP feature that
allows automated configuration of quality of service (QoS) on the network and provides a
means for simplifying the implementation and provisioning of QoS for VoIP traffic.
Because you have only a limited amount of time to implement a solution, you have decided to
go ahead and use Cisco AutoQoS and then test and compare the VoIP QoS results to see if
Cisco AutoQoS can be used to solve the problem.
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Configuring QoS with Cisco AutoQoS Lab Router Commands
Command Description
Displays the contents of the currently running configuration file
Enables Cisco Express Forwarding on the router
Enters interface configuration mode and the physical interface
identification
Configures the Cisco AutoQoS-VoIP feature on an interface


Displays the configuration created by the Cisco AutoQoS-VoIP
feature on a specific interface or all interfaces


Lists a summary of an interface IP information and status


Displays the administrative and operational status of all interfaces
or a specified interface
Clears the interface counters


Sets the encapsulation method used by the interface


Saves your entries in the configuration file
2009 Cisco Systems, Inc. Lab Guide 37
Configuring QoS with Cisco AutoQoS Lab Switch Commands
Command Description
Enters interface configuration mode and the physical interface
identification
Configures Cisco AutoQoS for VoIP within a QoS domain


Displays Cisco AutoQoS configuration that is applied


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity:
Your assigned workgroup pod number provided by the instructor
Task 1: Configuring Cisco AutoQoS on Cisco IOS Routers
In this task, you will enable the Cisco AutoQoS for VoIP feature on your workgroup router
low-bandwidth PPP serial interface.
Activity Procedure
Complete these steps:
Step 1 Display and examine the running configuration of your WGxR1 router.
Step 2 Enable Cisco Express Forwarding on your WGxR1 router.
Step 3 Enable the Cisco AutoQoS for VoIP feature for traffic on the S0/0 interface of
WGxR1 only. Do not configure Cisco AutoQoS to trust DSCP markings.
Step 4 Display and examine the resulting Cisco AutoQoS configuration after enabling
AutoQoS. The following example outputs are from WG1.























38 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.























384











Step 5 Repeat Steps 1 through 4 for WGxR2.
Step 6 Issue the show ip interface brief command on WGxR1 and ensure that the Multilink
interface is up. The Multilink interface is required for PPP multilink and interleaving
operation. Notice that the S0/0 IP address assignment is automatically moved to the
Multilink interface.








Note Because Callgen is used to generate the VoIP traffic, the voice quality of the VoIP phone
calls cannot be tested directly. Therefore, after Cisco AutoQoS has been enabled, you will
modify the resulting QoS configurations to make the ping traffic (icmp echo and reply) to
have the same EF PHB as the VoIP traffic. In this way, you can compare the extended ping
responses with Cisco AutoQoS enabled to the responses before Cisco AutoQoS was
enabled.
Step 7 On the WGxR1 router, modify the ip access-list extended AutoQoS-VoIP-RTCP to
include the ping traffic (icmp echo and echo reply).


2009 Cisco Systems, Inc. Lab Guide 39


Step 8 Repeat Step 7 for the WGxR2 router.
Activity Verification
You have completed this task when you attain these results:
You have successfully enabled the Cisco AutoQoS for VoIP feature on both WGxR1 and
WGxR2.
You have configured ping (ICMP echo and reply) to belong to the same traffic class as
VoIP traffic.
Task 2: Configuring Cisco AutoQoS on the Catalyst 2950
Switch
In this task, you will enable the Cisco AutoQoS for VoIP feature on your workgroup Catalyst
2950 Switch.
Activity Procedure
Complete these steps:
Step 1 Display and examine the running configuration of your WGxS1 switch.
Step 2 Enable the Cisco AutoQoS for VoIP feature for traffic on the Fa0/1 interface of
WGxS1 and trust the CoS markings from the core switch.
Step 3 Display and examine the resulting Cisco AutoQoS configuration after enabling Cisco
AutoQoS. Notice that the 2950 is now configured for WRR queuing with queue 4
setup as the expedite queue (weight = 0). WRR queuing will be covered in the module
Congestion Management.











Activity Verification
You have completed this task when you attain this result:
You have successfully enabled the Cisco AutoQoS for VoIP feature on WGxS1.
40 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 3: QoS Baseline with Cisco AutoQoS
In this task, you will use Cisco IOS monitoring commands and network connectivity tools
(ping) to gather network response time data. You will compare the results of the traffic
statistics of the network baseline statistics captured in Lab Exercise 2-2 and the network
statistics after the application of Cisco AutoQoS.
Activity Procedure
Complete these steps:
Step 1 Refer to Lab 2-2 and copy the baseline traffic information with the Pagent and
Callgen traffic generation running into the tables at the end of this lab.
Step 2 From the WGxR1 workgroup router, perform an extended ping to the WGxR2 router
serial 0/0 interface, then record the ping response time in the table at the end of the
lab. For the extended ping, use a repeat count of 100 and a datagram size of 160.













Step 3 Repeat the extended ping two more times and record your results in the table at the
end of this lab.
Step 4 Repeat Steps 2 and 3, but ping from the WGxR2 to WGxR1 serial 0/0 interface and
record the response time results in the table at the end of this lab.
Step 5 Clear the interface counters on both of your workgroup routers using the clear
counters command.
Step 6 Wait for the interface counters to accumulate traffic statistics for at least one minute.
Step 7 From both of your workgroup routers, issue the show interfaces multilink command
and record the highlighted statistics below in the table at the end of the lab.















2009 Cisco Systems, Inc. Lab Guide 41












Step 8 Compare the results of the traffic statistics from Lab 2-2 QoS Baseline Measurement
to the results from this lab.
Is the ping maximum response time shorter than before Cisco AutoQoS was
enabled? Explain.
___________________________________________________________
Is the drop rate higher, lower, or about the same as before Cisco AutoQoS was
enabled? Explain. ____________________________________________________
Step 9 Remove the Cisco AutoQoS configuration on your workgroup switch and workgroup
routers.






Note If a newer IOS version on the Catalyst 2950 is used, the no auto qos voip command will
not remove the global QoS configurations that were enabled by Cisco AutoQoS. You need
to remove them manually. (Refer to Task 2, Step 3 for the global QoS configurations.)






Note When removing Cisco AutoQoS from WGxR1 and WGxR2, the encapsulation on your serial
interfaces may be returned to HDLC, the Cisco default serial interface encapsulation. Be
sure to reconfigure your serial interfaces for PPP encapsulation on both WGxR1 and
WGxR2.
Step 10 On both of your workgroup routers, issue the show ip interface brief command and
ensure that the serial 0/0 interface is up. The Multilink interface should be removed
when Cisco AutoQoS has been disabled.








42 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Step 11 Save your running configurations of the workgroup routers and the workgroup switch
to the startup-config in NVRAM.
Configuring QoS with Cisco AutoQoS Lab Results
Record your extended ping results in the two tables below:
WGxR1 to WGxR2 Cisco AutoQoS ping Results
Packet Size
Without AutoQoS
(From Lab 2-2)
With AutoQoS
(This Lab)
160 bytes min/avg/max min/avg/max
Extended ping 1
Extended ping 2
Extended ping 3
success rate % success rate %
Extended ping 1
Extended ping 2
Extended ping 3
WGxR2 to WGxR1 Cisco AutoQoS ping Results
Packet Size
Without AutoQoS
(From Lab 2-2)
With AutoQoS
(This Lab)
160 bytes min/avg/max min/avg/max
Extended ping 1
Extended ping 2
Extended ping 3
success rate % success rate %
Extended ping 1
Extended ping 2
Extended ping 3
Record your WGxR1 show interfaces multilink results in this table:
2009 Cisco Systems, Inc. Lab Guide 43
WGxR1 Cisco AutoQoS show interface Results
Without AutoQoS
(From Lab 2-2)
show interface s0/0
With AutoQoS
(This Lab)
show interface multilink
Queuing Strategy
Reliability, Txload, Rxload
Total Output Drops
Output Queue: size/max total
Output Queue:
threshold/drop/interleaves
Packets Output
Drop % (Calculated by you as:
Total Output Drop / Packets
Output)
Record your WGxR2 show interfaces serial 0/0 results in this table:
WGxR2 AutoQoS show interface Results
Without AutoQoS
(From Lab 2-2)
show interface s0/0
With AutoQoS
(This Lab)
show interface multilink
Queuing Strategy
Reliability, Txload, Rxload
Total Output Drops
Output Queue: size/max total
Output Queue:
threshold/drop/interleaves
Packets Output
Drop % (Calculated by you as:
Total Output Drop / Packets
Output)
Activity Verification
You have completed this task when you attain these results:
You have successfully completed the QoS baseline measurement after enabling Cisco
AutoQoS by recording ping and interface statistics.
You have compared the results of the traffic measurement to those from the QoS Baseline
Lab and correctly answered the questions contained within the lab.
You have successfully removed Cisco AutoQoS configuration from your workgroup
routers and switch.
44 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 3-1 Answer Key: Configuring QoS with Cisco AutoQoS
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.
Step 1 The following configuration is entered to enable Cisco AutoQoS on the WGxR1 and
WGxR2 routers:







Step 2 The following configuration is entered to enable Cisco AutoQoS on the WGxS1
switch:



Step 3 The following are the answers to the questions in this lab exercise:
Is the ping maximum response time shorter than before Cisco AutoQoS was enabled? Explain.
Yes, because ping was moved into the Expedited Forwarding class with VoIP traffic. The
minimum time may be higher because the traffic generation tools are generating traffic at
different data rates.
Is the drop rate higher, lower, or about the same as before Cisco AutoQoS was enabled?
Explain.
The drop rate is about the same because Cisco AutoQoS only affects the VoIP traffic and
not the data traffic. The VoIP traffic load in the lab is minimal compared to the data.
The following are sample QoS lab results:
Sample WGxR1 to WGxR2 AutoQoS ping Results
Packet Size
Without AutoQoS
(From Lab 2-2)
With AutoQoS
(This Lab)
160 bytes
min/avg/max
min/avg/max
Extended ping 1 8/43/120 32/54/88
Extended ping 2 16/42/116 32/53/88
Extended ping 3 12/43/112 32/54/88
success rate % success rate %
Extended ping 1 100% 100%
Extended ping 2 100% 100%
Extended ping 3 100% 100%
2009 Cisco Systems, Inc. Lab Guide 45
Sample WGxR1 Cisco AutoQoS show interface Results
Without AutoQoS
(From Lab 2-2)
show interface s0/0
With AutoQoS
(This Lab)
show interface multilink
Queuing Strategy WFQ (fair queue) WFQ (fair queue)
Reliability, Txload, Rxload 255, 209, 39 255, 245, 41
Total Output Drops 1975 216
Output Queue: size/max total 61/1000 161/1000
Output Queue:
threshold/drop/interleaves
64/1975 64/216/8534
Packets Output 131760 20530
Drop % (Calculated by you as:
Total Output Drop / Packets
Output)
1975/131760 = 1.5% 216/20530=1.1%
46 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Case Study 4-1: Classification and Marking
This case study enables you to practice the skills and knowledge learned in the module
Classification and Marking.
Activity Objectives
In this activity, you will define a QoS policy that assigns network traffic to service classes and
identify where classification and marking should be applied to the network. Upon completing
this activity, you will be able to meet these objectives:
Review customer QoS requirements
Identify QoS service class requirements
Identify network locations where classification and marking should be applied
Present a solution to the case study
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoS v2.3Lab Guide-9
Visual Objective for Case Study 4-1:
Classification and Marking
1. Review customer QoS requirements. Completely read the
customer requirements provided.
2. Identify QoS service class requirements. With the aid of your
partner, identify the service classes required to implement the
administrative QoS policy based on customer requirements.
3. Identify network locations where QoS classification and marking
should be applied. Identify locations in the network where the
QoS classification and marking mechanisms should be applied
to properly implement the administrative QoS policy.
4. Present your solution. After the instructor presents a solution to
the case study, present your solution to the class with your
partner.
Required Resources
These are the resources and equipment required to complete this activity:
Case Study Activity: Classification and Marking with QoS Service Classes
A workgroup consisting of two learners
2009 Cisco Systems, Inc. Lab Guide 47
Case Study Classification and Marking
This case study provides information regarding the QoS administrative policy requirements of a
large, multisite network. Your task is to work with a partner to evaluate the QoS requirements,
and based on these requirements, identify where QoS classification and marking mechanisms
should be applied. You will discuss your solution with the instructor and other classmates, and
the instructor will present a solution for the case study to the class.
Task 1: Classification and Marking
The activity includes these tasks:
Step 1 Review customer QoS requirements: Completely read the customer requirements
provided.
This case study involves analyzing an administrative QoS policy of the JC Whitney
Corporation, a fictitious manufacturer of medical equipment. The company has
provided you with a brief description of their requirements. It is your task to provide
the network engineers from JC Whitney with a QoS solution to meet their
requirements.
Read the customer requirements and discuss them with your partner. Identify the
different types of traffic in use in the JC Whitney network and the different service
classes required to implement their administrative QoS policy.
Company Background
JC Whitney Corporation is a leading manufacturer of medical equipment used in outpatient
surgical centers throughout the United States. The company headquarters are located in
Eugene, Oregon.
In addition to the headquarters facility, JC Whitney consists of five manufacturing facilities and
120 regional sales and distribution centers. The network at each of the manufacturing facilities
is similar to the JC Whitney corporate network. The regional sales and distribution centers are
very low-cost, low-overhead sites.
48 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-11
JC Whitney Regional Sales Office
Network
The regional sales and distribution center networks are shown in the figure.
The manufacturing strategy of JC Whitney is to leverage the expertise of contract
manufacturers through its extensive extranet of partners. Currently, the JC Whitney extranet
consists of nine contract manufacturers and suppliers that are all connected using a national
service provider backbone.
2009 Cisco Systems, Inc. Lab Guide 49
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-12
JC Whitney Extranet Network
The service provider currently uses MPLS on its backbone as shown in the figure.
Customer Situation
JC Whitney has recently opened up Internet access to its regional manufacturing facilities and
to its regional sales and distribution centers. As a result, access times to many of the company
mission-critical applications such as sales and manufacturing databases have increased
dramatically. In addition, response time between the corporate headquarters and JC Whitney
extranet partners has increased, causing database queries to time out in some instances. No new
applications have been added to the network other than enabling corporate-wide Internet
access.
The JC Whitney network engineering staff explains their network applications in this manner:
JC Whitney uses OSPF as its routing protocol on all its routers company-wide.
The corporate headquarters and the five manufacturing facilities use VoIP for all intrasite
and intersite communications.
The entire ERP database for the company is located at the corporate site. All sites
(manufacturing, regional sales and distribution centers, and extranet partners), use this
centralized database for inventory control, sales data, invoicing, and so on. Without
complete access and reachability to the ERP database and its applications, JC Whitney
could not manufacture product, ship inventory, or bill for its services.
Email is another application that is used heavily at JC Whitney. The exchange servers and
mail gateways are all located in the server farm at the corporate headquarters location.
50 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Internet services have recently been introduced company-wide. One of its largest uses has
been messaging between regional sales and distribution centers and between corporate staff
and manufacturing. No internal messaging service currently exists at JC Whitney. As a
result, the productivity gains realized by this Internet service have become somewhat
important to the company. No other business applications currently exist on the Internet.
Although the JC Whitney manufacturing facilities operate 24 hours per day, seven days per
week, the evening shifts have a reduced staff and line output. As a result, database
synchronization and server backups are performed during the evening hours. A TCP-based
backup application manages file transfers between manufacturing sites and the corporate
headquarters using an automated version of FTP. Database synchronization is also TCP-
based and has no critical bandwidth or latency requirements.
Working with the network engineering staff at JC Whitney and the service provider, you have
been enlisted to assist JC Whitney by defining QoS requirements for their network. Their first
priority is to determine what service classes to use and to identify where QoS classification and
marking mechanisms should be configured in the network to enable the JC Whitney
administrative QoS policy, resolving the response time issues that they are experiencing.
Step 2 Identify QoS service class requirements: With the aid of your partner, identify the
service classes required to implement the administrative QoS policy based on
customer requirements.
Identify the different service classes required to implement the JC Whitney
administrative QoS policy. Use the QoS Service Classes table to help you with your
answer choices. Write your answers in the table below.
JC Whitney Service Classes
Customer Traffic Service Class
2009 Cisco Systems, Inc. Lab Guide 51
QoS Service Classes
PHB DSCP DSCP
Value
Intended
Protocols and
Applications
Service
Class
Service Class and
Configuration
EF EF 101110 Interactive voice Voice Bearer Admission Control = RSVP
Queuing = Priority
AF1 AF11
AF12
AF13
001010
001100
001110
Intranet, general data
service
Bulk Data Queuing = Rate Based
Active Queue Mgt = WRED
minth AF13 < maxth AF13 <=
minth AF12 < maxth AF12 <=
minth AF11 < maxth AF11
AF2 AF21
AF22
AF23
010010
010100
010110
Database access,
transaction services,
interactive traffic,
preferred data service
Transactional Queuing = Rate Based
Active Queue Mgt = WRED
minth AF23 < maxth AF23 <=
minth AF22 < maxth AF22 <=
minth AF21 < maxth AF21
AF3 AF31
AF32
AF33
011010
011100
011110
Locally defined
mission-critical
applications
Mission-
Critical
Queuing = Rate Based
Active Queue Mgt = WRED
minth AF33 < maxth AF33 <=
minth AF32 < maxth AF32 <=
minth AF31 < maxth AF31
AF4 AF41
AF42
AF43
100010
100100
100110
Interactive video and
associated voice
Interactive
Video
Admission Control = RSVP
Queuing = Rate Based
Active Queue Mgt = WRED
minth AF43 < maxth AF43 <=
minth AF42 < maxth AF42 <=
minth AF41 < maxth AF41
CS6 Class 6 110000 Border Gateway
Protocol (BGP),
OSPF, etc.
Routing
(Reserved)
Queuing = Rate Based
Small guaranteed minimum rate
Active Queue Mgt = RED
minth < maxth, but minth is
deep to minimize loss
CS4 Class 4 100000 Often proprietary Streaming
Video
Admission Control = RSVP
Queuing = Rate Based
Active Queue Mgt = RED
minth < maxth
CS3 Class 3 011000 Session initiation
protocol (SIP), H.323,
etc.
Voice
Signaling
Queuing = Rate Based
Small guaranteed minimum rate
Active Queue Mgt = RED
minth < maxth, but minth is
deep to minimize loss
CS1 Class 1 001000 User-selected service,
point-to-point
applications
Less-than-
Best Effort
Data
(Scavenger)
Queuing = Rate Based
No bandwidth guarantee
Active Queue Mgt = RED
minth < maxth
Default Default
(Best-
Effort)
Class 0
000000 Unspecified traffic,
email
Best-Effort Queuing = Rate Based
Minimal bandwidth guarantee
Active Queue Mgt or Per-flow
fair queuing
Active Queue Mgt = RED
minth < maxth
In order to provide end-to-end QoS, multiple markers may be required. For each service class
required for the JC Whitney network, complete the table below with the appropriate value of
each specified marker.
52 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
JC Whitney QoS Service Class Requirements
Service Class
L 3 Classification L 2 Classification
DSCP PHB DSCP IP Precedence CoS MPLS EXP







Step 3 Identify network locations where classification and marking should be applied:
Identify locations in the network where the QoS classification and marking
mechanisms should be applied to properly implement the administrative QoS policy.
Using the information provided in the review of customer QoS requirements for this
case study; use the diagrams of the JC Whitney network below to indicate trust
boundaries, where classification and marking should be applied, markers in use, and
locations where QoS markers change to ensure end-to-end QoS. Use the example
shown to assist you in completing this activity. Indicate the following on the
network diagram provided:
Trust boundaries
QoS markers in use
Network locations where classification and marking should be used
Locations where QoS markers change
2009 Cisco Systems, Inc. Lab Guide 53
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-13
Example Network
The figure illustrates a sample network showing trust boundaries, where classification and
marking should be applied, and markers in use.
54 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
JC Whitney Corporate Headquarters Network
The JC Whitney network consists of a converged voice and data network. Because voice is a
business-critical application, all voice traffic should be treated appropriately. The user
community at JC Whitney ranges from novice data-entry clerks to advanced systems
programmers. As a result, security measures require that user workstations should not be
allowed to set packet priorities.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-14
JC Whitney Corporate Network
Use the network diagram of the JC Whitney corporate network to indicate the following:
Trust boundaries
QoS markers in use
Network locations where classification and marking should be used
Locations where QoS markers change
2009 Cisco Systems, Inc. Lab Guide 55
JC Whitney Regional Sales and Distribution Center Networks
The JC Whitney regional sales and distribution center networks are very low-overhead
operations. Each sales office is staffed with three to nine employees. Distribution centers are
similar to sales offices, but can be supported by up to 20 employees. The network at each center
consists of a basic 10/100 Mb/s desktop switch that is used to connect the office workstations to
the corporate headquarters or a regional manufacturing facility via a Frame Relay-connected
low-end router.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-15
JC Whitney Regional Sales Office
Network
Use the network diagram of the JC Whitney corporate network to indicate the following:
Trust boundaries
QoS markers in use
Network locations where classification and marking should be used
Locations where QoS markers change
Step 4 Present your solution: Together with your partner, present your solution to the
class. Include this information:
Customer service class requirements
Network diagrams indicating where classification and marking should be applied
Justification for differences from the solution presented by the instructor
Activity Verification
You have completed this activity when the instructor has verified your case study solution and
you have justified major deviations from the solution supplied by the instructor.
56 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Case Study 4-1 Answer Key: Classification and Marking
Identify QoS Service Class Requirements
JC Whitney Service Classes
Customer Traffic Service Class
OSPF Routing Protocol Reserved
Voice over IP Voice Bearer
Voice Signaling (Skinny, SIP, etc.) Voice Signaling
ERP (Transactional Database) Transactional Data
Email Best-Effort Data
Internet (Browsing, Messaging) Bulk Data
Backup, Synch (FTP Bulk transfer) Bulk Data
JC Whitney QoS Service Class Requirements
Service Class
L 3 Classification L 2 Classification
DSCP PHB DSCP IP Precedence CoS MPLS EXP
Reserved CS 6 48 (110 000) 6 6 6
Voice Bearer EF 46 (101 110) 5 5 5
Voice Signaling CS3 24 (011 000) 3 3 3
Transactional Data AF21 18 (010 010) 2 2 2
Bulk Data AF11 10 (001 010) 1 1 1
Best-Effort Data Default 0 (000 000) 0 0 0
2009 Cisco Systems, Inc. Lab Guide 57
Identify Network Locations Where Classification and Marking Should be Applied
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-16
Case Study Results:
JC Whitney Service Classes
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-17
Case Study Results:
QoS Service Class Requirements
58 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-18
Case Study Results:
JC Whitney Corporate Network
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-19
Case Study Results:
JC Whitney Regional Sales Office Network
2009 Cisco Systems, Inc. Lab Guide 59
Lab 4-1: Classification and Marking Using MQC
Complete this lab activity to practice what you learned in the lesson Using MQC for Class-
Based Marking in the module Classification and Marking.
Activity Objective
In this activity, you will configure classification using MQC and marking using class-based
marking. After completing this activity, you will be able to meet these objectives:
Configure an IP extended access list matching specific traffic for use in MQC classification
Configure MQC classification
Configure class-based marking
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-20
From the Cisco AutoQoS results, the E-Commerce University IT staff has determined that the
VoIP voice quality is now satisfactory. Because you did such a great job so far, the E-
Commerce University is now calling upon you to also improve the response time of the Oracle
(SQL) student administration database application over their spring break. Because Cisco
AutoQoS only works for voice traffic currently, you decide to remove the Cisco AutoQoS
configurations and to manually implement the proper QoS mechanisms using MQC.
As you learned in the Cisco QoS course, one of the first steps to implement QoS is to properly
classify and mark the traffic. Therefore, you decide the first step now for you is to implement
the proper classification and marking.
60 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
To ease into the QoS implementation, you decide to first approach the classification and
marking of the applications you feel are the bulk of the university traffic (FTP and HTTP).
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Classification and Marking Using MQC Lab Commands
Command Description





Defines an extended IP access list for TCP-based traffic
Creates a class map to be used for matching packets to a
specified class



Configures the match criteria for a class map on the basis of the
specified ACL
Creates or modifies a policy map that can be attached to one or
more interfaces


Specifies the name of the class whose policy you want to create
or change or specifies the default class
Marks a packet by setting the DSCP


Attaches a policy map to an input interface or VC, or an output
interface or VC



Displays the contents of current access lists


Displays all class maps and their matching criteria
Displays the configuration of all classes for a specified service
policy map or all classes for all existing policy maps




Displays the packet statistics of all classes that are configured for
all service policies on the specified interface or subinterface
2009 Cisco Systems, Inc. Lab Guide 61
Command Description


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity.
Your assigned workgroup pod number provided by the instructor.
Task 1: IP Extended Access List
You will configure an IP extended access list matching specific traffic for use in MQC
classification.
Activity Procedure
Complete these steps:
Step 1 Connect to the WGxR1 router. Configure an IP extended access list to match all FTP
traffic.
Step 2 On the WGxR1 router, configure a second IP extended access list to match all HTTP
(WWW) traffic.
Step 3 Display and verify your IP extended access list configuration.






Activity Verification
You have completed this task when you attain this result:
You have configured an IP extended access list matching specific traffic for use in MQC
classification.
Task 2: Configure MQC Classification
You will configure MQC classification.
Activity Procedure
Complete these steps:
Step 1 Create two new class maps called match-ftp and match-www to match the FTP and
WWW traffic, respectively.
62 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Step 2 Display and verify your class-map configuration.








Activity Verification
You have completed this task when you attain this result:
You have configured MQC classification.
Task 3: Configure Class-Based Marking
You will configure class-based marking.
Activity Procedure
Complete these steps:
Step 1 Create a policy map on your workgroup WGxR1 router, named mark-apps, that
includes the two newly configured traffic classes (match-ftp and match-www). Use
class-based marking to mark the FTP traffic to AF 11 and the WWW traffic to DSCP 0.
Step 2 Display and verify your policy-map configuration.





Step 3 Apply the policy map to the Fast Ethernet 0/0 interface of your WGxR1 router in the
inbound direction.
Step 4 Display and verify your service policy.
























2009 Cisco Systems, Inc. Lab Guide 63
Step 5 How many packets have been matched and marked on WGxR1 for each traffic class?
Class ftp __________________
Class www __________________
Class class-default __________________
Step 6 Repeat Steps 1 through 9 for workgroup router WGxR2.
Step 7 How many packets have been matched and marked on WGxR2 for each traffic class?
Class ftp __________________
Class www __________________
Class class-default __________________
Step 8 Save your running configurations of the workgroup routers and the workgroup switch
to the startup-config in NVRAM.
Activity Verification
You have completed this task when you attain these results:
You have correctly created MQC classification for FTP and HTTP traffic.
You have correctly configured MQC marking to mark FTP traffic as AF11 and HTTP
traffic as DSCP 0.
You have correctly enabled MQC classification and marking by applying the service policy
to both workgroup routers.
Lab 4-1 Answer Key: Classification and Marking Using MQC
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.

















64 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 4-2: Classification Using NBAR
Complete this lab activity to practice what you learned in the lesson Using NBAR for
Classification in the module Classification and Marking.
Activity Objective
In this activity, you will configure classification using NBAR. After completing this activity,
you will be able to meet these objectives:
Discover network applications and traffic using NBAR protocol discovery
Configure class-based marking using NBAR classification
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-21
After studying your current classification and marking strategy, you realize that using extended
IP access lists cannot properly classify all the traffic now running on the network. One issue is
that there are too many applications being classified into the class-default. Therefore, you
decide to configure NBAR for your classification requirements. Before you configure protocol
matching with NBAR, you decide first to analyze the network using NBAR protocol discovery
to validate your assumptions about the traffic currently traversing the network. After all traffic
has been properly identified, you plan to configure a new class-based marking policy to classify
and mark the applications running on the network.
2009 Cisco Systems, Inc. Lab Guide 65
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Classification and Marking Using NBAR Lab Commands
Command Description


Removes a service policy from an input or output interface


Configures NBAR to discover traffic for all protocols known to
NBAR on a particular interface



Displays the statistics gathered by the NBAR protocol discovery
feature


Clears NBAR protocol discovery statistics


Defines an IP access list by name




Sets conditions to allow a packet to pass a named IP access list




Sets conditions to allow a packet to pass a named IP access list
Creates a class map to be used for matching packets to a
specified class
Configures the match criteria for a class map on the basis of the
specified protocol



Configures the match criteria for a class map on the basis of the
specified ACL
Creates or modifies a policy map that can be attached to one or
more interfaces


Specifies the name of the class whose policy you want to create
or change or specifies the default class
66 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Command Description
Marks a packet by setting the DSCP


Attaches a policy map to an input interface or VC, or an output
interface or VC


Displays all class maps and their matching criteria
Displays the configuration of all classes for a specified service
policy map or all classes for all existing policy maps




Displays the packet statistics of all classes that are configured for
all service policies on the specified interface or subinterface


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity.
Your assigned workgroup pod number provided by the instructor
Task 1: Discover Applications and Traffic Using NBAR
You will discover network applications and traffic using NBAR protocol discovery.
Activity Procedure
Complete these steps:
Step 1 Disable the existing inbound service policy on the Fast Ethernet 0/0 interface of your
WGxR1 router.
Step 2 Verify that Cisco Express Forwarding is enabled on your WGxR1 router.
Step 3 Enable NBAR protocol discovery on the Fast Ethernet 0/0 interface of your WGxR1
router.
Step 4 Clear the NBAR protocol discovery counters on WGxR1.
Step 5 Wait for the interface counters to accumulate traffic statistics for at least one minute.
2009 Cisco Systems, Inc. Lab Guide 67
Step 6 Display the NBAR protocol discovery traffic statistics of all NBAR discovered
protocols.





















Step 7 In the space provided below, list the protocols discovered by NBAR protocol
discovery:
1. 2. 3.
4. 5. 6.
7. 8. 9.
10. 11. 12.
Step 8 Disable NBAR protocol discovery from the Fast Ethernet 0/0 interface on WGxR1.
Step 9 Repeat Steps 1 through 8 for workgroup router WGxR2.
Activity Verification
You have completed this task when you attain this result:
You have properly configured NBAR protocol discovery to identify network applications.
68 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 2: Configure Classification Using NBAR
You will configure classification of discovered applications using NBAR classification.
Activity Procedure
Complete these steps:
Step 1 On the WGxR1 router, configure NBAR classification and MQC marking to classify
inbound traffic on the Fast Ethernet 0/0 interface and mark it as outlined in the table
below. Completion of this lab step will require the configuration of five new class
maps (one for each service class) and the configuration of a policy map (called
mark-nbar) that marks traffic in each class appropriately.
Note Remember that by default a class map is set to match all. If you are matching multiple
protocols in the same class, remember to use match-any instead of match-all.
Class Name
(class-map name)
Protocol PHB
real-time rtp/rtcp EF
real-time icmp EF
mission-critical sqlnet
voice-control (port specific
tcp and udp)
AF31
interactive citrix AF21
bulk ftp AF11
scavenger kazaa2 CS 1
scavenger napster CS 1
class-default all others BE
When using NBAR to match RTP packets, one limitation is that protocol matching
for RTP does not match control packets. This is somewhat of an advantage in that it is
preferred that voice bearer traffic be separated from voice control traffic because each
traffic type receives different QoS treatment (EF for voice bearer and AF31 for voice
control).
Create the following named access list for matching RTCP traffic:


Match the named access list, VoIP-RTCP, into the real-time traffic class along with
the RTP and ICMP traffic.
2009 Cisco Systems, Inc. Lab Guide 69
The mission-critical class should be configured to contain both the sqlnet traffic and
voice-control traffic. Use this ACL to match voice control traffic when creating the
mission-critical class on your router:








Note Recall that ICMP traffic has been placed in the real-time class as a means of measuring
QoS performance.
Step 2 Display and verify your class map configuration.





















Step 3 Display and verify your policy map configuration.














Step 4 Apply the policy map to the Fast Ethernet 0/0 interface of your WGxR1 router in the
inbound direction.
Step 5 Wait for the interface counters to accumulate traffic statistics for at least one minute.
Step 6 Display and verify your service policy on interface Fast Ethernet 0/0.


70 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.









































Step 7 How many packets have been matched and marked for each of the traffic classes?
Class real-time _______________________________
Class mission-critical _______________________________
Class interactive _______________________________
Class bulk _______________________________
Class scavenger _______________________________
Class class-default _______________________________
Note If the real-time, mission-critical, and scavenger classes have no matches, verify your class-
map configuration to ensure they are set to match-any and not match-all.
Step 8 Repeat Steps 1 through 6 for workgroup router WGxR2.
2009 Cisco Systems, Inc. Lab Guide 71
Step 9 How many packets have been matched and marked for each of the traffic classes?
Class real-time _______________________________
Class mission-critical _______________________________
Class interactive _______________________________
Class bulk _______________________________
Class scavenger _______________________________
Class class-default _______________________________
Step 10 Save your running configurations of the workgroup routers and the workgroup switch
to the startup-config in NVRAM.
Activity Verification
You have completed this task when you attain these results:
You have correctly configured NBAR classification.
You have correctly configured class-based marking of NBAR classified traffic.
Lab 4-2 Answer Key: Classification Using NBAR
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.




NBAR should have discovered the following protocols:
HTTP Citrix SQL*Net
Napster NetBIOS FTP
Exchange Kazaa2 LDAP
RTP Unknown
















72 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.





























2009 Cisco Systems, Inc. Lab Guide 73
Lab 4-3: Configuring QoS Preclassify
Complete this lab activity to practice what you learned in the lesson Configuring QoS
Preclassify in the module Classification and Marking.
Activity Objective
In this activity, you will configure and examine QoS preclassify. After completing this activity,
you will be able to meet these objectives:
Configure a GRE tunnel
Configure QoS preclassify on a Cisco IOS router using a GRE tunnel
Monitor QoS preclassify configurations
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-22
The E-Commerce University IT staff has decided to implement a GRE tunnel between the
north and south campus via the existing 768-kb/s Internet connection. After the GRE tunnel is
set up and working properly, IPsec will also be enabled over the GRE tunnel. At this point, the
E-Commerce University IT staff needs you to first configure and test the GRE tunnel (without
IPsec). The university plans to send different types of traffic over the tunnel and would like to
be able to differentiate between different traffic flows so that QoS can be applied. In this lab,
you will configure and verify the QoS preclassify feature for traffic classification over a GRE
tunnel.
74 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Required Resources
These are the resources and equipment required to complete this activity.
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Configuring VPN QoS Lab Commands
Command Description
Enters interface configuration mode and the physical interface
identification
Enables QoS preclassification
Enables Cisco Express Forwarding on the router
Disables an interface


Lists a summary of an interface IP information and status


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity.
Your assigned workgroup pod number provided by the instructor
2009 Cisco Systems, Inc. Lab Guide 75
Task 1: Configure GRE Tunnel
You will configure a GRE tunnel.
Activity Procedure
Complete these steps:
Step 1 Verify that the S0/0 and S0/1 interfaces of your workgroup WGxR1 and WGxR2
routers are UP.






Step 2 Verify that Cisco Express Forwarding switching is still enabled on both workgroup
routers in your pod.
Step 3 Configure a GRE tunnel between your WGxR1 and WGxR2 routers via the service
provider core as follows:















Step 4 Configure a static route via the tunnel 0 interface to the 10.1.x.0 or 10.3.x.0 subnet
on the respective WGxR router as follows:








76 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Step 5 Display the tunnel interface and verify that it is UP and operational.
























Step 6 Use Telnet to connect to the Callgen-1 (10.1.x.11) router and perform a traceroute to
the Callgen-2 (10.3.x.11) router. Verify that the path goes through your GRE tunnel.








Step 7 Use Telnet to connect to the Callgen-2 router and perform a traceroute to the
Callgen-1 router. Verify that the path goes through your GRE tunnel.








Step 8 Issue the show queue serial0/1 command to display the WFQ information for the
serial 0/1 interface.












2009 Cisco Systems, Inc. Lab Guide 77
Note You may have to run the show queue interface command a few times until you catch an
active flow. If you are not able to see packets in the queue after several attempts, log onto
your other workgroup router and repeat Step 8.
How many active flows does the router see? ____________________________
Notice that when QoS preclassify is not configured, the output interface sees only one flow,
which is Protocol 47 (GRE).
Activity Verification
You have completed this task when you attain this result:
You have successfully configured a tunnel interface between WGxR1 and WGxR2 through
the service provider backbone.
Task 2: Configure QoS Preclassify
You will configure QoS preclassify on a Cisco IOS router.
Activity Procedure
Complete this step:
Step 1 Configure the QoS preclassify feature on the tunnel interface.
Activity Verification
You have completed this task when you attain this result:
You have successfully enabled the QoS preclassify feature on the tunnel interface.
78 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 3: Monitor QoS Preclassify
You will monitor QoS preclassify operations.
Activity Procedure
Complete these steps:
Step 1 Issue the show queue serial0/1 command again to display the WFQ information for
the serial 0/1 interface.


























Note You may have to run the show queue interface command a few times until you catch some
active flows.
What happens when QoS preclassify is configured on the tunnel interface?
________________________________________________________________
Can WFQ now distinguish between different application flows? Or does WFQ still only see
one flow, protocol 47 (GRE)?
___________________________________________________________________
Step 2 On the WGxR1 and WGxR2 routers, remove the static route via the tunnel interface.
Step 3 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
Activity Verification
You have completed this task when you attain this result:
You have successfully examined the difference in traffic flows with and without the QoS
preclassify feature enabled.
2009 Cisco Systems, Inc. Lab Guide 79
Lab 4-3 Answer Key: Configuring QoS Preclassify
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.
WGxR1:








WGxR2:









The following are the answers to the questions in this lab exercise:
What happens when QoS preclassify is configured on the tunnel interface?
The original packet headers are visible to the tunnel 0 interface and therefore useable for
QoS manipulation.
Can WFQ now distinguish between different application flows? Or does WFQ still only see
one flow, protocol 47 (GRE)?
Multiple flows are now visible.
80 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 4-4: LAN-Based Packet Classification and
Marking
Complete this lab activity to practice what you learned in the lesson Configuring LAN
Classification and Marking in the module Classification and Marking.
Activity Objective
In this activity, you will configure LAN-based classification and marking. After completing
this activity, you will be able to meet these objectives:
Configure a trust boundary on a Cisco Catalyst 2950 Switch to only trust Cisco IP phones
Configure CoS-to-DSCP mapping on a Catalyst 2950 Switch
Configure IP access lists and class-based marking on a Catalyst 2950 Switch to mark traffic
Verify the QoS markings from the workgroup switch using the workgroup routers
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-23
Your research into classification and marking policy has you concerned that students might
inject their traffic into the network with CoS and DSCP markings that are not in accordance
with the new QoS policy. Not forgetting the QoS requirements of the Cisco IP phones
connected in the wiring closet, you decide to establish a trust boundary that extends to these IP
phones.
2009 Cisco Systems, Inc. Lab Guide 81
In addition, you also wish to classify and mark traffic as close to the source as possible.
Studying the default CoS-to-DSCP marking maps on your Catalyst 2950 Switches, you
discover that CoS 5 (which is set in your IP phone endpoints automatically) is currently
mapped to DSCP 40. You would like this to map to EF (DSCP 46) and decide to change the
default CoS-to-DSCP mapping in your Catalyst 2950 Switches.
Another issue is that the network also contains IP voice gateway devices that generate G.711
voice traffic, but cannot mark CoS or DSCP. You will have to implement classification and
marking at your trust boundary using access lists to accommodate these voice gateways.
Required Resources
These are the resources and equipment required to complete this activity.
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
LAN Based Packet Classification and Marking Lab Commands
Command Description


Configures the port trust state


Sets a port priority for the incoming untagged frames or the
priority of frames received by the IP phone connected to the
specified port



Defines the CoS-to-DSCP map or DSCP-to-CoS map





Configures a standard IP ACL
Creates a class map to be used for matching packets to the
class whose name you specify




Defines the match criteria to classify traffic
Creates or modifies a policy map that can be attached to
multiple interfaces
82 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Command Description


Specifies the name of the class whose policy you want to create
or change or specifies the default class
Classifies IP traffic by setting a DSCP value


Applies a policy map defined by the policy-map command to
the input of a particular interface


Displays ACLs configured on the switch


Displays QoS class maps


Displays QoS policy maps


Displays QoS mapping information


Displays QoS information at the interface level


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity.
Your assigned workgroup pod number provided by the instructor
Task 1: Configure Trust Boundary
You will configure a trust boundary on a Catalyst 2950 Switch to only trust Cisco IP phones.
Activity Procedure
Complete this step:
Step 1 Assuming there is a Cisco IP phone connected to your workgroup WGxS1 switch
Fast Ethernet 0/1 port, establish a trust boundary on your workgroup WGxS1 switch
Fast Ethernet 0/1 interface by setting your workgroup WGxS1 switch Fast Ethernet
0/1 interface to only trust CoS from the Cisco IP phone.
Note Because there is not a Cisco IP phone connected to your workgroup switch in the lab, all the
incoming frames will have the CoS value set to the default port CoS of 0 by your workgroup
switch.
Activity Verification
You have completed this task when you attain this result:
You have properly configured a trust boundary on the WGxS1 switch to only trust Cisco IP
phones.
2009 Cisco Systems, Inc. Lab Guide 83
Task 2: Configure CoS-to-DSCP Mapping
You will configure CoS-to-DSCP mapping on a Catalyst 2950 Switch.
Activity Procedure
Complete these steps:
Step 1 Display the default CoS-to-DSCP mapping on your workgroup WGxS1 switch.










What is the default mapping of CoS 5?
CoS 5 = DSCP _____
What is the DSCP PHB represented by the default mapping of CoS 5 on the Catalyst 2950?
___________________________________________
Step 2 Notice from Step 2 that the Catalyst 2950 default CoS-to-DSCP mapping does not
map CoS 5 to DSCP 46.
On your WGxS1 switch, change the default CoS-to-DSCP mapping to map CoS 5 to DSCP 46,
because the downstream devices are expecting voice (CoS 5) traffic to be marked with DSCP
46 (EF). All other CoS-to-DSCP mappings can remain at their default values.
Step 3 Display and verify the new CoS-to-DSCP mapping on your workgroup WGxS1
switch. Verify that CoS 5 is now being mapped to DSCP 46.









Activity Verification
You have completed this task when you attain this result:
You have properly configured the CoS-to-DSCP mapping on WGxS1 to map CoS 5 to
DSCP 46.
84 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 3: Configure IP Access Lists and Class-Based Marking
You will configure IP access lists and class-based marking on a Catalyst 2950 Switch to mark
traffic.
Activity Procedure
Complete these steps:
Step 1 Assume that the Callgen routers (10.1.x.11 and 10.3.x.11) are the voice gateways
described earlier and the Callgen routers are not marking voice traffic with DSCP 46
(EF).
On your WGxS1 switch, create a policy map called mark-callgen, which uses two
access lists and class-based marking to mark all the traffic from the Callgen routers
(10.1.x.11 and 10.3.x.11) to DSCP 46 (EF). Name the two new service classes
callgen1 and callgen2.
Apply your class-based marking policy to the Fast Ethernet 0/1 interface on your
WGxS1 switch in the inbound direction.
Step 2 Display and verify your IP access-list configuration.





Step 3 Display and verify your class-map configuration.









Step 4 Display and verify the configuration of your class-based marking policy.








Step 5 Display and verify that your service policy is properly applied to the Fa0/1 interface
in the inbound direction, and also verify the trust setting and the default CoS value.








2009 Cisco Systems, Inc. Lab Guide 85
Activity Verification
You have completed this task when you attain this result:
You have correctly configured IP access lists and class-based marking on WGxS1 to mark
traffic from the Callgen routers DSCP 46.
Task 4: Verify QoS Markings
You will verify the QoS markings from the workgroup switch using the workgroup routers.
Activity Procedure
Complete these steps:
Step 1 To verify that the Catalyst 2950 classification and marking configuration is working
correctly, you will configure a class map on your workgroup router to count marked
packets. These verification steps should be performed on both workgroup routers
WGxR1 and WGxR2.
Step 2 On WGxR1, configure a new class map called match-sw-ef to match DSCP 46
traffic from the WGxS1 switch.
Step 3 On WGxR1, configure a second new class map called match-sw-be to match DSCP
0 traffic from the WGxS1 switch.
Step 4 Display and verify the two new class maps configured on WGxR1.








Step 5 Configure a new policy map called verify-mark on WGxR1, which contains the two
new traffic classes, match-sw-ef and match-sw-be.
Step 6 Display and verify the policy-map configuration on WGxR1.



Step 7 Disable the existing inbound service policy on the Fast Ethernet 0/0 interface of
WGxR1.
Caution Do not remove the actual policy map, which contains the real-time, mission-critical,
interactive, bulk, and scavenger traffic classes, because you will use this policy map in later
labs.
Step 8 Apply the new verify-mark policy to the Fast Ethernet 0/0 interface of WGxR1 in
the inbound direction.
86 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Step 9 Display and verify that the policy map is being applied correctly on the Fast
Ethernet 0/0 interface.


















How many packets have been matched for each of the traffic classes?
Traffic Class WGxR1 WGxR2
match-sw-ef
match-sw-be
default

Step 10 Repeat Steps 1 through 9 for router WGxR2.
Step 11 Remove the inbound service policy from the Fast Ethernet 0/0 interface on both the
WGxR1 and WGxR2 routers.
Step 12 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
Activity Verification
You have completed this task when you attain this result:
You have correctly verified the QoS markings from WGxS1 by configuring a QoS policy
on WGxR1 and WGxR2 to count marked packets.
2009 Cisco Systems, Inc. Lab Guide 87
Lab 4-4 Answer Key: LAN-Based Packet Classification and
Marking
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.






















88 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 5-1: Configuring Basic Queuing
Complete this lab activity to practice what you learned in the lesson Configuring FIFO and
WFQ of the module Congestion Management.
Activity Objective
In this activity, you will configure WFQ on a router to improve QoS. After completing this
activity, you will be able to meet these objectives:
Configure FIFO queuing on Cisco routers
Configure WFQ on Cisco routers
Use the proper show commands to monitor and verify the WFQ operation
Use Cisco IOS monitoring commands and network connectivity tools (ping) to gather
network response time data
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-24
Once the proper classification and marking are implemented, the next step in completing the E-
Commerce University QoS policy is to implement queuing mechanisms. Being an adventurous
network engineer, and to gain a better understanding of the various queuing mechanisms, you
decide to first explore two of the more basic queuing methods: FIFO and WFQ.
2009 Cisco Systems, Inc. Lab Guide 89
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Configuring Basic Queuing Lab Commands
Command Description
Disables an interface


Displays statistics for all interfaces configured on the router or
access server
Enters interface configuration mode and the physical interface
identification



Enables WFQ for an interface
Clears the interface counters


Displays the contents of packets inside a queue for a particular
interface


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity.
Your assigned workgroup pod number provided by the instructor
90 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 1: Configure FIFO Queuing
You will configure FIFO queuing on Cisco routers.
Activity Procedure
Complete these steps:
Step 1 Knowing that the S0/0 interface on WGxR1 is 384 kb/s, what will be the default
queuing mechanism? _____________________________________________
Step 2 Verify your answer by displaying the current queuing mechanism on the S0/0
interface of WGxR1.


























Step 3 Disable WFQ on the serial 0/0 interface of the WGxR1 and WGxR2 routers.
Which queuing method is S0/0 using now after WFQ was disabled?
_________________________________________________
Step 4 Display the current queuing mechanism on the workgroup WGxR1 router S0/0
interface to verify your answer.
















2009 Cisco Systems, Inc. Lab Guide 91







Step 5 Perform an extended ping from WGxR1 to WGxR2 using a repeat count of 100 and
a size of 160 bytes and record the results in the table at the end of this lab.












Step 6 Repeat the extended ping two more times and record your results in the table at the
end of this lab.
Step 7 Repeat Steps 5 and 6, but ping from WGxR2 to WGxR1 serial 0/0 interface and
record the response time results in the table at the end of this lab.
Step 8 What are some disadvantages of using FIFO queuing for the voice and mission-
critical traffic? ___________________________________________________
Activity Verification
You have completed this task when you attain this result:
You have successfully configured FIFO queuing on WGxR1 and WGxR2.
Task 2: Configure WFQ
You will configure WFQ on Cisco routers.
Activity Procedure
Complete this step:
Step 1 Re-enable WFQ on the serial 0/0 interface of both WGxR1 and WGxR2. Use the
default congestion discard threshold and the default maximum conversations.
Activity Verification
You have completed this task when you attain this result:
You have successfully configured WFQ on WGxR1 and WGxR2.
92 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 3: Monitor and Verify WFQ
You will use the proper show commands to monitor and verify the WFQ operation.
Activity Procedure
Complete these steps:
Step 1 Display the interface statistics of the serial 0/0 interface.




























Step 2 What is the default CDT?
___________________________________________________________
Step 3 What is the default number of maximum conversations on the S0/0 interface?
___________________________________________________________
Step 4 Change the maximum number of conversations on the S0/0 interface of WGxR1 and
WGxR2 to 1024.
Step 5 Display the interface statistics of the serial 0/0 interface and verify that the
maximum conversations have been correctly changed.














2009 Cisco Systems, Inc. Lab Guide 93














Step 6 What is a benefit of increasing the maximum conversations?
________________________________________________________
Step 7 Clear the interface counters on your WGxR1 and WGxR2 routers.
Step 8 Examine the active dynamic queues set up by WFQ. You may only see flows on one
of your workgroup routers because of the traffic flow patterns between the Pagent-1
and Pagent-2 routers.





















How many packets have been dropped? _________________________
What is the number of active conversations? _____________________
What is the number of maximum active conversations? _____________
What is the maximum number of total conversations? ______________
What is the available bandwidth and how is it calculated?
_____________________________________________________________
What is the significance of the weight in these conversations?
_____________________________________________________________
What factor or factors can influence the weight? ____________________________
94 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Activity Verification
You have completed this task when you attain this result:
You have examined WFQ router parameters and monitored command output and
successfully answered the questions contained in this lab exercise.
2009 Cisco Systems, Inc. Lab Guide 95
Task 4: Gather Network Response Time Data
You will use Cisco IOS monitoring commands and network connectivity tools (ping) to gather
network response time data.
Activity Procedure
Complete these steps:
Step 1 Perform an extended ping from WGxR1 to WGxR2 using a repeat count of 100 and
a size of 160 bytes and record the results in the table at the end of this lab.












Step 2 Repeat the extended ping two more times and record your results in the table at the
end of this lab.
Step 3 Repeat Steps 1 and 2, but ping from the WGxR2 to WGxR1 serial 0/0 interface and
record the response time results in the table at the end of this lab.
Did the ping response time improve compared to when FIFO was the queuing
method? _________________________________________________________
Step 4 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
WGxR1 RTT Measurement Worksheet
Network Situation
Ping 1 RTT
(min/ave/max)
Ping 2 RTT
(min/ave/max)
Ping 3 RTT
(min/ave/max)
Before Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)

After Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)

After enabling Cisco Auto-QoS
(from 3-1: Configuring QoS with
Cisco AutoQoS)

FIFO (from 5-1: Configuring Basic
Queuing)

WFQ (from 5-1: Configuring Basic
Queuing)

96 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
WGxR2 RTT Measurement Worksheet
Network Situation
Ping 1 RTT
(min/ave/max)
Ping 2 RTT
(min/ave/max)
Ping 3 RTT
(min/ave/max)
Before Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)

After Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)

After enabling Cisco Auto-QoS
(from 3-1: Configuring QoS with
Cisco AutoQoS)

FIFO (from 5-1: Configuring Basic
Queuing)

WFQ (from 5-1: Configuring Basic
Queuing)

Activity Verification
You have completed this task when you attain this result:
You have compared the round-trip response times for packets traversing a serial interface
using FIFO queuing to an interface using WFQ.
Lab 5-1 Answer Key: Configuring Basic Queuing
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.
Sample WGxR1 RTT Measurement Worksheet
Network Situation
Ping 1 RTT
(min/ave/max)
Ping 2 RTT
(min/ave/max)
Ping 3 RTT
(min/ave/max)
Before Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)
8/8/12 8/8/12 8/9/16
After Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)
8/43/120 16/42/116 12/43/112
After enabling Cisco Auto-QoS
(from 3-1: Configuring QoS with
Cisco AutoQoS)
32/54/88 32/53/88 32/54/88
FIFO (from 5-1: Configuring Basic
Queuing)
28/122/265 44/129/228 28/131/249
WFQ (from 5-1: Configuring Basic
Queuing)
12/46/128 16/48/188 12/43/121
2009 Cisco Systems, Inc. Lab Guide 97
The following are the answers to the questions in this lab exercise:
Knowing that the S0/0 interface on WGxR1 is 384 kb/s, what will be the default queuing
mechanism?
Weighted fair queuing
Which queuing method is S0/0 using now after WFQ was disabled?
First-in, first-out (FIFO)
What are some disadvantages of using FIFO queuing for voice and mission-critical traffic?
Smaller packets can suffer excessive delay and variable delay waiting in a FIFO queue
behind larger data packets. Aggressive flows can also starve fragile flow types such as
voice and interactive traffic.
What is the default CDT?
64
What is the default number of maximum conversations on the S0/0 interface?
128
What is a benefit of increasing the maximum conversations?
The probability that two distinct flows will be classified into the same dynamic queue is
reduced.
What is the available bandwidth and how is it calculated?
Available bandwidth in this case is 288 kb/s. Available bandwidth is calculated as 75
percent of the configured interface bandwidth.
What is the significance of the weight in these conversations?
Weight is used by WFQ to reduce the finish time of queued packets, making them appear
smaller than they are to WFQ. This results in faster dispatching of lower weighted
packets.
What factor(s) can influence the weight?
IP precedence or DSCP class selector markings can influence WFQ weight.
98 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 5-2: Configuring LLQ
Complete this lab activity to practice what you learned in the lesson Configuring CBWFQ and
LLQ in the module Congestion Management.
Activity Objective
In this activity, you will configure LLQ on a router to improve QoS. After completing this
activity, you will be able to meet these objectives:
Configure LLQ on a Cisco router to provide bandwidth guarantees
Use the proper show commands to monitor and verify the LLQ operation
Use Cisco IOS monitoring commands and network connectivity tools (ping) to gather
network response time data
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-25
In Lab Exercise 5-1, you examined both FIFO queuing and WFQ.
FIFO is a first-come, first-serve queuing strategy. As such, FIFO does not classify traffic into
different flows, or provide differentiated treatment to packets. FIFO does not fairly allocate
bandwidth among multiple flows. Some flows may receive more bandwidth because they
contain larger packets, or because they send more packets (aggressive flows). FIFO does not
give priority to voice traffic or mission-critical traffic, because it cannot differentiate between
packets from different flows. Therefore, if FIFO is implemented on the serial WAN links, the
configuration will not meet the E-Commerce University requirements for the voice and Oracle
(SQL) traffic.
2009 Cisco Systems, Inc. Lab Guide 99
After FIFO queuing, WFQ was enabled on the workgroup routers. With WFQ, packets are
automatically classified into a particular dynamic queue based on information contained within
the protocol headers. WFQ automatically assigns a weight to the packets. The weight is based
on the IP precedence value and the size of the packets. Higher IP precedence and smaller-sized
packets will receive better service than lower IP precedence and larger-sized packets. However,
WFQ does not provide any hard bandwidth guarantees to voice traffic or to mission-critical
traffic. From the traffic measurement results (RTT observations), it was determined that WFQ
provided too much latency for EF traffic types. Therefore, in order to improve voice quality and
the response time of mission-critical traffic, LLQ must be implemented on the workgroup
routers.
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Configuring Queuing Hybrids Lab Commands
Command Description
Creates a class map to be used for matching packets to the class
whose name you specify




Defines the match criteria to classify traffic
Identifies a specific IP DSCP value as a match criterion
Configures the match criteria for a class map on the basis of the
specified protocol
Creates or modifies a policy map that can be attached to multiple
interfaces


Specifies the name of the class whose policy you want to create
or change or specifies the default class
Classifies IP traffic by setting a DSCP value


Gives priority to a class of traffic belonging to a policy map



Specifies or modifies the bandwidth allocated for a class
belonging to a policy map
100 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Command Description


Applies a policy map defined by the policy-map command to the
input of a particular interface





Defines an extended IP access list for TCP-based traffic



Displays the contents of current access lists


Displays all class maps and their matching criteria
Displays the configuration of all classes for a specified service
policy map or all classes for all existing policy maps




Displays the packet statistics of all classes that are configured for
all service policies on the specified interface or subinterface


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity:
Your assigned workgroup pod number provided by the instructor
2009 Cisco Systems, Inc. Lab Guide 101
Task 1: Configure LLQ
You will configure LLQ on a Cisco router to provide bandwidth guarantees.
Activity Procedure
Complete these steps:
Step 1 Connect to your WGxR1 router and verify that the QoS policy map named mark-
nbar is still configured. Apply the existing mark-nbar policy map to the Fast
Ethernet 0/0 interface in the inbound direction. If you do not have the mark-nbar
policy, it is shown below:


























Step 2 At this point, what is the expected effect on traffic flow out of the low-speed 384-
kb/s serial link (S0/0) when the mark-nbar service policy is applied on the Fast
Ethernet 0/0 interface of WGxR1 router? Explain.
____________________________________________________________________
102 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Step 3 Configure five new class maps on your workgroup WGxR1 router as described in
this table. When matching ICMP traffic, use an extended ACL instead of NBAR,
because NBAR only matches transit traffic.
Class Name (class
map name)
Match Criteria
ef-traffic EF, ICMP echo and reply
af31-traffic AF31
af21-traffic AF21
af11-traffic AF11
cs1-traffic CS 1
Step 4 Display and verify your extended IP access list for matching the ping traffic.



Step 5 Display and verify the five new class maps configured on your workgroup WGxR1
router.















2009 Cisco Systems, Inc. Lab Guide 103
Step 6 Configure a new policy map called llq-policy on your workgroup WGxR1 router, in
which each traffic class gets the following bandwidth guarantee:
Traffic Class Bandwidth Guarantee
ef-traffic 168 kb/s maximum
af31-traffic 40% of remaining bandwidth minimum
af21-traffic 20% of remaining bandwidth minimum
af11-traffic 13% of remaining bandwidth minimum
cs1-traffic 2% of remaining bandwidth minimum
class-default 25% of remaining bandwidth minimum
Activity Verification
You have completed this task when you attain these results:
You have configured LLQ on a Cisco router to provide bandwidth guarantees.
Task 2: Monitor and Verify LLQ Operation
You will use the proper show commands to monitor and verify the LLQ.
Activity Procedure
Complete these steps:
Step 1 Display and verify the llq-policy policy map on your workgroup WGxR1 router.















Step 2 Apply the new llq-policy policy map on your workgroup WGxR1 router S0/0
interface in the outbound direction.
Why must the policy be applied in the outbound direction and not the inbound
direction? Explain. _______________________________________________
Step 3 Repeat the above LLQ configuration, Task 1 Steps 1 through 6 and Task 2 Steps 1
and 2, for the WGxR2 router.
Step 4 Wait for the interface counters to accumulate traffic statistics for at least one minute.
104 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Step 5 Display and verify the outbound service policy on your workgroup WGxR1 router
S0/0 interface.

































































2009 Cisco Systems, Inc. Lab Guide 105




Which traffic class or classes, if any, still have drops? _____________
Step 6 Display and verify the outbound service policy on your workgroup WGxR2 router
S0/0 interface.
Which traffic class or classes, if any, still have drops? _____________
Activity Verification
You have completed this task when you attain these results:
You have used the proper show commands to monitor and verify LLQ operation.
Task 3: Gather Network Response Time Data
You will use Cisco IOS monitoring commands and network connectivity tools (ping) to gather
network response time data.
Activity Procedure
Complete these steps:
Step 1 Perform an extended ping from WGxR1 to WGxR2 using a repeat count of 100 and
a size of 160 bytes and record the results in the table at the end of this lab.












Step 2 Repeat the extended ping two more times and record your results in the table at the
end of this lab.
Step 3 Repeat Steps 1 and 2, but ping from the WGxR2 to WGxR1 serial 0/0 interface and
record the response time results in the table at the end of this lab.
Step 4 Compare the ping results to the results from the previous lab exercises (2-2: Baseline
QoS Measurement; 3-1: Configuring QoS with AutoQoS).
Comparing all the results, which QoS mechanism provides the best response time
for VoIP packets? __________________________________________
Step 5 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
106 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
WGxR1 RTT Measurement Worksheet
Network Situation
Ping 1 RTT
(min/ave/max)
Ping 2 RTT
(min/ave/max)
Ping 3 RTT
(min/ave/max)
Before Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)

After Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)

After enabling Cisco Auto-QoS (from
3-1: Configuring QoS with Cisco
AutoQoS)

FIFO (from 5-1: Configuring Basic
Queuing)

WFQ (from 5-1: Configuring Basic
Queuing)

LLQ results from this lab
WGxR2 RTT Measurement Worksheet
Network Situation
Ping 1 RTT
(min/ave/max)
Ping 2 RTT
(min/ave/max)
Ping 3 RTT
(min/ave/max)
Before Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)

After Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)

After enabling Cisco Auto-QoS
(from 3-1: Configuring QoS with
Cisco AutoQoS)

FIFO (from 5-1: Configuring Basic
Queuing)

WFQ (from 5-1: Configuring Basic
Queuing)

LLQ results from this lab
Activity Verification
You have completed this task when you attain these results:
You have used Cisco IOS monitoring commands and network connectivity tools (ping) to
gather network response time data.
2009 Cisco Systems, Inc. Lab Guide 107
Lab 5-2 Answer Key: Configuring LLQ
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.




































Sample WGxR1 RTT Measurement Worksheet
Network Situation
Ping 1 RTT
(min/ave/max)
Ping 2 RTT
(min/ave/max)
Ping 3 RTT
(min/ave/max)
Before Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)
8/8/12 8/8/12 8/9/16
After Pagnet and Callgen traffic
(from 2-2: Baseline QoS
Measurement)
8/43/120 16/42/116 12/43/112
After enabling Cisco Auto-QoS (from
3-1: Configuring QoS with Cisco
AutoQoS)
32/54/88 32/53/88 32/54/88
FIFO (from 5-1: Configuring Basic
Queuing)
28/122/265 44/129/228 28/131/249
WFQ (from 5-1: Configuring Basic
Queuing)
12/46/128 16/48/188 12/43/121
LLQ results from this lab 8/17/72 8/17/56 8/19/77
108 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
The following is the answer to the question in this lab exercise:
Comparing all the results, which QoS mechanism provided the best response time for VoIP
packets?
LLQ
2009 Cisco Systems, Inc. Lab Guide 109
Lab 5-3: Configuring Queuing on a Catalyst
Switch
Complete this lab activity to practice what you learned in the lesson Configuring LAN
Congestion Management in the module Congestion Management.
Activity Objective
In this activity, you will configure the two queuing methods available on the Cisco Catalyst
2950 Switch. After completing this activity, you will be able to meet these objectives:
Examine queuing configurations resulting from the application of Cisco AutoQoS on the
Catalyst 2950 Switch
Configure and monitor CoS-to-queue mapping on the Catalyst 2950 Switch
Configure and monitor WRR queuing on the Catalyst 2950 Switch
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-26
After reviewing the Cisco AutoQoS output on the Catalyst 2950 Switch, the E-Commerce
University IT staff has a few questions about the Cisco AutoQoS-generated configurations.
After meeting with the IT staff and hopefully answering all questions, the IT staff has decided
to change the default Catalyst 2950 queuing from PQ to WRR with an expedite queue so that
only voice frames (CoS 5) will receive strict priority, while giving frames with CoS 0 to 4 a
lower weight than frames with CoS 6 to 7.
110 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Queuing on Catalyst Switches Lab Commands
Command Description
Displays the mapping of the CoS PQs


Assigns WRR weights to the four CoS priority queues
Sets the CoS map to default setting


Assigns CoS values to the CoS priority queues.
quid: The queue ID of the CoS priority queue
cos1...cosn: The CoS values that are mapped to the queue ID


Defines the CoS-to-DSCP map


Configures the port trust state
Displays the WRR bandwidth allocation for the four CoS priority
queues


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity.
Your assigned workgroup pod number provided by the instructor
2009 Cisco Systems, Inc. Lab Guide 111
Task 1: Queuing Configurations on the Cisco Catalyst 2950
Switch
You will examine queuing configurations resulting from the application of Cisco AutoQoS on
the Catalyst 2950 Switch.
Activity Procedure
Complete these steps:
Step 1 In this lab, you will first examine the default PQ on the Catalyst 2950 workgroup
switch. Then you will configure and examine WRR on the Catalyst 2950 workgroup
switch.
What is the default queuing mechanism on the Catalyst 2950 Switch?
_______________________________________________________
Step 2 Connect to your WGxS1 switch and display the CoS-to-queue mapping. Your output
should look similar to the following:



How many output queues per interface are available for the Catalyst 2950? _______
Which queue has the highest priority? __________________
Step 3 In Lab Exercise 3-1, Configuring QoS with Cisco AutoQoS, the Cisco AutoQoS for
VoIP feature was enabled on the Catalyst 2950 Switch in your workgroup. By
default, Cisco AutoQoS enables queuing as shown in the following configuration:













Step 4 What type of queuing is enabled using the above configuration? _____________
Step 5 From the wrr-queue bandwidth 20 1 80 0 command, why is the weight for queue 4
equal to 0? __________________________________________________
Step 6 What do the following commands accomplish?




________________________________________________________________
112 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Activity Verification
You have completed this task when you attain this result:
You have examined queuing configurations resulting from the application of Cisco
AutoQoS on the Catalyst 2950 Switch.
Task 2: Configure and Monitor CoS-to-Queue Mapping
You will configure and monitor CoS-to-queue mapping on the Catalyst 2950 Switch.
Activity Procedure
Complete this step:
Step 1 On the WGxS1 switch, implement WRR queuing as follows:
Configure a PQ that services all frames marked CoS 5.
Configure WRR queue 3 to service all frames marked CoS 6 and CoS 7 and
guarantee a bandwidth of 70.
Configure WRR queue 1 to service all frames marked CoS 0 to CoS 4 and guarantee
a bandwidth of 30.
WRR queue 2 is unused and should be configured as unused.
Activity Verification
You have completed this task when you attain these results:
You have configured and monitored CoS-to-queue mapping on the Catalyst 2950 Switch.
Task 3: Configure and Monitor WRR Queuing
You will monitor WRR queuing on the Catalyst 2950 Switch.
Activity Procedure
Complete these steps:
Step 1 Display and verify that CoS-to-queue mapping has been correctly configured and the
frames marked CoS 5 are serviced by the PQ.
CoS Value : 0 1 2 3 4 5 6 7
Priority Queue: 1 1 1 1 1 4 3 3
Step 2 Display and verify the weight setting for each queue.
WRR Queue: 1 2 3 4
bandwidth: 30 1 70 0
Step 3 Configure the Fast Ethernet 0/1 interface on WGxS1 to trust the CoS marking.
Step 4 Ensure that DSCP EF is marked 46 for incoming frames marked CoS 5.
Step 5 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
2009 Cisco Systems, Inc. Lab Guide 113
Activity Verification
You have completed this task when you attain this result:
You have monitored WRR queuing on the Catalyst 2950 Switch.
114 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 5-3 Answer Key: Queuing on Catalyst Switches
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.




The following are the answers to the questions in this lab exercise:
What is the default queuing mechanism on the Catalyst 2950 Switch?
Priority queuing
How many output queues per interface are available for the Catalyst 2950?
Four
Which queue has the highest priority?
Queue 4
What type of queuing is enabled using the following configuration?












WRR with an expedite queue
From the wrr-queue bandwidth 20 1 80 0 command, why is the weight for queue 4 equal to
0?
Setting the weight of queue 4 to 0 configures queue 4 as a strict priority queue, also
known as an expedite queue.
What do the following commands accomplish?



These commands map frames with CoS values to specific output queues.
2009 Cisco Systems, Inc. Lab Guide 115
Case Study 6-1: WRED Traffic Profiles
This case study enables you to practice the skills and knowledge learned in the module:
Congestion Avoidance.
Activity Objective
In this activity, you will create the appropriate WRED traffic profile to properly implement a
customer QoS administrative policy. After completing this activity, you will be able to meet
these objectives:
Review customer QoS requirements
Identify the service classes required to implement the policy
Create WRED traffic profiles that can be used to implement the policy
Present a solution to the case study
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-27
Visual Objective for Case Study 6-1:
WRED Traffic Profiles
1. Review customer QoS requirements. Completely read the
customer requirements provided.
2. Identify QoS service class requirements. With the aid of your
partner, identify the service classes required to implement the
administrative QoS policy based on customer requirements.
3. Create WRED traffic profiles. Create the WRED traffic profiles
required to properly implement the administrative QoS policy.
4. Present Your Solution. After the instructor presents a solution to
the case study, present your solution to the class with your
partner.
Required Resources
These are the resources required to complete this activity:
Case Study Activity: WRED Traffic Profiles
A workgroup consisting of two learners
116 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Administrative Policy Requirements
This case study activity provides information regarding the QoS administrative policy
requirements of a small- to mid-sized network. Your task is to work with a partner to evaluate
the QoS requirements, and, based on these requirements, create WRED traffic profiles that you
can use to implement the required QoS administrative policy. You will discuss your traffic
profile with the instructor and other classmates, and the instructor will present a solution for the
case study to the class.
Task 1: Creating WRED Traffic Profiles
Complete this step:
Step 1 Review customer QoS requirements. Completely read the customer requirements
provided.
Review Customer QoS Requirements
This case study involves analyzing an administrative QoS policy of LCR Incorporated, a
fictitious manufacturer of recumbent bicycles. The company has provided you with a short
description of their requirements. It is your task to provide the network engineers from LCR
with a QoS solution to meet their requirements.
Read the customer requirements and discuss them with your partner. Identify the different
classes of service required and hence the number of WRED traffic profiles required to solve
this customer problem.
Company Background
LCR Incorporated began making recumbent bicycles in the garage of its owner, Patrick
Cagney, in 1984. Since that time, the company has grown to be a global provider of recumbent
bicycles. Headquartered in St. Petersburg, Florida, LCR has two manufacturing facilities and
five sales offices in the United States.
Each site uses dedicated 100-Mb switching to the desktop and contains a distributed server
farm. Each site connects over a private WAN connection to the corporate headquarters using an
IP-enabled Frame Relay service from a global service provider. WAN link speeds are all T1
(1.544 Mb/s).
Customer Situation
LCR Incorporated is currently experiencing application performance problems and has an
urgent need to resolve them. Internet usage at LCR is extremely high because most of the sales
and customer contacts of the company use the Internet. The company currently has redundant,
3-Mb/s Internet connections at its headquarters. Much of the use of the Internet, however, is for
non-business-critical applications. Therefore, Internet browsing and non-critical applications
should be treated as the lowest priority.
2009 Cisco Systems, Inc. Lab Guide 117
Many of the applications at LCR, such as Oracle and Citrix, are distributed between sites
because they require collaboration between members of the LCR staff. Manufacturing and
Finance use Oracle databases to manage inventory, shipping, order entry, and customer billing.
These systems are integrated across the company and reside in the main data center at the
headquarters location. Citrix is heavily used for quality assurance monitoring of manufacturing
and its automated systems. LCR has indicated that the Oracle and Citrix transactions are critical
to the company. Internet traffic should not be allowed to interfere with Oracle or Citrix
transactions.
Working with the network engineering staff at LCR and the service provider, you have been
enlisted to assist LCR by defining QoS requirements for their network. Their first priority is to
deploy active congestion management mechanisms across the provider backbone to ease the
congestion issues they are experiencing.
Step 2 Identify QoS service class requirements. With the aid of your partner, identify the
service classes required to implement the administrative QoS policy based on
customer requirements.
Identify QoS Service Class Requirements
Identify the different traffic classes required to implement the customer administrative QoS
policy. Use the table below to help you with your answer choices. Write your answers on the
lines below:
Customer Traffic: _______________________ PHB: ____________ DSCP: ____________
Customer Traffic: _______________________ PHB: ____________ DSCP: ____________
Customer Traffic: _______________________ PHB: ____________ DSCP: ____________
118 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
QoS Service Classes
PHB DSCP DSCP
Value
Intended
Protocols and
Applications
Service
Class
Service Class and
Configuration
EF EF 101110 Interactive voice Voice Bearer Admission Control = RSVP
Queuing = Priority
AF1 AF11
AF12
AF13
001010
001100
001110
General data service,
FTP, backups
Bulk Data Queuing = Rate Based
Active Queue Mgt = WRED
minth AF13 < maxth AF13 <=
minth AF12 < maxth AF12 <=
minth AF11 < maxth AF11
AF2 AF21
AF22
AF23
010010
010100
010110
Database access,
transaction services,
interactive traffic,
preferred data service
Transactional Queuing = Rate Based
Active Queue Mgt = WRED
minth AF23 < maxth AF23 <=
minth AF22 < maxth AF22 <=
minth AF21 < maxth AF21
AF3 AF31
AF32
AF33
011010
011100
011110
Locally defined
mission-critical
applications
Mission-
critical
Queuing = Rate Based
Active Queue Mgt = WRED
minth AF33 < maxth AF33 <=
minth AF32 < maxth AF32 <=
minth AF31 < maxth AF31
AF4 AF41
AF42
AF43
100010
100100
100110
Interactive video and
associated voice
Interactive
video
Admission Control = RSVP
Queuing = Rate Based
Active Queue Mgt = WRED
minth AF43 < maxth AF43 <=
minth AF42 < maxth AF42 <=
minth AF41 < maxth AF41
CS6 Class 6 110000 BGP, OSPF, etc. Routing
(reserved)
Queuing = Rate Based
Small guaranteed minimum rate
Active Queue Mgt = RED
minth < maxth, but minth is
deep to minimize loss
CS4 Class 4 100000 Often proprietary Streaming
video
Admission Control = RSVP
Queuing = Rate Based
Active Queue Mgt = RED
minth < maxth
CS3 Class 3 011000 (SIP, H.323, etc. Call signaling Queuing = Rate Based
Small guaranteed minimum rate
Active Queue Mgt = RED
minth < maxth, but minth is
deep to minimize loss
CS1 Class 1 001000 User-selected service,
PPP Applications
Less-than-
best-effort
data
(Scavenger)
Queuing = Rate Based
No bandwidth guarantee
Active Queue Mgt = RED
minth < maxth
Default Default
(Best
Effort)
Class 0
000000 Unspecified traffic, e-
mail, Internet
Best-effort Queuing = Rate Based
Minimal bandwidth guarantee
Active Queue Mgt or Per-flow
fair queuing
Active Queue Mgt = RED
minth < maxth
Step 3 Create WRED traffic profiles. Create the WRED traffic profiles required to
correctly implement the administrative QoS policy.
2009 Cisco Systems, Inc. Lab Guide 119
Create WRED Traffic Profiles
Create a WRED traffic profile for each of the service classes identified in the previous section.
Use the table to assist you in creating your profile. When completing each profile, be sure to
draw the traffic profile and include all information on the blank profile graphic provided.
Cisco IOS Default WRED Profile Values
PHB
Minimum
Threshold
Maximum
Threshold Mark Probability
af11 32 40 1/10
af12 28 40 1/10
af13 24 40 1/10
af21 32 40 1/10
af22 28 40 1/10
af23 24 40 1/10
af31 32 40 1/10
af32 28 40 1/10
af33 24 40 1/10
af41 32 40 1/10
af42 28 40 1/10
af43 24 40 1/10
cs1 22 40 1/10
cs2 24 40 1/10
cs3 26 40 1/10
cs4 28 40 1/10
cs5 30 40 1/10
cs6 32 40 1/10
cs7 34 40 1/10
EF 36 40 1/10
RSVP 36 40 1/10
Default (BE) 20 40 1/10
120 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Traffic Profile 1:
Traffic Class: ____________________________ PHB: __________________
WRED Traffic Profile Parameters:
Minimum Threshold: _____________ Maximum Threshold: _____________
Mark Probability Denominator: __________
Traffic Profile 2:
Traffic Class: ____________________________ PHB: __________________
WRED Traffic Profile Parameters:
Minimum Threshold: _____________ Maximum Threshold: _____________
Mark Probability Denominator: __________
100%
Average
Queue
Size
Drop
Probability
2009 Cisco Systems, Inc. Lab Guide 121
Traffic Profile 3:
Traffic Class: ____________________________ PHB: __________________
WRED Traffic Profile Parameters:
Minimum Threshold: _____________ Maximum Threshold: _____________
Mark Probability Denominator: __________
Step 4 Present your solution. After the instructor presents a solution to the case study,
present your solution to the class with your partner.
Present Your Solution
Together with your partner, present your solution to the class. Include the following
information:
Customer service class requirements
WRED traffic profiles
Justification for differences from the solution presented by the instructor
Activity Verification
You have completed this activity when your case study solution has been presented to the class
and you have justified any major deviations from the case study solution supplied by the
instructor.
100%
Average
Queue
Size
Drop
Probability
122 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Case Study 6-1 Answer Key: WRED Traffic Profiles
Your case study discussion and solution should include:
Identify Customer QoS Requirements
Customer Traffic: Oracle PHB: AF2 DSCP: AF21
Customer Traffic: Citrix PHB: AF2 DSCP: AF22
Customer Traffic: Internet PHB: Default (BE) DSCP: 0
Create WRED Traffic Profiles
Traffic Profile 1:
Traffic Class: Transactional PHB: AF21
Minimum Threshold: 32 Maximum Threshold: 40 Mark Probability Denominator: 10
Traffic Profile 2:
Traffic Class: Transactional PHB: AF22
Minimum Threshold: 28 Maximum Threshold: 40 Mark Probability Denominator: 10
Traffic Profile 3:
Traffic Class: Default PHB: 0
Minimum Threshold: 20 Maximum Threshold: 40 Mark Probability Denominator: 10
100%
Average
Queue
Size
Drop
Probability
10%
20 40
No drop Random drop Full drop
100%
Average
Queue
Size
Drop
Probability
10%
20 40
No drop Random drop Full drop
100%
Average
Queue
Size
Drop
Probability
32 28
AF22 AF21
No Drop Random Drop Tail Drop
100%
Average
Queue
Size
Drop
Probability
32 28
AF22 AF21
No Drop Random Drop Tail Drop
2009 Cisco Systems, Inc. Lab Guide 123
Lab 6-1: Configuring DSCP-Based WRED
Complete this lab activity to practice what you learned in the lesson Configuring Explicit
Congestion Notification in the module Congestion Avoidance.
Activity Objective
In this activity, you will build a WRED traffic profile, given a set of parameters, and configure
DSCP-based WRED with ECN support to match that traffic profile. After completing this
activity, you will be able to meet these objectives:
Configure DSCP-based CB-WRED
Monitor DSCP-based CB-WRED
Configure DSCP-based CB-WRED with ECN
Monitor DSCP-based CB-WRED with ECN
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-32
After LLQ was successfully implemented, the voice quality definitely improved. But after
monitoring the link utilization on the low-speed 384-kb/s link for a week, it has been
determined that the average link utilization is low and must be improved.
124 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
You recall from the Cisco IOS documentation that global synchronization occurs as waves of
congestion crest only to be followed by troughs, during which the transmission link is not fully
utilized. Global synchronization of TCP hosts can occur because packets are dropped all at
once. Global synchronization happens when multiple TCP hosts reduce their transmission rates
in response to packet dropping, and once congestion is reduced, the TCP hosts again increase
their transmission rates. The most important point is that the waves of transmission, known as
global synchronization, result in significant link under-utilization.
In order to reduce TCP global synchronization to improve link utilization, CB-WRED is
required to randomly drop packets before the software queue is full. In addition, DSCP-based
CB-WRED allows different WRED (drop) profiles for different DSCP values.
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
2009 Cisco Systems, Inc. Lab Guide 125
Command List
The table describes the commands used in this activity.
DSCP-Based WRED with ECN Lab Commands
Command Description
Creates or modifies a policy map that can be attached to one or
more interfaces


Specifies the name of the class whose policy you want to create or
change or specifies the default class


Changes the minimum and maximum packet thresholds for the
DSCP value


Enables WRED or DWRED
Enables ECN
Displays the configuration of all classes for a specified service
policy map or all classes for all existing policy maps




Displays the packet statistics of all classes that are configured for
all service policies on the specified interface or subinterface


Displays QoS class maps


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity:
Your assigned workgroup pod number provided by the instructor
126 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 1: Configure DSCP-Based WRED
You will build a WRED traffic profile given a set of parameters and configure DSCP-based
WRED.
Activity Procedure
Complete this step:
Step 1 Modify the existing llq-policy policy map on the workgroup WGxR1 router and
enable DSCP-based WRED for the af11-traffic, af21-traffic, af31-traffic, cs1-traffic,
and the class-default traffic classes, with the following drop thresholds and drop
probabilities:
PHB Minimum
Threshold
Maximum
Threshold
Mark Probability
af11 26 40 1/10
af21 30 40 1/10
af31 34 40 1/10
cs1 22 40 1/10
Default (BE) 20 40 1/10
Complete the graph of the traffic profile below for all five WRED classes. Be sure to indicate
each class and the mark probability denominator.
100%
Average
Queue
Size
Drop
Probability
20 22 26 30 34 40
100%
Average
Queue
Size
Drop
Probability
20 22 26 30 34 40
2009 Cisco Systems, Inc. Lab Guide 127
Based on the previous WRED profiles, which traffic class will start dropping packets first?
________________________________________________________________________
What does a mark probability of 1/10 mean?
________________________________________________________________________
Why would you not implement WRED for the ef-traffic class?
________________________________________________________________________
Activity Verification
You have completed this task when you attain this result:
You have built a WRED traffic profile, given a set of parameters, and configured DSCP-
based WRED.
Task 2: Monitor DSCP-Based WRED
You will display the policy map to monitor DSCP-based WRED.
Activity Procedure
Complete these steps:
Step 1 Display the llq-policy policy map to verify the WRED configurations.





































128 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.









































Step 2 What is the default exponential weight constant? ____________________
Are all the drop thresholds and drop probability set correctly? __________
Step 3 Clear the counters on all interfaces on the WGxR1 router.
Step 4 Wait for the interface counters to accumulate traffic statistics for at least one minute.
Step 5 Display the output service policy on the S0/0 interface.
















2009 Cisco Systems, Inc. Lab Guide 129




































































130 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.

















































Do you see any drops from any of the traffic classes? ________________
If so, which one or ones?
___________________________________________________
Note You may see drops on only one of the workgroup routers due to the varying traffic rate from
the Pagent routers.
How many AF31 packets have been transmitted within the AF31 traffic class?
_____________________________________________________________
How many AF21 packets have been transmitted within the AF21 traffic class?
_____________________________________________________________
2009 Cisco Systems, Inc. Lab Guide 131
How many AF11 packets have been transmitted within the AF11 traffic class?
_____________________________________________________________
How many CS 1 packets have been transmitted within the CS 1 traffic class?
_____________________________________________________________
The class-default traffic class has transmitted packets marked with which DSCP
setting? _____________________________________________________________
What types of packets are marked with CS 6 by the Cisco IOS Software?
_____________________________________________________________
Step 6 Repeat Task 1 Step 1 and Task 2 Steps 1 through 5 for the WGxR2 router.
The default class has many dropped packets in it. Although WRED congestion
avoidance has been applied and is randomly dropping packets in this class, it may be
dropping packets unnecessarily. Ideally, the router should mark the traffic using the
ECN bits, then send traffic without dropping as the average queue size increases.
The ECN bits will notify the end station of congestion. The end station can signal
the sender using TCP congestion mechanics to slow down the senders traffic rate.
Activity Verification
You have completed this task when you attain these results:
You have displayed the policy map to monitor DSCP-based WRED.
Task 3: Configure DSCP-Based CB-WRED with ECN
You will configure DSCP-based CB-WRED with ECN.
Activity Procedure
Complete this step:
Step 1 Enable WRED ECN for the class-default traffic class on the WGxR1 and WGxR2
routers.
Activity Verification
You have completed this task when you attain these results:
You have configured DSCP-based CB-WRED with ECN.
Task 4: Monitor DSCP-Based WRED with ECN
You will display the policy map to monitor DSCP-based WRED with ECN.
Activity Procedure
Complete these steps:
Step 1 On WGxR1 and WGxR2, display the llq-policy policy map and verify the ECN
settings for the class-default traffic class.



132 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.




























Step 2 Clear the interface counters on both of your workgroup routers using the clear
counters command.
Step 3 Wait for the interface counters to accumulate traffic statistics for at least one minute.
Step 4 Display the output service policy on the serial 0/0 interface on both WGxR1 and
WGxR2.































2009 Cisco Systems, Inc. Lab Guide 133








































Is ECN enabled for the class-default traffic class? ______________________
What is the mean queue depth for the class-default traffic class? ______________
How many ECN-marked packets are there for the class-default traffic class, if any?
___________________________________
No packets are marked ECN, yet there are many random WRED drops in the default
class. Explain. ____________________________________________________
Step 5 On WGxR1, display the class map for the ef-traffic service class.



Step 6 On WGxR1, remove ICMP packets from the EF service class by removing the
match access-group 100 from the ef-traffic class map.
Step 7 On WGxR1, display the class map for the ef-traffic service class and verify that
ICMP (access-group 100) has been removed.



134 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Step 8 Which traffic class will the ICMP traffic belong to now that it has been removed
from the EF service class? _____________________________________________
Step 9 Repeat Steps 5 through 8 for WGxR2.
Step 10 Clear the interface counters on both of your workgroup routers using the clear
counters command.
Step 11 From the WGxR1 workgroup router, perform an extended ping to the WGxR2 router
serial 0/0 interface, then record the ping response time below. For the extended ping,
use a repeat count of 50, a datagram size of 1500, and use extended commands to set
the ToS to 0x02.



















Ping Response Time ____/____/____
What does setting the ToS byte to 0x02 achieve? ___________________________
Step 12 Display the output service policy on the serial 0/0 interface for the class-default
service class only.



























2009 Cisco Systems, Inc. Lab Guide 135






































Do you see any ECN-marked packets for the class-default now?
__________________
Note You may only see ECN-marked packets on one of the two workgroup routers.
Step 13 Return ICMP traffic (match access-group 100) to the EF service class.
Step 14 Display the class map for the ef-traffic service class and verify that ICMP traffic is
now a member of the EF service class.




Step 15 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
Step 16 Return ICMP traffic (match access-group 100) to the EF service class.
Step 17 Display the class map for the ef-traffic service class and verify that ICMP traffic is
now a member of the EF service class.




136 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Step 18 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
Activity Verification
You have completed this task when you attain this result:
You have displayed the policy map to monitor DSCP-based WRED with ECN.
2009 Cisco Systems, Inc. Lab Guide 137
Lab 6-1 Answer Key: Configuring DSCP-Based WRED
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.
Configuration through Step 7:

























Based on the previous WRED profiles, which traffic class will start dropping packets first?
Default (best-effort) class
What does a mark probability of 1/10 mean?
When the average queue size is at the maximum threshold, the router will be dropping
one out of every ten packets.
Why would you not implement WRED for the ef-traffic class?
100%
Average
Queue
Size
Drop
Probability
20 22 26 30 34 40
Minimum
Threshold
Maximum
Threshold
Mark
Probability
10%
100%
Average
Queue
Size
Drop
Probability
20 22 26 30 34 40
Minimum
Threshold
Maximum
Threshold
Mark
Probability
10%
138 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
It is preferred that no packet dropping occurs in the EF traffic class.
What is the default exponential weight constant?
9
What types of packets are marked with CS 6 by the Cisco IOS Software?
Router control and routing protocol traffic
Configuration for remainder of the lab:





No packets are marked ECN, yet there are many random WRED drops in the default class.
Explain.
The router will only set ECN if the transiting packets are marked so that the endpoints
are ECN-capable.
Which traffic class will the ICMP traffic belong to now that it has been removed from the EF
service class?
Default (best-effort) service class
What does setting the ToS byte to 0x02 achieve?
It enables ECN in the packet by indicating that the endpoint is ECN-capable.
2009 Cisco Systems, Inc. Lab Guide 139
Lab 7-1: Configuring Class-Based Policing
Complete this lab activity to practice what you learned in the lesson Configuring Class-Based
Policing in the module Traffic Policing and Shaping.
Activity Objective
In this activity, you will configure class-based policing to rate-limit incoming packets on an
interface. After completing this activity, you will be able to meet these objectives:
Configure single-token bucket class-based policing
Monitor the operation of single-token bucket class-based policing
Configure dual-token bucket class-based policing
Monitor the operation of dual-token bucket class-based policing
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-33
Because wireless Internet access for students and faculty has been implemented, the peer-to-
peer file sharing traffic (particularly, Napster and Kazaa) is constantly increasing. Therefore, it
is now required to police the Napster and Kazaa traffic using class-based policing inbound to
the Fa0/0 interface on the workgroup router.
For the Internet connection, most of the traffic from the E-Commerce University is HTTP
(web) traffic out to the Internet. The service provider is providing sub-rate access and is
implementing an input service policy to police E-Commerce University inbound traffic.
140 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Policing of the HTTP traffic using class-based policing outbound to the S0/1 interface on
workgroup routers will be implemented to conserve bandwidth on the E-Commerce University
Internet connection.
This HTTP policing policy is not placed inbound to the Fa0/0 interface on the workgroup router
because intranet HTTP traffic will still be required to flow between the two E-Commerce
University campuses across their 384-kb/s leased-line connection (S0/0).
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
2009 Cisco Systems, Inc. Lab Guide 141
Command List
The table describes the commands used in this activity.
Configuring Class-Based Policing Lab Commands
Command Description
Creates or modifies a policy map that can be attached to one or
more interfaces


Specifies the name of the class whose policy you want to create or
change or specifies the default class




Configures traffic policing
Clears the interface counters
Disables an interface
Creates a class map to be used for matching packets to a specified
class
Configures the match criteria for a class map on the basis of the
specified protocol




Configures traffic policing on the basis of a percentage of
bandwidth available on an interface
Displays the configuration of all classes for a specified service
policy map or all classes for all existing policy maps




Displays the packet statistics of all classes that are configured for
all service policies on the specified interface or subinterface


Displays the configuration for the specified class of the specified
policy map


Displays all class maps and their matching criteria


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity:
Your assigned workgroup pod number provided by the instructor
142 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 1: Configure Single-Token Bucket Class-Based Policing
You will configure single-token bucket class-based policing.
Activity Procedure
Complete this step:
Step 1 Modify the existing input service policy mark-nbar on the Fast Ethernet 0/0 interface
of the WGxR1 and WGxR2 routers to police the scavenger traffic class to a
maximum rate limit of 8 kb/s. All conforming traffic should be sent (transmitted),
and all exceeding traffic should be dropped.
In this case, do you need to implement a single or dual token bucket?
________________________________________________________
Will this be a single- or dual-rate policing implementation?
________________________________________________________
Activity Verification
You have completed this task when you attain these results:
You have configured single-token bucket class-based policing.
Task 2: Monitor Single-Token Bucket Class-Based Policing
You will monitor the operation of single-token bucket class-based policing.
Activity Procedure
Complete these steps:
Step 1 Display the mark-nbar policy map and verify the correct policing configuration.















What is the default value of Bc in bytes and in bits? _________________________
How is the default value of Bc calculated by the Cisco IOS Software?
_____________________
Based on the default value of Bc, what is the value of the Tc?
____________________
2009 Cisco Systems, Inc. Lab Guide 143
Step 2 Clear the interface counters on both of your workgroup routers using the clear
counters command.
Step 3 Wait at least one minute for the interface counters to accumulate traffic statistics.
Step 4 Display the input service policy on the Fast Ethernet 0/0 interface of your
workgroup routers for the scavenger class only.





























How many packets have been dropped in the scavenger traffic class?
_________________________________________________________________
What is the conformed bit rate for the scavenger traffic?
_________________________________________________________________
What is the exceed bit rate for the scavenger traffic?
_________________________________________________________________
Activity Verification
You have completed this task when you attain this result:
You have monitored the operation of single-token bucket class-based policing.
144 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 3: Configure Dual-Token Bucket Class-Based Policing
You will configure dual-token bucket class-based policing.
Activity Procedure
Complete these steps:
Step 1 On the WGxR1 and WGxR2 routers, configure a new class map called web-
outbound and use NBAR to classify all HTTP traffic into that traffic class.
Step 2 Display the newly configured class map and verify its configuration.



Step 3 On the WGxR1 and WGxR2 routers, configure a new policy map called http-police
to police the web (HTTP) traffic to a CIR of 50 percent of the link bandwidth (use
the Cisco IOS Software default for Bc and Be). All conforming traffic should be
transmitted (sent), and all exceeding traffic should be re-marked to CS1, then
transmitted (sent). All violating traffic should be dropped.
In this case, do you need to implement a single or dual token bucket?
_______________________________________________________
Activity Verification
You have completed this task when you attain this result:
You have configured dual-token bucket class-based policing.
Task 4: Monitor Dual-Token Bucket Class-Based Policing
You will monitor the operation of dual-token bucket class-based policing.
Activity Procedure
Complete these steps:
Step 1 Display the newly configured policy map and verify its configuration.







Step 2 Apply the http-police policy map to the S0/1 interface of the WGxR1 and WGxR2
routers in the outbound direction. The http-police policy map is applied to the S0/1
interface and not the tunnel interface (from the QoS Preclassify lab) because the
tunnel interface is only used as a backup for the leased line connection between the
two E-Commerce University campuses.
Step 3 To test this lab, it will be necessary to administratively disable (shut down) the S0/0
interface on the WGxR1 and WGxR2 routers, to force the Pagent HTTP traffic to
flow via the S0/1 link. Administratively disable the serial 0/0 interface and clear the
interface counters on both the WGxR1 and WGxR2 routers.
2009 Cisco Systems, Inc. Lab Guide 145
Step 4 Wait for the interface counters to accumulate traffic statistics for at least one minute.
Step 5 Display the outbound service policy on the Serial 0/1 interface.




















Are there any violating HTTP packets being dropped?
_________________________________________________________
Are there any exceeding HTTP packets being re-marked to CS1, then sent?
_________________________________________________________
Are there any conforming HTTP packets being sent?
_________________________________________________________
Based on a CIR of 50 percent, what is the CIR (in b/s), Bc, and Be (in bytes)
computed by the Cisco IOS Software?
____________________________________________________
Step 6 Re-enable the serial 0/0 interface on both the WGxR1 and WGxR2 routers.
Step 7 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
Activity Verification
You have completed this task when you attain this result:
You have monitored the operation of dual-token bucket class-based policing.
146 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 7-1 Answer Key: Configuring Class-Based Policing
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.
Configuration in Step 2:














Configuration for the remainder of the lab:








The following are the answers to the questions in this lab exercise:
In this case, do you need to implement a single or dual token bucket?
Single token bucket
Will this be a single or dual-rate policing implementation?
Single rate policing
What is the default value of Bc in bytes and in bits?
1500 bytes or 12,000 bits
How is the default value of Bc calculated by the Cisco IOS Software?
Cir / 32 or 1500 bytes, whichever is larger
Based on the default value of Bc, what is the value of Tc?
Tc = Bc / CIR = 12000 / 8000 = 1. 5
In this case, do you need to implement a single or dual token bucket?
Dual token bucket
Based on a CIR of 50 percent, what is the CIR (in b/s), Bc, and Be (in bytes), calculated by the
Cisco IOS Software?
CIR = 384,000 b/s, Bc = 12,000 bytes, Be = 1500 bytes
2009 Cisco Systems, Inc. Lab Guide 147
Lab 7-2: Configuring Class-Based Shaping
Complete this lab activity to practice what you learned in the lesson Configuring Class-Based
Shaping on Frame Relay Interfaces in the module Traffic Policing and Shaping.
Activity Objective
In this activity, you will configure class-based shaping to rate-limit outgoing packets on an
interface. After completing this activity, you will be able to meet these objectives:
Configure class-based shaping
Monitor the operation of class-based shaping
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-34
After successfully policing the Napster and Kazaa traffic, it was decided by the E-Commerce
University IT staff to also shape the FTP traffic across the 384-kb/s leased line, because the
FTP traffic is also consuming a lot of bandwidth at times. Class-based shaping will be used to
apply an upper bandwidth limit to the FTP traffic class.
148 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Configuring Class-Based Shaping Lab Commands
Command Description


Displays the configuration for the specified class of the specified
policy map
Creates or modifies a policy map that can be attached to one or
more interfaces


Specifies the name of the class whose policy you want to create or
change or specifies the default class


Specifies average or peak rate traffic shaping
Displays the configuration of all classes for a specified service
policy map or all classes for all existing policy maps




Displays the packet statistics of all classes that are configured for
all service policies on the specified interface or subinterface


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity:
Your assigned workgroup pod number provided by the instructor
2009 Cisco Systems, Inc. Lab Guide 149
Task 1: Configure Class-Based Shaping
You will configure class-based shaping.
Activity Procedure
Complete these steps:
Step 1 Verify the existing policy map named llq-policy on the WGxR1 and WGxR2
routers, by displaying only the AF11 traffic class. Recall from the Classification and
Marking lab exercise that all FTP traffic is marked with AF11.






























Step 2 On WGxR1 and WGxR2, modify the existing llq-policy policy map to shape the
AF11 traffic class to an average rate of 8 kb/s. Allow the Cisco IOS Software to
automatically calculate the Bc and Be value.
Activity Verification
You have completed this task when you attain these results:
Successfully configured average-rate shaping on the serial 0/0 interface of WGxR1 and
WGxR2 for the AF11 traffic class.
150 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 2: Monitor Class-Based Shaping
You will monitor the operation of class-based shaping.
Activity Procedure
Complete these steps:
Step 1 Verify the existing llq-policy policy map and the shaping configuration on your
workgroup WGxR1 and WGxR2 routers by displaying only the AF11 traffic class.




















Step 2 Verify the shaping configuration on the existing output service policy map on the
Serial 0/0 interface of the WGxR1 and WGxR2 routers, by displaying only the AF11
traffic class.






























2009 Cisco Systems, Inc. Lab Guide 151


What is the Bc and Be value that is automatically determined by the Cisco IOS
Software?
____________________________________________________________
What is the Tc (time interval)? ___________________________________
Step 3 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
Activity Verification
You have completed this task when you attain this result:
Verified the successful operation of your class-based shaping configuration
Lab 7-2 Answer Key: Configuring Class-Based Shaping
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.

























The following are the answers to the questions in this lab exercise:
What is the Bc and Be value that is automatically determined by the Cisco IOS Software?
Bc = 8000 b/s, Be = 8000 b/s
What is the Tc (time interval)?
1 second
152 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 8-1: Configuring Class-Based Header
Compression
Complete this lab activity to practice what you learned in the lesson Configuring Class-Based
Header Compression in the module Link Efficiency Mechanisms.
Activity Objective
In this activity, you will configure and monitor class-based RTP header compression on a PPP
Frame Relay link. After completing this activity, you will be able to meet these objectives:
Configure class-based RTP header compression
Monitor the operation of class-based RTP header compression
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-35
One of the E-Commerce University IT staff members was reading a VoIP Cisco Press book and
realized that the IP, UDP, and RTP header overhead for voice packets is very high. Therefore,
the IT staff decided to implement class-based RTP header compression to reduce the size of the
packet headers and the associated overhead on the EF traffic class.
2009 Cisco Systems, Inc. Lab Guide 153
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Configuring Class-Based Header Compression Lab Commands
Command Description
Creates or modifies a policy map that can be attached to one or
more interfaces


Specifies the name of the class whose policy you want to create or
change or specifies the default class


Configures RTP or TCP IP header compression for a specific class
Displays the configuration of all classes for a specified service
policy map or all classes for all existing policy maps




Displays the packet statistics of all classes that are configured for
all service policies on the specified interface or subinterface
Clears the interface counters


Saves your entries in the configuration file
Job Aid
This job aid is available to help you complete the lab activity:
Your assigned workgroup pod number provided by the instructor
154 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Task 1: Configure Class-Based Header Compression
You will configure class-based RTP header compression.
Activity Procedure
Complete this step:
Step 1 Modify the existing llq-policy policy map on the WGxR1 and WGxR2 routers to
enable class-based RTP header compression on the EF traffic class.
Activity Verification
You have completed this task when you attain these results:
You have successfully configured class-based RTP header compression on the serial 0/0
interface of WGxR1 and WGxR2 for the EF traffic service class.
Task 2: Monitor Class-Based Header Compression
You will monitor the operation of class-based RTP header compression.
Activity Procedure
Complete these steps:
Step 1 Display the llq-policy policy map (just display the ef-traffic class) to verify the
class-based RTP header compression configuration on the ef-traffic class.






Step 2 Clear the interface counters on both of your workgroup routers using the clear
counters command.
Step 3 Wait for the interface counters to accumulate traffic statistics for at least one minute.
Step 4 Display the output service policy on the workgroup routers S0/0 interface (only
show the ef-traffic class).



















2009 Cisco Systems, Inc. Lab Guide 155









How many RTP packets were sent? _______________
How many RTP packets were compressed? _________
How many bytes were saved because of RTP header compression? __________
Step 5 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
Activity Verification
You have completed this task when you attain this result:
You have successfully verified the operation of the class-based RTP header compression
operation.
Lab 8-1 Answer Key: Configuring Class-Based Header
Compression
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.


























156 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Lab 8-2: Configuring LFI
Complete this lab activity to practice what you learned in the lesson Configuring Link
Fragmentation and Interleaving in the module Link Efficiency Mechanisms.
Activity Objective
In this activity, you will configure and monitor MLP with interleaving on a PPP link. After
completing this activity, you will be able to meet these objectives:
Configure link fragmentation and interleaving on PPP WAN links
Monitor the operation of link fragmentation and interleaving
Visual Objective
The figure illustrates what you will accomplish in this activity.
2009 CiscoSystems, Inc. All r ights reserved. QoSv2.3Lab Guide-36
After measuring voice packet delay and jitter over their slow WAN link, the E-Commerce IT
staff is concerned that the jitter is still too high. The IT staff asks you why there is too much
jitter and how it can be reduced. Being well educated by Cisco about CLPs in QoS, you answer,
The LLQ mechanism prioritized voice traffic in the software queue, but the hardware queue
(Tx ring) always uses a FIFO scheduling mechanism. Therefore, after packets of different
applications leave the software queue, they will mix with other packets in the hardware transmit
queue (TxQ), even if their software queue processing was expedited. Thus, a voice packet may
be immediately sent to the hardware tx-queue, where two large FTP packets may still be
waiting for transmission. The voice packet must wait until the FTP packets are transmitted, thus
producing an unacceptable delay in the voice path. Because links are variably used, this delay
varies with time and may produce unacceptable jitter in jitter-sensitive applications such as
voice.
2009 Cisco Systems, Inc. Lab Guide 157
Knowing that there will be no budget to upgrade the slow WAN link speed any time soon, you
offer to improve voice delay and jitter by implementing MLP with interleaving on the slow
WAN link.
Required Resources
These are the resources and equipment required to complete this activity:
Lab topology configured for QoS
Student workgroup consisting of two user-controlled Cisco 2610XM routers and one user-
controlled Cisco 2950T-24 workgroup switch
Classroom reference materials as follows:
QoS Student Guide
QoS Lab Guide
Student pod workstation with Telnet or console access to workstation pod devices
Command List
The table describes the commands used in this activity.
Configuring LFI Lab Commands
Command Description
Enters interface configuration mode and the physical interface
identification


Sets the encapsulation method used by the interface


Sets a primary or secondary IP address for an interface
Sets and communicates to higher-level protocols the current
bandwidth value for an interface


Creates a multilink bundle and enters multilink interface
configuration mode
Enables MLP on an interface
Enables real-time packet interleaving
(Optional) Configures a maximum fragment delay. If, for example,
you want a voice stream to have a maximum bound on delay of 20
ms and you specify 20 ms using this command, MLP will choose a
fragment size based on the configured value.


Restricts a physical link to joining only a designated multilink-group
interface


Attaches a policy map to an input interface or VC, or an output
interface or VC
158 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Job Aid
This job aid is available to help you complete the lab activity:
Your assigned workgroup pod number provided by the instructor
Task 1: Configure LFI
You will configure link fragmentation and interleaving on PPP WAN links.
Activity Procedure
Complete these steps:
Caution The following steps must be performed in the order shown.
Step 1 Remove the IP address from the serial 0/0 interface of the WGxR1 router.
Step 2 Create a multilink virtual interface (multilink 1) on the workgroup WGxR1 router.
Step 3 Set the bandwidth and IP address on the workgroup WGxR1 router multilink 1
interface as follows:
Parameter Value
IP Address 10.2.x.1
Subnet Mask 255.255.255.0
bandwidth 384 kb/s
Step 4 Place the workgroup WGxR1 router S0/0 interface into multilink-group 1.
Step 5 Repeat steps 1 through 4 for the workgroup WGxR2 router, using this table for Step 3:
Parameter Value
IP Address 10.2.x.2
Subnet Mask 255.255.255.0
Bandwidth 384 kb/s
Step 6 Display the running-config of the S0/0 and the multilink-group 1 interface to verify
the MLP configuration.














2009 Cisco Systems, Inc. Lab Guide 159







MLP is enabled now but is interleaving also enabled, based on the above
configuration? _______________
Step 7 Shut down Serial 0/1, then use the show ip interface brief command to verify that
the multilink-group 1 interface is UP, has the proper IP address, and that the S0/0
interface is UP.









Step 8 Ping the multilink 1 interface of WGxR2 from WGxR1.







Step 9 Ping the multilink 1 interface of WGxR1 from WGxR2.







Step 10 Enter the show ip ospf neighbor command to verify that the OSPF neighbor
relationship is now formed over the multilink interface.





Step 11 Enable PPP multilink interleaving on the multilink 1 interface on both WGxR1 and
WGxR2. Use a fragment-delay of 10.
What is the unit of the fragment delay? ________________________
Step 12 Disable the output service policy on the S0/0 interface of the WGxR1 and WGxR2
routers.
Step 13 Enable the llq-policy on the multilink 1 interface in the outbound direction on
WGxR1 and WGxR2.
Note Ensure that the OSPF neighbor state is established. You can use the show ip ospf
neighbor command to verify this.
160 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
Activity Verification
You have completed this task when you attain these results:
You have configured link fragmentation and interleaving on PPP WAN Links.
Task 2: Monitor LFI
You will monitor the operation of link fragmentation and interleaving.
Activity Procedure
Complete these steps:
Step 1 Clear the interface counters on both of your workgroup routers using the clear
counters command.
Step 2 Wait for the interface counters to accumulate traffic statistics for at least one minute.
Step 3 What type of queuing is the S0/0 interface using now? ____________.
























Step 4 Display the multilink interface and examine how many packets have been
interleaved.

















2009 Cisco Systems, Inc. Lab Guide 161









Step 5 Use the show ppp multilink command to examine the fragment size in bytes
(calculated by the Cisco IOS Software based on the fragment delay of 10 ms).











Step 6 Save your running configurations of the workgroup routers and the workgroup
switch to the startup-config in NVRAM.
Activity Verification
You have completed this task when you attain this result:
You have monitored the operation of link fragmentation and interleaving.
Lab 8-2 Answer Key: Configuring LFI
When you complete this activity, your router configuration will be similar to the following,
with differences that are specific to your device or workgroup.
WGxR1:
















WGxR2:








162 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.







The following are the answers to the questions in this lab exercise:
What is the unit of the fragment delay?
milliseconds (ms)
What type of queuing is the S0/0 interface using now?
first-in, first-out (FIFO)
Final Workgroup Device Configurations
When you complete all activities in this course, your workgroup devices will have the
following configurations, with differences that are specific to your device or workgroup.
WG1R1:








































2009 Cisco Systems, Inc. Lab Guide 163




































































164 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.































































WG1R2:



2009 Cisco Systems, Inc. Lab Guide 165




































































166 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.




































































2009 Cisco Systems, Inc. Lab Guide 167






























168 Implementing Cisco Quality of Service (QOS) v2.3 2009 Cisco Systems, Inc.
WG1S1:

S-ar putea să vă placă și