End To End QoS Network Design
End To End QoS Network Design
End To End QoS Network Design
Cisco Press
Cisco Press
800 East 96th Street
Indianapolis, IN 46240 USA
ii
Trademark Acknowledgments
All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Cisco Press or Cisco Systems, Inc., cannot attest to the accuracy of this information. Use of a term in this book
should not be regarded as affecting the validity of any trademark or service mark.
For sales outside the U.S. please contact: International Sales [email protected]
Feedback Information
At Cisco Press, our goal is to create in-depth technical books of the highest quality and value. Each book is crafted
with care and precision, undergoing rigorous development that involves the unique expertise of members from the
professional technical community.
Readers feedback is a natural continuation of this process. If you have any comments regarding how we could
improve the quality of this book or otherwise alter it to better suit your needs, you can contact us through e-mail
at [email protected]. Please make sure to include the book title and ISBN in your message.
We greatly appreciate your assistance.
iii
Publisher
Editor-in-Chief
Cisco Representative
Cisco Press Program Manager
Executive Editor
Acquisitions Editor
Production Manager
Development Editor
Copy Editor
Technical Editors
Team Coordinator
Cover Designer
Composition
Indexer
Proofreader
John Wait
John Kane
Anthony Wolfenden
Nannette M. Noble
Christopher Cleveland
Michelle Grandin
Patrick Kanouse
Howard A. Jones
Krista Hansing
Frank Knox
Anna To
Connie Varner
Tammi Barnett
Louisa Adair
Octal Publishing, Inc.
Eric Schroeder
Tonya Cupp
iv
Dedications
Tim: This book is obviously dedicated to my wife; otherwise, of course, shed kill me. It amuses me to think that if
others are actually reading this, they probably think Im only jokingbut, alas, the Greek capacity for vengeance is
no laughing matter. I cancelled far too many dates, stayed in my ofce and labs far too many weekends, and stared
blankly into space (thinking about these designs) far too many times (while she was talking to me) to ever allow the
thought of not dedicating this work to her to even cross my tiny xeno-brain.
I know, I know, its not a work of literature or a collection of poetry: Its just a technical bookboring to tears for
any not interested in the subject (and probably just boring to yawns for the rest). But, for whatever its worth, Im
dedicating it to you, Lella. I love you with all my heart.
Christina: To Robert Verkroost and Ria and Willie Hattingh, who unfailingly support my various forays into the
publishing world.
vi
Acknowledgments
Off the top, Id like to thank my friend and co-worker Dave Barton, whoalthough he was extremely busy downing beers at Chicagos Navy Piergallantly managed to sic Brett Bartow onto me, which got the ball rolling on this
whole project. (Dave, did you make it back okay to the hotel that night?)
Many thanks to Todd Truitt, one of the top talents at Cisco, for inviting my collaboration on the original AVVID QoS
Design Guide, hiring me onto his design team, and recommending Christina as a co-author for this project. Do you
ever get tired of being right, Todd?
Thanks also to Neil Anderson, Joel King, Ted Hannock, and Steve Ochmanski for guidance and collaboration on
IPSec V3PN designs. Thanks for letting me leverage your excellent and thorough work so that I did not to have to
reinvent the wheel on these designs.
Thank you, Mike Herbert, for your brilliant ash of using QoS for DoS/worm mitigation via the Scavenger class.
Though you derailed and postponed many whitepapers and publications (including this one), you opened up a
whole new scope of application for QoS technologiesand were all better off for it.
Thank you, too, Alex Dolan, for building out multiple large-scale MPLS VPN testbeds for me and continually
tweaking them to suit my mood-of-the-day. I dont know where your patience or your good nature comes from, but
theyre most appreciated. Thanks, too, for nudging me back into playing ice hockey. Next time I break a leg or chip
a tooth, Ill think of you and grimace.
Muchos gracias, Arlindo Callejas, for being much more than my awesome lab administrator. You always went out
of your way for me and got me everything I ever neededinstantly. Sometimes Im afraid to ask where you
sourced the gear you did. (Im not sure whether those 10GE linecards fell off the back of a Cisco truck or what,
but they sure came in handy at just the right time.)
A round of applause is merited by the technical reviewers. Having done this before myself, I can genuinely appreciate the time, effort, and painstaking attention to detail that goes into this process. Frank, your comments were right
on and helped make this a better book. Anna, is there anything you dont know about Cisco QoS? Im very thankful
you took time out of your extremely busy schedule, developing code while helping anyone and everyone on planet
Earth (and some nearby systems) that are having QoS problems. And Connie, if you hadnt reviewed this work, I
would not have submitted it for publication. Youre simply the best technical reviewerand one of the sharpest
engineersIve ever had the pleasure of working with.
Thank you Howard Jones for your excellent editing and coordinating the complex content review and copy review
processes. And thank you, too, Patrick Kanouse for managing the production of this publication and allowing me to
make hundreds of last-minute edits in the galley-review phase (when edits are to be kept at a minimum). How you
put up with me I'll never know, but I truly appreciate your patience and desire to help make this book as correct and
as current as possible. Also thank you Chris Cleveland for your ne recommendations and guidance during the
course of production.
I need to extend thanks also to Debbie Morrison, who is, in my opinion, the best technical writerperiod. Debbie,
as Ive said over and over again, you polish my ugly little chunks of coal into beautiful diamonds. I love how I can
barely recognize my own work once youve done your magic. Ill truly miss working with you now that youve
gone on to bigger and better things. (Im so terried of the futurewhos going to make me look good now?)
Brett Bartow, what can I say? This would never have happened without you. Time and time again, it seemed to fall by
the wayside, but your persistence, perseverance, and patience kept it all going. Thank you. You didnt back off, and Im
glad for it. Your guidance has been uncanny, and your vision has paid off. Thanks also to your production team.
And lastly, thank you, Christina. You made it fun. Right when I read your rst draft of your rst chapter, I knew you
were the best person to embark on this project with (even though you write like an engineer!). Thank you for sacricing so many weekends on this (thank Robert for me too). I know this is only one of many publishing projects
youre pursuing; all I ask is that you save me an autograph before you move to Hawaii and start on your best-seller!
vii
Contents at a Glance
Introduction
xxii
Part I
Introduction to QoS
Chapter 1
Introduction to QoS
Chapter 2
Part II
QoS Toolset
Chapter 3
Chapter 4
Chapter 5
Congestion-Management Tools
Chapter 6
Congestion-Avoidance Tools
Chapter 7
Link-Specic Tools
Chapter 8
Bandwidth Reservation
Chapter 9
Chapter 10
Chapter 11
269
Part III
287
Chapter 12
Part IV
Chapter 13
Chapter 14
5
33
67
69
103
133
159
169
195
205
223
289
445
447
513
viii
Part V
Chapter 15
547
Chapter 16
635
Appendix
Index 713
545
701
ix
Table of Contents
Introduction
Part I
xxii
Introduction to QoS
Understanding QoS 10
End-to-End QoS 10
All Packets Are (Not) Equal 11
The Challenges of Converged Networks 12
QoS Models 14
IntServ Overview 15
DiffServ Overview 16
Introduction to the QoS Toolset
17
Simplifying QoS 19
Modular QoS Command-Line Interface 19
QoS Baseline 20
Default Behavior 21
Cross-Platform Feature Consistency 24
Automatic QoS 24
If I Have AutoQoS, Why Should I Be Reading This Book?
The Continuing Evolution of QoS 29
Summary
29
Further Reading 30
General 30
IntServ 30
DiffServ 31
AutoQoS 31
26
33
39
48
Scavenger Class 49
DoS and Worm Mitigation Strategy Through Scavenger Class QoS 50
Principles of QoS Design 54
General QoS Design Principles 55
Classification and Marking Principles 57
Policing and Markdown Principles 57
Queuing and Dropping Principles 58
DoS and Worm Mitigation Principles 61
Deployment Principles 62
Summary
63
Further Reading
Part II
QoS Toolset
64
67
69
Classification Tools 70
Modular QoS Command-Line Interface Class Maps 71
Network-Based Application Recognition 73
xi
Marking Tools 77
Class-Based Marking 78
Class-Based Policing 78
Committed Access Rate 79
Policy-Based Routing 79
Voice Gateway Packet Marking 79
Layer 2 Marking Fields 81
Layer 3 Marking Fields 86
Translating Layer 2 and Layer 3 Packet Markings 90
Summary
98
Further Reading 99
General 99
DiffServ 99
L2 Protocol Tunneling 100
VPN 100
NBAR 100
MPLS 100
IPATM/Frame Relay Bundles 101
Level 2 to Level 3 Packet-Marking Translation
Chapter 4 Policing and Shaping Tools
101
103
xii
133
134
152
PAK_priority
Summary
150
153
154
159
160
161
163
166
162
xiii
169
190
195
199
200
RSVP-DiffServ Integration
200
201
202
188
xiv
205
206
209
211
RSVP 212
Example of VoIP CAC Through RSVP 215
Summary
218
218
223
224
232
237
248
243
xv
254
263
Further Reading
266
269
278
279
284
Further Reading
Part III
285
287
289
295
319
xvi
322
440
Further Reading
441
422
xvii
Part IV
445
447
447
497
505
507
Further Reading
508
513
541
Further Reading
541
535
453
xviii
Part V
545
547
548
583
616
632
Further Reading
632
635
xix
696
Further Reading
697
701
686
xx
PC
PC with
Software
Terminal
File
Server
Sun
Workstation
Macintosh
Access
Server
Cisco Works
Workstation
Modem
Token
Ring
Token Ring
Printer
Laptop
Web
Server
IBM
Mainframe
Front End
Processor
Cluster
Controller
FDDI
Gateway
Router
Catalyst
Switch
Network Cloud
Bridge
Multilayer
Switch
Line: Ethernet
Hub
ATM
Switch
Line: Serial
DSU/CSU
DSU/CSU
FDDI
ISDN/Frame Relay
Switch
xxi
xxii
Introduction
QoS is a maturing technology, one that many networking professionals, to a greater or lesser extent, are
already familiar with. This is both a blessing and a curse. It is a blessing because more administrators
are enabling QoS on their networks, which allows for the convergence of voice, video, and data onto a
single IP network, among other business advantages. It is a curse because almost every individual with
whom Ive ever discussed QoS designs has a slightly different opinion on how QoS should be enabled.
The result often has led to confusing babble from the customers perspective, especially for customers
seeking QoS design guidance for non-VoIP applications. For example, a customer might ask the local
Cisco Systems engineer how best to enable QoS for networks and receive one answer. Later, the customer might attend an Executive Brieng session in San Jose and receive a different answer (even
receiving multiple different answers within the same day from different presenters). Later, while attending
a Networkers conference, the customer might be told something else entirely. Finally, when the customer
gets home and picks up a Cisco Press book, he or she might get still another story. Confused and frustrated, many customers decide to enable minimal QoS, if any, despite the touted benets that they were
sold on. Therefore, in my opinion, presenting such inconsistent recommendations is a major disservice
to our customers and a considerable barrier to the widespread deployment of QoS.
The Cisco Technology Baseline committees were created to remedy the situation and help unify various
technologies across Cisco products and platforms. To this end, a series of Technology Baselines were
developed internally by our leading experts (many of whom likewise developed the related IETF RFCs
and other standards) to which all Cisco products and features must conform. Additionally, these documents provide uniform, strategic recommendations (that can be shared with customers) to help ensure
that QoS recommendations are unied and consistent, for both enterprises and service providers. Specic to QoS, the QoS Baseline strictly denes the Cisco strategic direction in QoS technologies from
now into the foreseeable future.
Thus, a unique feature of this book is that it is the rst Cisco Press publication to present design recommendations that are compliant with the QoS Baseline.
Another huge advantage of this publication is that it is one of the rst documents to present a detailed,
cohesive strategy that shows how QoS can extend beyond its traditional role (of prioritizing important
applications) and be used to provide deferential services to DoS/worm-generated trafc, thus mitigating
and containing the collateral damage caused by such attacks. This is a fresh perspective and context for
a technology that many considered baked and done. Yet in such a role, the critical interdependency of
Quality of Service, High-Availability, and Security technologies becomes manifest and holistically promotes the Self-Defending Networks business objective.
However, having a strategic direction and tactical approaches for QoS designs is only half the solution.
An important motto that I like to emphasize is: In theory, theory and practice are the same. Its one
thing to make a design recommendation based on an assumption that something should work. Its
something completely different to make a design recommendation that has been veried in large-scale,
complex lab scenarios, such as provided by one of the largest Cisco labs: the Enterprise Solutions
Engineering testbeds in Research Triangle Park, North Carolina.
xxiii
Notwithstanding, it should be noted that designs presented in this book are not infallible. While all due
diligence has been done to present working, tested congurationsincluding a rigorous technical
reviewing process by some of the sharpest Cisco QoS engineershardware/software/platform-specic
issues that didnt surface during our tests may nonetheless exist, as may issues introduced in newer
releases of hardware/software dating from our time of testing.
Furthermore, the recommendations presented in this book are not to be taken as commandments or
dictates (Thou shalt congure this or that), but are simply best-practice design recommendations that
are the result of extensive lab testing and customer deployments. They should be viewed as templates
that can be modied and tweaked to customer-specic requirements. Following the 80/20 Pareto Rule,
these design recommendations should be viewed as 80 percent of the solution, to which the remaining
20 percent is up to each customer to complete and tailor to their individual needs and constraints.
Heres an analogy of how to view these design recommendations: Given a business objective (for example, to hammer a nail into a wall), you will have certain tools at your disposaltools that may or may
not be optimally suited to the task (lets say, a hammer and a banana). Our lab testing presents the optimal
tool to use for the given objective (normally, a hammer tests better than a banana, but you never know
Ive seen some pretty funky frozen bananas that might do the trick). Its still up to the customer to pick
the tool that best suits their objectives, situations, and comfort levels. These recommendations are not
mandates; they are simply suggestions based on extensive lab testing and customer deployments.
xxiv
only to turn it on, drive away, and look sexy. The former group will drive more condently, boldly
unleashing the engines tremendous power and, thus, pushing the car to its limits.
This book is intended for the former type of QoS networking professionalthose looking for a thorough
understanding of what makes them move so fast, sound so good, and look so sexy as they condently
harness their technology.
Chapter 2, QoS Design Overview, is an overview of QoS design. It begins by detailing the
service-level requirements of voice, video, and data applications, and it presents the Scavengerclass DoS/worm-mitigation strategy and high-level QoS best practices that will be detailed in the
design chapters to follow.
To set proper context for the design chapters, various QoS tools are reviewed. This review is not indented
to serve as feature documentation, but it supplements Cisco documentation to highlight various interdependancies or caveats for these tools that at times impact the recommended QoS designs that follow.
The QoS toolset review section, Chapters 3 through 11, covers the following topics:
xxv
Chapter 4, Policing and Shaping ToolsThis chapter reviews the token bucket algorithm,
which is the basis for most policers and shapers. Both two-rate and three-rate policers are covered
as are ATM and Frame Relay trafc shaping.
Chapter 9, Call Admission Control (CAC)This chapter reviews local, resource-based, and
measurement-based call admission control (CAC) mechanisms, including the use of RSVP for
CAC. The tools reviewed in previous chapters can protect voice from data, but only CAC tools can
protect voice from voice.
Chapter 10, Catalyst QoS ToolsThis chapter reviews the main classication, marking,
mapping, policing, and queuing tools available on the current Cisco Catalyst platforms (including
the Catalyst 2950, 2970, 3550, 3560, 3570, 4500-Supervisors II+ to V, and Catalyst 6500
Supervisor 2 and Supervisor 720).
Chapter 11, WLAN QoS ToolsThis chapter reviews QoS mechanisms available for wireless
access points, including the 802.11e Enhanced Distributed Coordination Function (EDCF) and the
QoS Basic Service Set (QBSS).
When the QoS toolset is reviewed, the context is set for the detailed design recommendations that
follow. The next chapterswhich comprise the heart of this bookcover the QoS design recommendations for protecting voice, video, and multiple classes of data while mitigating DoS/worm attacks for the
following network infrastructure architectures:
Chapter 12, Campus QoS DesignThis design chapter details access, distribution, and core
layer considerations and designs for Cisco Catalyst 2950, 2970, 3550, 3560, 3570, 4500-Supervisors
III-V, and Catalyst 6500 Supervisor 2 and Supervisor 720 series switches. Five separate access-edge
xxvi
Chapter 13, WAN Aggregator QoS DesignThis design chapter details considerations and
designs for low-speed ( 768 kbps), medium-speed (> 768 kbps and T1/E1), and high-speed
(> T1/E1) private WAN topologies, such as leased lines, Frame Relay, ATM, ATM-to-Frame Relay
service interworking, and ISDN.
Chapter 14, Branch Router QoS DesignThis design chapter details branch-specic
considerations and designs, such as unidirectional applications, and branch-to-campus trafc
classication through access lists and Network-Based Application Recognition (NBAR). Branchspecic designs include Cisco SAFE recommendations for using NBAR for known worm
identication and policing.
Chapter 15, MPLS VPN QoS DesignThis design chapter details considerations and designs
for both enterprises (that are mapping into MPLS VPN service-provider [edge] classes of service)
and service providers (that are provisioning edge and core classes of service). Service provider
designs also include details on how to provision MPLS DiffServ Tunneling Modes (Uniform, ShortPipe, and Pipe) and an introduction to MPLS Trafc Engineering (demonstrating per-customer trafc
engineering and per-customer/per-application trafc engineering through MPLS DiffServ Trafc
Engineering).
Chapter 16, IPSec VPN QoS DesignThis design chapter details the considerations and
designs for deploying site-to-site IPSec VPNs and for teleworker IPSec VPNs (which traverse
broadband media, such as cable and DSL).
PA R T
Introduction to QoS
Part I of this book provides a brief background of the evolution of QoS technologies and overviews
various currently available QoS features and tools. The QoS requirements of voice, video, and multiple
classes of data applications are presented, along with an overview of the nature and effects of various types
of DoS and worm attacks. QoS design principles are introduced to show how QoS mechanisms can be
strategically deployed to address application requirements while mitigating such attacks.
The chapters in this part of the book are as follows:
Chapter 1
Introduction to QoS
Chapter 2
This chapter provides a brief history of both voice and data network evolution, illustrating
the background of the concept of Quality of Service (QoS). It introduces the fundamental
QoS concepts of IntServ and DiffServ to set the stage for the later discussion of individual
QoS mechanisms. The following topics are introduced and briey discussed:
CHAPTER
Introduction to QoS
A fair amount has been written in the industry about quality of service (QoS), but it seldom
is explained why QoS has become a topic of concern in modern networks when it was
something relatively unheard of only a few years ago. It is instructive to review briey
a small amount of networking history that puts QoS technology in perspective.
QoS Evolution
QoS Evolution
IP networks of the mid-1990s were invariably best-effort networks, and the Internet, as a
whole, remains so today. Privately owned enterprise and service provider networks, though,
have been widely transformed from best-effort models to more complex differentiated
services models, meaning that the network gives different applications differing levels
of service.
Figure 1-1 shows the broad steps in the evolution of QoS concepts since the early 1990s.
QoS Evolution
QoS as a
Security Tool
Increased Sophistication
Figure 1-1
QoS Intelligence
and Automation
MPLS Traffic Engineering
and VPN QoS
Differentiated Services
Model
Integrated Services
Model
Best Effort
IP Model
1994
1996
1998
2000
2002
2004
The rst attempt to standardize QoS came in the mid-1990s, when the Internet Engineering
Task Force (IETF) published the Integrated Services Request For Comments (IntServ
RFCsstarting with RFC 1633 in June 1994). These RFCs centered on a signaling protocol called the Resource Reservation Protocol (RSVP). RSVP signals bandwidth and latency
requirements for each discrete session to each node along a path (logical circuit) that
packets would take from the sending endpoint to the receiving endpoint. Initially, RSVP
required every node to heed its reservations, which was highly impractical over the Internet,
on which servers, switches, and routers of every description, vintage, and vendor coexist.
To address this challenge, another set of standardsthe DiffServ modelemerged as a
second attempt at standardizing QoS. The DiffServ model describes various behaviors to
be adopted by each compliant node. The nodes could use whatever features (proprietary or
otherwise) were available, as chosen by the vendor, to conform. Packet markings, such as
IP Precedence (IPP) and its successor, Differentiated Services Code Points (DSCPs), were
dened along with specic per-hop behaviors (PHBs) for key trafc types.
As the IntServ and DiffServ models have evolved, the general popularity of one method
versus the other has swung back and forth (as shown in Figure 1-2), and their coexistence
has become an ever-increasing struggle, with committed advocates on both sides. Today the
debates over the advantages of each continue without a clear, industry-wide agreed-upon
resolution. The realization has begun that neither method offers a complete solution and
that elements of both should be combined to provide the most general method applicable
to the widest range of trafc and application types.
Figure 1-2
Integrated Services
Per Flow State
RSVP as the
Signaling Protocol
Differentiated Services
No State, No Protocol
Per Aggregate Behavior QoS
Less Scalability
More Scalability
IntServ uses a ow-based concept coupled with a signaling protocol along the packet
path. The signaling protocol guarantees that adequate resources are available (at each
hop) for the ow before admitting the ow onto the network. In initial deployments,
the IntServ model suffered from scalability issues because of the many ows that
needed management on network backbones.
DiffServ uses packet markings to classify and treat each packet independently.
Although this scales well (which is probably why enterprises and service providers
deploy it more frequently), it offers no specic bandwidth guarantees to packets that
belong to a ow and, therefore, fails to provide admission control to new ows.
With no clear advantage to either model, QoS mechanisms continue to use a mix of IntServ
and DiffServ technologies to offer the breadth of services required on networks. IntServ and
DiffServ are discussed further in the section QoS Models later in this chapter.
In the late 1990s, QoS techniques became more sophisticated and were adapted to advanced
networking technologies, such as Multiprotocol Label Switching (MPLS) and Virtual
Private Networks (VPNs).
The most recent trend in QoS is simplication and automation, with the goal of simply and
efciently provisioning intelligent QoS on IP networks. When viewed as individual
features, QoS technologies offer a myriad of nerd knobs that can be turned. In the hands
of capable administrators, these can be used to build very sophisticated networks. However,
they also can result in very complex congurations. Many administrators do not have the
time or the desire to delve into QoS technologies to this expert level and instead would
prefer to dene high-level policies and have the network simply do the right things
to implement them.
End User
An end users perception of QoS is typically subjective and relative, and not easily
measurable.
End users perceive the network quality through their end device and have certain expectations of appropriate service levels. For example, typical users expect a voice call on a
standard phone to be of toll quality. Yet they do not expect that same quality level from a
cell phone or a voice call spoken into a microphone on a personal computer. This is the general expectation, regardless of the fact that all three calls might be carried by the same network in the same manner.
The end user has no concept of and typically very little interest in the capabilities of the
networks in betweenunless, of course, the quality of the network response is lacking.
Therefore, end users perception of the quality of the service that they receive is based on
previously observed behavior on similar devices (examples include a PSTN phone call, a
PBX phone call, a bank teller application, and the refresh of a web page display) and the
cost of the service (which, in an enterprise network, the general end user perceives as $0).
10
the one-way latency of more than 150 ms is unacceptable for a voice call, or a transaction
refresh time for a bank teller application must be fewer than 5 seconds.)
Service providers formalize these expectations within service-level agreements (SLAs),
which clearly state the acceptable bounds of network performance. Corporate enterprise
networks typically do not have such formal SLAs, but they nevertheless manage their
networks on some form of measurement and monitoring. Some enterprise networks indeed
might use SLAs of various levels of formality between the IT department and the customer
departments that they serve.
User complaints might result even though the network met the SLA (formal or otherwise).
For example, the packet loss statistics over a certain period of time might be within bounds,
but the user whose le transfer session timed out or whose print job was lost during a period
of momentary congestion would most likely perceive it as a network problem.
Understanding QoS
Appreciating what QoS tools and methods do to packets in a network is fundamental to
appreciating the effect of individual QoS tools discussed in later chapters, and ultimately
understanding the network designs and methods that constitute the material in this book.
End-to-End QoS
Regardless of how it is measured, QoS is a vital element in any converged network. To
ensure the highest level of quality, however, QoS must be implemented across all areas of
the network.
QoS is described aptly by an age-old clich: Its only as strong as the weakest link.
Optimally, every device (host, server, switch, or router) that handles the packet along its
network path should employ QoS to ensure that the packet is not unduly delayed or lost
between the endpoints. It is a popular myth that QoS is applicable only to slow-speed widearea networks (WANs) or the Internet. Testing has shown that delay-sensitive applications,
such as voice, suffer quality loss when QoS is not enabled on campus devices, such as Cisco
IP phones and Cisco Catalyst switches.
Figure 1-3 shows the segments of the network where QoS must be deployed in the typical
IP telephony enterprise network and what QoS techniques are common in each segment.
Understanding QoS
Figure 1-3
11
PSTN
SRST
Router
Si
S
Si
Campus
Campus Access
Marking
Multiple queues
802.1p/Q
Fast link
convergence
Conditional trust
IP WAN
IP WAN
Bandwidth
Provisioning
Campus Distribution
Multiple queues
802.1p/Q
Classification
Reclassification
Branch Office
WAN Aggregation
Branch Router
Branch Switch
Multiple queues
802.1p/Q
Traffic Shaping
Link efficiency
(LFI, cRTP)
Classification
Reclassification
Multiple queues
802.1p/Q
Link efficiency
(LFI, cRTP)
Classification
Reclassification
Network-Base
Application
Recognition
Marketing
Multiple queues
802.1p/Q
User-based contention occurs when packets from different users, user groups,
departments, or even enterprises contend for the same network resources.
Application-based contention occurs when different applications from the same user
or user group contend with each other for limited network resources. These
applications might have different service requirements from the network, as
illustrated in Figure 1-4.
12
Figure 1-4
Application-Based Contention
Data
Smooth/Bursty
Benign/Greedy
Largely Drop
Insensitive
Delay Insensitive
(Within Reason)
TCP Retransmits
Video
Voice
Smooth
Benign
Drop Sensitive
Delay Sensitive
UDP Best Priority
Bursty
Greedy
Drop Sensitive
Delay Sensitive
UDP Priority
To obtain the appropriate levels of service from often scarce network resources experiencing contention, the fundamental concept of QoS must be appliednamely, that all packets
are not equal. In other words, to resolve the contention, packets must be treated with managed unfairness (either preferentially or deferentially). In other words, administrative policies must be dened and deployed throughout the network infrastructure to ensure that each
node makes consistent decisions about the relative importance of an individual packet (or
ow) and adjusts its packet-handling behavior accordingly.
This concept of unfairness applies equally to trafc for which higher levels of priority must
be maintained (for example, to voice and video trafc) and trafc that is undesirable in the
network (denial-of-service [DoS] or worm-generated trafc, or even general web surng to
destinations unrelated to the goals of the enterprise). The latter category of trafc
introduces the concept of less than best-effort service, also referred to as Scavenger service
(based on an Internet 2 draft specication). Best-effort or better service is provided to all
desirable trafc on the network, but there is no sense in providing even best-effort service
to unwanted trafc. Such Scavenger trafc, if not dropped outright, is carried only when
spare capacity is available.
Understanding QoS
13
to contend inequitably for network resources. Real-time applications, such as voice or interactive video, can be given priority or preferential services over generic data applications
but not to the point that data applications are starving for bandwidth.
QoS is dened as the measure of a systems service availability and transmission quality.
Service availability is a crucial foundation element of QoS. Before any QoS can be implemented successfully, the network infrastructure should be designed to be highly available.
The target for high availability is 99.999 percent uptime, with only 5 minutes of downtime
permitted per year. The transmission quality of the network is determined by the following
factors:
Delay (or latency)This is the nite amount of time that it takes a packet to reach
the receiving endpoint after being transmitted from the sending endpoint. In the case
of voice, this equates to the amount of time that it takes for speech to leave the
speakers mouth and be heard by the listeners ear. This time period is termed end-toend delay and is comprised of two components: xed network delay and variable
network delay.
In data networks carrying voice, xed network delay further is broken down
into the following:
Packetization delayThe time required to sample and encode voice or
video signals into packets.
Serialization delayThe time required to transmit the packet bits onto the
physical media, based on the clocking rate of the interface.
Propagation delayThe time required for the electrical/optical pulses to
traverse the media en route to their destination, based on the laws of physics.
Delay variation (or jitter)Also known as interpacket delay, this is the difference
in the end-to-end delay between sequential packets. For example, if one packet
requires 100 ms to traverse the network from the source endpoint to the destination
endpoint, and the following packet requires 125 ms to make the same trip, the delay
variation would be calculated as 25 ms, as illustrated in Figure 1-5.
14
Figure 1-5
Delay Variation
Sender
Receiver
Network
Sender Transmits
t
A
D1
D2 = D1
D3 = D 2
D4 = D 3
Receiver Receives
Each end station in a VoIP or video over IP conversation has a jitter buffer,
which is used to smooth out the variation in arrival times of data packets that
contain voice. Jitter buffers can be xed or adaptive.
Instantaneous changes in arrival times of packets that exceed the jitter
buffers capability to compensate result in jitter buffer overruns and
underruns.
A jitter buffer underrun occurs when the arrival times of packets increase to
the point that the jitter buffer has been exhausted and contains no packets
for the digital signal processors (DSP) to process when it is time to play the
next piece of voice or video, resulting in clips.
A jitter buffer overrun occurs when packets containing voice or video arrive
faster than the jitter buffer can accommodate. When this happens, packets
are dropped when it is time to play the voice or video samples, resulting in
degraded voice quality.
Variable network delay generally is caused by congestion within the
network.
QoS Models
As briey introduced earlier, there are two models for providing the differentiated levels of
network service required in converged networks: IntServ and DiffServ.
QoS Models
15
IntServ Overview
Think of best-effort IP service in terms of the regular mail (snail-mail) service. The mail is
delivered if and when it can be, but it also might be lost (arriving at some undetermined time
in the future or not at all). By comparison, IntServ is analogous to a custom mail service,
such as diplomatic mail or courier services, with certain parameters regarding loss and
delivery guaranteed.
More specically, IntServ is a specication of the following:
What the sender is sending (rate, maximum transmission unit [MTU], and so on), as
described by the Transmission Specication (TSpec)
What the receiver needs (bandwidth, MTU, and so on), as described by the Receiver
Specication (RSpec)
How the signaling is performed on the network by the sender and receiver (that is, the
use of RSVP)
The framework of IntServ preserves the end-to-end semantics of QoS for IP. Key endpoints
are the sender and receiver applications that request a desired service from the network for
a set of ows, as dened by the source address, destination address, transport protocol,
source port, and destination port.
IntServ describes three main classes of service that an application can request:
All network elements must maintain state and exchange signaling messages on a perow basis, which might require a signicant amount of bandwidth on large networks.
Periodic refresh messages are used, which might require protection from packet loss
to keep the session(s) intact.
All intermediate nodes must implement RSVP.
16
DiffServ Overview
Continuing the analogy of mail services, DiffServ can be compared to different tiers of mail
service, such as regular, registered, priority, and express mail. Each service offers particular
parameters of delivery, and the piece of mail is stamped at each intermediate handling point
to ensure that it gets the required service. However, there is no specic connection between
the sender of the piece of mail and the treatment that the mail receives.
The premise of DiffServ is very simple: It offers different network service levels to a
packet, thereby enable[ing] scalable service discrimination in the Internet without the
need for per-ow state and signaling at every hop (RFC 2474). Packets of a particular
service belong to a particular class, and the treatment of each class is described by
PHBs with which the network node must comply. Meaningful services can be constructed
by a combination of the following:
Setting a eld in the IP header upon network entry or at a network boundary (IPP
or DSCPs)
Using this eld to determine the nodes inside the network forward the packets
Conditioning the marked packets at network boundaries in accordance with the
requirements or rules of each class or service
The essence of DiffServ is the specication of PHBs that an application can receive from
the network:
Expedited forwarding (RFC 3246, previously RFC 2598)Provides a strictpriority service (compare this to express mail service)
Class selectors (RFC 2474)Provides code points that can be used for backward
compatibility with IP Precedence models
DiffServ constructs services from the PHBs by classifying packets into classes at the edge,
or boundary, of the network and marking the packets accordingly. Optionally, the packets
can be metered with policing or shaping techniques. The core of the network implements
the PHBs and uses the packet markings to make queuing and dropping decisions.
The DiffServ model include these advantages:
17
Figure 1-6 illustrates the relationship and overall cohesiveness of different QoS tools.
18
Figure 1-6
QoS Toolset
Ingress
Egress
LLQ
IP Traffic
VoIP HTTP FTP
Marker or
Policer
DSCP Written
VoIP HTTP FTP
Classifier
WRED
Queuing
and
Shaping
Congestion
Avoidance
Scheduling
Interface
Congestion
Management
Packets or frames entering a network device must be analyzed to determine the treatment
that they should be given. This analysis is referred to as classication. Classication is the
rst QoS function to occur for any given QoS policy, and it can occur repeatedly at various
stages of policy enforcement. To reduce the requirement for detailed recursive classication, it generally is recommended that trafc types be classied as close to their sources as
possible and that their packets be marked accordingly.
Marking establishes a distinct trust boundary that demarcates the point where the packet
markings are set properly and, therefore, detailed classication (Layer 4 through 7 analysis)
no longer is required.
When packets enter a network device, three generic marking possibilities exist:
In the rst two scenarios, it is recommended that the packets be marked or re-marked.
After marking, the next step is another classication process based on packet markings. At
this point, packets might be discarded by a policer (for example, if they exceed an SLA) or
a congestion-avoidance mechanism (for example, early dropping because buffers reached
Simplifying QoS
19
the maximum limit). Packets that are not discarded are subject to congestion management
(queuing) to prioritize and protect various trafc types when congestion happens to the
transmission link. Finally, these packets are scheduled for transmission on the egress link,
where shaping might occur to control bursts and ensure that outgoing trafc conforms to
any SLA that is in effect on the ingress of the next hop.
Link-specic tools usually are required only at WAN edges and include mechanisms for
compression or fragmentation to reduce delay and jitter.
Some QoS tools (such as marking and policing) can be applied in both the ingress and
egress directions of the trafc ow on an interface. Other tools (such as queuing) can be
applied only in the egress direction (with some platform-specic exceptions).
The QoS mechanisms (primarily DiffServ) described previously are applicable to packets
already admitted to the network. Such tools are very effective in protecting real-time (voice)
from non-real-time (data) trafc, but they are completely ineffective in protecting real-time
applications from other real-time applications (that is, protecting voice trafc from other
voice trafc). Such protection can be achieved only through call admission control (CAC)
mechanisms, which decide whether to allow or disallow new packet streams onto the
network. IntServ mechanisms, such as RSVP, can be used to implement discrete CAC.
Simplifying QoS
In the late 1990s, Cisco spent signicant development effort to implement an extensive QoS
tool and feature set. The portfolio of QoS mechanisms and options became very rich and,
simultaneously, very complicated to deploy. During the early 2000s, the predominant
customer feedback relating to QoS was the request to simplify QoS deployment. In
response to this feedback, a series of QoS simplication and automation projects was
initiated. The result included the following:
20
class-mapA classication lter dened within the policy map to identify trafc for
preferential or deferential treatment. Trafc can be identied by IPP or DSCP, named
or numbered access control lists (ACLs), Network-Based Application Recognition
(NBAR), Layer 2 parameters (CoS, FR DE, ATM cell loss priority [CLP], MPLS
Experimental [EXP] value), or a combination of these.
policy-mapA statement that denes how each trafc type, as identied by the class
map(s), should be serviced. Options include marking/re-marking, policing, shaping,
low-latency or class-based weighted fair queuing, selective dropping, and header
compression.
Example 1-1 demonstrates a sample MQC policy. This is just an example of a possible
conguration; the signicance of the commands used in this example is explained in
subsequent chapters.
Example 1-1 MQC Policy
Router(config)# class-map match-any CRITICAL-DATA
Router(config-cmap)# match protocol http url "*customer*"
Router(config-cmap)# match protocol citrix
Router(config)# policy-map WAN-EDGE
Router(config-pmap)# class CRITICAL-DATA
Router(config-pmap-c)# bandwidth 1000
Router(config)# interface Serial 0/0
Router(config-if)# service-policy output WAN-EDGE
QoS Baseline
Although MQC was a major step in simplifying QoS features, it addressed only the user
interface element of QoS deployment. Another factor in the complexity of QoS deployment
is the inconsistency of QoS features across specic hardware platform releases or software
releases.
In 2002, a series of internal Cisco initiatives, dubbed Technology Baselines, was launched
to address the inconsistency of which features exist on which platforms. Specic to QoS, the
QoS Baseline is a strategic internal document written by Ciscos most qualied QoS experts,
each of whom had contributed to multiple QoS RFCs and so was best qualied to interpret
these standards in additional detail. The QoS Baseline was developed with two primary
goals:
To document which QoS features are required on platforms that are considered
QoS-enabled products
Simplifying QoS
21
In part, the Cisco QoS Baseline is aimed at producing higher-quality new products,
predictable QoS feature sets across products, and improved consistency of QoS features
across platforms. To that end, it provides engineers who are developing new products with
a reference list of QoS features that they must include and test. For existing platforms, it
provides a gap analysis that is used to steer product roadmaps to achieve QoS baseline
compliance.
Beyond its engineering inuence, the overall objective of the QoS Baseline is to unify QoS
within Cisco: from service provider to enterprise, from engineering to marketing. For
example, the concept of trafc classication inevitably begs the question of how many
classes of trafc there should be. MQC supports up to 256 different trafc classes within a
policy map. Although adept QoS administrators might see this as desirable, those who are
new to QoS and have no idea how many classes of trafc they need in their networks might
view it as daunting.
To address the needs of the both expert and casual QoS users, the QoS Baseline denes a
set of class template recommendations that can be either be implemented as is or customized to individual needs. It gives a starting point for network design and implementation,
and it provides a basis for comparable product testing and performance reportingboth of
which signicantly simplify the implementation of QoS in a network.
The QoS Baseline denes up to 11 classes of trafc that are used in all Cisco design guides,
conguration examples, and testing suites. The QoS Baseline does not dictate that every
enterprise deploy all these trafc classes immediately. The set of 11 classes is designed to
accommodate the QoS needs of an enterprise not only for today, but also for the foreseeable
future. Even if an enterprise needs only a handful of these 11 classes today, following the
QoS Baseline recommendations will enable it to smoothly implement additional trafc
classes in the future.
Table 1-1 gives a summary of the QoS Baseline recommendations.
Default Behavior
The next step in the trend toward simplication was for the network nodes to do the right
thing. Through a series of changes in Cisco IOS Software and selected nonCisco IOS
products (such as IP phones), voice packets now are marked by default to the recommended
value of DSCP EF. These adjustments in the default behavior eliminate the need for access
lists and explicit marking congurations that were required in earlier software releases.
These changes are discussed in more detail in Chapter 3, Classication and Marking
Tools.
22
Table 1-1
DSCP
Reference
Intended Protocols
Configuration
EF
EF
101110
RFC 3246
Interactive voice
Admission control =
RSVP
Queuing = priority
AF1
AF2
AF3
AF4
AF11
AF12
AF13
001010
001100
001110
RFC 2597
AF21
AF22
AF23
010010
010100
010110
RFC 2597
AF31
AF32
AF33
011010
011100
011110
RFC 2597
AF41
AF42
AF43
100010
100100
100110
RFC 2597
Database access,
transaction services,
interactive trafc,
preferred data service
Locally dened;
mission-critical
applications
Admission control =
RSVP
Active queue
management =
DSCP-based WRED
Active queue
management =
DSCP-based WRED
Active queue
management =
DSCP-based WRED
IP routing
Class 6
110000
RFC 2474
BGP, OSPF, and so on
section 4.2.2
PHB
Table 1-1
DSCP
Reference
Intended Protocols
Streaming video
Class
Selector 4
100000
RFC 2474
Often proprietary
section 4.2.2
Configuration
Admission control =
RSVP
Queuing = rate based
Active queue
management = WRED
011000
RFC 2474
SIP, H.323, and so on
section 4.2.2
Network
management
Class
Selector 2
010000
RFC 2474
SNMP
section 4.2.2
Scavenger
I2SS or
Class
Selector 1
001000
Internet 2
usage
User-selected service
Other
000000
RFC 2474
section 4.1
Unspecied trafc
23
Active queue
management = WRED
Simplifying QoS
Default or
Class
Selector 0
24
Automatic QoS
Automatic QoS (AutoQoS) is essentially an intelligent macro that enables an administrator
to enter one or two simple AutoQoS commands to enable all the appropriate features for the
recommended QoS settings for an application on a specic interface.
For example, in its rst release, AutoQoS VoIP would provide best-practice QoS congurations for VoIP on Cisco Catalyst switches and routers. By entering one global or one
interface command (depending on the platform), the AutoQoS VoIP macro then would
expand these commands into the recommended VoIP QoS congurations (complete with
all the calculated parameters and settings) for the platform and interface on which the AutoQoS is applied.
AutoQoS is available on both LAN and WAN Cisco Catalyst switches and Cisco IOS
routers. In its initial version, however, AutoQoS applies only to VoIP deployments.
For campus Catalyst switches, AutoQoS performs the following automatically:
Simplifying QoS
25
For Cisco IOS routers, AutoQoS is supported on Frame Relay, ATM, HDLC, Point-to-Point
Protocol (PPP), and Frame Relay-to-ATM links. It performs the following automatically:
Classies and marks VoIP bearer trafc (to DSCP EF) and call-signaling trafc
(originally to DSCP AF31, but more recently to CS3)
Applies scheduling:
Low-latency queuing (LLQ) for voice
Class-based weighted fair queuing (CBWFQ) for call signaling
Fair queuing (FQ) for all other trafc
Enables Link Fragmentation and Interleaving (either MLPPP LFI or FRF.12) on slow
links (those less than or equal to 768 kbps), if required
Provides RMON alerts of VoIP packets that are dropped
The rst phase of AutoQoS on the Cisco IOS router platforms is available in Cisco IOS
Release 12.2(15)T.
In its second releasefor Cisco IOS routers onlyAutoQoS Enterprise detects and
provisions for up to 10 (of the 11 QoS Baseline) trafc classes. (The only class that is not
assigned automatically is Locally-Dened Mission-Critical because it is dened
subjectively by network administrators and varies from one enterprise to the next.)
The AutoQoS Enterprise feature simplies QoS implementation and speeds the
provisioning of QoS for voice, video, and data over a Cisco network. It reduces human error
and lowers training costs. AutoQoS Enterprise creates class maps and policy maps on the
basis of Cisco experience and best-practices methodology, such as that documented in this
book. Customers also can use existing Cisco IOS commands to modify the congurations
that automatically are generated by the AutoQoS Enterprise feature, to meet specic
requirements.
The AutoQoS Enterprise feature consists of two conguration phases, completed in the
following order:
1 Autodiscovery (data collection)The autodiscovery phase uses protocol discovery
from the data collected during the autodiscovery phase and installs the templates on
the interface. These templates then are used as the basis for creating the class maps
and policy maps for the network. After the class maps and policy maps are created,
they are installed on the relevant interface(s).
26
Table 1-2 shows the classes of trafc automatically detected and provisioned for by
AutoQoS Enterprise, complete with their QoS Baseline recommended markings.
Table 1-2
Traffic Type
DSCP Value
IP Routing
CS6
Interactive Voice
EF
Interactive Video
AF41
Streaming Video
CS4
Telephony Signaling
AF31 or CS3
AF21
Network Management
Network-management trafc
CS2
Bulk Data
AF11
Scavenger
CS1
Best Effort
This second phase of AutoQoS became available in Cisco IOS Release 12.3(7)T.
27
To address this barrier to adoption, a small group of dedicated technical marketing engineers within a Cisco solutions engineering team was tasked with guring out how best to
deploy QoS for converged voice and data networks and publishing a best-practices design
guide that customers could use as a reference. To accomplish this mandate, they built the
largest networking lab within Cisco to run extensive scale tests of QoS features on various
hardware and software platforms.
Unlike conventional regression testing of QoS features, this team used a different approach:
They tested QoS features not in isolation, but in conjunction with the many other features
that typically would be deployed within a large enterprise environment. For example, QoS
tools were enabled simultaneously with availability tools, multicast tools, and security and
encryption tools. The objective was to make the tests as representative of real-life enterprise
environments as possible.
The results from these extensive tests were summarized and published in late 1999 as the
QoS Design Guide. This document quickly became one of the most downloaded technical
documents ever published by Cisco. Customers nally had not only the tools to achieve
convergence of their voice and data networks, but also the veried design guidance to do
so with condence.
Nonetheless, at around 200 pages, the conguration-rich QoS Design Guide was a serious
read that took a long time for most network administrators to fully absorb. Furthermore, it
indirectly highlighted how difcult it was to enable end-to-end QoS across a single vendors
(Ciscos) products. There were far too many platform-specic idiosyncrasies to keep in
mind, as far as most network administrators were concerned.
Thus, to simplify the process, the solutions engineering team engaged with various
technology groups and business units within Cisco to drive the automation of these bestpractice recommendations. The response was very favorable, and the result was AutoQoS
VoIP for the campus and WAN. AutoQoS VoIP is a cross-platform feature that is targeted
to customers who want to deploy QoS for VoIP quickly and accurately, without the
requirement of extensive knowledge of QoS.
As with all technical papers, the QoS Design Guide needed to be updated and expanded
after a couple years. During this time, customers increasingly were struggling with how
best to deploy QoS for videoconferencing and different types of data applications. Therefore, the scope of the original design guide was expanded to include these applications, and
a second version of the document was released in August 2002. At the time, all design
guides originating from the solutions engineering team were rebadged as Solution Reference Network Designs (SRNDs), to set them apart from the many (often unveried and not
scale-tested) design guides available on Cisco.com. Thus, the second version of this document was titled the Enterprise QoS SRND.
Shortly thereafter, the QoS Baseline was completed and released internally. Because the
QoS Baseline conicted with some of the (DSCP marking) recommendations published in
the QoS SRND, it took precedence and required the Enterprise QoS SRND to be rewritten
28
to be compliant with the QoS Baseline. This caused changes in the document because the
marking recommendations put forward in the Enterprise QoS SRND reected the best
practices for an enterprise, but not necessarily for a service provider. As the lines between
enterprise and service provider are not only blurring but also requiring a level of cooperation previously unprecedented (as discussed in additional detail in Chapter 15, MPLS
VPN QoS Design), it is important for a single set of marking recommendations to be used
for both enterprise and service provider design guides.
Following this, Cisco IOS development combined the best practices put forward in the
QoS design guides with the classication and marking recommendations dened in the QoS
Baseline, and released AutoQoSEnterprise for the WAN. AutoQoS Enterprise, similar to
AutoQoS VoIP, is targeted at customers who want to enable QoS for voice, video, and
multiple classes of data quickly and accurately over their WANs, without requiring an
extensive knowledge of QoS conguration and operation.
So why is this relevant? This brief history was given to describe the cycles required in
AutoQoS evolution, illustrated in Figure 1-7.
Figure 1-7
AutoQoS Evolution
QoS SRND v3
(Voice, Video, Data +
DoS/Worm Mitigation)
Increased Sophistication
QoS Baseline
QoS SRND v2
(Voice, Video, Data)
QoS SRND v1
(VoIP Only)
2000
AutoQoS VoIP
(Campus + WAN)
2002
AutoQoS-Enterprise
(WAN Only)
2004
Summary
29
Summary
This chapter briey reviewed the fundamental concepts of QoS, such as IntServ and
DiffServ; the categories of QoS tools that exist, and why they are categorized in this way;
the Modular QoS CLI that pulls together the use and conguration of various QoS tools,
making it clearer how and where they interact; the QoS Baseline; and Automatic QoS Cisco
initiatives. This chapter also introduced the QoS Baseline 11 classes of trafc, including the
less-than best-effort Scavenger class.
You are now ready to get into the principles of QoS design and then review salient details
of the QoS toolset. Chapter 2, QoS Design Overview, introduces QoS design principles
and objectives. Chapters 3 through 9 provide a more in-depth discussion of the various QoS
tool categories, the specic tools in each, and how and where these should be applied.
Chapters 10 through 16 provide design examples of how these tools are deployed in specic
types of networks. These network types are included in these discussions:
30
The objective of this book is not to discuss every QoS feature in isolationplenty of
material available in the industry accomplishes this. The goal instead is to show how these
techniques are used in a holistic network design to achieve end-to-end QoS for the entire
network. Another objective of this book is to show how to deploy QoS not only for purposes
such as maintaining voice quality for VoIP calls, but also to show how QoS can be used to
achieve such goals as protecting the network against denial-of-service (DoS) attacks and
managing trafc ows to keep unwanted trafc (such as copyright-infringing music lesharing applications) off the network.
Further Reading
General
IntServ is described by a series of RFCs from the IntServ IETF working group.
RFC 2210, The Use of RSVP with IETF Integrated Services: http://www.ietf.org/
rfc/rfc2210.txt.
Cisco Catalyst QoS: Quality of Service in Campus Networks. Michael Flannagan and
Kevin Turek. Indianapolis: Cisco Press, 2003.
IntServ
RFC 1633, Integrated Services in the Internet Architecture: An Overview: http://
www.ietf.org/rfc/rfc1633.txt.
Further Reading
31
DiffServ
DiffServ is described by a series of RFCs from the DiffServ IETF working group.
RFC 2474, Denition of the Differentiated Services Field (DS Field) in the IPv4 and
IPv6 Headers: http://www.ietf.org/rfc/rfc2474.txt.
RFC 2475, An Architecture for Differentiated Services: http://www.ietf.org/rfc/
rfc2475.txt.
RFC 2597, Assured Forwarding PHB Group: http://www.ietf.org/rfc/rfc2597.txt.
RFC 2598, An Expedited Forwarding PHB: http://www.ietf.org/rfc/rfc2598.txt.
RFC 2697, A Single Rate Three Color Marker: http://www.ietf.org/rfc/rfc2697.txt.
RFC 2698, A Two Rate Three Color Marker: http://www.ietf.org/rfc/rfc2698.txt.
RFC 3168, Explicit Congestion Notication (ECN) to IP: http://www.ietf.org/rfc/
rfc3168.txt.
RFC 3246, An Expedited Forwarding PHB (replacing RFC 2598): http://
www.ietf.org/rfc/rfc3246.txt.
AutoQoS
AutoQoS VoIP for Cisco IOS router platforms, Cisco IOS Release 12.2(15)T
documentation: http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t15/ftautoq1.htm.
AutoQoS Enterprise for Cisco IOS router platforms, Cisco IOS Release 12.3(7)T
documentation: http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/
123newft/123t/123t_7/ftautoq2.htm.
AutoQoS VoIP, Catalyst 2950, Catalyst IOS version 12.1(19)EA1: http://
www.cisco.com/univercd/cc/td/doc/product/lan/cat2950/12119ea1/2950scg/
swqos.htm#1125412.
AutoQoS VoIP, Catalyst 2970, Catalyst IOS version 12.1(19)EA1: http://
www.cisco.com/univercd/cc/td/doc/product/lan/cat2970/12119ea1/2970scg/
swqos.htm#1231112.
AutoQoS VoIP, Catalyst 3550, Catalyst IOS version 12.1(19)EA1: http://
www.cisco.com/univercd/cc/td/doc/product/lan/c3550/12119ea1/3550scg/
swqos.htm#1185065.
AutoQoS VoIP, Catalyst 3750, Catalyst IOS version 12.1(19)EA1: http://
www.cisco.com/univercd/cc/td/doc/product/lan/cat3750/12119ea1/3750scg/
swqos.htm#1231112.
AutoQoS VoIP, Catalyst 4500, Catalyst IOS version 12.2(18): http://www.cisco.com/
univercd/cc/td/doc/product/lan/cat4000/12_2_18/cong/qos.htm#1281380.
AutoQoS VoIP, Catalyst 6500, Catalyst CatOS version 8.2: http://www.cisco.com/
univercd/cc/td/doc/product/lan/cat6000/sw_8_2/confg_gd/autoqos.htm.
This chapter provides an overview of the QoS design and deployment process. This process
requires business-level objectives of the QoS implementation to be dened clearly and for
the service-level requirements of applications to be assigned preferential or deferential
treatment so that they can be analyzed.
These enterprise applications with unique QoS requirements are discussed in this chapter:
Voice
Call-Signaling
Interactive-Video
Streaming-Video
Best-Effort Data
Bulk Data
Transactional Data
Mission-Critical Data
IP Routing trafc
Network-Management trafc
Scavenger trafc
Additionally, key QoS design and deployment best practices that can simplify and expedite
QoS implementations are presented, including these:
CHAPTER
Voice trafc should be marked to DSCP EF per the QoS Baseline and RFC 3246.
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 at less than 30 ms.
A range of 21 to 320 kbps of guaranteed priority bandwidth is required per call
(depending on the sampling rate, the VoIP codec, and Layer 2 media overhead).
34
Voice quality directly is affected by all three QoS quality factors: loss, latency, and jitter.
Loss
Loss causes voice clipping and skips. Packet loss concealment (PLC) is a technique used
to mask the effects of lost or discarded VoIP packets. The method of PLC used depends
upon the type of codec. A simple method used by waveform codecs such as G.711 (PLC
for G.711 is dened in G.711 Appendix I) is to replay the last received sample with
increasing attenuation at each repeat; the waveform does not change much from one sample
to the next. This technique can be effective at concealing the loss of up to 20 ms of samples.
The packetization interval determines the size of samples contained within a single packet.
Assuming a 20-ms (default) packetization interval, the loss of two or more consecutive
packets results in a noticeable degradation of voice quality. Therefore, assuming a random
distribution of drops within a single voice ow, a drop rate of 1 percent in a voice stream
would result in a loss that could not be concealed every 3 minutes, on average. A 0.25
percent drop rate would result in a loss that could not be concealed once every 53 minutes,
on average.
NOTE
A decision to use a 30-ms packetization interval, for a given probability of packet loss,
could result in worse perceived call quality than for 20 ms because PLC could not
effectively conceal the loss of a single packet.
Low-bit-rate, frame-based codecs, such as G.729 and G.723, use more sophisticated PLC
techniques that can conceal up to 30 to 40 ms of loss with tolerable quality when the
available history used for the interpolation is still relevant.
With frame-based codecs, the packetization interval determines the number of frames
carried in a single packet. As with waveform-based codecs, if the packetization interval is
greater than the loss that the PLC algorithm can interpolate for, PLC cannot effectively
conceal the loss of a single packet.
VoIP networks typically are designed for very close to 0 percent VoIP packet loss, with the
only actual packet loss being due to L2 bit errors or network failures.
Latency
Latency can cause voice quality degradation if it is excessive. The goal commonly used in
designing networks to support VoIP is the target specied by ITU standard G.114 (which,
incidentally, is currently under revision): This states that 150 ms of one-way, end-to-end
(from mouth to ear) delay ensures user satisfaction for telephony applications. A design
35
should apportion this budget to the various components of network delay (propagation
delay through the backbone, scheduling delay because of congestion, and access link
serialization delay) and service delay (because of VoIP gateway codec and dejitter buffer).
Figure 2-1 illustrates these various elements of VoIP latency (and jitter because some delay
elements are variable).
Figure 2-1
Si
Si
WAN/VPN
Campus
CODEC
G.729A: 25 ms
Branch
O
Offic
ffic
ffice
Office
Queuing
Serialization
Propagation and
Network
Jitter Buffer
Variable
Variable
Fixed
(6.3 s / Km) +
Network Delay
(Variable)
20-50 ms
150ms
If the end-to-end voice delay becomes too long, the conversation begins to sound like two
parties talking over a satellite link or even a CB radio. The ITU G.114 states that a 150-ms
one-way (mouth-to-ear) delay budget is acceptable for high voice quality, but 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. Thus, Cisco recommends designing to the
ITU standard of 150 ms. If constraints exist and this delay target cannot be met, the delay
boundary can be extended to 200 ms without signicant impact on voice quality.
NOTE
Certain organizations might view higher delays as acceptable, but the corresponding
reduction in VoIP quality must be taken into account when making such design decisions.
36
Jitter
Jitter buffers (also known as playout 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 trade off between delay and
the probability of interrupted playout because of late packets. Late or out-of-order packets
are discarded.
If the jitter buffer is set either arbitrarily large or arbitrarily small, it imposes unnecessary
constraints on the characteristics of the network. A jitter buffer set too large adds to the endto-end delay, meaning that less delay budget is available for the network; hence, the network needs to support a tighter delay target than practically necessary. If a jitter buffer is
too small to accommodate the network jitter, buffer underows or overows can occur.
In an underow, the buffer is empty when the codec needs to play out a sample. In an overow, the jitter buffer is already full and another packet arrives; that next packet cannot be
enqueued in the jitter buffer. Both jitter buffer underows and overows cause voice quality
degradation.
Adaptive jitter buffers aim to overcome these issues by dynamically tuning the jitter buffer
size to the lowest acceptable value. Well-designed adaptive jitter buffer algorithms should
not impose any unnecessary constraints on the network design by doing the following:
Instantly increasing the jitter buffer size to the current measured jitter value following
a jitter buffer overow
Slowly decreasing the jitter buffer size when the measured jitter is less than the current
jitter buffer size
Using PLC to interpolate for the loss of a packet on a jitter buffer underow
When such adaptive jitter buffers are usedin theoryyou can engineer out explicit
considerations of jitter by accounting for worst-case per-hop delays. Advanced formulas
can be used to arrive at network-specic design recommendations for jitter (based on
maximum and minimum per-hop delays). Alternatively, because extensive lab testing has
shown that voice quality degrades signicantly when jitter consistently exceeds 30 ms, this
30 ms value can be used as a jitter target.
Because of its strict service-level requirements, VoIP is well suited to the expedited
forwarding per-hop behavior, dened in RFC 3246 (formerly RFC 2598). Therefore, it
should 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 through
1PxQyT queuing, discussed in more detail in Chapter 10, Catalyst QoS Tools) or in
software (as in Cisco IOS routers through LLQ, discussed in more detail in Chapter 5,
Congestion-Management Tools).
The bandwidth that VoIP streams consume (in bits per second) is calculated by adding the
VoIP sample payload (in bytes) to the 40-byte IP, UDP, and RTP headers (assuming that
cRTP is not in use), multiplying this value by 8 (to convert it to bits), and then multiplying
again by the packetization rate (default of 50 packets per second).
37
Table 2-1 details the bandwidth per VoIP ow (both G.711 and G.729) at a default packetization rate of 50 packets per second (pps) and at a custom packetization rate of 33 pps. This
does not include Layer 2 overhead and does not take into account any possible compression
schemes, such as Compressed Real-Time Transport Protocol (cRTP, discussed in detail in
Chapter 7, Link-Specic Tools).
For example, assume a G.711 VoIP codec at the default packetization rate (50 pps). A new
VoIP packet is generated every 20 ms (1 second / 50 pps). The payload of each VoIP packet
is 160 bytes; with the IP, UDP, and RTP headers (20 + 8 + 12 bytes, respectively) included,
this packet become 200 bytes in length. Converting bits to bytes requires multiplying by 8
and yields 1600 bps per packet. When multiplied by the total number of packets per second
(50 pps), this arrives at the Layer 3 bandwidth requirement for uncompressed G.711 VoIP:
80 kbps. This example calculation corresponds to the rst row of Table 2-1.
Table 2-1
NOTE
Packetization
Interval
Voice Payload
in Bytes
Packets Per
Second
Bandwidth Per
Conversation
G.711
20 ms
160
50
80 kbps
G.711
30 ms
240
33
74 kbps
G.729A
20 ms
20
50
24 kbps
G.729A
30 ms
30
33
19 kbps
The Service Parameters menu in Cisco CallManager Administration can be used to adjust
the packet rate. It is possible to congure 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, ags, CRCs, and ATM cell padding. The amount of overhead
per VoIP call depends on the Layer 2 media used:
802.1Q Ethernet adds (up to) 32 bytes of Layer 2 overhead (when preambles are
included).
ATM adds varying amounts of overhead, depending on the cell padding requirements.
38
Table 2-2 shows more accurate bandwidth-provisioning guidelines for voice because it
includes Layer 2 overhead.
Table 2-2
Bandwidth
Consumption
802.1Q
Ethernet
PPP
MLP
Frame
Relay with
FRF.12
G.711 at 50 pps
93 kbps
84 kbps
86 kbps
84 kbps
106 kbps
G.711 at 33 pps
83 kbps
77 kbps
78 kbps
77 kbps
84 kbps
28 kbps
30 kbps
28 kbps
43 kbps
21 kbps
22 kbps
21 kbps
28 kbps
ATM
Call-Signaling Trafc
The following list summarizes the key QoS requirements and recommendations for CallSignaling trafc:
Call-Signaling trafc should be marked as DSCP CS3 per the QoS Baseline (during
migration, it also can be marked the legacy value of DSCP AF31).
150 bps (plus Layer 2 overhead) per phone of guaranteed bandwidth is required for
voice control trafc; more may be required, depending on the Call-Signaling
protocol(s) in use.
39
provisioning only 2 percent for Call-Signaling trafc over WAN and VPN links). However,
newer versions of CallManager and SCCP have shown some bloating in this signaling
protocol, so design recommendations have been adjusted to match (most examples in the
design chapters that follow have been adjusted to allocate 5 percent for Call-Signaling
trafc). This is a normal part of QoS evolution: As applications and protocols continue to
evolve, so do the QoS designs required to accommodate them.
Other Call-Signaling protocols include (but are not limited to) H.225 and H.245, the
Session Initiated Protocol (SIP), and the Media Gateway Control Protocol (MGCP). Each
Call-Signaling protocol has unique TCP and UDP ports and trafc patterns that should be
taken into account when provisioning QoS policies for them.
Interactive-Video
When provisioning for Interactive-Video (video conferencing) trafc, the following
guidelines are recommended:
Because IP videoconferencing (IP/VC) includes a G.711 audio codec for voice, it has the
same loss, delay, and delay-variation requirements as voicebut the trafc patterns of
videoconferencing are radically different from those of voice.
For example, videoconferencing trafc has varying packet sizes and extremely variable
packet rates. These are illustrated in Figures 2-2 and 2-3.
40
Figure 2-2
65128 Bytes
1%
129256 Bytes
34%
5131024 Bytes
20%
257512 Bytes
8%
Figure 2-3
I Frame
10241518
Bytes
450 kbps
30pps
P and B Frames
128256 Bytes
15pps
32 kbps
The videoconferencing rate is the sampling rate of the video stream, not the actual bandwidth that the video call requires. In other words, the data payload of videoconferencing
packets is lled with 384 kbps of voice plus video 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 also varies, so an absolute value of overhead
41
cannot be calculated accurately for all streams. However, testing has shown that a conservative rule of thumb for IP/VC bandwidth provisioning is to assign an LLQ bandwidth
equivalent to the IP/VC rate plus 20 percent. For example, a 384-kbps IP/VC stream
adequately is provisioned with an LLQ of 460 kbps.
NOTE
The Cisco LLQ algorithm has been implemented to include a default burst parameter
equivalent to 200 ms of trafc. Testing has shown that this burst parameter does not require
additional tuning for a single IP videoconferencing (IP/VC) stream. For multiple streams,
this burst parameter can be increased as required.
Streaming-Video
When addressing the QoS needs of Streaming-Video trafc, the following guidelines are
recommended:
Streaming-Video applications have more lenient QoS requirements because they are not
delay sensitive (the video can take several seconds to cue up) and are largely not jitter
sensitive (because of application buffering). However, Streaming-Video might contain
valuable content, such as e-learning applications or multicast company meetings, in which
case it requires service guarantees.
The QoS Baseline recommendation for Streaming-Video marking is DSCP CS4.
42
Oracle
SAP R/3
064 Bytes
65127 Bytes
128252 Bytes
253511
Bytes
5121023
Bytes
10241518
Bytes
5121023
Bytes
064
Bytes
253511
Bytes
10241518
Bytes
128252
Bytes
65127
Bytes
43
To make the matter even more complicated, it is crucial to recognize that, just as applications vary one from another, even the same application can vary signicantly from one
version to another.
A brief anecdote speaks to this point: After a southern California semiconductor company
provisioned QoS for Voice and Mission-Critical Data (SAP R/3), everything went well for
about six months. At that point, users began complaining of excessive delays in completing
basic transactions. Operations that previously required a second or less to complete were
taking signicantly longer. The application teams blamed the networking teams, claiming
that QoS was broken. Further investigation produced the information in the following
graph, shown in Figure 2-5.
Figure 2-5
14,000
57,000
33,000
490,000
Client Version
500,000
400,000
300,000
200,000
100,000
0
The Mission-Critical Data applicationin this instance, SAPhad been upgraded from
version 3.0F to 4.6C. As a result, a basic order-entry transaction required 35 times more
trafc than the original version. Additional provisioning and policy tuning was required to
accommodate the new version of the same application.
Given this reality, the question on how best to provision QoS for data is a daunting one.
After wrestling with this question for several years, the authors of the QoS Baseline came
up with four main classes of data trafc, according to their general networking characteristics and requirements. These classes are Best-Effort, Bulk Data, Transactional Data/Interactive Data and (Locally-Dened) Mission-Critical Data. Each of these classes is examined
in more detail in the following sections.
44
Best-Effort Data
When addressing the QoS needs of Best-Effort trafc, the following guidelines are
recommended:
The Best-Effort class is the default class for all data trafc. Only if an application has been
selected for preferential or deferential treatment is it removed from the default class.
In 2003, one Wall Street nancial company did an extensive study to identify and categorize
the number of different applications on its networks. It found more than 3000 discrete applications traversing its infrastructure. Further research has shown that this is not uncommon for
larger enterprises. Therefore, because enterprises have several hundredif not thousands
ofdata applications running over their networks (of which the majority default to the
Best-Effort class), adequate bandwidth needs to be provisioned for this default class to handle the sheer volume of applications that are included in it. Otherwise, applications that
default to this class easily are drowned out, typically resulting in an increased number of
calls to the networking help desk from frustrated users. It is therefore recommended that at
least 25 percent of a links bandwidth be reserved for the default Best-Effort class.
Bulk Data
When addressing the QoS needs of Bulk Data trafc, the following guidelines are
recommended:
Bulk Data trafc should be marked to DSCP AF11; excess Bulk Data trafc can be
marked down by a policer to AF12 or AF13.
Bulk Data trafc should have a moderate bandwidth guarantee but should be
constrained from dominating a link.
The Bulk Data class is intended for applications that are relatively noninteractive and
not drop sensitive, and that typically span their operations over a long period of time
as background occurrences. Such applications include FTP, e-mail, backup operations,
database synchronizing or replicating operations, video content distribution, and any other
type of application in which users typically cannot proceed because they are waiting for the
completion of the operation (in other words, a background operation).
The advantage of provisioning moderate bandwidth guarantees to Bulk Data applications
(instead of applying policers to them) is that Bulk Data applications dynamically can take
advantage of unused bandwidth and thus can speed up their operations during nonpeak
periods. This, in turn, reduces the likelihood that they will bleed into busy periods and
absorb inordinate amounts of bandwidth for their non-time-sensitive operations.
45
Transactional Data trafc should have an adequate bandwidth guarantee for the
interactive, foreground operations that it supports.
46
Transactional
PHB: AF2
Application/Traffic
Properties
Packet/Message
Sizes
Highly interactive
applications with tight userfeedback requirements.
Average message
size < 100 bytes.
SAP, PeopleSoftVantive,
OracleFinancials,
Internet Procurement, B2B,
Supply Chain Management,
Application Server, Oracle
8i Database, Ariba Buyer,
I2, Siebel, E.piphany,
Broadvision, IBM Bus 2
Bus, Microsoft SQL, BEA
Systems, DLSw+.
Transactional applications
typically use a client/server
protocol model.
Depends on
application; could
be anywhere from
1 KB to 50 MB.
Example Applications
User-initiated, client-based
queries are followed by
server response. The query
response can consist of
many messages between
client and server.
The query response can
consist of many TCP and
FTP sessions running
simultaneously (for
example, HTTP-based
applications).
Table 2-3
47
Best-Effort
PHB: Default
Example Applications
Database syncs, networkbased backups, Lotus
Notes, Microsoft Outlook,
e-mail download (SMTP,
POP3, IMAP, Exchange),
video content distribution,
large FTP le transfers.
Application/Traffic
Properties
Packet/Message
Sizes
Long le transfers.
Average message
size 64 KB or
greater.
DLSw+ Considerations
Some enterprises support legacy IBM equipment that requires data-link switching plus
(DLSw+) to operate across an enterprise environment.
In such cases, it is important to recognize that DLSw+ trafc, by default, is marked to IP
Precedence 5 (DSCP CS5). This default marking could interfere with VoIP provisioning
because both DSCP EF and DSCP CS5 share the same IP Precedence, 802.1Q/p CoS, and
MPLS EXP value (of 5). Therefore, it is recommended to re-mark DLSw+ trafc away
from this default value of IP Precedence 5.
Unfortunately, at the time of writing, Cisco IOS does not support marking DSCP values
within the DLSw+ peering statements; it supports only the marking of type of service (ToS)
values using the dlsw tos map command.
NOTE
To explain this behavior from a historical perspective, when DLSw+ was developed, ToS
was a term loosely used to refer to the rst 3 bits (the IP Precedence bits) of the IP ToS byte,
as dened in RFC 791. For many years, these were typically the only bits of the ToS byte
in use (the others almost always were set to 0), so it seemed to make sense at the time.
However, with the development of newer standards dening the use of the rst 6 bits of the
IP ToS byte for DiffServ markings (RFC 2474) and the last 2 bits for IP explicit congestion
notication (RFC 3168), using the term ToS to refer to only the rst 3 bits (the IP
Precedence bits) of the IP ToS byte has become increasingly inaccurate.
48
command.
Step 2 Identify DLSw+ trafc either with access lists (matching the DLSw+
TCP ports 1981 to 1983 or 2065) or with the match protocol dlsw
command.
When DLSw+ trafc is identied, it can be marked as either Transactional (AF21) or
Mission-Critical Data (DSCP 25), depending on the organizations preference.
IP Routing
When addressing the QoS needs of IP routing trafc, the following guidelines are
recommended:
IP routing trafc should be marked to DSCP CS6; this is default behavior on Cisco
IOS platforms.
Interior gateway protocols usually adequately are protected with the Cisco IOS
internal PAK_priority mechanism. Exterior gateway protocols, such as BGP, are
recommended to have an explicit class for IP routing with a minimal bandwidth
guarantee.
Scavenger Class
49
As datagrams are processed though the router and down to the interfaces, they internally
are encapsulated with a small packet header, referred to as the PAKTYPE structure. Within
the elds of this internal header is a PAK_priority ag that indicates the relative importance
of control packets to the routers internal processing systems. PAK_priority designation is
a critical internal Cisco IOS Software operation and, as such, is not administratively
congurable in any way.
It is important to note that although exterior gateway protocol (EGP) trafc, such as Border
Gateway Protocol (BGP) trafc, is marked by default to DSCP CS6, it does not receive such
PAK_priority preferential treatment and might need to be protected explicitly to maintain
peering sessions.
NOTE
Network-Management
When addressing the QoS needs of Network-Management trafc, the following guidelines
are recommended:
Scavenger Class
When addressing the QoS treatment of Scavenger trafc, the following guidelines are
recommended:
50
Groekster, Napster, iMesh, and so on), gaming applications (Doom, Quake, Unreal Tournament, and so on), and any entertainment video applications.
Assigning Scavenger trafc to minimal bandwidth queue forces it to be squelched to
virtually nothing during periods of congestion, but it allows it to be available if bandwidth
is not being used for business purposes, such as might occur during off-peak hours.
The Scavenger class is a critical component to the DoS and worm mitigation strategy,
discussed next.
Global
Impact
Scope of Damage
Figure 2-6
Next Gen
Regional
Networks
Multiple
Networks
3rd Gen
2nd Gen
Individual
Networks
Individual
Computer
1st Gen
Boot Viruses
1980s
Macro Viruses,
Trojans, E-Mail,
Single-Server
DoS, Limited
Targeted
Hacking
1990s
Multiserver
DoS, DDoS,
Blended Threat
(Worm+ Virus+
Trojan), Turbo
Worms,
Widespread
System Hacking
Today
Infrastructure
Hacking, Flash
Threats,
Massive WormDriven DDoS,
Negative
Payload
Viruses,
Worms, and
Trojans
Future
Sophistication of Threats
Particularly since 2002, there has been an exponential increase not only in the frequency of
DoS and worm attacks, but also in their relative sophistication and scope of damage. For
example, more than 994 new Win32 viruses and worms were documented in the rst half
of 2003, more than double the 445 documented in the rst half of 2002. Some of these more
recent worms are shown in Figure 2-7.
Figure 2-7
51
Code Red/
S sadmind/IIS
Code Red
NIMDA
Apache/
Apach e/
mod_ssl
MS-SQL
Slammer
W32/
Blaster
W32/Sobig
W32/
MyDoom
MyDoo m
W32/Bagel
Sasser
May 01
Sep 01
Jul 02
Jan 03
Aug 03
Jan 04
April 04
Sufcient analysis has been performed to understand how the worm operates and
what its network characteristics are.
52
Figure 2-8
Systems
Under
Attack
Infected
Source
Si
Core
Distribution
Access
End Systems
Overloaded
High CPU
Applications Impacted
Network Links
Overloaded
Routers
Overloaded
High CPU
Instability
Loss of Management
These time lags might 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 more than 75,000 hosts in just 11 minutes and performing scans of
55 million more hosts within the same time period.
NOTE
Interestingly, a 2002 CSI/FBI report stated that the majority of network attacks occur from
within an organization, typically by disgruntled employees.
A proactive approach to mitigating DoS and worm ooding attacks within enterprise networks is to respond immediately to out-of-prole network behavior indicative of a DoS
or worm attack via campus Access-Layer policers. Such policers can meter trafc rates
received from endpoint devices and, when these exceed specied watermarks (at which
point they no longer are considered normal ows), can mark down excess trafc to the
Scavenger class marking (DSCP CS1).
53
In this respect, the policers would be fairly dumb. They would not be matching specic
network characteristics of specic types of attacks, but they simply would be metering trafc volumes and responding to abnormally high volumes as close to the source as possible.
The simplicity of this approach negates the need for the policers to be programmed with
knowledge of the specic details of how the attack is being generated or propagated. It is
precisely this dumbness of such Access-Layer policers that allows them to maintain relevancy as worms mutate and become more complex: The policers dont care how the trafc
was generated or what it looks like; all they care about is how much trafc is being put onto
the wire. Therefore, they continue to police even advanced worms that continually change
the tactics of how trafc is being generated.
For example, in most enterprises, it is quite abnormal (within a 95 percent statistical
condence interval) for PCs to generate sustained trafc in excess of 5 percent of their
links capacity. In the case of a Fast Ethernet switch port, this means that it would be
unusual in most organizations for an end users PC to generate more than 5 Mbps of uplink
trafc on a sustained basis.
NOTE
It is important to recognize that this value ( 5 percent) for normal access-edge utilization
by endpoints is just an example value. This value would likely vary from industry vertical
to vertical, and from enterprise to enterprise.
It is important to recognize that what is being proposed is not to police all trafc to 5 Mbps
and automatically drop the excess. If that were the case, there would not be much reason
for deploying Fast Ethernet or Gigabit Ethernet switch ports to endpoint devices because
even 10BASE-T Ethernet switch ports would have more uplink capacity than a 5 Mbps
policer-enforced limit. Furthermore, such an approach supremely would penalize legitimate trafc that exceeded 5 Mbps on a Fast Ethernet switch port.
A less draconian approach is to couple Access-Layer policers with hardware and software
(campus, WAN, and VPN) queuing policies, with both sets of policies provisioning for a
less-than best-effort Scavenger class.
This would work by having Access-Layer policers mark down out-of-prole trafc to
DSCP CS1 (Scavenger) and then have all congestion-management policies (whether in
Catalyst hardware or in Cisco IOS Software) provision a less-than best-effort service for
any trafc marked to DSCP CS1.
Lets examine how this might work, for both legitimate trafc exceeding the Access-Layer
policers watermark and illegitimate excess trafc (the result of a DoS or worm attack).
In the former case, imagine that the PC generates more than 5 Mbps of trafc, perhaps
because of a large le transfer or backup. Because there is generally abundant capacity
within the campus to carry the trafc, congestion (under normal operating conditions) is
54
rarely, if ever, experienced. Typically, the uplinks to the distribution and core layers of
the campus network are Gigabit Ethernet, which requires 1000 Mbps of trafc from the
Access-Layer switch to create congestion. If the trafc was destined to the far side of a
WAN or VPN link (which are rarely more than 5 Mbps in speed), dropping would occur
even without the Access-Layer policer, simply because of the campus/WAN speed mismatch and resulting bottleneck. TCPs sliding-windows mechanism eventually would nd
an optimal speed (less than 5 Mbps) for the le transfer.
To make a long story short, Access-Layer policers that mark down out-of-prole trafc to
Scavenger (CS1) would not affect legitimate trafc, aside from the obvious re-marking. No
reordering or dropping would occur on such ows as a result of these policers (that would
not have occurred anyway).
In the latter case, the effect of Access-Layer policers on trafc caused by DoS or worm
attacks is quite different. As hosts become infected and trafc volumes multiply, congestion
might be experienced even within the campus. If just 11 end-user PCs on a single switch
begin spawning worm ows to their maximum Fast Ethernet link capacities, the GE uplink
from the Access-Layer switch to the Distribution-Layer switch will congest and queuing or
reordering will engage. At such a point, VoIP and critical data applications, and even BestEffort applications, would gain priority over worm-generated trafc (and Scavenger trafc
would be dropped the most aggressively); network devices would remain accessible for
administration of patches, plugs, and ACLs required to fully neutralize the specic attack.
WAN links also would be protected: VoIP, critical data, and even best-effort ows would
continue to receive priority over any trafc marked down to Scavenger/CS1. This is a huge
advantage because generally WAN links are the rst to be overwhelmed by DoS and worm
attacks. The bottom line is that Access-Layer policers signicantly mitigate network trafc
generated by DoS or worm attacks.
It is important to recognize the distinction between mitigating an attack and preventing it
entirely: The strategy being presented does not guarantee that no denial of service or worm
attacks ever will happen, but it can reduce the risk and impact that such attacks could have
on the network infrastructure.
55
All trafc classes specied in the QoS Baseline model except onethe Locally-Dened,
Mission-Critical Data application classare determined by objective networking characteristics. These applications, a subset of the Transactional Data class, are selected for a dedicated, preferential class of service because of their signicant impact on the organizations
main business objectives.
This is usually a highly subjective evaluation that can excite considerable controversy and
dispute. An important principle to remember when assigning applications to the MissionCritical Data class is that as few applications as possible should be assigned to the LocallyDened Mission-Critical class.
If too many applications are assigned to it, the Mission-Critical Data class will dampen, and
possibly even negate, the value of having a separate class (from Transactional Data). For
example, if 10 applications are assigned as Transactional Data (because of their interactive,
foreground networking characteristics) and all 10 are determined to be classied as
Mission-Critical Data, the whole point of a separate class for these applications becomes
moot. However, if only one or two of the Transactional Data applications are assigned to
the Mission-Critical Data class, the class will prove highly effective.
Related to this point, it is recommended always to seek executive endorsement of the QoS
objectives before design and deployment. By its very nature, QoS is a system of managed
unfairness and, as such, almost always creates political and organizational repercussions
when implemented. To minimize the effects of such nontechnical obstacles to deployment,
which could prevent the QoS implementation altogether, it is recommended to address
these political and organizational issues as early as possible and to solicit executive
endorsement whenever possible.
As stated previously, it is not mandated that enterprises deploy all 11 classes of the QoS
Baseline model; this model is designed to be a forward-looking guide for consideration of
the many classes of trafc that have unique QoS requirements. Being aware of this model
56
can help bring about a smooth expansion of QoS policies to support additional applications
as future requirements arise. However, at the time of QoS deployment, the organization
needs to clearly dene how many classes of trafc are required to meet the organizational
objectives.
This consideration should be tempered with the consideration of how many classes of
applications the networking administration team feels comfortable with deploying and
supporting. Platform-specic constraints or service-provider constraints also might come
into play when arriving at the number of classes of service. At this point, it also would be
good to consider a migration strategy to allow the number of classes to be expanded
smoothly as future needs arise, as illustrated in Figure 2-9.
Figure 2-9
Example Strategy for Expanding the Number of Classes of Service over Time
4/5 Class Model
8 Class Model
Voice
Voice
Real-Time
Call-Signaling
Interactive-Video
Video
Streaming-Video
Call-Signaling
Call-Signaling
IP Routing
Network Control
Critical Data
Critical Data
Network-Management
Mission-Critical Data
Transactional Data
Bulk Data
Bulk Data
Best-Effort
Best-Effort
Best-Effort
Scavenger
Scavenger
Scavenger
Time
When the number of classes of service has been determined, the details of the required
marking, policing, and queuing policies can be addressed. When deciding where to enable
such policies, keep in mind that QoS policies always should be performed in hardware
instead of 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, as such, do not tax their
main CPUs to administer QoS policies. This allows complex policies to be applied at line
rates at even 1-Gbps or 10-Gigabit speeds.
57
58
trafc 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). In other words, whenever supported,
trafc marked to AFx1 should be marked down to AFx2 or AFx3. For example, in the case
of a single-rate policer, excess trafc originally marked AF11 should be marked down to
AF12. In the case of a dual-rate policer (as dened in RFC 2698), excess trafc originally
marked AF11 should be marked down to AF12, and violating trafc should be marked
down further to AF13. Following such markdowns, congestion-management policies, such
as DSCP-based WRED, should be congured to drop AFx3 more aggressively than AFx2,
which, in turn, is dropped more aggressively than AFx1.
However, at the time of writing, Cisco Catalyst switches do not perform DSCP-based
WRED, so this standards-based strategy cannot be implemented fully. As an alternative
workaround, single-rate policers can be congured to mark down excess trafc to DSCP
CS1 (Scavenger); dual-rate policers can be congured to mark down excess trafc to AFx2,
while marking down violating trafc to DSCP CS1. Such workarounds yield an overall
similar effect as the standards-based policing model. However, when DSCP-based WRED
is supported on all routing and switching platforms, it would be more standards compliant
to mark down assured-forwarding classes by RFC 2597 rules.
59
queuing class is variable. However, if too much trafc is assigned for strict-priority
queuing, the overall effect is a dampening of QoS functionality for non-real-time
applications.
The goal of convergence cannot be overemphasized: to enable voice, video, and data to
coexist transparently on a single network. When real-time applications (such as Voice or
Interactive-Video) dominate a link (especially a WAN/VPN link), data applications will
uctuate signicantly in their response times, destroying the transparency of the
converged network.
Cisco Technical Marketing testing has shown a signicant decrease in data application
response times when real-time trafc exceeds one-third of a links 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 a links capacity.
This strict-priority queuing rule is a conservative and safe design ratio for merging realtime applications with data applications.
Cisco IOS Software allows the abstraction (and, thus, conguration) of multiple (strictpriority) low-latency queues. In such a multiple-LLQ context, this design principle applies
to the sum of all LLQs: They should be within one-third of a links capacity.
NOTE
60
Best-Effort
25%
Real-Time
33%
Scavenger/Bulk
5%
Critical Data
Some platforms support different queuing structures than others. To ensure consistent
PHBs, congure consistent queuing policies according to platform capabilities.
For example, on a platform that supports only four queues with CoS-based admission (such
as a Catalyst switch), a basic queuing policy could be as follows:
Real-Time ( 33 percent)
Critical Data
Best-Effort ( 25 percent)
Scavenger/Bulk(< 5 percent)
However, on a platform that supports a full QoS Baseline queuing model, the queuing
policies can be expanded, yet in such a way that they provide consistent servicing to RealTime, Best-Effort, and Scavenger class trafc. For example, on a platform that supports 11
queues with DSCP-based admission (such as a Cisco IOS router), an advanced queuing
policy could be as follows:
Voice ( 18 percent)
Interactive-Video ( 15 percent)
Internetwork Control
Call-Signaling
Mission-Critical Data
Transactional Data
Network-Management
Streaming-Video Control
61
Best-Effort ( 25 percent)
Bulk Data (4 percent)
Scavenger (1 percent)
Figure 2-11 illustrates the interrelationship between these compatible queuing models.
Figure 2-11 Compatible 4-Class and 11-Class Queuing Models Following Real-Time, Best-Effort, and Scavenger
Class Queuing Rules
Voice 18%
Best-Effort
25%
Scavenger
1%
Scavenger/
Bulk Data 5%
Best-Effort
25%
Bulk Data 4%
Real-Time
33%
Interactive-Video
15%
Critical Data
Streaming-Video
Internetwork
Control
Network-Management
Call-Signaling
In this manner, trafc will receive compatible queuing at each node, regardless of platform
capabilitieswhich is the overall objective of DiffServ per-hop behavior denitions.
Whenever supported, it is recommended to enable WRED (preferably DSCP-based WRED)
on all TCP ows. In this manner, WRED congestion avoidance will prevent TCP global
synchronization and will increase overall throughput and link efciency. Enabling WRED
on UDP ows is optional.
62
differentiating normal and abnormal ows vary from enterprise to enterprise and from
application to application. Caution must be extended not to overscrutinize trafc behavior
because this could be time and resource exhaustive and easily could change from one day
to the next. Remember, the presented Scavenger-class strategy will not apply a penalty to
legitimate trafc ows that exceed thresholds (aside from re-marking); only sustained,
abnormal streams generated simultaneously by multiple hosts (highly indicative of DoS
and worm attacks) are subject to aggressive dropping, and only after legitimate trafc has
been serviced.
To contain such abnormal ows, it is recommended to deploy campus Access-Edge policers
to re-mark abnormal trafc to Scavenger (DSCP CS1). Additionally, whenever Catalyst
6500s with Supervisor 720s are deployed in the distribution layer, it is recommended to
deploy a second line of policing defense, at the distribution layer via per-user microow
policing.
To complement these re-marking policies, it is necessary to enforce end-to-end Scavengerclass queuing policies, where ows marked as Scavenger will receive a less-than best-effort
service whenever congestion occurs.
It is important to note that even when Scavenger-class QoS has been deployed end to end,
this strategy only mitigates DoS and worm attacks and does not prevent them or remove
them entirely. Therefore, it is critical to overlay security, rewall, intrusion detection, and
identity systems, along with Cisco Guard and Cisco Security Agent solutions, on top of the
QoS-enabled network infrastructure.
Deployment Principles
After the QoS designs have been nalized, it is vital that the networking team thoroughly
understand the QoS features and syntax before enabling features on production networks.
Such knowledge is critical for both deployment and troubleshooting QoS-related issues.
Furthermore, it is a general best practice to schedule proof-of-concept (PoC) tests to verify
that the hardware and software platforms in production support the required QoS features
in combination with all the other features that they currently are running. Remember, in
theory, theory and practice are the same. In other words, there is no substitute for testing.
When testing has validated the designs, it is recommended to schedule network downtime
to deploy QoS features. Although QoS is required end to end, it does not have to be
deployed end to end at a single instance. A pilot network segment can be selected for an
initial deployment, and, pending observation, the deployment can be expanded in stages to
encompass the entire enterprise. A rollback strategy always is recommended, to address
unexpected issues that arise from the QoS deployment.
Summary
63
Summary
This chapter began by reviewing the QoS requirements of voice, video, and data
applications.
Voice requires 150-ms one-way, end-to-end (mouth-to-ear) delay; 30 ms of one-way jitter;
and no more than 1 percent packet loss. Voice should receive strict-priority servicing, and
the amount of priority bandwidth assigned for it should take into account the VoIP codec;
the packetization rate; IP, UDP, and RTP headers (compressed or not); and Layer 2
overhead. Additionally, provisioning QoS for IP Telephony requires that a minimal amount
of guaranteed bandwidth be allocated to Call-Signaling trafc.
Video comes in two avors: Interactive-Video and Streaming-Video. Interactive-Video has
the same service-level requirements as VoIP because embedded within the video stream is
a voice call. Streaming-Video has much laxer requirements because of a high amount of
buffering that has been built into the applications.
Control plane requirements, such as provisioning moderate bandwidth guarantees for IP
routing protocols and network-management protocols, should not be overlooked.
Data comes all shapes and sizes but generally can be classied into four main classes: BestEffort (the default class), Bulk Data (noninteractive background ows), Transactional/
Interactive (interactive, foreground ows), and Mission-Critical Data. Mission-Critical
Data applications are locally dened, meaning that each organization must determine the
select few Transactional Data applications that contribute the most signicantly to its
overall business objectives.
A less-than best-effort Scavenger class of trafc was introduced, and a strategy for using
this class for DoS and worm mitigation was presented. Specically, ows can be monitored
at the campus Access-Edge, and out-of-prole ows can be marked down to the Scavenger
marking (of DSCP CS1). To complement these policers, queues providing a less-than besteffort Scavenger service during periods of congestion are deployed in the LAN, WAN,
and VPN.
The chapter concluded with a set of general best-practice principles relating to QoS
planning, classication, marking, policing, queuing, and deployment. These best practices
include the following:
Performing QoS functions in (Catalyst switch) hardware instead of (Cisco IOS router)
software, whenever possible
64
Further Reading
Standards:
RFC 2474, Denition of the Differentiated Services Field (DS Field) in the IPv4 and
IPv6 Headers: http://www.ietf.org/rfc/rfc2474.
RFC 2697, A Single Rate Three Color Marker: http://www.ietf.org/rfc/rfc2697.
RFC 2698, A Two Rate Three Color Marker: http://www.ietf.org/rfc/rfc2698.
RFC 3168, The Addition of Explicit Congestion Notication (ECN) to IP: http://
www.ietf.org/rfc/rfc3168.
Cisco documentation:
Cisco IOS QoS Conguration Guide, Cisco IOS version 12.3: http://www.cisco.com/
univercd/cc/td/doc/product/software/ios123/123cgcr/qos_vcg.htm.
Cisco IOS Conguration GuideConguring Data Link Switching Plus, Cisco IOS
version 12.3: http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122cgcr/bm_c/bcfpart2/bcfdlsw.htm.
Understanding how routing updates and Layer 2 control packets are queued on an
interface with a QoS service policy (PAK_priority): http://www.cisco.com/warp/
public/105/rtgupdates.html.
PA R T
II
QoS Toolset
Part II of this book provides context for the design chapters that follow by presenting a brief overview
of Cisco QoS tools. Particular emphasis is placed on tool-specic idiosyncrasies and tool-interaction
caveats (many of which are not included in IOS documentation). A basic understanding and familiarity of
these QoS tools is assumed.
The chapters in this part of the book are as follows:
Chapter 3
Chapter 4
Chapter 5
Congestion-Management Tools
Chapter 6
Congestion-Avoidance Tools
Chapter 7
Link-Specic Tools
Chapter 8
Bandwidth Reservation
Chapter 9
Chapter 10
Chapter 11
Packet marking in different technologies, such as IP, MPLS, ATM, Frame Relay, and
Ethernet
Discussion of Layer 2 and Layer 3 marking elds and how these translate to
each other
CHAPTER
Classication tools sort packets into different trafc types, to which different policies
then can be applied. The classication of packets normally occurs at each node in the
network but is not required to be done everywhere. Classication of packets can
happen without marking.
As with the general terms classication and marking, there is a difference in the action that
the actual tools, named classiers and markers, take on trafc.
ClassiersInspect one or more elds in a packet to identify the type of trafc that
the packet is carrying. After being identied, the trafc is directed to the applicable
policy-enforcement mechanism for that trafc type, where it receives predened
treatment (either preferential or deferential). Such treatment can include marking
and re-marking, queuing, policing, shaping, or any combination of these (and other)
actions.
MarkersWrite a eld within the packet, frame, cell, or label to preserve the
classication decision that was reached at the trust boundary. By marking trafc at
the trust boundary edge, subsequent nodes do not have to perform the same in-depth
classication and analysis to determine how to treat the packet.
70
Classication Tools
Classication tools examine any of the following criteria to identify a ow and assign it for
preferential or deferential treatment:
Figure 3-1 shows the progressive depth at which a frame or packet may be examined to
make a classication decision. It is not shown to scale because of space limitations.
Figure 3-1
TCP/UDP
Segment
IP Packet
ToS/
DSCP
NOTE
Source
IP
Dest
IP
Src
Port
Dst
Port
Data Payload
NBAR PDLM
Figure 3-1 is intended to represent only the comparisons of data-link, network, transport,
and application layer QoS ltering criteria and, therefore, many elds have been omitted
and the diagram is not to scale.
Only after trafc is positively identied can policies be applied to it. Therefore, bestpractice design recommendations are to identify and mark trafc (with DSCP values) as
close to the source of the trafc as possible, typically in the wiring closet or within the
trusted devices (such as IP phones) themselves. If markings and trusts are set correctly, the
intermediate hops do not have to repeat the same in-depth classication. Instead, they can
administer QoS policies (such as scheduling) based on the previously set markings, which
appear close to the beginning of the frame or packet.
Classication Tools
71
match-allA logical AND operand, meaning that all match statements must be true
at the same time for the class map condition to be true
match-anyA logical OR operand, meaning that any of the match statements can
be true for the class map condition to be true
Including match-any or match-all when dening a class map is optional, but it is important to note that if neither is specied, the default behavior is match-all. For example, if
class-map FOO is entered, the Cisco IOS parser actually expands this to class-map matchall FOO within the conguration. Example 3-1 illustrates the matching criteria available
within MQC class-maps.
Example 3-1 match-all as Default Cisco IOS Behavior
Router(config) class-map FOO
Router(config-cmap)#match ?
access-group
Access group
any
Any packets
class-map
Class map
cos
IEEE 802.1Q/ISL class of service/user priority values
destination-address
Destination address
input-interface
Select an input interface to match
ip
IP specific values
mpls
Multi Protocol Label Switching specific values
not
Negate this match result
protocol
Protocol
qos-group
Qos-group
source-address
Source address
Although the sequence in which class maps are dened within the conguration is unimportant,
the sequence of classes within a policy map is important. This is because, as with access list
(ACL) logic, policy maps apply the First-True-Match rule, meaning that the classes examine a
packet until a match is found. When a match is found, the classication process nishes and
no further class maps are checked. If no matches are found, the packet ends up in an implicit
class default, which essentially means everything else.
For example, consider the service policy shown in Example 3-2 that illustrates the classication of two classes of trafc: VOICE for voice trafc and FAX-RELAY for fax trafc.
The sequence of class-map FAX-RELAY and class-map VOICE within the global conguration does not matter to the classication functionality; these can be entered in any
order. The assumption in this example is that both voice trafc and fax-relay trafc are
72
marked to DSCP EF at their respective sources. Therefore, the question is how to treat these
two trafc types differently because they are marked the same.
The policy map shown in Example 3-2 is unusual, although valid, in two respects:
Multiple priority classesBoth voice and fax trafc must be prioritized (as covered
in Chapter 5, Congestion-Management Tools, a later chapter on queuing). Typically,
both these trafc classes would be handled by a single class denition, but in this case,
the desire was to control strictly the bandwidth used by each class of trafc. This
required two different priority class denitions.
The policy map VOICE-AND-FAX provides the answer through careful ordering of the
classes within it. First, all packets are checked against the class VOICE, which performs
Network-Based Application Recognition (NBAR) classication to identify whether the
trafc is Real-Time Protocol audio (in other words, voice). Only trafc that fails this
examination is checked against the second class under the policy map (the class FAXRELAY).
The class FAX-RELAY checks whether the packets DSCP value is EF. Because only two
types of trafc can have DSCP values of EF (voice and fax-relay) and voice has already
been ltered out, any remaining trafc that matches these criteria must be fax-relay. Faxrelay trafc then is administratively assigned a slightly different treatment. The details of
the treatment in this example are irrelevant. The emphasis is on how the ordering of the
classes within policy maps can offer more granular classication options because of the
Classication Tools
73
First-True-Match logic that policy maps employ. If the sequence of these two statements
were reversed, the policy would work very differently: No trafc would ever show against
the VOICE class because both voice and fax-relay trafc would be matched on DSCP EF
and would be assigned to the FAX-RELAY class. All other trafc would fall into the
implicit class-default class. Figure 3-2 shows the decision hierarchy for each packet
examined by the policy map VOICE-AND-FAX.
Figure 3-2
NBAR: RTP
Packet?
Yes
No
Class FAX-RELAY Classifier
DSCP EF?
Yes
Police to 64 kbps
Bandwidth and Transmit
No
Class class-default
It is important to note that class map and policy map names (similar to ACL names) are case
sensitive to the Cisco IOS. Thus, class-map foo is different from class-map Foo, which is
different from class-map FOO. Therefore, it is very important that the class map names
and cases match exactly to the class names called out under policy maps. In this book, such
names are shown in uppercase letters to clearly distinguish them from Cisco IOS commands.
This is entirely an administrative preference.
74
NOTE
The NBAR classier is triggered by the match protocol command within a class map
denition. It is a more CPU-intensive classier than classiers that match trafc by DSCPs
or ACLs.
Classication Tools
75
application, the Citrix ICA master browser directs the client to the server with the most
available memory. The Citrix ICA client then connects to this Citrix ICA server for the
application.
A summary of protocols that NBAR can use for classication follows. Because new
capabilities are added all the time, this is not an exhaustive list. Not all NBAR classication
involves stateful inspection, and not all match protocol commands trigger NBAR.
Statefully inspected protocols include the following:
FTP
Exchange
HTTP (URL and MIME)
NetShow
RealAudio
r-commands
Oracle SQL*NET
SunRPC
TFTP
StreamWorks
VDOLive
NNTP
Notes
Network Time Protocol (NTP)
PCAnywhere
POP3
Point-to-Point Tunneling Protocol (PPTP)
RIP
Resource Reservation Protocol (RSVP)
Secure FTP (SFTP)
SHTTP
SIMAP
SIRC
SLDAP
SNNTP
SMTP
SNMP
SOCKS
SPOP3
Secure Shell (SSH)
Secure Telnet (STELNET)
Syslog
Telnet
X Window System
76
ERP
sqlnet
ftp
telnet
Example 3-3 denes three different class maps. The rst one, the class map ERP, instructs
the classier (NBAR) to pick trafc of any of the protocols listed in the subsequent statements,
which include SQLNET, FTP, or Telnet trafc. In the class map AUDIO-VIDEO, the classier is looking for MIME trafc of particular typesaudio and video, in this case. The last
class map, WEB-IMAGES, is ltering out HTTP trafc for picture (GIF or JPEG) content.
In addition to classication, NBAR can perform protocol discovery using the snifng capabilities of its classication engine. Even if NBAR is not required for QoS policy classication, its protocol-discovery mode can provide valuable information about trafc present on
the network and how much bandwidth each trafc type is using. Such information can be
used in bandwidth provisioning exercises or for capacity planning. An example output of
NBARs protocol-discovery mode is shown in Example 3-4.
Example 3-4 NBAR Protocol Discovery
Router#show ip nbar protocol-discovery stats byte-rate FastEthernet1/0
Protocol
-------------telnet
ftp
http
unknown
Total
Input
30second bit rate
(bps)
-----------------368000
163000
163000
614000
1308000
Output
30second bit rate
(bps)
-----------------0
0
0
0
0
Marking Tools
77
(by merely separating signaling trafc from speech path [media] trafc) and network access
often is allowed or denied based on the originating port or IP address, sometimes trafc is
desired to be classied by codec. One instance in which this is useful is at the trust boundary
between an enterprise and a service provider network where the SLA is, for example, for
G.729 and G.711 trafc only. In this instance, NBAR can be used to ensure that voice calls
of other codecs are not allowed onto the network.
The same mechanisms can be used if codecs of different bandwidth needs must be ltered out,
for example, to ensure that call admission control (CAC) in the network is not broken. In this
case, low-bandwidth codecs such as G.729 and G.723 can be separated from G.711 trafc.
Filtering trafc by codec can be done by inspecting the payload type (PT) eld within the
RTP header, as dened by the following:
For example, the following command instructs NBAR to match RTP trafc with the
payload types 0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, or 64:
match protocol rtp payload-type "0, 1, 4 - 0x10, 10001b - 10010b, 64"
As shown in the example, the parameters to the match protocol statement can be given in
decimal, hexadecimal (the 0x notation), or binary (the 10001b notation) numbers. Individual
numbers separated by commas can be specied, and ranges of numbers can be used, as in
the case of 4 0x10, which means a decimal value of 4 to a hexadecimal value of 10 (which
equates to a decimal value of 16). Therefore, all RTP payload types between 4 and 16 are
matched for this part of the statement. Similarly, the binary range 10001b to 10010b equates
to 17 to 18 in decimal.
Marking Tools
The main marking tools used today are class-based marking and marking using class-based
policing. Some legacy marking techniques include committed access rate (CAR) and
policy-based routing (PBR). Voice gateway packet marking is another option for IP
telephony applications.
78
Class-Based Marking
Class-based marking, introduced in Cisco IOS Software Release 12.1(2)T, is an MQCbased syntax that uses the set command within a policy map to mark packets, frames, cells,
or labels. Class-based marking was CEF dependent in early Cisco IOS releases (just after
its introduction), but this limitation was listed in subsequent releases soon afterward. If you
are using one of the initial releases, ip cef must be enabled in the global conguration
before using set commands.
Example 3-5 Class-Based Marking Options
Router(config)#policy-map CB-MARKING
Router(config-pmap)#class FOO
Router(config-pmap-c)#set
set ?
atm-clp
Set ATM CLP bit to 1
cos
Set IEEE 802.1Q/ISL class of service/user priority
discard-class Discard behavior identifier
dscp
Set DSCP in IP(v4) and IPv6 packets
fr-de
Set FR DE bit to 1
ip
Set IP specific values
mpls
Set MPLS specific values
precedence
Set precedence in IP(v4) and IPv6 packets
qos-group
Set QoS Group
Class-Based Policing
Policing and other rate-limiting tools (which are discussed in more detail in Chapter 4,
Policing and Shaping Tools) constitute one of the ways that packets can be marked.
Instead of just marking every packet of a certain type as a particular value, a policer
Marking Tools
79
generally can re-mark (or even drop) packets that violate an SLA. The following command
shows the syntax for a rate-limiter that transmits packets if they conform to a specied rate,
re-marks packets if they exceed the rate, and drops packets if they violate the rate.
police cir 1000000 bc 1000 pir 1000000 be 1000 conform-action transmit
exceed-action set-clp-transmit violate-action drop
Class-based policing can set the IP Precedence, DSCP, MPLS EXP, Frame Relay DE, or
ATM CLP of a packet based on rate-limiting measurements, as shown in Example 3-6.
Example 3-6 Re-Marking Options for the Class-Based Policer
Router(config)#policy-map CB-POLICING
Router(config-pmap)#class FOO
lab-2691(config-pmap-c)#police
police 8000 conform-action ?
drop
drop packet
exceed-action
action when rate is within conform and
conform + exceed burst
set-clp-transmit
set atm clp and send it
set-discard-class-transmit
set discard-class and send it
set-dscp-transmit
set dscp and send it
set-frde-transmit
set FR DE and send it
set-mpls-exp-imposition-transmit set exp at tag imposition and send it
set-mpls-exp-topmost-transmit
set exp on topmost label and send it
set-prec-transmit
rewrite packet precedence and send it
set-qos-transmit
set qos-group and send it
transmit
transmit packet
Policy-Based Routing
Policy-based routing (PBR) also is an older, non-MQC tool that can perform limited trafc
marking. Although packet marking is not the major function of PBR, it can be used for
writing IP Precedence for packets that match specic criteria.
80
Cisco IOS Software Release 12.2(2)T introduced the capability to mark voice-sourced
packets on the voice gateway with DSCPs, together with the capability to mark signaling
packets separate from media packets and to mark voice trafc that did not use dial peers
(such as MGCP). The following commands were introduced as part of the simplication of
QoS. They are used for marking the voice trafc at its source, which is more efcient and
easier to manage than manually marking such trafc on the nearest network edge.
H.323 and SIP use a VoIP dial peer command to mark signaling or media packets:
ip qos dscp [af11-af43 | cs1-cs7 | default | ef | num_0-63] [media | signaling]
Another move toward simplication in Cisco IOS Software Release 12.2(2)T was to mark
voice and call signaling by default with the appropriate DSCPs. This renders explicit
marking unnecessary unless markings other than the recommended values are desired.
Voice gateway packet-marking features are detailed in Table 3-1.
Table 3-1
Cisco IOS
Release
Protocol
Up to 12.1.5T
SIP, H.323
and 12.2 mainline
SIP, H.323
12.1.5XM and
12.2.2T and later
MGCP
12.2.11T and
later
SIP, H.323
12.2.11T and
later
MGCP
IP
P
DSCP
Default
Marking
Yes
Media: 0
CB marking: Yes
Signaling: 0
Yes
Yes
Yes
Yes
Yes
Media: 0
Signaling: 0
No
Media: 5
Signaling: 3
Yes
Media: 5, EF
Signaling: 3,
AF31
Yes
Media: 5, EF
Signaling: 3,
AF31
Marking Tools
81
At the same time, changes were made to the Cisco IP phones and Cisco CallManager to
mark, by default, voice media and signaling packets sourced by these devices. The default
markings are listed in Table 3-2.
Table 3-2
IP Phone and Cisco CallManager Default Voice and Signaling Marking Summary
DSCP
IPP
802.1Q/p CoS
Media
EF
Signaling
AF31 or CS3
Layer 2 marking elds802.1Q/p CoS bits, MPLS EXP, ATM CLP, and Frame
Relay DE bits
Because Cisco Catalyst switches perform scheduling based on Layer 2 802.1Q/p CoS
markings, it is important that Ethernet frames be correctly marked in campus or branch
LANs. However, Layer 2 markings (Ethernet or otherwise) are seldom of end-to-end
signicance. This is because Layer 2 markings are lost whenever the Layer 2 media changes
(for example, from Ethernet to WAN media). In addition, care should be taken that Layer 2
markings are translated to and from Layer 3 markings to ensure consistent end-to-end QoS
for the frame or packet, regardless of where it might travel in the network.
Ethernet 802.1Q/p
Ethernet frames can be marked with their relative importance at Layer 2 by setting the
802.1p User Priority bits (CoS) of the 802.1Q header, as shown in Figure 3-3.
Figure 3-3
SFD
DA
SA
Type
TAG
4 Bytes
PT
PRI
CFI
VLAN ID
Data
FCS
82
Only 3 bits are available for 802.1p marking. Therefore, only eight classes of service (0
through 7) can be marked on Layer 2 Ethernet frames. These CoS values are identical to IP
Precedence values and typically are assigned according to Table 3-3.
Table 3-3
Application
Reserved
Reserved
Voice
Videoconferencing
Call signaling
High-priority data
Medium-priority data
Best-effort data
The possible values of the 802.1Q/p CoS bits are the same as those for IP Precedence.
Because the eld length is the same, IP Precedence can readily be mapped one to one into
and out of 802.1Q/p CoS values. However, DSCP values (which are 6 bits) cannot be
maintained at the same granularity when mapped into and out of 802.1Q/p CoS values
because some information is lost in the translations.
Marking Tools
83
Layer 2 protocol packets can be given high priority by using the l2protocol-tunnel cos
global command.
NOTE
In older Cisco IOS releases, class-based marking is dependent on CEF. Therefore, whenever
MQC set commands are to be used, ip cef already must be enabled within the conguration.
In later Cisco IOS releases, this restriction has been lifted.
Example 3-8 shows how the Frame Relay DE bit can be set inside a service policy.
Example 3-8 Setting the Frame Relay DE Bit
Router#show run
policy-map SET-FR-DE
class OUT-OF-SLA
set fr-de
class class-default
fair-queue
84
Marking Tools
85
taken unless the value requires re-marking. While inside the MPLS network, the packets
ToS eld (IP Precedence or DSCP) is irrelevant because the MPLS EXP bits are used to
determine the QoS treatment of the packet within the MPLS cloud, as shown in Figure 3-5.
Figure 3-4
CoS
TTL
MPLS EXP
Label/Tag: 20 Bits
MPLS Experimental (CoS): 3 Bits
Bottom of Stack Indicator (S): 1 Bit
Time-to-Live (TTL): 8 bits
Figure 3-5
IP Precedence or
DSCP
CE
CE
MPLS EXP
PE
PE
P
V
CE
CE
PE
PE
P
86
In MPLS tunneling scenarios (further discussed in Chapter 16, IPSec VPN QoS Design),
there can be multiple MPLS headers on a packet. To accommodate marking of all or some
of these headers, there are two options on the set mpls experimental command:
set mpls experimental impositionSets a specic value on all labels that are pushed
onto the packet
set mpls experimental topmostSets a specic value only on the topmost MPLS
label on the packet
In practice, however, some service providers currently re-mark the IP Precedence or ToS
elds of packets traversing their MPLS Virtual Private Networks (VPN) to enforce SLAs.
Three main tunneling modes are used for mapping Layer 3 (IP Precedence/DSCP) markings
to and from MPLS EXP values: uniform mode, short-pipe mode, and pipe mode. These
modes are discussed in detail in Chapter 16.
Version
Length
Len
ID
Offset
TTL
Proto
FCS
IP SA
IP DA
Data
IPv4 Packet
7
IP Precedence
Standard
Standard IPP
IPv4
Unused
IP ECN
DiffServ
DiffServ Extensions
Extensions
The IP Precedence bits, similar to the 802.1Q/p CoS bits and the MPLS EXP bits, allow for
only eight values of marking (0 through 7). Because values 6 and 7 generally are reserved
Marking Tools
87
for network control trafc (such as routing) and value 0 is the default marking value, really
only ve remaining values can be used to differentiate non-best-effort trafc. Of these ve
remaining values, however, the following is true:
This leaves only two marking values (IP Precedence 1 and 2) available for all data
application marking options. Thus, many enterprises nd IP Precedence marking to be
overly restrictive and favor instead the 6-bit/64-value DSCP marking model.
NOTE
In this book, IP Precedence is viewed as a legacy technology, and all Layer 3 marking
recommendations are based on DSCP only (unless specic constraints exist).
88
Figure 3-7
AFxy
X
Class
Drop Precedence
Figure 3-8 shows a summary of PHBs along with their decimal and binary equivalents.
Figure 3-8
46
101110
EF
Expedited Forwarding
Assured Forwarding
Low Drop
Pref
Med Drop
Pref
High Drop
Pref
Class 1
AF11
AF12
AF13
Class 2
AF21
AF22
AF23
Class 3
AF31
AF32
AF33
Class 4
AF41
AF42
AF43
10
18
26
34
12
20
28
36
14
22
30
38
Best Effort
BE
000000
Marking Tools
89
A wide range of packet header layouts with tunneling technologies exist, but the primary
characteristic that they have in common is that the original IP header is enveloped in an
outer header packet. While in the tunnel, only the outer IP headers ToS byte is examined
to determine what QoS policies should be applied to the packet. The ToS byte from the
inner packet might or might not be copied automatically to the outer header packet. If it is
not copied automatically, explicit commands are required to copy the ToS byte (or to set the
outer header ToS byte, independent of the inner packets ToS values).
Some example packet header layouts of GRE and IPSec packets are shown in Figure 3-9.
Figure 3-9
IP
Hdr
UDP
RTP Voice
IP
Hdr
UDP
RTP Voice
ESP
ESP
Pad/NH Auth
IP
Hdr
UDP
RTP Voice
ESP
ESP
Pad/NH Auth
Three methods provide QoS marking for Layer 3 tunnels: QoS preclassication (QoS for
VPNs feature), ToS copying/reection, and independent header-packet marking. Each is
discussed in more detail in the following sections.
QoS Preclassify
The QoS preclassify feature was introduced in Cisco IOS Software Release 12.1(5)T on
Cisco 7100 and 7200 series routers and in Cisco IOS Software Release 12.2(2)T for lowerend routers. This command creates a clone of the inner packet header (strictly for internal
router processing) before the packet is enveloped. Upon egress, the router compares the
cloned header against any policies applied to the egress interface (because it no longer can
read information from the original packet header because it is enveloped). Then the applicable policies are serviced on the packet ow, and the clone is discarded. An advantage of
the QoS preclassify feature is that not only is the ToS byte of the inner header used for QoS
classication purposes, but other IP/TCP/UDP header parameters such as source/destination IP addresses and source/destination ports can be used.
90
Strictly speaking, the QoS preclassify feature is only a classication feature. Its marking
functionality is only transient, in the sense that it makes a copy of the inner packet header
and its markings, but this header never is transmitted as part of the packet.
Examples of the qos pre-classication command for various types of tunnels are shown in
Example 3-10.
Example 3-10 QoS Preclassication Examples
GRE and IPIP Tunnels
Router(config)# interface tunnel0
Router(config-if)# qos pre-classify
L2F and L2TP Tunnels:
Router(config)# interface virtual-template1
Router(config-if)# qos pre-classify
IPsec Tunnels:
Router(config)# crypto map secured-partner-X
Router(config-crypto-map)# qos pre-classify
ToS Reection
QoS marking for tunnels also can be achieved by copying the ToS byte from the inner
header to the outer header. This is done by default on most platforms for IPSec and GRE
tunnels. For L2TP, the l2tp tos reect command can be used.
Marking Tools
Table 3-4
91
Layer
Marking Field
Value Range
Ethernet
802.1Q/p
0 to 7
Frame Relay
DE bit
0 to 1
ATM
CLP bit
0 to 1
MPLS
EXP
0 to 7
IP
IP Precedence
0 to 7
IP
DSCP
0 to 63
VoIP over Frame RelayA translation from Layer 3 to Layer 2 in which a VoIP
packet is enveloped within a Frame Relay frame. The Frame Relay frame header
marking eld (DE bit) is 0 unless it is marked explicitly.
Recommendation: Leave the voice packets DE bit as 0, but consider marking lowpriority data packets sharing the same congestion points with DE bit 1.
VoIP over ATMA translation from Layer 3 to Layer 2 translation in which a VoIP
packet is enveloped within multiple ATM cells (typically AAL5). The ATM cell
header marking eld (CLP) should be clear.
Recommendation: Leave the voice packets ATM CLP as 0, but consider marking lowpriority data packets that share the same congestion points with CLP 1.
VoIP over Ethernet to VoIP over a WANA translation from Layer 2 to Layer 3 in
which VoIP on a LAN segment carries an 802.1Q/p packet header marking. When the
packet hits a router and heads out over the WAN, the Layer 3 IP packet containing
the voice payload might or might not be marked appropriately, depending on the
conguration and capabilities of the switch, router, or IP phone.
Recommendation: Congure that LAN switch to convert 802.1Q/p marking to DSCPs
if the packet is handed off to a Layer 3 segment. If the switch is not capable of such
mapping, perform the mapping from Layer 2 to Layer 3 on the routers LAN edge. A
mapping from Layer 3 to Layer 2 also might be needed on remote-branch routers to
restore lost CoS mappings for VoIP Ethernet frames entering the branch from the WAN.
92
enterprise networks do not have control over the MPLS backbone they might use. If
so, work with the service provider offering the MPLS network to ensure that the
network is congured correctly.
NOTE
Ethernet 802.1Q/p is the only Layer 2 marking technology that might require bidirectional
mappings (Layer 2 to Layer 3 and Layer 3 to Layer 2). Cisco Catalyst switches (including
those at remote branch locations) assign scheduling based on Layer 2 802.1p CoS markings,
which are lost when the packets traverse a WAN media. All other Layer 2 marking options
are applicable to the WAN/VPN transit cloud only and lose their relevance after the frame
is received at the remote branch. Because of this, and because the underlying Layer 3
markings are preserved through the transit cloud, a second mapping is rarely necessary with
Frame Relay DE, ATM CLP, and MPLS EXP markings.
Marking Tools
93
Example 3-11 shows how the policy maps in Figure 3-10 can be applied to outgoing Voice
VLAN and Data VLAN FastEthernet 802.1Q subinterfaces on the router.
Example 3-11 Applying L3-to-L2 Marking on LAN Interface
Router#sh run
interface FastEthernet0/1
no ip address
full-duplex
!
interface FastEthernet0/1.100
description Voice-VLAN
encapsulation dot1Q 100
ip address 10.6.0.129 255.255.255.192
service-policy input COS-TO-DSCP
service-policy output DSCP-TO-COS
!
interface FastEthernet0/1.500
description DATA-VLAN
encapsulation dot1Q 500
ip address 10.6.0.1 255.255.255.128
service-policy input COS-TO-DSCP
service-policy output DSCP-TO-COS
!
94
Frame Relay
Cloud
ATM
Cloud
Marking Tools
95
NOTE
Although bundling is widely deployed, it is an aging and inefcient QoS technology. At the
time of this writing, it supports only IP Precedence, not DSCP. Bundling is inefcient
because lower-priority applications never gain access to any excess bandwidth that might
exist on higher-priority PVCs. Therefore, any unused bandwidth on these PVCs is wasted.
96
MPLS
VPN
CE
PE
An example of bundling is outlined in Figure 3-14. An enterprise has purchased four separate
ATM PVCs with varying levels of ATM QoS. It wants voice (IP Precedence 5) to be assigned
to a dedicated variable bit rate real-time (VBR-rt) PVC, video (IP Precedence 4) and call
signaling (IP Precedence 3) to be assigned to a variable bit rate non-real-time (VBR-nrt)
PVC, transactional data (IP Precedence 2) and bulk data (IP Precedence 1) to be assigned
to an available bit rate (ABR) PVC, and everything else to be assigned to an unspecied bit
rate (UBR) PVC.
Figure 3-14 IP Precedence to ATM PVC Bundle Example
ATM PVC
Bundle
IPP 5
VBR-rt PVC
IPP 3-4
VBR-nrt PVC
IPP 1-2
ABR PVC
IPP 0
UBR PVC
A sample ATM PVC bundling conguration that corresponds to the example is shown in
Example 3-12.
Marking Tools
97
IP Precedence-to-ATM VC bundling has been a Cisco IOS feature for several years.
Bundling functionality for Frame Relay PVCs was introduced in Cisco IOS Software
Release 12.2.1(3)T. Mapping IP Precedence markings to ATM VCs provides truer levels of
service because of the ATM service class attributes that dene the ATM PVCs. Frame Relay
PVCs have no intrinsic service class attributes associated with them, but they do offer the
capability to guarantee bandwidth to a particular class of trafc across the backbone.
Example 3-12 Sample ATM PVC Bundling Conguration
Router# show run
vc-class atm VOICE-PVC-256
vbr-rt 256 256
tx-ring-limit 3
precedence 5
no bump traffic
protect group
!
vc-class atm VIDEO-PVC-256
vbr-nrt 256 256
tx-ring-limit 3
precedence 4-3
no bump traffic
protect group
!
vc-class atm BUSINESS-DATA-PVC-512
abr 512 512
precedence 2-1
no bump traffic
protect group
!
vc-class atm BEST-EFFORT-PVC-512
ubr 512
tx-ring-limit 3
precedence other
VC bundling offers QoS by separating classes of trafc over individual PVCs. Therefore,
it is important to remember that other QoS tools targeted at prioritizing different types of
trafc on the same VC, such as LLQ, do not readily apply here. Also, PVC bundles do not
offer bandwidth-sharing arrangements (such as Multilink Point-to-Point Protocol [MLP]
and Frame Relay multilink bundling) because they dedicate a particular PVC to a given
class of trafc. If that class does not use its bandwidth allocation, it cannot be reallocated
to other types of trafc. If bandwidth-sharing features are required, Multilink PPP over
ATM (MLPoATM) or Multilink PPP over Frame Relay (MLPoFR) bundles must be used
in conjunction with MQC-based LLQ/CBWFQ policies.
98
Example 3-14 shows a number of set command examples using the table map feature to
translate from one type of packet marking to another.
Example 3-14 Use of the Table Map Feature
set
set
set
set
set
set
set
set
set
set
set
set
Summary
This chapter examined classication and marking features and tools. Classication is the
action of inspecting a packet (certain elds within the packet) to determine what type of
packet or trafc it is. This determination is used to guide the treatment that the packet (and
other packets of the same trafc type or stream) will receive from the node and the network.
Marking is the action of changing a eld within the packet header to note the determination
reached by the classier. The various ways of doing packet marking at L2 and L3 up to L7
were illustrated, and ways to translate one type of marking to another were discussed.
The treatment of the packet, which is based on the classication and marking results, includes
capabilities such as policing, shaping, and queuing. Policing and shaping are discussed
Further Reading
99
Further Reading
General
Frame Relay DE bit marking (Cisco IOS Software Release 12.2.2T): http://
www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/121t5/
cbpmark2.htm#1037921.
Packet classication based on Layer 3 packet length (Cisco IOS Software Release
12.2.13T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t13/ftmchpkt.htm.
Packet classication using the Frame Relay DLCI number (Cisco IOS Software
Release 12.2.13T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios122/122newft/122t/122t13/ftpcdlci.htm.
DiffServ for end-to-end quality of service (Cisco IOS Software Release 12.1.5T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/
121t5/dtdfsv.htm.
Classifying VoIP signaling and media with DSCP for QoS (Cisco IOS Software
Release 12.2.2T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios122/122newft/122t/122t2/ft_dscp.htm.
Control plane DSCP support for RSVP (Cisco IOS Software Release 12.2.2T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t2/dscprsvp.htm.
DiffServ
100
L2 Protocol Tunneling
L2TP IP ToS reect command IOS (Cisco IOS Software Release 12.3) documentation:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123cgcr/dial_r/
dia_l1g.htm#1131064.
Quality of service for Virtual Private Networks (Cisco IOS Software Release 12.1.5T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/
121t5/dtqosvpn.htm.
Quality of service for Virtual Private Networks (Cisco IOS Software Release 12.2.2T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t2/ftqosvpn.htm.
MPLS QoS multi-VC mode for PA-A3 (Cisco IOS Software Release 12.2.2T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t2/cos1221t.htm.
VPN
NBAR
MPLS
Further Reading
101
MPLS DiffServ-aware trafc engineering (DS-TE) over ATM (Cisco IOS Software
Release 12.2.8T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios122/122newft/122t/122t8/ft_ds_te.htm.
IP to ATM CoS, per VC WFQ and CBWFQ (Cisco IOS Software Release 12.0.5T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/
120t5/ipatm3.htm.
IP to ATM class of service mapping for SVC bundles (Cisco IOS Software Release
12.2.4T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t4/ftsvbund.htm.
Frame Relay PVC bundles with QoS support for IP and MPLS (Cisco IOS Software
Release 12.2.13T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios122/122newft/122t/122t13/ft_frbnd.htm.
MPLS EXP to Frame Relay VC bundling (Cisco IOS Software Release 12.2.13T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t13/ft_frbnd.htm.
Policing, shaping, and the differences between the intent and operation of these
techniques
Policing tools such as committed access rate (CAR) and class-based policing
Shaping tools such as ATM and Frame Relay trafc shaping (FRTS), generic trafc
shaping (GTS), and class-based shaping
Advanced policing topics, such as the single-rate and two-rate three-color policers,
and hierarchical, multiaction, color-aware, and percentage-based policing
CHAPTER
Offered Traffic
Figure 4-1
Policing
Offered Traffic
104
Time
Shaping
Offered Traffic
Time
Offered Traffic
Time
Time
Shaper
Although policing and shaping tools are not employed directly to provide QoS for real-time
packets (such as voice and interactive video), they do regulate and stabilize trafc ows so
that service guarantees can be made for such real-time applications. Without policers and
shapers, unexpected bursts in data trafc could affect the jitter and latency thresholds
adversely for real-time trafc.
Also of note is that policers and shapers can work in tandem; they are not mutually
exclusive tools.
105
NOTE
At the end of the second, there might be unused tokens. The handling of the unused tokens
is a key differentiator among policers. This is discussed in the Policers section later in
this chapter.
Because the clock rate of the interface cannot change to enforce a policy, the only way that
a rate limit can be imposed on an interface is to use time-division multiplexing (TDM). With
TDM, when a rate limit (or CIR) is imposed on an interface, the limited trafc is allocated
a subsecond time slice during which it can be sent. This subsecond time slice is referred to
as the interval (or Tc). For example, if an 8-kbps CIR is imposed on a 64-kbps link, trafc
can be sent for an interval of 125 ms (64,000 bps / 8000 bits).
The entire amount of the CIR (8000 bits) could be sent at once, but then the algorithm
would have to wait 875 ms before it could send any more data (to impose the rate limit).
Such an interpacket delay likely would be viewed as excessive. Therefore, to smooth out
the ow over each second, the CIR is divided into smaller units, referred to as the committed
burst (Bc), which is the sustained number of bits that can be transmitted per interval. These
smaller units are sent over multiple instances during a single second. Continuing with the
previous example, if the Bc is set to 1000, each committed burst can take only 15.6 ms
(1000 bits / 64,000 bps) to send trafc out the interface at the clock rate. The algorithm
waits 109.4 ms (125 ms 15.6 ms) and sends another 15.6 ms of data. This process is
repeated a total of eight times during the second.
106
Single
Token Bucket
Policer
Time
Offered Traffic
Single-Rate Two-Color Policer Effect on Trafc Flow (Single Token Bucket Policer)
Offered Traffic
Figure 4-2
Time
Policers
107
Policers
As mentioned before, policers determine whether each packet conforms or exceeds (or,
optionally, violates) to the trafc congured policies and take the prescribed action. The
action taken can include dropping or re-marking the packet. Conforming trafc is trafc
that falls within the rate congured for the policer. Exceeding trafc is trafc that is above
the policer rate but still within the burst parameters specied. Violating trafc is trafc that
is above both the congured trafc rate and the burst parameters.
How trafc is separated, where it is policed, and why are important questions to keep in
mind in the overall network QoS design. It is not productive, for example, to police DSCP
EF (typically voice) trafc or call-signaling trafc because the incoming rates of these
trafc types do not tolerate packet loss and delay. Instead, the maximum rates of these
trafc types should be controlled at their origin by call admission control mechanisms
(which are discussed in Chapter 9, Call Admission Control [CAC]) so that excessive realtime trafc is not allowed onto the network.
Policers as Markers
If none of the congured actions for conform or exceed includes a drop function, the
operation of the policer becomes that of a conditional marker. This is why the terms marker
and policer often are used interchangeably, as they are in this chapter.
Re-marking packets with a policer should be done with care, keeping in mind the overall
policies of the network. Packets typically are marked as close to the source as technically
and administratively feasible (either at the source itself, if trusted, or at a network trust
boundary). In these locations, the trafc typically is marked by application: voice, call
signaling, video, high-priority data, and so on. This can be thought of as a vertical
separation of trafc.
A policer, however, has no direct knowledge of applications and marks trafc (if congured
to perform marking) based on the trafc rate. This can be thought of as a horizontal
separation of trafc. A policer could have indirect knowledge of an application by virtue of
the class where the policer is appliedin this conguration, the application already has
been separated from other trafc into its own horizontal class. The policer itself, however,
does not look at the class; it looks at only the trafc rate for the trafc owing through it.
108
In addition to packet-drop capabilities, CAR can classify and mark packets using IPP,
DSCPs, and QoS group settings. Example 4-1 illustrates how to use CAR rate limiting on
applications such as web and FTP trafc, to ensure available capacity for other trafc.
Example 4-1 CAR Policing Example
Router# sh run
interface Hssi0/0/0
description 45Mbps to Router2
rate-limit input access-group 101 20000000 24000 32000
conform-action set-prec-transmit 2 exceed-action set-prec-transmit 0
rate-limit input access-group 102 10000000 24000 32000
conform-action set-prec-transmit 2 exceed-action drop
rate-limit input 8000000 16000 24000 conform-action set-prec-transmit 5
exceed-action drop
ip address 200.200.14.250 255.255.255.252
access-list 101 permit tcp any any eq www
access-list 102 permit tcp any any eq ftp
Access list 101 denes and matches web (WWW) trafc. The rst rate-limit statement
works on trafc matched by this access list:
rate-limit input access-group 101 20000000 24000 32000
conform-action set-prec-transmit 2 exceed-action set-prec-transmit 0
It limits the rate of web trafc to 20 Mbps, with a normal burst size of 24,000 bytes and an
excess burst size of 32,000 bytes. Trafc that conforms to the rate (less than 20 Mbps) is
marked with an IP Precedence of 2; trafc that exceeds the rate is marked with an IP
Precedence of 0. No trafc is dropped by this statement.
Access list 102 denes and matches FTP trafc. The second rate-limit statement works on
trafc matched by this access list:
rate-limit input access-group 102 10000000 24000 32000
conform-action set-prec-transmit 2 exceed-action drop
It limits the rate of FTP trafc to 10 Mbps, with a normal burst size of 24,000 bytes and an
excess burst size of 32,000 bytes. Trafc that conforms to the rate (less than 10 Mbps) is
marked with an IP Precedence of 2; trafc that exceeds the rate is dropped.
The third rate-limit statement works on remaining trafc:
rate-limit input 8000000 16000 24000 conform-action set-prec-transmit 5
exceed-action drop
It limits this trafc to 8 Mbps, with a normal burst size of 16,000 bytes and an excess burst
size of 24,000 bytes. Trafc that conforms to the rate (less than 8 Mbps) is marked with an
IP Precedence of 5; trafc that exceeds the rate is dropped.
Policers
109
Class-Based Policing
Conguring class-based policing using the MQC syntax is an easy way to activate policing
for only certain classes of trafc. With class-based policing, class denitions represent
application separation, and policing is performed only on the classes congured in the
policy map. This generally includes AF and BE classes in which the drop priority is
increased on out-of-contract trafc (for instance, re-marking from AF21 to AF22 or AF23)
or the trafc is dropped outright.
Trafc in classes that are not policed contends for bandwidth availability along with all
other trafc on the interface. When no congestion exists, all trafc is transmitted. When
congestion is experienced, packets can be dropped out of nonpoliced classes as well as
policed classes.
Class-based policing uses class maps and policy maps. A class map identies the trafc to
be policed (or the policer can be applied to class-default to police everything). The policy
map then details the CIR, Bc, and other policing parameters, including the conform and
exceed actions to be taken.
Class-based policing was introduced in Cisco IOS Software Release 12.1(5)T. Enhancements
were made in Cisco IOS Software Release 12.2(2)T. Class-based policing is supported in
the CEF path and in the fast- and process-switching paths. The policer can be specied at
the interface, subinterface, or even ATM/Frame Relay PVC levels. Class-based policing
works on both unicast and multicast packets.
CAR does not exist within the MQC syntax. Therefore, its statistics cannot be tied
back to the policy statistics shown by the show policy interface command.
Class-based policing statistics are available in the CISCO-CLASS-BASEDQOS-MIB, offering enhanced network management and monitoring capability.
110
Policing is used not only to drop out-of-prole packets, but also to re-mark them, thus
indicating to downstream dropping mechanisms that they should be dropped ahead of
the in-prole packets.
The single-rate three-color marker uses the following denitions within the RFC:
TeToken count of EBS, the instantaneous number of tokens left in the EBS bucket.
CBSCommitted burst size, the maximum size of the rst token bucket
EBSExcess burst size, the maximum size of the second token bucket
TcToken count of CBS, the instantaneous number of tokens left in the CBS bucket
(Do not confuse the term Tc here with the earlier use of Tc in the context of time
elapsed for policing or shaping trafc intervals.)
BByte size of offered packet
Figure 4-3 illustrates the logical ow of the single-rate three-color marker/policer (two
token bucket) algorithm.
The single-rate three-color policers tolerance of temporary bursts, shown in Figure 4-4,
results in fewer TCP retransmissions and, thus, more efcient bandwidth utilization.
Furthermore, it is a highly suitable tool for marking according to RFC 2597 AF classes,
which have three colors (or drop preferences) dened per class (AFx1, AFx2, and AFx3).
Policers
Figure 4-3
RFC 2697 Single-Rate Three-Color Policer Logic (Two Token Bucket Algorithm)
CIR
Overflow
EBS
CBS
B < Tc
No
B < Te
No
Packet of Size B
Yes
Yes
Exceed
Violate
Action
Action
Action
Two
Token Bucket
Policer
Time
Offered Traffic
RFC 2697 Single-Rate Three-Color Policer Effect on Trafc Flow (Two Token Bucket Policer)
Offered Traffic
Figure 4-4
Conform
Time
Temporary bursts (marked Y)
are permitted in excess of the CIR
only if unused token credits
(marked G) have been
accumulated.
111
112
Temporary bursts (shown shaded above the line in the graph on the right in Figure 4-4) are
permitted in excess of the CIR only if unused token credits (shown shaded below the line
in the graph) have been accumulated. Otherwise, this trafc is dropped.
Example 4-2 shows the conguration to police trafc in class-default to a CIR of 256 kbps,
with a Bc of 8000 bytes and a Be of 8000 bytes. Note that, for this policer, the CIR is
dened in bits per second, but Bc and Be are dened in bytes.
Example 4-2 Class Default Policing Example
Router# sh run
policy-map RFC2697-POLICER
class class-default
police cir 256000 bc 8000 be 8000
conform-action set-dscp-transmit af31
exceed-action set-dscp-transmit af32
violate-action set-dscp-transmit af33
PIRPeak information rate, the maximum rate that trafc ever is allowed
PBSPeak burst size, the maximum size of the rst token bucket
CIRCommitted information rate, the policed rate
CBSCommitted burst size, the maximum size of the second token bucket
TpToken count of CBS, the instantaneous number of tokens left in the PBS bucket
TcToken count of EBS, the instantaneous number of tokens left in the CBS bucket
BByte size of offered packet
Policers
113
The two-rate three-color policer also uses an algorithm with two token buckets, but the
logic varies slightly. Instead of transferring unused tokens from one bucket to another, this
policer has two separate buckets that are lled each second with two separate token rates.
The rst bucket is lled with the PIR number of tokens and the second bucket is lled with
the CIR number of tokens. In this model, the Be works the same as the Bc, except for the
PBS bucket (not the CBS bucket). This means that Be represents the peak limit of trafc
that can be sent during a subsecond interval.
The logic varies further in that the initial check is to see whether the trafc is within the
PIR. Only then is the trafc compared against the CIR. (In other words, a violate condition
is checked for rst, then an exceed condition, and nally a conform condition, which is the
reverse of the logic of the previous model.) This logic is illustrated in Figure 4-5.
Figure 4-5
RFC 2698 Two-Rate Three-Color Policer Logic (Two Token Bucket Algorithm)
PIR
CIR
CBS
PBS
Packet of Size B
B > Tp
Yes
No
B > Tc
No
Yes
Violate
Exceed
Conform
Action
Action
Action
The two-rate three-color marker allows for sustainable excess bursts (and is not dependent
on accumulating credits) and has a hard-top peak limit, as shown in Figure 4-6.
114
Figure 4-6
RFC 2698 Two-Rate Three-Color Policer Effect on Trafc Flow (Two Token Bucket Policer)
Y
PIR
Offered Traffic
Offered Traffic
Two
Token Bucket
Policer
Time
CIR
Time
Sustained excess bursts (shown shaded) are permitted in excess of the CIR (no
accumulation of unused token credits is necessary), but only until the PIR is reached.
Example 4-3 shows the conguration to police trafc on class-default to a CIR of 8000 bps,
a Bc of 1000 bytes, a Be of 2000 bytes, and a PIR of 10000 bps. Note that, for this policer,
CIR and PIR are dened in bits per second, but Bc and Be are dened in bytes.
Example 4-3 Two-Rate Three-Color Policer Example
Router# sh run
policy-map RFC2698-POLICER
class class-default
police cir 8000 bc 1000 pir 10000 be 2000
conform-action set-dscp-transmit af31
exceed-action set-dscp-transmit af32
violate-action set-dscp-transmit af32
Hierarchical Policing
It is advantageous to police some applications at multiple levels. For example, it might be
desirable to limit all TCP trafc to 10 Mbps, while at the same time limiting FTP trafc
(which is a subset of TCP trafc) to no more than 1.5 Mbps. To achieve this nested policing
requirement, hierarchical policing can be used. Two-level hierarchical policing was introduced
in Cisco IOS Software Release 12.1(5)T. Later, in Release 12.2.1(3)T, three-level hierarchical
policing was introduced for the 7200 and 7500 platforms.
The policer at the second level in the hierarchy acts on packets transmitted or marked by
the policer at the rst level. Therefore, the second level does not see any packets that the
Policers
115
rst level drops. The sum of packets that the lower-level policers see is equal to the sum of
packets that the higher-level policer transmits or marks. This feature supports up to three
nested levels.
Example 4-4 shows the conguration for the nested, two-level, hierarchical policing of TCP
and FTP trafc.
Example 4-4 Nested, Hierarchical Policing Example
Router# sh run
policy-map FTP-POLICER
class FTP
police cir 1500000
conform-action transmit
exceed-action drop
!
policy-map TCP-POLICER
class TCP
police cir 10000000
conform-action transmit
exceed-action drop
service-policy FTP-POLICER
Multiaction Policing
At times, packets need to be marked at both Layer 2 and Layer 3. To accommodate such a
requirement, a multiaction policer was introduced in Cisco IOS Software Release 12.2(8)T.
The commands in Example 4-5 illustrate the conguration.
Example 4-5 Multiaction Policer CLI
Router(config)# policy-map MULTIACTION-POLICER
Router(config-pmap)# class class-default
(config-pmap-c)#police cir [bc] [be] ?
conform-action action1
conform-action action2
conform-action action3
conform-action action4
exceed-action
exceed-action
exceed-action
exceed-action
action1
action2
action3
action4
violate-action action1
violate-action action2
For each type of trafc, such as the conforming trafc, multiple actions can be specied.
The same is true for the exceeding trafc and the violating trafc. Example 4-6 illustrates
how to mark exceeding trafc with both IP Precedence 4 (at Layer 3) and the Frame Relay
DE bit (at Layer 2).
116
Example 4-7 shows how a packet can be marked with DSCP AF31 (at Layer 3) and MPLS 3
(at Layer 2) at the same time.
Example 4-7 Multiaction Policer Example
Router# sh run
policy-map MULTIACTION-POLICER2
class class-default
police cir 10000
conform-action set-dscp-transmit af31
conform-action set-mpls-exp-topmost-transmit 3
Color-Aware Policing
RFC 2697 and RFC 2698 describe three-color policers, meaning that the packets can be
colored to three separate values to indicate whether they conform to, exceed, or violate the
policing conditions. The single-rate three-color marker and the two-rate three-color marker
initially were implemented (in Cisco IOS Software Releases 12.2[2]T and 12.2[4]T,
respectively) to operate in color-blind mode. This means that the policer assumes that the
packet stream previously was uncolored. The RFCs also dene a color-aware mode, which
means that the policer assumes that some preceding entity already has colored the packet
stream. At the time of this writing, the color-aware mode is available only in Cisco IOS
Software Release 12.0.26S; it is not yet available in any 12.2T release.
Table 4-2 shows the two-rate policer decisions for color-blind versus color-aware modes.
The number of bytes in the packet under consideration is indicated by pkt-length.
Percentage-Based Policing
Most networks contain a wide array of interfaces with different bandwidths. If absolute
bandwidth rates are used in policing policies, the policy must be re-entered for each different interface size. This reduces policy modularity and makes policy management more
cumbersome across the enterprise. It often is desirable to have an overall network policy in
which, for example, FTP trafc is not to exceed 10 percent of the bandwidth on any interfaceregardless of absolute speed. This can be achieved using percentages in the policing
statements. Thus, a single policy can be reused across many interfaces in the network.
Policers
Table 4-2
117
Color Aware
Only the CIR and PIR values can be specied with percent, not the burst sizes; the burst
sizes are congured in units of milliseconds. If the CIR is congured in percent, the PIR
also must be. When the service-policy is attached to an interface, the CIR (and PIR, if
congured) is determined as a percentage of the interface bandwidth. If the interface
bandwidth is changed, the CIR and PIR values and burst sizes automatically are recalculated
using the new interface bandwidth value. For subinterfaces, the bandwidth of the main
interface is used for the calculation. For ATM, the VC bandwidth is used; for Frame Relay,
the CIR value of the PVC is used.
If the percent feature is used in a second- or third-level policy, the bandwidth of the lowerlevel policy statement is determined by the conguration of the higher or parent level.
Table 4-3 summarizes this decision process.
Defaults
The burst parameters and actions of the policer are optional. The default conform action
is to transmit the packet, and the default exceed action is to drop the packet. The default
violate option is the same as the exceed action. The default burst values are 250 ms of the
specied trafc rate.
118
Table 4-3
Decision
CIR congured
Shapers
Similar to policers, shapers meter the transmission rate of packets through a network.
However, unlike policers, shapers delay (instead of drop or re-mark) packets that exceed
the CIR. Such delaying smoothes out bursts in trafc ows and allows for conformance to
SLAs, as shown in Figure 4-7.
Figure 4-7
Shapers
119
Central
Site
T1
Frame Relay
or ATM
64
kbps
T1
T1
T1
CIR =
64 kbps
Remote Sites
A line speed mismatchIn this case, the central site has a T1 link, but the remote
site has only a 64-kbps link. Without trafc shaping, frames and cells could
accumulate and drop in the carriers cloud.
120
SLA enforcementThe enterprise has contracted for a 64-kbps CIR from its carrier,
and the carrier offers no service guarantees for trafc exceeding this rate. Service
guarantees are critical when planning IP telephony or IP videoconferencing
deployments.
Because shaping involves buffering, various scheduling techniques can be used when the
shaping buffer starts lling. These scheduling techniques are discussed in more detail in
Chapter 5, Congestion-Management Tools.
Shaping Algorithms
Similar to policers, shapers use token bucket algorithms. By default, some shapers set the
Bc to equal CIR/8, which yields an interval (Tc) of 125 ms. Although this interval value
might be adequate for data applications, it introduces unnecessary interpacket delays for
real-time networks. Consider the example shown in Figure 4-9.
Figure 4-9
Bc
CIR
125 ms Interval =
8000 bits
64,000 bps
16,000
bits
32,000
bits
48,000
bits
64,000
bits
80,000
bits
96,000
bits
112,000 128,000
bits
bits
Line Rate
128 kbps
Net Result:
8000 * 8 = 64 kbps
62.5 ms
0 ms
125 ms 250 ms
A shaper uses the CIR, Bc, and Be to smooth a trafc stream to a specied rate. It achieves
the given CIR by dividing the line speed of the interface into equal-length time slots
(intervals, or Tc). Then it sends a smaller portion (Bc) of the trafc during each time slot.
Shapers
121
The time slot size is governed by the Bc parameter (Tc = Bc/CIR). In Figure 4-9, a line rate
of 128 kbps is shaped to 64 kbps. For Frame Relay trafc shaping, the Bc, by default, is one
eighth of the CIR (or 8 kbps). Each second is divided into eight time slots of 125 ms each,
and the shaped rate of 64,000 bps is divided into eight bursts of 8000 bps each (Bc). Each
burst takes 62.5 ms to transmit (at a 128-kbps line rate), so the shaper transmits information
for the rst 62.5 ms of each 125-ms time slot and is silent for the remaining 62.5 ms of the
time slot. Over the span of a second, this achieves the average rate of CIR.
The Be value is used to determine the peak rate of sending and is calculated as follows:
Peak Rate = CIR (1+ Be / Bc)
Peak-rate shaping allows the router to burst higher than average-rate shaping. However,
when peak-rate shaping is enabled, any trafc that exceeds the CIR could be dropped if the
network becomes congested.
The design goal for one-way latency across a real-time network is 150 ms (per the G.114
specication for voice end-to-end delay), and the jitter target is less than 10 ms per hop.
Introducing up to 125 ms of shaping delays at a single hop destroys VoIP quality. Therefore,
it is recommended that shaped interfaces carrying real-time trafc be shaped to 10-ms
intervals (Tc). Because the Tc cannot be administered directly by Cisco IOS commands,
Bc tuning is required to affect Tc indirectly. This interval value can be achieved (remember,
Tc = Bc / CIR) by setting the Bc equal to CIR/100, which results in a Tc value of 10 ms.
The recommended value for Bc on an 64-kbps interface/PVC carrying real-time trafc is,
therefore, 64,000 / 100, which equals 640 bits and represents 10 ms of transmission on a
64-kbps line.
122
Table 4-4
Purpose
Router(cong-if-atm-vc)# abr
output-pcr output-mcr
Router(cong-if-atm-vc)# ubr
output-pcr
Router(cong-if-atm-vc)# ubr+
output-pcr output-mcr
Router(cong-if-atm-vc)# vbr-nrt
output-pcr output-scr output-mbs
Router(cong-if-atm-vc)# vbr-rt
peak-rate average-rate burst
The -pcr and -mcr arguments are the peak cell rate and minimum cell rate, respectively. The
-scr and -mbs arguments are the sustainable cell rate and maximum burst size, respectively.
The parameters specied on the ATM PVC conguration determine the shaped average or
peak rates, as well as the burst parameters, as shown in Example 4-8.
Example 4-8 ATM PVC Conguration
Router# sh run
interface ATM3/0.1 point-to-point
description OC3 Link to Site-B
ip address 10.2.12.1 255.255.255.252
pvc 0/12
vbr-nrt 149760 149760
General Cisco IOS shaping tools, such as generic trafc shaping and class-based shaping,
are not supported on ATM interfaces, including digital subscriber line (DSL).
Shapers
123
In line with the previously discussed shaping recommendations, the Bc is set to CIR/100.
The Be is set to 0 to prevent any excess bursting. The problem with provisioning the Be in
real-time networks is that it can create buffering delays within a Frame Relay network
(because the receiving side can pull the trafc from a circuit only at the rate of Bc, not
Bc + Be). To remove the potential for buffering delays, the recommendation is to set the Be
to 0.
Frame Relay also has the capability to adapt to explicit congestion notices, either in the forward direction through forward explicit congestion notications (FECNs) or in the reverse
direction through backward explicit congestion notications (BECNs). Adaptive trafc
shaping even can be triggered by other notications, such as foresight or interface congestion (as of Cisco IOS Software Release 12.2[4]T). When adaptive shaping is enabled and
congestion notications have been received, the FRTS engine rates down the ow to the
minimum CIR (minCIR), which, by default, is CIR/2. Because such congestion adaptation
introduces variations in transmission rates and, thus, service levels, the recommendation is
to disable adaptive shaping in networks carrying real-time trafc.
continues
124
Example 4-10 Frame Relay Trafc Shaping Using Class-Based Syntax (Continued)
!
...
!
interface Serial0/1
no ip address
encapsulation frame-relay
!
interface Serial0/1.50 point-to-point
description FR Link to BRANCH#50
bandwidth 1536
ip address 10.200.50.1 255.255.255.252
frame-relay interface-dlci 150
class FRTS-1536
!
...
!
map-class frame-relay FRTS-1536
service-policy output CB-FRTS-1536
The class-based FRTS conguration retains remnants of FRTS, such as the need to associate the DLCI to a Frame Relay map class and then attach the class-based FRTS policy to
this map class.
Shapers
125
FR-VATS monitors the Frame Relay PVC. When voice activity is present, it automatically
shapes to the CIR (which, in this specic case, is congured as the minCIR). However, if
no voice is present, it allows the trafc to burst to the line rate (which, in this specic case,
is congured as the CIR). This unique feature determines the presence of voice based on
packets entering a priority class or low-latency queue (a scheduling feature that is discussed
in Chapter 5). It then automatically determines whether to shape the trafc to minCIR
(voice present) or not (no voice present). Similarly, FR-VATS automatically engages Frame
Relay fragmentation (FRF.12) on links less than 768 kbps when voice packets are present,
to prevent unnecessary serialization delays. (FRF.12 is discussed in more detail in Chapter 7,
Link-Specic Tools.)
Because FR-VATS automatically detects the presence of voice, there could be some brief
quality degradation in the rst couple of seconds of the rst voice call made across a PVC.
This occurs while the interfaces comprising the PVC recongure themselves to shape to the
minCIR and empty out their buffers. FR-VATS is not a predictive algorithm. The change in
behavior is triggered by voice packets owing across the PVC.
The FR-VATS deactivation period is tunable and, by default, is set to 30 seconds. If tuned,
this timer should be set 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.
Example 4-11 shows a conguration of FR-VATS.
Example 4-11 FR-VATS Conguration
Router# sh run
policy-map FR-VATS-768
class class-default
shape average 768600 3648 0
sets CIR to 768 kbps and Bc to minCIR/100
shape adaptive 364800
sets the minCIR to 364.8kbps
shape fr-voice-adapt deactivation 30 enables default FR VATS deactivation timer
!
...
!
interface Serial0/1
no ip address
encapsulation frame-relay
serial restart_delay 0
frame-relay fragmentation voice-adaptive deactivation 30 enables FR Voice
Adaptive Fragmentation (sub-component of FR VATS)
!
interface Serial0/1.50 point-to-point
description FR Link to BRANCH#50
bandwidth 768
ip address 10.200.50.1 255.255.255.252
frame-relay interface-dlci 150
class FRTS-768
applies the FR map-class to the DLCI
continues
126
Class-Based Shaping
Class-based shaping (available within the MQC syntax) uses class maps and policy maps.
A class map identies the trafc to be shaped (or the shaper can be applied to class-default
to shape everything). The policy map then details the CIR, Bc, Be, and other shaping
parameters.
Class-based shaping was introduced in Cisco IOS Software Release 12.1(2)T.
Conceptually, it was a migration of GTS into the MQC syntax. However, the class-based
shaping code is different from GTS. This feature should not be assumed to behave in
exactly the same manner as GTS.
The command to congure class-based shaping follows:
shape [average | peak] [cir] [burst_size [excess_burst_size]]
Example 4-12 uses class-based shaping on a T1 interface to shape to 768-kbps CIR with
the Bc set to the recommended value for real-time networks (CIR/100 and Be set to 0).
Example 4-12 Class-Based Shaping on a T1 Interface
Router# sh run
policy-map CBS-768
class class-default
shape average 768000 7680 0
Shapers
127
parent policy
Percentage-Based Shaping
As with policing, shaping can be stated as a percentage of bandwidth instead of absolute
bandwidth. This feature enhancement was introduced in Cisco IOS Software Release 12.2(13)T
and is enabled with the following command:
shape [average | peak] percent xx
Burst sizes cannot be congured using percentages, but they can be specied in terms of
milliseconds on the command. When a percentage conguration is used for average or peak
shaping rates, the default burst sizes automatically are assigned and can be seen using the
show policy interface command, as shown in Example 4-14. When the service policy is
attached to an interface, the CIR value is determined from the interface bandwidth in
conjunction with the congured CIR percent value.
Example 4-14 Percent-Based Shaping
Router#show policy-map interface fastEthernet 0/1 output
FastEthernet0/1
Service-policy output: ex-shape
Class-map: example (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 101
continues
128
Excess
Interval
bits/int (ms)
0 (ms)
2000000
25
Packets
Bytes
Delayed
Delayed
0
0
Increment
(bytes)
250000
Shaping
Active
no
0 bps
Further Reading
DiffServ Policing Standards
Further Reading
129
Policing
Adaptive Frame Relay trafc shaping for interface congestion (12.2.4T): http://
www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/122t4/
ft_afrts.htm.
130
Trafc Shaping
CHAPTER
Congestion-Management Tools
Of all the mechanisms within the QoS toolset, congestion-management tools provide the
most signicant impact on application service levels. Congestion-management tools, also
known as queuing tools, apply to interfaces that may experience congestion. This could be
the case in either a WAN or a LAN environment (although LAN queuing tools are discussed
in Chapter 10, Catalyst QoS Tools) because speed mismatches can occur in either setting.
Whenever packets enter a device faster than they can exit it, the potential for congestion
exists and queuing tools apply.
It is important to recognize that queuing tools are activated only when congestion exists
on an interface. When no congestion exists on an interface, packets are sent out over the
interface as soon as they arrive. However, when congestion occurs, packets must be buffered,
or queued, to mitigate dropping.
Packet markings at either Layer 2 or Layer 3, or the absence of a marking on a packet,
inuence queuing policies so that the router can reorder packets before transmission.
Therefore, queuing policies are usually complementary and depend on classication and
marking policies within converged networks.
This chapter examines the difference between scheduling and queuing, and the different
OSI layers where queuing might occur. Legacy Layer 3 queuing algorithms are reviewed to
provide context for the more recent queuing algorithms, such as Class-Based Weighted Fair
Queuing (CBWFQ) and Low-Latency Queuing (LLQ), that evolved from them. LLQ and
CBWFQ are examined in detail because these are the principal recommended queuing
mechanisms for converged networks in which different trafc types such as voice, video,
and data all share the same transmission media.
Lower-level queuing algorithms, such as Layer 2 mechanisms and the Tx-ring, also are
discussed because these tools have an impact on successful end-to-end QoS design. Finally,
the internal Cisco IOS mechanism for protecting routing and control packets (PAK_priority)
within the router is introduced.
134
Scheduling
Inbound Packets
Outbound
Packets
Conceptually, queuing and scheduling are complementary but intertwined processes. These
terms quite often are incorrectly used interchangeably:
135
LLQ and CBWFQ are discussed in detail in this chapter. WRED is covered in Chapter 6.
To understand queuing, you rst must understand the various levels of queuing and how
queuing has evolved. A fundamental concept in Cisco IOS queuing is that queuing is
performed at multiple layers of the OSI model.
Layer 3 queuing subsystems operate at the network layer and are applied to Layer 3 packets
at a logical level. Because Cisco IOS Layer 3 queuing subsystems are independent of the
egress interface type, they can be applied to Asynchronous Transfer Mode (ATM), Frame
Relay, High-Level Data Link Control (HDLC), Point-to-Point Protocol (PPP), Multilink
136
137
From these three basic algorithms, combinations and enhancements were developed. These
newer queuing mechanisms sought to combine the best features of the basic algorithms and,
at the same time, to minimize their drawbacks. These enhanced queuing algorithms include
the following:
IP RTP priority queuing (PQ-WFQ). This was a transient method and soon was
superceded by low-latency queuing.
CBWFQ
LLQ
Table 5-1 compares the attributes of the different algorithms and their suitability to
handling real-time, delay-sensitive trafc, such as voice. This trafc requires two things
from a queuing/scheduling algorithm:
Priority Queuing
The oldest queuing algorithm is PQ, which consists of only four queues (high, medium,
normal/default, and low). The scheduler begins by emptying the high queue and begins to
service lower queues only when upper queues are completely empty. This basic algorithm
proved very successful in handling real-time trafc, but it posed starvation possibilities to
lower-priority trafc ows.
Custom Queuing
CQ addressed the concern of trafc starvation, common in PQ scenarios. By introducing a
round-robin scheduler that was based on byte counts, not only did custom queuing prevent
bandwidth starvation, but it also became the rst queuing mechanism to provide bandwidth
guarantees. Although custom queuing (which supports up to 16 distinct queues) introduced
a fairness that PQ did not have, it lost the capability to provide strict priority to real-time
ows.
138
CQ
WFQ
PQ-WFQ
CBWFQ
LLQ
Per interface
Per protocol,
per interface
Per protocol,
per interface
IP prec, RSVP,
RTP Reserve,
protocol, port
Class-based
classication
Class-based
classication
16
Per ow
1 PQ + WFQ Up to 256
classes
FIFO
Strict priority
Round robin
Weighted fair
(based on IP prec)
PQ: Strict
Weighted fair
(based on
bandwidth)
PQ: Strict
No
No
No
Yes for PQ
trafc
No
Yes for PQ
trafc
Bandwidth
guarantee
No
No
Yes
No
Yes for PQ
trafc
Yes
Yes
Recommended
for voice
No
No
No
No
No
No
Yes
Classification
Number of
queues
Scheduling
WFQ: Weighted
fair (based on
IP prec)
1 PQ +
CBWFQ
CBWFQ: Weighted
fair (based on
bandwidth)
Delay guarantee
FIFO
139
By adding a xed weight (based on the packets IPP value) to the calculation, WFQ
introduced a method for moderately skewing bandwidth allotments by favoring higherpriority ows (priority being a function of IPP marking). Although such skewing preferred
certain ows over others, WFQ lost CQs capability to provide bandwidth guarantees
because bandwidth allocations continuously changed as ows were added or ended.
140
A major difference between WFQ and CBWFQ is that, with WFQ, the bandwidth of the
ow is calculated instantaneously; but with CBWFQ, a minimum bandwidth explicitly is
dened and enforced. Additionally, CBWFQ uses Modular QoS CLI (MQC)based class
maps for classication, which provide the richest and most granular recognition criteria
within the Cisco IOS QoS toolset. When class maps are combined with CBWFQ bandwidth
statements, minimum-bandwidth guarantees can be provisioned for almost any application.
Example 5-1 shows two applications of CBWFQ. First, a minimum bandwidth guarantee
is given to the MISSION-CRITICAL-DATA class. Second, all other trafc (which falls into
class-default) is fair queued.
Example 5-1 CBWFQ Policy for Multiple Levels of Data
policy-map WAN-EDGE
class MISSION-CRITICAL-DATA
bandwidth percent 20 sets the bandwidth for this class to 20%
class class-default
fair-queue sets WFQ as the queuing algorithm for unclassified traffic
NOTE
The percent keyword was added in Cisco IOS Software Release 12.0(7)T, allowing
bandwidth to be allocated as relative percentages of the link, or shaping rate, instead of
in absolute values (in kilobits per second). The percent keyword increases CBWFQ policy
modularity because the same policies can be applied to many interfaces, regardless of their
link speeds. Additionally, the percent keyword makes future expansion easier to manage
because the relative bandwidth allocations automatically will increase as the link speeds
themselves increase.
CBWFQ is a highly efcient algorithm for data applications, but it lacks the capability to
provide strict-priority servicing to real-time applications, such as voice or interactive video.
This is because it provides a bandwidth guarantee but not a latency guarantee. Therefore,
to service such real-time applications, a strict-priority queue was added to the CBWFQ
algorithm; the resulting algorithm was named low-latency queuing.
Low-Latency Queuing
LLQ is an enhanced combination of all three legacy queuing algorithms: PQ, CQ, and
WFQ. It was introduced in Cisco IOS Software Release 12.0(7)T.
LLQ is essentially CBWFQ combined with a strict PQ. Trafc assigned to the strict priority
queue, using the priority command, is serviced up to its assigned bandwidth before all
other CBWFQ queues are serviced.
NOTE
141
The original name for the LLQ algorithm was PQ-CBWFQ. Although this name was
technically correct, it was obviously clumsy from a marketing perspective. Hence, the
algorithm was renamed LLQ.
LLQ also has an implicitly dened burst parameter (added in Cisco IOS Software Release
12.1[3]T) that accommodates temporary bursts of real-time trafc. By default, LLQs are
provisioned to protect bursts up to 200 ms, dened in bytes. The burst parameter becomes
signicant in certain interactive video scenarios (which are discussed in more detail in
Chapter 13, WAN Aggregator QoS Design).
In Example 5-2, up to one-third of the links (or shapers) bandwidth is assigned for strict
priority treatment of voice.
Example 5-2 LLQ for VoIP and Multiple Levels of Data
policy-map WAN-EDGE
class VOICE
priority percent 33 sets the LLQ bandwidth to 33%
class CALL-SIGNALING
bandwidth percent 2
class MISSION-CRITICAL-DATA
bandwidth percent 20
class class-default
fair-queue
NOTE
The percent keyword was added to the LLQ priority command in Cisco IOS Software
Release 12.2(2)T.
The next sections discuss further details about LLQ, such as its operation, the implicit
policing done by the queuing algorithm, bandwidth provisioning, and the lesser-known
interactions between LLQ, IPSec, cRTP, and LFI, and bundling technologies such as ATM,
MLP, and Frame Relay bundles.
LLQ Operation
LLQ is designed exclusively for converged networks that carry voice and interactive video.
It contains two components, a PQ for the real-time sensitive trafc and a class-based
complex of queues (CBWFQ). The PQ is the optimal queueing mechanism for real-time
trafc, whereas CBWFQ is the best queuing algorithm for data applications. Converged
networks require LLQ to be congured so that voice, interactive video, and data all are
given the service levels they require.
142
The Layer 3 queuing subsystem for LLQ is shown on the left side of Figure 5-2. In this
illustration, voice trafc is classied and placed in the PQ. When trafc is present in the PQ,
it is serviced with exhaustive priority treatment up to the bandwidth maximum congured
for the priority class (that is, voice is sent out rst until no more voice is present or the
bandwidth assigned is exceeded). The L2 subsystem is discussed later in this chapter.
Figure 5-2
Link
Fragmentation
and Interleaving
LLQ/CBWFQ
Police
VoIP
IP/VC
PQ
Interleave
Signaling
TxRing
Packets
Out
Critical
Packets
In
Bulk
WFQ
CBWFQ
Fragment
Mgmt
Default
Layer 3
Queuing Subsystem
Layer 2
Queuing Subsystem
Device
Driver
LLQ Policing
The threat posed by any strict priority-scheduling algorithm is that it could starve lowerpriority trafc. To prevent this, the LLQ mechanism has a built-in policer. This policer (like
the queuing algorithm itself) engages only when the interface is experiencing congestion.
Therefore, it is important to provision the priority classes properly. If the total amount of
priority class bandwidth provisioned is lower than the total amount of voice trafc offered
to the PQ (including the Layer 2 overhead), the excess voice trafc might be dropped (by
the LLQ policer). As with any other policer, LLQs policer, when engaged, drops trafc
indiscriminately and affects the quality of all voice calls active on the interface (not just the
last one to go through). Strategies to accommodate this behavior of LLQ are discussed in
more detail in Chapter 9, Call Admission Control (CAC). In earlier Cisco IOS Releases,
the PQ of LLQ policed strictly to the bandwidth assigned, regardless of trafc present or
143
absent in other classes. In later releases, this operation changed to police strictly only if the
interface was congestedthat is if other classes were underutilized, PQ trafc would be
allowed to exceed its bandwidth without dropping packets.
Another benet provided by the implicit policer within the LLQ mechanism is the capability to use TDM for the single strict-priority queue. TDM abstracts the fact that only a single
strict-priority queue exists and allows for the conguration and servicing of multiple lowlatency queues.
In Example 5-3, separate priority classes on a dual-T1 MLP link are assigned for voice and
videoconferencing. Each priority class is policed (to 540 kbps for voice and 460 kbps for
video). Under the hood, however, there is only a single 1-Mbps PQ (540 kbps + 460 kbps),
which is time shared between these two applications by the implicit policer.
Example 5-3 LLQ Policy for VoIP, Interactive Video, and Multiple Levels of Data
policy-map WAN-EDGE
class VOICE
priority 540 creates a LLQ of 540 kbps
class INTERACTIVE-VIDEO
priority 460 creates a "second" LLQ of 460 kbps
class CALL-SIGNALING
bandwidth percent 2
class MISSION-CRITICAL-DATA
bandwidth percent 20
class class-default
fair-queue
Bandwidth Provisioning
Most applications default to the best-effort default class. Because enterprises have hundreds,
if not thousands, of applications on their networks, it is a general best practice to provision
at least 25 percent of a links bandwidth for class-default. This recommendation has been
coded into older Cisco IOS Software releases for the lower-end platforms (Cisco 7200 and
below). If present, this restriction can be overridden manually (using the max-reservedbandwidth interface command).
A similar consideration must be given to the sum of all trafc assigned for all priority
classes. It is important to remember the goal of convergence: to allow voice, video, and data
to coexist transparently on a single network. If real-time applications dominate a network,
as in the case of a dominantly provisioned LLQ (in which the priority classes have the lions
share of the bandwidth), data applications might uctuate signicantly in their network
response times when voice/videoconference calls are made. This destroys the transparency
of the converged network. User feedback consistently has reected that most users prefer
consistent (even if moderately slower) application response times over varying response
times (as would occur if LLQs dominated WAN links). Cisco Technical Marketing testing
144
has revealed a conservative rule of thumb for priority class provisioning, which is to limit
the sum of all priority class trafc to no more than 33 percent of the WAN links capacity.
This 33 percent LLQ rule has been deployed widely and successfully.
Figure 5-3 illustrates these bandwidth-provisioning recommendationsnamely, that the
aggregate bandwidth of all priority classes should be no more than 33 percent of the links
capacity and that all bandwidth guarantees within LLQ should be no more than 75 percent
of the link capacity.
Figure 5-3
Voice
Call
Interactive
Signaling
Video
Critical
Data
Best-Effort
Data
LLQs 33%
Sum of all BW guarantees 75%
Link Capacity
145
Example 5-4 LLQ Policy for VoIP and Multiple Levels of Data Using Remaining Percentage Allocations
policy-map WAN-EDGE
class VOICE
priority percent 33
class MISSION-CRITICAL-DATA
bandwidth remaining percent 50
class class-default
bandwidth remaining percent 50
Encryption changes packet sizes because it adds headers to the packet and thus affects
bandwidth allocation for both voice and data trafc. The effect is much more signicant for voice because the packets are relatively small, making the relative overhead
of the new headers far greater. Figure 5-4 illustrates how tunneling and encryption
overhead can more than double the Layer 3 bandwidth required for a voice packet.
The bottleneck within the network node that applies the encryption potentially moves
from the egress interface to the encryption engine. On most routers that have encryption
accelerators, the combined throughput of egress interfaces that can be supported far
exceeds the throughput of the encryption engines. Therefore, encryption for trafc
must be engineered carefully, especially if converged trafc is sent through an
encrypted tunnel.
146
Figure 5-4
UDP
RTP
Voice
20
12
20
GRE
IP
Hdr
UDP
RTP
Voice
20
12
20
GRE
IP
Hdr
UDP
RTP
Voice
20
12
20
G.729
60 Bytes
IP GRE
84 Bytes
GRE IP
Hdr
20
IPSec ESP
Tunnel Mode
136 Bytes
20
ESP
ESP
Pad/NH Auth
2257
12
Encrypted
Authenticated
Figure 5-5
VoIP Packets
packets May
mayNeed
need
VoIP
to Be
be Prioritized
prioritized atat
to
cry pto Engine
engine Entrance
entranc e
Crypto
LLQ
Packets
VoIP packets
Prioritized at
prioritized
at Egress
egress
Interface
interface
IPSec
Crypto
Engine
LLQ
147
detail in Chapter 7, Link-Specic Tools, can reduce the overhead requirements of voice
packets from 40 bytes to between 2 and 5 bytes.
A new feature in Cisco IOS Software Release 12.2(13)T allows cRTP to be congured
within the MQC syntax and performed in the CEF switch path. Class-based cRTP also
improves the feedback mechanism to the LLQ policing engine.
148
cRTP is supported.
LFI is supported if the aggregate bandwidth of the bundle is still below 768 kbps. (This
is likely not required because bundling most often allows bandwidths above 768 kbps
so that LFI is no longer necessary.)
Packet reordering occurs.
Multiple physical interfaces are bound together.
There is bandwidth sharing across the aggregate bandwidth of all the links in the
bundle.
Figure 5-6 shows this principle in an MLP bundle aggregating several ATM PVCs spread
across multiple DSL interfaces. The DSL interfaces are terminated by the DSLAM equipment in the network, and the bundled PVCs are delivered on a high-speed ATM interface,
such as an OC-3, at the aggregation site. In this case, LLQ is applied at the MLP bundle
interface, not to the actual physical interfaces.
Figure 5-6
149
V
IOS
DSL Drivers
MLP PVC
Bundle
ATM
CBWFQ
7200
DSLAM
Aggregation
Site
PVCs
Single or Multiple
DSL Links
NOTE
Care must be taken to never put VoFR and VoIP trafc on the same Frame Relay DLCI on
slow speed links that require fragmentation and interleaving (that is, less than or equal to
768 kbps). This is because VoFR and VoIP require different fragmentation standards
(FRF.11 and FRF.12, respectively). If both VoFR and VoIP are congured on the same
DLCI with fragmentation for each enabled, FRF.11 overrides FRF.12 and disables the
interleaving scheme that VoIP packets require. Obviously then, the quality of VoIP will
deteriorate signicantly.
150
Figure 5-7
151
L3 LLQ/CBWFQ
Classifier
FRTS
L3
Scheduler
Figure 5-8
L2 FR
DualFIFO
Tx-Ring
L1
Scheduler
L2
Scheduler
Ingress Interface
1
DLCI 101
DLCI 102
DLCI 103
Egress Interface
DLCI 104
DLCI 105
Medium
Normal 4
High
PIPQ
Dequeuing
And
Enqueuing
Low
WAN Circuit
4
In Figure 5-8, DLCIs 101 and 102 are designated as high priority, while DLCIs 103, 104,
and 105 are mapped to the medium, normal, and low queues, respectively. Trafc on DLCIs
101 and 102 will, therefore, have priority over any of the other PVCs, and DLCI 105 will
be capable of sending trafc only if none of the other PVCs has a frame ready to be
transmitted.
152
A practical application for this queuing technique is to place voice trafc on DLCI 101, a
nancial ticker on DLCI 102, and various levels of data trafc on the other three PVCs.
Example 5-5 shows the conguration of PIPQ for DLCI 101.
Example 5-5 Frame Relay PIPQ Example
interface serial0.101
frame-relay interface-queue priority 10 20 30 40
frame-relay interface-dlci 101
class HIGH-PVC
map-class frame-relay HIGH-PVC
frame-relay interface-queue priority high
Tx-ring
The Tx-ring is a nal FIFO queue that holds frames to be placed immediately on the
physical interface. Its purpose is to ensure that a frame always will be available when the
interface is ready to transmit trafc so that link utilization will be driven to 100 percent of
capacity.
The placement of the Tx-ring is shown on the right of Figures 5-2 and 5-7. The size of the
Tx-ring depends on the hardware, software, Layer 2 media, and queuing algorithm congured on the interface. It is a general best practice to set the Tx-ring to a value of 3 on slowlink interfaces (less than or equal to 768 kbps).
The Tx-ring is especially important on ATM links (including DSL), in which each PVC has
a dedicated driver-level queue (Tx-ring) to ensure adherence to the ATM class-of-service
trafc contract of the PVC. Default ATM Tx-rings are typically deep, containing 64 or
more particles (typically, each particle is 576 bytes) to ensure that enough particles exist in
the buffer to drive the PVC to its full bandwidth utilization. A shallow Tx-ring increases the
number of interrupts and the wait states between the driver and the main CPU. Packets
are downloaded from the Layer 3 queues to the driver for transmission, which is usually
suboptimal at higher speeds.
On the other hand, a deep Tx-ring can impact voice quality. For example, assume that a
50-packet burst of data passes through the LLQ system and into the FIFO Tx-ring. A voice
packet then arrives and is packet number 51 for transmission. The LLQ no longer has the
opportunity to prioritize it over the data packets. A shallow Tx-ring pushes packets back
into LLQ, where prioritization and packet reordering can be accomplished before the
packets are downloaded to the driver. Once in the driver level, the packets have a very
short wait time until transmission.
PAK_priority
153
Thus, the tuning of the Tx-ring is a compromise between optimizing real-time packet
delays and achieving maximum CPU efciency. The higher the bandwidth of the PVC is,
the deeper the Tx-ring can be set without adversely affecting voice quality. For slow links
(less than or equal to 768 kbps), however, a Tx-ring of 3 is recommended to maintain voice
quality.
PAK_priority
Certain trafc types, such as Layer 2 keepalives and Layer 3 routing protocol messages, are
absolutely critical to maintaining network stability. Therefore, it is vital to understand how
the Cisco IOS Software handles these trafc types, especially when provisioning WAN
links that might experience sustained periods of congestion.
By default, Cisco IOS Software (in accordance with RFC 791 and RFC 2474) marks Interior
Gateway Protocol (IGP) trafc (such as Routing Information Protocol [RIP/RIPv2], Open
Shortest Path First [OSPF], and Enhanced Interior Gateway Routing Protocol [EIGRP]) to
IPP6/CS6. These precedence values specify PHBs for these control packets as they pass
through the network. However, Cisco IOS Software also has an internal mechanism for
granting priority to important control datagrams as they are processed through the router.
This mechanism is called PAK_priority.
As datagrams are processed though the router and down to the interfaces, they are encapsulated internally with a small packet header, referred to by an internal label. Within the
elds of this label is a PAK_priority ag that indicates the relative importance of control
packets to the routers internal processing systems. PAK_priority designation is a critical
internal Cisco IOS Software operation and, as such, is not administratively congurable in
any way.
The default internal treatment of PAK_priority datagrams varies slightly between distributed
platforms and nondistributed platforms when MQC policies are bound to the outgoing
interfaces.
Distributed platforms place the PAK_priority datagrams into the class-default queue
and use the PAK_priority ag to avoid dropping the packets.
As noted previously, IGPs are not only marked IPP6/CS6, but they also receive PAK_priority
treatment within the routers. For routing packets that are not marked with IPP6/CS6,
special bandwidth considerations should be given.
154
Additionally, several non-IP control packets, including the following, receive PAK_priority:
High-Level Data Link Control (HDLC) keepalives on serial and POS interfaces
Point-to-Point Protocol (PPP) keepalives on serial and Packet over SONET (POS)
interfaces
ATM operation, administration, and maintenance (OAM) and Address Resolution
Protocol (ARP) cells
Summary
Congestion-management tools were overviewed in this chapter, with an emphasis on the
LLQ algorithm, because this is the principal recommended Cisco IOS queuing tool for
converged networks.
The operation of the LLQ algorithm is important to understand because it directly impacts
QoS design recommendations. Additionally, the interdependence of the QoS toolset is
highlighted because congestion-management tools are shown to be complementary to
classication and marking tools, policing and shaping tools, congestion-avoidance tools,
and link-efciency mechanisms.
Although most queuing policies occur at Layer 3, it is important to consider any impacts
that lower levels of queuing, such as Frame Relay Dual-FIFO, Tx-ring, and PAK_priority,
may have on the overall network design.
Further Reading
Layer 3 Queuing
Further Reading
155
Class-based weighted fair queuing (Cisco IOS Software Release 12.0.5T): http://
www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t5/
cbwfq.htm.
Low-latency queuing for Frame Relay (Cisco IOS Software Release 12.1.2T): http://
www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/121t2/
dtfrpqfq.htm.
Conguring burst size in low-latency queuing (Cisco IOS Software release 12.1.3T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/
121t3/dtcfgbst.htm.
RSVP support for low-latency queuing (Cisco IOS Software Release 12.1.3T): http:/
/www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/121t3/
rsvp_llq.htm.
Low-latency queuing with priority percentage support (Cisco IOS Software Release
12.2.2T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t2/ftllqpct.htm.
Low-latency queuing (LLQ) for IPSec encryption engines (Cisco IOS Software
Release 12.2.13T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios122/122newft/122t/122t13/llqfm.htm.
Layer 2 Queuing
Voice over Frame Relay Queuing Enhancement (Cisco IOS Software Release
12.0.5T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/
120newft/120t/120t5/vofrque.htm.
Frame Relay PVC interface priority queuing (Cisco IOS Software Release 12.1.1T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/
121t1/dtfrpipq.htm.
156
Enhanced Voice and QoS for ADSL and G.SHDSL (Cisco IOS Software Release
12.2.13T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122limit/122y/122yn8/ft_ipqos.htm.
Frame Relay queuing and fragmentation at the Interface (Cisco IOS Software
Release 12.2.13T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios122/122newft/122t/122t13/frfrintq.htm.
Frame Relay PVC interface priority queueing (Cisco IOS Software Release 12.1.1T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/
121t1/dtfrpipq.htm.
Tx-ring
PAK_priority
How routing updates and Layer 2 control packets are queued on an interface with a
QoS service policy: http://www.cisco.com/warp/public/105/rtgupdates.html.
CHAPTER
Congestion-Avoidance Tools
Congestion-avoidance mechanisms, such as Weighted Random Early Detection (WRED),
are complementary to (and dependent on) queuing algorithms. Queuing/scheduling algorithms manage the front of a queue, whereas congestion-avoidance mechanisms manage the
tail of a queue.
Congestion-avoidance QoS tools are designed to handle TCP-based data trafc. TCP has
built-in ow-control mechanisms that operate by increasing the transmission rates of trafc
ows (even though bounded by buffers and window sizes) until packet loss occurs. At
this point, TCP abruptly squelches the transmission rate and gradually begins to ramp the
transmission rates higher again. This behavior makes a strong case against the statement
QoS isnt necessary; just throw more bandwidth at it. If left unchecked, lengthy TCP
sessions (as are typical with bulk data and scavenger applications) can consume any and all
available bandwidth, simply because of the nature of TCP.
When no congestion-avoidance algorithms are enabled on an interface, the interface is said
to tail drop. That is, after the queuing buffers have lled, all other packets are dropped as
they arrive.
In a constricted channel, such as in a WAN or a VPN, all the TCP connections eventually
synchronize with each other as they compete for the channel. Without congestion-avoidance
mechanisms, they all ramp up together, lose packets together, and back off together. This
behavior is referred to as global synchronization. In effect, waves of TCP trafc ow
through the network nodes, with packets overowing the buffers at each wave peak and
lulls in trafc between the waves.
Figure 6-1 illustrates TCP global synchronization behavior attributable to tail-dropping and
the suboptimal effect that this behavior has on bandwidth utilization.
160
Figure 6-1
100%
Time
Tail Drop
Three traffic flows start
at different times.
This chapter looks at several variations of the Random Early Detection QoS tool, which
strives to combat this global synchronization behavior exhibited by TCP trafc. Explicit
congestion notication is another tool that can be employed to improve bandwidth utilization
of TCP trafc. The operation and conguration of these tools are discussed in the following
sections.
161
The Cisco IOS Software does not support RED; it supports only Weighted RED (WRED).
It is important to note that the random-detect Cisco IOS software CLI command enables
WRED. However, if all the packets assigned to an interface or class have the same IPP or
DSCP markings, the effective policy is simply RED.
Drop Probability
100%
Queue Depth
Begin
Begin
Begin
Dropping Dropping Dropping
IPP 0
IPP 1
IPP 2
Packets Packets Packets
Drop All
IPP 1
Packets
Drop All
IPP 1
Packets
Drop All
IPP 1
Packets
Max Queue Length
(Tail Drop Everything)
162
Drop Probability
100%
Queue Depth
Begin
Begin
Begin
Dropping Dropping Dropping
AF23
AF22
AF21
Packets Packets Packets
Drop All
AF23
Packets
Drop All
AF22
Packets
Drop All
AF21
Packets
Max Queue Length
(Tail Drop Everything)
163
The default DSCP-based WRED conguration can be enabled using the dscp-based
keyword of the random-detect command, as shown in Example 6-2.
Example 6-2 DSCP-Based WRED Policy Map
class class-default
fair-queue
random-detect dscp-based enables (RFC 2597) DSCP-based WRED
As with WRED, DSCP-based WRED thresholds and mark probability denominators are
tunable on a per-codepoint basis. In Example 6-3, the minimum threshold is set to begin
dropping AF11-marked packets at 5 (that is, as soon as the queue depth reaches ve packets,
WRED will randomly begin dropping AF11 packets). The maximum threshold for AF11
(at which all AF11-marked packets will be dropped) is set to 20 packets in Example 6-3.
The mark probability denominator is set to 8 (meaning that, between these two thresholds,
up to 1 in 8 packets marked with AF11 will be dropped, and at the maximum threshold of
20, exactly 1 in 8 packets will be droppedabove the maximum threshold of 20, all packets
marked with AF11 will be dropped).
Example 6-3 DSCP-Based WRED Conguration Dropping AF11 packets
Router(config)#policy-map DSCP-WRED
Router(config-pmap)#class class-default
Router(config-pmap-c)#random-detect
random-detect dscp af11 5 20 8
ECN-Capable Transport (ECT) bitThis bit indicates whether the device supports
ECN.
Congestion Experienced (CE) bitThis bit (in conjunction with the ECT bit)
indicates whether congestion was experienced en route.
Figure 6-4 shows the location of the ECN bits in the TOS byte of an IP packet header.
164
Figure 6-4
Version
Length
Len
ID
Offset
TTL
Proto
FCS
IP SA
IP DA
Data
IPv4 Packet
7
ECT CE
ECT Bit:
ECN-Capable Transport
CE Bit:
Congestion Experienced
During periods of congestion, WRED (and DSCP-based WRED) drops packets when the
average queue length exceeds a specic threshold value. ECN is an extension to WRED, in
that ECN marks packets instead of dropping them, to communicate the existence of congestion when the average queue length exceeds a specic threshold value. Routers congured with the WRED ECN feature, introduced in Cisco IOS Software Release 12.2(8)T, use
this marking as a signal that the network is congested. This way, TCP transmission rates
can be controlled without dropping packets, or at least with dropping far fewer packets.
Table 6-1 lists the ECN bit combinations and their meanings.
Table 6-1 ECN Bit Combinations
ECT Bit
CE Bit
Combination Indicates
Not ECN-capable
Congestion experienced
The ECN eld combination 00 indicates that a packet is not using ECN.
The ECN eld combination 11 indicates congestion to the endpoints. Packets arriving
into a full queue of a router are dropped.
The ECN eld combinations 01 and 10, which are 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 treat these two eld combinations identically.
Data senders can use either or both of these combinations.
165
WRED ECN takes the following actions, depending on the ECN bit settings:
If the number of packets in the queue is below the minimum threshold, packets are
transmitted. This happens whether or not ECN is enabled. This treatment is identical
to the treatment that a packet receives when only WRED 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 the following three scenarios can occur:
If the ECN eld 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 be dropped based on the drop probability, the ECT and CE
bits for the packet are changed to 1 and the packet is transmitted. This happens
because ECN is enabled, and the packet gets marked instead of dropped.
If the ECN eld 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 can
be dropped based on the WRED drop probability. This is the identical
treatment that a packet receives when WRED is enabled without ECN
congured on the router.
If the ECN eld on the packet indicates that the network is experiencing
congestion (that is, both the ECT bit and the CE bit are set to 1), the packet
is transmitted. No further marking is required.
If the number of packets in the queue is above the maximum threshold, all packets are
dropped and the drop probability is 1. This is the identical treatment that a packet
receives when WRED is enabled without ECN congured on the router, and the
packet ow exceeds its maximum threshold.
WRED ECN is enabled with the ecn keyword on the random-detect command. WRED
ECN cannot be enabled by itself and must be used in conjunction with WRED or DSCPbased WRED (as is shown in Example 6-4).
Example 6-4 WRED-ECN Policy Map Example
Router#sh run
class class-default
fair-queue
random-detect dscp-based
random-detect ecn enables (RFC 3168) ECN-based WRED
166
Summary
Congestion-avoidance tools such as WRED variations and ECN were overviewed in this
chapter.
WRED is used to drop packets randomly (based on congured parameters that control the
drop probabilities) from a TCP session in the network to optimize bandwidth utilization of
TCP trafc. The global synchronization problem of unguarded TCP sessions was
discussed, and the chapter showed how WRED can be used to combat this behavior.
ECN is a newer congestion-avoidance tool, and its operation and conguration was
discussed briey.
Further Reading
DiffServ Standards Relating to WRED
This chapter discusses link-specic QoS tools needed on links of a specic type such as
Frame Relay or MLP, including the following topics:
CHAPTER
Link-Specic Tools
Link-specic tools refer to mechanisms that are enabled in a point-to-point manner on both
ends of WAN links. These tools combine Layer 2 and Layer 3 features in their functionality.
This chapter covers two types of link-specic tools:
The link-specic tools frequently are categorized as QoS tools because they often are used
in conjunction with other QoS techniques, as discussed in this chapter. However, both tools
have application outside the realm of QoS and were developed originally as generic Cisco
IOS Software features, not specically as QoS tools. This chapter limits the discussion to
how these techniques are applied to improve the QoS of the network.
The rst half of this chapter looks at header-compression techniques, which are a suite of
features that reduce the size of the IP packet header. For large data packets, the ratio of the
header bytes to the payload bytes is usually not signicant, and header compression is
seldom a compelling feature. But for short voice packets, the IP (and UDP and RTP)
headers can triple the size of the packet and, therefore, the bandwidth required for a voice
call. These extra bytes also contribute to increased delay, so reducing the size of the header
can provide signicant savings. Although the focus of the following sections is on RTP
header compression, these sections also examine dependencies that this feature has on
related features, such as TCP header compression.
The last half of the chapter explores Link Fragmentation and Interleaving. On links of
768 kbps or higher, this technique has little to no value. However, on slow WAN links,
transmitting a 1500-byte data packet can take long enough that it incurs undue delay in a
voice packet that waits behind it to be transmitted. In these situations, it makes sense to
divide the data packet into smaller segments so that a small voice packet can be interleaved
in between the segments of a large data packet. This bounds the delay incurred on a voice
packet.
170
Header-Compression Techniques
One of the key drivers to many VoIP deployments is the nancially attractive bandwidth
savings they deliver. For example, a regular TDM voice call requires a xed allocation
of 64 kbps of bandwidth, whereas a comparable quality VoIP call can be reduced to
approximately 12 kbps. Two types of compression are performed on voice packets to
achieve such bandwidth reductions:
G.729 voice compression enables a 64-kbps TDM voice call to be reduced to 8 kbpsa
savings of a factor of 8. The compressed speech samples are carried in VoIP using RTP
packets with 20 bytes of payload per packet (by default). RTP header compression (cRTP)
is a method for making RTP packet headers smaller so that VoIP bandwidth is used more
efciently. cRTP compresses the 40-byte IP/UDP/RTP header of a VoIP packet down to 2
to 5 bytes per packet. This reduces the L3 bandwidth required for a G.729 VoIP call to less
than 12 kbps, as illustrated in Figure 7-1.
Figure 7-1
V=2
CC
PT
Sequence Number
Timestamp
RTP Header:
12 Bytes
Version
Source Port
Destination Port
Length
Checksum
IHL
Type of Service
Identification
Time-To-Live
Total Length
Flags
Protocol
Fragment Offset
Header Checksum
Source Address
Destination Address
Options
UDP Header:
8 Bytes
Padding
IP Header:
20 Bytes
Header-Compression Techniques
171
Related Standards
Header-compression techniques are described by several standards. The rst headercompression scheme was developed by Van Jacobson to compress IP/TCP headers over
slow-speed serial links. An improvement to this method was offered by the IP header
compression (IPHC) scheme, with an RTP compression extension designed to handle any
IP packet. The most recent addition to the header-compression portfolio is robust header
compression (ROHC), which is a scheme designed for unreliable, high-latency mobile links,
in which bandwidth is very scarce and the links are prone to error (cRTP over satellite
links, a Cisco IOS 12.3[2]T feature, is based on the ROHC compression scheme).
The various IETF RFCs pertaining to header-compression techniques are listed here:
This is the framework and four proles: RTP, UDP, ESP, and uncompressed. There is also
a Frame Relay standard that describes the use of cRTP on Frame Relay PVCs: FRF.20:
Frame Relay IP Header Compression Implementation Agreement. This standard describes
how IP packets compressed by cRTP should be represented in the Frame Relay frame that
transports them.
172
service on links slower than about 128 kbps becomes unpractical. Even with cRTP, care
must be taken in the network design that acceptable voice quality can be maintained.
cRTP has the following QoS network design implications:
It changes the packet header and, therefore, must be decompressed before routing can
take place. This makes cRTP a hop-by-hop protocol, with decompression and
recompression occurring in every routing node in which the feature is enabled.
It changes the bandwidth required for a voice call and, therefore, affects provisioning
and engineering of queuing, policing, shaping, and call admission control policies.
Because cRTP essentially suppresses the Layer 3 and higher headers, it can be used only
on point-to-point Layer 2 connections or links; it cannot be used on broadcast media such
as Ethernet and cable, where reading the packet header is critical for the destination node
to recognize that it is the intended recipient of the frame. Although the RFCs describe the
actual algorithms that header compression protocols use, the protocols are not as much
compression protocols as they are suppression protocols. For example, cRTP works by
keeping the header context (for example, the current values of all the elds in the header)
in both the sender and receiver nodes memory. Compression is based on the principle that
few elds (other than sequence numbers) in the headers change in subsequent packets that
belong to the same ow. cRTP simply omits the transmission of header elds that have not
changed, transmitting instead a reference number or pointer so that the receiving node can
index its memory to nd the actual values of header elds.
During a voice conversation, cRTP does not compress all packets. When the RTP stream
starts up, a few packets have full headers until the compression contexts between the sender
and receiver are established. After that, all packets should be compressed. A full header in
the middle of a conversation is very rare but could be triggered by events such as these:
Header-Compression Techniques
173
Compression Formats
The compression formats that cRTP uses have changed over the years. To achieve backward
compatibility, these are implemented as different options on the interface command, as
follows:
ip rtp header-compression [passive | iphc-format | ietf-format] [periodic-refresh]
The passive option means that the software waits until it receives a compressed packet
before engaging header compression on outgoing RTP packets. This is a legacy command
from the Serial Line IP (SLIP) protocol and is used mainly for dialer situations. PPP
negotiates the use of header-compression regardless of whether the passive option is used.
NOTE
The use of the passive keyword with PPP as the underlying L2 protocol recently has been
disabled to prevent confusion.
The IPHC and IETF formats are discussed in the following sections. The periodic-refresh
option was introduced in Cisco IOS 12.3(2)T Software as part of the robust cRTP over
satellite links feature. It allows a full header to be resent periodically (congurable) to
ensure that compression continues to function over high-loss links.
174
However, use of class-based cRTP within the MQC construct can achieve the decoupling
of cTCP and cRTP. This is discussed with additional details later in this chapter. IPHC
format compresses all TCP and UDP packets. Packets that match RTP criteria are compressed using the compressed RTP format, while other packets are compressed using the
compressed non-TCP format. The compressed UDP format is used to compress only RTP
packets that do not t into the compressed RTP template. These formats, and the differences
between them, are discussed in RFCs 2507 and 2508, as follows:
IETF Format
The initial Cisco IOS Software implementations of RFCs 2508 and 2509 were not in perfect
compliance with the standards. IETF format, the most recently introduced option (Cisco
IOS 12.3[2]T) for cRTP, attempts to address all of these incompatibilities and to match the
RFCs as closely as possible. In IETF format, as with IPHC format, cTCP and cRTP are
inseparable for PPP links. All TCP and UDP packets are compressed, but only packets recognized as RTP are compressed using the more efcient compressed RTP format. However,
the restriction of recognizing only RTP streams on certain port ranges for compression
has been removed, and cRTP uses any even port over 1024 when the ietf-format keyword
is used.
Header-Compression Techniques
175
The RFCs tend to discuss only PPP links, yet cRTP is supported over point-to-point links
with HDLC, PPP, Frame Relay, and ATM encapsulations. The implementations over Frame
Relay and HDLC are proprietary, while those over PPP are standards compliant with the
RFCs discussed previously. cRTP on ATM is supported only via PPP or MLP over ATM
(PPPoA or MLPoATM, respectively).
As mentioned earlier, cRTP cannot be supported on broadcast Layer 2 media such as
Ethernet or cable. cRTP works only on point-to-point connections in which there is a single
possible destination for the packet.
The following sections provide additional details about the implementation of cRTP on
each of the link encapsulation types where it is supported.
HDLC
cRTP is implemented over HDLC links in its proprietary version; HDLC itself is a Ciscoproprietary protocol. Cisco format compression is the default, yet IPHC format also is
supported within the CLI. Because the cRTP implementation over HDLC is proprietary,
cTCP and cRTP can be controlled independently (for instance, the implementation does not
have to conform to RFC 2509).On HDLC links, header compression is congured on the
interface using these commands:
ip
ip
ip
ip
tcp
rtp
tcp
rtp
The rst two commands turn on cTCP and cRTP, respectively, as discussed earlier. The
compression-connections commands state the maximum number of cTCP or cRTP
sessions that are possible over this link. It is important for this number to match on both
sides of the link, and it should be congured carefully because this governs the amount of
memory set aside to keep the session contexts to compress/decompress the headers. The
defaults and supported ranges have changed over time, so check the Cisco IOS
documentation for the software release that you are running for the correct values.
PPP
The default cRTP format for PPP is IPHC format. PPP negotiates the use of header compression regardless of whether the passive option is used (additionally, the use of passive
with PPP recently has been disabled, to prevent confusion). For IPHC format and IETF
format, turning on either cTCP or cRTP automatically also enables the other type.
On PPP links, header compression is congured at the interface using the same commands
as given previously for HDLC.
176
ATM
cRTP is not supported over native ATM because no standard describes such an implementation. However, a new feature in Cisco IOS 12.2(2)T introduced cRTP over ATM through
PPP over ATM (PPPoATM) and MLP over ATM (MLPoATM). The initial feature release
applied to general ATM interfaces; DSL interface support for this feature followed in
Release 12.3(2)T. cRTP over ATM is congured through PPP using a virtual template. Virtual templates frequently are used with PPP and MLP congurations. They provide a way
to specify a template conguration only once and then apply that template to multiple links,
virtual circuits, or interfaces. This simplies the maintenance of the conguration if there
are many links with similar characteristics.
Any of the congurations given in Example 7-1 can be used for cRTP over ATM links.
Example 7-1 cRTP Conguration for ATM Links
Router#sh run
interface ATM6/1.1 point-to-point
pvc 0/50
encapsulation aal5mux ppp Virtual-Template1
or
interface ATM6/1.1 point-to-point
pvc 0/50
encapsulation aal5snap
protocol ppp Virtual-Template1
or
interface ATM6/1.1 point-to-point
pvc 0/50
encapsulation aal5ciscoppp Virtual-Template1
Coupled with:
!
interface Virtual-Template1
bandwidth 768
ip address 10.200.60.1 255.255.255.252
ip rtp header-compression [passive | iphc-format | ietf-format] [periodic-refresh]
The cRTP conguration (the highlighted text in the example) is the general cRTP command
discussed in an earlier section. Here is it specied within the template Virtual-Template1,
which is, in turn, applied to the ATM PVCs in the example.
Frame Relay
cRTP has been supported on Frame Relay links since the mid-1990s because this
encapsulation is used so frequently on slow-speed access links to remote ofces. The use
of cRTP on Frame Relay has only more recently been standardized as FRF.20 (June 2001).
The implementation of cRTP on Cisco Frame Relay PVCs is currently still proprietary and
will remain so until Cisco implements FRF.20. The current implementation is very close to
the FRF.20 standard but is not exactly the same. cRTP is not supported on IETF PVCs
Header-Compression Techniques
177
because this support will require FRF.20 compliance. The fact that this is currently a
proprietary implementation also means that cTCP and cRTP can be controlled
independently.
cRTP on PPP over Frame Relay (PPPoFR) and MLP over Frame Relay (MLPoFR) are
standards compliant; this is the same as with the PPP implementations discussed earlier in
this chapter. Therefore, cRTP on PPPoFR is supported on both Cisco and IETF PVCs. If a
standards-compliant implementation of cRTP on Frame Relay is required for a network
design, this form of cRTP should be used.
Although there are many ways to congure cRTP on Frame Relay links, the most common
method is shown in Example 7-2.
Example 7-2 Common cRTP Conguration
Router#sh run
interface Serial 2/0
encapsulation frame-relay
!
interface Serial 2/0.100 point-to-point
encapsulation frame-relay
ip address 192.168.0.1 255.255.255.0
frame-relay interface-dlci 100
frame-relay ip rtp header-compression
The format of the cRTP command is different for Frame Relay than the commands discussed previously. The options on this command include only the passive and periodicrefresh parameters. As discussed earlier, the IETF format of cRTP does not apply to Frame
Relay links.
178
Switching Path
Encapsulation
TCP
Original
RTP
Original
IPHC
Format
IETF
Format
Process
Fast
CEF
dCEF
HDLC
Yes
Yes
Yes
12.3.2T
Yes
Yes
Yes
12.1.5T
PPP
Yes
Yes
12.3.2T
Yes
Yes
Yes
12.1.5T
MLPPP
Yes
Yes
12.3.2T
Yes
Yes
Yes
12.1.5T
Frame Relay
Yes
Yes
Yes
Yes
12.1.5T
PPPoFR
Yes
Yes
12.3.2T
Yes
Yes
Yes
12.2.2T
MLPoFR
Yes
Yes
12.3.2T
Yes
Yes
Yes
12.2.2T
PPPoATM
Yes
Yes
12.3.2T
Yes
Yes
Yes
12.2.2T
MLPoATM
Yes
Yes
12.3.2T
Yes
Yes
Yes
12.2.2T
Yes
Header-Compression Techniques
179
On RFC-compliant software, if cRTP is activated on a certain class of trafc within a service policy, both cTCP and cRTP are applied for the class of trafc (based on the standards
discussed previously in this chapter). However, because TCP and RTP trafc are separated
out into different classes by the classication criteria, usually no TCP trafc is present in
the class where cRTP is enabled. Conversely, there is typically no RTP trafc in a TCP trafc class. Therefore, cRTP effectively can be decoupled from cTCP within the MQC syntax
structure. Such decoupling of the automatic enabling of cTCP whenever cRTP is activated
often is desired for these reasons:
Data trafc is not real-time sensitive, and header compression does not provide signicant
savings on packets with large payloads. Therefore, cTCP provides negligible packettransmission performance improvements. The match criteria within the class maps determine what trafc is given to the compressor. Decompression, on the other hand, is not controlled by class maps; cRTP decompresses all packets that arrive compressed from the other
side of the link.
The default mode for cRTP inside an MQC class is IPHC format for all encapsulations that
support it, including ATM, PPP, and HDLC. For Frame Relay links, in which IPHC format
is unavailable, the original (Cisco proprietary) format is used as the default. Example 7-4
shows a cRTP conguration inside an MQC class.
Example 7-4 MQC-Based cRTP Conguration
Router#sh run
policy-map CB-CRTP
class VOIP
compression header ip rtp
priority 200
class class-default
fair-queue
In a similar manner, compression header ip tcp can be used for a data trafc class.
The interface conguration for enabling header compression is mutually exclusive with
class-based cRTP. The IPHC format and passive options are autocongured based on the
interface encapsulation and do not appear as being congurable, as shown in Example 7-5.
The number of concurrent connections also is autocongured and calculated based on the
sum of the bandwidths allocated to the classes that have header compression congured
(one connection per 4 kbps of bandwidth available). This must be the same on both ends of
the link.
180
Tunnels
Although cRTP is an action that works on Layer 3 headers and up, it can be viewed as a
Layer 2 function because it is applied to the packet just before it exits the egress interface.
Therefore, when tunnel congurations (for example, GRE, MPLS, and IPSec) are used,
cRTP ceases to work. (The feature can be congured, but the packets no longer are compressed.) This is because cRTP sees the packet just before it is transmitted on the egress
interface, after the tunnel IP headers have been applied. The cRTP compressor no longer
can recognize the encapsulated packet as an RTP packet and, thus, does not compress it.
RSVP
RSVP is a Layer 3 bandwidth-reservation protocol and generally acts on the Layer 3 packet
size and bandwidth requirements. Therefore, if cRTP is used on a specic voice stream and
RSVP is used to provide the call admission control for that same stream, an over-reservation
of bandwidth will be made for the call because, until recently, RSVP did not take the
bandwidth savings afforded by cRTP into account in its reservations.
As of Cisco IOS Software Release 12.2(15)T, a feedback mechanism between cRTP and
RSVP has been implemented so that RSVP is cognizant of cRTP and adjusts its
reservations appropriately.
RSVP and call admission control technologies are covered in Chapter 8, Bandwidth
Reservation, and Chapter 9, Call Admission Control (CAC).
181
Hardware Compression
cRTP is supported only on Cisco PVCs, not on IETF PVCs (unless PPPoFR/MLPoFR is
used). Until Cisco IOS Software Release 12.1(5)T, Frame Relay hardware compression
(FRF.9) was supported on only IETF PVCs, making it difcult to use the optimal compression for all trafc, which is FRF.9 STAC (STAC is the name of the company that rst wrote
the algorithm) for data trafc and cRTP for voice. As of 12.1(5)T, FRF.9 hardware compression also is allowed on Cisco PVCs. Under such a conguration, voice trafc bypasses the
STAC compressor and is compressed by a combination of cRTP and the codec, providing
better compression ratios for voice trafc than STAC compression would.
Performance
Compression techniques, such as cRTP, minimize bandwidth requirements and are highly
useful on slow-speed links. Because of the additional CPU loads these compression
techniques require, they need to be used with caution, especially on WAN aggregation
routers that attach to many remote sites.
In Cisco IOS 12.0, 12.0T, and 12.1 Software, cRTP was process-switched, which rendered
it practically unusable for real networks. In several Cisco IOS releases, between 12.0(7)T
and 12.1(2)T, cRTP was implemented in the fast and Cisco Express Forwarding (CEF)
paths, which dramatically improved its scalability. Nonetheless, cRTP remains one of the
most CPU-intensive QoS features and should be enabled with a careful eye on CPU levels,
especially on large-scale WAN aggregation routers.
Performance is affected positively by the support of class-based cRTP because the trafc
that is compressed now can be ltered more granularly than before. Furthermore, with
class-based cRTP, cTCP use can be avoided, further improving processing efciency.
When the CPU of the node-compressing RTP trafc runs at reasonable levels (for instance,
the target 70 percent), cRTP does not impact delay or voice quality in any adverse manner.
182
arrives at the egress interface just before a voice packet does and, therefore, has started
transmission already, causing the voice packets to have to wait until the interface becomes
free before being transmitted itself. Sophisticated queuing techniques such as LLQ do not
help for this problem because this is the result of serialization delay or the elapsed time that
it takes to transmit a packet on the interface. Any subsequent packet must wait for the
interface to become free before starting its own transmission.
Figure 7-2
Without LFI
VoIP Packet
With LFI
Data
Fragment
60 byte
Voice
Data Fragment
VoIP Packet
Data Fragment
LFI tools work at Layer 2 and operate on packets that already have exited the Layer 3 queuing subsystem (LLQ/CBWFQ). As mentioned in Chapter 5, Congestion-Management
Tools, on PPP links, only packets that are not assigned to the PQ of LLQ are fragmented.
This presents an important constraint when provisioning for voice and interactive video on
slow-speed links: Because large video packets assigned to the PQ of the LLQ algorithm are
not fragmented and easily could destroy voice quality, it is not recommended to provision
both voice and interactive video through LLQs on slow-speed links (for instance, those less
than 768 kbps).
Table 7-2 shows the serialization delays of various packet sizes on different link speeds.
Although maximum transmission unit (MTU) size constraints theoretically can be used to
achieve the same purpose as LFI, this is seldom practical because MTU size settings affect
Layer 3 packets and are therefore visible to the end systems. Many end-user server and
desktop applications do not handle MTU size changes elegantly, and even if they do, it is
impractical to change the MTU size on all the servers and user applications in the network.
183
64
Bytes
128
Bytes
256
Bytes
512
Bytes
1024
Bytes
1500
Bytes
56 kbps
143 s
9 ms
18 ms
36 ms
72 ms
144 ms
214 ms
64 kbps
125 s
8 ms
16 ms
32 ms
64 ms
128 ms
187 ms
128 kbps
62.5 s
4 ms
8 ms
16 ms
32 ms
64 ms
93 ms
256 kbps
31 s
2 ms
4 ms
8 ms
16 ms
32 ms
46 ms
512 kbps
15.5 s
1 ms
2 ms
4 ms
8 ms
16 ms
23 ms
768 kbps
10 s
640 s
1.28 ms
2.56 ms
5.1 ms
10.2 ms
15 ms
1536 kbps
5 s
320 s
640 s
1.28 ms
2.56 ms
5.12 ms
7.5 ms
Layer 2 LFI mechanisms are transparent to the Layer 3 IP applications, performing LFI
within the network infrastructure only where necessary. Layer 3 packets are reassembled at
the Layer 2 media edges (requiring LFI), and end systems see normal 1500-byte IP packets.
Fragment Sizes
As a general guideline, a per-hop serialization delay target within the enterprise is smaller
than or equal to 10 ms. Within an SP context, this target might be even tighter.
The following formula can be used to determine the maximum fragment size (in bytes) for
a given jitter target and link speed:
Fragment Size = (Maximum Allowed Jitter in milliseconds [typically 10 ms]) (Link
Speed in kbps) /8
Alternatively, Table 7-3 shows the recommended fragment sizes to achieve a 10-ms
maximum serialization delay for different speed links.
The 768-kbps value to determine when LFI tools are required on a link is derived from the
preceding formula. However, all resulting fragment sizes that are larger than the MTU of
Ethernet (1500 bytes) are shaded in Table 7-3, indicating that no explicit LFI tool is needed
to achieve the 10-ms serialization delay target in the given scenario.
184
10 ms
56 kbps
70 bytes
64 kbps
80 bytes
128 kbps
160 bytes
256 kbps
320 bytes
512 kbps
640 bytes
768 kbps
960 bytes
1536 kbps
1920 bytes*
When conguring MLP LFI, the only parameter needed is the maximum serialization delay
in milliseconds, which is recommended to be set to 10 ms. The software automatically
calculates the fragment sizes. A sample MLP LFI conguration is shown in Example 7-6.
Example 7-6 MLP LFI Conguration
Router#sh run
interface Multilink1
description 768kbps Leased-Line to RBR-3745-Left
ip address 10.1.112.1 255.255.255.252
ppp multilink
ppp multilink fragment delay 10
ppp multilink interleave
ppp multilink group 1
!
!
interface Serial1/0
bandwidth 786
no ip address
encapsulation ppp
load-interval 30
ppp multilink
ppp multilink group 1
!
185
The ppp multilink fragment-delay 10 command instructs the Cisco IOS Software to
fragment so that no more than 10-ms delay results. The software calculates the appropriate
fragment size (in bytes) automatically. It is important to add the ppp multilink interleave
statement as well. Although this is a separate command, doing fragmentation without
turning on interleaving has no QoS benet. Both features must be turned on to achieve
the desired operation.
Frame-Relay Fragmentation
Frame-Relay fragmentation, which is dened as FRF.12 for VoIP, operates in a manner very
similar to that of MLP LFI. One important exception, however, is that the conguration of
FRF.12 requires the maximum fragment size to be calculated beforehand and supplied as a
parameter to the command.
186
The following sections discuss several topics that are important to keep in mind when
conguring fragmentation:
!
map-class frame-relay FR-MAP-CLASS-768
frame-relay fragment 960
Unlike the fragmentation command for PPP that was discussed in an earlier section, the
frame-relay command expects a byte count as the argument, given as 960 bytes in
Example 7-8. Therefore, it is up to the system administrator to calculate the appropriate
fragment length to achieve a delay that does not exceed 10 ms. Use the information given
in Table 7-3 for this calculation. Also, on Frame Relay links, the frame-relay fragment
187
NOTE
For ATM, only the PVC that carries combined voice and data trafc on the same VC needs
to be fragmented. ATM inherently interleaves cells from different PVCs, regardless of what
payload they contain.
A common misconception holds that FRF.12 fragmentation is used to support Voice over
Frame Relay (VoFR), and there is a general unawareness that FRF.11 also species a fragmentation scheme. This causes some misunderstandings about fragmentation for VoFR and
188
VoIPoFR regarding when and how these two voice technologies can be used in the same
network:
FRF.11 and FRF.12 can run on the same PVCThis is not true. PVC runs either
FRF.11 or FRF.12, never both. They are mutually exclusive.
If the PVC is congured for VoFR, it uses FRF.11. If fragmentation is turned
on for this PVC, it uses FRF.11 Annex-C (or the Cisco derivative of this) for
the fragmentation headers.
If the PVC is not congured for VoFR, it uses FRF.3.1 data encapsulation.
If fragmentation is turned on for this PVC, it uses FRF.12 for the
fragmentation headers. Because VoIP is a Layer 3 technology, which is
transparent to Layer 2 Frame Relay, PVCs carrying VoIP use FRF.12
fragmentation.
FRF.12 is used for VoFRThis is partly true. FRF.12 predominantly is used for
VoIP. FRF.12 in a VoFR conguration is used only to fragment data PVCs that share
an interface with a VoFR PVC. FRF.12 never is used on a VoFR PVC itself.
The fragmentation scheme/standard being used does not matter from a CLI point of view.
In all cases, the map class command frame-relay fragment xxx is used. The software
automatically uses the appropriate fragment header type, based on how the DLCI is
congured. However, the fragmentation scheme/standard being used does matter to the
voice network design:
VoIP and VoFR can be supported on different PVCs on the same interface when
fragmentation is required.
VoIP and VoFR cannot be supported on the same PVC if the speed is such that
fragmentation is required. (VoFR will be ne, but VoIP voice quality will be impaired
because VoIP packets cannot be interleaved between fragments of large data packets.)
FRF.12 (VoIP) fragments voice packets if the fragmentation size is set smaller than the
voice packet size; FRF.11 Annex-C (VoFR) does not fragment voice, no matter what
fragmentation size is congured.
Essentially, FRF.5 is a tunneling protocol, encapsulating an intact Frame Relay frame into
ATM cells and producing an unchanged Frame Relay frame again on the far side of the
network. FRF.8, on the other hand, is a true conversion of the payload of the Frame Relay
frame into the payload of an ATM cell, and it delivers ATM on the far side of the network.
189
Although FRF.5 is not widely used, it can support FRF.12 because the Frame Relay frame
never is changed or disturbed; it merely is encapsulated or tunneled across ATM.
With FRF.8 interworking, a much more common method in backbone networks, FRF.12
cannot be used because there is no means of converting that to an equivalent ATM scheme.
The only way that LFI can be supported end-to-end on Frame Relay/ATM networks using
FRF.8 is to use MLPoFR and MLPoATM and to use MLP LFI over both segments of the
network.
FRF.8 service interworking is a Frame Relay Forum standard for connecting Frame Relay
networks with ATM networks. Service interworking provides a standards-based solution
for service providers, enterprises, and end users. In service interworking translation mode,
Frame Relay PVCs are mapped to ATM PVCs without the need for symmetric topologies;
the paths can terminate on the ATM side. FRF.8 supports two modes of operation of the
interworking function for upper-layer user protocol encapsulation:
Transparent modeDoes not map encapsulations, but sends them unaltered. This
mode is used when translation is impractical because encapsulation methods do not
conform to the supported standards for service interworking.
MLP for LFI on ATM and Frame Relay service interworking networks is supported for
transparent-mode VCs and translational-mode VCs that support PPP translation (FRF 8.1).
To make MLPoFR and MLPoATM interworking possible, the interworking switch must be
congured in transparent mode, and the end routers must be capable of recognizing both
MLPoFR and MLPoATM headers. This is enabled with the frame-relay interface-dlci
dlci ppp and protocol ppp commands for Frame Relay and ATM, respectively.
When a frame is sent from the Frame Relay side of a connection from ATM to Frame Relay
service interworking, the following should happen to make interworking possible:
The receiving router examines the header of the received packet. If the rst 2 bytes of
the received packet are 0x03cf, it treats it as a legal MLPoATM packet and sends it to
the MLP layer for further processing.
In transparent mode, the carrier switch strips off the 2-byte Frame Relay DLCI eld
and sends the rest of the packet to its ATM interface.
When an ATM cell is sent from the ATM side of an ATM to the Frame Relay service
interworking connection, the following should happen to make interworking possible:
190
The receiving router examines the header of the received packet. If the rst 4 bytes
after the 2-byte DLCI eld of the received packet are 0xfefe03cf, it treats it as a legal
MLPoFR packet and sends it to the MLP layer for further processing.
A new standard for ATM to Frame Relay service interworking, FRF.8.1, supports MLP over
ATM and Frame Relay service interworking, but it can be years before all switches are
updated to the new standard.
IPSec Prefragmentation
A feature called prefragmentation for IPSec VPNs was introduced in Cisco IOS Software
Release 12.2(13)T. This often mistakenly is thought to be an LFI feature, but, strictly
speaking, it is not. It does not do LFI, as discussed in this chapter, and its purpose is not to
contain delay of high-priority packets held up behind lower-priority packets on slow-speed
links.
The prefragmentation for IPSec VPNs feature breaks up data packets into two segments.
This is done because a 1500-byte IP packet exceeds the 1500-byte MTU size of the network
when IPSec headers are added onto it, and packets exceeding the MTU size typically are
dropped. This can be xed by setting the application MTU size to 1400 bytes (or less).
However, as explained earlier, changing MTU sizes in a network is cumbersome, at best,
and generally difcult to manage. Therefore, this feature was developed to automatically
segment IPSec frames of more than 1500 bytes into two so that MTU sizes do not need to
be adjusted on the end-host applications to be usable over an IPSec VPN.
As mentioned before, this feature is not to be considered a QoS mechanism for serialization
reduction and tuning purposes. A similar feature for cable/DSL links (typically a voice
VPN), called adjusted maximum segment size, can be turned on with the command ip tcp
adjust-mss. It is recommended that this be congured to 542 on both the outside and inside
interfaces of a cable or DSL device.
Summary
This chapter covered the link-specic tools header compression (cRTP) and Link Fragmentation and Interleaving (LFI). The former typically is used to contain bandwidth use on lowspeed links, while the latter is used to segment large data packets so that a small voice packet
does not have to wait excessively long for the interface to free up.
The different standards governing header compression were discussed, along with the
dependencies among the various mechanisms and the commands to turn on the feature for
different types of link encapsulations.
The last half of the chapter discussed LFI mechanisms for Frame Relay, PPP, and ATM
links. It also covered how to apply LFI for networks in which both Frame Relay and
ATM exist and how translations between the two are done by a carrier network.
Further Reading
191
Further Reading
General
Conguring broadband access: PPP and routed bridge encapsulation conguring PPP
over ATM: http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122cgcr/fwan_c/wcfppp.htm.
Enhanced voice and QoS for ADSL and G.SHDSL (12.3.2T): http://www.cisco.com/
univercd/cc/td/doc/product/software/ios123/123newft/123t/123t_2/gtevqos.htm.
IETF Standards
RFC 3095, Robust Header Compression (ROHC): Framework and Four Proles:
RTP, UDP, ESP, and Uncompressed:
http://wwwin-eng.cisco.com/RFC/RFC/rfc3095.txt.
192
Header Compression
Express RTP and TCP header compression (Cisco IOS Software Release 12.0.7T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/
120t7/rtpfast.htm.
Class-based RTP and TCP header compression (Cisco IOS Software Release
12.2.13T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t13/fthdrcmp.htm.
RSVP support for RTP header compression (Cisco IOS Software Release 12.2.15T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t15/ftrsvpcf.htm.
RTP header compression over satellite links (Cisco IOS Software Release 12.3.2T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123newft/123t/
123t_2/ftcrtprf.htm.
MLP interleaving and queuing for real-time trafc (Cisco IOS Software Release 12.0):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/12cgcr/
dial_c/dcppp.htm#4550.
Further Reading
193
FRF.12 support on switched Frame Relay PVCs (Cisco IOS Software Release 12.1.2T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/
121t2/dtfragsw.htm.
Link Fragmentation and Interleaving for Frame Relay and ATM virtual circuits (Cisco
IOS Software Release 12.1.5T): http://www.cisco.com/univercd/cc/td/doc/product/
software/ios121/121newft/121t/121t5/dtlfra.htm.
Frame Relay fragmentation with hardware compression (Cisco IOS Software Release
12.1.5T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/
121newft/121t/121t5/dtfrfwhc.htm.
Distributed Link Fragmentation and Interleaving for Frame Relay and ATM interfaces
(Cisco IOS Software Release 12.2.4T): http://www.cisco.com/univercd/cc/td/doc/
product/software/ios122/122newft/122t/122t4/ftdl.htm.
Distributed Link Fragmentation and Interleaving over leased lines (Cisco IOS
Software Release 12.2.8T): http://www.cisco.com/univercd/cc/td/doc/product/
software/ios122/122newft/122t/122t8/ftdl2.htm.
Frame Relay queuing and fragmentation at the interface (Cisco IOS Software Release
12.2.13T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t13/frfrintq.htm.
CHAPTER
Bandwidth Reservation
The QoS tools discussed so far in this book, including marking, queuing, policing, and
shaping mechanisms, primarily have been DiffServ tools. DiffServ mechanisms provide
bandwidth guarantees (at various level of rigidity), but none of them provides bandwidth
reservations. Guaranteed implies that the bandwidth will be there when needed, but it is
not set aside (or reserved) for a specic application or ow. Reserved, on the other hand,
implies that a ow of packets can be recognized and that a certain amount of bandwidth has
been agreed to be set aside for that ow.
Introduced in Cisco IOS Software Release 11.2, roughly coinciding with the date of many
of the relevant RFCs (summarized for reference at the end of this chapter), RSVP is one of
the oldest Cisco IOS QoS tools. The development and implementation of RSVP precede
the era of converged voice and data networks, yet the purpose of RSVP was always in line
with these later trends: to provide predictable latency and bandwidth guarantees for timesensitive applications. RFC 2205 denes RSVP as follows:
[RSVP is] a resource reservation setup protocol designed for an integrated services
Internet [RFC 1633]. The RSVP protocol is used by a host to request specic qualities
of service from the network for particular application data streams or ows. RSVP is
also used by routers to deliver quality-of-service (QoS) requests to all nodes along the
path(s) of the ows and to establish and maintain state to provide the requested service.
RSVP requests will generally result in resources being reserved in each node along
the data path.
RSVP differs from other QoS tools in the following ways:
It is a signaling protocol.
It reserves resources (bandwidth).
A full implementation requires all nodes in the network to do the following:
Understand the RSVP protocol
Implement a way to reserve resources on that node
196
RSVP Overview
RSVP is a per-ow protocol that requests a bandwidth reservation from every node in the
path of the ow. In its simplest form, RSVP is a unidirectional protocol, so if a bidirectional
reservation is required for a ow, both endpoints must initiate a request for a reservation.
Basic RSVP protocol operation is shown in Figure 8-1 and its conguration in Example 8-1.
The endpoints, or other network devices on behalf of the endpoints, send unicast signaling
messages to establish the reservation: An RSVP PATH message travels outbound requesting the reservation, and an RSVP RESV is returned conrming (or not) that the reservation
was established. The ow can be signaled by an end station (such as Endpoint B in Figure
8-1) or by a router (such as that on behalf of Endpoint A, which is not capable of RSVP
signaling). Every RSVP-enabled router in the path of the ow sees the PATH and RESV
messages and allocates the appropriate queue space for the given ow.
Figure 8-1
Non-RSVP
Capable
Endpoint A
PATH Message
PATH Message
PATH Message
RESV Message
RESV Message
RESV Message
RSVP
Capable
Endpoint B
It can make resource reservations for both unicast and multicast applications.
It is receiver oriented. (In other words, the receiver of a data ow initiates and
maintains the resource reservation used for that ow.)
It is not a routing protocol, but it depends on routing protocols to determine the path
of the ow.
RSVP Overview
197
Controlled Load
The controlled load service is described by RFC 2211. It provides the ow with soft QoS
(not mathematically bounded, which means that there is no quantitative measure that says
the QoS provided is within, as in a 50-ms delayinstead, it provides an approximate or
qualitative guarantee, which means that the QoS provided is at least as good as the packet
would have gotten otherwise), approximating the service that the same ow would receive
from an unloaded network. The controlled load service uses admission control to ensure
that the service is received even when the network element is overloaded. The controlled
load service includes no quantitative guarantees, and it can be thought of as simple priority
service with admission control. It allows applications to have low delay and high throughput even during times of congestion. For example, adaptive real-time applications, such as
playback of a recorded conference, can use this kind of service.
To ensure that these conditions are met, clients requesting controlled load service provide
the network nodes with an estimation of the data trafc they will generate, which is
described in the trafc specication (or TSpec). The TSpec is one of the parameters in the
RSVP request, as covered in Chapter 1, Introduction to QoS.
Guaranteed Load
The guaranteed load service is described in RFC 2212. It provides the ow with rm
bounds (mathematically provable, which means that explicit, measurable bounds on the
QoS provided to the packet are specied) on end-to-end delays by guaranteeing bandwidth.
Achieving a bounded delay requires that every node in the path supports guaranteed service
or adequately mimics guaranteed service. Guaranteed service allows applications to reserve
bandwidth to meet their requirements. Guaranteed service is invoked by specifying the
trafc (TSpec) and the desired service (RSpec) to the network.
Admission Control
In addition to providing bandwidth reservation to guarantee QoS for a ow, RSVP serves
another purpose of prime importance to real-time ows: call admission control (CAC).
DiffServ tools are highly capable of protecting voice from data (or video from data), but
they fall completely short at protecting voice from voice (or interactive video from
interactive video). For example, if only enough bandwidth is set aside in LLQ for two VoIP
calls, and a third call goes through, the quality of all three calls will deteriorate if only
DiffServ tools are used (without any CAC). However, if a bandwidth reservation is
198
requested before a ow is admitted onto the network, the originating node has the option to
redirect or reject the ow if the reservation fails (because of insufcient bandwidth
availability). To voice and interactive video trafc, the CAC functionality of RSVP is
arguably more critical than the bandwidth reservation functionality (which could be
engineered with DiffServ). CAC through RSVP is discussed in more depth in Chapter 9,
Call Admission Control (CAC).
RSVP
Traffic
Destined
for Interface
Classification
IP RTP
Priority
NonVoice
Flow
Reserved
Queues
Class
Priority
Scheduler
Class 1
Reserved
Queues
Class 2
Reserved
Queues
Class
Default
Reserved
Queues
Default
Unreserved
Queue
Output
199
In addition to having RSVP enabled on relevant interfaces, this feature requires that trafc
directed to the PQ of LLQ be identied. A built-in voice-like prole can be selected as an
option; in that case, any voice trafc generated by Cisco IOS devices automatically is
assigned to the LLQ. Additionally, this option directs voice trafc from RSVP-enabled
applications, such as Microsoft NetMeeting, to be assigned to the PQ within LLQ. Voicelike trafc means that the trafc ows adhere to certain given arrival rate and packet size
parameters that are derived from real voice ows.
To select the built-in voice-like prole for RSVP to classify trafc into the PQ of LLQ, use
the following command:
Router(config)#ip rsvp pq-profile voice-like
Router F
Router E
Router A
Router G
Router C
Router D
= PATH Messages
= RESV Messages
200
Scalability
Discussions about RSVP often are speckled by comments about scalability. Scalability
concerns around RSVP argue that it does not scale well because it keeps per-ow state in
every node, and because the PATH/RESV and refresh messages travel per ow between
every two nodes involved in the path to keep the entire path open and functioning correctly.
For this reason, various scalability enhancements have been introduced into the Cisco IOS
Software, including the following:
Control plane priorityEnsures that the RSVP control messages are not dropped or
unduly delayed, which would cause additional messaging to tear down the path and
re-establish it
RSVP-DiffServ Integration
RSVP-DiffServ integration provides a translation between RSVP and DiffServ technologies that is intended to leverage the strengths of each model. RSVP is used for bandwidth
reservation at the edge of the network (where there are fewer ows and the most bandwidth
constraints), but DiffServ is used over the backbone network so that the backbone routers
do not have to keep per-ow states. This topology is shown in Figure 8-4.
Figure 8-4
RSVP-DiffServ Integration
Enterprise
RSVP (IntServ) Domain
SP DiffServ
Backbone
Enterprise
RSVP (IntServ) Domain
Enterprise
RSVP (IntServ) Domain
Enterprise
RSVP (IntServ) Domain
V
Enterprise
RSVP (IntServ) Domain
RSVP installed
on interface.
Further Reading
201
Summary
This chapter covered RSVP as one of the key IntServ mechanisms in a QoS toolset that is
largely DiffServ oriented. RSVP provides a per-ow specication of QoS through various
parameters and serves as both a call admission control mechanism (allowing or denying a
ow access to the network) and a bandwidth-reservation mechanism. This chapter focused
primarily on the bandwidth reservation aspect of RSVP.
The interactions between RSVP and other QoS tools such as LLQ were discussed, along
with scalability and RSVP-DiffServ integration in networks that are not exclusively IntServ
nor exclusively DiffServ, but that instead use some of the concepts of both worlds. Additionally, for device endpoints that are not capable of RSVP, proxies were discussed to show
how networks with RSVP can be built even for these devices.
Chapter 9 explores RSVPs call admission control capabilities further.
Further Reading
Standards
202
RFC 2210, The Use of RSVP with IETF Integrated Services: http://www.ietf.org/
rfc/rfc2210.txt.
RFC 3175, Aggregation of RSVP for IPv4 and IPv6 Reservations: http://
www.ietf.org/rfc/rfc3175.txt.
General:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123cgcr/qos_r/
qos_i1g.htm#1100504.
RSVP support for low-latency queuing (Cisco IOS Software Release 12.1.3T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/
121t3/rsvp_llq.htm.
Multimedia Conference Manager with Voice Gateway Image with RSVP to ATM
SVC Mapping (Cisco IOS Software Release 12.1.5T): http://www.cisco.com/
univercd/cc/td/doc/product/software/ios121/121newft/121t/121t5/dt_mcm5t.htm.
RSVP support for Frame Relay (Cisco IOS Software Release 12.1.5T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/
121t5/rsvp_fr.htm.
VoIP call admission control using RSVP (Cisco IOS Software Release 12.1.5T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/
121t5/dt4trsvp.htm.
Further Reading
203
MPLS DiffServ-aware Trafc Engineering (DS-TE) over ATM (Cisco IOS Software
Release 12.2.8T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios122/122newft/122t/122t8/ft_ds_te.htm.
RSVP refresh reduction and reliable messaging (Cisco IOS Software Release
12.2.13T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t13/ftrsvpre.htm.
RSVP support for RTP header compression, phase 1 (Cisco IOS Software Release
12.2.15T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t15/ftrsvpcf.htm.
This chapter discusses the Call Admission Control (CAC) QoS capabilities, and includes
the following topics:
Denition of CAC
Resource Reservations Protocol (RSVP)
Cisco CallManager CAC techniques
H.323 gatekeeper CAC tools
Cisco IOS CAC tools other than RSVP
CHAPTER
CAC Overview
As discussed in Chapter 5, Congestion-Management Tools, and Chapter 6, CongestionAvoidance Tools, data applications are controlled by resolving congestion in the network
instead of applying admission policies. If data applications encounter congestion, packets
206
typically are dropped. Protocols such as TCP have inherent detection, recovery, and retransmission logic, which ensures that the session is recovered for the end user. Congestionmanagement policies cannot be applied to real-time applications, such as voice and videoconferencing, and still maintain predictable quality. When the packets that belong to these
applications are admitted onto the network, they cannot be dropped. Traditional TDM
applications such as voice, modem, fax, and video calls assume that bandwidth is available
and do not recover from lost information. Because information arrival is so time sensitive,
there is no point in building error-detection and recovery mechanisms, such as retransmission logic, into these real-time protocols. If the packet cannot be delivered within a small
window of time, it might as well never arrive. Better late than never does not apply to
real-time ows.
CAC Dened
By denition, network bandwidth is nite, and points of congestion do occur. Both realtime and non-real-time trafc types encounter this congestion. If packets cannot be dropped
to resolve congestion, packet ows that cause congestion should not be allowed onto the
network. This makes the case for the deployment of CAC toolsthese are, in essence, the
congestion-avoidance mechanisms for real-time applications. After it is admitted, a realtime ow such as a voice call must be carried; if there arent sufcient bandwidth resources
to carry the ow within the delay and loss bounds of the application, the ow must be
rejected or redirected before it is admitted into the network.
Another way to look at CAC is that most of the QoS tools discussed thus far in this book
strive to protect voice trafc from data trafc. CAC tools protect voice trafc from other
voice trafc (and interactive video from interactive video). For example, if there is sufcient bandwidth provisioned through LLQ to carry only two calls across a link, admitting
a third call will cause packet drops and will impair the voice quality of all three calls in
progress. Such scenarios necessitate the use of CAC to ensure that no more real-time ows
are admitted into the network beyond what the QoS engineering of the nodes allows. This
is illustrated in Figure 9-1.
Formally dened, CAC is a deterministic decision before call establishment on whether the
network resources are available to provide the required QoS to the new call. CAC features
allow VoIP systems to make an informed decision before admitting a new call, based on the
condition of the network. If the call is not admitted, the call can be given the reorder (or
overow) tone or a recorded announcement can inform the caller that the network is too
busy to complete the call attempt. The caller must try again later, or the call can be
redirected to another VoIP route, or the call can be redirected through the PSTN.
Figure 9-1
207
Call #2
VoIP
WAN
Call #1
Call #2
V
Call #3
VoIP
WAN
208
209
gateway, CPU power, and memory. Several of these resources could be constrained at any
nodes or multiple nodes that the call traverses to its destination. The following features or
network design techniques fall in this category:
210
Figure 9-2
Centralized
CallManager Cluster
Location 2
128 kbps Max
PSTN
V
Router/
GW
IP WAN
Router
Location 1
IP WAN
Location 3
256 kbps Max
IP WAN
Router
The term correlated is used instead of matched because CallManager takes into account
only the uncompressed Layer 3 bandwidth of a call into its call-counting CAC algorithm.
On the other hand, LLQ, as discussed in Chapter 5, also must account for various other
factors, such as cRTP, that affect the bandwidth required for a voice call and must make
provision for the call-signaling bandwidth.
The CallManager Locations CAC feature works in conjunction with CallManager regions
(a feature that controls codec selection between devices that want to communicate), so
bandwidth-constrained links between sites typically are congured to use the G.729 codec
and a counting mechanism within CallManager limits the number of calls into or out of
each site. IP phones and voice gateways are associated with both a region (for codec selection) and a location (for CAC purposes) in the CallManager conguration. For every call
set up, CallManager looks at the source and destination locations of the call and makes a
CAC decision to allow or deny the new call, based on how many calls are already active
between the same two locations and the codecs involved in the calls. Calls conned within
a location are not subject to CAC; as determined by the regions feature, these calls typically
use the G.711 codec.
Gatekeeper CAC
211
Examining the example conguration in Figure 9-2 once more, Location 2 has 128 kbps of
bandwidth available for voice. If the CallManager regions feature is congured so that any
call into or out of Location 2 uses the G.729 codec, 24 kbps of bandwidth are required per
call, and CallManagers locations CAC algorithm will allow a maximum of 5 (128 / 24)
simultaneous calls to Location 2.
CallManager Locations CAC is a heavily deployed feature and is essential for a centralized
deployment in which some IP phones or gateways are separated from each other by WAN
segments of limited bandwidth. CallManager locations should be congured so that calls
between sites do not oversubscribe the bandwidth allocated to the VoIP LLQ in the WAN
routers. CallManager Locations CAC is a simple call-counting mechanism and is unaware
of the topology or state of the network connections. It allows a congured amount of bandwidth (for example, 200 kbps) between two sites. For every call, it subtracts a xed amount
based on the codec selected by the regions feature. Thus, locations CAC works well only
for hub-and-spoke topologies. It is also unaware of L2 protocol overheads (it calculates
purely L3 bandwidth required) and bandwidth-altering features, such as cRTP and tunneling technologies such as GRE and IPSec.
Gatekeeper CAC
Gatekeepers (GK) often are used to arbitrate bandwidth in both CallManager and traditional toll-bypass networks. As with CallManager Locations CAC, gatekeepers employ a callcounting mechanism (based on codec per call) between sites (zones), track bandwidth at an
L3 level, and are also unaware of the network topology. Thus, gatekeeper call admission
control (GK CAC) generally solves the same problem as CallManager Locations CAC and
suffers from the same drawbacks. GK CAC is applicable to a wider set of devices than CallManager Locations CAC, though: GK CAC can be used to arbitrate bandwidth between any
two devices that register with the GK, whereas CallManager Locations CAC can be used
only between IP phones and voice gateways within CallManagers management area. GK
CAC in CallManager networks is used primarily in distributed deployment models to provide CAC on the intercluster trunks or the connections between the CallManager clusters,
as shown in Figure 9-3.
GK CAC also often is deployed in videoconferencing networks to arbitrate bandwidth
among video endpoints, gateways, and MCUs. Unlike CallManager Locations CAC,
the bandwidth subtracted per call is not xed based purely on the codec (CallManager
Locations CAC handles only G.729 and G.711 calls); instead, the bandwidth needed for
the call is requested from the GK as part of the H.225 admissions request traveling from the
endpoint or gateway to the GK.
212
Figure 9-3
Cisco 3600
WAN
Cisco 3600
Call Placed
V
IP
X1001
Cisco
CallManager 1xxx
PSTN
Voice Overflow
IP
X2002
Cisco
CallManager 2xxx
Call Flow
H.323 RAS
Signaling
RSVP
RSVPs use in providing QoS for real-time ows has a checkered past in the industry, in the
IETF, and in Cisco IOS implementation. However, RSVP is looking increasingly promising
as the only technology that can provide true real-time communications CAC for complex
network topologies and varying trafc patterns. Factors that have contributed to RSVPs
spotty deployment to provide QoS for real-time trafc include the following (most of which
have been resolved):
RSVP
Figure 9-4
213
RSVP Path
The terminating
node initiates the
first PATH message.
RSVP Resv
RSVP Path
RSVP Resv
RSVP
modification.
RSVP ResvConf
H.225 Alerting or Connect
Originating Node
Alerting/Connect not
sent until an RESV
confirm is received.
Terminating Node
The ow shown in Figure 9-4 depicts only the RSVP messages between the two
communicating endpoints. As discussed in Chapter 8, Bandwidth Reservation, the
RSVP messages actually travel between each two nodes in the network connecting
two endpoints together; each node makes a decision on whether to make or deny the
requested reservation. The ow in Figure 9-4 shows only the end result of the RSVP
messages having traversed all the nodes between the two endpoints.
SecurityTo guard against rogue applications initiating reservations, either for calls
that should not be allowed onto the network or for denial-of-service purposes, RSVP
was enhanced in Cisco IOS Release 12.2.15T. It now does authentication checks on
RSVP messaging to ensure that messages requesting bandwidth are sourced by
legitimate endpoints or nodes and that the requests are for legitimate purposes.
214
RSVP addresses many of the shortcomings of the other more narrowly focused CAC
mechanisms:
Network topology awarenessRSVP is the only CAC technology that can negotiate
a path through any network topology and still guarantee bandwidth on every leg that
the call follows, wherever the routing protocols might point to that path. The other
CAC mechanisms assume simpler hub-and-spoke topologies without alternate
routing capabilities or redundant links or paths they can protect only a virtual leg
between two sites or locations and cannot take into account that some backbone
network segments contain aggregations of calls from several sites. With these
mechanisms, it is still possible to oversubscribe a segment, even if all sites are within
their individual CAC allocations.
Network state awarenessIf multiple links are bound together with technologies
such as MLP bundling, RSVP can react to link failures within the bundle and, therefore, compensate for temporary loss of bandwidth availability in the affected network
segment. The call-counting CAC mechanisms allow bandwidth oversubscription
when failures in the network cause less bandwidth than statically congured to be
available for a period of time.
Free mix of different bandwidth requestsGK CAC and RSVP can do appropriate
CAC for mixes of voice and video calls, each potentially of a varying bandwidth size.
The counting mechanisms, such as CallManager Locations CAC and GK CAC, discussed earlier, fall short of protecting network segments that aggregate calls from
various sites. The complexity of bandwidth arbitration in mixed voice and video networks requires CAC beyond the capabilities of static call countingonly RSVP truly
can protect these environments.
RSVP
215
The following example, illustrated in Figure 9-5, shows how calls can be made in either
direction between Gateway A and Gateway B, which are connected to POTS phones, with
phone numbers 711 and 712, respectively. The requested QoS indicates that RSVP setup
must complete before the destination phone rings. The acceptable QoS indicates that
the call is released if the RSVP setup fails or does not complete within the allotted time.
Example 9-1 gives the conguration for Gateway A; Example 9-2 gives the conguration
for Gateway B.
216
Figure 9-5
Originating Gateway
Terminating Gateway
Requested
QoS
Acceptable
QoS
Requested
QoS
Acceptable
QoS
CL or GD
CL or GD
CL or GD
CL or GD
CL or GD
CL or GD
CL or GD
BE
CL or GD
CL or GD
BE
CL or GD
BE
CL or GD
CL or GD
CL or GD
BE
CL or GD
BE
CL or GD
BE
BE
BE
BE
BE
CL or GD
CL or GD
Call is released.
BE
BE
CL or GD
BE
BE
BE
BE
BE
Call is released.
711
Results
Gateway B
10.10.107.107
IP
Network
10.10.107.108
2/0/0
712
RSVP
217
218
Summary
This chapter gave a brief overview of call admission control (CAC) techniques, the QoS
tools designed to keep excess real-time trafc off the network when there isnt bandwidth
to carry it. Packets cannot be dropped summarily (as is done with data trafc) to manage
congestion in the network, so an informed admission decision must be made before
allowing a real-time (typically voice or video) call onto the network.
CAC is a broad subject, and only a high-level overview was discussed here, with particular
emphasis on the most common CAC techniques, including Cisco CallManager Locations
CAC, gatekeeper CAC, and RSVP. RSVP is not deployed widely for CAC in networks
today; however, as support for it increases in more endpoints, this is likely to become the
more prevalent form of CAC over time because it solves many of the shortcomings of the
other techniques discussed in this chapter.
Further Reading
General
Busyout monitor on Cisco 2600 and 3600 series routers (Cisco IOS Software
Release 12.0.7T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios120/120newft/120t/120t7/busy_t7.htm.
Further Reading
219
RSVP support for low-latency queuing (Cisco IOS Software Release 12.1.3T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/
121t/121t3/rsvp_llq.htm.
RSVP support for Frame Relay (Cisco IOS Software Release 12.1.5T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/
121t/121t5/rsvp_fr.htm.
VoIP call admission control using RSVP (Cisco IOS Software Release 12.1.5T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121t/
121t5/dt4trsvp.htm.
Control plane DSCP support for RSVP (Cisco IOS Software Release 12.2.2T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t2/dscprsvp.htm.
Call admission control for H.323 VoIP gateways (Cisco IOS Software Release 12.2.4T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/
122limit/122x/122xa/122xa_2/ft_pfavb.htm.
Call admission control for H.323 VoIP gateways (Cisco IOS Software Release 12.2.8T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t8/ft_cac7x.htm.
SIP gateway support of RSVP and TEL URL (Cisco IOS Software Release 12.2.8T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/
122limit/122x/122xb/122xb_2/vvfresrv.htm.
MGCP VoIP call admission control (Cisco IOS Software Release 12.2.8T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t8/ft_04mac.htm.
Call admission control for H.323 VoIP gateways (Cisco IOS Software Release 12.2.11T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t11/ftcac58.htm.
Enhanced features for local and advanced voice busyout (Cisco IOS Software
Release 12.2.13T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios122/122newft/122t/122t13/ft_lavbo.htm.
220
RSVP support for RTP header compression, phase 1 (Cisco IOS Software
Release 12.2.15T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios122/122newft/122t/122t15/ftrsvpcf.htm.
Catalyst 2950
Catalyst 2970
Catalyst 3550
Catalyst 3560
Catalyst 3750
Catalyst 4550 (Supervisors II+ through V)
Catalyst 6500 (Supervisor 2 and Supervisor 720)
CHAPTER
10
Classication and marking can be ofoaded from routers and moved as close to the
source hosts as administratively possible. This not only extends the DiffServ domain,
but it also enables routers to use their CPU cycles more effectively and efciently.
Congestion can be avoided within the campus, using WRED or similar tools.
Policing can be performed right at the source. This includes both RFC 2597 AF
markdown policing (such as marking down out-of-contract AF11 trafc to AF12,
or even AF13) or simply policing to drop unwanted trafc.
The main caveat that arises from the porting of software QoS to hardware is that QoS
features become hardware specicthat is, they can vary from platform to platform, and
even from line card to line card. This increases the complexity of conguring and managing
campus QoS because many idiosyncrasies need to be kept in mind for each platform or line
card. This caveat further is exacerbated by the fact that some platforms require CatOS,
224
others require Cisco IOS, and still others (such as the Catalyst 6500) can be congured
using either. To address this issue, common syntaxes, such as the MQC from Cisco IOS,
and command macros, such as AutoQoS, are continuing to be developed to make QoS more
consistent and easier to deploy across Catalyst platforms.
This chapter rst looks at generic QoS models across the Catalyst platform families and
then examines the most currently relevant Catalyst platforms.
Classification
Generate DSCP
Policing
In profile or
out of profile
Compare DSCP to
the configured
policer and
determine if the
packet is in profile or
out of profile.
Actions at Egress
Marking
Based on whether
the packet is in or
out of profile and the
configured parameters.
Determine whether
to pass through,
mark down, or drop
the packet. The
DSCP and CoS are
marked or changed
accordingly.
Queuing and
Scheduling
Based on the CoS,
determine into which
of the egress
queues to place the
packet. Then service
the queues
according to the
configured weights.
The generic Catalyst QoS functions of classication and marking, policing and marking,
and scheduling (congestion management and congestion avoidance) are examined in the
following sections.
225
During QoS processing in Catalyst switches, all packets are represented with an Internal
DSCP value. This applies even to non-IP packets because non-IP packets have their
Internal DSCP generated by their CoS values (coupled with the CoS-to-DSCP mapping
table settings) or are assigned the default Internal DSCP value of 0. This Internal DSCP
value is derived from, among other criteria, the trust state of the port. The trust states can
be set to the following:
Trust DSCPThe Internal DSCP is set according to the received DSCP values.
Trust CoSThe Internal DSCP is set based on the received CoS values, through a
default or modied CoS-to-DSCP mapping.
UntrustedThe received CoS is set or reset to the default value (typically 0), and the
Internal DSCP value is set through a default or modied CoS-to-DSCP mapping
(which, likewise, typically results in an Internal DSCP marking of 0).
Trust boundaries also can be extended to devices such as IP phones so that the switch will
trust the markings that the IP phone has set. IP phones mark Voice trafc to CoS 5 and
DSCP EF, and Call-Signaling trafc to CoS 3 and DSCP AF31 (or CS3 on newer software
releases).
Modiable CoS-to-DSCP maps provide network administrators granularity in these
mappings. For example, by default, the 3 CoS bits are used as the three most signicant bits
within the DSCP (CoS 5 maps to DSCP 40, which is CS5 and not EF). But when a thirdparty IPT device doesnt mark Voice trafc with CoS and DSCP (as Cisco IP phones do),
the administrator can chose to modify this mapping table to correctly map voice from CoS
5 to DSCP 46 (EF) right at the access switch.
In addition to CoS-to-DSCP maps and IPP-to-DSCP maps, DSCP values themselves can
be mapped to alternate DSCP values, using DSCP mutation maps. Such DSCP-to-DSCP
mutation maps are useful on the borders of two different DiffServ domains.
Classication also can be performed explicitly using access control lists (ACLs), which are
comprised of access control entries (ACEs). Two main ACL types exist: IP and MAC. IP
ACLs usually can use Layer 3 (source or destination addresses) or Layer 4 (TCP/UDP
ports/ranges) for classication purposes. The hardware processes each ACE of an ACL for
a rst-true-match rule. Therefore, it is recommended to order the ACEs to have the most
common matches closer to the top of the ACL to optimize processing.
Figure 10-2 shows a generic Catalyst classication model. Some platforms, such as the
Catalyst 6500, expand on this model, but the main logic remains the same.
226
Use Port
Default
(Non-IP Traffic)
Trust IP
Precedence
(IP Traffic)
Assign DSCP identical
to DSCP in packet.
No
Use CoS
from frame.
Assign default
port CoS.
Done
Done
No
No
Yes
Read next ACL. Is there
a match with a permit action?
No
Yes
Assign the DSCP as
specified by ACL action.
Done
Done
227
No
Is a policer configured
for this packet?
Yes
Check if the packet is in
profile by querying the policer.
No
Yes
Pass
Through
Done
Drop
Drop packet.
228
Queue 1: 80%
Then two thresholds are dened in each queue. By default, these thresholds are at
80 percent of the queues depth and 100 percent of the queues depth (the tail). These
thresholds are shown in Figure 10-5.
Figure 10-5 Basic Catalyst Queuing: 2Q2T ExampleDefault Thresholds
Queue 2 Threshold 1
Queue 2 Threshold 2
(Queue Tail)
Queue 1 Threshold 2
(Queue Tail)
Front
of
Queues
Queue 1
Threshold 1
On all Catalyst platforms, CoS-to-transmit queue mappings are used to assign packets to
transmit queues (although on some platforms, certain versions of software allow the option
229
CoS 5-7
CoS 0-4
Additionally, congestion management is overlaid to the queuing model so that each CoS
value (or DSCP value, if the platform/software supports it) can be restricted to a certain
threshold. For example, CoS values 0 and 1 can be restricted to the rst-queue rst-threshold
(1Q1T). If the queue lls past this threshold, all packets with a CoS value of 0 and 1 will
be dropped. Thus, the remainder of the rst queue (1Q2T) is reserved exclusively to hold
only packets with CoS values of 2, 3, and 4. Similarly, CoS values of 6 and 7 are restricted
to the second queues rst threshold (2Q1T), while the remainder of the second queue
(2Q2T) is explicitly reserved for CoS 5.This is shown in Figure 10-7.
Figure 10-7 Basic Catalyst Queuing: 2Q2T ExampleCoS-to-Threshold Mappings
Should the second queue fill beyond this point,
only packets with a CoS value of 5 will be held
(packets with CoS values 6 and 7 will be dropped).
CoS 6+7
2Q1T
CoS 5
CoS 2+3+4
1Q2T
2Q2T
CoS 0+1
1Q1T
230
Now that CoS values have been mapped to both queues and thresholds, the scheduling (in
the event of congestion) is performed on this model by a weighted round-robin algorithm.
Such an algorithm favors servicing the second queue (higher CoS values) over servicing the
lower queue. Usually these servicing weights (and the queue sizes) can be overridden from
their default values.
In this manner, preferential service can be offered to voice and network control packets. Yet,
no strict priority servicing is provided to voice, as with Cisco IOS LLQ. An improvement
on the xQyT Catalyst queuing model is the 1PxQyT model, in which a (typically single)
strict-priority queue is added to the model.
As mentioned previously, queues 1 and 2 are serviced by a WRR scheduler, but if any
activity is detected in the priority queue, the WRR scheduler is interrupted, the strictpriority trafc is serviced exhaustively, and the WRR scheduler resumes servicing
queues 1 and 2.
An example 1P2Q2T model, complete with CoS-to-queue and threshold mappings, is
shown in Figure 10-8. In this example, the rst queue is allocated 70 percent of the buffer
space, the second is allocated 15 percent, and the strict priority also is allocated 15 percent,
by default.
Figure 10-8 Basic Catalyst Queuing: 1P2Q2T Example
CoS 5
1P
CoS 6+7
2Q2T
2
CoS 2+3
1Q2T
CoS 0+1
1Q1T
CoS 4
2Q1T
0
Catalyst 2950
231
All (new) Catalyst platforms and line cards have some variations of either the xQyT
hardware queuing model or (more likely) the newer 1PxQyT hardware queuing model.
With the generic Catalyst QoS models have been laid out, it is time to examine some
platform-specic applications (and idiosyncrasies) of these models. Only the currentgeneration switches (at the time of writing), including the Catalyst 2950, 3550, 3560, 3750,
4500 (Supervisors II+ through V), and the Catalyst 6500 Supervisor 2 and Supervisor 720
are discussed here.
NOTE
This chapter provides an overview of Catalyst QoS tools only to lay a context for the design
chapters to follow. As such, some platforms have been omitted from the scope of discussion.
For a comprehensive discussion of QoS features on switches not included in this list, such
as the Catalyst 2900XL, 3500XL, 4000-CatOS, and 5000 series switches, refer to Cisco
documentation at http://www.cisco.com/univercd/home/home.htm or to the Cisco Press
book Cisco Catalyst QoS: Quality of Service in Campus Networks, by Mike Flannagan,
Richard Froom, and Kevin Turek.
NOTE
Not every QoS feature that these platforms support is discussed in this chapter; the text
is concerned only with the features that are most relevant to Chapter 12, Campus QoS
Design. All feature discussions in this chapter are based on hardware/software feature sets
available at the time of writing. Refer to Cisco Catalyst documentation for the latest updates
on these platforms and features.
Catalyst 2950
The Catalyst 2950, shown in Figure 10-9, supports only Layer 2 forwarding, making it a
good candidate for a low-end access switch. The main difference between the Catalyst 2950
and the Catalyst 3550 is that the 3550 supports Layer 3 forwarding (IP routing) and thus
can function as a distribution layer switch. Other than that, the platforms are remarkably
similar. Both use the same Cisco IOS code base and have a virtually identical QoS feature
set (with the 3500 boasting a few additional QoS features).
232
Two Cisco IOS software images are supported on the 2950: the Standard Image (SI) and
the Enhanced Image (EI). The full 2950 QoS feature set (including classication, policing,
and marking; mapping, queuing, and scheduling; and AutoQoS) is available as part of the
Enhanced Image. Therefore, it is recommended to use the EI on the 2950 within a QoSenabled campus design. For the remainder of this discussion, it is assumed that the Catalyst
2950 is running an Enhanced Image.
Catalyst 2950
NOTE
233
In the future, digital certicates will be exchanged between the switch and the IP phone to
verify that an IP phone indeed is connected to the switch and is not a hacker spoong CDP.
In Example 10-1, trust is set for CoS, and the trust boundary has been extended to any
connected IP phones. The range keyword is used to congure multiple interfaces at once.
Example 10-1 Conguring Trust and Trust Extensions on a Catalyst 2950
CAT2950(config)#interface
interface range FastEthernet 0/12 - 24
CAT2950(config-if-range)#mls
mls qos trust cos
CAT2950(config-if-range)#mls
mls qos trust device cisco-phone
MQC-based class maps and policy maps also can be used with ACLs to mark trafc on
ingress on the 2950. ACLs supported are standard IP ACLs, extended IP ACLs, and Layer 2
MAC ACLs.
In Example 10-2, an access list identies UDP trafc sourced from an IP/TV server
(10.200.200.200). A class map references this ACL and applies a marking policy to trafc
that matches this criterion, marking these ows to DSCP CS4 (32.)
Example 10-2 Conguring MQC/ACL Classication on the Catalyst 2950
CAT2950(config)#access-list
access-list 100 permit udp 10.200.200.200 255.255.255.255 any
CAT2950(config)#class-map IPTV
CAT2950(config-cmap)#match access-group 100
CAT2950(config-cmap)#exit
CAT2950(config)#policy-map MARK-IPTV-DSCP-CS4
CAT2950(config-pmap)#class IPTV
CAT2950(config-pmap-c)#set
set ip dscp 32
CAT2950(config-pmap-c)#interface FastEthernet 0/1
CAT2950(config-if)#service-policy
service-policy input MARK-IPTV-DSCP-CS4
The default CoS-to-DSCP map for the Catalyst 2950 is shown in Table 10-1. This default
CoS-to-DSCP mapping is actually the same across all Catalyst platforms: The CoS bits are
combined with three trailing zeros (in binary) to form the default DSCP value (in decimal,
the equivalent conversion is achieved by multiplying the CoS value by 8).
Table 10-1
DSCP Value
16
24
32
40
48
56
234
The default DSCP-to-CoS mapping table for the 2950 is shown in Table 10-2. Notice that
not all DSCP values are included or supported on the Catalyst 2950.
Table 10-2
8, 10
16, 18
24, 26
32, 34
40, 46
48
56
CoS Values
These mapping values can be modied away from the default settings. As shown in
Example 10-3, CoS 5 is mapped to DSCP 46 (EF), and DSCP CS1 (8) is mapped to CoS 0.
In the rst map (CoS to DSCP), eight separate values must be supplied (in order) that are to
correspond to the CoS values of 0 through 7. Notice that the sixth value (corresponding
to CoS 5) is modied away from the default (40) and explicitly is set to 46 (DSCP EF). With
the second mapping, up to 13 DSCP values (separated by spaces) can be mapped to a CoS
value, which follows the to keyword.
Example 10-3 Conguring Mapping Modications on the Catalyst 2950
CAT2950(config)#mls qos map cos-dscp 0 8 16 24 32 46 48 56
CAT2950(config)#mls qos map dscp-cos 8 to 0
Catalyst 3550
235
Finally, CoS values must be assigned to the desired queues. By default, CoS 0 and 1 are
assigned to queue 1, CoS 2 and 3 are assigned to queue 2, CoS 4 and 5 are assigned to queue 3,
and CoS 6 and 7 are assigned to queue 4. Usually, however, it is desirable to send only
CoS 5 (voice) to the expedite queue (queue 4), reassigning CoS 6 and 7 to queue 3. This
modication of the CoS-to-queue mapping can be made with the wrr-queue cos-map
command, as shown in Example 10-6.
Example 10-6 Conguring CoS-to-Queue Mapping on the Catalyst 2950
CAT2950(config)#wrr-queue cos-map 4 5
CAT2950(config)#wrr-queue cos-map 3 6 7
Catalyst 3550
The Catalyst 3550, shown in Figure 10-10, is found in both the access layer and the distribution layer as it supports IP routing. Many of the 3550s QoS features and syntax are identical to the 2950, but a few idiosyncrasies and extra features are unique to the 3550.
236
For example, by default, QoS is disabled on the 3550 and must be enabled manually for any
classication or queuing to occur. Furthermore, enabling QoS on the 3550 on some
versions of software requires disabling IEEE 802.3X ow control on all interfaces, as
shown in Example 10-7.
Example 10-7 Enabling QoS Globally on a Catalyst 3550
CAT3550(config)#interface range FastEthernet 0/1 - 24
CAT3550(config-if-range)#flowcontrol receive off
! Disables flowcontrol
CAT3550(config-if-range)#flowcontrol send off
! Disables flowcontrol
CAT3550(config-if-range)#exit
CAT3550(config)#mls
! Enables QoS globally
mls qos
When ow control has been disabled on all interfaces and QoS has been enabled globally,
all other QoS features become available.
Features and syntax that are identical to the 2950 are not repeated in the following sections;
only features and syntax that are unique to the 3550 are detailed in the following examples.
Catalyst 3550
237
Classication through MQC and ACLs is identical to that for the 2950.
The default CoS-to-DSCP map on the 3550 is the same as on all Catalyst platforms
(previously shown in Table 10-1). The default DSCP-to-CoS maps, shown in Table 10-3,
are slightly different on the 3550 than the 2950 because the full DSCP range is supported
on the 3550.
Table 10-3
0 to 7 8 to 15
16 to 23
24 to 31
32 to 39
40 to 47
48 to 55
56 to 63
CoS Value
238
QoS Domain 2
Gigabit
Ethernet
0/3
IP Traffic
Catalyst
3550-12T Switch
Gigabit
Ethernet
0/3
Catalyst
3550-12T Switch
The conguration required for such mapping on the border 3550 in DiffServ domain 1 is
shown in Example 10-9.
Example 10-9 Conguring DSCP Mutation on a Catalyst 3550
CAT3550(config)#mls
mls qos map dscp-mutation DIFFSERV1-TO-DIFFSERV2 18 to 10
CAT3550(config)#mls
mls qos map dscp-mutation DIFFSERV1-TO-DIFFSERV2 20 to 12
CAT3550(config)#mls
mls qos map dscp-mutation DIFFSERV1-TO-DIFFSERV2 22 to 14
CAT3550(config)#int gig 0/3
CAT3550(config-if)#mls qos trust dscp
CAT3550(config-if)#mls
mls qos dscp-mutation DIFFSERV1-TO-DIFFSERV2
A complementary policy would be required on the border switch for the second DiffServ
domain to map in the reverse direction.
Catalyst 3550
239
In Example 10-10, individual Bulk Data trafc ows (marked on a data center server
connected to Fast Ethernet 0/12) in excess of 10 Mbps are marked down from AF11
(DSCP 10) to AF12 (DSCP 12).
Example 10-10 Conguring an Individual Policer on a Catalyst 3550
CAT3550(config)#mls
mls qos map policed-dscp 10 to 12
CAT3550(config)#class-map match-any BULK
CAT3550(config-cmap)#match ip dscp af11
CAT3550(config)#policy-map BULK-MARKDOWN
CAT3550(config-pmap)#class BULK
CAT3550(config-pmap-c)#police
police 10000000 8000 exceed-action policed-dscp-transmit
CAT3550(config-pmap-c)#interface fa 0/12
CAT3550(config-if)#service-policy input BULK-MARKDOWN
The Catalyst 3550 is the only switch (at the time of writing) to support per-port/per-VLAN
policing (in the ingress direction). Per-port/per-VLAN policing requires an additional class
map to be dened with a match-all clause and two match statements: one for the VLAN
to be matched and the other for the class map to apply. For example, if the preceding Bulk
Data policing policy is to be applied only on VLAN 10, the per-port/per-VLAN policy
would look like Example 10-11.
Example 10-11 Conguring a Per-Port, Per-VLAN Individual Policer on a Catalyst 3550
CAT3550(config)#mls qos map policed-dscp 10 to 12
CAT3550(config)#class-map match-any BULK
CAT3550(config-cmap)#match ip dscp af11
CAT3550(config-cmap)#class-map
class-map match-all VLAN10-BULK
CAT3550(config-cmap)#match
match vlan 10
CAT3550(config-cmap)#match
match class-map BULK
CAT3550(config-cmap)#policy-map VLAN10-BULK-MARKDOWN
CAT3550(config-pmap)#class VLAN10-BULK
CAT3550(config-pmap-c)#police 10000000 8000 exceed-action policed-dscp-transmit
CAT3550(config-pmap-c)#interface fa 0/12
CAT3550(config-if)#service-policy input VLAN10-BULK-MARKDOWN
In addition to individual policers, an aggregate policer can be applied to an access-todistribution uplink on egress to mark down cumulatively out-of-prole trafc. Building on
the previous example, all Bulk Data trafc in excess of 100 Mbps (regardless of how many
ows are involved) is marked down to AF12 on the Gigabit 0/2 uplink. The policed-DSCP
map does not need to be redened, but it can be leveraged by both individual and aggregate
policers, as shown in Example 10-12.
Example 10-12 Conguring an Aggregate Policer on a Catalyst 3550
CAT3550(config-if)#mls
mls qos aggregate-policer BULK-MARKDOWN-AGG 1000000000 8000
exceed-action policed-dscp-transmit
CAT3550(config)#policy-map BULK-MARKDOWN-AGG
CAT3550(config-pmap)#class BULK
continues
240
As with the 2950, weights can be congured to allocate bandwidth to each queue by the
weighted round-robin scheduler. The syntax is identical to that of the 2950, except that if a
strict-priority queue has been enabled on an interface, the value for weight4 simply is
ignored.
NOTE
Queue limits also can be tuned away from defaults using the wrr-queue queue-limit
command. The default queue limits are such that each queue is assigned 25 percent of the
available buffer space.
It should be noted that when the queue limits are modied, the queue temporarily is shut
down during the hardware reconguration, and the switch may drop newly arrived packets
destined to the queue.
CoS values are assigned to their respective queues using the wrr-queue cos-map
command. A difference between the Catalyst 3550 and the 2950 is that the CoS-to-queue
maps are dened on a per-interface basis on the 3550 (not globally, as on a Catalyst 2950).
By default, CoS 0 and 1 are assigned to queue 1, CoS 2 and 3 are assigned to queue 2, CoS
4 and 5 are assigned to queue 3, and CoS 6 and 7 are assigned to queue 4. Usually, it is
desirable to send only CoS 5 (voice) to the expedite queue (queue 4) and to reassign CoS 6
and 7 to queue 3. This modication of the CoS-to-queue mapping can be made with the
wrr-queue cos-map interface command on the 3550, as shown in Example 10-14.
A QoS feature that the 3550 enjoys that the 2950 does not is the capability to support
congurable drop thresholds per queue on Gigabit Ethernet ports. Therefore, Catalyst 3550
Catalyst 3550
241
Gigabit Ethernet ports can be congured to operate in a 4Q2T or 1P3Q2T manner, while
Catalyst 3550 Fast Ethernet ports can be congured to operate in a 4Q1T or 1P3Q1T
manner.
These drop thresholds can be congured in one of two ways: tail drop or WRED.
Tail drop is the default congestion-avoidance technique on Gigabit-capable Ethernet ports.
With tail drop, packets are queued until the thresholds are exceeded. Specically, all
packets with DSCPs assigned to the rst threshold are dropped until the threshold no longer
is exceeded. However, packets assigned to the second threshold continue to be queued and
sent as long as the second threshold is not exceeded.
You can modify the two tail-drop threshold percentages assigned to the four egress queues
by using the wrr-queue threshold interface conguration command. Each threshold value
is a percentage of the total number of allocated queue descriptors for the queue. The default
threshold is 100 percent for thresholds 1 and 2.
Alternately, you can enable WRED and congure the two threshold percentages assigned
to the four egress queues on a Gigabit-capable Ethernet port by using the wrr-queue
random-detect max-threshold interface conguration command. Each threshold percentage
represents where WRED starts to randomly drop packets. After a threshold is exceeded,
WRED randomly begins to drop packets assigned to this threshold. As the queue limit is
approached, WRED continues to drop more packets. When the queue limit is reached,
WRED drops all packets assigned to the threshold. By default, WRED is disabled.
If you use WRED thresholds, you cannot use tail drop, and vice versa. If WRED is disabled,
tail drop automatically is enabled with the previous conguration.
You modify the DSCP-to-threshold map to determine which DSCPs are mapped to which
threshold ID by using the wrr-queue dscp-map interface conguration command. By
default, all DSCPs are mapped to threshold 1; when this threshold is exceeded, all the
packets randomly are dropped.
In Example 10-15, WRED is enabled on the three remaining queues (because queue 4
previously was enabled as the expedite/strict-priority queue). The rst threshold for each
remaining queue is set to 40 percent, and the second threshold is set to 100 percent (the tail
of the queue). DSCP values of AF12, AF22, AF32, and AF42 (12, 20, 28, and 36, respectively)
are mapped to the rst thresholds. All other relevant DSCPs have been mapped to the
242
second threshold. Because the command allows only eight DSCP values to be mapped to a
threshold per command, a second entry is needed to map values DSCP values CS6 (48) and
CS7 (56) to the second threshold.
Example 10-15 Conguring WRED Thresholds and DSCP-to-Threshold Maps on a Catalyst 3550 Gigabit
Ethernet Interface
CAT3550(config)#int gig 0/1
CAT3550(config-if)#wrr-queue
CAT3550(config-if)#wrr-queue
CAT3550(config-if)#wrr-queue
CAT3550(config-if)#wrr-queue
CAT3550(config-if)#wrr-queue
CAT3550(config-if)#wrr-queue
random-detect max-threshold
random-detect max-threshold
random-detect max-threshold
dscp-map 1 12 20 28 36
dscp-map 2 8 10 16 18 24 26
dscp-map 2 48 56
1 40 100
2 40 100
3 40 100
32 34
243
The Catalyst 3560 and 3750 series switches are available in the Standard Multilayer
Software Image (SMI) or the Enhanced Multilayer Software Image (EMI). The SMI feature
set includes all supported QoS tools and basic static and RIP routing functionality. The EMI
provides a richer set of enterprise-class features, including advanced hardware-based IP
unicast and multicast routing.
From a QoS perspective, the Catalyst 2970, 3560, and 3750 are identical and are considered
together in this discussion. The Catalyst 2970 and 3750 switches are shown in Figure 10-12.
Figure 10-12 Cisco Catalyst 2970 and 3750 Series Switches
244
On a 48-port 10/100 + 4 SFP chassis, there are two port ASICs. This means that you
have two sets of 24 10/100 + 2 SFP ports internal to the switch. Each set of ports
supports a total of 256 policers. So, once again, the maximum policers on a port is 64,
but the maximum for each ASIC is 256.
These considerations should be kept in mind when designing for policing needs using the
Catalyst 2970/3560/3750 switch.
245
In shaped mode, the egress queues are guaranteed a percentage of the bandwidth and are
rate limited to that amount. Shaped trafc does not use more than the allocated bandwidth
even if the link is idle. Shaping provides a more even ow of trafc over time and reduces
the peaks and valleys of bursty trafc. 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 congured
weights. The bandwidth is guaranteed at this level but is 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 can share it among them. With sharing, the ratio of the
weights determines the frequency of dequeuing; the absolute values are meaningless.
Additionally, both the ingress and egress queues use an enhanced version of the tail-drop
congestion-avoidance mechanism called weighted tail drop (WTD). As a frame is enqueued
to a particular queue, WTD uses the frames assigned CoS value or DSCP value to assign
it to different thresholds. If the threshold is exceeded for that CoS or DSCP value, the switch
drops the frame. Each queue supports (up to) three WTD thresholds: Two are congurable
(explicit WTD thresholds), and the third is noncongurable (implicit WTD threshold) and
is preset to the queue-full state (100 percent).
Thus, Catalyst 2970/3560/3750 switches can be congured to operate in 4Q3T mode or
1P3Q3T mode. The Catalyst 2970/3560/3750 also supports two queue sets, meaning that
different interfaces can be congured to operate in different queuing manners. For example,
some interfaces might be congured to operate in 4Q3T, and others might be congured to
operate in 1P3Q3T, depending on which queue set ID (qset-id) they are assigned to.
The allocated memory assigned to each queue can be modied (from the default 25 percent
per queue) by using the mls qos queue-set output qset-id buffers allocation1 ... allocation4
global conguration command. The sum of all the allocated buffers represents the reserved
pool, and the remaining buffers are part of the common pool.
The Catalyst 2970/3560/3750 switches use a buffer-allocation scheme to reserve a minimum number of buffers for each egress queue, to prevent any queue or port from consuming
all the buffers and depriving other queues, and to determine whether to grant buffer space
to a requesting queue. The switch determines 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), or 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 congure the maximum
memory allocation for a queue set by using the following global conguration command:
mls qos queue-set output qset-id threshold queue-id drop-threshold1
drop-threshold2 reserved-threshold maximum-threshold
246
In Example 10-16, queue set 1 has buffers allotted among queues 1 through 4 by the percentages 35, 30, 25, and 10. If 400 buffers are available, this would translate to an allocation
of 140, 120, 100, and 40 buffers to queues 1 through 4, respectively. Also, WTD thresholds
on queues 2 through 4 have been set to 40 percent of the buffer depth and 100 percent of
the buffer depths. Each queue has its buffer allocation fully reserved (100 percent) and has
its maximum memory threshold also set to 100 percent. Additionally, each queue has its
reserved threshold (an amount of memory to be guaranteed or reserved for the queuethe
range is 1 to 100 percent) set to 100 percent. Furthermore, each queue has its maximum
threshold (which enables a queue in the full condition to obtain more buffers than are
reserved for it and is the maximum memory that the queue can have before the packets are
droppedthe range is 1 to 400 percent) set to 100 percent.
Finally, Fast Ethernet 0/1 on the switch that has been designated as stack member 2 is
assigned to queue set 1, and queue 1 (of queue set 1) is dened as an expedite/priority
queue.
Example 10-16 Conguring Per-Queue Buffer Allocations and Thresholds on a Catalyst 2970/3560/3750
CAT3750(config)#mls qos queue-set output 1 buffers 35 30 25 10
CAT3750(config)#mls qos queue-set output 1 threshold 2 40 100 100 100
CAT3750(config)#int fa 2/0/1
CAT3750(config-if)#queue-set
queue-set 1
CAT3750(config-if)#priority-queue out
Similar to WRR, SRR allows the weights assigned to each queue to be modied. The ratio
of these weights determines the frequency by which the SRR scheduler sends packets out
from each queue. Shaping weights smooth or rate limit bursty or domineering ows. The
inverse ratio (1/weight) determines the shaping bandwidth for each queue. For example, if
a queue is to be limited to 10 percent, the shaping weight for that queue is set to 10. A
shaping weight of 0 means that the queue is operating in sharing mode. Shaped mode
overrides shared mode.
In shared mode, the queues share the bandwidth among them according to the congured
weights. The bandwidth is guaranteed at this level but is not limited to it. For example, if a
queue empties and does not require 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
determines the frequency of dequeuing; the absolute values are meaningless.
If an expedite queue has been congured, this strict-priority designation overrides any SRR
weights for queue 1.
In Example 10-17, the queues are assigned 35 percent, 30 percent, 25 percent, and 10
percent shared bandwidth allocations. But, in actuality, queue 1s bandwidth allocation is
ignored because it is congured as a strict-priority queue. Queues 2 and 3 are operating in
shared mode (because their shaped weight is set to 0). Queue 4 is operating in shaped mode
(shaped weight overrides shared weight) and is limited to no more than 10 percent of the
bandwidth, regardless of whether more is available.
Catalyst 4500
247
Example 10-17 Conguring SRR Shaping and Sharing Weights on a Catalyst 2970/3560/3750
CAT3750(config)#int gig 1/0/4
CAT3750(config-if)#srr-queue bandwidth share 35 30 25 10
CAT3750(config-if)#srr queue bandwidth shape 0 0 0 10
CAT3750(config-if)#queue-set 1
CAT3750(config-if)#priority-queue out
Finally, the Catalyst 2970/3560/3750 switches allow packets to be assigned to queues either
by CoS values or by DSCP values, using CoS-to-queue/threshold maps or DSCP-to-queue/
threshold maps.
In Example 10-18, DSCP EF (46) is assigned to queue 1 (the expedite queue). DSCP CS7
(56) and CS6 (48) are assigned to queue 2 threshold 2, and DSCP AF31 (26) and DSCP
CS3 are assigned to queue 2 threshold 1. DSCP 0 is assigned to queue 3. Bulk (DSCP
AF1110) is assigned to queue 4 threshold 2, while Scavenger (DSCP CS18) trafc is
assigned to queue 4 threshold 1.
Example 10-18 Assigning DSCP Values to Queues/Thresholds on a Catalyst 2970/3560/3750
CAT3750(config)#mls
CAT3750(config)#mls
CAT3750(config)#mls
CAT3750(config)#mls
CAT3750(config)#mls
CAT3750(config)#mls
qos
qos
qos
qos
qos
qos
srr-queue
srr-queue
srr-queue
srr-queue
srr-queue
srr-queue
output
output
output
output
output
output
dscp-map
dscp-map
dscp-map
dscp-map
dscp-map
dscp-map
queue
queue
queue
queue
queue
queue
1
2
2
3
4
4
threshold
threshold
threshold
threshold
threshold
threshold
1
2
1
2
2
1
46
48 56
24 26
0
10
8
Catalyst 4500
The Cisco Catalyst 4500, shown in Figure 10-13, nds its niche between desktop switches
and the agship Catalyst 6500. As such, it can be found in the access layer, the distribution
layer, and even the core layer in midsize networks. Service providers also utilize the
Catalyst 4500 because of its support of metro Ethernet options combined with its resiliency/
failover options.
Figure 10-13 Cisco Catalyst 4500 Series
248
QoS support for the Catalyst 4000 Supervisor I and II cards (running CatOS) was quite
limited and, as such, is omitted from this discussion. However, the Catalyst 4500
Supervisors II+ through V (running Cisco IOS) boast a much richer QoS toolset and are
examined further.
Many of the QoS commands on the 4500 are similar to those on the switches previously
discussed, with the exception of omitting the mls keyword at the beginning of the
statement.
For example, by default, QoS is disabled on the 4500 and must be enabled with the global
command qos (whereas, on previously discussed platforms, this command would have
been mls qos). When QoS is disabled, the port interface trust states default to Trust DSCP.
When QoS is enabled, this trust state changes to Untrusted, and (with no other QoS parameters explicitly dened) all egress trafc is marked to CoS 0 and DSCP 0. Incidentally,
QoS can be disabled on a per-interface basis using the interface command no qos (see
Example 10-19).
Example 10-19 Enabling QoS on a Catalyst 4500
CAT4500(config)#qos
qos
QoS policies can be applied to individual ports or to VLANs. MQC policies can be applied
to VLANs by attaching the service-policy statement to the VLAN interface and conguring
all ports belonging to the VLAN to use VLAN-based QoS (using the qos vlan-based
interface command). If the interface is congured to use VLAN-based QoS, the trafc
received or sent through the interface is classied, policed, and marked according to the
policy map attached to the VLAN (congured on the VLAN interface) to which the packet
belongs. If no policy map is attached to the VLAN to which the packet belongs, the policy
map attached to the interface is used. Furthermore, VLAN-based policies supercede any
policies congured on individual ports if the port has been assigned to operate in VLANbased QoS mode.
Catalyst 4500
249
250
Catalyst 4500
251
Minimum bandwidth allocations can be dened in absolute kbps (again, the k, m, and g
prexes can be used to dene the rate in bits per second). Alternatively, minimum bandwidth allocations also can be expressed as percentages.
Complementarily, each transmit queue can be congured to transmit a maximum rate using
the shape command. This command enables you to specify the maximum rate of trafc that
the queue services. Any trafc that exceeds the congured shape rate is queued and transmitted at the congured rate. If the burst of trafc exceeds the size of the queue, packets are
dropped to maintain transmission at the congured shape rate. As with the bandwidth command, the shaped rate can be expressed in absolute bits per second (the k, m, and g prexes
can be used to dene the rate in bits per second) or as a percentage.
In Example 10-24, queue 3 is assigned to be a strict-priority queue. Queue 1 is assigned
30 percent of the available bandwidth (after the priority queue has been fully serviced), and
queue 2 is assigned 25 percent. Queue 4 is assigned to be shaped to 10 percent.
Example 10-24 Conguring a Priority Queue and Bandwidth Allocations on a Catalyst 4500
CAT4500(config)#int gig 1/1
CAT4500(config-if)#tx-queue
tx-queue 1
CAT4500(config-if-tx-queue)#bandwidth
bandwidth percent 30
CAT4500(config-if-tx-queue)#tx-queue
tx-queue 2
CAT4500(config-if-tx-queue)#bandwidth
bandwidth percent 25
CAT4500(config-if-range)#tx-queue
tx-queue 3
CAT4500(config-if-tx-queue)#priority
priority high
CAT4500(config-if-tx-queue)#tx-queue
tx-queue 4
CAT4500(config-if-tx-queue)#shape
shape percent 10
The Catalyst 4500 supports DSCP-to-queue maps, with the default DSCP-to-queue
assignment shown in Table 10-4.
Table 10-4
Transmit Queue
DSCP 0-15
Queue 1
DSCP 16-31
Queue 2
DSCP 32-47
Queue 3
DSCP 48-63
Queue 4
These assignments can be modied with the qos map dscp dscp to tx-queue queue command. Up to eight DSCP values (separated by spaces) can be assigned to a queue in a single
command.
252
Continuing from Example 1-24, queue 1 carries Mission-Critical trafc, such as NetworkControl (CS7/56), Routing (CS6/48), Call-Signaling (AF31/26), Transactional Data (AF21/18),
and Network-Management (CS2/16). Voice (EF/46) is mapped to priority queue 3. Queue 2
is assigned as a Best-Effort queue (DSCP 0). Less-than-best-effort trafc, such as Bulk
Data (AF11/AF12, which are DSCP 10 and 12, respectively) and Scavenger (CS1/8) trafc,
is assigned to queue 4.
Example 10-25 Conguring DSCP-to-Queue Assignments on a Catalyst 4500
CAT4500(config)#qos
CAT4500(config)#qos
CAT4500(config)#qos
CAT4500(config)#qos
map
map
map
map
dscp
dscp
dscp
dscp
56 48 26 18 16 to tx-queue 1
0 to tx-queue 2
46 to tx-queue 3
8 10 12 to tx-queue 4
As previously noted, the Catalyst 4500 does not (yet) support drop thresholds, but it does
support a congestion-avoidance feature called dynamic buffer limiting (DBL).
DBL tracks the queue length for each trafc ow in the switch. When the queue length of a
ow exceeds its limit, DBL drops packets or sets the explicit congestion notication (ECN)
bits in the packet headers. ECN bits, based on RFC 3168, were covered in Chapter 6,
Congestion-Avoidance Tools.
DBL classies ows in two categories, adaptive and aggressive. Adaptive ows reduce the
rate of packet transmission after it receives congestion notication. Aggressive ows do not
take corrective action in response to congestion notication.
Queue length is measured by the number of packets. The number of packets in the queue
determines the amount of buffer space that a ow is given. When a ow has a high queue
length, the computed value is lowered. This enables new incoming ows to receive buffer
space in the queue. This allows all ows to get a proportional share of packets through the
queue.
DBL, with ECN notication, can be enabled globally using the command in Example 10-26.
Example 10-26 Conguring DBL with ECN on a Catalyst 4500
CAT4500(config)#qos
qos dbl exceed-action ecn
Catalyst 6500
The Catalyst 6500, shown in Figure 10-14, is indisputably Ciscos main switch and, as
such, boasts the richest feature sets, not only in QoS, but in all services, such as high
availability, multicast, security, and management. It is the preferred switch in large
enterprise environments at all layers: access, distribution, and core. Additionally, the
Catalyst 6500 is very prevalent in service provider environments. In the context of our
Catalyst 6500
253
discussions, Catalyst 6500 is used to refer to Catalyst 6500s with Supervisor 2 (PFC2)
and Catalyst 6500s with Supervisor 720 (PFC3) because these are the current versions of
supervisor hardware at the time of writing.
Figure 10-14 Cisco Catalyst 6500 Series
Hardware QoS on the Catalyst 6500 is performed principally within the Policy Feature
Card (PFC), which is now in its third generation (with each successive generation of PFC
having progressively richer QoS featuresrefer to Cisco Catalyst 6500 documentation for
complete details).
The PFC is responsible for classication, marking, mapping, and policing. Individual line
cards perform the queuing and dropping functions. Thus, multiple combinations of queues
and thresholds (varying by line card) can exist for 6500 switches.
On the Catalyst 6500, PFC QoS can be congured in one of two ways:
NOTE
Hybrid modeThis mode uses the Catalyst Operating System (CatOS) to congure
the Supervisor and PFC. The Layer 3 forwarding engine (the Multilayer Switch
Feature Card, or MSFC) then is congured using Cisco IOS. The term hybrid is used
to convey that two operating systems (and two independent consoles) are used to
manage the Catalyst 6500.
Native modeThis mode uses a single image of Cisco IOS to congure the
Supervisor + PFC, along with the MSFC. Only a single console is required to manage
the Catalyst 6500.
For the QoS features discussed in this chapter, both the CatOS and Cisco IOS commands
are shown in the examples.
In both cases, QoS is disabled by default and needs to be globally enabled, as shown in
Example 10-27.
254
Example 10-27 Enabling QoS Globally on the Catalyst 6500 (CatOS and Cisco IOS)
CAT6500-CATOS> (enable) set qos enable
QoS is enabled.
CAT6500-CATOS> (enable)
CAT6500-IOS(config)#mls
mls qos
CAT6500-IOS(config)#
QoS policies on the 6500 can be applied at the individual port level or on a per-VLAN basis
(but, by default, all ports are congured for port-based QoS). This implies that all classication
policies, and marking and policing, congured for the port are applicable only to the port
to which they are applied. Conversely, VLAN-based QoS enables the administrator to apply
a uniform policy to all ports congured for a specic VLAN. VLAN-based QoS might be
preferred in certain situations, such as when voice VLANs have been deployed for IP
Telephony environments. To alter the port policy from the default port-based QoS setting
to VLAN-based QoS, use the commands shown in Example 10-28.
Example 10-28 Conguring VLAN-Based QoS on the Catalyst 6500 (CatOS and Cisco IOS)
CAT6500-CATOS> (enable) set port qos 3/1 vlan-based
Qos interface is set to vlan-based for ports 3/1
CAT6500-CATOS> (enable)
CAT6500-IOS(config)#interface FastEthernet3/1
CAT6500-IOS(config-if)#mls
mls qos vlan-based
When VLAN-based QoS has been enabled, service-policy statements are attached to the
VLAN interfaces, which then apply to all ports assigned to the VLAN.
Catalyst 6500
255
Example 10-29 Conguring Trust on the Catalyst 6500 (CatOS and Cisco IOS)
CAT6500-CATOS> (enable) set port qos 3/1 trust trust-cos
Port 3/1 qos set to trust-cos
CAT6500-CATOS> (enable)
CAT6500-IOS(config)#interface FastEthernet3/1
CAT6500-IOS(config-if)#mls
mls qos trust cos
CAT6500-IOS(config-if)#
NOTE
Under some circumstances, the administrator must perform additional conguration steps
beyond what is noted in the preceding commands. For example, the WS-X6224/6248 and
WS-X6324/6348 line cards have hardware restrictions that prevent them from passing CoS
values to the switching engine. Although the line cards recognize the arriving CoS and use
that value for input scheduling, when the frame header is passed to the switching engine for
forwarding, the CoS value for the frame is not preserved and is rewritten to 0. Therefore, it
is necessary to congure additional commands, as shown in Example 10-30.
The PFC also can be congured to identify and mark ows to specic DSCP values by
either Layer 3 or Layer 4 parameters, and dened in access lists. This is shown in Example 10-31, in which TCP trafc within the destination port range of 9000 to 9005 is marked
as Transactional Data (DSCP AF21 or 18).
256
Example 10-31 ACL-Based Classication and Marking on the Catalyst 6500 (CatOS and Cisco IOS)
CAT6500-CATOS> (enable) set qos acl ip TRANSACTIONAL-DATA dscp 18
tcp any any range 9000 9005
TRANSACTIONAL-DATA editbuffer modified. Use 'commit' command to apply changes.
CAT6500-CATOS> (enable) commit qos acl TRANSACTIONAL-DATA
QoS ACL 'TRANSACTIONAL-DATA' successfully committed.
CAT6500-CATOS> (enable) set qos acl map TRANSACTIONAL-DATA 3/1
ACL TRANSACTIONAL-DATA is successfully mapped to port 3/1.
The old ACL mapping is replaced by the new one.
CAT6500-CATOS> (enable)
CAT6500-IOS(config)#access-list
access-list 100 permit tcp any any range 9000 9005
CAT6500-IOS(config)#class-map TRANSACTIONAL-DATA
CAT6500-IOS(config-cmap)#match
match access-group 100
CAT6500-IOS(config-cmap)#policy-map ACCESS-MARKING
CAT6500-IOS(config-pmap)#class TRANSACTIONAL-DATA
CAT6500-IOS(config-pmap-c)#set
set dscp af21
CAT6500-IOS(config-pmap-c)#interface FastEthernet 3/1
CAT6500-IOS(config-if)#service-policy
service-policy input ACCESS-MARKING
IP Precedence-to-DSCP maps use identical syntax, except that the cos keyword is replaced
with ipprec (CatOS) and ip-prec (Cisco IOS).
Default DSCP-to-CoS modications can be congured, as shown in Example 10-33. In this
example, DSCP values CS1 (8) through DSCP 15 are remapped to CoS 0.
Catalyst 6500
257
Example 10-33 DSCP-to-CoS Mapping Modication on the Catalyst 6500 (CatOS and Cisco IOS)
CAT6500-CATOS> (enable) set qos dscp-cos-map 8-15:0
QoS dscp-cos-map set successfully.
CAT6500-CATOS> (enable)
CAT6500-IOS(config)#mls qos map dscp-cos 8 9 10 11 12 13 14 15 to 0
CAT6500-IOS(config)#
DSCP-to-DSCP maps, or DSCP mutation maps, also can be congured explicitly on the
Catalyst 6500, but DSCP mutation currently is in native IOS mode only. Up to 15 DSCP
mutation maps can be congured on the Catalyst 6500. The commands to congure
DSCP mutation maps on the 6500 are identical to those used in the examples of DSCP
mutation previously discussed in this chapter.
NOTE
By default, microow policers affect only trafc routed by the MSFC. To enable microow
policing of bridged trafc, either the CatOS set qos bridged-microow-policing enable
global command or the Cisco IOS mls qos bridged interface command must be used.
The commands to congure microow policing on the Catalyst 6500 are shown in
Example 10-34, where no single ow is permitted to exceed 1 Mbps. In CatOS, this
requires a microow policer to be dened and referenced by an ACL. The ACL, in turn, is
committed and mapped to the interface. In Cisco IOS, an MQC policy is dened with the
police ow keywords and is attached to an interface. Notice in Example 10-34 that policing
rates might be adjusted marginally because of hardware granularity restrictions.
Aggregate policers can be dened on a per-interface basis. Alternatively, you can dene
named aggregate policers that can be applied to multiple interfaces.
258
Example 10-34 Conguring Microow Policing on the Catalyst 6500 (CatOS and Cisco IOS)
CAT6500-CATOS> (enable) set qos policer microflow ONE-MEG-FLOWS
rate 1000 burst 8 drop
QoS policer for microflow ONE-MEG-FLOWS created successfully.
Rate is set to 992 and burst is set to 8 in hardware due to hardware granularity.
CAT6500-CATOS> (enable) set qos acl ip ONE-MEG-FLOW-ACL dscp 0
microflow ONE-MEG-FLOWS ip any any
ONE-MEG-FLOW-ACL editbuffer modified. Use 'commit' command to apply changes.
CAT6500-CATOS> (enable) commit qos acl ONE-MEG-FLOW-ACL
QoS ACL 'ONE-MEG-FLOW-ACL' successfully committed.
CAT6500-CATOS> (enable) set qos acl map ONE-MEG-FLOW-ACL 3/1
ACL ONE-MEG-FLOW-ACL is successfully mapped to port 3/1.
CAT6500-CATOS> (enable)
CAT6500-IOS(config)#access-list 1 permit any
CAT6500-IOS(config)#class-map ANY
CAT6500-IOS(config-cmap)#match access-group 1
CAT6500-IOS(config-cmap)#policy-map MICROFLOW
CAT6500-IOS(config-pmap)#class ANY
CAT6500-IOS(config-pmap-c)#police
police flow 1000000 8000 conform transmit
exceed-action drop
CAT6500-IOS(config-pmap-c)#interface FastEthernet 3/1
CAT6500-IOS(config-if)#service-policy input MICROFLOW
Furthermore, aggregate policers on the PFC2 or PFC3 support the added functionality of
dual-rate policing, as dened in RFC 2698 and overviewed in Chapter 4, Policing and
Shaping Tools, under the Two-Rate Three-Color Marker section. Dual-rate policers
require dening not only a CIR, but also a PIR. However, the out-of-prole PIR action
(violate) cannot be less severe than the out-of-prole CIR action (exceed). For instance,
if the exceed action is to mark down, the violate action cannot be to transmit.
In Example 10-35, FTP trafc is transmitted with DSCP AF11 (DSCP 10) if it is less than
1 Mbps. Any FTP trafc over 1 Mbps but less than 2 Mbps is marked down to AF12 (DSCP
12). Any FTP trafc in excess of 2 Mbps is marked down further to AF13 (DSCP 14). The
aggregate policing policy is applied to VLAN 10 as a whole.
Example 10-35 Conguring Dual-Rate Aggregate Policers on the Catalyst 6500 (CatOS and
Cisco IOS)
CAT6500-CATOS> (enable) set qos policed-dscp-map normal 10:12
CAT6500-CATOS> (enable) set qos policed-dscp-map excess 10:14
CAT6500-CATOS> (enable) set qos policer aggregate FTP-POLICER
rate 1000 policed-dscp erate 2000 policed-dscp burst 8 eburst 8
QoS policer for aggregate FTP-POLICER created successfully.
Rate is set to 992 and erate is set 1984 and burst is set to 8
and eburst is set to 8 in hardware due to hardware granularity.
CAT6500-CATOS> (enable) set qos acl ip FTP-ACL dscp 10 aggregate FTP-POLICER
tcp any any eq ftp
FTP-ACL editbuffer modified. Use 'commit' command to apply changes.
Catalyst 6500
259
Example 10-35 Conguring Dual-Rate Aggregate Policers on the Catalyst 6500 (CatOS and
Microow and aggregate policers are not mutually exclusive. For example, you could
create a microow policer with a bandwidth limit suitable for individuals in a group, and
you could create a named aggregate policer with bandwidth limits suitable for the group as
a whole. You could include both policers in policy map classes that match the groups
trafc. The combination would affect individual ows separately and the group aggregately.
continues
260
Example 10-36 Queue Structure Verication on the Catalyst 6500 (CatOS and Cisco IOS) (Continued)
Duplex
Trunk encap type
Trunk mode
Channel
Broadcast suppression
Flow control
Security
Dot1x
Membership
Fast start
QOS scheduling
full
802.1Q,ISL
on,off,desirable,auto,nonegotiate
yes
percentage(0-100)
receive-(off,on,desired),send-(off,on,desired)
yes
yes
static,dynamic
yes
rx-(1p1q4t),tx-(1p2q2t)
1p2q2t
CAT6500-CATOS> (enable)
CAT6500-IOS#show
show queueing interface gig 1/1
Interface GigabitEthernet1/1 queueing strategy:
Port QoS is enabled
Trust state: trust DSCP
Extend trust state: not trusted [COS = 0]
Default COS is 0
Queueing Mode In Tx direction: mode-cos
Transmit queues [type = 1p2q2t
1p2q2t]:
...
CAT6500-IOS#
Weighted Round-Robin
2q2t indicates two standard queues, each with two congurable tail-drop thresholds.
1p2q1t indicates the following:
One strict-priority queue
Two standard queues, each with one WRED-drop threshold
One noncongurable (100 percent) tail-drop threshold
Catalyst 6500
261
For port types with a strict-priority queue, the switch services trafc in the strict-priority
transmit queue before servicing the standard queues. When the switch is servicing a
standard queue, after transmitting a packet, it checks for trafc in the strict-priority queue.
If the switch detects trafc in the strict-priority queue, it suspends its service of the standard
queue and completes service of all trafc in the strict-priority queue before returning to the
standard queue.
Catalyst 6500 PFC QoS schedules trafc through the transmit queues based on Layer 2 CoS
values. In the default conguration, PFC QoS assigns all trafc with CoS 5 to the strictpriority queue (if present); PFC QoS assigns all other trafc to standard queues. In the
absence of a strict-priority queue, PFC QoS assigns all trafc to the standard queues.
NOTE
The default queue sizes, thresholds denitions, and bandwidth allocation ratios are usually
adequate for most cases. In the rare event that these need to be tuned, experienced administrators should refer to Cisco Catalyst 6500 documentation for default values for threshold
percentages, queue sizes, and bandwidth-allocation ratios for each queuing structure.
Keep these points in mind when conguring CoS to queue/threshold assignments and
parameters:
The rst percentage that you enter sets the lowest-priority threshold.
The second percentage that you enter sets the next highest-priority threshold.
The last percentage that you enter sets the highest-priority threshold.
The percentages range from 1 to 100. A value of 10 indicates a threshold when the
buffer is 10 percent full.
262
The low-WRED value is the trafc level under which no trafc is dropped. The lowWRED value must be lower than the high-WRED value.
The high-WRED value is the trafc level above which all trafc is dropped.
Low-WRED and high-WRED values are a percentage of the queue capacity (the
range is from 1 to 100).
Trafc in the queue between the low- and high-WRED values has an increasing
chance of being dropped as the queue lls.
In the 1P2Q2T model shown in Example 10-37, Scavenger trafc (CoS 1) is mapped to the
rst standard queue, rst threshold; Best-Effort trafc (CoS 0) is mapped to the rst queue,
second threshold; Transactional Data, Network-Management trafc (CoS 2), and Video
(CoS 4) are mapped to the second queue, rst threshold; Call-Signaling and NetworkControl trafc (CoS values 3, 6, and 7) are mapped to the second queue, second threshold.
Voice (CoS 5) is mapped to the priority queue.
Example 10-37 Conguring CoS-to-Queue/Threshold Assignments on the Catalyst 6500 (CatOS and Cisco IOS)
CAT6500-CATOS> (enable) set qos map 1p2q2t tx 1 1 cos 1
QoS tx priority queue and threshold mapped to cos successfully.
CAT6500-CATOS> (enable) set qos map 1p2q2t tx 1 2 cos 0
QoS tx priority queue and threshold mapped to cos successfully.
CAT6500-CATOS> (enable) set qos map 1p2q2t tx 2 1 cos 2,4
QoS tx priority queue and threshold mapped to cos successfully.
CAT6500-CATOS> (enable) set qos map 1p2q2t tx 2 2 cos 3,6,7
QoS tx priority queue and threshold mapped to cos successfully.
CAT6500-CATOS> (enable) set qos map 1p2q2t tx 3 1 cos 5
QoS tx priority queue and threshold mapped to cos successfully.
CAT6500-CATOS> (enable)
CAT6500-IOS(config)# interface GigabitEthernet2/1
CAT6500-IOS(config-if)#wrr-queue cos-map 1 1 1
cos-map configured on: Gi2/1 Gi2/2 Gi2/3 Gi2/4 Gi2/5
CAT6500-IOS(config-if)#wrr-queue cos-map 1 2 0
cos-map configured on: Gi2/1 Gi2/2 Gi2/3 Gi2/4 Gi2/5
CAT6500-IOS(config-if)#wrr-queue cos-map 2 1 2 4
cos-map configured on: Gi2/1 Gi2/2 Gi2/3 Gi2/4 Gi2/5
CAT6500-IOS(config-if)#wrr-queue cos-map 2 2 3 6 7
cos-map configured on: Gi2/1 Gi2/2 Gi2/3 Gi2/4 Gi2/5
CAT6500-IOS(config-if)#priority-queue cos-map 1 5
cos-map configured on: Gi2/1 Gi2/2 Gi2/3 Gi2/4 Gi2/5
CAT6500-IOS(config-if)#
Summary
NOTE
263
Notice that although the number of the priority queue in CatOS will be 3 (or higher), in
Cisco IOS, the priority queue number when using the priority-queue cos-map interface
command is always 1.
Summary
For QoS features to be available at line rates in campus environments, they have to be done
in hardware. Porting QoS features to hardware presents many advantages, such as the capability to mark and police at the trafc sources, and the enforcement of trust boundaries and
queuing at (momentarily) congested uplinks and downlinks. However, porting QoS functionality into hardware also presents an undesired caveat from a conguration and management perspective: As hardware varies, QoS also does in functionality and conguration,
leading to signicant complexity in managing campus QoS. To address this caveat, tools
such as MQC and AutoQoS are continuing to be developed to simplify campus QoS.
This chapter examined basic Catalyst QoS models, which, for the most part, can be broken
down into three main areas:
Having laid a framework for a generic Catalyst QoS model, the model was applied to each
of the main Catalyst platforms (at the time of writing), including the Catalyst 2950, 2970,
3550, 3560, 3750, 4500, and 6500. Conguration syntax and idiosyncrasies were addressed
to lay a basic context for the design discussions to follow.
264
Table 10-5 shows a summary of the QoS features supported by Catalyst platforms.
Table 10-5
Platform/
Feature
Catalyst
2950
Catalyst
3550
Catalyst
2970/3560/
3750
Catalyst
4500
Catalyst 6500
QoS on by
default?
Yes
No
No
No
No
Untrusted
Untrusted
Untrusted
Untrusted
Untrusted
Port-based QoS
Yes
Yes
Yes
Yes
Yes
VLAN-based
QoS
No
Yes
No
Yes
Yes
Full DSCP-CoS
maps
No
Yes
Yes
Yes
Yes
DSCP mutation
No
Yes
Yes
No
Yes
Ingress policing
Yes
Yes
Yes
Yes
Yes
Egress policing
No
Yes
Yes
Yes
Yes
Aggregate
policing
No
Yes
Yes
Yes
Yes
Dual-rate policing No
No
No
No
Yes
Microow
policing
No
No
No
No
Yes
Per-user
microow
policing
No
No
No
No
PFC3 only
6 per 10/100
ports; 60 per GE
ports
1020 per
port
Minimum
policing rate/
granularity
1 Mbps
8 kbps
8 kbps
32 kbps
32 kbps
Summary
Table 10-5
265
Platform/
Feature
Catalyst
2950
Catalyst
3550
Catalyst
2970/3560/
3750
Catalyst
4500
Catalyst 6500
Queuing
structures
4Q1T or 1P3Q1T
10/100 ports:
4Q1T or 1P3Q1T
4Q3T or
1P3Q3T
4Q1T or
1P3Q1T
GE ports: 4Q2T or
1P3Q2T
(Line-card
dependent)
2Q2T
1P2Q1T
1P2Q2T
1P3Q1T
1P3Q8T
1P7Q8T
Priority queue
Q4
Q4
Q1
Q3
(Line-card
dependent)
2Q2T: None
1P2Q1T: Q3
1P2Q2T: Q3
1P3Q1T: Q4
1P3Q8T: Q4
1P7Q8T: Q8
WTD
No
No
Yes
No
No
WRED
No
Yes
No
No
(Line-card
dependent)
2Q2T: No
1P2Q1T: Yes
1P2Q2T: Yes
1P3Q1T: Yes
1P3Q8T: Yes
1P7Q8T: Yes
DBL
No
No
No
Yes
No
AutoQoS
Yes
Yes
Yes
Yes
CatOS: Yes
Cisco IOS: No
266
NOTE
Catalyst 4500 refers to Catalyst 4500 with Sup3-5 running Cisco IOS; Catalyst 6500
refers to Catalyst 6500 with PFC2 (Supervisor 2) or PFC3 (Supervisor 720) running either
CatOS or Cisco IOS. All values were current at the time of writing; check the Cisco
platform documentation for the latest information at http://www.cisco.com/univercd/home/
home.htm.
Further Reading
Books:
Flannagan, Micheal, Richard Froom, and Kevin Turek. Cisco Catalyst QoS: Quality
of Service in Campus Networks. Indianapolis: Cisco Press, 2003.
This chapter discusses wireless LAN QoS tools, including the following:
CHAPTER
11
270
EDCF-Based
QoS
AP1200
Cisco
CallManager
Enterprise
Network
AP provides EDCF-based
mechanisms for downstream
wireless QoS, based upon
handset registration, CoS, or DSCP.
VoIP
Phone
Streaming
Video
They prioritize packets based on DSCP value, client type (such as a wireless phone),
or the priority value in the 802.1q or 802.1p tag; however, they do not classify packets.
They support EDCF (which is discussed in more detail in the section titled IEEE
802.11e EDCF), such as queuing on the (downstream) radio egress port only.
They support only FIFO queuing on the (upstream) Ethernet egress port.
They support Spectralink phones using the class-map IP protocol clause with the
protocol value set to 119.
They support only 802.1Q/P tagged packets. Access points do not support ISL.
They support only the MQC policy-map set cos action.
They prioritize the trafc from voice clients (such as Symbol phones) over trafc from
other clients when the QoS Element for Wireless Phones (which is discussed later in
this chapter in the section titled QoS Basic Service Set Information Element)
feature is enabled.
271
Just as in other media, you might not notice the effects of QoS on a lightly loaded wireless
LAN (WLAN). The benets of QoS become more obvious as the load on the wireless LAN
increases, keeping the latency, jitter, and loss for selected trafc types within an acceptable
range.
QoS on the wireless LAN focuses on downstream prioritization from the access point.
Radio Downstream
Ethernet Downstream
Network
Access Point
Radio Upstream
Downstream QoS only
Access Switch
Ethernet Upstream
Bidirectional QoS
Ethernet downstream refers to trafc leaving the switch/router traveling to the access point
(AP). QoS may be applied at this point to prioritize and rate-limit trafc to the AP.
Radio downstream QoS refers to the trafc leaving the AP and traveling to the WLAN
clients. Radio downstream QoS is the primary focus of this chapter.
Radio upstream QoS refers to trafc leaving the WLAN clients and traveling to the AP. No
vendor support is currently available for radio upstream QoS features for WLAN clients.
This support is specied in the 802.11e draft but has not yet been implemented. By providing downstream prioritization from the AP, upstream client trafc is treated as best effort.
A client must compete with other clients for (upstream) transmission and also must compete with best-effort (downstream) transmission from the AP because of the half-duplex
nature of WLAN radio. Under certain load conditions, a client can experience upstream
congestion, and the performance of QoS sensitive applications might be unacceptable,
despite the downstream QoS features on the AP.
Ethernet upstream refers to trafc leaving the AP traveling to the switch. The AP classies
trafc from the AP to the upstream network according to the trafc classication. However,
only FIFO queuing is supported (which is adequate for almost all cases) at this point.
272
Interframe Spaces
Interframe Spaces, shown in Figure 11-3, allow 802.11 to control which trafc gets rst
access to the channel when carrier sense declares the channel to be free.
Figure 11-3 IEEE 802.11 DCF Interframe Spaces
DIFS
DIFS
PIFS
Contention Window
SIFS
Busy Medium
Backoff Window
Next Frame
(t)
Slot Time
Defer Access
SIFS
Important frames (such as acknowledgments) await the SIFS before transmitting. There is
no random backoff when using the SIFS because frames using the SIFS are used when
multiple stations would not be trying to send frames at the same time. The SIFS provide a
short and deterministic delay for packets that must go through as soon as possible. SIFS are
not available for use by data frames; only 802.11 management and control frames use SIFS.
273
PIFS
An optional portion of the 802.11 standard denes priority mechanisms for trafc via PIFS.
No random backoff mechanisms are associated with PIFS because it relies solely on a
polling mechanism to control which station may transmit. The option has not been adopted
widely because of the associated overhead and lack of exibility in its application.
DIFS
Data frames must wait out the DIFS before beginning the random backoff procedure, which
is part of the DCF. This longer wait ensures that trafc using SIFS or PIFS timing always
gets an opportunity to send before any trafc using the DIFS attempts to send. (In other
words, management or priority trafc always gets to send before generic data.)
is generated.
2 The station waits until the channel is free for a DIFS interval.
3 If the channel is still free, the random backoff number is decremented once for every
station), the decrementing of the random backoff number stops and steps 2 through 4
are repeated.
5 If the channel remains free until the random backoff number reaches 0, the frame may
be sent.
Figure 11-4 shows a simplied example of how the DCF process works. (In this simplied
DCF example, no acknowledgments are shown and no fragmentation occurs.)
Figure 11-4 IEEE 802.11 DCF Transmission Example
DIFS
Station A
Station B
Station C
Station D
Station E
DIFS
DIFS
Frame
Def er
Defer
Defer
Frame
Defer
Defer
Frame
Defer
Defer
Backoff Time
Defer
Frame
274
When the DIFS is complete, stations that want to send a frame can begin decrementing their backoff counters (decrementing by one for every slot time that passes). If
their backoff counters reach 0 and the wire is available, they may send their frame.
3 Station Bs backoff counter reaches 0 before Stations C and D, so Station B begins
menting their backoff counters and again defer until the frame is transmitted and a
DIFS has passed.
5 During the time that Station B is transmitting a frame, Station E gets a frame to
transmit, but because Station B is sending a frame, Station E must defer in the same
manner as Stations C and D.
6 When Station B completes transmission and the DIFS has passed, stations with
frames to send begin decrementing their backoff counters again. In this case, Station
Ds backoff counter reaches 0 rst, and the station begins transmission of its frame.
7 The process continues as trafc arrives on different stations.
CWmin
CWmax
The random number used in the random backoff is initially a number between 0 and
CWmin. If the initial random backoff expires without successfully sending the frame, the
station or AP increments the retry counter and doubles the value of the random backoff
window size. This doubling in size continues until the size equals CWmax. The retries
continue until the maximum retries or Time-To-Live (TTL) is reached. This process of
doubling the backoff window often is referred to as a binary exponential backoff; it is
illustrated in Figure 11-5.
275
511
aCWmax
255
127
aCWmin
63
31
Retries
276
CWmin[10]
CWmin[7]
CWmin[6]
DIFS
Contention Window
Busy Medium
Backoff Window
(t)
Next Frame
Slot Time
Defer Access
Figure 11-7 illustrates how different CWmin values (by trafc class) impact trafc priority
over the WLAN.
Figure 11-7 IEEE 802.11e EDCF Operation Example
DIFS
DIFS
DIFS
DIFS
Frame
Station X
Defer
Voice 1
Defer
Best Effort 1
Voice 2
Defer
Best Effort 2
Defer
Voice 3
Frame
Defer
Defer
Defer
Defer
Defer
Frame
Defer
Defer
Defer
Defer
Frame
Defer
Frame
Backoff Time
Backoff Time Remaining
also must send frames. Each station defers (because a frame already was being
transmitted), and each station generates a random backoff number.
277
2 Stations Voice 1 and Voice 2 have the trafc classication of voice, so they use an ini-
tial CWmin of 3 and, therefore, generate short random backoff values. Best Effort 1
and Best Effort 2 generate longer random backoff times because their CWmin value
is 31.
3 Voice 1 has the shortest random backoff time and, therefore, starts transmitting rst.
When Voice 1 starts transmitting, all other stations defer. While Voice 1 station is
transmitting, station Voice 3 nds that it, too, needs to send a frame and generates a
random backoff number. However, station Voice 3 defers transmission because of
station Voice 1s transmission.
4 When station Voice 1 nishes transmitting, all stations await the DIFS and then begin
transmission. All other stations defer. This happens even though there is a voice
station waiting to transmit. This shows that best-effort trafc is not starved by voice
trafc because the process of random backoff decrementing eventually brings the
best-effort backoff value down to similar values as initially generated by high-priority
trafc. Additionally, the random process occasionally generates a small random
backoff number for best-effort trafc.
8 When Best Effort 2 nishes transmitting, all stations await the DIFS and then begin
The overall impact of the different CWmin and CWmax values is statistical in nature. It is
sometimes simpler to compare two examples and show the impact of these different values
in the average times that should be generated by the random backoff counters.
If Voice and Best Effort are compared, these trafc categories have default dened CWmin
values of 2 and 5, and CWmax values of 8 and 10, respectively. Each class of trafc can
have a different xed slot time, which species the xed slot backoff interval (0 to 20). The
default values for these parameters for each trafc class are shown in Table 11-1.
From Table 11-1, you can see that that if two stations were contending to transmit voice and
best-effort data at the same time, the station transmitting voice would back off to a random
value between 3 and 4 (Voice CWmin and CWmax), while the station transmitting date
would back off to a value between 5 and 10 (Best Effort CWmin and CWmax). Therefore,
the voice frame would be transmitted before the data frame.
278
Table 11-1
NOTE
Cisco Access Points IEEE 802.11e EDCF CWmin, CWmax, and Fixed Slot Time Default Values
(Cisco IOS 12.2[15]JA)
Class of Service
CWmin
(Min Contention
Window)
CWmax
(Max Contention
Window)
Best Effort
10
Background
10
Within EDCF, voice statistically is transmitted before best-effort data. However, voice
might not be serviced ahead of data in every case because of the random element of the
algorithm. Thus, although EDCF does provide a mechanism for preferentially servicing
voice, it is important to note that this is not a strict-priority mechanism.
The average maximum random backoff value gives an indication of how quickly and how
large the random backoff counters can grow in the event of a retransmission. Trafc classes
with the smallest average maximum values behave the most aggressively.
No matter how many times it has retried, voices random backoff delay should not, on
average, be above that of the minimum delay of best-effort trafc. This means that the
average worst-case backoff delay for voice trafc would be the same as the average best
case for best-effort trafc.
NOTE
In this EDCF operation example, all WLAN clients are treated equally for upstream
transmission (from the WLAN clients to the AP).
279
transport data within the WLAN. The Frame Loss Rate eld indicates the portion of
transmitted frames that requires retransmission or is discarded as undeliverable.
Figure 11-8 IEEE 802.11e Draft Version 3.3: QBSS IE Implementation
Element ID
(11)
Length
(6)
Station Count
(2 Octets)
Channel
Utilization
(1 Octet)
Frame
Loss Rate
(1 Octet)
Enabling IEEE 802.11 QBSS adds information to the access point beacons and probe
responses. This information helps some 802.11 phones make intelligent choices about the
access point with which they should associate. Some phones do not associate with an access
point without this additional information. The QBSS can be enabled through the Cisco IOS
CLI (as shown in Example 11-1) or by the web GUI (as shown in Figure 11-11).
Example 11-1 Enabling IEEE 802.11E QBSS Through Cisco IOS CLI on a Cisco Aironet 1100 AP
AP1100(config)#dot11
dot11 phone
Abbreviation
Traffic Type
BK
Background
Spare
0 (default)
BE
Best effort
EE
Excellent effort
CL
Controlled load
VI
VO
NC
Network control
Compatibility issues are presented with the use of these 802.1D classes of service with
respect to Cisco defaults.
For example, Cisco telephony devices, such as IP phones, follow the IETF recommendations (RFC 3268) of marking real-time trafc (voice) to DSCP EF. The simplest mapping
280
from (6-bit) DSCP values to (3-bit) IP Precedence, CoS, or even MPLS EXP values is to
use the three most signicant bits of the DSCP for the IP Precedence/CoS/MPLS EXP values.
This would map DSCP EF to CoS 5, which is what Cisco devices do. However, according
to the (aging) IEEE 802.1D standard, voice should be mapped to CoS 6. To compensate for
this seeming inconsistency between standards, Cisco Aironet software (by default when
QoS is enabled) maps IEEE 802.1Q/p CoS 5 to IEEE 802.11e CoS 6 so that voice trafc is
given highest priority over the WLAN.
NOTE
Packets already classied. When the access point receives packets from a QoSenabled switch or router that already has classied the packets with nonzero 802.1Q/P
user_priority values, the access point uses that classication and does not apply other
QoS policy rules to the packets. An existing classication takes precedence over all
other policies on the access point.
Even if you have not congured a QoS policy, the access point always honors tagged
802.1P packets that it receives over the radio interface.
QoS Element for Wireless Phones setting. If you enable the QoS Element for
Wireless Phones setting, trafc from voice clients takes priority over other trafc,
regardless of other policy settings. The QoS Element for Wireless Phones setting takes
precedence over other policies, second only to previously assigned packet
classications.
Policies you create on the access point. QoS policies that you create and apply to
VLANs or to the access point interfaces are third in precedence after previously
classied packets and the QoS Element for Wireless Phones setting.
Default classication for all packets on VLAN. If you set a default classication for
all packets on a VLAN, that policy is fourth in the precedence list.
281
Alternatively, QoS for APs can be congured from the web GUI. From the home page,
choose Services > QoS to bring up the main QoS conguration screen, shown in Figure 11-9.
282
Figure 11-9
CWmin and CWmax values for each of the four queues can be adjusted from the 802.11B
Access Categories tab (see Figure 11-10).
Advanced options, such as enabling the QBSS information element and disabling the
default AVVID priority mapping (of 802.1Q/p CoS 5 to IEEE 802.11e CoS 6), can be
selected from the Advanced screen, shown in Figure 11-11.
283
Figure 11-10 Cisco Aironet Software Web-Based Congurator: 802.11B Access Categories Screen
NOTE
The option for mapping IEEE 802.1Q/p Ethernet packets marked with CoS 5 to IEEE
802.11e CoS 6 (shown in the Advanced screen) is enabled by default. This enables simpler
integration with existing AVVID networks already using 802.1Q/p CoS 5 to identify voice
trafc. This option also can be disabled (if necessary) through the Cisco IOS CLI with the
no dot11 priority-map avvid command.
284
Figure 11-11 Cisco Aironet Software Web-Based Congurator: QoS Advanced Screen
Summary
As WLANs continue to proliferate into enterprises, into small/medium businesses, into
mobile hotspots, and even within home networks, their use is expanding rapidly to carry
multiservice trafc, including time-sensitive/interactive applications such as wireless VoIP
and video.
To ensure that the WLAN does not become the weakest link in an end-to-end QoS chain,
standards bodies such as the IEEE 802.11e working group are formalizing specications to
deliver granular service levels across WLAN media.
This chapter overviewed IEEE 802.11 DCF operation, including the function of interframe
spaces and contention windows. Building on this review, IEEE 802.11e EDCF was introduced; it allows for contention window variance for different trafc classes. EDCF operation was examined to demonstrate how contention window variance translates into relative
trafc class priorities on the WLAN. The IEEE 802.1e QBSS information element also was
covered in brief.
Further Reading
285
Cisco AP software QoS operation and conguration was introduced, including the Cisco
IOS MQC CLI for AP QoS and the web-based GUI screens required to set wireless accesspoint QoS.
Further Reading
Conguring QoS for WLANs: Cisco IOS Software 12.2.15JA documentation: http://
www.cisco.com/univercd/cc/td/doc/product/wireless/airo1100/accsspts/i12215ja/
i12215sc/s15qos.htm.
PA R T
III
Chapter 12
This chapter discusses QoS considerations and design principles for the access, distribution, and core layers of an enterprise campus network. These include access edge models
for trusted, untrusted, and conditionally trusted endpoints, along with queuing models that
vary on a per-platform or per-line card basis.
Detailed QoS designs for the following Catalyst switch platforms are presented:
Catalyst 2950
Catalyst 2970
Catalyst 3550
Catalyst 3560
Catalyst 3750
Catalyst 4500 (Supervisors II+ through V)
Catalyst 6500 (Supervisor 2/PFC2 and Supervisor 720/PFC3)
CHAPTER
12
290
A second important QoS design principle relating to access-edge QoS design is that
unwanted trafc ows should be policed as close to their sources as possible. There is little
sense in forwarding unwanted trafc only to police and drop it at a subsequent node. This
is especially the case when the unwanted trafc is the result of DoS or worm attacks. The
overwhelming volumes of trafc that such attacks create can readily drive network device
processors to their maximum levels, causing network outages.
The third important design principle is that QoS always should be performed in hardware
rather than software when a choice exists. Cisco IOS routers perform QoS in software,
which places additional taxes 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, as such, do not tax their main CPUs to administer QoS policies.
Therefore, complex QoS policies can be applied at Gigabit and Ten Gigabit Ethernet line
speeds in these switches.
For these reasons, QoS policies, such as classication and marking policies to establish and
enforce trust boundaries, as well as policers to protect against undesired ows, should be
enabled at the access edge of the LAN. However, the need for queuing in the campus should
not be dismissed.
Some studies have shown that 95 percent of the time, campus access-layer links are utilized
at less than 5 percent of their capacity. Such underutilization permits campus networks to
be designed to accommodate oversubscription among access, distribution, and core layers.
Oversubscription allows for uplinks to be utilized more efciently and, more important,
reduces the overall cost to build the campus network. Some typical values for campus
oversubscription are 20:1 for the access-to-distribution layers and 4:1 for the distributionto-core layers, as shown in Figure 12-1.
Figure 12-1 Typical Campus Oversubscription Ratios
Core
Si
Si
Typical 4:1
Oversubscription
Distribution
Si
Si
Typical 20:1
Oversubscription
Access
291
Under normal operating conditions, it is quite rare for campus networks to experience
congestion and, thus, have a need for queuing. When congestion does occur, it is usually
momentary and not sustained, as at a WAN edge.
Nonetheless, 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 congestionregardless of how rarely this actually might
occur. Because of the oversubscription ratios just discussed, the potential for congestion
exists in campus uplinks. Furthermore, the potential for congestion also exists in campus
downlinks because of mismatches (such as Gigabit EthernettoFast Ethernet links). In
both cases, the only way to ensure service guarantees in the event of congestion is to enable
queuing at these points.
So far, this discussion for enabling queuing within the campus has revolved around network
requirements under normal operating conditions. However, probably the strongest case for
enabling QoS within the campus is to consider what happens under abnormal network
conditions, such as a DoS or worm attack. During such conditions, network trafc increases
exponentially until links are utilized fully. Without QoS, applications are drowned out by
the worm-generated trafc, causing DoS through unavailability. On the other hand, when
QoS policies are enabled within the campus (as detailed later in this chapter), VoIP, critical
applications, and even Best-Effort trafc is protected and serviced if a worm attack occurs,
thus maintaining the networks availability.
In such worst-case scenarios, the intrinsic interdependencies of network QoS, highavailability, and security are clearly manifest.
So where is QoS required in the campus?
Access switches require the following QoS policies:
DSCP-trust policies
Queuing policies
Optionally, per-user microow policing policies (on distribution-layer Catalyst 6500s
with Supervisor 720s only)
292
Core
Si
Si
Si
Si
Distribution
Access
Some important considerations to keep in mind when dening campus QoS designs follow:
DoS/worm-mitigation strategies
Call-signaling TCP/UDP ports in use
Access-edge trust models
WAN aggregator and branch router connections
DoS/Worm-Mitigation Strategies
A proactive approach to mitigating DoS/worm ooding attacks within campus environments is to respond immediately to out-of-prole network behavior that indicates a DoS or
worm attack using access-layer policers. Such policers could meter trafc rates received
from endpoint devices, and when these exceed specied watermarks (at which point they
no longer are considered normal ows), these policers could mark down excess trafc.
DoS/Worm-Mitigation Strategies
293
In this respect, the policers would be fairly dumb. They would not be matching specic
network characteristics of specic types of attacks, but they simply would be metering
trafc volumes and responding to abnormally high volumes as close to the source as
possible. The simplicity of this approach negates the need for the policers to be programmed
with knowledge of the specic details of how the attack is being generated or propagated.
It is precisely this dumbness of such access-layer policers that enables them to maintain
relevancy as worms mutate and become more complex: The policers dont care how the
trafc was generated, what it looks like, or what port it is being served onall they care
about is how much trafc is being put onto the wire. Therefore, they continue to police even
advanced worms that continually change the tactics of how trafc is being generated.
For example, in most enterprises, it is abnormal (within a 95-percent statistical condence
interval) for PCs to generate sustained trafc in excess of 5 percent of their links capacity.
In the case of a Fast Ethernet switch port, this would mean that it would be unusual in most
organizations for an end users PC to generate more than 5 Mbps of uplink trafc on a
sustained basis.
NOTE
It is important to recognize that this value ( 5 percent) for normal access-edge utilization
by endpoints is just an example value. This value likely varies from industry vertical to
vertical, and from enterprise to enterprise. To keep things simple, this 5-percent value is
being used in the examples presented in this design chapter.
It is important to recognize that what is being proposed is not policing all trafc to 5 Mbps
and automatically dropping the excess. If that was the case, there would not be much reason
to deploy Fast Ethernet or Gigabit Ethernet switch ports to endpoint devices because even
10BASE-T Ethernet switch ports would have more uplink capacity than a 5 Mbps policerenforced limit. Furthermore, such an approach supremely would penalize legitimate trafc
that did exceed 5 Mbps on an FE switch port.
A less draconian approach is to couple access-layer policers with hardware and software
(campus, WAN, VPN) queuing polices, with both sets of policies provisioning for a lessthan best-effort Scavenger class.
This could work by having access-layer policers mark down out-of-prole trafc to DSCP
CS1 (Scavenger) and then have all congestion-management policies (whether in Catalyst
hardware or in Cisco IOS Software) provision a less-than best-effort service for any trafc
marked to CS1 during periods of congestion.
294
295
WAN links also would be protected: VoIP, Critical Data, and even Best-Effort ows
would continue to receive priority over any trafc marked down to Scavenger/CS1. This
is a huge advantage because generally WAN links are the rst to be overwhelmed by DoS/
worm attacks.
The bottom line is that access-layer policers signicantly will mitigate network trafc
generated by DoS or worm attacks.
It is important to recognize the distinction between mitigating an attack and preventing it
entirely: The strategy being presented will not guarantee that no DoS or worm attacks ever
will happen; it only reduces the risk and impact that such attacks could have on the campus
network infrastructure and then, by extension, the WAN and VPN network infrastructure.
Remote
Source
Port
CallManager
Destination
Port
DTC
Remote Devices
CallManagers in the
same cluster
SSH
TCP 22
Telnet
TCP 23
Telnet client
DNS
UDP 53
DNS servers
UDP 67
DHCP server
DHCP
UDP 68
DHCP
UDP 68
UDP 67
DHCP client
TFTP
UDP 69
HTTP
TCP 80
Administrator/user
web browsers
OSI (DAP,
DSP, DISP)
DCD Directory
NTP
UDP 123
WINS
SNMP
UDP 161
SNMP Trap
Notes
WINS Server
Windows Internet
Name Service
TCP 389
Directory Services
When integrated
with Corporate
Directory
UDP 162
LDAP
TCP 389
HTTPS/SSL
TCP 443
SMB
TCP 445
TCP 445
CallManagers in the
same cluster
Syslog
TCP 514
UDP 514
Syslog service
Protocol
296
Table 12-1
Table 12-1
Protocol
Remote
Source
Port
CallManager
Destination
Port
RMI
TCP 1099 to
1129
MS SQL
TCP 1433
TCP 1024 to
4999
TCP 1720
H.323, H.225/ICT
TCP 1024 to
4999
H.323, H.245
TCP 1024 to
4999
TCP 1433
CallManagers in the
same cluster
TCP 1719
Gatekeeper RAS
CallManager earlier
than 3.3, Cisco
Conference
Connection
TCP 1719
Gatekeeper RAS
CallManager 3.3
TCP 1720
H.323 gateways,
anonymous device
Cisco Conference
Connection,
non-Gatekeepercontrolled H.323
trunk
CallManager
Gatekeepercontrolled H.323
trunks
TCP 1024 to
4999
CallManager 3.3
CallManager H.323
gateways,
anonymous device,
H.323 trunks
continues
H.323, H.225
Notes
RMI Service
Attendant Console
H.323 RAS
H.323 RAS
Remote Devices
297
Remote Devices
H.323, H.245
TCP 11000 to
11999
SCCP
TCP 2000
Skinny Gateway
(Analog)
TCP 2001
Analog Skinny
Gateway
Skinny Gateway
(Digital)
TCP 2002
Digital Skinny
Gateway
MGCP Control
UDP 2427
MGCP Gateway
Control
MGCP Backhaul
TCP 2428
MGCP Gateways
Backhaul
RTS Serv
2500
Cisco Extended
Service
TCP 2551
Active/backup
determination
Cisco Extended
Service
TCP 2552
DB change
notication
RIS Data
Collector
TCP 2555
Inter-RIS
communication
RIS Data
Collector
TCP 2556
Notes
Protocol
Remote
Source
Port
298
Table 12-1
Table 12-1
Protocol
Remote
Source
Port
CallManager
Destination
Port
Remote Devices
Notes
Connects with CTI
Manager; used by
IVR, CCC, PA,
Cisco SoftPhone,
CRS, ICD, IPCC,
IPMA, Attendant
Console, and any
other application that
utilizes the TAPI or
JTAPI plug-in; TSP
TCP 2748
TAPI/JTAPI
applications
IPMA Service
TCP 2912
IPMA Assistant
Console
Media Streaming
Application
UDP 3001
Change notication
SCCP
TCP 3224
Media resources
MS Terminal
Services
TCP 3389
Windows Terminal
Services
Entercept HID
Agent
CallManager SIP
TCP/UDP 5060
VNC HTTP
Helper
TCP 580x
TCP 5000
Host Intrusion
Detection Console
TCP 5060
Conference bridges,
Xcoders
CTI/QBE
299
Remote Devices
Notes
VNC Display
TCP 690x
Virtual Network
Computer Display
Remote control
CallManager
Change
Notication
TCP 7727
CallManager change
notication, Cisco
database layer
monitor, Cisco
TFTP, Cisco IP
media streaming,
Cisco TCD, Cisco
MOH
Real-time change
notication
IPMA Service
TCP 8001
IP Manager
Assistant
Change notication
ICCS
TCP 8002
CallManagers in the
same cluster
Intracluster
communication
CTIM
TCP 8003
Cisco Tomcat
TCP 8007
Web requests
Cisco Tomcat
TCP 8009
Web requests
Cisco Tomcat
TCP 8111
Cisco Tomcat
TCP 8222
Cisco Tomcat
TCP 8333
TCP 8002
Protocol
Remote
Source
Port
300
Table 12-1
Table 12-1
Protocol
CallManager
Destination
Port
Remote Devices
Notes
Used for Directory
services, application
authentication/
conguration,
SoftPhone directory,
user directory
TCP 8404
Embedded Directory
Services
Cisco Tomcat
TCP 8444
Cisco Tomcat
TCP 8555
Cisco Tomcat
TCP 8998
Web requests
Cisco Tomcat
TCP 9007
RTP
Cisco SNMP
Trap Agent
UDP 16384
to 32767
UDP 61441
Cisco Alarm
Interface
DC Directory
301
302
Access
Distribution
Core
Si
Si
Si
Si
WAN Aggregators
2
3
Trust Boundary
1 Optimal Trust Boundary:
Trusted Endpoint
The denition of the trust boundary depends on the capabilities of the endpoints that are
being connected to the access edge of the LAN. Three main categories of endpoints exist,
as they relate to trust boundaries:
Trusted endpoints
Untrusted endpoints
Conditionally trusted endpoints
NOTE
303
IP phones, which often change switch ports as users move, more appropriately are included
in the category of conditionally trusted endpoints.
Video surveillance unitsThese (third-party) devices are used for security and
remote-monitoring purposes over an IP (as opposed to a closed-circuit) network.
These might support DSCP marking, in which case they can be considered trusted
endpoints.
304
Wireless access pointsSome wireless APs have the capability to mark or re-mark
802.1p CoS or DSCP values and, therefore, qualify as trusted endpoints. Examples
include Cisco Aironet 350, 1100, and 1200 series APs.
Wireless IP phonesMobile wireless IP phones can mark DSCP values for VoIP and
Call Signaling and pass these on to the wireless AP they are associated with.
Examples include the Cisco 7920G wireless IP phone.
When trusted endpoints are connected to a switch port, typically all that is required is
enabling the following interface command: mls qos trust dscp.
Optionally, if the trafc rate of the trusted application is known, the network administrator
could apply an access-layer policer to protect against out-of-prole rates, in case the trusted
endpoint somehow is compromised. For example, consider the case of an IP videoconferencing station that transmits 384 kbps of video (not including Layers 2 through 4 overhead)
and correctly marks this trafc to DSCP AF41. An access-edge ingress policer could be
applied to the switch port that this IP/VC station is connected to and could be congured to
trust up to 500 kbps (allowing for Layers 2 through 4 overhead and policer granularity) of
Interactive-Video trafc (marked AF41); excess trafc could be marked to CS1. Such a policy
would prevent network abuse if another device was inserted into the path (perhaps through
a hub) or if the trusted endpoint itself became compromised.
NOTE
305
In this context, SoftPhone can be used to refer to any PC-based IP telephony application.
A policer is recommended in this case because limits on the amount of trafc being marked
could be imposed (again, to prevent abuse). SoftPhones can use regular G.711 codecs (in
which case, 128 kbps is adequate), or they can be congured to use a G.722 (wide codec,
in which case 320 kbps is required). The tighter the policer is, the better (provided that
adequate bandwidth has been allocated for the applications requirements).
Additionally, the UDP ports used by SoftPhone can be dened explicitly within the application (instead of simply picking random ports within the UDP range of 16,383 to 32,767).
This is recommended, because this would allow for a more granular access list to match
legitimate SoftPhone trafc, thereby tightening the overall security of the policy.
Figure 12-4 illustrates the logic of such an access-edge policer marking SoftPhone trafc
from an untrusted PC endpoint.
Figure 12-4 Untrusted Endpoint Policing: PC with SoftPhone Example
Start
UDP
16384 to
32767
Yes
No
No
TCP
20002002
No
Yes
Yes
No
Yes
No
Re-Mark to DSCP EF
and Transmit
Re-Mark to DSCP 0
and Transmit
Re-Mark to DSCP CS1
and Transmit
The syntax for implementing such a policer might vary slightly from platform to platform,
as is detailed in the coming platform-specic sections.
306
As an example, assume that a single server is running multiple applicationsin this case,
SAP (TCP ports 3200 to 3203 and also 3600), Lotus Notes (TCP port 1352), and 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)
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 Data application and
should be marked to DSCP AF11.
Application baselining has shown that, 95 percent of the time, the trafc rates for SAP,
Lotus Notes, and IMAP are less than 15 Mbps, 35 Mbps, and 50 Mbps, respectively. No
other trafc should emanate from the server; to ensure this, a nal policer to catch any other
type trafc is included. Remember, if legitimate trafc temporarily exceeds these values,
no dropping or reordering of packets will occur. However, if this server becomes infected
and begins sending sustained trafc in excess of these normal rates, the excess would be
subject to aggressive dropping in the event of link congestion. Figure 12-5 shows the logic
of such a policer.
Figure 12-5 Untrusted Endpoint Policing: Multiapplication Server Example
Start
MCD ACLs
Mission-Critical
Data ACLs
Bulk
Data ACLs
Yes
No
Yes
35 Mbps
Yes
Yes
Yes
Re-Mark to DSCP 25
and Transmit
Re-Mark to DSCP CS1
and Transmit
No
No
Bulk Data
ACLs
15 Mbps
No
No
TD ACLs
Transactional
Data ACLs
Yes
No
Yes
No
Re-Mark to DSCP 0
and Transmit
Re-Mark to DSCP CS1
and Transmit
One of the critical concerns in deploying QoS designs for untrusted servers is to remember
that the applications usually are identied by source ports, not destination ports (as is the
case with client-to-server access lists).
Thus, the access lists for server-to-client trafc becomes this:
permit [ tcp | udp ] any [ eq | range ] any
307
308
Figure 12-6 Conditionally Trusted Endpoint: IP Phone Trust Boundary Extension and Operation
TRUST BOUNDARY
4
CoS 5 = DSCP 46
CoS 3 = DSCP 24
CoS 0 = DSCP 0
2
Voice = 5, Signaling = 3
All PC traffic is reset to CoS 0.
Cisco 7902GThe 7902G is an entry-level IP phone that addresses the voicecommunication needs of areas where only a minimal amount of features is required,
such as lobbies, hallways, and break rooms. These phones probably would not be
moved. The 7902G has only a single 10BASE-T Ethernet port on the back of the
phone; therefore, there is no hardware support to connect a PC to it.
Cisco 7905GThe 7905G is a basic IP phone that addresses the voicecommunication needs of a cubicle worker who conducts low to medium telephone
trafc. The Cisco 7905G has only a single 10BASE-T Ethernet port on the back of the
phone; therefore, there is no hardware support to connect a PC to it.
309
Cisco 7940GThe 7940G IP phone is suited best for an employee in a basic ofce
cubicle environmenta transaction-type worker, for examplewho conducts a
medium amount of business by telephone. The 7940G supports inline power and has
an integrated 10/100 Ethernet switch for connecting a PC.
Cisco 7960GThe 7960G is designed to meet the communication needs of a professional worker in an enclosed ofce environmentan employee who experiences a
high amount of phone trafc in the course of a business day. The 7960G supports
inline power and has an integrated 10/100 Ethernet switch for connecting a PC.
Cisco 7970GThe 7970G not only addresses the needs of the executive or major
decision maker, but also brings network data and applications to users without PCs.
This IP phone includes a backlit, high-resolution color touch-screen display. Currently, Cisco 7970G is the only Cisco IP phone that supports both Cisco prestandard
Power over Ethernet (PoE) and the IEEE 802.3af PoE. The 7970G has an integrated
10/100 Ethernet switch for connecting a PC.
All these IP phones have the capability to mark 802.1Q/p CoS values for both VoIP and Call
Signaling (default values are 5 and 3, respectively). Furthermore, they have the capability
to mark DSCP values for both VoIP and Call Signaling (current defaults are EF and AF31,
respectively; future software releases will change these values to EF and CS3, respectively).
IP phone models 7902G, 7905G, and 7910G lack the hardware to connecting a PC behind
the IP phone. All other IP phone models from the preceding list (except the 7912G) have
the hardware support to connect a PC behind the IP phone and also support 802.1Q/p CoS
re-marking of tagged packets that originate from such PCs.
The 10/100 Ethernet switch built into the 7912G does not have the support to re-mark CoS
values that might have been set by a PC, as illustrated in Figure 12-7. This re-marking
limitation represents a potential security hole for enterprises deploying these IP phones.
However, this hole can be plugged, for the most part, with access-edge policers, as will be
detailed in this chapter. It is important to note that if 7912G IP phones are deployed to users
that move locations, all user switch ports within the enterprise should have access-edge
policers set on them to ensure mobility and security if a 7912G user moves the phones to
another port.
310
Figure 12-7 Conditionally Trusted Endpoint: 7912G IP Phone Trust Boundary Extension and Operation
TRUST BOUNDARY
4
CoS 5 = DSCP 46
CoS 3 = DSCP 24
CoS 5 = DSCP 46
2
Voice = 5, Signaling = 3
No PC traffic is remarked.
NOTE
At the time of this writing, only the Catalyst 3550 family supports per-port and per-VLAN
policing as a feature. Other platforms already have committed to supporting this feature in
the near future. 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. Such examples are provided later in this chapter.
For example, the peak amounts of legitimate trafc originating from the voice VLAN
(VVLAN) are as follows:
128 kbps for Voice trafc (marked CoS 5/DSCP EFthis is 320 kbps, in the case
of G.722 codecs)
311
No other trafc should originate from the VVLAN, so the policer could be congured to
re-mark anything else from the VVLAN (because such trafc would be considered
illegitimate and indicative of an attack).
These policers then could be combined with a policer to meter trafc from the data
VLAN (DVLAN), marking down trafc in excess of 5 percent (5 Mbps for FE ports)
to Scavenger/CS1.
Figure 12-8 illustrates the logic of these policers.
Figure 12-8 Conditionally Trusted Endpoint Policing: IP Phone + PC (Basic Model)
Start
VVLAN +
DSCP EF
Yes
No
128 kbps
Yes
No
Drop
VVLAN +
DSCP AF31 or
CS3
Yes
Yes
32 kbps
Yes
5 Mbps
Yes
No
No
DVLAN
ANY
Yes
No
No
VVLAN
ANY
32 kbps
Re-Mark to DSCP 0
and Transmit
Re-Mark to DSCP CS1
and Transmit
Yes
No
Re-Mark to DSCP 0
and Transmit
Re-Mark to DSCP CS1
and Transmit
312
Desktop videoconferencing applications use the same UDP port range, by default, as does
SoftPhone. If the UDP ports that the desktop videoconferencing application uses can be
dened explicitly within the application, as with SoftPhone, two policers can be used: one
for IP/VC and another for SoftPhone. Otherwise, a single policer covering the UDP port
range of 16,384 to 32,767 is required. This policer would be provisioned for the worst-case
scenario of legitimate trafc. In this case, this would be the videoconferencing applications
requirement of 500 kbps (for a 384-kbps desktop IP/VC application), as compared to
SoftPhones requirement of 128 kbps (or 320 kbps for G.722 codecs).
Additional data VLAN policers can be added to meter Mission-Critical, Transactional, and
Bulk Data ows. Each of these classes can be policed on ingress to the switch port to an
in-prole amount, such as 5 percent each.
NOTE
Another factor to keep in mind is that certain Catalyst platforms allow only up to eight
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 dened for Call-Signaling trafc from SoftPhone, but an access list to identify
such trafc could be included within the Mission-Critical Data access lists, which is
detailed in the conguration examples presented later in this chapter.
Figure 12-9 illustrates the logic of these advanced policers.
VVLAN +
DSCP EF
Start
Yes
Yes
Yes
DVLAN +
MCD ACLs
DVLAN +
TD ACLs
500 kbps
Yes
DVLAN +
BD ACLs
Yes
Yes
Yes
5 Mbps
5 Mbps
No
No
Yes
Re-Mark to DSCP 25
and Transmit
Re-Mark to DSCP CS1
and Transmit
No
Yes
Yes
5 Mbps
Re-Mark to DSCP 0
and Transmit
Re-Mark to DSCP CS1
and Transmit
No
No
DVLAN
ANY
Yes
5 Mbps
Yes
No
No
Bulk
Data ACLs
32 kbps
Yes
No
Transactional
Data ACLs
Yes
No
No
Mission-Critical
Data ACLs
32 kbps
No
No
DVLAN +
UDP 1638432767
Drop
No
VVLAN
ANY
Yes
No
No
VVLAN +
DSCP AF31 or
CS3
128 kbps
Yes
Re-Mark to DSCP 0
and Transmit
Re-Mark to DSCP CS1
and Transmit
313
314
Access Edges
Uplinks to
Distribution Layer
Trusted-Endpoint
Model
Untrusted Server
Model
Trust-DSCP
Global 1P3Q1T
Queuing
Conditionally Trusted
PC + IP Phone Basic
Model
It is recommended to use the Enhanced Image (EI) versions of Cisco IOS Software on these
platforms because these offer additional QoS features, such as MQC/ACL classication
options, policing and markdown functions, mapping tables, and AutoQoS.
315
In Example 12-2, the command veries that interface FastEthernet 0/1 correctly is trusting
the DSCP values of the endpoint to which it is connected.
Example 12-2 show mls qos interface Verication of a Switch Port Connected to a Trusted Endpoint
CAT2950#show mls qos interface FastEthernet0/1
FastEthernet0/1
! Configured trust state is to trust DSCP
trust state: trust dscp
! Current operating mode is to trust DSCP
trust mode: trust dscp
COS override: dis
default COS: 0
pass-through: none
trust device: none
CAT2950#
316
NOTE
Nonstandard DSCP values are not supported; therefore, Mission-Critical Data trafc
cannot be marked to DSCP 25 on Catalyst 2950s (a temporary recommendation
during the interim of the Cisco Call-Signaling marking migration from AF31 to CS3).
Such application trafc alternatively can be marked to the more general class of
Transactional Data (AF21), of which it is a subset.
The mls qos cos override interface command must be used to ensure that untrusted
CoS values explicitly are set to 0 (default).
The range keyword cannot be used in the ACLs being referenced by the class maps;
server ports should be dened explicitly with a separate access control entry (ACE)
per TCP/UDP port.
User-dened masks must be consistent for all ACLs being referenced by class maps.
(If ltering is being done against TCP/UDP ports, all ACEs should be set to lter by
TCP/UDP ports instead of some ACEs ltering by ports and others by subnet or host
addresses.)
The Catalyst 2950 IOS implementation of MQCs class-default currently does not
function compatibly with mainline Cisco IOS. The QoS features and actions dened
within class-default should be applied to all other trafc that is not matched explicitly
by a class map, but testing has shown that this is not the case.
These limitations are based on testing performed using Catalyst 2950 IOS 12.1(19)EA1
versions a through c and 12.1(20)EA1. Additional information on these caveats can be
found at
http://www.cisco.com/univercd/cc/td/doc/product/lan/cat2950/12119ea1/2950scg/swacl.htm
and
http://www.cisco.com/univercd/cc/td/doc/product/lan/cat2950/12119ea1/2950scg/swqos.htm.
Example 12-3 details the Catalyst 2950 conguration to support the Untrusted
Multiapplication Server model (illustrated in Figure 12-5).
317
318
Catalyst MLS QoS Verication Command: show mls qos interface policers
The show mls qos interface policers verication command reports all congured policers
attached to the specied interface.
In Example 12-4, the policers dened for Mission-Critical, Transactional, and Bulk Data
that are applied to Fast Ethernet 0/1 are conrmed.
Example 12-4 show mls qos interface policers Verication of a Switch Port Connected to an Untrusted
Multiapplication Server
CAT2950#show mls qos interface FastEthernet0/1
FastEthernet0/1
policymap=UNTRUSTED-SERVER
type=Single rate=15000000, burst=8192
!
type=Single rate=35000000, burst=8192
!
type=Single rate=50000000, burst=8192
!
CAT2950#
policers
Catalyst MLS QoS Verication Commands: show class-map and show policy-map
The show class-map and show policy-map verication commands report the class map
and policy maps that have been congured globally (regardless of whether theyve been
applied to an interface).
In Example 12-5, the class maps for SAP, LOTUS, and IMAP are displayed, as is the policy
map UNTRUSTED-SERVER that is referencing these.
Example 12-5 show class-map and show policy-map Verication of a Switch Connected to an Untrusted
Multiapplication Server
CAT2950#show class-map
Class Map match-all SAP (id 1)
Match access-group name SAP
Class Map match-all LOTUS (id 2)
Match access-group name LOTUS
Class Map match-all IMAP (id 3)
Match access-group name IMAP
Class Map match-any class-default (id 0)
Match any
319
Example 12-5 show class-map and show policy-map Verication of a Switch Connected to an Untrusted
! Maps CoS 5 to EF
320
NOTE
Adjusting the default CoS-to-DSCP mapping for Call Signaling (which formerly was
mapped from CoS 3 to DSCP AF31/26) no longer is required. This is because the default
mapping of CoS 3 points to DSCP CS3 (24), which is the Call-Signaling marking that all
Cisco IP Telephony devices markings will migrate to.
Catalyst MLS QoS Verication Command: show mls qos map [cos-dscp | dscp-cos]
The show mls qos map verication command returns the DSCP-to-CoS and CoS-to-DSCP
mappings. These mappings can be either the default mappings or manually congured
overrides.
In Example 12-8, the default mapping for CoS 5 (DSCP CS5) has been modied to point
to DSCP EF instead.
Example 12-8 show mls qos map Verication for a Catalyst 2950 Switch
CAT2950#show mls qos map
Dscp-cos map:
dscp:
0 8 10 16 18 24 26 32 34 40 46 48 56
----------------------------------------------cos:
0 1 1 2 2 3 3 4 4 5 5 6 7
Cos-dscp map:
cos:
0 1 2 3 4 5 6 7
-------------------------------dscp:
0 8 16 24 32 46 48 56
CAT2950#
The Catalyst 2950s hardware policers lack the granularity to implement the Conditionally
Trusted IP Phone + PC: Basic model, illustrated in Figure 12-8. However, they can
implement a simplied version of this model, shown in Figure 12-11.
It should be kept in mind that the coarse granularity of the Catalyst 2950s policers (which
are congured in 1 Mbps minimum increments on Fast Ethernet interfaces) potentially
could allow up to 1 Mbps of trafc mimicking legitimate voice trafc per conditionally
trusted switch port.
321
Figure 12-11 Catalyst 2950: Conditionally Trusted Endpoint Policing: IP Phone + PC (Basic Model)
Start
VVLAN
ANY
Yes
1 Mbps
Yes
No
Drop
No
DVLAN
ANY
Yes
5 Mbps
No
Yes
Re-Mark to DSCP 0
and Transmit
Re-Mark to DSCP CS1
and Transmit
Example 12-9 shows the conguration for conguring a switch port to conditionally trust
an IP phone that has a PC connected to it.
Example 12-9 Catalyst 2950: Conditionally Trusted IP Phone + PC: Basic Model Example
CAT2950(config)#mls qos map cos-dscp 0 8 16 24 32 46 48 56 ! Maps CoS 5 to EF
CAT2950(config)#
CAT2950(config)#class-map VVLAN-ANY
CAT2950(config-cmap)# match access-group name VVLAN-ANY
CAT2950(config-cmap)#class-map DVLAN-ANY
CAT2950(config-cmap)# match access-group name DVLAN-ANY
CAT2950(config-cmap)#exit
CAT2950(config)#
CAT2950(config)#policy-map IPPHONE+PC
CAT2950(config-pmap)# class VVLAN-ANY
CAT2950(config-pmap-c)#
police 1000000 8192 exceed-action drop
! Out-of-profile traffic from the VVLAN is dropped
CAT2950(config-pmap-c)# class DVLAN-ANY
set ip dscp 0
CAT2950(config-pmap-c)#
! Optional remarking in case trust is compromised
CAT2950(config-pmap-c)#
police 5000000 8192 exceed-action dscp 8
! Out-of-profile data traffic is marked down to Scavenger
CAT2950(config-pmap-c)#exit
CAT2950(config-pmap)#exit
CAT2950(config)#
CAT2950(config)#
CAT2950(config)#interface FastEthernet0/1
CAT2950(config-if)# switchport access vlan 10! DVLAN
CAT2950(config-if)# switchport voice vlan 110! VVLAN
CAT2950(config-if)# mls qos trust device cisco-phone ! Conditional trust
CAT2950(config-if)# mls qos trust cos
! Trust CoS from IP Phone
CAT2950(config-if)# service-policy input IPPHONE+PC ! Policing policy
CAT2950(config-if)#exit
CAT2950(config)#
CAT2950(config)#ip access-list standard VVLAN-ANY
continues
322
Example 12-9 Catalyst 2950: Conditionally Trusted IP Phone + PC: Basic Model Example (Continued)
CAT2950(config-std-nacl)# permit 10.1.110.0 0.0.0.255
CAT2950(config-std-nacl)#
CAT2950(config-std-nacl)#ip access-list standard DVLAN-ANY
CAT2950(config-std-nacl)# permit 10.1.10.0 0.0.0.255
CAT2950(config-std-nacl)#end
CAT2950#
! VVLAN subnet
! DVLAN subnet
NOTE
323
The absolute values assigned to these queue weights are meaningless, as these weights are
entirely relative. Therefore, these weights can be reduced by dividing each weight by the
lowest common denominator (in this case, 5) to arrive at queue weights of 1, 5, and 14 for
queues 1, 2, and 3, respectively.
Reduction is strictly optional and makes no difference to the servicing of the queues. Many
network administrators tend to prefer dening bandwidth allocation ratios as percentages,
so bandwidth weight ratios are not reduced in this design chapter.
So far, campus QoS designs have been presented for the rst half of the DoS/worm-mitigation
strategy discussed at the beginning of this chapternamely, designs for access-layer
policers to mark down out-of-prole trafc to the Scavenger class PHB of CS1.
The second vital component of this strategy is to map Scavenger class trafc into a lessthan best-effort queuing structure, ensuring that all other trafc will be serviced ahead of it
in the event of congestion.
The Catalyst 2950, like most Catalyst platforms, supports the mapping of CoS values into
queues. The CoS value that corresponds to Scavenger (DSCP CS1) is CoS 1; this CoS value
is shared with Bulk Data (DSCP AF11). Therefore, a small amount of bandwidth (5 percent) is allocated to the less-than-best-effort queue: Q1. Q1 thus services legitimate Bulk
Data trafc but constrains out-of-prole Scavenger trafcwhich could be the result of a
DoS/worm attackto a small amount (less than 5 percent), in the event of congestion.
The next queue, Q2, then is assigned to service Best-Effort trafc. A previously discussed
design principle regarding Best-Effort bandwidth allocation is to allocate approximately
25 percent of a links bandwidth to service Best-Effort trafc. In this manner, the sheer
volume of trafc that defaults to Best-Effort continues to get adequate bandwidth, both in
the event of momentary campus congestion (because of bursts in the amount of legitimate
trafc) and even in the case of a DoS/worm attack.
Preferential applications, such as Transactional Data, Mission-Critical Data, Call-Signaling,
Network and Internetwork Control and Management, and both Interactive- and StreamingVideo, are serviced by Q3. Q3 is allocated 70 percent of the remaining bandwidth (after the
PQ has serviced its Voice trafc).
Figure 12-12 illustrates the recommended 1P3Q1T queuing model for the Catalyst 2950,
along with CoS-to-queue assignments.
324
DSCP
CoS
Network Control
CoS 7
Internetwork Control
CS6
CoS 6
Voice
EF
CoS 5
Interactive-Video
AF41
CoS 4
Streaming-Video
CS4
CoS 4
Mission-Critical Data
DSCP 25
CoS 3
Call-Signaling
AF31/CS3
CoS 3
Transactional Data
AF21
CoS 2
Network-Management
CS2
CoS 2
Bulk Data
AF11
CoS 1
Scavenger
CS1
CoS 1
Best-Effort
1P3Q1T
CoS 5
Q4
Priority Queue
CoS 7
CoS 6
CoS 4
Queue 3
(70%)
CoS 3
CoS 2
CoS 0
Queue 2
(25%)
Queue 1 (5%)
CoS 1
Queue 1 (5%)
The conguration of the priority queue (Q4) and the bandwidth allocations for the
remaining queues (Q1, Q2, and Q3) are shown in Example 12-10.
Example 12-10 Catalyst 2950 Scheduling Conguration: 1P3Q1T Example
CAT2950(config)#wrr-queue bandwidth 5 25 70 0
CAT2950(config)#
325
Example 12-11 show wrr-queue bandwidth Verication for a Catalyst 2950 Switch
CAT2950#show wrr-queue bandwidth
WRR Queue :
1
2
3
4
5 25 70
0
Bandwidth :
! Q1 gets 5%, Q2 gets 25%, Q3 gets 70%, Q4 is PQ
CAT2950#
Example 12-12 shows the CoS-to-queue mapping conguration for the Catalyst 2950.
Example 12-12 Catalyst 2950 CoS-to-Queue Mapping Example
CAT2950(config)#wrr-queue
CAT2950(config)#wrr-queue
CAT2950(config)#wrr-queue
CAT2950(config)#wrr-queue
CAT2950(config)#
cos-map
cos-map
cos-map
cos-map
1
2
3
4
1
0
2 3 4 6 7
5
!
!
!
!
Scavenger/Bulk is assigned to Q1
Best Effort is assigned to Q2
CoS 2,3,4,6,7 are assigned to Q3
VoIP is assigned to Q4 (PQ)
5
4
6
3
7
3
326
Trusted-Endpoint Model
1P3Q1T
Queuing
Untrusted
PC + SoftPhone
Model
1P3Q1T
Queuing
1P3Q1T
Queuing
Conditionally Trusted
PC + IP Phone
Basic Model
1P3Q1T
Queuing
Conditionally Trusted
PC + IP Phone
Advanced Model
1P3Q1T
Queuing
Uplinks to
Distribution Layer
Trust-DSCP
1P3Q2T
Queuing + WRED
Enable QoS
Globally
Trust-DSCP
1P3Q2T
Queuing + WRED
Interswitch Links
An important point to remember about the Catalyst 3550 is that QoS is disabled by default
and must be enabled globally for congured policies to become effective. 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 enabled globally,
however, all DSCP and CoS values (by default) are set to 0 (which is equivalent to an
untrusted state on all ports). Example 12-14 shows how to verify whether QoS has been
enabled not and also how it can be enabled globally.
Example 12-14 Enabling QoS Globally on the Catalyst 3550
CAT3550#show mls qos
QoS is disabled
CAT3550#
327
NOTE
Depending on the software version, enabling QoS in the Catalyst 3550 might require IEEE
802.3x ow control to be disabled on all interfaces (if it is enabled). Flow control can be
disabled on an interface or interface range by using the interface conguration commands
owcontrol receive off and owcontrol send off. Check the Catalyst 3550 IOS documentation (QoS chapter) to verify whether this is a requirement for the version of software in use.
continues
328
329
Catalyst MLS QoS Verication Command: show mls qos interface statistics
The show mls qos interface statistics verication command reports dynamic counters for
a given policy, including how many packets were classied and policed by the policy.
In Example 12-17, untrusted packets from the PC are classied and policed according to
the limits shown in Figure 12-4 for the Untrusted PC with SoftPhone access-edge endpoint
policing model.
Example 12-17 show mls qos interface statistics Verication of a Catalyst 3550 Switch Port Connected to an
with SoftPhone
CAT3550#show policy interface FastEthernet0/1
FastEthernet0/1
service-policy input: SOFTPHONE-PC
class-map: SOFTPHONE-VOICE (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
match: access-group name SOFTPHONE-VOICEqm_police_inform_feature:
CLASS_SHOW
class-map: SOFTPHONE-SIGNALING (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
match: access-group name SOFTPHONE-SIGNALINGqm_police_inform_feature:
CLASS_SHOW
class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
match: any
0 packets, 0 bytes
5 minute rate 0 bpsqm_police_inform_feature: CLASS_SHOW
CAT3550#
330
NOTE
At the time of this writing, the counters reported by the show policy interface command
on the Catalyst 3550 are not being incremented, as is the case with the mainline Cisco IOS
version of this command. This has been reported as a bug. In other words, all counters
currently are frozen at zero; however, when this bug is xed, they should increment dynamically. Catalyst 3550 IOS versions tested and affected with this bug include 12.1(19)EA1 a
through c and 12.1(20)EA1.
331
continues
332
Example 12-20 Catalyst 3550: Conditionally Trusted IP Phone + PC: Basic Model Example (Continued)
CAT3550(config-cmap)# match ip dscp 46
! DSCP EF (voice)
CAT3550(config-cmap)#class-map match-any CALL-SIGNALING ! Need 'match-any' here
CAT3550(config-cmap)# match ip dscp 26
! DSCP AF31 (old Call-Signaling)
CAT3550(config-cmap)# match ip dscp 24
! DSCP CS3 (new Call-Signaling)
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all VVLAN-VOICE
CAT3550(config-cmap)# match vlan 110
! VLAN 110 is VVLAN
CAT3550(config-cmap)# match class-map VOICE ! Matches VVLAN DSCP EF
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all VVLAN-CALL-SIGNALING
CAT3550(config-cmap)# match vlan 110
! VLAN 110 is VVLAN
CAT3550(config-cmap)# match class-map CALL-SIGNALING !Matches VVLAN AF31/CS3
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all ANY
CAT3550(config-cmap)# match access-group name ANY ! Workaround ACL
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all VVLAN-ANY
CAT3550(config-cmap)# match vlan 110
! VLAN 110 is VVLAN
CAT3550(config-cmap)# match class-map ANY
! Matches any other VVLAN traffic
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all DVLAN-ANY
CAT3550(config-cmap)# match vlan 10
! VLAN 10 is DVLAN
CAT3550(config-cmap)# match class-map ANY
! Matches all DVLAN traffic
CAT3550(config-cmap)#
CAT3550(config-cmap)#policy-map IPPHONE+PC-BASIC
CAT3550(config-pmap)#class VVLAN-VOICE
CAT3550(config-pmap-c)# set ip dscp 46
! DSCP EF (Voice)
CAT3550(config-pmap-c)# police 128000 8000 exceed-action drop
! Only one voice call is permitted per switchport VVLAN
CAT3550(config-pmap-c)#class VVLAN-CALL-SIGNALING
CAT3550(config-pmap-c)# set ip dscp 24
! DSCP CS3 (Call-Signaling)
CAT3550(config-pmap-c)# police 32000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Call-Signaling is marked down to Scavenger (CS1)
CAT3550(config-pmap-c)#class VVLAN-ANY
CAT3550(config-pmap-c)# set ip dscp 0
CAT3550(config-pmap-c)# police 32000 8000 exceed-action policed-dscp-transmit
! Unauthorized VVLAN traffic is marked down to Scavenger (CS1)
CAT3550(config-pmap-c)#class DVLAN-ANY
CAT3550(config-pmap-c)# set ip dscp 0
CAT3550(config-pmap-c)# police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile data traffic is marked down to Scavenger (CS1)
CAT3550(config-pmap-c)# exit
CAT3550(config-pmap)#exit
CAT3550(config)#
CAT3550(config)#interface FastEthernet0/1
CAT3550(config-if)# switchport access vlan 10
! DVLAN
CAT3550(config-if)# switchport voice vlan 110
! VVLAN
CAT3550(config-if)# mls qos trust device cisco-phone
! Conditional Trust
CAT3550(config-if)# service-policy input IPPHONE+PC-BASIC
! Attaches policy
CAT3550(config-if)#exit
CAT3550(config)#
333
Example 12-20 Catalyst 3550: Conditionally Trusted IP Phone + PC: Basic Model Example (Continued)
CAT3550(config)#
ip access-list standard ANY
CAT3550(config)#ip
CAT3550(config-std-nacl)# permit any
CAT3550(config-std-nacl)#end
CAT3550#
! Workaround ACL
NOTE
Although Catalyst 3550 IOS syntax supports the match any criteria within a class map
(which the parser allows to be congured in conjunction with a per-VLAN policy), testing
with the Catalyst 3500 IOS versions listed previously has shown that there is a bug with this
function because it does not match any other trafc on a per-VLAN basis. Therefore, an
explicit access list named ANY has been used in Example 12-20 as a workaround to this
issue. Once this issue has been resolved, it is simpler to use the match-any keyword within
the class-maps (rather than the workaround ACL).
334
explicit policer for SoftPhone Call-Signaling trafc; to work around this limitation,
SoftPhone Call-Signaling trafc is included in the Mission-Critical Data applications
access list.
Example 12-21 Catalyst 3550: Conditionally Trusted IP Phone + PC: Advanced Model Example
CAT3550(config)#mls
mls qos map cos-dscp 0 8 16 24 32 46 48 56
! Modifies CoS-to-DSCP mapping to map CoS 5 to DSCP EF
mls qos map policed-dscp 0 10 18 24 25 34 to 8
CAT3550(config)#mls
! Excess DVLAN traffic marked 0, AF11, AF21, CS3, DSCP 25,
! and AF41 will be remarked to Scavenger (CS1)
CAT3550(config)#
CAT3550(config)#class-map match-all VOICE
CAT3550(config-cmap)# match ip dscp 46
! DSCP EF (voice)
CAT3550(config-cmap)#class-map match-any CALL-SIGNALING ! Need 'match-any' here
CAT3550(config-cmap)# match ip dscp 26
! DSCP AF31 (old Call-Signaling)
CAT3550(config-cmap)# match ip dscp 24
! DSCP CS3 (new Call-Signaling)
CAT3550(config-cmap)#class-map match-all PC-VIDEO
CAT3550(config-cmap)# match access-group name PC-VIDEO
CAT3550(config-cmap)#class-map match-all MISSION-CRITICAL-DATA
CAT3550(config-cmap)# match access-group name MISSION-CRITICAL-DATA
CAT3550(config-cmap)#class-map match-all TRANSACTIONAL-DATA
CAT3550(config-cmap)# match access-group name TRANSACTIONAL-DATA
CAT3550(config-cmap)#class-map match-all BULK-DATA
CAT3550(config-cmap)# match access-group name BULK-DATA
CAT3550(config-cmap)#class-map match-all ANY
CAT3550(config-cmap)# match access-group name ANY ! Workaround ACL
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all VVLAN-VOICE
CAT3550(config-cmap)# match vlan 110
! VLAN 110 is VVLAN
CAT3550(config-cmap)# match class-map VOICE ! Matches VVLAN DSCP EF
CAT3550(config-cmap)#class-map match-all VVLAN-CALL-SIGNALING
CAT3550(config-cmap)# match vlan 110
! VLAN 110 is VVLAN
CAT3550(config-cmap)# match class-map CALL-SIGNALING ! Matches VVLAN AF31/CS3
CAT3550(config-cmap)#class-map match-all VVLAN-ANY
CAT3550(config-cmap)# match vlan 110
! VLAN 110 is VVLAN
CAT3550(config-cmap)# match class-map ANY
! Matches any other VVLAN traffic
CAT3550(config-cmap)#
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all DVLAN-PC-VIDEO
CAT3550(config-cmap)# match vlan 10
! VLAN 10 is DVLAN
CAT3550(config-cmap)# match class-map PC-VIDEO ! Matches PC-Video class-map
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all DVLAN-MISSION-CRITICAL-DATA
CAT3550(config-cmap)# match vlan 10
! VLAN 10 is DVLAN
CAT3550(config-cmap)# ! Matches MCD class-map
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all DVLAN-TRANSACTIONAL-DATA
CAT3550(config-cmap)# match vlan 10
! VLAN 10 is DVLAN
CAT3550(config-cmap)# match class-map TRANSACTIONAL-DATA ! Matches TD class-map
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all DVLAN-BULK-DATA
CAT3550(config-cmap)# match vlan 10
! VLAN 10 is DVLAN
CAT3550(config-cmap)# ! Matches Bulk Data class-map
335
Example 12-21 Catalyst 3550: Conditionally Trusted IP Phone + PC: Advanced Model Example (Continued)
CAT3550(config-cmap)#
CAT3550(config-cmap)#class-map match-all DVLAN-ANY
CAT3550(config-cmap)# match vlan 10
! VLAN 10 is DVLAN
CAT3550(config-cmap)# match class-map ANY
! Matches all other DVLAN traffic
CAT3550(config-cmap)#
CAT3550(config-cmap)#
CAT3550(config-cmap)#policy-map IPPHONE+PC-ADVANCED
CAT3550(config-pmap)# class VVLAN-VOICE
CAT3550(config-pmap-c)# set ip dscp 46
! DSCP EF (Voice)
CAT3550(config-pmap-c)# police 128000 8000 exceed-action drop
! Only one voice call is permitted per switchport VVLAN
CAT3550(config-pmap-c)#class VVLAN-CALL-SIGNALING
CAT3550(config-pmap-c)# set ip dscp 24
! DSCP CS3 (Call-Signaling)
CAT3550(config-pmap-c)# police 32000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Call-Signaling is marked down to Scavenger (CS1)
CAT3550(config-pmap-c)#class VVLAN-ANY
CAT3550(config-pmap-c)# set ip dscp 0
CAT3550(config-pmap-c)# police 32000 8000 exceed-action policed-dscp-transmit
! Unauthorized VVLAN traffic is marked down to Scavenger (CS1)
CAT3550(config-pmap-c)#class DVLAN-PC-VIDEO
CAT3550(config-pmap-c)# set ip dscp 34
! DSCP AF41 (Interactive-Video)
CAT3550(config-pmap-c)# police 500000 8000 exceed-action policed-dscp-transmit
! Only one IP/VC stream will be permitted per switchport
CAT3550(config-pmap-c)#class DVLAN-MISSION-CRITICAL-DATA
CAT3550(config-pmap-c)# set ip dscp 25
! Interim Mission-Critical Data
CAT3550(config-pmap-c)# police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Mission-Critical Data is marked down to Scavenger (CS1)
CAT3550(config-pmap-c)#class DVLAN-TRANSACTIONAL-DATA
CAT3550(config-pmap-c)# set ip dscp 18
! DSCP AF21 (Transactional Data)
CAT3550(config-pmap-c)# police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Transactional Data is marked down to Scavenger (CS1)
CAT3550(config-pmap-c)#class DVLAN-BULK-DATA
CAT3550(config-pmap-c)# set ip dscp 10
! DSCP AF11 (Bulk Data)
CAT3550(config-pmap-c)# police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Bulk Data is marked down to Scavenger (CS1)
CAT3550(config-pmap-c)#class DVLAN-ANY
CAT3550(config-pmap-c)# set ip dscp 0
CAT3550(config-pmap-c)# police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile data traffic is marked down to Scavenger (CS1)
CAT3550(config-pmap-c)# exit
CAT3550(config-pmap)#exit
CAT3550(config)#
CAT3550(config)#interface FastEthernet0/1
CAT3550(config-if)# switchport access vlan 10
! DVLAN
CAT3550(config-if)# switchport voice vlan 110
! VVLAN
CAT3550(config-if)# mls qos trust device cisco-phone
! Conditional Trust
IPPHONE+PC-ADVANCED Attaches policy
CAT3550(config-if)# service-policy input IPPHONE+PC-ADVANCED!
CAT3550(config-if)#exit
CAT3550(config)#
ip access-list standard ANY ! Workaround ACL
CAT3550(config)#ip
continues
336
Example 12-21 Catalyst 3550: Conditionally Trusted IP Phone + PC: Advanced Model Example (Continued)
CAT3550(config-std-nacl)# permit any
CAT3550(config-std-nacl)#
ip access-list extended PC-VIDEO
CAT3550(config-std-nacl)#ip
! IP/VC or SoftPhone
CAT3550(config-ext-nacl)# permit udp any any range 16384 32767
CAT3550(config-ext-nacl)#
CAT3550(config-ext-nacl)#ip access-list extended MISSION-CRITICAL-DATA
CAT3550(config-ext-nacl)# permit tcp any any range 3200 3203
! SAP
CAT3550(config-ext-nacl)# permit tcp any any eq 3600
! SAP
CAT3550(config-ext-nacl)# permit tcp any any range 2000 2002
! SoftPhone SCCP
CAT3550(config-ext-nacl)#
CAT3550(config-ext-nacl)#ip access-list extended TRANSACTIONAL-DATA
CAT3550(config-ext-nacl)# permit tcp any any eq 1352
! Lotus
CAT3550(config-ext-nacl)#
CAT3550(config-ext-nacl)#ip access-list extended BULK-DATA
CAT3550(config-ext-nacl)# permit tcp any any eq 143
! IMAP
CAT3550(config-ext-nacl)# permit tcp any any eq 220
! IMAP
CAT3550(config-ext-nacl)#end
CAT3550#
337
that queue 4s WRR weight is set to 1 (indicating that it does not participate in the WRR
scheduler because it is congured as a strict-priority queue) instead of 0 (as is the case on
the Catalyst 2950). Recommended remaining bandwidth allocations (after the PQ has been
serviced fully) are 5 percent for the Scavenger queue (Q1), 25 percent for the Best-Effort
queue (Q2), and 70 percent for the preferential application queue (Q3).
Following this, CoS 1 (Scavenger/Bulk Data) would be assigned to Q1; CoS 0 (Best-Effort)
would be assigned to Q2; CoS values 2 (Transactional Data and Network-Management),
3 (Call-Signaling and Mission-Critical Data), 4 (Interactive- and Streaming-Video), 6
(Internetwork Control), and 7 (Network Control/Spanning-Tree) would be assigned to Q3;
and CoS 5 (voice) would be assigned to the strict-priority Q4. These assignments and
allocations are illustrated in Figure 12-15 (the thresholds shown in Q1 and Q3 are discussed
shortly).
Figure 12-15 Catalyst 3550 1P3Q2T Queuing Model
Application
DSCP
CoS
Network Control
CoS 7
Internetwork Control
CS6
CoS 6
Voice
EF
CoS 5
Interactive-Video
AF41
CoS 4
Streaming-Video
CS4
CoS 4
Mission-Critical Data
DSCP 25
CoS 3
Call-Signaling
AF31/CS3
CoS 3
Transactional Data
AF21
CoS 2
Network-Management
CS2
CoS 2
Bulk Data
AF11
CoS 1
1P3Q2T
CoS 5
Q4
Priority Queue
Q3T2
CoS 7
CoS 6
Q3T1
CoS 4
Queue 3
(70%)
CoS 3
CoS 2
Queue 2
(25%)
CoS 0
Scavenger
CS1
CoS 1
Best-Effort
Queue 1 (5%)
CoS 1
Q1T2
Q1T1
338
Example 12-22 Catalyst 3550 Fast Ethernet and Gigabit Ethernet Interface Queuing Conguration: 1P3Q1T
Example
interface range FastEthernet0/1
CAT3550(config)#interface
CAT3550(config-if)# wrr-queue bandwidth 5 25 70
CAT3550(config-if)# wrr-queue cos-map 1 1
!
CAT3550(config-if)# wrr-queue cos-map 2 0
!
CAT3550(config-if)# wrr-queue cos-map 3 2 3 4 6
CAT3550(config-if)# wrr-queue cos-map 4 5
!
CAT3550(config-if)# priority-queue out
!
CAT3550(config-if)#end
CAT3550#
- 48
1
! Q1-5% Q2-25% Q3-70% Q4=PQ
Assigns Scavenger to Q1
Assigns Best Effort to Q2
7 ! Assigns CoS 2,3,4,6,7 to Q3
Assigns VoIP to Q4 (PQ)
Enables Q4 as PQ
The Catalyst 3550 offers some advanced nerd-knob queuing options on 10/100 interfaces,
such as tuning minimum reserve thresholds. However, testing has shown that such tuning
makes a highly negligible difference, at best. Therefore, tuning minimum reserve thresholds
is recommended only for advanced network administrators or when using automated tools,
such as AutoQoS.
Some advanced nerd knobs also exist for Gigabit Ethernet interfaces. A couple of these
advanced tuning options include queue-limit tuning and the enabling of WRED thresholds
for 1P3Q2T operation. In the event of DoS or worm attacks, the Gigabit Ethernet uplinks
may become congested, so it is worthwhile to examine these advanced options.
In Example 12-23, the queue limits for both Gigabit Ethernet interfaces are tuned to
correspond to the WRR weights of the queues (the bandwidth allocations). This is achieved
with the wrr-queue queue-limit interface command. However, unlike the WRR weight
bandwidth ratio for Q4 (which is set to 1 to indicate that Q4 is a PQ), the queue limit for
Q4 needs to be set explicitly to a more representative value, such as 30 percent.
NOTE
The default queue limits are such that each queue is assigned 25 percent of the available
buffer space. It should be noted that when the queue limits are modied, the queue
temporarily is shut down during the hardware reconguration, and the switch might drop
newly arrived packets destined to the queue. Thus, it is advisable not to tune the queue
limits on Catalyst 3550 switches already in production networks unless downtime has been
scheduled.
Additionally, WRED is enabled on each (nonpriority) queue. This allows for the preferential
treatment of Bulk Data (DSCP AF11) over Scavenger (CS1) within Q1, as well as the
339
NOTE
Network Control trafc in the campus primarily refers to Spanning Tree Protocol (STP)
trafc, such as bridge protocol data units (BPDUs). Although these Layer 2 Ethernet frames
are marked CoS 7, they (obviously) do not have any capabilities to carry Layer 3 DSCP
markings. Thus, it might seem moot to map DSCP CS7 (56) to a higher WRED threshold.
However, it should be kept in mind that Catalyst switches generate internal DSCP values
for all frames (regardless of whether they are carrying IP). These internal DSCP values are
used for QoS decisions, such as WRED, in this case. Therefore, because STP BPDU frames
(marked CoS 7) generate an internal DSCP value of 56, mapping DSCP 56 to the second
threshold of Q3 provides preferential treatment for these important Layer 2 frames.
Example 12-23 shows the conguration for these tuning options, which are available only
on Gigabit Ethernet interfaces on the Catalyst 3550.
Example 12-23 Catalyst 3550 Gigabit Ethernet Interface Queuing and Dropping Conguration: 1P3Q2T
Example
CAT3550(config)#interface
interface range GigabitEthernet 0/1 2
CAT3550(config-if-range)# wrr-queue bandwidth 5 25 70 1
! Q1 gets 5% BW, Q2 gets 25% BW, Q3 gets 70% BW, Q4 is the PQ
CAT3550(config-if-range)# wrr-queue queue-limit 5 25 40 30
! Tunes buffers to 5% for Q1, 25% for Q2, 40% for Q3 and 30% for Q4
40100
100
CAT3550(config-if-range)# wrr-queue random-detect max-threshold 1 5
! Sets Q1 WRED threshold 1 to 40% and threshold 2 to 100%
CAT3550(config-if-range)# wrr-queue random-detect max-threshold 2 80 100
! Sets Q2 WRED threshold 1 to 80% and threshold 2 to 100%
CAT3550(config-if-range)# wrr-queue random-detect max-threshold 3 80 100
! Sets Q3 WRED threshold 1 to 80% and threshold 2 to 100%
CAT3550(config-if-range)# wrr-queue cos-map 11 11
! Assigns Scavenger to Q1
continues
340
Example 12-23 Catalyst 3550 Gigabit Ethernet Interface Queuing and Dropping Conguration: 1P3Q2T
Example (Continued)
cos-map 22 00
CAT3550(config-if-range)# wrr-queue cos-map
! Assigns Best Effort to Q2
CAT3550(config-if-range)# wrr-queue
wrr-queue cos-map
cos-map 33 22 33 44 66 77
! Assigns CoS 2,3,4,6,7 to Q3
cos-map 44 55
CAT3550(config-if-range)# wrr-queue cos-map
! Assigns VoIP to Q4 (PQ)
CAT3550(config-if-range)# wrr-queue dscp-map 2 10 48 56
! Maps Bulk Data (10), Routing (48) and Spanning Tree (Internal DSCP 56)
! to WRED threshold 2 of their respective queues all other DSCP values
! are mapped (by default) to WRED threshold 1 of their respective queues
CAT3550(config-if-range)# priority-queue out
! Enables Q4 as PQ
CAT3550(config-if-range)#end
CAT3550#
Catalyst MLS QoS Verication Command: show mls qos interface buffers
The show mls qos interface buffers verication command displays the queue sizes (as perqueue buffer allocation percentages of the total buffer space). Also, the command displays
whether WRED has been enabled on a queue and, if so, displays the rst and second
thresholds (as percentages of the queues depth).
In Example 12-24, the queue limits are set to 5 percent, 25 percent, 40 percent, and 30 percent
of the total queuing buffer space for queues 1 through 4 (respectively). Additionally, WRED
is enabled on queues 1 through 3 (but not Q4 because it is the priority queue). The rst
WRED threshold is set to 5 percent on Q1 and is set to 80 percent on queues 2 and 3.
Example 12-24 show mls qos interface buffers Verication for a Catalyst 3550 Switch
CAT3550#show mls qos interface GigabitEthernet0/1 buffers
GigabitEthernet0/1
Notify Q depth:
qid-size
1 5
! Q1 queue-limit is set to 5% of total buffer space
2 25
! Q2 queue-limit is set to 25% of total buffer space
3 40
! Q3 queue-limit is set to 40% of total buffer space
4 30
! Q4 queue-limit is set to 30% of total buffer space
qid WRED thresh1 thresh2
40
1
ena 5
100
! WRED is enabled on Q1 first threshold is set to 40%
2
ena 80
100
! WRED is enabled on Q2 first threshold is set to 80%
3
ena 80
100
! WRED is enabled on Q3 first threshold is set to 80%
4
dis 100
100
! WRED is disabled on Q4 (as it is the PQ)
CAT3550#
341
Catalyst MLS QoS Verication Command: show mls qos interface queueing
The show mls qos interface queueing verication command displays the CoS-to-queuing
mappings that have been congured, in addition to the bandwidth allocations per queue. On
Gigabit Ethernet interfaces with WRED enabled, the output also includes the DSCP-to-WRED
threshold mappings. This information is displayed in a table form, with the rst digit of the
decimal DSCP value along the y-axis (in rows) and the second digit of the decimal DSCP
value along the x-axis (in columns).
In Example 12-25, the output veries that the egress expedite queue (priority queue, Q4) is
enabled. Also, the WRR bandwidth weights show that, of the remaining bandwidth, Q1
is allocated 5 percent, Q2 is allocated 25 percent, and Q3 is allocated 70 percent.
Additionally, the DSCP-to-WRED table veries that Bulk Data (AF11/10), Internetwork
Control (DSCP CS6/48), and Network Control (DSCP CS7/56) each is mapped to the
second WRED threshold (T2) of its respective queue (as determined by the CoS-to-queue
mappings).
Finally, the CoS-to-queue map shows that CoS 0 (Best-Effort) is assigned to Q2; CoS 1
(Scavenger) has been assigned to Q1; CoS values 2, 3, 4, 6, and 7 have been assigned to
Q3; and CoS 5 (Voice) has been assigned to the priority queue, Q4.
Example 12-25 show mls qos interface queueing Verication for a Catalyst 3550 Switch
CAT3550#show mls qos interface GigabitEthernet0/1 queueing
GigabitEthernet0/1
Egress expedite queue: ena
! Q4 is enabled as a PQ
wrr bandwidth weights:
qid-weights
1 5
! Q1 is allocated 5%
2 25
! Q2 is allocated 25%
3 70
! Q3 is allocated 70&
4 - 1
when expedite queue is disabled
Dscp-threshold map:
d1 : d2 0 1 2 3 4 5 6 7 8 9
--------------------------------------0 :
01 01 01 01 01 01 01 01 01 01
1 :
02 01 01 01 01 01 01 01 01 01
! DSCP 10 is mapped to WRED T2
2 :
01 01 01 01 01 01 01 01 01 01
3 :
01 01 01 01 01 01 01 01 01 01
4 :
01 01 01 01 01 01 01 01 02 01
! DSCP 48 is mapped to WRED T2
5 :
01 01 01 01 01 01 02 01 01 01
! DSCP 56 is mapped to WRED T2
6 :
01 01 01 01
Cos-queue map:
cos-qid
0 2
! Best-Effort is assigned to Q2
1 1
! Scavenger and Bulk are assigned to Q1
2 3
! Transactional Data and Network Management are assigned to Q3
continues
342
Example 12-25 show mls qos interface queueing Verication for a Catalyst 3550 Switch (Continued)
3 3
4 3
5 4
6 3
7 3
CAT3550#
!
!
!
!
!
1P3Q3T
Queuing + WTD
Untrusted
PC + SoftPhone
Model
1P3Q3T
Queuing + WTD
1P3Q3T
Queuing + WTD
Conditionally Trusted
PC + IP Phone
Basic Model
1P3Q3T
Queuing + WTD
Conditionally Trusted
PC + IP Phone
Advanced Model
1P3Q3T
Queuing + WTD
Uplinks to
Distribution Layer
Trust-DSCP
1P3Q3T
Queuing + WTD
343
Enable QoS
Globally
1P3Q3T
Queuing + WTD
Trust-DSCP
Interswitch Links
Because (as pointed out in Chapter 10, Catalyst QoS Tools) the QoS features and
conguration syntax are identical for the Catalyst 2970, 3560, and 3750, from a QoS design
recommendation perspective they can be discussed as a single switch.
As with the Catalyst 3550, QoS is disabled globally by default on the Catalyst 2970/3560/
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 enabled globally, however, all DSCP and CoS values (by default) are set to 0 (which is
equivalent to an untrusted state on all ports).
QoS must be enabled globally for congured policies to become effective. Example 12-26
shows how to verify whether QoS has been enabled and also how it can be enabled globally.
Example 12-26 Enabling QoS Globally on the Catalyst 2970/3560/3750
CAT2970#show mls qos
QoS is disabled
CAT2970#
CAT2970#configure terminal
Enter configuration commands, one per line.
CAT2970(config)#mls
mls qos
CAT2970(config)#end
CAT2970#
344
345
continues
346
347
Example 12-30 Catalyst 2970/3560/3750: Conditionally Trusted IP Phone + PC: Basic Model Example
CAT2970(config)#class-map match-all VVLAN-VOICE
CAT2970(config-cmap)# match access-group name VVLAN-VOICE
CAT2970(config-cmap)#
CAT2970(config-cmap)#class-map match-all VVLAN-CALL-SIGNALING
CAT2970(config-cmap)# match access-group name VVLAN-CALL-SIGNALING
CAT2970(config-cmap)#
CAT2970(config-cmap)#class-map match-all VVLAN-ANY
CAT2970(config-cmap)# match access-group name VVLAN-ANY
CAT2970(config-cmap)#
CAT2970(config-cmap)#
CAT2970(config-cmap)#policy-map IPPHONE+PC-BASIC
CAT2970(config-pmap)#class VVLAN-VOICE
CAT2970(config-pmap-c)# set ip dscp 46
! DSCP EF (Voice)
CAT2970(config-pmap-c)# police 128000 8000 exceed-action drop
! Only one voice call is permitted per switchport VVLAN
CAT2970(config-pmap-c)#class VVLAN-CALL-SIGNALING
CAT2970(config-pmap-c)# set ip dscp 24
! DSCP CS3 (Call-Signaling)
CAT2970(config-pmap-c)# police 32000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Call-Signaling is marked down to Scavenger (CS1)
CAT2970(config-pmap-c)#class VVLAN-ANY
CAT2970(config-pmap-c)# set ip dscp 0
CAT2970(config-pmap-c)# police 32000 8000 exceed-action policed-dscp-transmit
! Unauthorized VVLAN traffic is marked down to Scavenger (CS1)
CAT2970(config-pmap-c)#class class-default
CAT2970(config-pmap-c)# set ip dscp 0
CAT2970(config-pmap-c)# police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile data traffic is marked down to Scavenger (CS1)
CAT2970(config-pmap-c)# exit
CAT2970(config-pmap)#exit
CAT2970(config)#
CAT2970(config)#
CAT2970(config)#interface GigabitEthernet0/1
CAT2970(config-if)# switchport access vlan 10
! DVLAN
CAT2970(config-if)# switchport voice vlan 110
! VVLAN
CAT2970(config-if)# mls qos trust device cisco-phone
! Conditional Trust
CAT2970(config-if)# service-policy input IPPHONE+PC-BASIC
! Attaches policy
CAT2970(config-if)#exit
CAT2970(config)#
CAT2970(config)#
CAT2970(config)#ip access-list extended VVLAN-VOICE
CAT2970(config-ext-nacl)#permit
permit udp 10.1.110.0 0.0.0.255
any range 16384 32767 dscp ef
! Voice is matched by VVLAN subnet and DSCP EF
CAT2970(config-ext-nacl)#exit
CAT2970(config)#
CAT2970(config)#ip access-list extended VVLAN-CALL-SIGNALING
CAT2970(config-ext-nacl)#permit
permit tcp 10.1.110.0 0.0.0.255
any range 2000 2002 dscp af31
! Call-Signaling is matched by VVLAN subnet and DSCP AF31
continues
348
Example 12-30 Catalyst 2970/3560/3750: Conditionally Trusted IP Phone + PC: Basic Model Example
CAT2970(config-ext-nacl)#permit
permit tcp 10.1.110.0 0.0.0.255
any range 2000 2002 dscp cs3
! Call-Signaling is matched by VVLAN subnet and DSCP CS3
CAT2970(config-ext-nacl)#exit
CAT2970(config)#
CAT2970(config)#ip access-list extended VVLAN-ANY
CAT2970(config-ext-nacl)# permit ip 10.1.110.0 0.0.0.255 any
! Matches all other traffic sourced from the VVLAN subnet
CAT2970(config-ext-nacl)#end
CAT2970#
349
Example 12-31 Catalyst 2970/3560/3750: Conditionally Trusted IP Phone + PC: Basic Model Example
CAT2970(config-cmap)# match access-group name VVLAN-ANY
CAT2970(config-cmap)#
CAT2970(config-cmap)#class-map match-all DVLAN-PC-VIDEO
CAT2970(config-cmap)# match access-group name DVLAN-PC-VIDEO
CAT2970(config-cmap)#
CAT2970(config-cmap)#class-map match-all DVLAN-MISSION-CRITICAL-DATA
CAT2970(config-cmap)# match access-group name DVLAN-MISSION-CRITICAL-DATA
CAT2970(config-cmap)#
CAT2970(config-cmap)#class-map match-all DVLAN-TRANSACTIONAL-DATA
CAT2970(config-cmap)# match access-group name DVLAN-TRANSACTIONAL-DATA
CAT2970(config-cmap)#
CAT2970(config-cmap)#class-map match-all DVLAN-BULK-DATA
CAT2970(config-cmap)# match access-group name DVLAN-BULK-DATA
CAT2970(config-cmap)#exit
CAT2970(config)#
CAT2970(config)#policy-map IPPHONE+PC-ADVANCED
CAT2970(config-pmap)#class VVLAN-VOICE
CAT2970(config-pmap-c)# set ip dscp 46
! DSCP EF (Voice)
CAT2970(config-pmap-c)# police 128000 8000 exceed-action drop
! Only one voice call is permitted per switchport VVLAN
CAT2970(config-pmap-c)#class VVLAN-CALL-SIGNALING
CAT2970(config-pmap-c)# set ip dscp 24
! DSCP CS3 (Call-Signaling)
CAT2970(config-pmap-c)# police 32000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Call-Signaling is marked down to Scavenger (CS1)
CAT2970(config-pmap-c)#class VVLAN-ANY
CAT2970(config-pmap-c)# set ip dscp 0
CAT2970(config-pmap-c)# police 32000 8000 exceed-action policed-dscp-transmit
! Unauthorized VVLAN traffic is marked down to Scavenger (CS1)
CAT2970(config-pmap-c)#class DVLAN-PC-VIDEO
CAT2970(config-pmap-c)# set ip dscp 34
! DSCP AF41 (Interactive-Video)
CAT2970(config-pmap-c)# police 496000 8000 exceed-action policed-dscp-transmit
! Only one IP/VC stream will be permitted per switchport
CAT2970(config-pmap-c)#class DVLAN-MISSION-CRITICAL-DATA
CAT2970(config-pmap-c)# set ip dscp 25
! Interim Mission-Critical Data
CAT2970(config-pmap-c)# police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Mission-Critical Data is marked down to Scavenger (CS1)
CAT2970(config-pmap-c)#class DVLAN-TRANSACTIONAL-DATA
CAT2970(config-pmap-c)# set ip dscp 18
! DSCP AF21 (Transactional Data)
CAT2970(config-pmap-c)# police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Transactional Data is marked down to Scavenger (CS1)
CAT2970(config-pmap-c)#class DVLAN-BULK-DATA
CAT2970(config-pmap-c)# set ip dscp 10
! DSCP AF11 (Bulk Data)
CAT2970(config-pmap-c)# police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Bulk Data is marked down to Scavenger (CS1)
CAT2970(config-pmap-c)#class class-default
CAT2970(config-pmap-c)# set ip dscp 0
CAT2970(config-pmap-c)# police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile data traffic is marked down to Scavenger (CS1)
CAT2970(config-pmap-c)# exit
CAT2970(config-pmap)#exit
continues
350
Example 12-31 Catalyst 2970/3560/3750: Conditionally Trusted IP Phone + PC: Basic Model Example
CAT2970(config)#
CAT2970(config)#interface GigabitEthernet0/1
CAT2970(config-if)# switchport access vlan 10
! DVLAN
CAT2970(config-if)# switchport voice vlan 110
! VVLAN
CAT2970(config-if)# mls qos trust device cisco-phone
! Conditional Trust
CAT2970(config-if)# service-policy input IPPHONE+PC-ADVANCED!
IPPHONE+PC-ADVANCED Attaches Policy
CAT2970(config-if)#exit
CAT2970(config)#
CAT2970(config)#
CAT2970(config)#ip access-list extended VVLAN-VOICE
CAT2970(config-ext-nacl)#permit
permit udp 10.1.110.0 0.0.0.255
any range 16384 32767 dscp ef
! Voice is matched by VVLAN subnet and DSCP EF
CAT2970(config-ext-nacl)#exit
CAT2970(config)#
CAT2970(config)#ip access-list extended VVLAN-CALL-SIGNALING
CAT2970(config-ext-nacl)#permit
permit tcp 10.1.110.0 0.0.0.255
any range 2000 2002 dscp af31
CAT2970(config-ext-nacl)#permit
permit tcp 10.1.110.0 0.0.0.255
any range 2000 2002 dscp cs3
! Call-Signaling is matched by VVLAN subnet and DSCP AF31 or CS3
CAT2970(config-ext-nacl)#exit
CAT2970(config)#
CAT2970(config)#ip access-list extended VVLAN-ANY
CAT2970(config-ext-nacl)# permit ip 10.1.110.0 0.0.0.255 any
! Matches all other traffic sourced from the VVLAN subnet
CAT2970(config-ext-nacl)#
CAT2970(config-ext-nacl)#ip access-list extended DVLAN-PC-VIDEO
CAT2970(config-ext-nacl)# permit udp any any range 16384 32767
! IP/VC
CAT2970(config-ext-nacl)#
CAT2970(config-ext-nacl)#ip access-list extended DVLAN-MISSION-CRITICAL-DATA
CAT2970(config-ext-nacl)# permit tcp any any range 3200 3203
! SAP
CAT2970(config-ext-nacl)# permit tcp any any eq 3600
! SAP
CAT2970(config-ext-nacl)# permit tcp any any range 2000 2002
! SCCP
CAT2970(config-ext-nacl)#
CAT2970(config-ext-nacl)#ip access-list extended DVLAN-TRANSACTIONAL-DATA
CAT2970(config-ext-nacl)# permit tcp any any eq 1352
! Lotus
CAT2970(config-ext-nacl)#
CAT2970(config-ext-nacl)#ip access-list extended DVLAN-BULK-DATA
CAT2970(config-ext-nacl)# permit tcp any any eq 143
! IMAP
CAT2970(config-ext-nacl)# permit tcp any any eq 220
! IMAP
CAT2970(config-ext-nacl)#end
CAT2970#
351
NOTE
The Catalyst 2970/3560/3750 also supports two congurable ingress queues (normal and
expedite). Ingress scheduling, however, is rarely, if ever, required because it becomes
enabled only if the combined input rates from any switch port exceeds the switch fabrics
capacity. Such cases are extremely difcult to achieve, even in controlled lab environments.
In the extreme case that such a scenario should develop in a production environment, the
default settings of the ingress queues are acceptable for maintaining VoIP quality and
network availability.
The three remaining egress queues on the Catalyst 2970/3560/3750 are scheduled by a
shaped round-robin (SRR) algorithm, which can be congured to operate in shaped mode
or in shared mode. In shaped mode, assigned bandwidth is limited to the dened amount;
in shared mode, any unused bandwidth is shared among other classes (as needed).
Shaped or shared bandwidth weights can be assigned to a queue using the srr-queue
bandwidth shape and srr-queue bandwidth share interface commands. Shaped-mode
weights override shared-mode weights. Also, if shaped weights are set to 0, the queue is
operating in shared mode.
352
To make the queuing structure consistent with examples provided for previously discussed
platforms, queues 2 through 4 should be set to operate in shared mode (which is the default
mode of operation on queues 2 through 4). The ratio of the shared weights determines the
relative bandwidth allocations (the absolute values are meaningless). Because the PQ of the
Catalyst 2970/3560/3750 is Q1 (not Q4, as in the Catalyst 3550), the entire queuing model
can be ipped upside down, with Q2 representing the critical data queue, Q3 representing
the Best-Effort queue, and Q1 representing the Scavenger queue. Therefore, shared weights
of 70, 25, and 5 percent can be assigned to queues 2, 3, and 4, respectively.
NOTE
Although the Catalyst 2970/3560/3750 supports the tweaking of queue buffers, testing has
shown that this can interfere with ingress policing policies (on Catalyst IOS versions
12.2[19]EA1ad and 12.2[18]SE for the Catalyst 2970).
Furthermore, adjusting the default thresholds on the Catalyst 3750 sometimes causes
similar interference with ingress policing policies (on Catalyst IOS versions 12.2[19]EA1ad
and 12.2[18]SE for the Catalyst 3750).
Additionally, the Catalyst 2970/3560/3750 supports three weighted tail drop (WTD)
thresholds per queue. Two of these thresholds are congurable (explicit); the third is
noncongurable (implicit) because it is set to the queue-full state (100 percent). These
thresholds can be dened with the mls qos queue-set output qset-id threshold global
command. The only queues that these thresholds need to dene (away from defaults) are
queues 2 and 4. In queue 2, it is recommended to set the rst threshold to 70 percent and the
second to 80 percent, which leaves the third (implicit) threshold set at 100 percent (the tail
of the queue). In queue 4, it is recommended to set the rst threshold to 40 percent, leaving
the default values for both the second and third thresholds at 100 percent.
After the queues and thresholds have been dened, trafc can be assigned to queues and
thresholds by either 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. Although DSCP-to-queue/threshold maps override CoS-to-queue/threshold
maps, these mappings should be as consistent as possible, to ensure predictable behavior
and simplify troubleshooting.
That being said, CoS 0/DSCP 0 (Best-Effort trafc) should be mapped to queue 3 threshold 3
(the tail of the queue) because no other trafc is to be assigned to queue 3.
CoS 1 (Scavenger and Bulk Data) should be mapped to queue 4 threshold 3. Scavenger
trafc can then be contained further by a DSCP-to-queue/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 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).
353
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 Data trafc, DSCP 25, also should be assigned to queue 2
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 trafc 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) will not drown out Call-Signaling or Network and Internetwork Control trafc
within queue 2.
CoS 5 and DSCP EF (decimal value 46) should be assigned to queue 1 threshold 3 because
Voice is the only trafc to be assigned to the strict-priority queue.
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 will always be some room
available in queue 2 to service Network and Internetwork Control trafc.
Figure 12-18 illustrates these recommended Catalyst 2970/3560/3750 assignments from CoS/
DSCP to queues/thresholds.
Figure 12-18 Catalyst 2970/3550 1P3Q3T Queuing Model
Application
DSCP
CoS
Network Control
CoS 7
Internetwork Control
CS6
CoS 6
Voice
EF
CoS 5
Interactive-Video
AF41
CoS 4
Streaming-Video
CS4
CoS 4
Mission-Critical Data
DSCP 25
CoS 3
Call-Signaling
AF31/CS3
CoS 3
Transactional Data
AF21
CoS 2
Network-Management
CS2
CoS 2
Bulk Data
AF11
CoS 1
Scavenger
CS1
CoS 1
Best-Effort
1P3Q3T
CoS 1
Queue 4 (5%)
Q4T2
Q4T1
CoS 0
Queue 3
(25%)
Q2T3
CoS 7
CoS 6
CoS 3
Q2T2
Queue 2
(70%)
Q2T1
CoS 4
CoS 2
CoS 5
Q1
Priority Queue
354
Example 12-32 shows the Catalyst 2970/3560/3750 queuing and dropping conguration
recommendations.
Example 12-32 Catalyst 2970/3560/3750: Queuing and Dropping Example
CAT2970(config)#mls
mls qos srr-queue output cos-map queue 1 threshold 3 5
! Maps CoS 5 to Queue 1 Threshold 3 (Voice gets all of Queue 1)
CAT2970(config)#mls
mls qos srr-queue output cos-map queue 2 threshold 1 2 4
! Maps CoS 2 and CoS 4 to Queue 2 Threshold 1
CAT2970(config)#mls
mls qos srr-queue output cos-map queue 2 threshold 2 3
! Maps CoS 3 to Queue 2 Threshold 2
CAT2970(config)#mls
mls qos srr-queue output cos-map queue 2 threshold 3 6 7
! Maps CoS 6 and CoS 7 to Queue 2 Threshold 3
CAT2970(config)#mls
mls qos srr-queue output cos-map queue 3 threshold 3 0
! Maps CoS 0 to Queue 3 Threshold 3 (Best Efforts gets all of Q3)
CAT2970(config)#mls
mls qos srr-queue output cos-map queue 4 threshold 3 1
! Maps CoS1 to Queue 4 Threshold 3 (Scavenger/Bulk gets all of Q4)
CAT2970(config)#
CAT2970(config)#
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 1 threshold 3 46
! Maps DSCP EF (Voice) to Queue 1 Threshold 3
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 2 threshold 1 16
! Maps DSCP CS2 (Network Management) to Queue 2 Threshold 1
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 2 threshold 1 18 20 22
! Maps DSCP AF21, AF22, AF23 (Transactional Data) to Queue 2 Threshold 1
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 2 threshold 1 25
! Maps DSCP 25 (Mission-Critical Data) to Queue 2 Threshold 1
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 2 threshold 1 32
! Maps DSCP CS4 (Streaming Video) to Queue 2 Threshold 1
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 2 threshold 1 34 36 38
! Maps DSCP AF41, AF42, AF43 (Interactive-Video) to Queue 2 Threshold 1
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 2 threshold 2 24 26
! Maps DSCP CS3 and DSCP AF31 (Call-Signaling) to Queue 2 Threshold 2
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 2 threshold 3 48 56
! Maps DSCP CS6 and CS7 (Network/Internetwork) to Queue 2 Threshold 3
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 3 threshold 3 0
! Maps DSCP 0 (Best Effort) to Queue 3 Threshold 3
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 4 threshold 1 8
! Maps DSCP CS1 (Scavenger) to Queue 4 Threshold 1
CAT2970(config)#mls
mls qos srr-queue output dscp-map queue 4 threshold 3 10 12 14
! Maps DSCP AF11, AF12, AF13 (Bulk Data) to Queue 4 Threshold 3
CAT2970(config)#
CAT2970(config)#
CAT2970(config)#mls
mls qos queue-set output 1 threshold 2 70 80 100 100
! Sets Q2 Threshold 1 to 70% and Q2 Threshold 2 to 80%
CAT2970(config)#mls
mls qos queue-set output 1 threshold 4 5
40100
100100
100100
100
! Sets Q4 Threshold 1 to 40% and Q4 Threshold 2 to 100%
CAT2970(config)#
CAT2970(config)#interface range GigabitEthernet0/1 - 28
CAT2970(config-if-range)# queue-set 1
! Assigns interface to Queue-Set 1 (default)
CAT2970(config-if-range)# srr-queue bandwidth share 1 70 25 5
! Q2 gets 70% of remaining BW; Q3 gets 25% and Q4 gets 5%
355
Catalyst MLS QoS Verication Command: show mls qos maps cos-output-q
The show mls qos maps cos-output-q verication command truncates the show mls qos
maps output to report only the CoS-to-queue/threshold mappings for egress queues.
356
In Example 12-34, CoS 0 is mapped to Q3T3, CoS 1 is mapped to Q4T3, CoS 2 is mapped
to Q2T1, CoS 3 is mapped to Q2T2, CoS 4 is mapped to Q2T1, CoS 5 is mapped to Q1T3
(the PQ), and CoS 6 and CoS 7 are mapped to Q2T3.
Example 12-34 show mls qos maps cos-output-q Verication for a Catalyst 2970/3560/3750 Switch
CAT2970#show mls qos maps cos-output-q
Cos-outputq-threshold map:
cos: 0
1
2
3
4
5
6
7
-----------------------------------queue-threshold: 3-3 4-3 2-1 2-2 2-1 1-3 2-3 2-3
CAT2970#
Catalyst MLS QoS Verication Command: show mls qos maps dscp-output-q
The show mls qos maps dscp-output-q verication command truncates the show mls qos
maps output to report only the DSCP-to-queue/threshold mappings for egress queues. The
output is shown in tabular form, with the rst digit of the decimal DSCP value in rows and
the second digit in columns.
In Example 12-35, only standard DSCP PHBs are being mapped away from the default
settings (with the exception of the temporary marking of DSCP 25 for Mission-Critical
Data). The other nonstandard values can be mapped to reect the CoS-to-queue mappings,
but, for example simplicity, this has not been done in this case.
Specically, DSCP 0 is mapped to Q3T3; DSCP CS1 (8) is mapped to Q4T1; DSCP AF11,
AF12, and AF13 (10, 12, 14) are mapped to Q4T3; DSCP CS2 (16) is mapped to Q2T1, as
are DSCP AF21, AF22, and AF23 (18, 20, 22); DSCP CS3 (24) and AF31 (26) are mapped
to Q2T2; DSCP CS4 (32) is mapped to Q2T1, as are DSCP AF41, AF42, and AF43 (34, 36,
38); DSCP EF (46) is mapped to Q1T3 (the PQ); and DSCP CS6 (48) and CS7 (56) are
mapped to Q2T3. The nonstandard DSCP 25 is mapped to Q2T1.
Example 12-35 show mls qos maps dscp-output-q Verication for a Catalyst 2970/3560/3750 Switch
CAT2970#show mls qos maps dscp-output-q
Dscp-outputq-threshold map:
d1 :d2
0
1
2
3
4
5
6
7
8
-----------------------------------------------------------0 :
03-03 02-01 02-01 02-01 02-01 02-01 02-01 02-01 04-01
1 :
04-03 02-01 04-03 02-01 04-03 02-01 02-01 03-01 02-01
2 :
02-01 03-01 02-01 03-01 02-02 02-01 02-02 03-01 03-01
3 :
03-01 03-01 02-01 04-01 02-01 04-01 02-01 04-01 02-01
4 :
01-01 01-01 01-01 01-01 01-01 01-01 01-03 01-01 02-03
5 :
04-01 04-01 04-01 04-01 04-01 04-01 02-03 04-01 04-01
6 :
04-01 04-01 04-01 04-01
CAT2970#
9
02-01
03-01
03-01
04-01
04-01
04-01
357
1P3Q1T
Queuing + DBL
Untrusted
PC + SoftPhone
Model
1P3Q1T
Queuing + DBL
1P3Q1T
Queuing + DBL
Conditionally Trusted
PC + IP Phone
Basic Model
1P3Q1T
Queuing + DBL
Conditionally Trusted
PC + IP Phone
Advanced Model
1P3Q1T
Queuing + DBL
Uplinks to
Distribution Layer
Trust-DSCP
Enable QoS
Globally
Trust-DSCP
1P3Q3T
Queuing + WTD
Interswitch Links
1P3Q1T
Queuing + DBL
358
NOTE
To narrow the scope of this discussion to the most current and relevant versions of the
Catalyst 4500 switch family, only the only the Catalyst 4500 with Supervisors II+ through
V is examined is examined in this design chapter. For discussions about older versions of
Catalyst 4000/4500s, refer to the Cisco Press book Cisco Catalyst QoS: Quality of Service
in Campus Networks, by Mike Flannagan, Richard Froom, and Kevin Turek.
Much of the Catalyst MLS QoS syntax is supported on the Catalyst 4500; however, the mls
prex keyword usually is omitted from the conguration commands. For example, as with
the Catalyst 3550 and 2970/3560/3750, QoS is disabled globally on the Catalyst 4500, by
default. However, the command to enable QoS globally on a Catalyst 4500 is simply qos,
not mls qos.
The verication commands are issued in the same manner: with the mls keyword omitted.
Generally, show mls qos [...] verication commands from other Catalyst platforms are
translated to show qos [...] verication commands on the Catalyst 4500 platforms.
Although QoS is disabled globally on the Catalyst 4500, 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 enabled globally, however, all DSCP and CoS values (by default) are
set to 0 (which is equivalent to an untrusted state on all ports).
Example 12-36 shows the verication command to check whether QoS has been globally
enabled on the Catalyst 4500, along with the conguration command to do so.
Example 12-36 Enabling QoS Globally on the Catalyst 4500
CAT4500#show qos
QoS is disabled globally
IP header DSCP rewrite is enabled
CAT4500#
CAT4500#configure terminal
Enter configuration commands, one per line.
CAT4500(config)#qos
qos
CAT4500(config)#end
CAT4500#
CAT4500#show qos
QoS is enabled globally
IP header DSCP rewrite is enabled
CAT4500#
359
NOTE
show qos
show qos interface
Because most Catalyst 4500 verication commands are reasonably similar to the MLS QoS
verication commands previously discussed (albeit without the mls keyword), to minimize
redundancy, the MLS QoS verication commands that already have been detailed are not
repeated in this section.
continues
360
Example 12-38 Catalyst 4500: Untrusted PC with SoftPhone Model Example (Continued)
CAT4500-SUP4(config-pmap-c)# set ip dscp ef
! Softphone VoIP is marked to DSCP EF
CAT4500-SUP4(config-pmap-c)# police 128 kbps 8000 byte exceed-action
policed-dscp-transmit
! Out-of-profile SoftPhone voice traffic is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#class SOFTPHONE-SIGNALING
CAT4500-SUP4(config-pmap-c)# set ip dscp cs3
! SoftPhone Call-Signaling is marked to DSCP CS3
CAT4500-SUP4(config-pmap-c)# police 32 kbps 8000 byte exceed-action
policed-dscp-transmit
! Out-of-profile Signaling traffic is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#class class-default
CAT4500-SUP4(config-pmap-c)# set ip dscp default
CAT4500-SUP4(config-pmap-c)# police 5 mbps 8000 byte exceed-action
policed-dscp-transmit
! Out-of-profile data traffic is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#exit
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#interface FastEthernet2/1
CAT4500-SUP4(config-if)# service-policy input SOFTPHONE-PC
! Applies policy
CAT4500-SUP4(config-if)#exit
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#ip access-list extended SOFTPHONE-VOICE
CAT4500-SUP4(config-ext-nacl)# permit udp any any range 16384 32767
! VoIP
CAT4500-SUP4(config-ext-nacl)#
CAT4500-SUP4(config-ext-nacl)#ip access-list extended SOFTPHONE-SIGNALING
CAT4500-SUP4(config-ext-nacl)# permit tcp any any range 2000 2002
! SCCP
CAT4500-SUP4(config-ext-nacl)#end
CAT4500-SUP4#
show qos
show qos maps
show qos interface
show class-map
show policy-map
show policy interface
361
continues
362
Example 12-39 Catalyst 4500: Untrusted Multiapplication Server Model Example (Continued)
CAT4500-SUP4(config-ext-nacl)#ip access-list extended LOTUS
CAT4500-SUP4(config-ext-nacl)# permit tcp any eq 1352 any
CAT4500-SUP4(config-ext-nacl)#
CAT4500-SUP4(config-ext-nacl)#ip access-list extended IMAP
CAT4500-SUP4(config-ext-nacl)# permit tcp any eq 143 any
CAT4500-SUP4(config-ext-nacl)# permit tcp any eq 220 any
CAT4500-SUP4(config-ext-nacl)#end
CAT4500-SUP4#
show qos
show qos maps
show qos interface
show class-map
show policy-map
show policy interface
363
Example 12-40 Catalyst 4500: Conditionally Trusted IP Phone + PC: Basic Model Example (Continued)
CAT4500-SUP4(config-pmap-c)#class VVLAN-CALL-SIGNALING
CAT4500-SUP4(config-pmap-c)# set ip dscp 24
! DSCP CS3 (Call-Signaling)
CAT4500-SUP4(config-pmap-c)# police 32 kbps 8000 byte exceed-action
policed-dscp-transmit
! Out-of-profile Call-Signaling is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#class VVLAN-ANY
CAT4500-SUP4(config-pmap-c)# set ip dscp 0
CAT4500-SUP4(config-pmap-c)# police 32 kbps 8000 byte exceed-action
policed-dscp-transmit
! Unauthorized VVLAN traffic is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#class
class class-default
CAT4500-SUP4(config-pmap-c)# set ip dscp 0
CAT4500-SUP4(config-pmap-c)# police 5 mbps 8000 byte exceed-action
policed-dscp-transmit
! Out-of-profile data traffic is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)# exit
CAT4500-SUP4(config-pmap)#exit
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#interface FastEthernet2/1
CAT4500-SUP4(config-if)# switchport access vlan 10
! DVLAN
CAT4500-SUP4(config-if)# switchport voice vlan 110
! VVLAN
CAT4500-SUP4(config-if)# qos trust device cisco-phone
! Conditional Trust
CAT4500-SUP4(config-if)# service-policy input IPPHONE+PC-BASIC
! MQC Policy
CAT4500-SUP4(config-if)#exit
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#ip access-list extended VVLAN-VOICE
CAT4500-SUP4(config-ext-nacl)# permit udp 10.1.110.0 0.0.0.255 any
range 16384 32767
! Voice is matched by VVLAN subnet and UDP port-range
CAT4500-SUP4(config-ext-nacl)#exit
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#ip access-list extended VVLAN-CALL-SIGNALING
CAT4500-SUP4(config-ext-nacl)# permit tcp 10.1.110.0 0.0.0.255 any
range 2000 2002
! Call-Signaling is matched by VVLAN subnet and TCP port-range
CAT4500-SUP4(config-ext-nacl)#exit
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#ip access-list extended VVLAN-ANY
CAT4500-SUP4(config-ext-nacl)# permit ip 10.1.110.0 0.0.0.255 any
! Matches all other traffic sourced from the VVLAN subnet
CAT4500-SUP4(config-ext-nacl)#end
CAT4500-SUP4#
show qos
show qos maps
show qos interface
364
show class-map
show policy-map
show policy interface
365
Example 12-41 Catalyst 4500: Conditionally Trusted IP Phone + PC: Advanced Model Example (Continued)
CAT4500-SUP4(config-pmap-c)# police 32 kbps 8000 byte exceed-action
policed-dscp-transmit
! Out-of-profile Call-Signaling is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#class VVLAN-ANY
CAT4500-SUP4(config-pmap-c)# set ip dscp 0
CAT4500-SUP4(config-pmap-c)# police 32 kbps 8000 byte exceed-action
policed-dscp-transmit
! Unauthorized VVLAN traffic is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#class DVLAN-PC-VIDEO
CAT4500-SUP4(config-pmap-c)# set ip dscp 34
! DSCP AF41 (Int-Video)
CAT4500-SUP4(config-pmap-c)# police 500 kbps 8000 byte exceed-action
policed-dscp-transmit
policed-dscp-transmit
! Only one IP/VC stream will be permitted per switchport
CAT4500-SUP4(config-pmap-c)#class DVLAN-MISSION-CRITICAL-DATA
CAT4500-SUP4(config-pmap-c)# set ip dscp 25
! Interim Mission-Critical
CAT4500-SUP4(config-pmap-c)# police 5 mbps 8000 byte exceed-action
policed-dscp-transmit
! Out-of-profile Mission-Critical Data is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#class DVLAN-TRANSACTIONAL-DATA
CAT4500-SUP4(config-pmap-c)# set ip dscp 18
! DSCP AF21
CAT4500-SUP4(config-pmap-c)# police 5 mbps 8000 byte exceed-action
policed-dscp-transmit
! Out-of-profile Transactional Data is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#class DVLAN-BULK-DATA
CAT4500-SUP4(config-pmap-c)# set ip dscp 10
! DSCP AF11
CAT4500-SUP4(config-pmap-c)# police 5 mbps 8000 byte exceed-action
policed-dscp-transmit
! Out-of-profile Bulk Data is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#class class-default
CAT4500-SUP4(config-pmap-c)# set ip dscp 0
CAT4500-SUP4(config-pmap-c)# police 5 mbps 8000 byte exceed-action
policed-dscp-transmit
! Out-of-profile data traffic is marked down to Scavenger (CS1)
CAT4500-SUP4(config-pmap-c)#exit
CAT4500-SUP4(config-pmap)#exit
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#interface FastEthernet2/1
CAT4500-SUP4(config-if)# switchport access vlan 10
! DVLAN
CAT4500-SUP4(config-if)# switchport voice vlan 110
! VVLAN
CAT4500-SUP4(config-if)# qos trust device cisco-phone
! Conditional Trust
CAT4500-SUP4(config-if)# service-policy input IPPHONE+PC-ADVANCED
! MQC Policy
CAT4500-SUP4(config-if)#exit
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#ip access-list extended VVLAN-VOICE
CAT4500-SUP4(config-ext-nacl)# permit udp 10.1.110.0 0.0.0.255 any
range 16384 32767
! Voice is matched by VVLAN subnet and UDP port-range
CAT4500-SUP4(config-ext-nacl)#
CAT4500-SUP4(config-ext-nacl)#ip access-list extended VVLAN-CALL-SIGNALING
continues
366
Example 12-41 Catalyst 4500: Conditionally Trusted IP Phone + PC: Advanced Model Example (Continued)
CAT4500-SUP4(config-ext-nacl)# permit tcp 10.1.110.0 0.0.0.255 any
range 2000 2002
! Call-Signaling is matched by VVLAN subnet and TCP port-range
CAT4500-SUP4(config-ext-nacl)#
CAT4500-SUP4(config-ext-nacl)#ip access-list extended VVLAN-ANY
CAT4500-SUP4(config-ext-nacl)# permit ip 10.1.110.0 0.0.0.255 any
! VVLAN ANY
CAT4500-SUP4(config-ext-nacl)#
CAT4500-SUP4(config-ext-nacl)#ip access-list extended DVLAN-PC-VIDEO
CAT4500-SUP4(config-ext-nacl)# permit udp any any range 16384 32767 ! IP/VC
CAT4500-SUP4(config-ext-nacl)#
CAT4500-SUP4(config-ext-nacl)#ip access-list extended DVLAN-MISSION-CRITICAL-DATA
CAT4500-SUP4(config-ext-nacl)# permit tcp any any range 3200 3203
! SAP
CAT4500-SUP4(config-ext-nacl)# permit tcp any any eq 3600
! SAP
CAT4500-SUP4(config-ext-nacl)# permit tcp any any range 2000 2002
! SCCP
CAT4500-SUP4(config-ext-nacl)#
CAT4500-SUP4(config-ext-nacl)#ip access-list extended DVLAN-TRANSACTIONAL-DATA
CAT4500-SUP4(config-ext-nacl)# permit tcp any any eq 1352
! Lotus
CAT4500-SUP4(config-ext-nacl)#
CAT4500-SUP4(config-ext-nacl)#ip access-list extended DVLAN-BULK-DATA
CAT4500-SUP4(config-ext-nacl)# permit tcp any any eq 143
! IMAP
CAT4500-SUP4(config-ext-nacl)# permit tcp any any eq 220
! IMAP
CAT4500-SUP4(config-ext-nacl)#end
CAT4500-SUP4#
show qos
show qos maps
show qos interface
show class-map
show policy-map
show policy interface
367
The Catalyst 4500 does not support CoS-to-queue mappings; it supports only DSCP-toqueue mappings. These can be dened with the qos map dscp to tx-queue global
command.
Given these features and the objective to make queuing as consistent across platforms as
possible, it is recommended to enable DBL globally on the Catalyst 4500 and to enable
Q3 as the strict-priority queue on all interfaces (so that the switch will operate in 1P3Q1T
mode). This queue can be shaped to 30 percent of the links capacity. Furthermore, Q1 can
be used as the Scavenger/Bulk Data queue, Q2 can be used as the Best-Effort queue, and Q4
can be used as the preferential queue.
On interfaces that support bandwidth allocation, 5 percent can be assigned to Q1, 25 percent
can be assigned to Q2, and 40 percent can be assigned to Q3. Unlike bandwidth weights
that are used on other platforms, these bandwidth allocations are dened in absolute bits
per second or as relative percentages of the links bandwidth. In either case, they should not
total in excess of the links bandwidth limit (1 Gbps, or 100 percent), including the prioritybandwidth allocation for Q3.
By default, the DSCP-to-queue assignments are as follows:
368
The recommended DSCP-to-queue assignments for the Catalyst 4500 are as follows:
DSCP CS2 (Network-Management) and AF21, AF22, and AF23 (Transactional Data)
should be assigned to Q4.
DSCP CS1 (Scavenger) and DSCP AF11, AF12, and AF13 (Bulk Data) should be
assigned to Q1.
Figure 12-21 illustrates the queuing recommendations for the Catalyst 4500 (Supervisors
II+ through V).
Figure 12-21 Catalyst 4500-SupII+/III/IV/V 1P3Q1T Queuing Model
Application
DSCP
Network Control
(CS7)
Internetwork Control
CS6
Voice
EF
Interactive-Video
AF41
Streaming-Video
CS4
Mission-Critical Data
DSCP 25
Call-Signaling
AF31/CS3
Transactional Data
AF21
Network-Management
CS2
Bulk Data
AF11
1P3Q1T
CS6/CS7
CS4/AF41
Queue 4 (40%)
DSCP 25
CS3/AF31
CS2/AF21
EF
Q3 (30%)
Priority Queue
Queue 2
(25%)
0
Scavenger
CS1
Best-Effort
Queue 1 (5%)
CS1/AF11
Queue 1 (5%)
369
Example 12-42 shows the congurations for enabling queuing on the Catalyst 4500 per
these recommendations. Two separate examples are given: one for a Fast Ethernet interface
that doesnt support bandwidth allocations, and another for a Gigabit Ethernet interface that
does. Some of the DSCP-to-queue mappings shown are not required (because they overlap
with the default settings), but they are shown nonetheless to complete the logic of the
example.
Example 12-42 Catalyst 4500: Queuing and Dropping Examples
qos dbl
CAT4500-SUP4(config)#qos
! Globally enables DBL
CAT4500-SUP4(config)#qos
qos dbl exceed-action ecn
! Optional: Enables DBL to mark RFC 3168 ECN bits in the IP ToS Byte
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#qos
qos map dscp 0 to tx-queue 2
! Maps DSCP 0 (Best Effort) to Q2
CAT4500-SUP4(config)#qos
qos map dscp 8 10 12 14 to tx-queue 1
! Maps DSCP CS1 (Scavenger) and AF11/AF12/AF13 (Bulk) to Q1
CAT4500-SUP4(config)#qos
qos map dscp 16 18 20 22 to tx-queue 4
! Maps DSCP CS2 (Net-Mgmt) and AF21/AF22/AF23 (Transactional) to Q4
CAT4500-SUP4(config)#qos
qos map dscp 24 25 26 to tx-queue 4
! Maps DSCP CS3 and AF31 (Call-Signaling) and DSCP 25 (MC Data) to Q4
CAT4500-SUP4(config)#qos
qos map dscp 32 34 36 38 to tx-queue 4
! Maps DSCP CS4 (Str-Video) and AF41/AF42/AF43 (Int-Video) to Q4
CAT4500-SUP4(config)#qos
qos map dscp 46 to tx-queue 3
! Maps DSCP EF (VoIP) to Q3 (PQ)
CAT4500-SUP4(config)#qos
qos map dscp 48 56 to tx-queue 4
! Maps DSCP CS6 (Internetwork) and CS7 (Network) Control to Q4
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#policy-map DBL
CAT4500-SUP4(config-pmap)#class class-default
CAT4500-SUP4(config-pmap-c)# dbl
! Enables DBL on all traffic flows
CAT4500-SUP4(config-pmap-c)# exit
CAT4500-SUP4(config-pmap)#exit
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#interface range FastEthernet2/1 - 48
CAT4500-SUP4(config-if-range)# service-policy output DBL
! Applies DBL policy
CAT4500-SUP4(config-if-range)# tx-queue 3
CAT4500-SUP4(config-if-tx-queue)# priority high
! Enables Q3 as PQ
CAT4500-SUP4(config-if-tx-queue)# shape percent 30
! Shapes PQ to 30%
CAT4500-SUP4(config-if-tx-queue)# exit
CAT4500-SUP4(config-if-range)#exit
CAT4500-SUP4(config)#
CAT4500-SUP4(config)#interface range GigabitEthernet1/1 - 2
CAT4500-SUP4(config-if-range)# service-policy output DBL
! Applies DBL policy
CAT4500-SUP4(config-if-range)# tx-queue 1
CAT4500-SUP4(config-if-tx-queue)# bandwidth percent 5
! Q1 gets 5%
CAT4500-SUP4(config-if-tx-queue)# tx-queue 2
CAT4500-SUP4(config-if-tx-queue)# bandwidth percent 25
! Q2 gets 25%
CAT4500-SUP4(config-if-tx-queue)# tx-queue 3
CAT4500-SUP4(config-if-tx-queue)# priority high
! Enables Q3 as PQ
CAT4500-SUP4(config-if-tx-queue)# bandwidth percent 30
! PQ gets 30%
CAT4500-SUP4(config-if-tx-queue)# shape percent 30
! Shapes PQ to 30%
continues
370
! Q4 gets 40%
Catalyst 4500 QoS Verication Command: show qos maps dscp tx-queue
The Catalyst 4500 show qos maps dscp tx-queue verication command truncates the
show qos maps output to report only the DSCP-to-queue mappings for egress queues. The
output is shown in tabular form, with the rst digit of the decimal DSCP value in rows and
the second digit in columns.
In Example 12-44, only DSCP 0 is mapped to Q2; DSCP CS1 (8) and AF11, AF12, and
AF13 (10, 12, and 14) are mapped to Q1; DSCP CS2 (16) and AF22, AF22, and AF23 (18,
20, and 22) are mapped to Q4; DSCP CS3 (24) and AF31 (26) are mapped to Q4, as is the
nonstandard DSCP 25; DSCP CS4 (32) and AF41, AF42, and AF43 (34, 36, and 38) are
mapped to Q4, as are DSCP CS6 (48) and CS7 (56); and DSCP EF (46) is mapped to Q3.
371
Example 12-44 show qos maps dscp tx-queue Verication for a Catalyst 4500 Switch
CAT4500-SUP4#show qos maps dscp tx-queue
DSCP-TxQueue Mapping Table (dscp = d1d2)
d1 : d2 0 1 2 3 4 5 6 7 8 9
------------------------------------0 :
02 01 01 01 01 01 01 01 01 01
1 :
01 01 01 01 01 01 04 02 04 02
2 :
04 02 04 02 04 04 04 02 02 02
3 :
02 02
4 :
03 03
5 :
04 04
6 :
04 04
CAT4500-SUP4#
04
03
04
04
03 04 03 04 03 04 03
03 03 03 03 03 04 04
04 04 04 04 04 04 04
04
!
!
!
!
!
!
!
!
DSCP
DSCP
DSCP
DSCP
DSCP
DSCP
DSCP
DSCP
continues
372
Example 12-45 show qos interface Verication for a Catalyst 4500 Switch (Continued)
3
N/A
4
N/A
CAT4500-SUP4#
30000000
disabled
high
N/A
240
240
NOTE
The Cisco 7600 router is identical in hardware QoS features and conguration to Catalyst
6500s running Cisco IOS. However, the Cisco 7600 is better suited to a MAN or MPLS
VPN environment than a campus context, which is the scope of this chapter. Therefore,
although much of this chapter is applicable to the Cisco 7600, this discussion centers on
Catalyst 6500 QoS.
When congured as an access-layer switch, the preferred software for the Supervisor is
CatOS; when congured as a distribution- or core-layer switch, the preferred software is
Cisco IOS. Figure 12-22 summarizes the QoS design recommendations for a Catalyst 6500
switch at the access layer; Figure 12-23 shows the corresponding recommendations for
Catalyst 6500s deployed in the distribution or core layers.
Untrusted
PC + SoftPhone
Model
Uplinks to
Distribution
Layer
Globally Defined
Linecard-Dependent
Queuing + Dropping
Trust-DSCP
Conditionally Trusted
PC + IP Phone
Basic Model
Conditionally Trusted
PC + IP Phone
Advanced Model
Figure 12-23 Distribution- or Core-Layer (Cisco IOS) Catalyst 6500 QoS Design
Uplinks from Access Layer Only
Distribution Layer:
Enable QoS
Globally
Trust-DSCP
Interface-Group
Line Card-Dependent
Queuing + Dropping
Interswitch Links
Core Layer:
Enable QoS
Globally
Interface-Group
Line Card-Dependent
Queuing + Dropping
Trust-DSCP
Interswitch Links
373
374
NOTE
To narrow the scope of the discussion to the most current and relevant versions of the
Catalyst 6500 switch family, only the Catalyst 6500 with Supervisor 2 (PFC2) and Supervisor 720 (PFC3) is examined in this design chapter. For discussions on older versions of
Catalyst 6000/6500s (such as Supervisor 1, 1a with or without a PFC), refer to the Cisco
Press book Cisco Catalyst QoS: Quality of Service in Campus Networks, by Mike Flannagan,
Richard Froom, and Kevin Turek.
QoS is disabled globally by default on Catalyst 6500s running either CatOS or Cisco IOS.
When QoS is disabled globally, all frames and packets that are passed through the switch
remain unaltered (which is equivalent to a trust CoS and trust DSCP state on all ports).
When QoS is enabled globally, however, all DSCP and CoS values are (by default) set to 0
(which is equivalent to an untrusted state on all ports).
The commands to globally enable and verify QoS on a Catalyst 6500 are shown in
Example 12-46 for CatOS and Example 12-47 for Cisco IOS.
Example 12-46 Enabling QoS Globally on a Catalyst 6500: CatOS
CAT6500-PFC2-CATOS> (enable) set qos enable
QoS is enabled.
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) show qos status
QoS is enabled on this switch.
CAT6500-PFC2-CATOS> (enable)
375
376
On nonGigabit Ethernet line cards that use 2Q2T transmit queuing and 1Q4T receive
queuing, a hardware limitation prevents the proper functioning of port-based trust (which
affects trust-cos, trust-ipprec, and trust-dscp). The show port qos command can be used to
determine whether the line card is a 2Q2T-Tx/1Q4T-Rx line card. These cards also are
listed in Table 12-2.
377
On such line cards, a workaround ACL can be used to achieve trust functionality for trustcos, trust-ipprec, and trust-dscp. Example 12-50 shows the workaround ACL for trustDSCP functionality on such line cards.
Example 12-50 Trust-DSCP Workaround ACL for Catalyst 6500 2Q2T-TX/1Q4T-Rx Non-Gigabit Line Cards
CAT6500-PFC2-CATOS> (enable) set qos acl ip TRUST-DSCP trust-dscp any
TRUST-DSCP editbuffer modified. Use 'commit' command to apply changes.
CAT6500-PFC2-CATOS> (enable) commit qos acl TRUST-DSCP
QoS ACL 'TRUST-DSCP' successfully committed.
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos acl map TRUST-DSCP 4/1
NOTE
To apply the QoS ACL that you have dened (previously), the ACL must be committed to
hardware. The process of committing copies the ACL from a temporary editing buffer to
the PFC hardware. When it is resident in the PFC memory, the policy dened in the QoS
ACL can be applied to all trafc that matches the ACEs. For ease of conguration, most
administrators issue a commit all command. However, you can commit a specic ACL (by
name) to be sent from the editing buffer to PFC memory, as shown in Example 12-50.
NOTE
The ACL trust workaround to the 2Q2T line card (nonGigabit Ethernet interfaces)
limitation of not supporting trust applies only in the access layer or the campus (where
CatOS is the recommended software for the Catalyst 6500). In the distribution and core
layers, where Cisco IOS is the preferred software, all interfaces are recommended to be
Gigabit Ethernet or higher. Therefore, a Cisco IOS workaround solution for this limitation
of 10/100 2Q2T ports is not warranted.
378
379
CoS
--0
1
2
continues
380
Example 12-53 show qos maps Verication for a Catalyst 6500-CatOS Switch (Continued)
24-31
32-39
40-47
48-55
56-63
3
4
5
6
7
381
The third example displays the VLANs and ports that the ACL has been applied to. In this
specic example, port 3/1 has the SOFTPHONE-PC ACL applied to it.
Example 12-54 show qos acl Verication for a Catalyst 6500-CatOS Switch
CAT6500-PFC2-CATOS> (enable) show
ACL
-------------------------------SOFTPHONE-PC
CAT6500-PFC2-CATOS> (enable)
continues
382
Example 12-55 show qos policer Verication for a Catalyst 6500-CatOS Switch (Continued)
SOFTPHONE-VOICE
128
8
policed-dscp
Excess rate (kbps) Excess burst size (kb) Excess action
------------------ ---------------------- ------------31457280
31744 policed-dscp
ACL attached
-----------------------------------SOFTPHONE-PC
Aggregate name
Avg. rate (kbps) Burst size (kb) Normal action
--------------------- ---------------- --------------- ------------SOFTPHONE-SIGNALING
32
8 policed-dscp
Excess rate (kbps) Excess burst size (kb) Excess action
------------------ ---------------------- ------------31457280
31744 policed-dscp
ACL attached
-----------------------------------SOFTPHONE-PC
Aggregate name
Avg. rate (kbps) Burst size (kb) Normal action
--------------------- ---------------- --------------- ------------PC-DATA
4864
8
policed-dscp
Excess rate (kbps) Excess burst size (kb) Excess action
------------------ ---------------------- ------------31457280
31744 policed-dscp
ACL attached
-----------------------------------SOFTPHONE-PC
CAT6500-PFC2-CATOS> (enable)
383
Example 12-56 show qos statistics Verication for a Catalyst 6500-CatOS Switch
CAT6500-PFC2-CATOS> (enable) show qos statistics 3/1
Tx port type of port 3/1 : 1p3q1t
WRED and tail drops are accumulated in one counter per queue.
Q # Packets dropped
--- ----------------------------------------------1
0 pkts
2
0 pkts
3
0 pkts
4
0 pkts
Rx port type of port 3/1 : 1p1q0t
For untrusted ports all the packets are sent to the same queue,
Rx thresholds are disabled, tail drops are reported instead.
Q # Threshold #:Packets dropped
--- ----------------------------------------------1
0:0 pkts
2
0:0 pkts
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS>
Packets dropped due
IP packets with ToS
IP packets with CoS
Non-IP packets with
CAT6500-PFC2-CATOS>
384
The dual-rate policer is intended to complement the RFC 2597 assured-forwarding groups
DiffServ marking scheme. To illustrate this, consider Transactional Data trafc, which is
marked to AF Class 2. Conforming Transactional Data should be marked to AF21, excess
Transactional Data trafc should be marked down to AF22, and violating Transactional
Data trafc should be marked down further to AF23.
Such a markdown scheme is intended to be complemented further by DSCP-based WRED
congestion avoidance. In this manner, if congestion occurs, AF23 is dropped more aggressively than AF22, which, in turn, is dropped more aggressively than AF21.
However, because Catalyst 6500 queuing and congestion avoidance are determined primarily by CoS markings, the standards-based DSCP model cannot be followed completely at
this time on this platform. (Because AF21, AF22, and AF23 all share CoS 3, this does not
allow for granular subclass QoS.) Therefore, Scavenger class markings for violating trafc
could be used to achieve a similar overall effect, while maintaining consistency with QoS
designs previously presented for other Catalyst platforms.
Under such a modied Untrusted Multiapplication Server model, excess Transactional
Data trafc can be marked down to AF22 and violating Transactional Data trafc can be
marked down to DSCP CS1 (Scavenger). Similarly, excess Bulk Data trafc can be marked
down to AF12 and violating Bulk Data trafc can be marked down to DSCP CS1
(Scavenger). This modied model is shown in Figure 12-24.
Figure 12-24 Catalyst 6500 PFC2/PFC3 Untrusted Endpoint Dual-Rate Policing: Multiapplication Server
Example
Start
Mission-Critical
Data ACLs
SAP ACLs
15 Mbps
Yes
No
No
Lotus ACLs
Transactional
Data ACLs
Yes
Yes
25 Mbps
No
No
No
35 Mbps
Re-Mark to DSCP CS1
and Transmit
No
IMAP
ACLs
Bulk
Data ACLs
Re-Mark to DSCP 25
and Transmit
Yes
40 Mbps
No
Yes
Yes
No
50 Mbps
No
1 Mbps
No
Yes
Re-Mark to DSCP 0
and Transmit
Re-Mark to DSCP CS1
and Transmit
385
Example 12-57 shows the conguration for a Catalyst 6500 CatOS untrusted endpoint dualrate policing of a multiapplication server.
Example 12-57 Catalyst 6500 CatOS: Untrusted Multiapplication Server Example
(Dual-Rate Policing)
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map normal-rate 0,25:8
! Excess SAP and Data traffic is marked down to DSCP CS1 (Scavenger)
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map normal-rate 18:20
! Excess Transactional Data traffic is marked down from DSCP AF21 to AF22
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map excess-rate 18:8
! Violating Transactional Data traffic is marked down to CS1
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map normal-rate 10:12
! Excess Bulk Data traffic is marked down from DSCP AF11 to AF12
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map excess-rate 10:8
! Violating Bulk Data traffic is marked down to CS1
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate SAP
rate 15000 burst 8 policed-dscp
! Defines the policer for Mission-Critical Data (SAP) traffic
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate LOTUS
rate 25000 policed-dscp erate 35000 policed-dscp burst 8
! Defines the dual-rate policer for Transactional Data (Lotus) traffic
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate IMAP
rate 40000 policed-dscp erate 50000 policed-dscp burst 8
! Defines the dual-rate policer for Bulk Data (IMAP) traffic
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate DATA
rate 1000 burst 8 policed-dscp
! Defines the policer for other data traffic
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos acl ip UNTRUSTED-SERVER dscp 25
aggregate SAP tcp any range 3200 3203 any
! Binds ACL to policer and marks in-profile SAP to DSCP 25
CAT6500-PFC2-CATOS> (enable) set qos acl ip UNTRUSTED-SERVER dscp 25
aggregate SAP tcp any eq 3600 any
! Binds ACL to policer and marks in-profile SAP to DSCP 25
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos acl ip UNTRUSTED-SERVER dscp 18
aggregate LOTUS tcp any eq 1352 any
! Binds ACL to dual-rate policer and marks in-profile Lotus to DSCP AF21
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos acl ip UNTRUSTED-SERVER dscp 10
aggregate IMAP tcp any eq 143 any
! Binds ACL to dual-rate policer and marks in-profile IMAP to DSCP AF11
CAT6500-PFC2-CATOS> (enable) set qos acl ip UNTRUSTED-SERVER dscp 10
aggregate IMAP tcp any eq 220 any
! Binds ACL to dual-rate policer and marks in-profile IMAP to DSCP AF11
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos acl ip UNTRUSTED-SERVER dscp 0
aggregate DATA any
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable)
continues
386
387
Example 12-58 Catalyst 6500 CatOS: Conditionally Trusted IP Phone + PC: Basic Model Example (Continued)
CAT6500-PFC2-CATOS> (enable) set qos acl ip IPPHONE-PC-BASIC dscp 24
aggregate VVLAN-SIGNALING udp 10.1.110.0 0.0.0.255 any range 2000 2002
! Binds ACL to policer marks in-profile VVLAN Call-Signaling to DSCP CS3
CAT6500-PFC2-CATOS> (enable) set qos acl ip IPPHONE-PC-BASIC dscp 0
aggregate VVLAN-ANY 10.1.110.0 0.0.0.255
! Binds ACL to policer and marks all other VVLAN traffic to DSCP 0
CAT6500-PFC2-CATOS> (enable) set qos acl ip IPPHONE-PC-BASIC dscp 0
aggregate PC-DATA any
! Binds ACL to policer and marks in-profile PC Data traffic to DSCP 0
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) commit qos acl IPPHONE-PC-BASIC
! Commits ACL to PFC memory
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set port qos 3/1 trust-device ciscoipphone
! Conditional trust (for Cisco IP Phones only)
CAT6500-PFC2-CATOS> (enable) set qos acl map IPPHONE-PC-BASIC 3/1
! Attaches ACL to switch port
CAT6500-PFC2-CATOS> (enable)
NOTE
As previously mentioned, on nonGigabit Ethernet line cards that use 2Q2T transmit
queuing and 1Q4T receive queuing, a hardware limitation prevents the proper functioning
of port-based trust (which affects trust-cos, trust-ipprec, and trust-dscp). On such line cards,
a workaround ACL can be used to achieve trust functionality. For such an example, see the
section Catalyst 6500 CatOS QoS Verication Command: show port qos (see Example
12-50), earlier in this chapter.
388
Video is marked down to AF42 if it is in excess of 300 kbps but less than 500 kbps; if it is
greater than 500 kbps, it is marked down to Scavenger (CS1). Similarly, Transactional Data
and Bulk Data are marked down to AF22 and AF12 (respectively) if they are in excess of
3 Mbps but less than 5 Mbps; if they are in excess of 5 Mbps, they are both marked down
to Scavenger (CS1). All other policers are consistent with the single-rate policer model.
The Catalyst 6500 PFC2/PFC3 Conditionally Trusted Endpoint Dual-Rate Policing: IP
Phone + PC Advanced model is illustrated in Figure 12-25.
Figure 12-25 Catalyst 6500 PFC2/PFC3 Conditionally Trusted Endpoint Dual-Rate Policing: IP Phone + PC
(Advanced Model) Example
Start
VVLAN +
DSCP EF
Yes
128 kbps
Yes
Trust and Transmit
No
No
VVLAN +
DSCP AF31 or
CS3
Drop
Yes
Yes
No
No
VVLAN
ANY
32 kbps
Yes
32 kbps
No
No
Re-Mark to DSCP 0
and Transmit
Re-Mark to DSCP CS1
and Transmit
DVLAN +
UDP 1638432767
Yes
Yes
Yes
300 kbps
No
No
500 kbps
No
DVLAN +
SAP ACLs
Mission-Critical
Data ACLs
Yes
5 Mbps
No
No
DVLAN +
Lotus Notes ACLs
Transactional
Data ACLs
Yes
Yes
Yes
3 Mbps
No
No
Re-Mark to DSCP 25
and Transmit
5 Mbps
Re-Mark to DSCP CS1
and Transmit
No
DVLAN +
IMAP ACLs
Yes
Yes
Yes
3 Mbps
No
No
5 Mbps
Re-Mark to DSCP CS1
and Transmit
No
DVLAN
ANY
Yes
Yes
5 Mbps
No
Re-Mark to DSCP 0
and Transmit
Re-Mark to DSCP CS1
and Transmit
NOTE
389
The discrete trafc watermarks at which graduated markdown should occur are at the
network administrators discretion and vary among enterprises and applications.
Example 12-59 shows a conguration for a Catalyst 6500 CatOS Conditionally Trusted IP
Phone + PC: Advanced model.
Example 12-59 Catalyst 6500 CatOS: Conditionally Trusted IP Phone + PC: Advanced
Model Example
46 48 56
CAT6500-PFC2-CATOS> (enable) set qos cos-dscp-map 0 8 16 24 32 56
! Modifies default CoS-DSCP mapping so that CoS 5 is mapped to DSCP EF
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map normal-rate 0,24,25:8
! Excess Data, Call-Signaling and MC-Data traffic is marked down to CS1
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map normal-rate 10:12
! Excess Bulk traffic is marked down from DSCP AF11 to AF12
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map excess-rate 10:8
! Violating Bulk traffic is marked down to DSCP CS1
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map normal-rate 18:20
! Excess Transactional Data traffic is marked down from AF21 to AF22
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map excess-rate 18:8
! Violating Transactional Data traffic is marked down to DSCP CS1
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map normal-rate 34:36
! Excess Interactive-Video traffic is marked down from AF41 to AF42
CAT6500-PFC2-CATOS> (enable) set qos policed-dscp-map excess-rate 34:8
! Violating Interactive-Video traffic is marked down to DSCP CS1
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate VVLAN-VOICE
rate 128 burst 8 drop
! Defines the policer for IP Phone VoIP traffic
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate VVLAN-SIGNALING
rate 32 burst 8 policed-dscp
! Defines the policer for IP Phone Call-Signaling traffic
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate VVLAN-ANY
rate 32 burst 8 policed-dscp
! Defines the policer for any other traffic sourced from the VVLAN
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate PC-VIDEO
rate 300 policed-dscp erate 500 policed-dscp burst 8
! Defines the Dual-Rate policer for Interactive-Video
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate MISSION-CRITICAL
rate 5000 burst 8 policed-dscp
! Defines the policer for Mission-Critical Data
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate TRANSACTIONAL
rate 3000 policed-dscp erate 5000 policed-dscp burst 8
! Defines the Dual-Rate policer for Transactional Data
CAT6500-PFC2-CATOS> (enable) set qos policer aggregate BULK
rate 3000 policed-dscp erate 5000 policed-dscp burst 8
! Defines the Dual-Rate policer for Bulk Data
continues
390
Example 12-59 Catalyst 6500 CatOS: Conditionally Trusted IP Phone + PC: Advanced
391
NOTE
As previously mentioned, on nonGigabit Ethernet line cards that use 2Q2T transmit
queuing and 1Q4T receive queuing, a hardware limitation prevents the proper functioning
of port-based trust (which affects trust-cos, trust-ipprec, and trust-dscp). On such line cards,
a workaround ACL can be used to achieve trust functionality. For such an example, see the
section Catalyst 6500 CatOS QoS Verication Command: show port qos (see Example
12-50), earlier in this chapter.
392
in received trafc. Thus, even if the extremely unlikely event of ingress congestion occurs,
the default settings for the Catalyst 6500 line card receive queues are more than adequate
to protect VoIP and Network-Control trafc.
Therefore, the focus of this section is on Catalyst 6500 egress/transmit queuing design
recommendations. At the time of writing, there are six main transmit queuing/dropping
options for Catalyst 6500 line cards:
1P2Q1TIndicates one strict-priority queue and two standard queues, each with
one congurable WRED drop threshold. (However, each standard queue also has one
noncongurable tail-drop threshold.)
1P2Q2TIndicates one strict-priority queue and two standard queues, each with two
congurable WRED drop thresholds.
1P3Q1TIndicates one strict-priority queue and three standard queues, each with
one congurable WRED drop threshold. (However, each standard queue also has one
noncongurable tail-drop threshold.)
1P3Q8TIndicates one strict-priority queue and three standard queues, each with
eight congurable WRED drop thresholds. (However, each standard queue also has
one noncongurable tail-drop threshold.)
1P7Q8TIndicates one strict-priority queue and seven standard queues, each with
eight congurable WRED drop thresholds. (On 1p7q8t ports, each standard queue
also has one noncongurable tail-drop threshold.)
Almost all Catalyst 6500 line cards support a strict-priority queue, and, when supported,
the switch services trafc in the strict-priority transmit queue before servicing the standard
queues. When the switch is servicing a standard queue, after transmitting a packet, it checks
for trafc in the strict-priority queue. If the switch detects trafc in the strict-priority queue,
it suspends its service of the standard queue and completes service of all trafc in the strictpriority queue before returning to the standard queue.
Additionally, Catalyst 6500 line cards implement CoS value-based transmit-queue drop
thresholds to avoid congestion in transmitted trafc. WRED thresholds also can be dened
on certain line cards, where the CoS value of the packet (not the IP Precedence value,
although they likely will match) determines the WRED weight. WRED parameters include
a lower and upper threshold: The low WRED threshold is the queue level where (assigned)
trafc begins to be dropped selectively, and the high WRED threshold is the queue level
above which all (assigned) trafc is dropped. Furthermore, packets in the queue between
the low and high WRED thresholds have an increasing chance of being dropped as the
queue lls.
The transmit queuing and dropping capabilities can be returned with the following
commands.
393
CatOS:
Cisco IOS:
Table 12-2 includes the Catalyst 6500 line cards that were available at the time of this
writing, along with their respective queuing and dropping structures.
Table 12-2
C2 (xCEF720)
Modules
Description
ReceiveQueue
Structure
Transmit Queue
Structure
Buffer Size
WS-X6704-10GE
1Q8T (8Q8T
with DFC3a)
1P7Q8T
16 MB per port
WS-X6724-SFP
1Q8T (2Q8T
with DFC3a)
1P3Q8T
1 MB per port
WS-X6748-GE-TX
1Q8T (2Q8T
with DFC3a)
1P3Q8T
1 MB per port
WS-X6748-SFP
1Q8T (2Q8T
with DFC3a)
1P3Q8T
1 MB per port
ReceiveQueue
Structure
Transmit Queue
Structure
Buffer Size
Classic/CEF256
Ethernet Modules
Description
WS-X6024-10FL-MT
1Q4T
2Q2T
64 KB per port
WS-X6148-RJ21
1Q4T
2Q2T
WS-X6148-RJ21V
1Q4T
2Q2T
WS-X6148-RJ45
1Q4T
2Q2T
continues
394
Table 12-2
Classic/CEF256
Ethernet Modules
Description
ReceiveQueue
Structure
Transmit Queue
Structure
Buffer Size
WS-X6148-RJ45V
1Q4T
2Q2T
WS-X6148-GE-TX
1Q2T
1P2Q2T
1 MB per 8 ports
WS-X6148V-GE-TX
1Q2T
1P2Q2T
1 MB per 8 ports
WS-X6316-GE-TX
1P1Q4T
1P2Q2T
1Q4T
2Q2T
WS-X6324-100FX-SM
1Q4T
2Q2T
WS-X6348-RJ-21
1Q4T
2Q2T
WS-X6348-RJ21V
1Q4T
2Q2T
WS-X6348-RJ-45
1Q4T
2Q2T
WS-X6348-RJ45V
1Q4T
2Q2T
WS-X6408A-GBIC
1P1Q4T
1P2Q2T
Table 12-2
395
Classic/CEF256
Ethernet Modules
Description
ReceiveQueue
Structure
Transmit Queue
Structure
Buffer Size
WS-X6416-GBIC
1P1Q4T
1P2Q2T
WS-X6416-GE-MT
1P1Q4T
1P2Q2T
WS-X6501-10GEX4
1P1Q8T
1P2Q1T
64 MB per port
WS-X6502-10GE
1P1Q8T
1P2Q1T
64 MB per port
WS-X6516A-GBIC
1P1Q4T
1P2Q2T
1 MB per port
WS-X6516-GBIC
1P1Q4T
1P2Q2T
WS-X6516-GE-TX
1P1Q4T
1P2Q2T
1P1Q0T
1P3Q1T
1 MB per port
WS-X6548-RJ-21
1P1Q0T
1P3Q1T
1 MB per port
WS-X6548-RJ-45
1P1Q0T
1P3Q1T
1 MB per port
WS-X6548V-GE-TX
1Q2T
1P2Q2T
1 MB per 8 ports
continues
396
Table 12-2
Classic/CEF256
Ethernet Modules
Description
ReceiveQueue
Structure
Transmit Queue
Structure
Buffer Size
WS-X6548-GE-TX
1Q2T
1P2Q2T
1 MB per 8 ports
WS-X6816-GBIC
1P1Q4T
1P2Q2T
Design recommendations for each of these six main Catalyst 6500 queuing structures
follow.
397
DSCP
CoS
Network Control
CoS 7
Internetwork Control
CS6
CoS 6
Voice
EF
CoS 5
Interactive-Video
AF41
CoS 4
Streaming-Video
CS4
CoS 4
Mission-Critical Data
DSCP 25
CoS 3
Call-Signaling
AF31/CS3
CoS 3
Transactional Data
AF21
CoS 2
Network-Management
CS2
CoS 2
Bulk Data
AF11
CoS 1
2Q2T
Q2T2
CoS 5
Q2T1
CoS 7
CoS 6
CoS 4
Queue 2
(70%)
CoS 3
CoS 2
Scavenger
CS1
CoS 1
Best-Effort
Q1T2
CoS 0
CoS 1
Queue 1
(30%)
Q1T1
Example 12-60 shows the Catalyst 6500 CatOS congurations to congure 2Q2T queuing
recommendations.
Example 12-60 Catalyst 6500 CatOS: 2Q2T Queuing Example
CAT6500-PFC2-CATOS> (enable) set qos txq-ratio 2q2t 30 70
! Sets the buffer allocations to 30% for Q1 and 70% for Q2
CAT6500-PFC2-CATOS> (enable) set qos wrr 2q2t 30 70
! Sets the WRR weights for 30:70 (Q1:Q2) bandwidth servicing
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos drop-threshold 2q2t tx queue 1 40
5 100
100
! Sets Q1T1 to 40% to limit Scavenger/Bulk from dominating Q1
CAT6500-PFC2-CATOS> (enable) set qos drop-threshold 2q2t tx queue 2 80 100
! Sets Q2T1 to 80% to always have room in Q2 for VoIP
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos map 2q2t tx 1 1 cos 1
! Assigns Scavenger/Bulk to Q1T1
CAT6500-PFC2-CATOS> (enable) set qos map 2q2t tx 1 2 cos 0
! Assigns Best Effort to Q1T2
CAT6500-PFC2-CATOS> (enable) set qos map 2q2t tx 2 1 cos 2,3,4,6,7
! Assigns CoS 2,3,4,6 and 7 to Q2T1
CAT6500-PFC2-CATOS> (enable) set qos map 2q2t tx 2 2 cos 5
! Assigns VoIP to Q2T2
CAT6500-PFC2-CATOS> (enable)
398
399
Catalyst 6500 CatOS QoS Verication Command: show qos info runtime
The Catalyst 6500 CatOS show qos info runtime verication command reports similar
information as the show qos info cong command, but it displays the runtime information
(committed to the PFC and line card) instead of only the congured information.
In Example 12-62, CoS 1 is assigned to Q1T1; CoS 0 is assigned to Q1T2; CoS values 2,
3, 4, 6, and 7 are assigned to Q2T1; and CoS 5 is assigned to Q2T2. The rst thresholds are
set to 40 percent and 80 percent of their respective queues, and the second thresholds are
set to the tail of the queue. The size ratio has been allocated 30 percent for Q1 and 70
percent for Q2, and the WRR weights are set to 30:70 to service Q1 and Q2, respectively.
Example 12-62 show qos info runtime Verication for a Catalyst 6500-CatOS Switch
CAT6500-PFC3-CATOS> (enable) show qos info runtime 3/1
Run time setting of QoS:
QoS is enabled
Policy Source of port 3/1: Local
Tx port type of port 3/1 : 2q2t
Rx port type of port 3/1 : 1q4t
Interface type: port-based
ACL attached:
The qos trust type is set to untrusted.
Default CoS = 0
Queue and Threshold Mapping for 2q2t (tx):
Queue Threshold CoS
----- --------- --------------1
1
1
1
2
0
2
1
2 3 4 6 7
2
2
5
Queue and Threshold Mapping for 1q4t (rx):
All packets are mapped to a single queue.
Rx drop thresholds:
Rx drop thresholds are disabled.
Tx drop thresholds:
Queue # Thresholds - percentage (* abs values)
------- ------------------------------------1
5% (768
bytes)
100%
(15360
bytes)
40%
(6144
bytes)
100%
(15360
bytes)
2
80% (28672 bytes) 100% (35840 bytes)
Rx WRED thresholds:
Rx WRED feature is not supported for this port type.
Tx WRED thresholds:
WRED feature is not supported for this port type.
Tx queue size ratio:
Queue # Sizes - percentage (* abs values)
------- ------------------------------------1
30% (17408 bytes)
2
70% (37888 bytes)
Rx queue size ratio:
Rx queue size-ratio feature is not supported for this port type.
Tx WRR Configuration of ports with speed 10Mbps:
continues
400
Example 12-62 show qos info runtime Verication for a Catalyst 6500-CatOS Switch (Continued)
Queue # Ratios (* abs values)
------- ------------------------------------1
30 (7648 bytes)
2
70 (17840 bytes)
(*) Runtime information may differ from user configured setting due to hardware
granularity.
CAT6500-PFC3-CATOS> (enable)
Example 12-63 shows the Catalyst 6500 IOS congurations to congure 2Q2T queuing
recommendations.
Example 12-63 Catalyst 6500 IOS: 2Q2T Queuing Example
CAT6500-PFC3-IOS(config)# interface range FastEthernet6/1 - 48
CAT6500-PFC3-IOS(config-if)# wrr-queue queue-limit 30 70
! Sets the buffer allocations to 30% for Q1 and 70% for Q2
CAT6500-PFC3-IOS(config-if)# wrr-queue bandwidth 30 70
! Sets the WRR weights for 30:70 (Q1:Q2) bandwidth servicing
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3-IOS(config-if)# wrr-queue threshold 1 40
5 100
100
! Sets Q1T1 to 40% to limit Scavenger/Bulk from dominating Q1
CAT6500-PFC3-IOS(config-if)# wrr-queue threshold 2 80 100
! Sets Q2T1 to 80% to always have room in Q2 for VoIP
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3-IOS(config-if)# wrr-queue cos-map 1 1 1
! Assigns Scavenger/Bulk to Q1T1
CAT6500-PFC3-IOS(config-if)# wrr-queue cos-map 1 2 0
! Assigns Best Effort to Q1T2
CAT6500-PFC3-IOS(config-if)# wrr-queue cos-map 2 1 2 3 4 6 7
! Assigns CoS 2,3,4,6 and 7 to Q2T1
CAT6500-PFC3-IOS(config-if)# wrr-queue cos-map 2 2 5
! Assigns VoIP to Q2T2
CAT6500-PFC3-IOS(config-if)#end
CAT6500-PFC3-IOS#
401
80 percent and 100 percent. CoS 1 is assigned to Q1T1; CoS 0 is assigned to Q1T2; CoS
values 2, 3, 4, 6, and 7 are assigned to Q2T1; and CoS 5 is assigned to Q2T2.
Example 12-64 show queueing interface Verication for a Catalyst 6500 IOS Switch
CAT6500-PFC3-IOS#show queueing interface FastEthernet6/1
Interface FastEthernet6/1 queueing strategy: Weighted Round-Robin
Port QoS is enabled
Port is untrusted
Extend trust state: not trusted [COS = 0]
Default COS is 0
Queueing Mode In Tx direction: mode-cos
Transmit queues [type = 2q2t]:
Queue Id
Scheduling Num of thresholds
----------------------------------------1
WRR low
2
2
WRR high
2
WRR bandwidth ratios:
30[queue 1] 70[queue 2]
queue-limit ratios:
30[queue 1] 70[queue 2]
queue tail-drop-thresholds
-------------------------5[1] 100[2]
1
40[1]
100[2]
2
80[1] 100[2]
queue thresh cos-map
--------------------------------------1
1
1
1
2
0
2
1
2 3 4 6 7
2
2
5
<output truncated>
CAT6500-PFC3-IOS#
402
WRED threshold will begin being randomly dropped when the queue lls to 40 percent and
that these packets will be tail-dropped if the queue lls beyond 80 percent.
Furthermore, in CatOS within the 1P2Q1T queuing structure, each CoS value can be assigned
to a queue and a WRED threshold or just to a queue. When assigned to a queue (only), the
CoS value will be limited only by the tail of the queue. (In other words, it is assigned to
the queue with a tail drop threshold of 100 percent.)
Thus (in CatOS), the tunable WRED threshold for Q1 can be set to 40:80, meaning that
Scavenger/Bulk Data will be WRED-dropped if Q1 lls to 40 percent and will be taildropped if Q1 lls past 80 percent of capacity. This prevents Scavenger/Bulk Data from
drowning out Best-Effort trafc in Q1. The WRED threshold for Q2 can be set to 70:80 to
provide congestion avoidance for all applications assigned to it and to ensure that there will
always be room in the queue to service Network and Internetwork Control trafc.
Therefore, when the queues and thresholds have been dened as such, CoS 1 (Scavenger/
Bulk Data) can be assigned to Q1T1; CoS 0 (Best-Effort) can be assigned to Q1 only (tail);
CoS 2 (Network-Management and Transactional Data), CoS 3 (Call-Signaling and MissionCritical Data) and CoS 4 (Interactive- and Streaming-Video) can be assigned to Q2T1; CoS
6 and 7 (Internetwork and Network Control) can be assigned to Q2 only (tail); and CoS 5
(VoIP) can be assigned to Q3 (the PQ).
Figure 12-27 illustrates these 1P2Q1T queuing recommendations.
Figure 12-27 Catalyst 6500 1P2Q1T Queuing Model (CatOS Supports 1P2Q2T)
Application
DSCP
CoS
1P2Q1T
Network Control
CoS 7
Internetwork Control
CS6
CoS 6
Voice
EF
CoS 5
CoS 7
Interactive-Video
AF41
CoS 4
CoS 6
Streaming-Video
CS4
CoS 4
Mission-Critical Data
DSCP 25
CoS 3
Call-Signaling
AF31/CS3
CoS 3
Transactional Data
AF21
CoS 2
Network-Management
CS2
CoS 2
Bulk Data
AF11
CoS 1
Scavenger
CS1
CoS 1
Best-Effort
CoS 5
Q4
Q3 (5%)
Priority Queue
Q2T2
Q2T1
CoS 4
Queue 2
(40%)
CoS 3
CoS 2
Q1T2
CoS 0
CoS 1
Queue 1
(30%)
Q1T1
403
Example 12-65 shows the Catalyst 6500 CatOS congurations to congure 1P2Q1T
queuing recommendations.
Example 12-65 Catalyst 6500 CatOS: 1P2Q1T (Technically, 1P2Q2T) Queuing Example
CAT6500-PFC2-CATOS> (enable) set qos txq-ratio 1p2q1t 30 40 30
! Sets the buffer allocations to 30% for Q1, 40% for Q2, 30% for Q3 (PQ)
CAT6500-PFC2-CATOS> (enable) set qos wrr 1p2q1t 30 70
! Sets the WRR weights for 30:70 (Q1:Q2) bandwidth servicing
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos wred 1p2q1t tx queue 1 1:5
40:80
! Sets Q1 WRED Threshold to 40:80 to limit Scavenger/Bulk from dominating Q1
CAT6500-PFC2-CATOS> (enable) set qos wred 1p2q1t tx queue 2 1:80
70:80
! Sets Q2 WRED Threshold to 70:80 to force room for Network Control traffic
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos map 1p2q1t tx 1 1 cos 1
! Assigns Scavenger/Bulk to Q1 WRED Threshold
CAT6500-PFC2-CATOS> (enable) set qos map 1p2q1t tx 1 cos 0
! Assigns Best Effort to Q1 tail (100%) threshold
CAT6500-PFC2-CATOS> (enable) set qos map 1p2q1t tx 2 1 cos 2,3,4
! Assigns CoS 2,3,4 to Q2 WRED Threshold
CAT6500-PFC2-CATOS> (enable) set qos map 1p2q1t tx 2 cos 6,7
! Assigns Network/Internetwork Control to Q2 tail (100%) threshold
CAT6500-PFC2-CATOS> (enable) set qos map 1p2q1t tx 3 cos 5
! Assigns VoIP to PQ (Q3)
CAT6500-PFC2-CATOS> (enable)
NOTE
The Catalyst 6500 CatOS show qos info verication commands are reasonably similar for
each queuing structure and, as such, are not detailed for each queuing model example.
In Cisco IOS, for any 1PxQyT queuing structure, setting the size of the priority queue is not
supported. The only exception to this rule is the 1P2Q2T structure, in which the priority
queue (Q3) indirectly is set to equal Q2s size. Therefore, in all examples of Catalyst 6500 IOS
queuing structure congurations that follow that followexcept for the 1P2Q2T
exampleonly the sizes of the standard queues are being set.
404
Furthermore, specic to the 1P2Q1T queuing structure, CoS values cannot be mapped to
the tail of the queue, as in CatOS. CoS values can be mapped only to the single WRED
threshold for each queue. Therefore, the 1P2Q1T queuing and dropping recommendation
requires some slight alterations for Cisco IOS. These include changing Q1T1s WRED
threshold to 80:100 and, likewise, changing Q2T1s WRED threshold to 80:100.
The syntax logic for setting WRED thresholds in Cisco IOS is different than in CatOS. In
CatOS, minimum and maximum WRED thresholds are set on the same line; in Cisco IOS,
minimum and maximum WRED thresholds are set on different lines.
After these WRED thresholds have been altered, CoS 1 (Scavenger/Bulk Data) and CoS 0
(Best-Effort) can be assigned to Q1T1; CoS 2 (Network-Management and Transactional
Data), CoS 3 (Call-Signaling and Mission-Critical Data), CoS 4 (Interactive- and StreamingVideo), and CoS 6 and 7 (Internetwork and Network Control) can be assigned to Q2T1; and
CoS 5 (VoIP) can be assigned to Q3 (the PQ).
Example 12-66 shows the Catalyst 6500 IOS congurations to congure 1P2Q1T queuing
recommendations.
Example 12-66 Catalyst 6500 IOS: 1P2Q1T Queuing Example
CAT6500-PFC3-IOS(config)#interface TenGigabitEthernet1/1
CAT6500-PFC3-IOS(config-if)# wrr-queue queue-limit 30 40
! Sets the buffer allocations to 30% for Q1 and 40% for Q2
CAT6500-PFC3-IOS(config-if)# wrr-queue bandwidth 30 70
! Sets the WRR weights for 30:70 (Q1:Q2) bandwidth servicing
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3-IOS(config-if)# wrr-queue random-detect min-threshold 1
! Sets Min WRED Threshold for Q1T1 to 80%
CAT6500-PFC3-IOS(config-if)# wrr-queue random-detect max-threshold 1
! Sets Max WRED Threshold for Q1T1 to 100%
CAT6500-PFC3-IOS(config-if)# wrr-queue random-detect min-threshold 2
! Sets Min WRED Threshold for Q2T1 to 80%
CAT6500-PFC3-IOS(config-if)# wrr-queue random-detect max-threshold 2
! Sets Max WRED Threshold for Q2T1 to 100%
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3-IOS(config-if)# wrr-queue cos-map 1 1 1 0
! Assigns Scavenger/Bulk and Best Effort to Q1 WRED Threshold
CAT6500-PFC3-IOS(config-if)# wrr-queue cos-map 2 1 2 3 4 6 7
! Assigns CoS 2,3,4,6 and 7 to Q2 WRED Threshold 1
CAT6500-PFC3-IOS(config-if)# priority-queue cos-map 1 5
! Assigns VoIP to PQ (Q3)
CAT6500-PFC3-IOS(config-if)#end
CAT6500-PFC3-IOS(config-if)#
1
80
100
80
100
405
406
DSCP
CoS
1P2Q2T
Network Control
CoS 7
Internetwork Control
CS6
CoS 6
Voice
EF
CoS 5
CoS 7
Interactive-Video
AF41
CoS 4
CoS 6
Streaming-Video
CS4
CoS 4
Mission-Critical Data
DSCP 25
CoS 3
Call-Signaling
AF31/CS3
CoS 3
Transactional Data
AF21
CoS 2
Network-Management
CS2
CoS 2
Bulk Data
AF11
CoS 1
Scavenger
CS1
CoS 1
Best-Effort
CoS 5
Q3 (30%)
Q4 (5%)
Priority Queue
Q2T2
Q2T1
CoS 4
Queue 2
(30%)
CoS 3
CoS 2
Q2T1
CoS 0
CoS 1
Queue 1
(40%)
Q1T1
Example 12-67 shows the Catalyst 6500 CatOS congurations to congure 1P2Q1T
queuing recommendations.
Example 12-67 Catalyst 6500 CatOS: 1P2Q2T Queuing Example
CAT6500-PFC2-CATOS> (enable) set qos txq-ratio 1p2q2t 40 30 30
! Sets the buffer allocations to 40% for Q1, 30% for Q2, 30% for Q3 (PQ)
CAT6500-PFC2-CATOS> (enable) set qos wrr 1p2q2t 30 70
! Sets the WRR weights for 30:70 (Q1:Q2) bandwidth servicing
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos wred 1p2q2t tx queue 1 40:80 80:100
! Sets Q1 WRED T1 to 40:80 to limit Scavenger/Bulk from dominating Q1
! Sets Q1 WRED T2 to 80:100 to provide congestion-avoidance for Best Effort
CAT6500-PFC2-CATOS> (enable) set qos wred 1p2q2t tx queue 2 70:80 80:100
! Sets Q2 WRED T1 to 70:80 to provide congestion-avoidance
! Sets Q2 WRED T2 to 80:100 to force room for Network Control traffic
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos map 1p2q2t tx 1 1 cos 1
! Assigns Scavenger/Bulk to Q1 WRED Threshold 1
CAT6500-PFC2-CATOS> (enable) set qos map 1p2q2t tx 1 2 cos 0
! Assigns Best Effort to Q1 WRED Threshold 2
CAT6500-PFC2-CATOS> (enable) set qos map 1p2q2t tx 2 1 cos 2,3,4
! Assigns CoS 2,3,4 to Q2 WRED Threshold 1
CAT6500-PFC2-CATOS> (enable) set qos map 1p2q2t tx 2 2 cos 6,7
! Assigns Network/Internetwork Control to Q2 WRED Threshold 2
407
Example 12-68 shows the compatible Catalyst 6500 IOS congurations to congure
1P2Q1T queuing recommendations. Notice that the buffer allocation for the PQ (Q3) is not
congurable but, by default (for the 1P2Q2T queuing structure only), is set to equal the size
dened for Q2. Therefore, Q1 is set to 40 percent and Q2 is set to 30 percent, which
indirectly sets Q3 to match at 30 percent.
Example 12-68 shows the Catalyst 6500 IOS congurations to congure 1P2Q2T queuing
recommendations.
Example 12-68 Catalyst 6500 IOS: 1P2Q2T Queuing Example
interface range GigabitEthernet4/1 - 8
CAT6500-PFC3-IOS(config)#interface
CAT6500-PFC3(config-if-range)# wrr-queue queue-limit 40 30
! Sets the buffer allocations to 40% for Q1 and 30% for Q2
! Indirectly sets PQ (Q3) size to equal Q2 (which is set to 30%)
CAT6500-PFC3(config-if-range)# wrr-queue bandwidth 30 70
! Sets the WRR weights for 30:70 (Q1:Q2) bandwidth servicing
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect min-threshold 1 40 80
! Sets Min WRED Thresholds for Q1T1 and Q1T2 to 40 and 80, respectively
CAT6500-PFC3(config-if-range)# wrr-queue random-detect max-threshold 1 80 100
! Sets Max WRED Thresholds for Q1T1 and Q1T2 to 80 and 100, respectively
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect min-threshold 2 70 80
! Sets Min WRED Thresholds for Q2T1 and Q2T2 to 70 and 80, respectively
CAT6500-PFC3(config-if-range)# wrr-queue random-detect max-threshold 2 80 100
! Sets Max WRED Thresholds for Q2T1 and Q2T2 to 80 and 100, respectively
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 1 1 1
! Assigns Scavenger/Bulk to Q1 WRED Threshold 1
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 1 2 0
! Assigns Best Effort to Q1 WRED Threshold 2
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 2 1 2 3 4
! Assigns CoS 2,3,4 to Q2 WRED Threshold 1
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 2 2 6 7
! Assigns Network/Internetwork Control to Q2 WRED Threshold 2
continues
408
409
Figure 12-29 Catalyst 6500 1P3Q1T Queuing Model (CatOS Supports 1P3Q2T)
Application
DSCP
CoS
1P3Q1T
Network Control
CoS 7
Internetwork Control
CS6
CoS 6
Voice
EF
CoS 5
CoS 7
Interactive-Video
AF41
CoS 4
CoS 6
Streaming-Video
CS4
CoS 4
Mission-Critical Data
DSCP 25
CoS 3
Call-Signaling
AF31/CS3
CoS 3
Transactional Data
AF21
CoS 2
Network-Management
CS2
CoS 2
Bulk Data
AF11
CoS 1
Scavenger
CS1
CoS 1
Best-Effort
CoS 5
Q4
Q4 (5%)
Priority Queue
Q3T2
Q3T1
CoS 4
Queue 3
(70%)
CoS 3
CoS 2
CoS 0
CoS 1
Queue 2
(25%)
Queue 1 (5%)
Example 12-69 shows the Catalyst 6500 CatOS congurations to congure 1P3Q1T
queuing recommendations.
Example 12-69 Catalyst 6500 CatOS: 1P3Q1T (Technically, 1P3Q2T) Queuing Example
CAT6500-PFC2-CATOS> (enable) set qos wrr 1p3q1t 5 25 70
! Sets the WRR weights for 5:25:70 (Q1:Q2:Q3) bandwidth servicing
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos wred 1p3q1t tx queue 1 80:100
! Sets Q1 WRED T1 to 80:100 to provide congestion-avoidance for Scavenger
CAT6500-PFC2-CATOS> (enable) set qos wred 1p3q1t tx queue 2 80:100
1:100
! Sets Q2 WRED T1 to 80:100 to provide congestion-avoidance for Best Effort
CAT6500-PFC2-CATOS> (enable) set qos wred 1p3q1t tx queue 3 70:80
1:80
! Sets Q3 WRED T1 to 70:80 to provide congestion-avoidance for CoS 2,3,4
! and to force room (via tail-drop) for Network Control traffic
CAT6500-PFC2-CATOS> (enable)
CAT6500-PFC2-CATOS> (enable) set qos map 1p3q1t tx 1 1 cos 1
! Assigns Scavenger/Bulk to Q1 WRED Threshold 1 (80:100)
CAT6500-PFC2-CATOS> (enable) set qos map 1p3q1t tx 2 1 cos 0
! Assigns Best Effort to Q2 WRED Threshold 1 (80:100)
CAT6500-PFC2-CATOS> (enable) set qos map 1p3q1t tx 3 1 cos 2,3,4
! Assigns CoS 2,3,4 to Q3 WRED Threshold 1 (70:80)
CAT6500-PFC2-CATOS> (enable) set qos map 1p3q1t tx 3 cos 6,7
! Assigns Network/Internetwork Control to Q3 Tail (100%)
continues
410
Example 12-69 Catalyst 6500 CatOS: 1P3Q1T (Technically, 1P3Q2T) Queuing Example (Continued)
CAT6500-PFC2-CATOS> (enable) set qos map 1p3q1t tx 4 cos 5
! Assigns VoIP to PQ (Q4)
CAT6500-PFC2-CATOS> (enable)
In Cisco IOS, the 1P3Q1T, 1P3Q8T, and 1P7Q8T queuing structures can be congured to
use tail drop or WRED. By default, WRED is disabled. Therefore, it is good practice to
always explicitly enable WRED on a queue before setting WRED thresholds for these
queuing structures.
Additionally, in Cisco IOS, the 1P3Q1T queuing structure does not support mapping CoS
values to the tail of the queue (only to the single WRED threshold). Therefore, the queuing
recommendation requires slight alterations for Cisco IOS: changing all three WRED
thresholds to 80:100 and mapping CoS values 2, 3, 4, 6, and 7 to Q3T1.
Example 12-70 shows the Catalyst 6500 IOS congurations to congure 1P3Q1T queuing
recommendations.
Example 12-70 Catalyst 6500 IOS: 1P3Q1T Queuing Example
CAT6500-PFC3-IOS(config)# interface range FastEthernet3/1 - 48
CAT6500-PFC3-IOS(config-if)# wrr-queue bandwidth 5 25 70
! Sets the WRR weights for 5:25:70 (Q1:Q2:Q3) bandwidth servicing
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 1
! Enables WRED on Q1
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 2
! Enables WRED on Q2
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 3
! Enables WRED on Q3
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3-IOS(config-if)# wrr-queue random-detect min-threshold 1 80
! Sets Min WRED Threshold for Q1T1 to 80%
CAT6500-PFC3-IOS(config-if)# wrr-queue random-detect max-threshold 1 100
! Sets Max WRED Threshold for Q1T1 to 100%
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3-IOS(config-if)# wrr-queue random-detect min-threshold 2 80
! Sets Min WRED Threshold for Q2T1 to 80%
CAT6500-PFC3-IOS(config-if)# wrr-queue random-detect max-threshold 2 100
! Sets Max WRED Threshold for Q2T1 to 100%
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3-IOS(config-if)# wrr-queue random-detect min-threshold 3 80
! Sets Min WRED Threshold for Q3T1 to 80%
411
412
Data) can be assigned to Q3T3; CoS 6 (Internetwork Control) can be assigned to Q3T4;
CoS 7 (Internetwork and Network Control) can be assigned to Q3T5; and CoS 5 (VoIP) can
be assigned to Q4 (the PQ).
Figure 12-30 illustrates these 1P3Q8T queuing recommendations.
Figure 12-30 Catalyst 6500 1P3Q8T Queuing Model
Application
DSCP
CoS
Network Control
CoS 7
Internetwork Control
CS6
CoS 6
EF
CoS 5
1P3Q8T
CoS 5
Voice
Interactive-Video
AF41
Q4 (5%)
Priority Queue
CoS 7
Q3T5
CoS 6
Q3T4
CoS 3
Q3T3
CoS 2
Q3T2
CoS 4
Streaming-Video
CS4
CoS 4
Mission-Critical Data
DSCP 25
CoS 3
Q3T1
Call-Signaling
AF31/CS3
CoS 3
Transactional Data
AF21
CoS 2
Network-Management
CS2
CoS 2
Bulk Data
AF11
CoS 1
Scavenger
CS1
CoS 1
Best-Effort
Queue 3
(40%)
CoS 4
Q2T1
CoS 0
CoS 1
Queue 2
(25%)
Queue 1 (5%)
Q1T1
Example 12-71 shows the Catalyst 6500 (PFC3) CatOS congurations to congure
1P3Q8T queuing recommendations.
Example 12-71 Catalyst 6500 (PFC3) CatOS: 1P3Q8T Queuing Example
CAT6500-PFC3-CATOS> (enable) set qos txq-ratio 1p3q8t 5 25 40 30
! Allocates 5% for Q1, 25% for Q2, 40% for Q3 and 30% for Q4 (PQ)
CAT6500-PFC3-CATOS> (enable) set qos wrr 1p3q8t 5 25 70
! Sets the WRR weights for 5:25:70 (Q1:Q2:Q3) bandwidth servicing
CAT6500-PFC3-CATOS> (enable)
CAT6500-PFC3-CATOS> (enable) set qos wred 1p3q8t tx queue 1 80:100 100:100
100:100 100:100 100:100 100:100 100:100 100:100
! Sets Q1 WRED T1 to 80:100 and all other Q1 WRED Thresholds to 100:100
CAT6500-PFC3-CATOS> (enable) set qos wred 1p3q8t tx queue 2 80:100 100:100
100:100 100:100 100:100 100:100 100:100 100:100
! Sets Q2 WRED T1 to 80:100 and all other Q2 WRED Thresholds to 100:100
CAT6500-PFC3-CATOS> (enable) set qos wred 1p3q8t tx queue 3 50:60 60:70 70:80
80:90 90:100 100:100 100:100 100:100
! Sets Q3 WRED T1 to 50:60, Q3T2 to 60:70, Q3T3 to 70:80,
413
Example 12-71 Catalyst 6500 (PFC3) CatOS: 1P3Q8T Queuing Example (Continued)
! Q3T4 to 80:90, Q3T5 to 90:100
! and the other two Q3 WRED Thresholds to 100:100
CAT6500-PFC3-CATOS> (enable)
CAT6500-PFC3-CATOS> (enable) set qos map 1p3q8t tx 1 1 cos 1
! Assigns Scavenger/Bulk to Q1 WRED Threshold 1
CAT6500-PFC3-CATOS> (enable) set qos map 1p3q8t tx 2 1 cos 0
! Assigns Best Effort to Q2 WRED Threshold 1
CAT6500-PFC3-CATOS> (enable) set qos map 1p3q8t tx 3 1 cos 4
! Assigns Video to Q3 WRED Threshold 1
CAT6500-PFC3-CATOS> (enable) set qos map 1p3q8t tx 3 2 cos 2
! Assigns Net-Mgmt and Transactional Data to Q3 WRED T2
CAT6500-PFC3-CATOS> (enable) set qos map 1p3q8t tx 3 3 cos 3
! Assigns Call-Signaling and Mission-Critical Data to Q3 WRED T3
CAT6500-PFC3-CATOS> (enable) set qos map 1p3q8t tx 3 4 cos 6
! Assigns Internetwork-Control (IP Routing) to Q3 WRED T4
CAT6500-PFC3-CATOS> (enable) set qos map 1p3q8t tx 3 5 cos 7
! Assigns Network-Control (Spanning Tree) to Q3 WRED T5
CAT6500-PFC3-CATOS> (enable) set qos map 1p3q8t tx 4 cos 5
! Assigns VoIP to the PQ (Q4)
CAT6500-PFC3-CATOS> (enable)
Example 12-72 shows the Catalyst 6500 (PFC3) IOS congurations to congure 1P3Q8T
queuing recommendations.
Example 12-72 Catalyst 6500 IOS: 1P3Q8T Queuing Example
CAT6500-PFC3-IOS(config)# interface range GigabitEthernet1/1 - 48
CAT6500-PFC3-IOS(config-if)# wrr-queue queue-limit 5 25 40
! Allocates 5% for Q1, 25% for Q2 and 40% for Q3
CAT6500-PFC3-IOS(config-if)# wrr-queue bandwidth 5 25 70
! Sets the WRR weights for 5:25:70 (Q1:Q2:Q3) bandwidth servicing
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 1
! Enables WRED on Q1
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 2
! Enables WRED on Q2
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 3
! Enables WRED on Q3
CAT6500-PFC3-IOS(config-if)#
CAT6500-PFC3-IOS(config-if)# wrr-queue random-detect min-threshold 1 80
100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q1T1 to 80% and all others to 100%
continues
414
415
Under a 1P7Q8T model, buffer space can be allocated as follows: 5 percent for the
Scavenger/Bulk Data queue (Q1), 25 percent for the Best-Effort queue (Q2), 10 percent for
the Video queue (Q3), 10 percent for the Network-Management/Transactional Data queue
(Q4), 10 percent for the Call-Signaling/Mission-Critical Data queue (Q5), 5 percent for the
Internetwork Control queue (Q6), 5 percent for the Network Control queue (Q7), and 30
percent for the PQ (Q8).
The WRR weights for the standard queues (Q1 through Q7), for dividing the remaining
bandwidth, after the priority queue has been serviced fully, can be set to 5:25:20:20:20:5:5,
respectively, for Q1 through Q7.
Because eight queues are available, each CoS value can be assigned to its own exclusive
queue. WRED can be enabled on each queue to provide it with congestion avoidance, by
setting the rst WRED threshold of each queue to 80:100. All other WRED thresholds can
remain at 100:100.
Therefore, when the queues and thresholds have been dened as mentioned previously,
CoS 1 (Scavenger/Bulk Data) can be assigned to Q1T1; CoS 0 (Best-Effort) can be
assigned to Q2T1; CoS 4 (Interactive- and Streaming-Video) can be assigned to Q3T1;
CoS 2 (Network-Management and Transactional Data) can be assigned to Q4T1; CoS 3
(Call-Signaling and Mission-Critical Data) can be assigned to Q5T1; CoS 6 (Internetwork
Control) can be assigned to Q6T1; CoS 7 (Internetwork and Network Control) can be
assigned to Q7T1; and CoS 5 (VoIP) can be assigned to Q8 (the PQ).
Figure 12-31 illustrates these 1P7Q8T queuing recommendations.
Figure 12-31 Catalyst 6500 1P7Q8T Queuing Model
Application
DSCP
CoS
Network Control
CoS 7
Internetwork Control
CS6
CoS 6
Voice
EF
CoS 5
Interactive-Video
AF41
CoS 4
Streaming-Video
CS4
CoS 4
Mission-Critical Data
DSCP 25
CoS 3
1P7Q8T
CoS 5
Q8 (PQ)
CoS 7
Q7 (5%)
Q7T1
CoS 6
Q6 (5%)
Q6T1
CoS 3
Q5 (20%)
CoS 2
Q4 (20%)
CoS 4
Q3 (20%)
CoS 0
Q2 (25%)
Q5T1
Call-Signaling
AF31/CS3
CoS 3
Transactional Data
AF21
CoS 2
Network-Management
CS2
CoS 2
Bulk Data
AF11
CoS 1
Scavenger
CS1
CoS 1
Best-Effort
Q4T1
Q3T1
Q2T1
CoS 1
Q1 (5%)
Q1T1
416
Example 12-73 shows the Catalyst 6500 (PFC3) CatOS congurations to congure
1P7Q8T queuing recommendations.
Example 12-73 Catalyst 6500 (PFC3) CatOS: 1P7Q8T Queuing Example
CAT6500-PFC3-CATOS> (enable) set qos txq-ratio 1p7q8t 5 25 10 10 10 5 5 30
! Allocates 5% to Q1, 25% to Q2, 10% to Q3, 10% to Q4,
! Allocates 10% to Q5, 5% to Q6, 5% to Q7 and 30% to the PQ (Q8)
CAT6500-PFC3-CATOS> (enable) set qos wrr 1p7q8t 5 25 20 20 20 5 5
! Sets the WRR weights for 5:25:20:20:20:5:5 (Q1 through Q7)
CAT6500-PFC3-CATOS> (enable)
CAT6500-PFC3-CATOS> (enable)
CAT6500-PFC3-CATOS> (enable) set qos wred 1p7q8t tx queue 1 80:100 100:100
100:100 100:100 100:100 100:100 100:100 100:100
! Sets Q1 WRED T1 to 80:100 and all other Q1 WRED Thresholds to 100:100
CAT6500-PFC3-CATOS> (enable) set qos wred 1p7q8t tx queue 2 80:100 100:100
100:100 100:100 100:100 100:100 100:100 100:100
! Sets Q2 WRED T1 to 80:100 and all other Q2 WRED Thresholds to 100:100
CAT6500-PFC3-CATOS> (enable) set qos wred 1p7q8t tx queue 3 80:100 100:100
100:100 100:100 100:100 100:100 100:100 100:100
! Sets Q3 WRED T1 to 80:100 and all other Q3 WRED Thresholds to 100:100
CAT6500-PFC3-CATOS> (enable) set qos wred 1p7q8t tx queue 4 80:100 100:100
100:100 100:100 100:100 100:100 100:100 100:100
! Sets Q4 WRED T1 to 80:100 and all other Q4 WRED Thresholds to 100:100
CAT6500-PFC3-CATOS> (enable) set qos wred 1p7q8t tx queue 5 80:100 100:100
100:100 100:100 100:100 100:100 100:100 100:100
! Sets Q5 WRED T1 to 80:100 and all other Q5 WRED Thresholds to 100:100
CAT6500-PFC3-CATOS> (enable) set qos wred 1p7q8t tx queue 6 80:100 100:100
100:100 100:100 100:100 100:100 100:100 100:100
! Sets Q6 WRED T1 to 80:100 and all other Q6 WRED Thresholds to 100:100
CAT6500-PFC3-CATOS> (enable) set qos wred 1p7q8t tx queue 7 80:100 100:100
100:100 100:100 100:100 100:100 100:100 100:100
! Sets Q7 WRED T1 to 80:100 and all other Q7 WRED Thresholds to 100:100
CAT6500-PFC3-CATOS> (enable)
CAT6500-PFC3-CATOS> (enable)
CAT6500-PFC3-CATOS> (enable) set qos map 1p7q8t tx 1 1 cos 1
! Assigns Scavenger/Bulk to Q1 WRED Threshold 1
CAT6500-PFC3-CATOS> (enable) set qos map 1p7q8t tx 2 1 cos 0
! Assigns Best Effort to Q2 WRED Threshold 1
CAT6500-PFC3-CATOS> (enable) set qos map 1p7q8t tx 3 1 cos 4
! Assigns Video to Q3 WRED Threshold 1
CAT6500-PFC3-CATOS> (enable) set qos map 1p7q8t tx 4 1 cos 2
! Assigns Net-Mgmt and Transactional Data to Q4 WRED T1
CAT6500-PFC3-CATOS> (enable) set qos map 1p7q8t tx 5 1 cos 3
! Assigns Call-Signaling and Mission-Critical Data to Q5 WRED T1
CAT6500-PFC3-CATOS> (enable) set qos map 1p7q8t tx 6 1 cos 6
! Assigns Internetwork-Control (IP Routing) to Q6 WRED T1
CAT6500-PFC3-CATOS> (enable) set qos map 1p7q8t tx 7 1 cos 7
! Assigns Network-Control (Spanning Tree) to Q7 WRED T1
CAT6500-PFC3-CATOS> (enable) set qos map 1p7q8t tx 8 cos 5
! Assigns VoIP to the PQ (Q4)
CAT6500-PFC3-CATOS> (enable)
417
Example 12-74 shows the Catalyst 6500 (PFC3) IOS congurations to congure 1P7Q8T
queuing recommendations.
Example 12-74 Catalyst 6500 (PFC3) IOS: 1P7Q8T Queuing Example
CAT6500-PFC3-IOS(config)#interface
interface range TenGigabitEthernet4/1 - 4
CAT6500-PFC3(config-if-range)# wrr-queue queue-limit 5 25 10 10 10 5 5
! Allocates 5% to Q1, 25% to Q2, 10% to Q3, 10% to Q4,
! Allocates 10% to Q5, 5% to Q6 and 5% to Q7
CAT6500-PFC3(config-if-range)# wrr-queue bandwidth 5 25 20 20 20 5 5
! Sets the WRR weights for 5:25:20:20:20:5:5 (Q1 through Q7)
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 1
! Enables WRED on Q1
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 2
! Enables WRED on Q2
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 3
! Enables WRED on Q3
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 4
! Enables WRED on Q4
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 5
! Enables WRED on Q5
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 6
! Enables WRED on Q6
CAT6500-PFC3(config-if-range)# wrr-queue random-detect 7
! Enables WRED on Q7
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect min-threshold 1 80
100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q1T1 to 80% and all others to 100%
CAT6500-PFC3(config-if-range)# wrr-queue random-detect max-threshold 1 100
100 100 100 100 100 100 100
! Sets Max WRED Threshold for Q1T1 to 100% and all others to 100%
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect min-threshold 2 80
100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q2T1 to 80% and all others to 100%
CAT6500-PFC3(config-if-range)# wrr-queue random-detect max-threshold 2 100
100 100 100 100 100 100 100
! Sets Max WRED Threshold for Q2T1 to 100% and all others to 100%
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect min-threshold 3 80
100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q3T1 to 80% and all others to 100%
continues
418
Example 12-74 Catalyst 6500 (PFC3) IOS: 1P7Q8T Queuing Example (Continued)
CAT6500-PFC3(config-if-range)# wrr-queue random-detect max-threshold 3 100
100 100 100 100 100 100 100
! Sets Max WRED Threshold for Q3T1 to 100% and all others to 100%
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect min-threshold 4 80
100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q4T1 to 80% and all others to 100%
CAT6500-PFC3(config-if-range)# wrr-queue random-detect max-threshold 4 100
100 100 100 100 100 100 100
! Sets Max WRED Threshold for Q4T1 to 100% and all others to 100%
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect min-threshold 5 80
100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q5T1 to 80% and all others to 100%
CAT6500-PFC3(config-if-range)# wrr-queue random-detect max-threshold 5 100
100 100 100 100 100 100 100
! Sets Max WRED Threshold for Q5T1 to 100% and all others to 100%
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect min-threshold 6 80
100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q6T1 to 80% and all others to 100%
CAT6500-PFC3(config-if-range)# wrr-queue random-detect max-threshold 6 100
100 100 100 100 100 100 100
! Sets Max WRED Threshold for Q6T1 to 100% and all others to 100%
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue random-detect min-threshold 7 80
100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q7T1 to 80% and all others to 100%
CAT6500-PFC3(config-if-range)# wrr-queue random-detect max-threshold 7 100
100 100 100 100 100 100 100
! Sets Max WRED Threshold for Q7T1 to 100% and all others to 100%
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)#
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 1 1 1
! Assigns Scavenger/Bulk to Q1 WRED Threshold 1
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 2 1 0
! Assigns Best Effort to Q2 WRED Threshold 1
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 3 1 4
! Assigns Video to Q3 WRED Threshold 1
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 4 1 2
! Assigns Net-Mgmt and Transactional Data to Q4 WRED T1
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 5 1 3
! Assigns Call-Signaling and Mission-Critical Data to Q5 WRED T1
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 6 1 6
! Assigns Internetwork-Control (IP Routing) to Q6 WRED T1
CAT6500-PFC3(config-if-range)# wrr-queue cos-map 7 1 7
! Assigns Network-Control (Spanning Tree) to Q7 WRED T1
CAT6500-PFC3(config-if-range)# priority-queue cos-map 1 5
! Assigns VoIP to the PQ (Q4)
CAT6500-PFC3(config-if-range)#end
CAT6500-PFC3-IOS#
419
continues
420
Example 12-75 Catalyst 6500 (PFC3) IOSDistribution-Layer Per-User Microow Policing Example (Continued)
CAT6500-PFC3-I(config-pmap-c)# police flow mask src-only 500000 8000
conform-action transmit exceed-action policed-dscp-transmit
! Excess IP/VC traffic from any source is marked down to CS1
CAT6500-PFC3-I(config-pmap-c)# class CALL-SIGNALING
CAT6500-PFC3-I(config-pmap-c)# police flow mask src-only 32000 8000
conform-action transmit exceed-action policed-dscp-transmit
! Excess Call-Signaling traffic from any source is marked down to CS1
CAT6500-PFC3-I(config-pmap-c)# class BEST-EFFORT
CAT6500-PFC3-I(config-pmap-c)# police flow mask src-only 5000000 8000
conform-action transmit exceed-action policed-dscp-transmit
! Excess PC Data traffic from any source is marked down to CS1
CAT6500-PFC3-I(config-pmap-c)# exit
CAT6500-PFC3-IOS(config-pmap)#exit
CAT6500-PFC3-IOS(config)#
CAT6500-PFC3-IOS(config)#
CAT6500-PFC3-IOS(config)#interface
interface range GigabitEthernet4/1 - 4
CAT6500-PFC3(config-if-range)# mls qos trust dscp
CAT6500-PFC3(config-if-range)# service-policy input PER-USER-POLICING
! Attaches Per-User Microflow policing policy to Uplinks from Access
CAT6500-PFC3(config-if-range)#end
CAT6500-PFC3-IOS#
421
Therefore, the optimal distribution of QoS operations is to have as many QoS actions
performed on the Catalyst switches as possible, saving the WAN/branch router valuable CPU
cycles. This is an especially critical consideration when deploying DoS/worm-mitigation
designs.
For example, some enterprises have deployed advanced QoS policies on their branch
switches and routers, only to have DoS/worm attacks originate from within the branch.
Remember, queuing will not engage on a switch unless its links are congestedand even
if it does, if the branch switch hands off 100 Mbps of (correctly queued) trafc to a branch
router, it more than likely will bring it down.
Thus, the following design principles for the campus-to-WAN handoff can help mitigate
these types of scenarios.
First, resist the urge to use a Gigabit Ethernet connection to the WAN aggregation router,
even if the router supports GE.
It is extremely unlikely that the WAN aggregator will be serving anywhere close to a
(combined) WAN circuit rate of 1 Gbps. Therefore, use one (or more) Fast Ethernet
connection on the distribution-layer Catalyst switch to connect to the WAG so that not only
is the aggregate trafc sent to the WAG limited (in 100 Mbps increments), but (because
congestion points now are pulled back into the Catalyst switch, thus forcing queuing to
engage on the FE switch port) the trafc also will be queued correctly within these limits
(of 100 Mbps increments).
For example, a WAN aggregation router is supporting two DS3 WAN connections (totaling
90 Mbps of WAN circuit capacity). In this case, the distribution-layer switch port connecting
to the WAG should be Fast Ethernet. Then, if more than 100 Mbps of trafc attempts to
traverse the WAN, the Catalyst switch will engage queuing on the switch port and aggressively
drop ows according to the dened application hierarchies. Only 100 Mbps of correctly
queued trafc will ever be handed off to the WAG.
In the case of a WAN aggregation router supporting over 100 Mbps of WAN circuits, as
in the case of a WAG running one or more OC-3 ports (at 155 Mbps each), multiple Fast
Ethernet connections can be used to connect to the WAG from the distribution-layer switch
to achieve the same net effect.
The point is to bring back, as much as possible, the choke point into Catalyst hardware and
engage hardware queuing there instead of overwhelming the software-based policing and
queuing policies within the WAN aggregation router.
Second, if the combined WAN circuit rate is signicantly below 100 Mbps, enable egress
shaping on the Catalyst switches (when supported).
If there is no hope of engaging queuing on the Catalyst switch because the combined WAN
circuit rates are far below those of Fast Ethernet (the minimum port speed of Catalyst
switches), enable shaping on platforms that support this feature. Such platforms include the
Catalyst 2970, 3560, 3750, and 4500.
422
In this manner, the Catalyst switch can hold back trafc and selectively drop (according to
dened policies) from ows that otherwise would ood the WAN/branch router.
For example, if a branch router is using two ATM-IMA T1 links (3 Mbps combined
throughput) to connect the branch to the WAN, the branch switch could be congured to
shape all WAN-destined trafc to 3 Mbps or could be congured to shape on a per-application
basis to smaller increments.
Refer to the queuing/dropping sections of these platforms in this chapter and Cisco IOS
documentation for additional guidance on enabling shaping.
Finally, if the combined WAN circuit rate is signicantly below 100 Mbps and the Catalyst
switch does not support shaping, enable egress policing (when supported).
If the Catalyst switch does not support shaping, egress policing is the next-best alternative
for this scenario.
For example, the Catalyst 3550 does not support shaping, but it does support up to eight
policers on all egress ports. Thus, it could still protect its branch router from being overwhelmed by policing on egress. Egress policing can be done on an aggregate level or on a
per-application basis.
Again, the objective is to discard, as intelligently as possible, trafc that will be dropped
inevitably anyway (by the WAN/branch router), but, whenever possible, to perform the
dropping within Catalyst hardware (instead of Cisco IOS Software).
Egress policers are congured in the same manner as ingress policers, but the direction
specied in the service-policy interface-conguration statement will be out, not in.
NOTE
The only Catalyst switch discussed in this chapter that did not support either shaping or
egress policing is the Catalyst 2950. Unfortunately, there is no way that the Catalyst 2950
can ofoad QoS from the branch router. If such functionality is required, a hardware
upgrade is advisable.
423
ABC, Inc., follows the Cisco recommended campus hierarchy of access, distribution, and
core layers and has deployed a mix of Catalyst switching platforms at these layers. These
switches include Catalyst 3550s and 3750s (at the access layer), 6500-Sup2s (within the
data center), 4500-Sup4s (within the distribution layer), and 6500-Sup720s (within the
distribution and core layers). Also, ABC, Inc., is connecting to Cisco 7200-NPE-G1 WAN
aggregation routers that are providing WAN services at OC-3 speeds. Figure 12-32 shows
the campus network topology.
Figure 12-32 Case Study: Campus Network with QoS Policies to Protect Voice, Video, and Data While Mitigating
DoS/Worm Attacks
Catalyst 6500-PFC3- Catalyst 6500-PFC3CORE-RIGHT
CORE-LEFT
10GE
Catalyst 4500-Sup4DISTRIBUTION-LEFT
Catalyst 6500-PFC3DISTRIBUTION-RIGHT
FE
Catalyst 6500-PFC2
-DATACENTER
FE
WAN Aggregator
ATM OC-3
Server Farms
Catalyst
Catalyst
3550
3750
IP Phones + PCs
IP Phones + PCs
Trust-DSCP + Queuing
Conditional Trust + Policing + Queuing
All links are Gigabit Ethernet unless otherwise noted.
At this early phase in the network deployment, ABC, Inc., has basic networking congured
and wants to overlay QoS functionality. Following this phase, it will enable additional
security technologies.
ABC, Inc., has chosen to implement an Untrusted Server model within the data center
because it wants to administer QoS markings and policies on the network infrastructure
424
instead of on the application servers (which, at times, have been infected with viruses). The
Mission-Critical Data application is SAP, served off TCP ports 3200 to 3203 and 3600; the
Transactional Data application is Lotus Notes, served off TCP port 1352; and the Bulk Data
application is IMAP for E-mail, served off TCP ports 143 and 220. The company has
dedicated servers for these applications, but these servers sometimes are moved. Instead of
requiring the networking team to be notied for every server move, a blanket set of policies
will be deployed for these main applications on every data center switch port to correctly
mark and police these ows.
ABC, Inc., has deployed Cisco IP phones and is encouraging employees to make effective
use of videoconferencing applications to keep travel budgets low while maintaining productivity. Additionally, because the company has been hit hard with nearly a dozen worm
attacks within the past year, it has chosen to implement a Scavenger-class markdown/queuing strategy throughout the network to mitigate the effects of such ooding attacks. Finally,
because ABC, Inc., prefers data applications to receive QoS in both server-to-client and
client-to-server directions, it has chosen to deploy the Conditionally Trusted Endpoint: IP
Phone + PC Advanced model on all end-user access-layer switches. On the Catalyst 3550,
this model is being deployed through per-port/per-VLAN policers; on the Catalyst 3750, it
is being deployed by access lists that include voice VLAN subnet information.
All distribution-layer and core-layer links have been congured to trust DSCP markings.
Additionally, all distribution-layer Catalyst 6500-Sup720s (with PFC3s) are congured to
perform per-user microow policing as a second line of defense against spurious ows
from (non-data center access-layer switches). Queuing structures are dependant on
platform and line card capabilities, as detailed in the congurations.
Finally, ABC, Inc., has a series of Cisco 7200-NPE-G1 WAN aggregation routers to provide
WAN services. These WAN routers have ATM OC-3 (155-Mbps) links to their carrier and
home multiple ATM PVCs to their remote sites. Although these NPE-G1 routers have
Gigabit Ethernet interfaces, ABC, Inc., has chosen to connect to them using two Fast
Ethernet interfaces from the campus distribution-layer switches. In this manner, the amount
of trafc sent to WAN aggregators is limited to 200 Mbps, while intelligent queuing is
performedaccording to the enterprise-wide application hierarchywithin these physical
200-Mbps limits.
The QoS designs for the ABC campus network span six switches, but because one core
switch is a mirror image of the other, only ve congurations are detailed in the following
example. These include the QoS congurations for the Catalyst 6500 PFC2 data center
switch (see Example 12-76), the Catalyst 3550 access-layer switch (see Example 12-77),
the Catalyst 3750 access-layer switch (see Example 12-78), the left Catalyst 4500-Sup4
distribution-layer switch (see Example 12-79), the right Catalyst 6500-PFC3 distributionlayer switch (see Example 12-80), and the left Catalyst 6500-PFC3 core-layer switch (see
Example 12-81), of which the right Catalyst 6500-PFC3 core-layer switch is a mirror image.
Example 12-76 shows the QoS conguration for the Catalyst 6500 PFC2 data center
switch.
425
Example 12-76 Catalyst 6500-PFC2 (CatOS): Data Center Access Switch for Untrusted Servers (Advanced
!
#qos
set qos enable
! 1P2Q2T Global Definitions (for WS-X6K-S2U-MSFC2 GE Uplinks)
set qos map 1p2q2t tx 1 2 cos 0
! Assigns Best Effort to Q1T2
set qos map 1p2q2t tx 2 1 cos 2
! Assigns Net-Mgmt/Trans-Data to Q2T1
set qos map 1p2q2t tx 2 1 cos 3
! Assigns Call-Sig/MC-Data to Q2T1
set qos map 1p2q2t tx 2 2 cos 6
! Assigns Routing to Q2T2
! All other CoS-Queue mapping remain default
set qos wrr 1p2q2t 30 70
! Sets WRR weights to 30:70 for Q1:Q2
set qos txq-ratio 1p2q2t 30 40 30
! Sets sizes 30%,40%,30% for Q1,Q2,Q3/PQ
set qos wred 1p2q2t tx queue 1 40:80 80:100
! Sets WRED Thresholds for Q1
set qos wred 1p2q2t tx queue 2 70:80 80:100
! Sets WRED Thresholds for Q2
! 1P3Q1T Global Definitions (for WS-X6548-RJ-45 FE switch ports)
set qos map 1p3q1t tx 2 1 cos 0
! Assigns Best Effort to Q2T1
set qos map 1p3q1t tx 3 1 cos 2
! Assigns Net-Mgmt/Trans-Data to Q3T1
set qos map 1p3q1t tx 3 1 cos 3
! Assigns Call-Sig/MC-Data to Q3T1
set qos map 1p3q1t tx 3 1 cos 4
! Assigns Video to Q3T1
set qos map 1p3q1t tx 3 cos 6
! Assigns IP Routing to Q3 (tail)
set qos map 1p3q1t tx 3 cos 7
! Assigns STP to Q3 (tail)
! All other CoS-Queue mapping remain default
set qos wrr 1p3q1t 5 25 70
! Sets WRR weights to 5:25:70 for Q1:Q2:Q3
set qos wred 1p3q1t tx queue 1 80:100 ! Sets WRED Thresholds for Q1 (80% to 100%)
set qos wred 1p3q1t tx queue 2 80:100 ! Sets WRED Thresholds for Q2 (80% to 100%)
set qos wred 1p3q1t tx queue 3 1:80
70:80 ! Sets WRED Thresholds for Q3 (70% to 80%)
set qos policed-dscp-map 1:1
set qos policed-dscp-map 2:2
set qos policed-dscp-map 3:3
set qos policed-dscp-map 4:4
set qos policed-dscp-map 5:5
set qos policed-dscp-map 6:6
set qos policed-dscp-map 7:7
set qos policed-dscp-map 0,8,25:8
! Normal markdown of 0 and 25 set to CS1
set qos policed-dscp-map 9:9
set qos policed-dscp-map 11:11
set qos policed-dscp-map 10,12:12
! Normal markdown of AF11 set to AF12
set qos policed-dscp-map 13:13
set qos policed-dscp-map 14:14
continues
426
Example 12-76 Catalyst 6500-PFC2 (CatOS): Data Center Access Switch for Untrusted Servers (Advanced
set qos policer aggregate SAP rate 15000 policed-dscp erate 32000000
policed-dscp burst 8000
eburst
32000
8 eburst
32000
! SAP traffic is (single-rate) policed to 15 Mbps
set qos policer aggregate LOTUS rate 25000 policed-dscp erate 35000
policed-dscp burst 8000
eburst
8000
8 eburst
8000
! Lotus traffic is (dual-rate) policed to 25 Mbps and 35 Mbps
set qos policer aggregate IMAP rate 40000 policed-dscp erate 50000
policed-dscp burst 8000
eburst
8000
8 eburst
8000
! IMAP traffic is (dual-rate) policed to 40 Mbps and 50 Mbps
set qos policer aggregate DATA rate 1000 policed-dscp erate 32000000
policed-dscp burst 8000
eburst
32000
8 eburst
32000
! All other data is (single-rate) policed to 1 Mbps
clear qos acl all
#UNTRUSTED-SERVER
set qos acl ip UNTRUSTED-SERVER dscp 25 aggregate SAP tcp any range 3200 3203 any
set qos acl ip UNTRUSTED-SERVER dscp 25 aggregate SAP tcp any eq 3600 any
! Identifies SAP traffic by TCP source ports 3200-3203 and 3600
set qos acl ip UNTRUSTED-SERVER dscp 18 aggregate LOTUS tcp any eq 1352 any
! Identifies Lotus traffic by TCP source port 1352
set qos acl ip UNTRUSTED-SERVER dscp 10 aggregate IMAP tcp any any eq 143
set qos acl ip UNTRUSTED-SERVER dscp 10 aggregate IMAP tcp any any eq 220
! Identifies IMAP traffic by TCP source port 143 and 220
set qos acl ip UNTRUSTED-SERVER dscp 0 aggregate DATA ip any any
! ACL to catch all other IP traffic
#
commit qos acl all
! Commits all ACLs to PFC
!
# default port status is enable
427
Example 12-76 Catalyst 6500-PFC2 (CatOS): Data Center Access Switch for Untrusted Servers (Advanced
Example 12-77 shows the QoS conguration for the (left) Catalyst 3550 access-layer
switch.
Example 12-77 Catalyst 3550 Access Switch for IP Phones + PCs (Advanced Model): Case Study
Example
!
hostname CAT3550-ACCESS-LEFT
!
vtp domain ABC-INC
vtp mode transparent
mls qos map policed-dscp 0 10 18 24 25 34 to 8
! Excess DVLAN traffic marked 0, AF11, AF21, CS3, DSCP 25 and AF41
! will be remarked to Scavenger (CS1)
mls qos map cos-dscp 0 8 16 24 32 46 48 56
! Modifies CoS-to-DSCP mapping to map CoS 5 to DSCP EF
mls qos
! Enables QoS Globally
!
class-map match-all VOICE
match ip dscp 46
! DSCP EF (voice)
class-map match-all VVLAN-VOICE
match vlan 110
! VLAN 110 is VVLAN
match class-map VOICE
! Matches VVLAN DSCP EF
!
class-map match-any CALL-SIGNALING
! Need 'match-any' here
match ip dscp 26
! DSCP AF31 (old Call-Signaling)
match ip dscp 24
! DSCP CS3 (new Call-Signaling)
class-map match-all VVLAN-CALL-SIGNALING
match vlan 110
! VLAN 110 is VVLAN
match class-map CALL-SIGNALING
! Matches VVLAN AF31/CS3
!
class-map match-all ANY
match access-group name ANY
! Workaround ACL
continues
428
Example 12-77 Catalyst 3550 Access Switch for IP Phones + PCs (Advanced Model): Case Study
Example (Continued)
class-map match-all VVLAN-ANY
match vlan 110
! VLAN 110 is VVLAN
10
match class-map ANY
! Matches any other VVLAN traffic
!
class-map match-all PC-VIDEO
match access-group name PC-VIDEO
class-map match-all DVLAN-PC-VIDEO
match vlan 10
! VLAN 10 is DVLAN
match class-map PC-VIDEO
! Matches PC IP/VC or SoftPhone
!
class-map match-all MISSION-CRITICAL-DATA
match access-group name MISSION-CRITICAL-DATA
class-map match-all DVLAN-MISSION-CRITICAL-DATA
match vlan 10
! VLAN 10 is DVLAN
match class-map MISSION-CRITICAL-DATA
! Matches DVLAN MC-Data
!
class-map match-all TRANSACTIONAL-DATA
match access-group name TRANSACTIONAL-DATA
class-map match-all DVLAN-TRANSACTIONAL-DATA
match vlan 10
! VLAN 10 is DVLAN
match class-map TRANSACTIONAL-DATA
! Matches DVLAN Transactional
!
class-map match-all BULK-DATA
match access-group name BULK-DATA
class-map match-all DVLAN-BULK-DATA
match vlan 10
! VLAN 10 is DVLAN
match class-map BULK-DATA
! Matches DVLAN Bulk Data
!
class-map match-all DVLAN-ANY
match vlan 10
! VLAN 10 is DVLAN
match class-map ANY
! Matches all other DVLAN traffic
!
!
policy-map IPPHONE+PC-ADVANCED
class VVLAN-VOICE
! DSCP EF (Voice)
set ip dscp 46
police 128000 8000 exceed-action drop
! Only one voice call is permitted per switchport VVLAN
class VVLAN-CALL-SIGNALING
! DSCP CS3 (Call-Signaling)
set ip dscp 24
police 32000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Call-Signaling is marked down to Scavenger (CS1)
class VVLAN-ANY
set ip dscp 0
police 32000 8000 exceed-action policed-dscp-transmit
! Unauthorized VVLAN traffic is marked down to Scavenger (CS1)
class DVLAN-PC-VIDEO
! DSCP AF41 (Interactive-Video)
set ip dscp 34
police 496000 8000 exceed-action policed-dscp-transmit
! Only one IP/VC stream will be permitted per switchport
class DVLAN-MISSION-CRITICAL-DATA
429
Example 12-77 Catalyst 3550 Access Switch for IP Phones + PCs (Advanced Model): Case Study
Example (Continued)
! Interim Mission-Critical Data
set ip dscp 25
police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Mission-Critical Data is marked down to Scavenger (CS1)
class DVLAN-TRANSACTIONAL-DATA
! DSCP AF21 (Transactional Data)
set ip dscp 18
police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Transactional Data is marked down to Scavenger (CS1)
class DVLAN-BULK-DATA
! DSCP AF11 (Bulk Data)
set ip dscp 10
police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Bulk Data is marked down to Scavenger (CS1)
class DVLAN-ANY
set ip dscp 0
police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile data traffic is marked down to Scavenger (CS1)
!
!
interface FastEthernet0/1
description ACCESS-EDGE IP PHONE + PC ADVANCED MODEL
switchport access vlan 10
! DVLAN
switchport mode dynamic desirable
switchport voice vlan 110
! VVLAN
no ip address
mls qos trust device cisco-phone
! Conditional Trust
service-policy input IPPHONE+PC-ADVANCED
! Attaches policy
wrr-queue bandwidth 5 25 70 1
! Q1 gets 5% BW, Q2 gets 25% BW, Q3 gets 70% BW, Q4 is the PQ
wrr-queue cos-map 1 1
! Scavenger/Bulk is assigned to Q1
wrr-queue cos-map 2 0
! Best Effort is assigned to Q2
wrr-queue cos-map 3 2 3 4 6 7
! CoS 2,3,4,6,7 are assigned to Q3
wrr-queue cos-map 4 5
! Voice is assigned to Q4 (PQ)
priority-queue out
! Enables Q4 as PQ
spanning-tree portfast
!
<repeated for all FE switchports>
!
!
interface GigabitEthernet0/1
description L2 UPLINK TO DISTRIBUTION CAT4500-SUP4-LEFT
switchport trunk encapsulation dot1q
! Trunks DVLAN + VVLAN
switchport trunk allowed vlan 10,110
switchport mode trunk
no ip address
! Trusts DSCP
mls qos trust dscp
wrr-queue bandwidth 5 25 70 1
! Q1 gets 5% BW, Q2 gets 25% BW, Q3 gets 70% BW, Q4 is the PQ
wrr-queue queue-limit 5 25 40 30
! Tunes buffers to 5% for Q1, 25% for Q2, 40% for Q3 and 30% for Q4
continues
430
Example 12-77 Catalyst 3550 Access Switch for IP Phones + PCs (Advanced Model): Case Study
Example (Continued)
wrr-queue random-detect max-threshold 1 40 100
! Sets Q1 WRED threshold 1 to 40% and threshold 2 to 100%
wrr-queue random-detect max-threshold 2 80 100
! Sets Q2 WRED threshold 1 to 80% and threshold 2 to 100%
wrr-queue random-detect max-threshold 3 80 100
! Sets Q3 WRED threshold 1 to 80% and threshold 2 to 100%
! Scavenger/Bulk is assigned to Q1
wrr-queue cos-map 1 1
! Best Effort is assigned to Q2
wrr-queue cos-map 2 0
! CoS 2,3,4,6,7 are assigned to Q3
wrr-queue cos-map 3 2 3 4 6 7
! Voice is assigned to Q4 (PQ)
wrr-queue cos-map 4 5
wrr-queue dscp-map 2 10 48 56
! Maps Bulk Data (10), Routing (48) and Spanning Tree (Internal DSCP 56)
! to WRED threshold 2 of their respective queues all other DSCP values
! are mapped (by default) to WRED threshold 1 of their respective queues
! Enables Q4 as PQ
priority-queue out
!
<repeated for GigabitEthernet0/2 Uplink to Distribution Cat4500-Sup4-Left>
!
!
ip access-list standard ANY
permit any
!
ip access-list extended PC-VIDEO
! IP/VC or SoftPhone
permit udp any any range 16384 32767
!
ip access-list extended MISSION-CRITICAL-DATA
permit tcp any any range 3200 3202
! SAP
permit tcp any any eq 3600
! SAP
! Softphone SCCP
permit tcp any any range 2000 2002
!
ip access-list extended TRANSACTIONAL-DATA
permit tcp any any eq 1352
! Lotus
!
ip access-list extended BULK-DATA
permit tcp any any eq 143
! IMAP
permit tcp any any eq 220
! IMAP
!
Example 12-78 shows the QoS conguration for the (right) Catalyst 3750 access-layer
switch.
Example 12-78 Catalyst 3750 Access Switch for IP Phones + PCs (Advanced Model): Case Study
Example
!
hostname CAT3750-ACCESS-RIGHT
!
431
Example 12-78 Catalyst 3750 Access Switch for IP Phones + PCs (Advanced Model): Case Study
Example (Continued)
vtp domain ABC-INC
vtp mode transparent
mls qos map policed-dscp 0 10 18 24 25 34 to 8
! Excess DVLAN traffic marked 0, AF11, AF21, CS3, DSCP 25 and AF41
! will be remarked to Scavenger (CS1)
mls qos map cos-dscp 0 8 16 24 32 46 48 56
! Modifies CoS-to-DSCP mapping to map CoS 5 to DSCP EF
!
mls qos srr-queue output cos-map queue 1
3 threshold 3 5
0
! Maps CoS 5 to Queue 1 Threshold 3 (Voice gets all of Queue 1)
mls qos srr-queue output cos-map queue 2 threshold 1 2 4
! Maps CoS 2 and CoS 4 to Queue 2 Threshold 1
mls qos srr-queue output cos-map queue 2 threshold 2 3
! Maps CoS 3 to Queue 2 Threshold 2
mls qos srr-queue output cos-map queue 2 threshold 3 6 7
! Maps CoS 6 and CoS 7 to Queue 2 Threshold 3
mls qos srr-queue output cos-map queue 3 threshold 3 0
! Maps CoS 0 to Queue 3 Threshold 3 (Best Efforts gets all of Q3)
mls qos srr-queue output cos-map queue 4 threshold 3 1
! Maps CoS 1 to Queue 4 Threshold 3 (Scavenger/Bulk gets all of Q4)
!
mls qos srr-queue output dscp-map queue 1 threshold 3 46
! Maps DSCP EF (Voice) to Queue 1 Threshold 3
mls qos srr-queue output dscp-map queue 2 threshold 1 16 18 20 22 25 32 34 36
! Maps DSCP CS2 (Net-Mgmt/Transactional) to Queue 2 Threshold 1
! Maps DSCP AF21, AF22, AF23 (Transactional Data) to Queue 2 Threshold 1
! Maps DSCP 25 (Mission-Critical Data) to Queue 2 Threshold 1
! Maps DSCP CS4 (Streaming Video) to Queue 2 Threshold 1
! Maps DSCP AF41, AF42 (Interactive-Video) to Queue 2 Threshold 1
mls qos srr-queue output dscp-map queue 2 threshold 1 38
! Maps DSCP AF43 (Interactive-Video) to Queue 2 Threshold 1
mls qos srr-queue output dscp-map queue 2 threshold 2 24 26
! Maps DSCP CS3 and DSCP AF31 (Call-Signaling) to Queue 2 Threshold 2
mls qos srr-queue output dscp-map queue 2 threshold 3 48 56
! Maps DSCP CS6 and CS7 (Network/Internetwork) to Queue 2 Threshold 3
mls qos srr-queue output dscp-map queue 3 threshold 3 0
! Maps DSCP 0 (Best Effort) to Queue 3 Threshold 3
mls qos srr-queue output dscp-map queue 4 threshold 1 8
! Maps DSCP CS1 (Scavenger) to Queue 4 Threshold 1
mls qos srr-queue output dscp-map queue 4 threshold 3 10 12 14
! Maps DSCP AF11, AF12, AF13 (Bulk Data) to Queue 4 Threshold 3
!
mls qos queue-set output 1 threshold 2 70 80 100 100
! Sets Q2 Threshold 1 to 70% and Q2 Threshold 2 to 80%
mls qos queue-set output 1 threshold 4 40 100 100 100
! Sets Q4 Threshold 1 to 40% and Q4 Threshold 2 to 100%
mls qos
! Enables QoS Globally
!
continues
432
Example 12-78 Catalyst 3750 Access Switch for IP Phones + PCs (Advanced Model): Case Study
Example (Continued)
class-map match-all VVLAN-VOICE
match access-group name VVLAN-VOICE
class-map match-all VVLAN-CALL-SIGNALING
match access-group name VVLAN-CALL-SIGNALING
class-map match-all VVLAN-ANY
match access-group name VVLAN-ANY
!
class-map match-all DVLAN-PC-VIDEO
match access-group name DVLAN-PC-VIDEO
class-map match-all DVLAN-MISSION-CRITICAL-DATA
match access-group name DVLAN-MISSION-CRITICAL-DATA
class-map match-all DVLAN-TRANSACTIONAL-DATA
match access-group name DVLAN-TRANSACTIONAL-DATA
class-map match-all DVLAN-BULK-DATA
match access-group name DVLAN-BULK-DATA
!
policy-map IPPHONE+PC-ADVANCED
class VVLAN-VOICE
set ip dscp 46
! DSCP EF (Voice)
police 128000 8000 exceed-action drop
! Only one voice call is permitted per switchport VVLAN
class VVLAN-CALL-SIGNALING
set ip dscp 24
! DSCP CS3 (Call-Signaling)
police 32000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Call-Signaling is marked down to Scavenger (CS1)
class VVLAN-ANY
set ip dscp 0
police 32000 8000 exceed-action policed-dscp-transmit
! Unauthorized VVLAN traffic is marked down to Scavenger (CS1)
class DVLAN-PC-VIDEO
set ip dscp 34
! DSCP AF41 (Interactive-Video)
police 496000 8000 exceed-action policed-dscp-transmit
! Only one IP/VC stream will be permitted per switchport
class DVLAN-MISSION-CRITICAL-DATA
set ip dscp 25
! Interim Mission-Critical Data
police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Mission-Critical Data is marked down to Scavenger (CS1)
class DVLAN-TRANSACTIONAL-DATA
set ip dscp 18
! DSCP AF21 (Transactional Data)
police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Transactional Data is marked down to Scavenger (CS1)
class DVLAN-BULK-DATA
set ip dscp 10
! DSCP AF11 (Bulk Data)
police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile Bulk Data is marked down to Scavenger (CS1)
class class-default
set ip dscp 0
police 5000000 8000 exceed-action policed-dscp-transmit
! Out-of-profile data traffic is marked down to Scavenger (CS1)
!
433
Example 12-78 Catalyst 3750 Access Switch for IP Phones + PCs (Advanced Model): Case Study
Example (Continued)
!
interface FastEthernet1/0/1
description ACCESS-EDGE IP PHONE + PC ADVANCED MODEL
! DVLAN
switchport access vlan 20
! VVLAN
switchport voice vlan 120
no ip address
srr-queue bandwidth share 1 70 25 5
! Q1 is PQ; Q2 gets 70% of remaining BW; Q3 gets 25% and Q4 gets 5%
! Q1 is limited to 30%
srr-queue bandwidth shape 30 0 0 0
! Q1 is enabled as a PQ
priority-queue out
! Conditional Trust
mls qos trust device cisco-phone
! Attaches policy to interface
service-policy input IPPHONE+PC-ADVANCED
no mdix auto
spanning-tree portfast
!
<repeated for all FE switchports>
!
interface GigabitEthernet1/0/1
description L2 UPLINK TO DISTRIBUTION CAT4500-SUP4-LEFT
switchport trunk encapsulation dot1q
! Trunks DVLAN and VVLAN
switchport trunk allowed vlan 20,120
switchport mode trunk
no ip address
srr-queue bandwidth share 1 70 25 5
! Q1 is PQ; Q2 gets 70% of remaining BW; Q3 gets 25% and Q4 gets 5%
! Q1 is shaped to 30%
srr-queue bandwidth shape 30 0 0 0
! Q1 is enabled as a PQ
priority-queue out
! Trusts DSCP
mls qos trust dscp
!
<repeated for GigabitEthernet1/0/2 Uplink to Distribution Cat4500-Sup4>
!
!
ip access-list extended VVLAN-VOICE
permit udp 10.1.110.0 0.0.0.255 any range 16384 32767 dscp ef
! Voice is matched by VVLAN subnet and DSCP EF
!
ip access-list extended VVLAN-CALL-SIGNALING
permit tcp 10.1.120.0 0.0.0.255 any range 2000 2002 dscp af31
permit tcp 10.1.120.0 0.0.0.255 any range 2000 2002 dscp cs3
! Call-Signaling is matched by VVLAN subnet and DSCP AF31 or CS3
!
ip access-list extended VVLAN-ANY
permit ip 10.1.120.0 0.0.0.255 any
! Matches all other traffic sourced from the VVLAN subnet
!
ip access-list extended DVLAN-PC-VIDEO
! DVLAN IP/VC
permit udp any any range 16384 32767
!
continues
434
Example 12-78 Catalyst 3750 Access Switch for IP Phones + PCs (Advanced Model): Case Study
Example (Continued)
ip access-list extended DVLAN-MISSION-CRITICAL-DATA
permit tcp any any range 3200 3202
permit tcp any any eq 3600
permit tcp any any range 2000 2002
!
ip access-list extended DVLAN-TRANSACTIONAL-DATA
permit tcp any any eq 1352
!
ip access-list extended DVLAN-BULK-DATA
permit tcp any any eq 143
permit tcp any any eq 220
!
! SAP
! SAP
! SoftPhone SCCP
! IMAP
! IMAP
! IMAP
Example 12-79 shows the QoS conguration for the (left) Catalyst 4500-Sup4 distributionlayer switch.
Example 12-79 Catalyst 4500-Sup4 Distribution Switch Case Study Example
!
hostname C4500-SUP4-DIST-LEFT
!
qos dbl exceed-action ecn
! Optional: Enables DBL to mark IP ECN bits
qos dbl
! Globally enables DBL
qos map dscp 0 to tx-queue 2
! Maps Best Effort to Queue 2
qos map dscp 16 18 20 22 24 25 26 32 to tx-queue 4
! Maps DSCP CS2 (Net-Mgmt) and AF21/AF22/AF23 (Transactional) to Q4
! Maps DSCP CS3 and AF31 (Call-Signaling) and DSCP 25 (MC Data) to Q4
! Maps DSCP CS4 (Str-Video) to Q4
qos map dscp 34 36 38 to tx-queue 4
! Maps DSCP AF41/AF42/AF43 (Int-Video) to Q4
! All other DSCP-to-Queue Mappings are remain at default
qos
! Enables QoS Globally
!
vtp domain ABC-INC
vtp mode transparent
!
!
policy-map DBL
class class-default
! Enables DBL on all traffic flows
dbl
!
!
interface GigabitEthernet1/1
description L3 UPLINK TO CORE 6500-PFC3-LEFT
no switchport
ip address 10.1.230.2 255.255.255.252
service-policy output DBL
! Applies DBL policy
qos trust dscp
! Trusts DSCP
Example 12-79 Catalyst 4500-Sup4 Distribution Switch Case Study Example (Continued)
tx-queue 1
bandwidth percent
tx-queue 2
bandwidth percent
tx-queue 3
bandwidth percent
priority high
shape percent 30
tx-queue 4
bandwidth percent
! Q1 gets 5%
25
! Q2 gets 25%
30
! Enables Q3 as PQ
! PQ gets 30%
! Shapes PQ to 30%
40
! Q4 gets 40%
!
<repeated for GigabitEthernet1/2 Uplink to Core 6500-PFC3-Right>
!
!
interface FastEthernet2/1
description L3 FASTETHERNET LINK TO WAG 7200-NPEG1
no switchport
ip address 10.1.220.1 255.255.255.252
! Applies DBL policy
service-policy output DBL
! Trusts DSCP
qos trust dscp
tx-queue 3
priority high
! PQ gets 30%
shape percent 30
! Shapes PQ to 30%
!
<repeated for FastEthernet2/2 Link to WAN Aggregator>
!
!
interface GigabitEthernet3/1
description L2 DOWNLINK TO DATA CENTER 6500-PFC2
switchport trunk encapsulation dot1q
! Trunks Data Center VLAN
switchport trunk allowed vlan 200
switchport mode trunk
! Applies DBL policy
service-policy output DBL
! Trusts DSCP
qos trust dscp
tx-queue 1
! Q1 gets 5%
bandwidth percent 5
tx-queue 2
! Q2 gets 25%
bandwidth percent 25
tx-queue 3
! Enables Q3 as PQ
bandwidth percent 30
priority high
! PQ gets 30%
shape percent 30
! Shapes PQ to 30%
tx-queue 4
bandwidth percent 40
! Q4 gets 40%
!
<repeated for GigabitEthernet3/2 Downlink to Access-Layer Cat3550>
<repeated for GigabitEthernet3/3 Downlink to Access-Layer Cat3750>
!
435
436
Example 12-80 shows the QoS conguration for the (right) Catalyst 6500-PFC3
distribution-layer switch.
Example 12-80 Catalyst 6500-PFC3 IOS Distribution Switch (with Per-User Microow Policing): Case Study
Example
!
hostname CAT6500-PFC3-IOS-DIST-RIGHT
!
!
mls qos map policed-dscp normal-burst 0 24 26 34 36 to 8
! Excess traffic marked 0,CS3,AF31,AF41 or AF42 will be remarked to CS1
mls qos ! Enables QoS Globally
!
!
class-map match-all VOIP
match ip dscp ef
class-map match-all INTERACTIVE-VIDEO
match ip dscp af41 af42
class-map match-all CALL-SIGNALING
match ip dscp cs3 af31
class-map match-all BEST-EFFORT
match ip dscp default
!
!
policy-map PER-USER-POLICING
class VOIP
police flow mask src-only 128000 8000
conform-action transmit exceed-action drop
! No source can send more than 128k worth of Voice traffic
class INTERACTIVE-VIDEO
police flow mask src-only 496000 8000
conform-action transmit exceed-action policed-dscp-transmit
! Excess IP/VC traffic from any source is marked down to CS1
class CALL-SIGNALING
police flow mask src-only 32000 8000
conform-action transmit exceed-action policed-dscp-transmit
! Excess Call-Signaling from any source is marked down to CS1
class BEST-EFFORT
police flow mask src-only 5000000 8000
conform-action transmit exceed-action policed-dscp-transmit
! Excess PC Data traffic from any source is marked down to CS1
!
!
interface GigabitEthernet1/1
! WS-X6408A-GBIC (1P2Q2T)
description L3 UPLINK TO CORE 6500-PFC3-LEFT
ip address 10.1.230.6 255.255.255.252
wrr-queue bandwidth 30 70
! Sets the WRR weights for 30:70 (Q1:Q2) bandwidth servicing
wrr-queue queue-limit 40 30
! Sets the buffer allocations to 40% for Q1 and 30% for Q2
437
Example 12-80 Catalyst 6500-PFC3 IOS Distribution Switch (with Per-User Microow Policing): Case Study
Example (Continued)
! Indirectly sets PQ (Q3) size to equal Q2 (which is set to 30%)
wrr-queue random-detect min-threshold 1 40 40
! Sets Min WRED Thresholds for Q1T1 and Q1T2 to 40 and 80, respectively
wrr-queue random-detect min-threshold 2 70 80
! Sets Min WRED Thresholds for Q2T1 and Q2T2 to 70 and 80, respectively
wrr-queue random-detect max-threshold 1 80 100
! Sets Max WRED Thresholds for Q1T1 and Q1T2 to 80 and 100, respectively
wrr-queue random-detect max-threshold 2 80 100
! Sets Max WRED Thresholds for Q2T1 and Q2T2 to 80 and 100, respectively
! Maps Scavenger/Bulk to Q1 WRED T1
wrr-queue cos-map 1 1 1
! Maps Best Effort to Q1 WRED T2
wrr-queue cos-map 1 2 0
! Maps CoS 2,3,4 to Q2 WRED T1
wrr-queue cos-map 2 1 2 3 4
! Maps CoS 6 and 7 to Q2 WRED T2
wrr-queue cos-map 2 2 6 7
! Trusts DSCP
mls qos trust dscp
!
<repeated for GigabitEthernet1/2 Uplink to Core 6500-PFC3-Right>
!
!
interface FastEthernet2/1
! WS-X6548-RJ-45 (1P3Q1T)
description L3 FASTETHERNET LINK TO WAG 7200-NPEG1
ip address 10.1.220.10 255.255.255.252
wrr-queue bandwidth 5 25 70
! Sets the WRR weights for 5:25:70 (Q1:Q2:Q3) bandwidth servicing
wrr-queue random-detect min-threshold 1 80
! Sets the Min WRED Threshold for Q1T1 to 80%
wrr-queue random-detect min-threshold 2 80
! Sets Min WRED Threshold for Q2T1 to 80%
wrr-queue random-detect min-threshold 3 80
! Sets Min WRED Threshold for Q3T1 to 80%
! All other WRED Thresholds are left at default (100%)
! Maps Scavenger/Bulk to Q1 WRED T1
wrr-queue cos-map 1 1 1
! Maps Best Effort to Q1 WRED T1
wrr-queue cos-map 2 1 0
wrr-queue cos-map
3 1 3
2 1
3 2
4 3
6 4
7
! Maps CoS 2,3,4,6 and 7 to Q3 WRED T1
wrr-wrr-queue
cos-map
! Trusts DSCP
mls qos trust dscp
!
<repeated for FastEthernet2/2 Link to WAN Aggregator>
!
!
interface GigabitEthernet3/2
! WS-X6408A-GBIC (1P2Q2T)
description L2 DOWNLINK TO ACCESS-LAYER C3550 - LEFT
no ip address
wrr-queue bandwidth 30 70
! Sets the WRR weights for 30:70 (Q1:Q2) bandwidth servicing
wrr-queue queue-limit 40 30
! Sets the buffer allocations to 40% for Q1 and 30% for Q2
! Indirectly sets PQ (Q3) size to equal Q2 (which is set to 30%)
continues
438
Example 12-80 Catalyst 6500-PFC3 IOS Distribution Switch (with Per-User Microow Policing): Case Study
Example (Continued)
wrr-queue random-detect min-threshold 1 40 80
! Sets Min WRED Thresholds for Q1T1 and Q1T2 to 40 and 80, respectively
wrr-queue random-detect min-threshold 2 70 80
! Sets Min WRED Thresholds for Q2T1 and Q2T2 to 70 and 80, respectively
wrr-queue random-detect max-threshold 1 80 100
! Sets Max WRED Thresholds for Q1T1 and Q1T2 to 80 and 100, respectively
wrr-queue random-detect max-threshold 2 80 100
! Sets Max WRED Thresholds for Q2T1 and Q2T2 to 80 and 100, respectively
,
! Maps Scavenger/Bulk to Q1 WRED T1
wrr-queue cos-map 1 1 1
! Maps Best Effort to Q1 WRED T2
wrr-queue cos-map 1 2 0
! Maps CoS 2,3,4 to Q2 WRED T1
wrr-queue cos-map 2 1 2 3 4
! Maps CoS 6 and 7 to Q2 WRED T2
wrr-queue cos-map 2 2 6 7
! Trusts DSCP
mls qos trust dscp
switchport
switchport trunk encapsulation dot1q
! Trunks DVLAN and VVLAN
switchport trunk allowed vlan 10,110
switchport mode trunk
service-policy input PER-USER-POLICING
! Attaches Per-User Policer
!
<repeated for GigabitEthernet3/3 Downlink to Access-Layer Cat3750>
<repeated for GigabitEthernet3/1 Downlink to Data Center C6500-PFC2>
<except no "service-policy input PER-USER-POLICING" for Data Center Downlink>
!
Example 12-81 shows the QoS conguration for the left Catalyst 6500-PFC3 core-layer
switch, of which the right Catalyst 6500-PFC3 core-layer switch is a mirror image.
Example 12-81 Catalyst 6500-PFC3 IOS Core Switch: Case Study Example
!
hostname CAT6500-PFC3-IOS-CORE-LEFT
!
mls qos
! Enables QoS Globally
!
!
interface Port-channel1
description 40GE CORE BACKBONE
ip address 10.1.240.1 255.255.255.252
mls qos trust dscp
!
!
interface TenGigabitEthernet1/1
! WS-X6704-10GE (1P7Q8T)
no ip address
wrr-queue bandwidth 5 25 20 20 20 5 5
! Sets the WRR weights for 5:25:20:20:20:5:5 (Q1 through Q7)
wrr-queue queue-limit 5 25 10 10 10 5 5
! Allocates 5% to Q1, 25% to Q2, 10% to Q3, 10% to Q4,
! Allocates 10% to Q5, 5% to Q6 and 5% to Q7
439
Example 12-81 Catalyst 6500-PFC3 IOS Core Switch: Case Study Example (Continued)
wrr-queue random-detect min-threshold 1 80 100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q1T1 to 80% and all others to 100%
wrr-queue random-detect min-threshold 2 1 100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q2T1 to 80% and all others to 100%
wrr-queue random-detect min-threshold 3 80 100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q3T1 to 80% and all others to 100%
wrr-queue random-detect min-threshold 4 80 100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q4T1 to 80% and all others to 100%
wrr-queue random-detect min-threshold 5 80 100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q5T1 to 80% and all others to 100%
wrr-queue random-detect min-threshold 6 80 100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q6T1 to 80% and all others to 100%
wrr-queue random-detect min-threshold 7 80 100 100 100 100 100 100 100
! Sets Min WRED Threshold for Q7T1 to 80% and all others to 100%
wrr-queue random-detect max-threshold 1 100 100 100 100 100 100 100 100
! Sets Max WRED Threshold for Q1T1 to 100% and all others to 100%
wrr-queue random-detect max-threshold 2 100 100 100 100 100 100 100 100
! Sets Max WRED Threshold for Q2T1 to 100% and all others to 100%
! All other WRED Thresholds remain at their default values (100%)
! Enables WRED on Q4
wrr-queue random-detect 4
! Enables WRED on Q5
wrr-queue random-detect 5
! Enables WRED on Q6
wrr-queue random-detect 6
! Enables WRED on Q7
wrr-queue random-detect 7
! Maps Scavenger/Bulk to Q1
wrr-queue cos-map 1 1 1
! Maps Best Effort to Q2
wrr-queue cos-map 2 1 0
! Maps Video to Q3
wrr-queue cos-map 3 1 4
! Maps Net-Mgmt/Transactional to Q4
wrr-queue cos-map 4 1 2
! Maps Call-Signaling/MC-Data to Q5
wrr-queue cos-map 5 1 3
! Maps IP Routing to Q6
wrr-queue cos-map 6 1 6
! Maps STP to Q7
wrr-queue cos-map 7 1 7
! Trusts DSCP
mls qos trust dscp
channel-group 1 mode on
!
<repeated three more times on interfaces TenGigabitEthernet1/2-4>
!
!
interface GigabitEthernet2/1
! WS-X6408A-GBIC (1P2Q2T)
description L3 DOWNLINK TO DISTRIBUTION 4500-SUP4-LEFT
ip address 10.1.230.1 255.255.255.252
wrr-queue bandwidth 30 70
! Sets the WRR weights for 30:70 (Q1:Q2) bandwidth servicing
wrr-queue queue-limit 40 30
! Sets the buffer allocations to 40% for Q1 and 30% for Q2
! Indirectly sets PQ (Q3) size to equal Q2 (which is set to 30%)
wrr-queue random-detect min-threshold 1 40 80
! Sets Min WRED Thresholds for Q1T1 and Q1T2 to 40 and 80, respectively
wrr-queue random-detect min-threshold 2 70 80
! Sets Min WRED Thresholds for Q2T1 and Q2T2 to 70 and 80, respectively
continues
440
Example 12-81 Catalyst 6500-PFC3 IOS Core Switch: Case Study Example (Continued)
wrr-queue random-detect max-threshold 1 80 100
! Sets Max WRED Thresholds for Q1T1 and Q1T2 to 80 and 100, respectively
wrr-queue random-detect max-threshold 2 80 100
! Sets Max WRED Thresholds for Q2T1 and Q2T2 to 80 and 100, respectively
! Maps Scavenger/Bulk to Q1 WRED T1
wrr-queue cos-map 1 1 1
! Maps Best Effort to Q1 WRED T2
wrr-queue cos-map 1 2 0
! Maps CoS 2,3,4 to Q2 WRED T1
wrr-queue cos-map 2 1 2 3 4
! Maps CoS 6 and 7 to Q2 WRED T2
wrr-queue cos-map 2 2 6 7
! Trusts DSCP
mls qos trust dscp
!
<repeated for GigabitEthernet2/2 Downlink to Distribution 6500-PFC3-Right>
!
Summary
This chapter began with establishing the case for campus QoS by way of three main QoS
design principles: The rst is that applications should be classied and marked as close to
their sources as technically and administratively feasible. The second is that unwanted
trafc ows should be policed as close to their sources as possible. The third is that QoS
always should be performed in hardware, instead of software, whenever a choice exists.
Furthermore, it was emphasized that the only way to provide service guarantees is to enable
queuing at any node that has the potential for congestion, including campus uplinks and
downlinks.
A proactive approach to mitigating DoS/worm ooding attacks within campus environments
was overviewed. This approach focuses on access-edge policers that meter trafc rates
received from endpoint devices; when these exceed specied watermarks (at which point
they no longer are considered normal ows), these policers mark down excess trafc to
Scavenger (DSCP CS1). These policers are coupled with queuing policies throughout the
enterprise that provision for a less-than best-effort Scavenger class on all links. In this manner, legitimate trafc bursts are not affected, but DoS/worm-generated trafc signicantly
is mitigated.
Common endpoints were overviewed and classied into three main groups: trusted endpoints,
untrusted endpoints, and conditionally trusted endpoints. Untrusted endpoints were subdivided into two smaller models: untrusted PCs and untrusted servers. Similarly, conditionally
trusted endpoints were subdivided into two models: basic and advanced.
Following these access-edge model denitions, platform-specic recommendations were
given on to how to implement these access-edge models on Cisco Catalyst 2950, 2970,
3550, 3560, 3750, 4500, and 6500 series switches. Platform-specic limitations, caveats,
and nerd knobs were highlighted to tailor each model to each platforms unique feature sets.
All congurations were presented in cong mode to continually highlight what platform
was being discussed. Furthermore, many relevant verication commands were discussed in
detail (in context) to illustrate how and when these can be used effectively when deploying
QoS within the campus.
Further Reading
441
Recommendations also were given on how to congure queuing on a per-platform, perline-card basis. These recommendations included conguring 1P3Q1T queuing on the
Catalyst 2950, conguring 1P3Q2T queuing on the Catalyst 3550, conguring 1P3Q3T
queuing on the Catalyst 2970/3560/3750, and conguring 1P3Q1T queuing (+ DBL) on the
Catalyst 4500. For the Catalyst 6500, line cardspecic queuing structures were examined
in detail, including CatOS and Cisco IOS congurations for conguring 2Q2T, 1P2Q1T,
1P2Q2T, 1P3Q1T, 1P3Q8T, and 1P7Q8T queuing.
Following this, the Catalyst 6500 PFC3s per-user microow policing feature was
discussed in the context of how it can be leveraged to provide a second line of policing
defense at the distribution layer.
Finally, campus-to-WAN/VPN handoff considerations were examined. It was recommended
that you rst resist the urge to use a Gigabit Ethernet connection to the WAN aggregation
router, even if the router supports GE. Second, if the combined WAN circuit rate is significantly below 100 Mbps, enable egress shaping on the Catalyst switches (when supported).
Third, if the combined WAN circuit rate is signicantly below 100 Mbps and the Catalyst
switch does not support shaping, enable egress policing (when supported).
The design chapter concluded with a case study of a ctitious enterprise, to illustrate how
these various platform-specic recommendations can be brought together in an end-to-end
campus QoS design for protecting voice, video, and critical data applications while
mitigating DoS/worm attacks.
Further Reading
Standards:
RFC 2474, Denition of the Differentiated Services Field (DS Field) in the IPv4 and
IPv6 Headers: http://www.ietf.org/rfc/rfc2474.
Books:
Flannagan, Michael, Richard Froom, and Kevin Turek. Cisco Catalyst QoS: Quality
of Service in Campus Networks. Indianapolis: Cisco Press, 2003.
442
Conguring Automatic QoS on the Catalyst 6500 (Cisco CatOS Release 8.2):
http://www.cisco.com/univercd/cc/td/doc/product/lan/cat6000/sw_8_2/
confg_gd/autoqos.htm.
PA R T
IV
Chapter 13
Chapter 14
This chapter discusses WAN QoS considerations and designs, including the following:
Additionally, these designs are applied to specic Layer 2 WAN media, including the
following:
Leased lines
Frame Relay
ATM
ATM-to-Frame Relay Service Interworking
ISDN
CHAPTER
13
448
WAN
WAN Edges
LAN Edges
Queuing/Dropping/Shaping/
Link-Efficiency Policies for
Campus-to-Branch Traffic
Chapter 14, Branch Router QoS Design, discusses additional QoS considerations and
designs unique to branch routers.
Software QoS
Unlike LAN (Catalyst) queuing, which is done in hardware, 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.
449
The main point to keep in mind 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) because this leaves cycles available to respond efciently to routing updates.
450
NOTE
The 33-percent limit for the sum of all LLQs is simply a best-practice design recommendation; it is not a mandate. In some cases, specic 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 overprovisioning LLQ trafc in respect to the negative performance
impact on data application response times.
Serialization
Serialization delay refers to the nite amount of time it takes to clock a frame onto the
physical media. Within the campus, this time is so innitesimal that it is completely
immaterial. Over the WAN, however, lower link speeds can cause sufcient serialization
delay to adversely affect real-time streams, such as Voice or Interactive-Video.
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 (network) delay also is
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 trafc ow). 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 kbps (this is because the serialization delay
of a maximum-size Ethernet packet1500 bytestakes more than 10 ms to serialize at
768 kbps and below). Naturally, LFI tools need to be enabled on both ends of the link.
When deploying LFI tools, it is recommended that the LFI tools be enabled during a scheduled downtime. Assuming that the network administrator is within the enterprises campus,
it is recommended that LFI be enabled on the branch router rst (which is on the far end of
the WAN link) because this generally takes the WAN link down. Then the administrator can
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 rst, 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, as pointed out in Chapter 5, Congestion-Management Tools, because trafc
assigned to the LLQ escapes fragmentation, it is recommended that Interactive-Video not
be deployed 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. Interactive-Video trafc patterns and network requirements are overviewed in
Chapter 2, QoS Design Overview.
451
Tx-ring Tuning
Newer versions of Cisco IOS Software automatically size the nal 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 Example 13-1.
Example 13-1 Displaying the Tx-ring Value with the show controllers Command
WAG-7206-Left#show controllers Serial 1/0 | include tx_limited
tx_underrun_err=0, tx_soft_underrun_err=0, tx_limited=1(64)
64
WAG-7206-Left#
The value within the parentheses following the tx_limited keyword reects 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
Example 13-2.
Example 13-2 Tuning the Tx-ring
WAG-7206-Left(config)#interface Serial 1/0
WAG-7206-Left(config-if)#tx-ring-limit
tx-ring-limit 3
The new setting quickly can be veried with the same show controllers command, as
shown in Example 13-3.
Example 13-3 Verifying Tx-ring Changes
WAG-7206-Left#show controllers ser 1/0 | include tx_limited
Tx_underrun_err=0, tx-soft-underru_rr=0, tx-limited=1(3)
3
WAG-7206_Left#
452
NOTE
In ATM, the length of the Tx-ring is dened 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 kbps links) to
approximately 1500 bytes, which is the MTU of Ethernet.
PAK_priority
Chapter 5 introduced PAK_priority, the internal Cisco IOS mechanism for protecting
routing and control trafc. The design implications of PAK_priority are summarized in the
following list:
Layer 2 and Layer 3 control trafc 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/CS6.
Although IS-IS trafc receives PAK_priority within the router, it cannot be marked to
IPP6/CS6 because IS-IS uses a CLNS protocol. (It does not use IP, so there are no IPP
or DSCP elds to mark.) This is important to keep in mind if explicit bandwidth
provisioning is required for IS-IS trafc because it cannot be matched against IPP6/
CS6 like most other IGPs. However, NBAR can be used within a class map to match
IS-IS trafc (for example, match protocol clns_is).
Although BGPs (both eBGPs and iBGPs) are marked to IPP6/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/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.
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:
453
454
455
Best-Effort
(62%)
Call-Signaling
5%
match-all Voice
dscp ef
! IP Phones mark Voice to EF
match-any Call Signaling
dscp cs3
! Future Call-Signaling marking
dscp af31
! IP Phones mark Call-Signaling to AF31
!
policy-map WAN-EDGE
class Voice
priority percent 33
compress header ip rtp
class Call Signaling
bandwidth percent 5
class class-default
fair-queue
!
NOTE
Sometimes administrators explicitly create a class map that functions as the MQC classdefault. For instance, an administrator might create a class along the lines of that shown in
the following code:
class-map match-all BEST-EFFORT
match any
456
or even:
class-map match-all BEST-EFFORT
match access-group 101
...
access-list 101 permit ip any any
These additional congurations are superuous and inefcient for the router to process. The
MQC implicit class-default should be used instead.
Another advantage of using the MQC implicit class-default is that (currently, before
Consistent QoS Behavior code) on nondistributed platforms, class-default is the only class
that supports fair queuing within it.
Verication command:
show policy
The Five-Class WAN Edge Model builds on the previous Three-Class WAN Edge Model
and includes a provision for a Critical Data class and a Scavenger class.
The new Critical Data class requires Transactional Data trafc to be marked to DSCP AF21
(or AF22, in the case of dual-rate policers deployed within the campus). Additionally, IGP
routing (marked by the routers as CS6) and Network-Management trafc (recommended to
be marked to CS2) are protected within this class. In this example, the Critical Data class
is provisioned to 36 percent of the link and DSCP-based WRED is enabled on it.
457
The Scavenger class constrains any trafc marked to DSCP CS1 to 1 percent of the link;
this allows class-default to use the remaining 25 percent. However, to constrain Scavenger
to 1 percent, an explicit bandwidth guarantee (of 25 percent) must be given to the BestEffort class. Otherwise, if class-default is not explicitly assigned a minimum bandwidth
guarantee, the Scavenger class still can rob it of bandwidth. This is because of the way the
CBWFQ algorithm has been coded: If classes protected with a bandwidth statement are
offered more trafc than their minimum bandwidth guarantee, the algorithm tries to protect
such excess trafc at the direct expense of robbing bandwidth from class-default (if classdefault is congured with fair-queue), unless class-default itself has a bandwidth
statement (providing itself with a minimum bandwidth guarantee). However, assigning a
bandwidth statement to class-default (on nondistributed platforms) currently precludes the
enabling of fair queuing (fair-queue) on this class and forces FIFO queuing on classdefault (this limitation is to be removed with the release of Consistent QoS Behavior code).
NOTE
458
Best-Effort
25%
Scavenger 1%
Call-Signaling
5%
Critical Data
36%
459
Verication command:
show policy
Eight-Class Model
Voice
Voice
Video
Streaming-Video
Call-Signaling
Call-Signaling
Real-Time
Call-Signaling
Interactive-Video
IP Routing
Network-Control
Critical Data
Critical Data
Network-Management
Mission-Critical Data
Transactional Data
Bulk Data
Bulk Data
Best-Effort
Best-Effort
Best-Effort
Scavenger
Scavenger
Scavenger
460
If the enterprises QoS requirements exceed that which the Five-Class Model can provision
for (such as requiring service guarantees for Interactive-Video and requiring Bulk Data to
be controlled during busy periods), they might consider migrating to the Eight-Class Model.
Eight-Class Model
The Eight-Class Model introduces a dual-LLQ design: one for Voice and another for
Interactive-Video.
As pointed out in Chapter 5, the LLQ has an implicit policer that allows for time-division
multiplexing of the single priority queue. This implicit policer abstracts the fact that there
is essentially a single LLQ within the algorithm and, thus, allows for the provisioning of
multiple LLQs.
Interactive-video (or IP videoconferencing, known also as IP/VC) is recommended to be
marked AF41 (which can be marked down to AF42 in the case of dual-rate policing at the
campus access edge). It is recommended to overprovision the LLQ by 20 percent of the
IP/VC rate. This takes into account IP/UDP/RTP headers as well as Layer 2 overhead.
Additionally, Cisco IOS Software automatically includes a 200-ms burst parameter (dened
in bytes) as part of the priority command. On dual-T1 links, this has proven sufcient for
protecting a single 384-kbps IP/VC stream; on higher-speed links (such as triple T1s), the
default burst parameter has shown to be insufcient for protecting multiple IP/VC streams.
However, multiple-stream IP/VC quality tested well with the burst set to 30,000 bytes (for
example, priority 920 30000). Our testing did not arrive at a clean formula for predicting
the required size of the burst parameters as IP/VC streams continually were added; however, given the variable packet sizes and rates of these Interactive-Video streams, this is not
surprising. The main point is that the default LLQ burst parameter might require tuning as
multiple IP/VC streams are added (which likely will be a trial-and-error process).
Optionally, DSCP-based WRED can be enabled on the Interactive-Video class, but testing
has shown negligible performance difference in doing so (because, as already has been
noted, WRED is more effective on TCP-based ows than UDP-based ows, such as
Interactive-Video).
In these designs, WRED is not enabled on classes such as Call-Signaling, IP Routing, or
Network-Management because WRED would take effect only if such classes were lling
their queues nearly to their limits. Such conditions would indicate a provisioning problem
that would better be addressed by increasing the minimum bandwidth allocation for the
class than by enabling WRED.
Additionally, the Eight-Class Model subdivides the preferential data class to separate
control plane trafc (IP routing and Network-Management applications) from businesscritical data trafc. Interior Gateway Protocol (such as RIP, EIGRP, OSPF, and IS-IS)
packets are protected through the PAK_priority mechanism within the router. However,
461
EGP protocols, such as BGP, do not get PAK_priority treatment and might need explicit
bandwidth guarantees to ensure that peering sessions do not reset during periods of
congestion. Additionally, administrators might want to protect network-management
access to devices during periods of congestion.
The other class added to this model is for bulk trafc (Bulk Data class), which is also spun
away from the Critical Data class. Because TCP continually increases its window sizes,
which is especially noticeable in long sessions (such as large le transfers), constraining
Bulk Data to its own class alleviates other data classes from being dominated by such large
le transfers. Bulk Data is identied by DSCP AF11 (or AF12, in the case of dual-rate
policing at the campus access edges). DSCP-based WRED can be enabled on the Bulk Data
class (and also on the Critical Data class).
Figure 13-5 shows sample bandwidth allocations of an Eight-Class Model (for a dual-T1
link example). Figure 13-5 also shows how this model can be derived from the Five-Class
Model in a manner that maintains respective bandwidth allocations as consistently as
possible, which increases the overall end-user transparency of such a migration.
Figure 13-5 Eight-Class WAN Edge Model Bandwidth Allocations Example
Voice
18%
Best-Effort
25%
Interactive-Video
15%
Scavenger 1%
Bulk Data
4%
Critical Data
27%
Call-Signaling
5%
Network-Control
5%
*Dual-T1 Link Example
Example 13-7 shows the corresponding conguration (over a dual-T1 link) for the EightClass Model.
462
NOTE
463
The Consistent QoS Behavior initiative will enable the conguration of a bandwidth
statement along with fair-queue on any class, including class-default, on all platforms.
Verication command:
show policy
464
Figure 13-6 QoS Baseline WAN Edge Model Bandwidth Allocations Example
Voice
18%
BestEffort
25%
InteractiveVideo
15%
Scavenger 1%
Bulk 4%
Streaming-Video
10%
Call-Signaling 5%
Routing 3%
Network-Management 2%
Transactional Data
7%
Example 13-8 shows the corresponding conguration for an 11-Class QoS Baseline WAN
Edge Model (over a dual-T1 link).
Example 13-8 QoS Baseline WAN Edge Model
!
class-map match-all Voice
match ip dscp ef
! IP Phones mark Voice to EF
class-map match-all Interactive Video
match ip dscp af41 af42
! Recommended markings for IP/VC
class-map match-any Call Signaling
match ip dscp cs3
! Future Call-Signaling marking
match ip dscp af31
! Current Call-Signaling marking
class-map match-all Routing
! Routers mark Routing traffic to CS6
match ip dscp cs6
class-map match-all Net Mgmt
! Recommended marking for Network Management
match ip dscp cs2
class-map match-all Mission-Critical Data
! Interim marking for Mission-Critical Data
match ip dscp 25
class-map match-all Transactional Data
match ip dscp af21 af22
! Recommended markings for Transactional-Data
465
Verication command:
show policy
466
not have a xed target delivery date.) When fair-queue is enabled on the main data classes,
the resulting conguration becomes as shown in Example 13-9.
Example 13-9 Distributed-Platform/Consistent QoS BehaviorQoS Baseline WAN Edge Model
!
ip cef distributed
! 'distributed' keyword required on 7500 for ip cef
!
class-map match-all Voice
match ip dscp ef
! IP Phones mark Voice to EF
class-map match-all Interactive Video
match ip dscp af41 af42
! Recommended markings for IP/VC
class-map match-any Call Signaling
match ip dscp cs3
! Future Call-Signaling marking
match ip dscp af31
! Current Call-Signaling marking
class-map match-all Routing
match ip dscp cs6
! Routers mark Routing traffic to CS6
class-map match-all Net Mgmt
match ip dscp cs2
! Recommended marking for Network Management
class-map match-all Mission-Critical Data
match ip dscp 25
! Interim marking for Mission-Critical Data
class-map match-all Transactional Data
match ip dscp af21 af22
! Recommended markings for Transactional-Data
class-map match-all Bulk Data
match ip dscp af11 af12
! Recommended markings for Bulk-Data
class-map match-all Streaming Video
match ip dscp cs4
! Recommended marking for Streaming-Video
class-map match-all Scavenger
match ip dscp cs1
! Recommended marking for Scavenger traffic
!
policy-map WAN-EDGE
class Voice
priority percent 18
! Voice gets 552 kbps of LLQ
class Interactive Video
priority percent 15
! 384 kbps IP/VC needs 460 kbps of LLQ
class Call Signaling
bandwidth percent 5
! Bandwidth guarantee for Call-Signaling
class Routing
bandwidth percent 3
! Bandwidth guarantee for Routing
class Net Mgmt
bandwidth percent 2
! Bandwidth guarantee for Network Management
class Mission-Critical Data
bandwidth percent 10
! Mission-Critical data gets min 10% BW guarantee
fair-queue
! Applies FQ to Mission-Critical Data class
random-detect
! Enables WRED on Mission-Critical Data class
class Transactional Data
bandwidth percent 7
! Transactional Data gets min 7% BW guarantee
fair-queue
! Applies FQ to Transactional Data class
random-detect dscp-based
! Enables DSCP-WRED on Transactional Data class
class Bulk Data
bandwidth percent 4
! Bulk Data gets min 4% BW guarantee
fair-queue
! Applies FQ to Bulk Data class
467
Example 13-9 Distributed-Platform/Consistent QoS BehaviorQoS Baseline WAN Edge Model (Continued)
random-detect dscp-based
class Streaming Video
bandwidth percent 10
class Scavenger
bandwidth percent 1
class class-default
bandwidth percent 25
fair-queue
random-detect
Leased Lines
Leased lines, or point-to-point links, can be congured with HDLC, PPP, or MLP encapsulation. MLP offers the network administrator the most exibility and deployment options.
For example, MLP is the only leased-line protocol that supports LFI on slow-speed links
(through MLP LFI). Additionally, as bandwidth requirements grow over time, MLP requires
the fewest modications to accommodate the addition of multiple T1/E1 lines to a WAN
link bundle. Furthermore, MLP supports all of the security options of PPP (such as CHAP
authentication).
468
Branch Router
WAN Aggregator
!
interface Serial1/0
bandwidth 786
no ip address
encapsulation ppp
ppp multilink
! Includes interface Ser1/0 into Mu1 group
ppp multilink group 1
!
Verication commands:
show policy
show interface
show policy interface
show ppp multilink
469
In Example 13-11, 49,127 drops have occurred on the multilink interface (because of
congestion), and LFI has engaged with 185,507 interleaves of voice with data.
Line
WAG-7206-Left#show policy interface multilink 1
Multilink1
Service-policy output: WAN-EDGE
Class-map: Voice (match-all)
68392 packets, 4377088 bytes
30 second offered rate 102000 bps, drop rate 0 bps
Match: ip dscp ef
Queueing
Strict Priority
continues
470
Example 13-12 show policy interface Verication of a Three-Class Policy on a Slow-Speed Leased
Line (Continued)
Output Queue: Conversation 264
Bandwidth 33 (%)
Bandwidth 253 (kbps) Burst 6325 (Bytes)
(pkts matched/bytes matched) 68392/2043848
(total drops/bytes drops) 0/0
compress:
header ip rtp
UDP/RTP compression:
Sent: 68392 total, 68388 compressed,
2333240 bytes saved, 1770280 bytes sent
2.31 efficiency improvement factor
99% hit ratio, five minute miss rate 0 misses/sec,0 max
rate 41000 bps
Class-map: Call Signaling (match-any)
251 packets, 142056 bytes
30 second offered rate 3000 bps, drop rate 0 bps
Match: ip dscp cs3
0 packets, 0 bytes
30 second rate 0 bps
Match: ip dscp af31
251 packets, 142056 bytes
30 second rate 3000 bps
Queueing
Output Queue: Conversation 265
Bandwidth 5 (%)
Bandwidth 38 (kbps) Max Threshold 64 (packets)
(pkts matched/bytes matched) 255/144280
(depth/total drops/no-buffer drops) 0/0/0
Class-map: class-default (match-any)
51674 packets, 28787480 bytes
30 second offered rate 669000 bps, drop rate 16000 bps
Match: any
Queueing
Flow Based Fair Queueing
Maximum Number of Hashed Queues 256
(total queued/total drops/no-buffer drops) 36/458/0
WAG-7206-Left#
In Example 13-12, the Voice class map and Call-Signaling class map are receiving matches
on their classication criteria (DSCP EF and DSCP CS3/AF31, respectively). However,
because Cisco IP Telephony products currently mark Call-Signaling trafc to DSCP AF31,
Call-Signaling trafc is matching only on DSCP AF31 in this example.
The last line of every class map output is important because this line indicates whether any
drops are occurring on this trafc class. In this example, there are no drops in the Voice or
Call-Signaling classes, which is the desired behavior. A few drops are occurring in classdefault, but this is expected when the interface is congested (which is the trigger to engage
queuing).
471
Also of note, and specic to this particular conguration, are the cRTP statistics included
under the Voice class map. These cRTP statistics are displayed because class-based cRTP
was enabled in this example (instead of enabling cRTP on the interface). Remember, cRTP
must be enabled on both ends of the links for compression to occur; otherwise, these
counters will never increment.
Branch Router
WAN Aggregator
However, MLP LFI is not required at these speeds, and cRTP is optional. Example 13-13
shows an example conguration for medium-speed leased lines.
Example 13-13 Medium-Speed Leased-Line QoS Design Example
!
interface Multilink1
description T1 Leased-Line to RBR-3745-Left
ip address 10.1.112.1 255.255.255.252
! Attaches the MQC policy to Mu1
service-policy output WAN-EDGE
ppp multilink
! Identifies Mu1 as logical Int for Mu1 group
ppp multilink group 1
!
!
interface Serial1/0
bandwidth 1536
no ip address
encapsulation ppp
load-interval 30
ppp multilink
! Includes interface Ser1/0 into Mu1 group
ppp multilink group 1
!
472
Verication commands:
show policy
show interface
show policy interface
Cisco Technical Marketing testing has shown that IP CEF per-destination load balancing
does not meet the SLAs required for Voice and Interactive-Video over multiple T1/E1 links,
as shown in Figure 13-9.
Figure 13-9 High-Speed Leased Lines
MLP Link
Multiple T1/E1
Branch Router
WAN Aggregator
On the other hand, IP-CEF per-packet load balancing did meet the required SLAs, but not
quite as well as MLP bundling.
MLP bundling attained the best overall SLA values for delay and jitter, but it required more
CPU resources than IP CEF per-packet load balancing. If CPU levels are kept under the
recommended 75 percent, it is recommended to use MLP bundling for multiple T1/E1
links.
Also, if policy maps that require bandwidth statements on class-default are being attached
to the multilink interface, the max-reserved-bandwidth 100 command is required on
the interface before the service-policy output statement can be applied, as shown in
Example 13-14.
473
Example 13-14 High-Speed ( Multiple T1/E1) Leased Line QoS Design Example
!
interface Multilink1
description Dual-T1 to RBR-3745-Left
ip address 10.1.112.1 255.255.255.252
! Overrides the default 75% BW limit
max-reserved-bandwidth 100
! Attaches the MQC policy to Mu1
service-policy output WAN-EDGE
ppp multilink
! Identifies Mu1 as logical int for Mu1 group
ppp multilink group 1
!
!
interface Serial1/0
! defined on physical interface only
bandwidth 1536
no ip address
encapsulation ppp
ppp multilink
ppp multilink group 1
! includes interface Ser1/0 into Mu1 group
!
interface Serial1/1
! defined on physical interface only
bandwidth 1536
no ip address
encapsulation ppp
ppp multilink
! includes interface Ser1/1 into Mu1 group
ppp multilink group 1
!
NOTE
Interface bandwidth commands (not to be confused with policy map CBWFQ bandwidth
commands) should be dened only on the physical interfaces, not on multilink interfaces.
This way, if any physical interfaces go down, the Cisco IOS Software will reect the change
in the multilink interfaces bandwidth for routing and QoS purposes. This change can be
veried by the show interface command. However, if a bandwidth statement is congured
under the multilink interface, the bandwidth value for the interface will be static even if an
underlying physical interface is lost.
Verication commands:
show policy
show interface
show policy interface
show ppp multilink
474
Line
WAG-7206-Left#show policy interface multilink 1
Multilink1
Service-policy output: WAN-EDGE
Class-map: Voice (match-all)
444842 packets, 28467338 bytes
30 second offered rate 434000 bps, drop rate 0 bps
Match: ip dscp ef
Queueing
Strict Priority
Output Queue: Conversation 264
Bandwidth 18 (%)
Bandwidth 552 (kbps) Burst 13800 (Bytes)
(pkts matched/bytes matched) 444842/28467338
(total drops/bytes drops) 0/0
Class-map: Interactive Video (match-all)
32685 packets, 25977946 bytes
30 second offered rate 405000 bps, drop rate 0 bps
Match: ip dscp af41
Queueing
Strict Priority
Output Queue: Conversation 264
Bandwidth 15 (%)
Bandwidth 460 (kbps) Burst 11500 (Bytes)
(pkts matched/bytes matched) 32843/26097186
(total drops/bytes drops) 0/0
Class-map: Call Signaling (match-any)
1020 packets, 537876 bytes
30 second offered rate 7000 bps, drop rate 0 bps
Match: ip dscp cs3
0 packets, 0 bytes
30 second rate 0 bps
Match: ip dscp af31
1020 packets, 537876 bytes
30 second rate 7000 bps
Queueing
Output Queue: Conversation 265
Bandwidth 5 (%)
Bandwidth 153 (kbps) Max Threshold 64 (packets)
(pkts matched/bytes matched) 1022/538988
(depth/total drops/no-buffer drops) 0/0/0
Class-map: Routing (match-all)
1682 packets, 112056 bytes
30 second offered rate 0 bps, drop rate 0 bps
Match: ip dscp cs6
Queueing
475
Example 13-15 show policy interface Verication of a QoS Baseline Policy on a High-Speed Leased
Line (Continued)
Output Queue: Conversation 266
Bandwidth 3 (%)
Bandwidth 92 (kbps) Max Threshold 64 (packets)
(pkts matched/bytes matched) 1430/95844
(depth/total drops/no-buffer drops) 0/0/0
Class-map: Net Mgmt (match-all)
32062 packets, 2495021 bytes
30 second offered rate 41000 bps, drop rate 0 bps
Match: ip dscp cs2
Queueing
Output Queue: Conversation 267
Bandwidth 2 (%)
Bandwidth 61 (kbps) Max Threshold 64 (packets)
(pkts matched/bytes matched) 32256/2510284
(depth/total drops/no-buffer drops) 0/0/0
Class-map: Mission-Critical Data (match-all)
56600 packets, 40712013 bytes
30 second offered rate 590000 bps, drop rate 0 bps
Match: ip dscp 25
Queueing
Output Queue: Conversation 268
Bandwidth 12 (%)
Bandwidth 368 (kbps)
(pkts matched/bytes matched) 57178/41112815
(depth/total drops/no-buffer drops) 10/0/0
exponential weight: 9
mean queue depth: 10
class
Transmitted
Random drop
Tail drop
Minimum Maximum
pkts/bytes
pkts/bytes
pkts/bytes thresh thresh
0
0/0
0/0
0/0
20
40
1
0/0
0/0
0/0
22
40
2
0/0
0/0
0/0
24
40
3
57178/41112815
0/0
0/0
26
40
4
0/0
0/0
0/0
28
40
5
0/0
0/0
0/0
30
40
6
0/0
0/0
0/0
32
40
7
0/0
0/0
0/0
34
40
rsvp
0/0
0/0
0/0
36
40
Class-map: Transactional Data (match-all)
31352 packets, 31591979 bytes
30 second offered rate 435000 bps, drop rate 10000 bps
Match: ip dscp af21
Queueing
Output Queue: Conversation 269
Bandwidth 8 (%)
Bandwidth 245 (kbps)
(pkts matched/bytes matched) 31741/32008133
(depth/total drops/no-buffer drops) 29/954/0
exponential weight: 9
mean queue depth: 26
Mark
prob
1/10
1/10
1/10
1/10
1/10
1/10
1/10
1/10
1/10
continues
476
Example 13-15 show policy interface Verication of a QoS Baseline Policy on a High-Speed Leased
Line (Continued)
class
Transmitted
Random drop
Tail drop
Minimum Maximum
pkts/bytes
pkts/bytes
pkts/bytes thresh thresh
0
0/0
0/0
0/0
20
40
1
0/0
0/0
0/0
22
40
2
30787/31019741
954/988392
0/0
24
40
3
0/0
0/0
0/0
26
40
4
0/0
0/0
0/0
28
40
5
0/0
0/0
0/0
30
40
6
0/0
0/0
0/0
32
40
7
0/0
0/0
0/0
34
40
rsvp
0/0
0/0
0/0
36
40
Class-map: Streaming Video (match-all)
23227 packets, 19293728 bytes
30 second offered rate 291000 bps, drop rate 0 bps
Match: ip dscp cs4
Queueing
Output Queue: Conversation 271
Bandwidth 10 (%)
Bandwidth 307 (kbps) Max Threshold 64 (packets)
(pkts matched/bytes matched) 23683/19672892
(depth/total drops/no-buffer drops) 2/0/0
Class-map: Scavenger (match-all)
285075 packets, 129433625 bytes
30 second offered rate 2102000 bps, drop rate 2050000 bps
Match: ip dscp cs1
Queueing
Output Queue: Conversation 272
Bandwidth 1 (%)
Bandwidth 30 (kbps) Max Threshold 64 (packets)
(pkts matched/bytes matched) 291885/132532775
(depth/total drops/no-buffer drops) 64/283050/0
Class-map: class-default (match-any)
40323 packets, 35024924 bytes
30 second offered rate 590000 bps, drop rate 0 bps
Match: any
Queueing
Output Queue: Conversation 273
Bandwidth 25 (%)
Bandwidth 768 (kbps)
(pkts matched/bytes matched) 41229/35918160
(depth/total drops/no-buffer drops) 12/268/0
exponential weight: 9
mean queue depth: 4
class
Transmitted
Random drop
Tail drop
Minimum Maximum
pkts/bytes
pkts/bytes
pkts/bytes thresh thresh
0
40961/35700528
268/217632
0/0
20
40
1
0/0
0/0
0/0
22
40
2
0/0
0/0
0/0
24
40
Mark
prob
1/10
1/10
1/10
1/10
1/10
1/10
1/10
1/10
1/10
Mark
prob
1/10
1/10
1/10
477
Example 13-15 show policy interface Verication of a QoS Baseline Policy on a High-Speed Leased
Line (Continued)
3
4
5
6
7
rsvp
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
0/0
26
28
30
32
34
36
40
40
40
40
40
40
1/10
1/10
1/10
1/10
1/10
1/10
Important items to note for a given class are the pkts matched statistics (which verify that
classication has been congured correctly and that the packets have been assigned to the
proper queue) and the total drops statistics (which indicate whether adequate bandwidth
has been assigned to the class).
Extremely few drops, if any, are desired in the Voice, Interactive-Video, Call-Signaling, and
Routing classes.
NOTE
The Routing class is a special case because of the statistics that it displays.
On nondistributed platforms, the classication counter (the rst line under the class
map) shows any IGP trafc matched by the Routing class (identied by DSCP CS6).
But remember that IGP protocols queue separately (because these are handled by the
PAK_priority mechanism) and, therefore, do not register queuing statistics within the MQC
counters for the Routing class. EGP protocols (such as BGP), on the other hand, do register
queuing/dropping statistics within such an MQC class.
The situation is different on distributed platforms, where all routing packets (IGP or EGP)
are matched and queued within a provisioned Routing class (complete with queuing/
dropping statistics through the show policy interface verication command).
Few drops are expected in the Mission-Critical Data class. WRED (essentially RED
because all packets are marked to the same IPP/DSCP value) is enabled to avoid congestion
on this class. Some drops are expected for the Transactional Data class, yet, in this
particular example, WRED is minimizing tail drops for this class.
It is normal for the Bulk Data class to show drops (both WRED and tail). This is because
the Bulk Data class is being constrained from dominating bandwidth by its large and
sustained TCP sessions. The Scavenger class should show very aggressive dropping during
periods of congestion. Finally, it is normal for drops to appear in the default class.
478
Frame Relay
Recommendation: For the latest feature combinations and management options, use classbased Frame Relay trafc shaping whenever possible.
Frame Relay networks are the most popular WANs in use today because of the low costs
associated with them. Frame Relay is a nonbroadcast multiaccess (NBMA) technology that
frequently utilizes oversubscription to achieve cost savings (similar to airlines overselling
seats on ights to achieve maximum capacity and protability).
To manage oversubscription and potential speed mismatches between senders and receivers,
a trafc-shaping mechanism must be used with Frame Relay. Either Frame Relay trafc
shaping (FRTS) or class-based FRTS can be used. The primary advantage of using classbased FRTS is management because shaping statistics and queuing statistics are displayed
jointly with the show policy interface verication command and are included in the
SNMPv2 Cisco class-based QoS Management Information Base (MIB).
FRTS and class-based FRTS require the following parameters to be dened:
479
480
On distributed platforms, the Tc must be dened in 4-ms increments. The nearest multiple
of 4 ms within the 10-ms target is 8 ms. This interval can be achieved by conguring the
Bc to equal CIR/125.
Frame Relay
Cloud
Branch Router
WAN Aggregator
481
Unlike MLP LFI, which takes the maximum serialization delay as a parameter, FRF.12
requires the actual fragment sizes to be dened manually. This requires some additional
calculations because the maximum fragment sizes vary by link speed. These fragment sizes
can be calculated by multiplying the provisioned line-clocking speed by the recommended
maximum serialization delay target (10 ms), and converting the result from bits to bytes
(which is done by dividing the result by 8):
Fragment Size in Bytes = (Link Speed in kbps * Maximum Allowed Jitter in ms) / 8
For example, the calculation for the maximum fragment size for a 56-kbps circuit is as
follows:
Fragment Size = (56 kbps * 10 ms) / 8 = 70 Bytes
Table 13-1 shows the recommended values for FRF.12 fragment sizes, CIR, and Bc for
slow-speed Frame Relay links.
Table 13-1
Recommended Fragment Sizes, CIR, and Bc Values for Slow-Speed Frame Relay Links
PVC Speed
Maximum Fragment
Size (for 10-ms Delay)
Recommended
CIR Values
Recommended
Bc Values
56 kbps
70 bytes
53,200 bps
64 kbps
80 bytes
60,800 bps
128 kbps
160 bytes
121,600 bps
256 kbps
320 bytes
243,200 bps
512 kbps
640 bytes
486,400 bps
768 kbps
960 bytes
729,600 bps
Both FRTS and class-based FRTS require a Frame Relay map class to be applied to the
DLCI. Also in both cases, the frame-relay fragment command is applied to the map class.
However, unlike FRTS, class-based FRTS does not require frame-relay trafc-shaping to
be enabled on the main interface. This is because MQC-based/class-based FRTS requires a
hierarchal (or nested) QoS policy to accomplish both shaping and queuing. This hierarchical policy is attached to the Frame Relay map class, which is bound to the DLCI.
As with slow-speed leased-line policies, cRTP can be enabled within the MQC queuing
policy under the Voice class. Example 13-17 shows an example of slow-speed Frame Relay
link-specic conguration.
Example 13-17 Slow-Speed ( 768 kbps) Frame Relay QoS Design Example
!
policy-map MQC-FRTS-768
class class-default
shape average 729600 7296 0
service-policy WAN-EDGE
continues
482
Example 13-17 Slow-Speed ( 768 kbps) Frame Relay QoS Design Example (Continued)
!
!
interface Serial2/0
no ip address
encapsulation frame-relay
!
interface Serial2/0.12 point-to-point
ip address 10.1.121.1 255.255.255.252
description 768kbps FR Circuit to RBR-3745-Left
frame-relay interface-dlci 102
! Binds the map-class to the FR DLCI
class FR-MAP-CLASS-768
!
!
map-class frame-relay FR-MAP-CLASS-768
! Attaches nested MQC policies to map-class
service-policy output MQC-FRTS-768
! Enables FRF.12
frame-relay fragment 960
!
Verication commands:
in-frag
5476
out-frag dropped-frag
2035
0
483
Frame Relay
Cloud
Branch Router
WAN Aggregator
NOTE
In some cases, however, administrators have chosen to enable FRF.12 on T1/E1 speed links,
even though the fragment size for a 10-ms maximum serialization delay at such speeds is
greater than the MTU of Ethernet (1500 bytes). The rationale behind doing so is to retain
the Frame Relay dual-FIFO queuing mechanism at Layer 2 (discussed in Chapter 5,
Congestion-Management Tools), which can provide slightly superior service levels under
certain conditions. Generally, this is not required, however.
!
interface Serial2/0
no ip address
encapsulation frame-relay
!
interface Serial2/0.12 point-to-point
ip address 10.1.121.1 255.255.255.252
description 1536kbps FR Circuit to RBR-3745-Left
frame-relay interface-dlci 102
class FR-MAP-CLASS-1536
! Binds the map-class to the FR DLCI
!
!
map-class frame-relay FR-MAP-CLASS-1536
service-policy output MQC-FRTS-1536 ! Attaches nested MQC policies to map-class
!
484
Verication commands:
Frame Relay
Cloud
Branch Router
WAN Aggregator
NOTE
It is important to keep in mind that providers might have geographically dispersed paths to
the same sites; therefore, the delay on one T1 FR link might be slightly higher or lower than
the delay on another. This could cause TCP sequencing issues and slightly reduce effective
data application throughput. Network administrators should keep these factors in mind
when planning their WAN topologies.
The max-reserved-bandwidth 100 command is not required on the interfaces because the
queuing policy is not applied directly to the interface; instead, it is applied to another policy
(the MQC-based Frame Relay trafc-shaping policy). Example 13-20 shows the conguration for a high-speed Frame Relay link.
485
Example 13-20 High-Speed ( Multiple T1/E1) Frame Relay QoS Design Example
!
policy-map MQC-FRTS-1536
class class-default
! Enables MQC-Based FRTS
shape average 1460000 14600 0
! Queues packets headed to the shaper
service-policy WAN-EDGE
!
!
interface Serial2/0
no ip address
encapsulation frame-relay
no fair-queue
frame-relay traffic-shaping
!
interface Serial2/0.12 point-to-point
description 1536kbps FR Circuit to RBR-3745-Left
ip address 10.1.121.1 255.255.255.252
! Enables IP CEF Per-Packet Load-Sharing
ip load-sharing per-packet
frame-relay interface-dlci 102
class FR-MAP-CLASS-1536
! Binds the map-class to FR DLCI 102
!
interface Serial2/1
no ip address
encapsulation frame-relay
serial restart_delay 0
!
interface Serial2/1.12 point-to-point
description 1536kbps FR Circuit to RBR-3745-Left
ip address 10.1.121.5 255.255.255.252
! Enables IP CEF Per-Packet Load-Sharing
ip load-sharing per-packet
frame-relay interface-dlci 112
class FR-MAP-CLASS-1536
! Binds the map-class to FR DLCI 112
!
!
map-class frame-relay FR-MAP-CLASS-1536
service-policy output MQC-FRTS-1536 ! Attaches nested MQC policies to map-class
!
Verication commands:
486
Frame Relay
Cloud
Branch Router
Distributed Platform
WAN Aggregator
Although dTS on the Cisco 7500 is very similar to MQC-based FRTS on nondistributed
platforms, there are two main caveats to keep in mind. The rst is that the CIR must be
dened in multiples of 8000. Therefore, it is recommended that the CIR be dened as 95
percent of the PVC speed, rounded down to the nearest multiple of 8000. The second caveat
is that the Cisco 7500 VIP requires the Tc to be dened in an increment of 4 ms. Because
the target interval for all platforms is 10 ms, which is not evenly divisible by 4 ms, the
recommendation for the Cisco 7500 VIP is to use an interval of 8 ms. The interval can
be set to 8 ms by dening the burst using the following formula:
Bc = CIR/125
Table 13-2 gives recommended values for fragment sizes, CIR, and Bc for distributed
platforms. (Some values have been slightly rounded for conguration and management
simplicity.)
Table 13-2
Recommended Fragment Sizes, CIR, and Bc Values for Distributed Platform Frame Relay
Links
PVC Speed
Maximum Fragment
Size (for 10-ms Delay)
Recommended
CIR Values
Recommended
Bc Values
56 kbps
70 bytes
48,000 bps
64 kbps
80 bytes
56,000 bps
128 kbps
160 bytes
120,000 bps
256 kbps
320 bytes
240,000 bps
Table 13-2
487
Recommended Fragment Sizes, CIR, and Bc Values for Distributed Platform Frame Relay
Links (Continued)
PVC Speed
Maximum Fragment
Size (for 10-ms Delay)
Recommended
CIR Values
Recommended
Bc Values
512 kbps
640 bytes
480,000 bps
768 kbps
960 bytes
720,000 bps
1536 kbps
1,440,000 bps
2048 kbps
1,920,000 bps
Example 13-21 Distributed Platform Frame Relay QoS Design (Slow-Speed Link) Example
!
!
ip cef distributed
! 'distributed' keyword required on 7500 for ip cef
!
!
policy-map MQC-DTS-768
class class-default
shape average 720000 5760 0
! Enables Distributed Traffic Shaping
service-policy WAN-EDGE
! Queues packets headed to the shaper
!
!
interface Serial1/1/0
no ip address
encapsulation frame-relay
no fair-queue
!
interface Serial1/1/0.12 point-to-point
description 768kbps FR DLCI to RBR-3745-Left
ip address 10.1.121.1 255.255.255.252
frame-relay interface-dlci 102
class FR-MAP-CLASS-768
! Binds the map-class to the FR-DLCI
!
!
map-class frame-relay FR-MAP-CLASS-768
! Attaches nested MQC policies to map-class
service-policy output MQC-DTS-768
! Enables FRF.12
frame-relay fragment 960
!
Verication commands:
488
ATM
As with Frame Relay, ATM is an NBMA medium that permits oversubscription and speed
mismatches, and thus requires shaping to guarantee service levels. In ATM, however,
shaping is included as part of the PVC denition.
Two options exist for carrying voice trafc over slow-speed ATM PVCs: either Multilink
PPP over ATM (MLPoATM), in conjunction with MLP LFI, or ATM PVC bundling. ATM
PVC bundling is a legacy technique that has drawbacks such as inefcient bandwidth
utilization and classication limitations (IP precedence versus DSCP). But sometimes
service providers make ATM PVC bundles economically attractive to enterprise customers,
so both approaches are discussed.
ATM
Cloud
Branch Router
WAN Aggregator
A solution to this problem is to run MLPoATM and let MLP LFI handle any necessary
fragmentation and interleaving so that such operations are completely transparent to the
lower ATM layer. As far as the ATM layer is concerned, all cells arrive in the same order
they were sent.
MLPoATM functionality is enabled through the use of virtual-access interfaces. Virtualaccess interfaces are built on demand from virtual-template interfaces and inherit their
conguration properties from the virtual templates they are built from. Thus, the IP address,
service-policy statement, and LFI parameters all are congured on the virtual template, as
shown in Example 13-22.
489
cRTP is supported only on ATM PVCs (through MLPoATM), as of Cisco IOS Release
12.2(2)T.
Additionally, as discussed previously in this chapter and in Chapter 5, it is recommended
that the value of the nal output buffer, the Tx-ring, be tuned on slow-speed ATM PVCs to
a value of three particles to minimize serialization delay.
Example 13-22 Slow-Speed ( 768 kbps) MLPoATM QoS Design Example
!
interface ATM4/0
bandwidth 768
no ip address
no atm ilmi-keepalive
!
interface ATM4/0.60 point-to-point
pvc BRANCH#60 0/60
!
vbr-nrt 768 768
!
tx-ring-limit 3
protocol ppp Virtual-Template60
!
!
interface Virtual-Template60
bandwidth 768
ip address 10.200.60.1 255.255.255.252
!
service-policy output WAN-EDGE
ppp multilink
!
ppp multilink fragment-delay 10
!
ppp multilink interleave
!
NOTE
When using virtual templates for low-speed ATM links, keep the following in mind:
The dynamic nature of virtual-template interfaces might make network management
unwieldy.
MLPoATM can be supported only on hardware that supports per-VC trafc shaping.
Verication commands:
490
(including a 4-byte ATM core header). This means that a 1500-byte packet would require
three particles of buffering. Furthermore, ATM denes Tx-rings on a per-PVC basis, as
shown in Examples 13-23 and 13-24.
Example 13-23 Basic ATM PVC Conguration Example
!
interface ATM3/0.1 point-to-point
ip address 10.2.12.1 255.255.255.252
pvc 0/12
vbr-nrt 768 768
! ATM PVC definition
!
!
The size of a default Tx-ring can be ascertained using the show atm pvc command (an
output modier is used to focus on the relevant portion of the output), as shown in
Example 13-28.
Example 13-24 show atm pvc Verication of Tx-ring Setting
WAG-7206-Left#show atm pvc 0/12 | include TxRingLimit
VC TxRingLimit: 40 particles
The output shows that the Tx-ring is set, in this instance, to a default value of 40 particles.
The Tx-ring for the PVC can be tuned to the recommended setting of 3 using the tx-ringlimit command under the PVCs denition, as shown in Example 13-25.
Example 13-25 Tuning an ATM PVC Tx-ring
WAG-7206-Left(config)#interface atm 3/0.1
WAG-7206-Left(config-subif)#pvc 0/12
WAG-7206-Le(config-if-atm-vc)#tx-ring-limit
tx-ring-limit 3
The new setting can be veried quickly with the same show atm pvc command variation,
as shown in Example 13-25 (see Example 13-26).
Example 13-26 show atm pvc Verication of Tx-ring Setting After Tuning
WAG-7206-Left#show atm pvc 0/12 | include TxRingLimit
VC TxRingLimit: 3 particles
491
bundles instead of MLPoATM for slow-speed ATM links is usually a matter of economics
(because service providers often offer attractive pricing for PVC bundles) and
conguration/management complexity comfort levels.
Figure 13-15 Slow-Speed ATM PVC Bundles
ATM PVC for Voice
ATM PVC for Data
ATM
Cloud
Branch Router
WAN Aggregator
In Example 13-27, one PVC (for voice) has a variable bit rate, non-real-time (VBR-nrt)
ATM trafc contract and an admission criterion of IPP 5, while another PVC (for data) has
an unspecied bit rate (UBR) ATM trafc contract and accepts all other precedence levels.
Again, it is also recommended that the TX-ring be tuned to 3 on such slow-speed
ATM PVCs.
Example 13-27 Slow-Speed ( 768 kbps) ATM PVC Bundles QoS Design Example
!
class-map match-any Call Signaling
match ip dscp cs3
match ip dscp af31
class-map match-any Critical Data
match ip dscp cs6
match ip dscp af21
match ip dscp cs2
!
!
policy-map WAN-EDGE-DATA-PVC
! Only data queuing is required (no voice)
class Call Signaling
bandwidth percent 5
class Critical Data
bandwidth percent 40
class class-default
fair-queue
!
vc-class atm VOICE-PVC-256
! Voice PVC-class definition
! Voice ATM PVC definition
vbr-nrt 256 256
! Per-PVC Tx-ring is tuned to 3 particles
tx-ring-limit 3
! Only IPP5 traffic (voice) can use this PVC
precedence 5
! Traffic will not be accepted from other PVCs
no bump traffic
! Optional: Protects VC status of Voice PVC
protect vc
continues
492
Example 13-27 Slow-Speed ( 768 kbps) ATM PVC Bundles QoS Design Example (Continued)
!
vc-class atm DATA-PVC-512
! Data PVC-class definition
! Data ATM PVC definition
ubr 512
! Per-PVC Tx-ring is tuned to 3 particles
tx-ring-limit 3
! All other IPP values (data) use this PVC
precedence other
!
!
interface ATM3/0
no ip address
no atm ilmi-keepalive
!
interface ATM3/0.60 point-to-point
ip address 10.200.60.1 255.255.255.252
bundle BRANCH#60
pvc-bundle BRANCH60-DATA 0/60
class-vc DATA-PVC-512
! Assigns PVC to data-class
service-policy output
output WAN-EDGE-DATA-PVC
WAN-EDGE-DATA-PVC
! Attaches (data) MQC policy to PVC
service-policy
pvc-bundle BRANCH60-VOICE 0/600
class-vc VOICE-PVC-256
! Assigns PVC to voice-class
!
A major drawback to PVC bundling is that data never can get access to the voice PVC,
even if there is available bandwidth in it. This forces suboptimal consumption of WAN
bandwidth.
Verication commands:
Encaps
SNAP
SNAP
SC
UBR
VBR
Peak
Kbps
512
256
Avg/Min Burst
Kbps
Cells
512
1145
256
94
Sts
UP
UP
493
7-6, 4-0
5
Current
Prec/Exp
ATM
Cloud
Branch Router
WAN Aggregator
continues
494
Example 13-30 Medium-Speed (T1/E1) ATM IMA QoS Design Example (Continued)
!
!
interface ATM3/IMA0
no ip address
no atm ilmi-keepalive
!
interface ATM3/IMA0.12 point-to-point
ip address 10.200.60.1 255.255.255.252
description T1 ATM-IMA to Branch#60
pvc 0/100
! ATM PVC defined under ATM IMA sub-int
vbr-nrt 1536 1536
! Overrides the default 75% BW limit
max-reserved-bandwidth 100
service-policy output WAN-EDGE ! Attaches MQC policy to PVC
!
!
Verication commands:
ATM
Cloud
Branch Router
WAN Aggregator
495
As mentioned, ATM IMA makes bandwidth expansion easy to manage. For example, all
that is required to add another T1 line to the previous example is to add an ima-group statement to the next ATM interface and increase the PVC speed, as shown in Example 13-31.
Example 13-31 High-Speed (Multiple T1/E1 and Greater) ATM IMA QoS Design Example
!
interface ATM3/0
no ip address
no atm ilmi-keepalive
! ATM3/0 added to ATM IMA group 0
ima-group 0
no scrambling-payload
!
interface ATM3/1
no ip address
no atm ilmi-keepalive
! ATM3/1 added to ATM IMA group 0
ima-group 0
no scrambling-payload
!
!
interface ATM3/IMA0
no ip address
no atm ilmi-keepalive
!
interface ATM3/IMA0.12 point-to-point
ip address 10.6.12.1 255.255.255.252
pvc 0/100
! ATM PVC speed expanded
vbr-nrt 3072 3072
! Overrides the default 75% BW limit
max-reserved-bandwidth 100
! Attaches MQC policy to PVC
service-policy output WAN-EDGE
!
!
Verication commands:
496
Example 13-32 show ima interface atm Verication of ATM IMA Group
WAG-7206-Left#show ima interface atm 3/ima0
Interface ATM3/IMA0 is up
Group index is 1
Ne state is operational, failure status is noFailure
Active links bitmap 0x3
IMA Group Current Configuration:
Tx/Rx configured links bitmap 0x3/0x3
Tx/Rx minimum required links 1/1
Maximum allowed diff delay is 25ms, Tx frame length 128
Ne Tx clock mode CTC, configured timing reference link ATM3/0
Test pattern procedure is disabled
IMA Group Current Counters (time elapsed 257 seconds):
0 Ne Failures, 0 Fe Failures, 0 Unavail Secs
IMA Group Total Counters (last 5 15 minute intervals):
0 Ne Failures, 0 Fe Failures, 0 Unavail Secs
IMA link Information:
Link
Physical Status
NearEnd Rx Status
Test Status
-------------------------------------------ATM3/0
up
active
disabled
ATM3/1
up
active
disabled
ATM3/2
administratively down unusableInhibited
disabled
ATM3/3
administratively down unusableInhibited
disabled
ATM
Cloud
The policies and design principles do not change for site-to-site scenarios. The main
consideration is the performance of the WAN edge router. Although newer platforms handle
complex policies more efciently, it is still highly recommended that proof-of-concept
497
testing of the platforms involved be performed before implementing policies at such critical
junctions in the network. Example 13-33 illustrates a site-to-site QoS policy applied to a
very-high-speed ATM (OC3) link.
Example 13-33 Very High-Speed (DS3-OC3+) ATM Link QoS Design Example
!
interface ATM3/0
no ip address
load-interval 30
no atm ilmi-keepalive
!
interface ATM3/0.1 point-to-point
ip address 10.2.12.1 255.255.255.252
pvc 0/12
! ATM OC3 PVC definition
vbr-nrt 149760 149760
! Overrides the default 75% BW limit
max-reserved-bandwidth 100
! Attaches MQC policy to PVC
service-policy output WAN-EDGE
!
!
Verication commands:
498
ATM PVCs without the need for symmetric topologies. FRF.8 supports two modes of
operation of the interworking function (IWF) for upper-layer user protocol encapsulation:
Transparent modeDoes not map encapsulations, but sends them unaltered. This
mode is used when translation is impractical because encapsulation methods do not
conform to the supported standards for service interworking.
MLP for LFI on ATM and Frame Relay SIW networks is supported for transparent-mode
VCs and translational-mode VCs that support PPP translation (FRF 8.1).
To make MLPoATM and MLPoFR SIW possible, the service providers interworking
switch must be congured in transparent mode, and the end routers must be capable of
recognizing both MLPoATM and MLPoFR headers. This is accomplished with the
protocol ppp command for ATM and the frame-relay interface-dlci dlci ppp command
for Frame Relay.
When an ATM cell is sent from the ATM side of an ATM-to-Frame Relay SIW connection,
the following must happen for interworking to be possible:
1 The sending router encapsulates a packet in the MLPoATM header by the sending
router.
2 In transparent mode, the carrier switch prepends a 2-byte Frame Relay DLCI eld to
the received packet and sends the packet to its Frame Relay interface.
3 The receiving router examines the header of the received packet. If the rst 4 bytes
after the 2-byte DLCI eld of the received packet are 0xfefe03cf, it treats it as a legal
MLPoFR packet and sends it to the MLP layer for further processing.
When a frame is sent from the Frame Relay side of an ATM-to-Frame Relay SIW
connection, the following must happen for interworking to be possible:
1 The sending router encapsulates a packet in the MLPoFR header.
2 In transparent mode, the carrier switch strips off the 2-byte Frame Relay DLCI eld
the received packet are 0x03cf, it treats it as a legal MLPoATM packet and sends it to
MLP layer for further processing.
A new ATM-to-Frame Relay SIW standard, FRF.8.1, supports MLPoATM and Frame
Relay SIW, but it could be years before all switches are updated to this new standard.
When using MLPoATM and MLPoFR, keep the following in mind:
MLPoATM can be supported only on platforms that support per-VC trafc shaping.
MLPoATM relies on per-VC queuing to control the ow of packets from the MLP
bundle to the ATM PVC.
499
MLPoATM requires the MLP bundle to classify the outgoing packets before they are
sent to the ATM VC. It also requires the per-VC queuing strategy for the ATM VC to
be FIFO because the MLP bundle handles queuing.
MLPoFR relies on the FRTS engine to control the ow of packets from the MLP
bundle to FR VC.
cRTP is supported only over ATM links (through MLPoATM), as of Cisco IOS
Release 12.2(2)T.
ATM Cloud
Frame Relay
Cloud
Branch Router
When enabling MLPoATM, the fragment size should be optimized so that it ts into an
integral number of cells. Otherwise, the bandwidth required could double because of cell
padding. For example, if a fragment size of 49 bytes is congured, this fragment would
require 2 cells to transmit (because ATM cells have 48-byte payloads). This would generate
57 bytes of overhead (2 cell headers plus 47 bytes of cell padding), which is more than
double the fragment itself.
Table 13-3 provides a summary of the optimal fragment-delay parameters for MLPoATM.
500
Table 13-3
PVC Speed
Optimal Fragment
Size
ATM Cells
(Rounded Up)
ppp multilink
fragment-delayvalue
56 kbps
84 bytes
12 ms
64 kbps
80 bytes
10 ms
128 kbps
176 bytes
11 ms
256 kbps
320 bytes
10 ms
512 kbps
640 bytes
14
10 ms
768 kbps
960 bytes
21
10 ms
The central site WAN aggregator MLPoATM conguration (see Example 13-34)
The remote branch router MLPoFR conguration (see Example 13-39)
Example 13-34 MLPoATM WAN Aggregator ATM-FR SIW QoS Design Example
!
interface ATM4/0
no ip address
no atm ilmi-keepalive
!
interface ATM4/0.60 point-to-point
pvc BRANCH#60 0/60
!
vbr-nrt 256 256
!
tx-ring-limit 3
Tx-ring is tuned to 3 particles
protocol ppp VirtualTemplate60
!
interface Virtual-Template60
bandwidth 256
ip address 10.200.60.1 255.255.255.252
!
service-policy output WAN-EDGE
ppp multilink
!
ppp multilink fragment-delay 10
!
ppp multilink interleave
!
Verication commands:
501
Example 13-35 MLPoFR Remote-Branch Router ATM-FR SIW QoS Design Example
!
interface Serial6/0
description Parent FR Link for BRANCH#60
no ip address
encapsulation frame-relay
frame-relay traffic-shaping
!
interface Serial6/0.60 point-to-point
description FR Sub-Interface for BRANCH#60
bandwidth 256
! Enables MLPoFR
frame-relay interface-dlci 60 ppp Virtual-Template60
class FRTS-256kbps
! Binds the map-class to the FR DLCI
!
interface Virtual-Template60
bandwidth 256
ip address 10.200.60.2 255.255.255.252
! Attaches MQC policy to map-class
service-policy output WAN-EDGE
ppp multilink
! Enables MLP fragmentation
ppp multilink fragment-delay 10
! Enables MLP interleaving
ppp multilink interleave
!
!
map-class frame-relay FRTS-256kbps
! CIR is set to 95% of FR DLCI rate
frame-relay cir 243200
! Bc is set to CIR/100
frame-relay bc 2432
! Be is set to 0
frame-relay be 0
! MinCIR is set to CIR
frame-relay mincir 243200
!
Verication commands:
ISDN
When designing VoIP over ISDN networks, special consideration needs to be given to the
following issues:
502
Variable Bandwidth
ISDN allows B channels to be added or dropped in response to the demand for bandwidth.
The fact that the bandwidth of a link varies over time presents a special challenge to the
LLQ/CBWFQ mechanisms of Cisco IOS Software. Before Cisco IOS Release 12.2(2)T, a
policy map implementing LLQ could be assigned only a xed amount of bandwidth. On an
ISDN interface, Cisco IOS Software assumes that only 64 kbps is available, even though
the interface has the potential to provide 128 kbps, 1.544 Mbps, or 2.408 Mbps of bandwidth. By default, the maximum bandwidth assigned must be less than or equal to 75 percent of the available bandwidth. Hence, before Cisco IOS Release 12.2(2)T, only 75 percent
of 64 kbps, or 48 kbps, could be allocated to an LLQ on any ISDN interface. If more was
allocated, an error message was generated when the policy map was applied to the ISDN
interface. This severely restricted the number of VoIP calls that could be carried.
The solution to this problem was introduced in Cisco IOS Release 12.2(2)T with the
priority percent command. This command allows the reservation of a variable bandwidth
percentage to be assigned to the LLQ.
503
ISDN
Cloud
Branch Router
WAN Aggregator
Cisco IOS provides two mechanisms for controlling how channels are added in response to
demand.
The rst mechanism commonly is referred to as dial-on-demand routing (DDR). With
DDR, a load threshold must be specied (as a fraction of available bandwidth). When the
trafc load exceeds this number, an additional channel is added to the bundle. The threshold
is calculated as a running average. As a result, there is a certain delay in bringing up additional
504
B channels when the load increases. This delay does not present a problem with data, but it
is unacceptable with voice. This delay can be reduced to around 30 seconds by adding the
load-interval command to the physical ISDN interface, but even 30 seconds is too long.
The second mechanism is a more robust solution, which is simply to bring up all B channels
immediately and keep them up as long as the ISDN service is required. This is achieved by
using the ppp multilink links minimum command.
With two B channels available, the service policy can reserve (approximately) 90 kbps (70
percent of 128 kbps) for voice trafc. The total number of calls that can be transmitted
depends on the codec and sampling rates used.
Example 13-36 illustrates the conguration for enabling voice and data over multiple ISDN
B channels.
Example 13-36 Voice and Data over Multiple ISDN B Channels QoS Design Example
!
class-map match-all Voice
match ip dscp ef
!
class-map match-any Call Signaling
match ip dscp cs3
match ip dscp af31
!
!
policy-map WAN-EDGE-ISDN
class Voice
priority percent 70
! LLQ 33% Rule is relaxed for DDR scenarios
compress header ip rtp
! Enables Class-Based cRTP
class Call Signaling
! Bandwidth guarantee for Call-Signaling
bandwidth percent 5
class class-default
fair-queue
!
interface BRI0/0
encapsulation ppp
dialer pool-member 1
!
interface Dialer1
encapsulation ppp
dialer pool 1
dialer remote-name routerB-dialer1
dialer-group 1
dialer string 12345678
! Attaches MQC policy to Dialer interface
service-policy output WAN-EDGE-ISDN
ppp multilink
! Enables MLP fragmentation
ppp multilink fragment-delay 10
! Enables MLP interleaving
ppp multilink interleave
! Activates both B Channels immediately
ppp multilink links minimum 2
! Enables MCMP
ppp multilink multiclass
!
505
Verication commands:
Gig0/0
WAN Aggregator
ATM3/0 (OC3)
ATM4/0 (OC3)
Gig0/1
LAN Edges
WAN Edges
ATM
Cloud
506
Example 13-37 Case Study: QoS Baseline Policies on WAN Aggregation Router with Dual-T1 ATM IMA
Links
!
ip cef distributed
! Required for C7500-VIP
!
class-map match-all Voice
match ip dscp ef
! IP Phones mark Voice to EF
class-map match-all Interactive Video
match ip dscp af41 af42
! Recommended markings for IP/VC
class-map match-any Call Signaling
match ip dscp cs3
! Future Call-Signaling marking
match ip dscp af31
! Current Call-Signaling marking
class-map match-all Routing
match ip dscp cs6
! Routers mark Routing traffic to CS6
class-map match-all Net Mgmt
match ip dscp cs2
! Recommended marking for Network Management
class-map match-all Mission-Critical Data
match ip dscp 25
! Interim marking for Mission-Critical Data
class-map match-all Transactional Data
match ip dscp af21 af22
! Recommended markings for Transactional-Data
class-map match-all Bulk Data
match ip dscp af11 af12
! Recommended markings for Bulk-Data
class-map match-all Streaming Video
match ip dscp cs4
! Recommended marking for Streaming-Video
class-map match-all Scavenger
match ip dscp cs1
! Recommended marking for Scavenger traffic
!
policy-map WAN-EDGE
class Voice
! Voice gets 552 kbps of LLQ
priority percent 18
class Interactive Video
! 384 kbps IP/VC needs 460 kbps of LLQ
priority percent 15
class Call Signaling
! Bandwidth guarantee for Call-Signaling
bandwidth percent 5
class Routing
! Bandwidth guarantee for Routing
bandwidth percent 3
class Net Mgmt
! Bandwidth guarantee for Network Management
bandwidth percent 2
class Mission-Critical Data
! Mission-Critical data gets min 10% BW guarantee
bandwidth percent 10
! Applies FQ to MC-Data class (VIP Only)
fair-queue
! Enables WRED on Mission-Critical Data class
random-detect
class Transactional Data
! Transactional Data gets min 7% BW guarantee
bandwidth percent 7
! Applies FQ to Trans-Data class (VIP Only)
fair-queue
! Enables DSCP-WRED on Transactional Data class
random-detect dscp-based
class Bulk Data
! Bulk Data gets min 4% BW guarantee
bandwidth percent 4
! Applies FQ to Bulk Data class (VIP Only)
fair-queue
! Enables DSCP-WRED on Bulk Data class
random-detect dscp-based
class Streaming Video
! Streaming-Video gets min 10% BW guarantee
bandwidth percent 10
class Scavenger
Summary
507
Example 13-37 Case Study: QoS Baseline Policies on WAN Aggregation Router with Dual-T1 ATM IMA
Links (Continued)
1
bandwidth percent 11
class class-default
bandwidth percent 25
fair-queue
random-detect
!
interface ATM3/0
no ip address
no atm ilmi-keepalive
!
interface ATM3/0.60 point-to-point
ip address 10.2.60.1 255.255.255.252
description Dual-T1 ATM PVC to Branch#60
pvc 0/60
! Dual-T1 ATM PVC definition
vbr-nrt 3072 3072
! Overrides the default 75% BW limit
max-reserved-bandwidth 100
! Attaches MQC policy to PVC
service-policy output WAN-EDGE
!
!
Verication commands:
Summary
This chapter discussed the QoS requirements of routers performing the role of a WAN
aggregator. Specically, it addressed the need for queuing policies on the WAN edges,
combined with shaping policies when NBMA media (such as Frame Relay or ATM) are
being used, and link-specic policies, such as LFI/FRF.12 and cRTP, for slow-speed
( 768 kbps) links.
For the WAN edges, bandwidth-provisioning guidelines were considered, such as leaving
25 percent of the bandwidth for the Best-Effort class and limiting the sum of all LLQs
to 33 percent.
Three categories of WAN link speeds and their design implications were presented:
Slow-speed ( 768 kbps) links, which can support only Three- to Five-Class QoS
models and require LFI mechanisms and cRTP.
Medium-speed ( T1/E1) links, which, likewise, can support only Three- to FiveClass QoS Models but no longer require LFI mechanisms. cRTP becomes optional.
508
High-speed (multiple T1/E1 or greater) links, which can support 5- to 11-Class QoS
Models. No LFI is required on such links. cRTP likely would have a high CPU cost
(compared to realized bandwidth savings) and, as such, generally is not recommended
for such links. Additionally, some method of load sharing, bundling, or inverse
multiplexing is required to distribute the trafc across multiple physical links.
These principles then were applied to certain WAN media designsspecically, for leased
lines, Frame Relay, ATM, and ATM-to-Frame Relay SIW. The corner case of ISDN as a
backup WAN link also was considered.
Finally, a case study was presented, illustrating a complex scenario to show how these
designs can be put together.
Further Reading
Layer 3 queuing:
Low-latency queuing with priority percentage support (Cisco IOS Release 12.2.2T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t2/ftllqpct.htm.
Congestion avoidance:
Distributed class-based weighted fair queuing and distributed weighted random early
detection (Cisco IOS Release 12.1.5T): http://www.cisco.com/univercd/cc/td/doc/
product/software/ios121/121newft/121t/121t5/dtcbwred.htm.
Further Reading
509
MQC-based Frame Relay trafc shaping (Cisco IOS Release 12.2.13T): http://
www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/122t13/
frqosmqc.htm.
MLP interleaving and queuing for Real-Time trafc (Cisco IOS Release 12.0):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/12cgcr/dial_c/
dcppp.htm#4550.
Link fragmentation and interleaving for Frame Relay and ATM virtual circuits (Cisco
IOS Release 12.1.5T): http://www.cisco.com/univercd/cc/td/doc/product/software/
ios121/121newft/121t/121t5/dtlfra.htm.
Distributed link fragmentation and interleaving over leased lines (Cisco IOS Release
12.2.8T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t8/ftdl2.htm.
Distributed link fragmentation and interleaving for Frame Relay and ATM interfaces
(Cisco IOS Release 12.2.4T): http://www.cisco.com/univercd/cc/td/doc/product/
software/ios122/122newft/122t/122t4/ftdl.htm.
Class-based RTP and TCP header compression (Cisco IOS Release 12.2.13T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/122t/
122t13/fthdrcmp.htm.
Tx-ring:
PAK_priority:
Understanding how routing updates and Layer 2 control packets are queued on an
interface with a QoS service policy: http://www.cisco.com/warp/public/105/
rtgupdates.html.
510
ISDN:
Marking:
This chapter discusses Branch QoS considerations and designs, including the following:
Unidirectional applications
Branch LAN edge ingress classication
Branch NBAR policies for worm identication and policing
CHAPTER
14
514
Branch Router
Branch Switch
VVLAN
WAN
DVLAN
WAN Edge
LAN Edge
Link-speed categories (slow, medium, and high) and their respective design
implications
Link-specic caveats (such as the fact that tools such as LFI and cRTP, when enabled,
must be enabled on both ends of the WAN link for them to function correctly)
Distributed platform idiosyncrasies are not as relevant for branch router designs because
these platforms rarely are deployed at remote sites (although they can be used for site-tosite links, as discussed in Chapter 13).
Unidirectional Applications
Some applications are completely symmetrical and require identical bandwidth provisioning
on both ends of the WAN link. For example, if 100 kbps of LLQ are assigned to voice in
one direction, 100 kbps of LLQ also must be provisioned for voice in the opposite direction
(assuming that the same VoIP codecs are being used in both directions, and putting aside
515
for a moment multicast Music-on-Hold [MoH] provisioning). Furthermore, having symmetrical polices on both sides of the WAN links greatly simplies QoS policy deployment
and management, which is an important aspect of large-scale designs.
However, certain applications, such as Streaming-Video and multicast MoH, most often are
unidirectional. Therefore, it might be unnecessary and even inefcient to provision any
bandwidth guarantees for such trafc on the branch router for the branch-to-campus
direction of trafc ow.
Most applications lie somewhere in the middle of the scale, between the extremes of being
fully bidirectional and being completely unidirectional. Most client/server applications lie
closer to the unidirectional end of the scale because these applications usually consist of
small amounts of client-to-server trafc coupled with larger amounts of server-to-client
trafc. Such behavior can be reected in the asymmetrical bandwidth provisioning for such
types of applications.
For purely unidirectional applications, it is recommended that provisioning be removed
from the WAN edge policies on branch routers and the allocated bandwidth be redistributed
among other classes.
516
Figure 14-2 Branch Router (10-Class) QoS Baseline WAN Edge Model Bandwidth Allocations Example
(Dual-T1 Link Example)
Voice
18%
BestEffort
25%
InteractiveVideo
15%
Scavenger 1%
Bulk Data4%
Transactional Data
12%
Call-Signaling 5%
Routing 3%
Network-Management 2%
Mission-Critical Data 15%
Example 14-1 Branch Router (10-Class) QoS Baseline WAN Edge Model
!
class-map match-all VOICE
match ip dscp ef
! IP Phones mark Voice to EF
class-map match-all INTERACTIVE-VIDEO
match ip dscp af41 af42
! Recommended markings for IP/VC
class-map match-any CALL-SIGNALING
match ip dscp cs3
! Future Call-Signaling marking
match ip dscp af31
! Current Call-Signaling marking
class-map match-all ROUTING
match ip dscp cs6
! Routers mark Routing traffic to CS6
class-map match-all NET-MGMT
match ip dscp cs2
! Recommended marking for Network Management
class-map match-all MISSION-CRITICAL-DATA
match ip dscp 25
! Interim marking for Mission-Critical Data
class-map match-all TRANSACTIONAL-DATA
match ip dscp af21 af22
! Recommended markings for Transactional Data
class-map match-all BULK-DATA
517
Example 14-1 Branch Router (10-Class) QoS Baseline WAN Edge Model (Continued)
match ip dscp af11 af12
class-map match-all SCAVENGER
match ip dscp cs1
!
policy-map BRANCH-WAN-EDGE
class VOICE
priority percent 18
class INTERACTIVE-VIDEO
priority percent 15
class CALL-SIGNALING
bandwidth percent 5
class ROUTING
bandwidth percent 3
class NET-MGMT
bandwidth percent 2
class MISSION-CRITICAL-DATA
bandwidth percent 15
random-detect
class TRANSACTIONAL-DATA
bandwidth percent 12
random-detect dscp-based
class BULK-DATA
bandwidth percent 4
random-detect dscp-based
class SCAVENGER
bandwidth percent 1
class class-default
bandwidth percent 25
random-detect
!
Verication commands:
show policy
show policy interface
Now that considerations and designs for the WAN edge of the branch router have been
addressed, the next section discusses the LAN edge.
518
are carried over a WAN (or VPN). In some cases, network administrators prefer to have
these markings restored at the branch; DSCP-to-CoS mapping then can be performed on
the branch routers LAN edge.
In the ingress direction, the branch router might be required to perform classication and
marking of branch-to-campus trafc. This might be because the branch switch lacks the
capability to classify and mark trafc, or because the trafc consists of stateful ows that
require NBAR for classication. NBAR classication also is required at branch LAN
ingress edges to identify (and immediately drop) known worm trafc.
Each of these types of polices is discussed in more detail in the following sections.
DSCP-to-CoS Remapping
DSCP-to-CoS remapping is optional. Newer Catalyst switches perform QoS based on
internal DSCP values that are generated either by trusted DSCP markings or by trusted CoS
markings (coupled with CoS-to-DSCP mappings). In the case of legacy switches at the
branch that perform QoS strictly by preset CoS values, CoS might need to be remapped
on the branch routers LAN edge.
Enhanced packet marking (Cisco IOS Release 12.2[13]T or higher) is the optimal tool
for resetting CoS values because it uses a table. In this manner, a default DSCP-to-CoS
mapping can be used without having to congure explicitly a class-based marking policy
that matches every DiffServ class and performs a corresponding set cos function.
In both cases, keep in mind that only Ethernet trunking protocols, such as 802.1Q, carry
CoS information. Therefore, the policy works correctly only when applied to a trunked
subinterface, not to a main Ethernet interface.
Example 14-2 presents an enhanced packet marking DSCP-to-CoS conguration for a
branch LAN edge. Note that this DSCP-to-CoS remapping policy requires application to
both the voice VLAN (VVLAN) subinterface and the data VLAN (DVLAN) subinterface
on the branch routers LAN edge.
Example 14-2 Branch LAN Edge Enhanced Packet Marking for DSCP-to-CoS Remapping Example
!
ip cef
!
policy-map BRANCH-LAN-EDGE-OUT
class class-default
set cos dscp
!
!
interface FastEthernet0/0
no ip address
speed auto
duplex auto
!
519
Example 14-2 Branch LAN Edge Enhanced Packet Marking for DSCP-to-CoS Remapping Example (Continued)
interface FastEthernet0/0.60
description DVLAN SUBNET 10.1.60.0
encapsulation dot1Q 60
ip address 10.1.60.1 255.255.255.0
service-policy output BRANCH-LAN-EDGE-OUT
!
interface FastEthernet0/0.160
description VVLAN SUBNET 10.1.160.0
encapsulation dot1Q 160
ip address 10.1.160.1 255.255.255.0
service-policy output BRANCH-LAN-EDGE-OUT
!
Verication commands:
show policy
show policy interface
The branch access switch does not have Layer 3 or Layer 4 awareness for trafc
classication or does not support marking.
In such cases, DSCP classication must be performed at the ingress interface of the branch
router.
Administrators can identify and then mark application trafc based on the following
criteria:
520
Regardless of the method used to identify the application trafc, the inbound classication
and marking policy needs to be applied only to the DVLAN subinterface. This is because
only trusted IP Telephony applications, which mark their voice trafc correctly, are admitted
onto the voice VLAN.
NOTE
If the branch access switches support access-edge policers (as described in Chapter 12,
Campus QoS Design), these likewise should be enabled on them. This adds another layer
of defense to the network, mitigating DoS/worm trafc that originates from the branch
through Scavenger-class QoS.
If the branch access switches do not support such policing, compatible policers could be
placed at the branch router access edge. This is in harmony with the principle of policing
as close to the source as possible.
Whenever possible, though, such policing should be done in Catalyst hardware rather than
Cisco IOS Software.
Although it might be tempting to use the same class-map names (such as MISSIONCRITICAL, TRANSACTIONAL-DATA, or BULK-DATA) for ingress LAN edge classication and marking policies as are in use for egress WAN edge queuing policies, this might
cause confusion in policy denition and troubleshooting. Therefore, for management and
troubleshooting simplicity, it is benecial to have similar yet descriptive names for these
new classes (for example, branch-originated trafc might have class-map names prepended
with BRANCH-). A description can also be added to the class maps with the description
command.
521
Example 14-3 Branch LAN Edge Destination IP Classication and Marking Example
!
ip cef
! Required for Packet Marking
!
class-map match-all BRANCH-MISSION-CRITICAL
match access-group name MISSION-CRITICAL-SERVERS
! ACL to reference
!
policy-map BRANCH-LAN-EDGE-IN
class BRANCH-MISSION-CRITICAL
! (Interim) Recommended marking for Mission-Critical traffic
set ip dscp 25
!
...
!
interface FastEthernet0/0
no ip address
speed auto
duplex auto
!
interface FastEthernet0/0.60
description DVLAN SUBNET 10.1.60.0
encapsulation dot1Q 60
ip address 10.1.60.1 255.255.255.0
service-policy output BRANCH-LAN-EDGE-OUT ! Restores CoS on Data VLAN
! Marks MC Data on ingress
service-policy input BRANCH-LAN-EDGE-IN
!
...
!
ip access-list extended MISSION-CRITICAL-SERVERS
permit ip any 10.200.200.0 0.0.0.255
! MC Data Server-Farm Subnet
!
Verication commands:
show policy
show policy interface
show ip access-list
522
Example 14-4 show ip access-list Verication of Remote Branch LAN Edge Destination IP Classication Example
BRANCH#60-C3745#show ip access-list MISSION-CRITICAL-SERVERS
Extended IP access list MISSION-CRITICAL-SERVERS
10 permit ip any 10.200.200.0 0.0.0.255 (464
464 matches)
matches
BRANCH#60-C3745#
NOTE
The Internet Assigned Numbers Authority (IANA) lists registered well-known and
registered application ports at http://www.iana.org/assignments/port-numbers.
Building on Example 14-4, Example 14-5 classies and marks branch-originated FTP and
e-mail trafc, both POP3 and IMAP (TCP port 143), as Bulk Data (DSCP AF11).
Example 14-5 Branch LAN Edge Well-Known Port Classication Example
!
! Required for Packet Marking
ip cef
!
class-map match-all BRANCH-MISSION-CRITICAL
match access-group name MISSION-CRITICAL-SERVERS
class-map match-all BRANCH-BULK-DATA
match access-group name BULK-DATA-APPS
! ACL to reference
!
policy-map BRANCH-LAN-EDGE-IN
class BRANCH-MISSION-CRITICAL
set ip dscp 25
class BRANCH-BULK-DATA
! Bulk data apps are marked to AF11
set ip dscp af11
!
!
interface FastEthernet0/0
no ip address
speed auto
duplex auto
!
interface FastEthernet0/0.60
description DVLAN SUBNET 10.1.60.0
encapsulation dot1Q 60
ip address 10.1.60.1 255.255.255.0
service-policy output BRANCH-LAN-EDGE-OUT
! Restores CoS on Data VLAN
service-policy input BRANCH-LAN-EDGE-IN
! Marks Data on ingress
!
...
523
Example 14-5 Branch LAN Edge Well-Known Port Classication Example (Continued)
!
ip access-list extended MISSION-CRITICAL-SERVERS
permit ip any 10.200.200.0 0.0.0.255
!
ip access-list extended BULK-DATA-APPS
permit tcp any any eq ftp
! Identifies
permit tcp any any eq ftp-data
! Identifies
permit tcp any any eq pop3
! Identifies
permit tcp any any eq 143
! Identifies
!
Verication commands:
show policy
show policy interface
show ip access-list
524
Furthermore, Scavenger applications, such as Napster, Gnutella, KaZaa (versions 1 and 2),
Morpheus, Grokster, and many other peer-to-peer le-sharing applications, are identied
by NBAR and marked to DSCP CS1.
Example 14-6 Branch LAN Edge NBAR Classication Example
!
ip nbar port-map custom-01 tcp 3200 3201 3202 3203 3600
! PDLM Mapping for SAP
!
ip cef
! IP CEF is required for both Class-Based Marking and for NBAR
!
class-map match-all BRANCH-MISSION-CRITICAL
match access-group name MISSION-CRITICAL-SERVERS
class-map match-any BRANCH-TRANSACTIONAL-DATA!
BRANCH-TRANSACTIONAL-DATA Must use "match-any"
match protocol citrix
! Identifies Citrix traffic
match protocol ldap
! Identifies LDAP traffic
match protocol sqlnet
! Identifies Oracle SQL*NET traffic
match protocol http url "*SalesReport*"
! Identifies "SalesReport" URLs
protocol custom-01
custom-01
match protocol
! Identifies SAP traffic via Custom-01 PDLM Port-Map
class-map match-all BRANCH-BULK-DATA
match access-group name BULK-DATA-APPS
class-map match-any BRANCH-NET-MGMT
match protocol snmp
! Identifies SNMP traffic
match protocol syslog
! Identifies Syslog traffic
match protocol telnet
! Identifies Telnet traffic
match protocol nfs
! Identifies NFS traffic
match protocol dns
! Identifies DNS traffic
match protocol icmp
! Identifies ICMP traffic
match protocol tftp
! Identifies TFTP traffic
class-map match-any BRANCH-SCAVENGER
match protocol napster
! Identifies Napster traffic
match protocol gnutella
! Identifies Gnutella traffic
match protocol fasttrack
! Identifies KaZaa (v1) traffic
match protocol kazaa2
! Identifies KaZaa (v2) traffic
!
policy-map BRANCH-LAN-EDGE-IN
class BRANCH-MISSION-CRITICAL
set ip dscp 25
class BRANCH-TRANSACTIONAL-DATA
! Transactional Data apps are marked to DSCP AF21
set ip dscp af21
class BRANCH-NET-MGMT
! Network Management apps are marked to DSCP CS2
set ip dscp cs2
class BRANCH-BULK-DATA
set ip dscp af11
class BRANCH-SCAVENGER
! Scavenger apps are marked to DSCP CS1
set ip dscp cs1
!
...
!
interface FastEthernet0/0
no ip address
speed auto
duplex auto
525
NOTE
The NBAR fasttrack PDLM identies KaZaa (version 1), Morpheus, Grokster, and other
applications. The NBAR gnutella PDLM identies Gnutella, BearShare, LimeWire, and
other peer-to-peer applications.
Verication commands:
show policy
show policy interface
show ip access-list
show ip nbar port-map
526
Example 14-7 show ip nbar port-map Verication Custom-PDLM TCP/UDP Port-Mapping Example
BRANCH#60-C3745#show ip nbar port-map | include custom-01
port-map custom-01
tcp 3200 3201 3202 3203 3600
BRANCH#60-C3745#
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
e-mail, 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 (as illustrated in Figure 14-3):
The enabling exploit codeThe 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.
527
1The Enabling
Exploit Code
2Propagation
Mechanism
3Payload
Some worms use unique TCP/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 congured
on the branch switch (whenever supported) or on the branch routers LAN edge.
Other worms hijack legitimate TCP/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. Some of
these known worms include Code Red, NIMDA, SQL Slammer, RPC DCOM/W32/MS
Blaster, and Sasser. The following sections discuss how NBAR can be used for each of
these types of worms.
528
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-ooding 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 original Code Red payload is shown in Example 14-8. The initial infection attempt
sends a large HTTP GET request to the target IIS server.
Example 14-8 Original Code Red Payload
2001-08-04 16:32:23 24.101.17.216 - 10.1.1.75 80 GET /default.ida
default.ida
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNN%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd
3%u7801%u9090%u6858%ucbd3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u
531b%u53ff%u0078%u0000%u00=a 403
Notice that the GET request in both cases is looking for a le named default.ida. However,
this lename changes in newer variants of Code Red, such as CodeRedv3/CodeRed.C, as
shown in Example 14-10.
Example 14-10 CodeRedv3 Payload
2001-08-06 22:24:02 24.30.203.202 - 10.1.1.9 80 GET /x.ida
x.ida
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAA=X 403 HTTP/1.1 -
Although the lename has changed, the .ida sufx 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.
529
Therefore, to combat Code Red, NBAR policies can be congured to check the payload of
HTTP packets for these criteria (.ida, cmd.exe, and root.exe), as shown in Example 14-11.
Example 14-11 NBAR Policies to Identify Code Red
!
class-map match-any CODE-RED
match protocol http url "*.ida*"
match protocol http url "*cmd.exe*"
match protocol http url "*root.exe*"
!
Verication command:
show policy
Through infected hosts actively scanning for back doors created by Code Red (worm
vector)
NIMDA did not appear to exhibit intentional destructive capabilities; to date, NIMDAs
activities have been restricted to its self-propagation, which has the side effect of a DoS
(ooding) attack.
NIMDA propagates itself by copying, downloading, or executing a le called readme.eml.
Therefore, NBAR can be used to check the payload of HTTP packets to see if they are
propagating this le, as shown in Example 14-12.
Example 14-12 NBAR Policies to Identify NIMDA
!
class-map match-any NIMDA
match protocol http url "*readme.eml*"
!
Verication command:
show policy
530
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
(necessary with TCP-based worms) 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 trafc generated by the worm. SQL Slammers doubling
rate was approximately 8.5 seconds. In contrast, CodeRedv2s doubling rate 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 Example 14-14.
Example 14-14 NBAR Policies to Identify SQL Slammer
!
ip nbar port-map custom-02 udp 1434
!
class-map match-all SQL-SLAMMER
match protocol custom-02
match packet length min 404 max 404
!
531
Verication commands:
NOTE
show policy
show ip nbar port-map
Because NBAR custom-01 PDLM has been used in previous examples to identify SAP
trafc, another custom PDLM (custom-02) is used in this example. Subsequent examples
similarly are dened with the next-available custom PDLM.
532
reboots. It then launches the worm program on the newly exploited host to begin the cycle
again, starting with scanning for more exploitable hosts. MS Blaster also contained code
for a DoS attack. This particular attack was targeted at www.windowsupdate.com.
NBAR can be used to combat the RPC DCOM/W32/MS Blaster worm by identifying
communications on TCP/UDP ports 135, 139, and 445.
By default, the NBAR exchange PDLM is mapped to TCP port 135; therefore, this PDLM
can be used as part of the MS Blaster worm policy denition. Similarly, the NBAR netbios
PDLM is bound by default to TCP/UDP port 139 (in addition to TCP port 137 and UDP
ports 137 and 138), so this PDLM also can be used within the policy denition; specically,
the netbios PDLM can have its port mapping expanded to include TCP port 445 and UDP
ports 135, 139, and 445, as shown in Example 14-15.
NOTE
Alternatively, a custom PDLM can be dened for these ports (TCP/UDP 135, 139, and
445), but before this could be done, you would have to map the exchange and netbios
PDLMs ports away from their defaults, to avoid conicting PDLM port mappings.
Verication commands:
show policy
show ip nbar port-map
533
LSASS vulnerability and creates a remote shell (RSH) session on TCP port 9996 back to
the infecting system. Then Sasser starts an FTP server on TCP port 5554 to retrieve a copy
of the worm.
Sasser can be identied through a custom NBAR PDLM listening for communication on
TCP ports 445, 5554, and 9996, as shown in Example 14-16.
NOTE
If TCP port 445 already has been bound to the netbios NBAR PDLM (as recommended
previously in the MS Blaster worm denition), it is not necessary to include this port in the
Sasser custom PDLM port mapping (because it will cause a conict).
Verication commands:
show policy
show ip nbar port-map
534
For example, consider the example of a ctitious 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. Moonbeams (ctitious) payload is
shown in Example 14-17.
Example 14-17 Moonbeam Worm Payload
\x04\x01Moonbeam\x01\x01\x01\x01.*[.][Dd][Ll][Ll]u9090%u6858%ucbd3%
Moonbeam
u7801%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u9090%
u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u0000%u00=a 403 ...
Moonbeam could be identied by a custom NBAR PDLM that examines TCP packets
within the range of 21000 through 21999, ignores the rst eight ASCII values, and checks
for the string Moonbeam (case sensitive), as shown in Example 14-18.
Example 14-18 NBAR Policies to Identify Moonbeam
!
ip nbar custom MOONBEAM 8 ascii Moonbeam tcp range 21000 21999 ! "Moonbeam" PDLM
!
class-map match-all MOONBEAM-WORM
match protocol MOONBEAM
! Matches the "Moonbeam" custom PDLM
!
Verication commands:
show policy
show ip nbar port-map
NOTE
A recursive classication is required in this policy for SQL Slammer. This is because
SQL Slammer requires a match-all criteria for its initial classication, but for policymanagement purposes, it is desired that this initial classication of SQL Slammer be
lumped under a single policy (with a match-any criteria) to identify and drop all known
worms.
535
Example 14-19 NBAR Branch LAN Edge Ingress Policy for Known Worms
!
! SQL Slammer custom PDLM
ip nbar port-map custom-02 udp 1434
! Sasser custom PDLM
ip nbar port-map custom-03 tcp 5554 9996
! MS Blaster TCP 137/139/445
ip nbar port-map netbios tcp 137 139 445
ip nbar port-map netbios udp 135 137 138 139 445 ! MS Blaster UDP 135/137-139/445
ip nbar custom MOONBEAM 8 ascii Moonbeam tcp range 21000 21999 ! "Moonbeam" PDLM
!
class-map match-all SQL-SLAMMER
match protocol custom-02
! Matches the SQL Slammer PDLM
! Matches the packet length (376+28)
match packet length min 404 max 404
!
class-map match-any WORMS
match protocol http url "*.ida*"
! CodeRed
! CodeRed
match protocol http url "*cmd.exe*"
match protocol http url "*root.exe*"
! CodeRed
! NIMDA
match protocol http url "*readme.eml*"
! SQL Slammer class-map
match class-map SQL-SLAMMER
! MS Blaster (TCP 135)
match protocol exchange
! MS Blaster NetBIOS PDLM
match protocol netbios
! Sasser custom PDLM
match protocol custom-03
! "Moonbeam" PDLM
match protocol MOONBEAM
!
policy-map WORM-DROP
class WORMS
! Drops all known worms
drop
!
...
!
interface FastEthernet0/0
no ip address
speed auto
duplex auto
!
interface FastEthernet0/0.60
description DVLAN SUBNET 10.1.60.0
encapsulation dot1Q 60
ip address 10.1.60.1 255.255.255.0
service-policy input WORM-DROP
! Drops known worms (DVLAN only)
!
536
down to AF22). Additionally, the WAN aggregator is provisioning LLQ and CBWFQ policies (with WRED on major data classes) for all 11 classes of trafc over the preferred
Layer 2 WAN medium: ATM.
Every quarter, ABC, Inc., multicasts company meetings to all its branches and provides
each branch with on-demand (unicast) e-learning content. However, because all the IP/TV
servers belonging to ABC, Inc., are located at the central campus, they see no need to
provision a class for Streaming-Video in both directions on the WAN links. Therefore, the
company has chosen to eliminate this class from the branch router WAN edge congurations
and redistribute the bandwidth between the Mission-Critical Data class and the Transactional
Data class.
Currently, the branch access switches do not have the capability to classify and mark trafc,
although they plan to eventually deploy switches in their branches with such capabilities
(including dual-rate policing and marking). In the meantime, ABC, Inc., will mark all
branch-to-campus trafc on the branch routers LAN edge on ingress. When the budget
enables them to upgrade their branch switches, marking policies dependent on Layer 3 or
Layer 4 criteria will be pushed out to the branch access switch (based on designs covered
in Chapter 12). However, policies will remain on the branch routers LAN edge to classify
and mark applications that require stateful packet inspection (using NBAR).
ABC, Inc., also has been hit with a number of worms over the past few years and wants to
do everything possible to limit and mitigate such attacks. The company has provisioned
Scavenger-class QoS within the campus and WAN edges. Furthermore, ABC, Inc., has
chosen to deploy NBAR policies to identify and drop known worms that might originate
within their branches. These policies are included in the branch routers ingress QoS policies.
QoS designs for the WAN and LAN edges of one of ABC, Inc.s, branch routers is
illustrated in Figure 14-4 and detailed in Example 14-20.
Figure 14-4 Case Study: Branch Router with 10-Class QoS Baseline WAN Edge Policies and DSCP-to-CoS
Remapping and NBAR Classication Plus Worm-Dropping LAN Edge Policies
10-Class LLQ/CBFQ/WRED Policies for
Branch-to-Campus Traffic
Policy-Map: BRANCH-WAN-EDGE
Branch Router
ATM
Cloud
Branch Switch
WLAN
Fa0/0.160
ATM 3/0
Fa0/0.60
DVLAN
ATM 3/1
WAN Edge
LAN Edge
537
Example 14-20 Case Study: Branch Router with 10-Class QoS Baseline WAN Edge Policies, DSCP-to-CoS
continues
538
Example 14-20 Case Study: Branch Router with 10-Class QoS Baseline WAN Edge Policies, DSCP-to-CoS
Remapping, and NBAR Classication Plus Worm-Dropping LAN Edge Policies (Continued)
match protocol custom-03
match protocol MOONBEAM
!
!
class-map match-all VOICE
match ip dscp ef
! IP Phones mark Voice to EF
class-map match-all INTERACTIVE-VIDEO
! Recommended markings for IP/VC
match ip dscp af41 af42
class-map match-any CALL-SIGNALING
match ip dscp cs3
! Future Call-Signaling marking
match ip dscp af31
! Current Call-Signaling marking
class-map match-all ROUTING
! Routers mark Routing traffic to CS6
match ip dscp cs6
class-map match-all NET-MGMT
! Net-Mgmt apps are marked via NBAR ingress policy
match ip dscp cs2
class-map match-all MISSION-CRITICAL-DATA
match ip dscp 25
! MC Data apps are marked via ACL ingress policy
class-map match-all TRANSACTIONAL-DATA
match ip dscp af21 af22
! Transactional apps are marked via NBAR policy
class-map match-all BULK-DATA
match ip dscp af11 af12
! Bulk Data apps are marked via ACL ingress policy
class-map match-all SCAVENGER
match ip dscp cs1
! Scavenger apps are marked via NBAR ingress policy
!
!
policy-map BRANCH-LAN-EDGE-OUT
! Enhanced Packet Marking DSCP-to-CoS policy
class class-default
! Default DSCP-to-CoS marking
set cos dscp
!
!
policy-map BRANCH-LAN-EDGE-IN
! BRANCH LAN Edge Ingress Marking Policy
class BRANCH-MISSION-CRITICAL
! Marks Mission-Critical apps to DSCP 25
set ip dscp 25
class BRANCH-TRANSACTIONAL-DATA
! Marks Transactional Data apps to DSCP AF21
set ip dscp af21
class BRANCH-NET-MGMT
set ip dscp cs2
! Marks Net Mgmt apps to DSCP CS2
class BRANCH-BULK-DATA
! Marks Bulk Data apps to DSCP AF11
set ip dscp af11
class BRANCH-SCAVENGER
set ip dscp cs1
! Marks Scavenger apps to DSCP CS1
class WORMS
drop
! Drops all known worms
class class-default
set ip dscp default
! Marks everything else to DSCP 0
!
!
policy-map BRANCH-WAN-EDGE
class VOICE
! Voice gets 552 kbps of LLQ
priority percent 18
class INTERACTIVE-VIDEO
539
Example 14-20 Case Study: Branch Router with 10-Class QoS Baseline WAN Edge Policies, DSCP-to-CoS
Remapping, and NBAR Classication Plus Worm-Dropping LAN Edge Policies (Continued)
priority percent 15
class CALL-SIGNALING
bandwidth percent 5
class ROUTING
bandwidth percent 3
class NET-MGMT
bandwidth percent 2
class MISSION-CRITICAL-DATA
bandwidth percent 15
random-detect
class TRANSACTIONAL-DATA
bandwidth percent 12
random-detect dscp-based
class BULK-DATA
bandwidth percent 4
random-detect dscp-based
class SCAVENGER
bandwidth percent 1
class class-default
bandwidth percent 25
random-detect
!
...
!
interface FastEthernet0/0
no ip address
speed auto
duplex auto
!
interface FastEthernet0/0.60
description DVLAN SUBNET 10.1.60.0
encapsulation dot1Q 60
ip address 10.1.60.1 255.255.255.0
service-policy output BRANCH-LAN-EDGE-OUT
! Restores CoS on Data VLAN
service-policy input BRANCH-LAN-EDGE-IN
! Marks data and drops worms
!
interface FastEthernet0/0.160
description VVLAN SUBNET 10.1.160.0
encapsulation dot1Q 160
ip address 10.1.160.1 255.255.255.0
service-policy output BRANCH-LAN-EDGE-OUT
! Restores CoS on Voice VLAN
!
...
!
interface ATM3/0
no ip address
no atm ilmi-keepalive
ima-group 0
! ATM3/0 added to ATM IMA group 0
no scrambling-payload
continues
540
Example 14-20 Case Study: Branch Router with 10-Class QoS Baseline WAN Edge Policies, DSCP-to-CoS
Remapping, and NBAR Classication Plus Worm-Dropping LAN Edge Policies (Continued)
!
interface ATM3/1
no ip address
no atm ilmi-keepalive
ima-group 0
! ATM3/1 added to ATM IMA group 0
no scrambling-payload
!
...
!
interface ATM3/IMA0
no ip address
no atm ilmi-keepalive
!
interface ATM3/IMA0.12 point-to-point
ip address 10.6.12.1 255.255.255.252
pvc 0/100
vbr-nrt 3072 3072
! ATM PVC speed set for Dual-T1
! Overrides the default 75% BW limit
max-reserved-bandwidth 100
service-policy output BRANCH-WAN-EDGE
! Attaches MQC policy to the ATM PVC
!
!
...
!
ip access-list extended MISSION-CRITICAL-SERVERS
permit ip any 10.200.200.0 0.0.0.255
! MC Data Server-Farm Subnet
!
ip access-list extended BULK-DATA-APPS
permit tcp any any eq ftp
! Identifies FTP Control traffic
permit tcp any any eq ftp-data
! Identifies FTP Default traffic
permit tcp any any eq pop3
! Identifies POP3 E-mail traffic
permit tcp any any eq 143
! Identifies IMAP E-mail traffic
!
Verication commands:
Further Reading
541
Summary
Although the QoS design recommendations for branch routers are very similar to and are
related to the QoS recommendations for WAN aggregators, this chapter examined three
unique considerations of branch routers.
The rst consideration is whether applications provisioned over the WAN are bidirectional
or unidirectional. Some unidirectional applications, such as Streaming-Video, provisioned
on the WAN aggregator WAN edge do not need to be provisioned correspondingly on the
branch routers WAN edge. Bandwidth from unidirectional application classes can be redistributed among other preferential application classes on the branch routers WAN edge.
The second consideration unique to branch routers is that ingress marking might need to be
performed on branch-to-campus trafc. This might be because the remote branch access
switch does not have the capability to classify and mark trafc, or it might be because some
applications require stateful packet inspection (NBAR) to identify them correctly. In either
case, ingress marking policies would be required on the branch routers LAN edge, on the
data VLANs subinterface (the voice VLAN trafc markings are trusted). Branch-to-campus
trafc can be identied by Layer 3 parameters (such as destination subnet), Layer 4 parameters (such as well-known TCP/UDP ports), or NBAR PDLMs. An example of each type
of classication is provided. Additionally, optional DSCP-to-CoS mapping policies (for
restoring 802.1p CoS markings that were lost when campus-originated trafc traversed the
WAN media) can be set on the branch routers LAN edge.
A third unique consideration in branch QoS design is that branch router ingress LAN edges
are a strategic place to deploy NBAR policies for worm identication and policing. NBAR
policies can be used to identify and drop Code Red, NIMDA, SQL Slammer, RPC DCOM/
W32/MS Blaster, Sasser, and other worms. This chapter discussed an extension of the
NBAR feature that enables administrators to program the strings that they want NBAR to
search packet payloads for; this feature enables NBAR policies to be used to identify new
worms that undoubtedly will be released in the future.
Finally, a case study was presented illustrating how these three unique considerations could
be combined in a complex branch router design.
Further Reading
Cisco IOS documentation:
542
Using Network-Based Application Recognition and ACLs for blocking the Code
Red worm: http://www.cisco.com/en/US/products/hw/routers/ps359/
products_tech_note09186a00800fc176.shtml.
PA R T
Chapter 15
Chapter 16
MPLS VPN QoS design typically is viewed from two distinct perspectives:
To achieve end-to-end service levels, enterprise and service-provider QoS policies must be
consistent and complimentary. Therefore, QoS considerations and design recommendations
for both the enterprise and service provider are presented in this chapter. The following
topics are discussed:
CHAPTER
15
NOTE
This chapter addresses QoS design for MPLS VPNs, not the theory and operation of MPLS
VPNs themselves. It is assumed that the reader is familiar with basic MPLS VPN architectures and technologies. For a detailed discussion of MPLS VPNs, refer to the Cisco Press
books MPLS and VPN Architectures, Volumes I and II, by Ivan Pepelnjak and Jim Guichard; Trafc Engineering with MPLS, by Eric Osborne and Ajay Simha; and Advanced
MPLS Design and Implementation, by Vivek Alwayn.
548
WAN
Access
Switch
Distribution
Switch
Access
Switch
However, 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 trafc, but it no longer fully controls
the QoS for branch-to-branch trafc. 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 insufcient because it addresses only part of the issue.
For example, consider the case of provisioning any-to-any videoconferencing. As with a
traditional Layer 2 WAN design, a scheduling policy to prioritize IP/VC on the WAN aggregator is required. Then the enterprise must properly provision similar priority scheduling
549
for IP/VC on the branch routers also. In this manner, any videoconferencing calls from the
campus to the branch (and also from branch to branch) are protected against trafc of lesser
importance owing between the same sites. The complexity of the fully meshed model arises when considering that contending trafc 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 trafc because this trafc 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 enterprises 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, as shown in Figure 15-2.
Figure 15-2 QoS Administration in Fully Meshed MPLS VPN Design
Service providers (PE) principally
control Branch-to-Branch QoS.
Enterprise (CE) Edges principally
control Campus-to-Branch QoS.
Branch-to-Branch Traffic
Campus-to-Branch Traffic
MPLS VPN
Access
Switch
Distribution
Switch
Core
Switch
CE
Router
PE
Routers
CE
Routers
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 simplied DiffServ policies within their cores or might even deploy MPLS
trafc engineering (MPLS TE) to handle congestion scenarios within their backbones. Figure
15-3 summarizes the points where QoS policies can be provisioned within MPLS VPN
architectures.
550
P Routers
CE Router
PE Router
PE Router
CE Router
MPLS VPN
PE-to-CE Queuing/Shaping/LFI
Required
Optional
This design chapter rst examines CE and PE QoS designs; then it overviews MPLS VPN
core QoS options and designs.
551
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-specic 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. Again, this
makes migration easier to manage because link-specic QoS designs do not need to be
changed (although the service policy itself might require minor modication, which is
discussed in more detail shortly).
In addition to FR and ATM for access, some service providers support Ethernet/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 chapter.
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 providers component of the SLA must be considerably
tighter. These SLAs are dened for Cisco-Powered Networks (CPN)IP Multiservice
Service Providers:
552
Enterprise
Campus
Service Provider
Enterprise
Branch
Maximum One-Way
Edge-to-Edge
SP Service-Levels
Latency 60 ms
Jitter 20 ms
Loss 0.5%
553
Call-Signaling
VoIP requires provisioning not only of RTP bearer trafc, but also of Call-Signaling trafc,
which is very lightweight and requires only a moderate amount of guaranteed bandwidth.
Because the service levels applied to Call-Signaling trafc directly affect delay to the dial
tone, it is important from the end users expectations that Call-Signaling be protected.
Service providers might not always offer a suitable class just for call signaling trafc itself,
leading to the question of which other trafc classes Call-Signaling should be mixed with.
On links where serialization is not an issue (> 768 kbps), 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 applications within
the class.
554
When TCP ows are combined with UDP ows within a single service-provider class and
the class experiences congestion, TCP ows continually lower their transmission rates,
potentially giving up their bandwidth to UDP ows that are oblivious to drops. This effect
is called TCP starvation/UDP dominance.
TCP starvation/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 would be observed because WRED (for the most part) manages
congestion only on TCP-based ows.
Granted, it is not always possible to separate TCP-based ows from UDP-based ows, but
it is benecial to be aware of this behavior when making such application-mixing decisions
within a single service-provider class.
555
Verication commands:
show policy
show policy interface
Service providers might re-mark trafc at Layer 3 to indicate whether certain ows are out
of contract. Although this is consistent with DiffServ standards, such as RFC 2597, it might
present minor difculties to enterprises that require consistent end-to-end Layer 3 marking
(typically, for management or accounting purposes). In such cases, the enterprise can
choose to apply re-marking policies as trafc is received back from the service providers
MPLS VPN (on the ingress direction of the enterprises CE).
Class-based marking can be used again because it supports not only access lists for
classication, but also Network-Based Application Recognition (NBAR).
Continuing and expanding on the previous example, the enterprise wants to restore the original markings that it set for Interactive-Video and Call-Signaling. Additionally, it wants to
restore original markings for Oracle trafc (which it originally marked DSCP 25 and is
using TCP port 9000 with) and DLSw+ trafc (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. Example 15-2 shows a
conguration 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.
556
Verication commands:
show policy
show policy interface
557
criterion for Critical Data is DSCP CS6, AF31, or CS3. All other code points are re-marked
to 0. Additionally, out-of-contract AF31 trafc can be marked down within the service
providers MPLS VPN cloud to AF32.
Under such a model, there is no recommended provision for protecting Streaming-Video
(following the Dont mix TCP with UDP guideline), nor is there a service-provider class
suitable for bulk data, which consists of large, nonbursty TCP sessions that could drown out
smaller data transactions. Figure 15-5 shows a re-marking diagram for a three-class serviceprovider model.
Figure 15-5 Three-Class Provider-Edge Model Re-Marking Diagram
Enterprise
Application
DSCP
Routing
CS6
Voice
EF
Interactive-Video
Streaming-Video
AF41
PE Classes
EF
CS5
CS4
Mission-Critical Data
DSCP 25
AF31
Call-Signaling
AF31/CS3
CS5
Transactional Data
AF21
CS3
Network-Management
CS2
CS3
Bulk Data
AF11
Scavenger
CS1
Best-Effort
CS5
Real-Time
35%
CS6
AF31
CS3
Critical
Data
40%
X
Best-Effort
25%
match-all ROUTING
dscp cs6
match-all VOICE
dscp ef
continues
558
559
Verication commands:
show policy
show policy interface
Enterprise
Application
DSCP
Routing
CS6
Voice
EF
PE Classes
EF
Interactive-Video
AF41
CS5
Streaming-Video
CS4
AF21
Mission-Critical Data
DSCP 25
AF31
Call-Signaling
AF31/CS3
CS5
Transactional Data
AF21
CS5
CS6
AF31
CS3
CS3
Network-Management
CS2
Bulk Data
AF11
Scavenger
CS1
Best-Effort
AF21
CS2
Real-Time
35%
Critical
Data
25%
Video
15%
X
Best-Effort
25%
560
561
Verication commands:
show policy
show policy interface
Enterprise
Application
DSCP
Routing
CS6
Voice
EF
PE Classes
EF
Interactive-Video
AF41
CS5
Streaming-Video
CS4
AF21
Mission-Critical Data
DSCP 25
AF31
Call-Signaling
AF31/CS3
CS5
Transactional Data
AF21
CS3
Network-Management
CS2
Bulk Data
AF11
Scavenger
CS1
Best-Effort
CS5
Real-Time
35%
CS6
AF31
CS3
Critical
Data
20%
AF21
CS2
Video
15%
Best-Effort
25%
Example 15-5 shows an example CE conguration for a QoS Baseline enterprise model
mapping (over a dual-T1 link) into a ve-class service-provider model.
562
563
! Scavenger is re-marked to 0
Verication commands:
show policy
show policy interface
564
Verication commands:
show policy
show policy interface
match-any REALTIME
dscp ef
dscp cs5
match-any CRITICAL-DATA
dscp cs6
dscp af31
dscp cs3
565
Verication commands:
show policy
show policy interface
match-any REALTIME
dscp ef
dscp cs5
match-any CRITICAL-DATA
dscp cs6
dscp af31
continues
566
Verication commands:
show policy
show policy interface
Uniform Mode
Short Pipe Mode
Pipe Mode
567
Uniform Mode
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 rst 3 bits of the IP ToS eld (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 eld (MPLS EXP bits are mapped to IP Precedence values on the egress PE).
Figure 15-8 shows the behavior of Uniform Mode MPLS DiffServ tunneling.
Figure 15-8 MPLS DiffServ Uniform Tunneling Mode Operation
Assume a policer re-marks out-of-contract
traffics topmost label to MPLS EXP 0 here.
MPLS VPN
CE Router
PE Router
PE Router
CE Router
P Routers
IPP3/DSCP AF31
Packet initially
marked to IPP3/
DSCO AF31.
MPLS EXP 3
MPLS EXP 0
MPLS EXP 3
MPLS EXP 0
IPP3/DSCP AF31
MPLS EXP 3
IPP3/DSCP AF31
By default, IPP values
will be copied to
Topmost label is
MPLS EXP labels.
marked down by a
policer.
IPP3/DSCP AF31
Topmost label is
popped and EXP value
is copied to underlying
label.
IPP0/DSCP 0
MPLS EXP value
is copied to
IP ToS byte.
The mapping of IP Precedence to MPLS EXP is performed by default on PEs for customerto-provider trafc.
568
However, for provider-to-customer egress trafc (from the MPLS VPN cloud), additional
conguration is required on the PE to achieve mapping of MPLS EXP to IP Precedence.
This is because the nal 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 nal PE router (facing the destination CE). The solution is to copy
the nal 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 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). Figure 15-9 illustrates the policies required
for a single direction for Uniform Mode MPLS DiffServ tunneling. (This policy also would
be required on the complementary interfaces for the reverse trafc direction.)
Figure 15-9 MPLS DiffServ Uniform Tunneling Mode Policies
MPLS VPN
CE Router
(Ingress)
PE Router
(Egress)
PE Router
CE Router
P Routers
IP Precedence values
are copied to MPLS EXP
labels by default.
Example 15-9 shows the conguration for Uniform Mode operation on a PE.
569
!
interface ATM2/0
no ip address
no atm ilmi-keepalive
!
interface ATM2/0.1 point-to-point
description ATM-OC3 TO MPLS VPN CORE
! Link to/from MPLS VPN Core
ip address 20.2.34.4 255.255.255.0
pvc 0/304
vbr-nrt 149760 149760
service-policy input MPLSEXP-TO-QOSGROUP ! MPLS EXP to QoS Group on ingress
!
tag-switching ip
!
!
interface FastEthernet1/0
description FE TO CUSTOMER RED CE
! Link to/from CE
ip vrf forwarding RED
ip address 10.1.45.4 255.255.255.0
service-policy output QOSGROUP-TO-IPP
! QoS Group to IPP on egress to CE
!
Verication commands:
show policy
show policy interface
Of course, additional QoS policies (to these Uniform Mode tunneling policies), such as
queuing or WRED, can be applied on the PE-to-CE egress link (as detailed earlier in the
previous section).
570
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 (as does Pipe Mode).
The outmost label is utilized as the single most meaningful information source as it relates
to the service providers QoS PHB. On MPLS label imposition, the IP classication is not
copied into the outermost labels EXP. Instead, the value for the MPLS EXP is set explicitly
on the ingress PEs ingress interface, according to the service providers administrative
policies.
In the case of any re-marking occurrence within the service providers MPLS VPN cloud,
changes are limited to MPLS EXP re-marking only and are not propagated down to the
underlying IP packets ToS byte. Figure 15-10 shows the operation of Short Pipe Mode
MPLS DiffServ tunneling.
Figure 15-10 MPLS DiffServ Short Pipe Mode Tunneling Operation
Shaded area represents Provider DiffServ domain.
Unshaded areas represent
Customer DiffServ domain.
MPLS VPN
CE Router
PE Router
PE Router
CE Router
P Routers
IPP3/DSCP AF31
Packet initially
marked to IPP3/
DSCO AF31.
MPLS EXP 4
MPLS EXP 0
MPLS EXP 4
MPLS EXP 0
IPP3/DSCP AF31
MPLS EXP 4
IPP3/DSCP AF31
Topmost label is
marked down by a
policer.
IPP3/DSCP AF31
IPP3/DSCP AF31
571
MPLS EXP values can be marked in any way that the provider wants to provide local
signicance. Figure 15-11 shows an example use of MPLS EXP markings to indicate in- or
out-of-contract trafc for a ve-class service-provider model.
Figure 15-11 Five-Class Service Provider Model Short Pipe Mode Re-Marking Diagram
PE Classes
Real-Time In Contract
EF
CS5
CE-to-PE
packets marked
with appropriate
DSCP values to
gain admission
into desired
SP Class.
Real-Time
MPLS EXP 5
Real-Time Out-of-Contract
(Dropped)
CS6
AF31
CS3
Critical
Data
AF21
CS2
Video
AF11
CS1
Bulk Data
MPLS EXP 7
Video In Contract
MPLS EXP 2
Video Out-of-Contract
(Dropped)
Bulk Data In Contract
Bulk Data Out-of-Contract
Best-Effort In Contract
MPLS EXP 3
Best-Effort
Best-Effort Out-of-Contract
MPLS EXP 1
MPLS EXP 6
MPLS EXP 0
MPLS EXP 4
Figure 15-12 shows the ingress PE ingress interface re-marking policies for Short Pipe
Mode, based on the re-marking diagram provided in Figure 15-11. No mapping from
MPLS EXP to QoS Group is needed on the egress PEs ingress interface (as was required
for Uniform Mode) because the MPLS EXP value loses relevance beyond this interface.
Any egress policies on the egress PEs egress interface (facing the customers destination
CE), are based on IP Precedence or DSCP values (which have remained untouched). This
is the main difference between Short Pipe Mode and Pipe Mode.
Figure 15-12 shows the interfaces in which explicit policy conguration is required for
Short Pipe Mode MPLS DiffServ tunneling.
572
MPLS VPN
CE Router
(Ingress)
PE Router
(Egress)
PE Router
CE Router
P Routers
Example 15-10 shows the conguration for Short Pipe Mode operation on a PE. Trafc
received from CEs is marked explicitly (through MPLS EXP values) to reect the service
providers policies. In this example, the customer is given a 3-Mbps CIR through an FE
access link. The provider is using a ve-class model with 35 percent for Real-Time trafc,
20 percent for Critical Data trafc, 15 percent for Video trafc, 5 percent for Bulk Data
trafc, and 25 percent for Best-Effort trafc. On PE-to-CE links (in the egress direction),
queuing and dropping policies based on customer IP DiffServ markings also are
recommended (as was discussed previously).
Example 15-10 PE Conguration for MPLS DiffServ Short Pipe Mode Tunneling
!
class-map match-any REALTIME
match ip dscp ef
match ip dscp cs5
class-map match-any CRITICAL-DATA
match ip dscp cs6
match ip dscp af31
match ip dscp cs3
class-map match-any VIDEO
match ip dscp af21
match ip dscp cs2
class-map match-any BULK-DATA
match ip dscp af11
match ip dscp cs1
!
!
policy-map PE-FIVE-CLASS-SHORT-PIPE-MARKING
573
Example 15-10 PE Conguration for MPLS DiffServ Short Pipe Mode Tunneling (Continued)
class REALTIME
police cir 1050000
conform-action set-mpls-exp-topmost-transmit 5
exceed-action drop
class CRITICAL-DATA
police cir 600000
conform-action set-mpls-exp-topmost-transmit 3
exceed-action set-mpls-exp-topmost-transmit 7
class VIDEO
police cir 450000
conform-action set-mpls-exp-topmost-transmit 2
exceed-action drop
class BULK-DATA
police cir 150000
conform-action set-mpls-exp-topmost-transmit 1
exceed-action set-mpls-exp-topmost-transmit 6
class class-default
police cir 750000
conform-action set-mpls-exp-topmost-transmit 0
exceed-action set-mpls-exp-topmost-transmit 4
! Conforming RT set to 5
! Excess Realtime is dropped
! Conforming BE set to 0
! Excess BE set to 4
!
interface FastEthernet1/0
description FE TO CUSTOMER RED CE
! Link to/from CE
ip vrf forwarding RED
ip address 10.1.12.2 255.255.255.0
service-policy input PE-FIVE-CLASS-SHORT-PIPE-MARKING
!
Verication commands:
show policy
show policy interface
Pipe Mode
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
service providers explicit markings and re-markings, not the enterprise customers IP
DiffServ markings (although these are preserved). As with Short Pipe Mode, any changes
to label markings that occur within the service providers 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 nal label is popped. A temporary placeholder (as used in Uniform Mode operation) is again required. On the nal PE router in
574
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/Discard Class values. Figure 15-13
illustrates the Pipe Mode MPLS DiffServ tunneling operation.
Figure 15-13 MPLS DiffServ Pipe Mode Tunneling Operation
Shaded area represents Provider DiffServ domain.
Unshaded areas represent
Customer DiffServ domain.
MPLS VPN
CE Router
PE Router
PE Router
CE Router
P Routers
IPP3/DSCP AF31
Packet initially
marked to IPP3/
DSCO AF31.
MPLS EXP 4
MPLS EXP 0
MPLS EXP 4
MPLS EXP 0
IPP3/DSCP AF31
MPLS EXP 4
IPP3/DSCP AF31
MPLS EXP values
are set independently Topmost label is
from IPP/DSCP values marked down by a
policer.
IPP3/DSCP AF31
Topmost label is
popped and EXP value
is copied to underlying
label.
IPP3/DSCP AF31
Original customermarked IP ToS
values are
preserved.
QoS Groups and Discard Classes can be combined to provide virtual DiffServ PHB
classication. 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 signicance. However, an exception is found
when WRED is congured to selectively drop based on Discard Class values, in which case
the lower Discard Class values are dropped rst (by default). If no Discard Class value is
assigned explicitly, the value defaults to 0.
Figure 15-14 shows the points where policies are required for Pipe Mode MPLS DiffServ
tunneling.
575
MPLS VPN
CE Router
(Ingress)
PE Router
(Egress)
PE Router
CE Router
P Routers
Figure 15-15 illustrates adapting the ve-class service provider model to Pipe Mode. The
rst set of re-markings shows ingress PE re-marking from DSCP to MPLS EXP values,
depending on whether the trafc is in contract or out-of-contract. The second set of
markings shows how these MPLS EXP values can be mapped to QoS Groups (QG) and
Discard Classes (DC) to provide PHB classication and provisioning on PE-to-CE links
(without altering the IP DSCP values of the tunneled packets).
Example 15-11 shows the conguration for bidirectional re-marking on a PE router to
support Pipe Mode operation. Trafc received from CEs is marked explicitly (through
MPLS EXP values) to reect the service providers policies. Then trafc (traversing in the
opposite direction) received from the MPLS VPN core is mapped to QoS Groups and
Discard Classes so that PE-to-CE PHB egress policies can be performed against provider
re-markings. In this example, the customer has contracted for 3-Mbps service over an FE
link. Hierarchical policies are used to achieve queuing within (3 Mbps) shaping over this
(100-Mbps) link. Additionally, Discard-class WRED is enabled on the output queues so
that dropping decisions are based on Discard-class values (not IP ToS or DSCP values).
Furthermore, Discard-class dropping thresholds are tuned so that Discard-Class 1 (indicating
out-of-contract trafc) is dropped more aggressively than Discard-Class 0 (mimicking
DSCP-based WRED behavior), which is more consistent with RFC 2597 AssuredForwarding PHBs.
576
Figure 15-15 Five-Class Service Provider Model Pipe Mode Ingress and Egress Re-Marking Diagram
Ingress PE
Egress PE
Real-Time In Contract
EF
Real-Time
MPLS EXP 5
CS5
CS6
AF31
CS3
QG5
Real-Time
Real-Time Out-of-Contract
(Dropped)
Critical Data In Contract
Critical
Data
MPLS EXP 3
Critical Data Out-of-Contract
MPLS EXP 7
Video In Contract
AF21
CS2
Video
AF11
CS1
Bulk Data
Best-Effort
MPLS EXP 2
QG3
QG3/DC1
QG2
Video Out-of-Contract
Critical
Data
Video
(Dropped)
Bulk Data In Contract
MPLS EXP 1
Bulk Data Out-of-Contract
MPLS EXP 6
QG1
Bulk Data
QG1/DC1
Best-Effort In Contract
MPLS EXP 0
Best-Effort Out-of-Contract
MPLS EXP 4
QG0
Best-Effort
QG0/DC1
577
Example 15-11 PE Conguration for MPLS DiffServ Pipe Mode Tunneling (Continued)
class-map match-all MPLS-EXP-3
match mpls experimental topmost
class-map match-all MPLS-EXP-2
match mpls experimental topmost
class-map match-all MPLS-EXP-1
match mpls experimental topmost
class-map match-all MPLS-EXP-0
match mpls experimental topmost
!
!
class-map match-all
match qos-group 5
class-map match-all
match qos-group 3
class-map match-all
match qos-group 2
class-map match-all
match qos-group 1
class-map match-all
match qos-group 0
QOSGROUP5
! Matches QoS Group 5
QOSGROUP3
! Matches QoS Group 3
QOSGROUP2
! Matches QoS Group 2
QOSGROUP1
! Matches QoS Group 1
QOSGROUP0
! Matches QoS Group 0
!
!
policy-map PIPE-MARKING
! Sets MPLS EXP Values
class REALTIME
police cir 1050000
conform-action set-mpls-exp-topmost-transmit 5 ! Conforming RT set to 5
exceed-action drop
! Excess Realtime is dropped
class CRITICAL-DATA
police cir 600000
conform-action set-mpls-exp-topmost-transmit 3 ! Critical Data set to 3
exceed-action set-mpls-exp-topmost-transmit 7 ! Excess Critical set 7
class VIDEO
police cir 450000
conform-action set-mpls-exp-topmost-transmit 2 ! Conforming Video set to 2
exceed-action drop
! Excess Video dropped
class BULK-DATA
police cir 150000
conform-action set-mpls-exp-topmost-transmit 1 ! Conforming Bulk set to 1
exceed-action set-mpls-exp-topmost-transmit 6 ! Excess Bulk set to 6
class class-default
police cir 750000
conform-action set-mpls-exp-topmost-transmit 0 ! Conforming BE set to 0
exceed-action set-mpls-exp-topmost-transmit 4
! Excess BE set to 4
!
!
policy-map MPLSEXP-QOSGROUP-DISCARDCLASS
! Maps MPLS EXP to QG/DC values
class MPLS-EXP-5
set qos-group 5
! Conforming Realtime is set to QG 5
class MPLS-EXP-3
set qos-group 3
! Conforming Critical Data is set to QG 3
continues
578
Example 15-11 PE Conguration for MPLS DiffServ Pipe Mode Tunneling (Continued)
class MPLS-EXP-7
set qos-group 3
set discard-class 1
class MPLS-EXP-2
set qos-group 2
class MPLS-EXP-1
set qos-group 1
class MPLS-EXP-6
set qos-group 1
set discard-class 1
class MPLS-EXP-0
set qos-group 0
class MPLS-EXP-4
set qos-group 0
set discard-class 1
!
!
policy-map PE-CE-QUEUING
! Queuing policy for PE to CE link
class QOSGROUP5
priority percent 35
! Voice class gets 35% LLQ
class QOSGROUP3
bandwidth percent 20
! Critical Data class gets 20% CBWFQ
random-detect discard-class-based
! DC-Based WRED is enabled
random-detect discard-class 0
30
40
10
! DC 0 is tuned for WRED
random-detect discard-class 1
20
40
10
! DC 1 is tuned for WRED
class QOSGROUP2
bandwidth percent 15
! Video class gets 15% CBWFQ
class QOSGROUP1
bandwidth percent 5
! Bulk class gets 5% CBWFQ
random-detect discard-class-based
! DC-Based WRED is enabled
random-detect discard-class 0
30
40
10
! DC 0 is tuned for WRED
random-detect discard-class 1
20
40
10
! DC 1 is tuned for WRED
class QOSGROUP0
bandwidth percent 25
! Best Effort class gets 25% CBWFQ
random-detect discard-class-based
! DC-Based WRED is enabled
random-detect discard-class 0
30
40
10
! DC 0 is tuned for WRED
random-detect discard-class 1
20
40
10
! DC 1 is tuned for WRED
!
!
policy-map PE-CE-SHAPING-QUEUING
class class-default
shape average 3000000
service-policy PE-CE-QUEUING
!
interface ATM2/0
no ip address
no atm ilmi-keepalive
!
579
Example 15-11 PE Conguration for MPLS DiffServ Pipe Mode Tunneling (Continued)
interface ATM2/0.1 point-to-point
description ATM-OC3 TO MPLS VPN CORE
! Link to/from MPLS VPN Core
ip address 20.2.34.4 255.255.255.0
pvc 0/304
vbr-nrt 149760 149760
service-policy input MPLSEXP-QOSGROUP-DISCARDCLASS ! MPLS EXP to QG/DC
!
tag-switching ip
!
!
interface FastEthernet1/0
description FE TO CUSTOMER RED CE
! Link to/from CE
ip vrf forwarding RED
ip address 10.1.12.2 255.255.255.0
! Pipe marking policy
service-policy input PIPE-MARKING
service-policy output PE-CE-SHAPING-QUEUING
! Shaping/Queuing policy
!
Verication commands:
show policy
show policy interface
580
Figure 15-16 MPLS DiffServ Pipe Mode with an Explicit Null LSP Tunneling Operation
Shaded area represents Provider DiffServ domain.
Unshaded areas represent
Customer DiffServ domain.
MPLS VPN
CE Router
PE Router
PE Router
CE Router
P Routers
IPP3/DSCP AF31
Packet initially
marked to IPP3/
DSCO AF31.
MPLS EXP 4
IPP3/DSCP AF31
MPLS EXP 0
MPLS EXP 0
MPLS EXP 4
MPLS EXP values
are set independently
IPP3/DSCP AF31
from IPP/DSCP values
on the managed CE
Topmost label is
via an explicit null LSP. marked down by a
policer.
IPP3/DSCP AF31
Topmost label is
popped and EXP value
is copied to underlying
label.
IPP3/DSCP AF31
Original customermarked IP ToS
values are
preserved.
Figure 15-17 shows the points where policies are required for Pipe Mode with Explicit Null
LSP MPLS DiffServ tunneling.
As noted, PE congurations remain the same as with normal Pipe Mode, with the exception
that ingress MPLS EXP marking policies have been removed. These policies now are set
on the managed CE, as shown in Example 15-12. As with Example 15-13, the provider has
contracted for a CIR of 3 Mbps in a ve-class model. All ingress trafc is policed on the
customer edge of the CE and is marked (through MPLS EXP values) to indicate whether it
is in contract or out-of-contract. Then an Explicit Null LSP is pushed onto the packet to
carry these MPLS EXP markings from the CE to the PE. Optionally, queuing policies can
be added on the CE-to-PE link, but for simplicity, these have been omitted from this
example because they already have been covered.
581
Figure 15-17 MPLS DiffServ Pipe Mode with an Explicit Null LSP Tunneling Policies
MPLS VPN
(Ingress)
PE Router
CE Router
(Egress)
PE Router
CE Router
P Routers
Example 15-12 Managed CE Conguration for MPLS DiffServ Pipe Mode with an Explicit Null LSP
Tunneling
!
class-map match-any REALTIME
match ip dscp ef
match ip dscp cs5
class-map match-any CRITICAL-DATA
match ip dscp cs6
match ip dscp af31
match ip dscp cs3
class-map match-any VIDEO
match ip dscp af21
match ip dscp cs2
class-map match-any BULK-DATA
match ip dscp af11
match ip dscp cs1
!
!
policy-map PIPE-EXPLICIT-NULL-MARKING
class REALTIME
police cir 1050000
conform-action set-mpls-exp-topmost-transmit 5
exceed-action drop
! Conforming RT set to 5
! Excess Realtime is dropped
continues
582
Example 15-12 Managed CE Conguration for MPLS DiffServ Pipe Mode with an Explicit Null LSP
Tunneling (Continued)
class CRITICAL-DATA
police cir 600000
conform-action set-mpls-exp-topmost-transmit 3
exceed-action set-mpls-exp-topmost-transmit 7
class VIDEO
police cir 450000
conform-action set-mpls-exp-topmost-transmit 2
exceed-action drop
class BULK-DATA
police cir 150000
conform-action set-mpls-exp-topmost-transmit 1
exceed-action set-mpls-exp-topmost-transmit 6
class class-default
police cir 750000
conform-action set-mpls-exp-topmost-transmit 0
exceed-action set-mpls-exp-topmost-transmit 4
!
!
interface FastEthernet0/0
description FE to Customer Network
ip address 10.1.1.1 255.255.255.0
service-policy input PIPE-EXPLICIT-NULL-MARKING
!
!
interface FastEthernet0/1
description FE TO PE
ip address 10.1.12.1 255.255.255.0
duplex auto
speed auto
mpls ip encapsulate explicit-null
!
! Conforming BE set to 0
! Excess BE set to 4
! Link to/from PE
Verication commands:
show policy
show policy interface
583
584
Figure 15-18 Five-Class Provider-Edge Model Short Pipe/Pipe Mode Mapping to Three-Class Provider-Core
Model Example
Edge DiffServ Classes
EF
Real-Time
MPLS EXP 5
CS5
CS6
AF31
CS3
EXP5
Real-Time Out-of-Contract
(Dropped)
Critical Data In Contract
Critical
Data
MPLS EXP 3
Critical Data Out-of-Contract
MPLS EXP 7
EXP3
EXP7
Video In Contract
AF21
CS2
Video
MPLS EXP 2
EXP2
Video Out-of-Contract
Bulk Data
MPLS EXP 1
Bulk Data Out-of-Contract
MPLS EXP 6
EXP1
EXP6
Best-Effort In Contract
Core
Critical
Data
(Dropped)
Bulk Data In Contract
AF11
CS1
Core
Real-Time
Best-Effort
MPLS EXP 0
EXP0
Best-Effort Out-of-Contract
MPLS EXP 4
Core
Best-Effort
EXP4
Core Real-TimeThis class targets applications such as Voice and InteractiveVideo, which require low loss (less than 0.25 percent), low delay, and low jitter
(typically 5 ms within the backbone), and have a dened availability. This class also
supports per-ow sequence preservation. This class always should be engineered for
the worst-case delay, to support Real-Time trafc. Excess trafc in this class typically
is dropped. This class should be associated with MPLS EXP 5 with a PQ, to ensure
that the delay and jitter contracts are met. Between 25 and 35 percent of link capacity
should be allocated to the PQ. WRED typically is not required on this queue.
585
Core Best-EffortThis class represents all other customer trafc that has not been
classied as Real-Time or Critical Data. It is dened in terms of a loss rate with
availability; throughput is derived from loss. Delay and jitter are not important for this
service and are not dened.
Verication commands:
show policy
show policy interface
586
Within these eight queues, MDRR maintains a priority queue, which can be serviced in
strict priority or alternate priority.
With MDRR strict priority, the priority queue always is serviced exhaustively, as long as
there are packets in this queue. An important distinction between MDRR priority queuing
and LLQ is that MDRR priority queuing does not have an implicit policer. However, the
MQC syntax does support conguring MDRR strict priority in conjunction with classbased policing to enforce a limit on the amount of trafc that can be given strict priority.
To prevent starvation scenarios that could exist with the lack of a policer, an alternative to
MDRR strict-priority servicing exists in the option of MDRR alternate-priority queuing.
When alternate-priority queuing is congured, the priority queue is serviced alternately
with all other queues. For example, one priority packet is serviced, followed by a packet
from any one of the other queues (depending on how they are congured). Then another
priority packet is serviced and again is followed by a nonpriority packet. In this manner,
priority servicing does not starve other trafc as strict-priority queuing could.
MDRR can be applied to an inbound interface or an outbound interface.
Example 15-14 shows how to adapt the previous three-class provider-core policy to a Cisco
12000 GSR router. In this example, the LLQ is policed to approximately 35 percent of the
Packet-over-SONET (POS) line rate of OC3 (155 Mbps). Because the Cisco 12000 GSR
does not support WFQ, no explicit conguration is required for the Best-Effort class.
Example 15-14 Three-Class Provider Core Model Adapted for a Cisco 12000 GSR with Line Card 3
Example
!
class-map match-all CORE-REALTIME
match mpls experimental 5
class-map match-all CORE-CRITICAL-DATA
match mpls experimental 3
match mpls experimental 7
match mpls experimental 2
match mpls experimental 1
match mpls experimental 6
!
!
policy-map CORE-THREE-CLASS-SP-MODEL-GSR
class CORE-REALTIME
! Voice is explicitly policed to 33%
police cir 54248000 bc 4470 be 4470
conform-action transmit
exceed-action drop
priority
! Voice is assigned strict-priority MDRR
class CORE-CRITICAL-DATA
bandwidth percent 40
!
! WFQ is not supported so no default-class polices are required
!
587
Example 15-14 Three-Class Provider Core Model Adapted for a Cisco 12000 GSR with Line Card 3
Example (Continued)
interface POS0/0
ip address 10.131.160.233 255.255.255.252
no ip directed-broadcast
tag-switching ip
crc 16
service-policy output CORE-THREE-CLASS-SP-MODEL-GSR
!
NOTE
The implementation of the priority command on the Cisco 12000 series differs from the
implementation on other routers running Cisco IOS Software. On this platform, the priority
trafc is not limited to the congured kbps value during periods of congestion. Thus, you
also must congure the police command to limit how much bandwidth a priority class can
use and to ensure adequate bandwidth for other classes. At this time, the police command
is supported on only Engine 3 line cards. On the other engine line cards, only class-default
is allowed when you congure a priority class.
Verication commands:
show policy
show policy interface
Replaces the need to manually congure the network devices to set up explicit routes.
Instead, you can rely on the MPLS trafc engineering functionality to understand the
backbone topology and the automated signaling process.
588
Accounts for link bandwidth and for the size of the trafc ow when determining
explicit routes across the backbone.
MPLS TE automatically establishes and maintains a tunnel across the backbone, using
RSVP. The path used by a given tunnel at any point in time is determined based on the
tunnel resource requirements and network resources, such as bandwidth.
Available resources are ooded through extensions to a link statebased Interior Gateway
Protocol (IGP), such as OSPF or IS-IS.
Tunnel paths are calculated at the tunnel head based on a t between required and available
resources (constraint-based routing). The IGP automatically routes the trafc into these
tunnels. Typically, a packet crossing the MPLS TE backbone travels on a single tunnel that
connects the ingress point to the egress point.
MPLS TE is built on the following Cisco IOS mechanisms:
Label-switched path (LSP) tunnels, which are signaled through RSVP, with trafc
engineering extensions. LSP tunnels are represented as tunnel interfaces, have a
congured destination, and are unidirectional.
A link-state IGP (such as OSPF or IS-IS) with extensions for the global ooding of
resource information, and extensions for the automatic routing of trafc onto LSP
tunnels, as appropriate.
An MPLS TE path-calculation module that determines paths to use for LSP tunnels.
An MPLS TE link-management module that does link admission and bookkeeping of
the resource information to be ooded.
One approach to engineer a backbone is to dene a mesh of tunnels from every ingress
device to every egress device. The IGP, operating at an ingress device, determines which
trafc should go to which egress device, and steers that trafc into the tunnel from ingress
to egress. The MPLS trafc-engineering path-calculation and signaling modules determine
the path taken by the LSP tunnel, subject to resource availability and the dynamic state of
the network. For each tunnel, counts of packets and bytes sent are kept.
Sometimes a ow is so large that it cannot t over a single link, so it cannot be carried by
a single tunnel. In this case, multiple tunnels between a given ingress and egress can be
congured, and the ow is load-shared among them.
Basic MPLS TE
Basic MPLS TE conguration requires you to do the following:
589
Enable MPLS TE on every interface that might be part of a tunnel, and congure the
amount of bandwidth that can be reserved (through RSVP) for all tunnels traversing
the link:
Router(config)#mpls
mpls traffic-eng tunnels
Router(config)#interface POS5/0
Router(config-if)#mpls
mpls traffic-eng tunnels
Router(config-if)#ip
ip rsvp bandwidth 77500 77500
Congure a link-state Interior Gateway Protocol (IGP) for MPLS TE, either OSPF or
IS-IS:
OSPF
Router(config)#router
router ospf 100
Router(config-router)# mpls traffic-eng router-id loopback 0
Router(config-router)# mpls traffic-eng area 0
IS-IS
Router(config)#router
router isis
Router(config-router)#net 49.0000.0000.0000.0010.00
Router(config-router)#metric-style
metric-style wide
Router(config-router)#mpls
mpls traffic-eng level-1
Router(config-router)#mpls
mpls traffic-eng router-id loopback 0
Dene a tunnel interface congured with MPLS TE, with an amount of bandwidth
that can be reserved (through RSVP) for the tunnel:
Router(config)#interface
interface Tunnel0
Router(config-if)# description BLUE-TUNNEL (PE1=>PE2)
Router(config-if)# ip unnumbered loopback 0
Router(config-if)# tunnel destination 20.2.2.2
Router(config-if)# tunnel mode mpls traffic-eng
Router(config-if)# tunnel mpls traffic-eng bandwidth 77500
590
BLUE-
Select a forwarding option to direct trafc down the tunnelstatic routes, policy
routing, or AutoRoute:
Static routes
Router(config)#ip
ip route 16.16.16.16 255.255.255.255 Tunnel0
Policy-based routing
Router(config)#interface FastEthernet 1/0
Router(config-if)#ip
ip policy route-map TUNNEL-ASSIGNMENT
Router(config-if)#exit
Router(config)#route-map
route-map TUNNEL-ASSIGNMENT
Router(config-route-map)#match
match ip address 100
Router(config-route-map)#set
set interface Tunnel 0
Router(config-route-map)#exit
Router(config)#access-list 100 permit ip any 10.2.2.0 0.0.0.255
NOTE
As stated at the opening of the chapter, it is simply beyond the scope of this book to go into
detail on MPLS trafc engineering. Many MPLS TE features, such as attribute ags,
afnity, administrative weights, ooding thresholds, and FastReroute, have been omitted
from this overview. For a comprehensive technical discussion on these and other MPLS TE
features and operation, refer to the Cisco Press book Trafc Engineering with MPLS, by
Eric Osborne and Ajay Simha.
Two examples of QoS-related MPLS TE scenarios are presented in this chapter. The rst is
the use of MPLS per-VPN trafc engineering; the second is the use of MPLS DiffServ
trafc engineering (MPLS DS-TE).
591
MPLS Per-VPN TE
MPLS VPNs provide the route isolation necessary for data privacy and support of private
IP address allocation overlapping, while RSVP-signaled MPLS-TE provides optimal path
selection, per-VPN SLAs, and path resiliency.
The notion of integrating these two MPLS applications is pretty straightforward. Where it
gets interesting is in the actual binding process of an MPLS VPN to the TE tunnel. Today
this can be achieved by taking advantage of next-hop route recursion at the PE; however,
this is a less than elegant interim solution. Cisco IOS innovations in policy-based routing
(PBR) and QoS-based routing (QBR) will allow for a more scalable way to integrate MPLS
VPN and TE in the near future.
In this simplied example scenario, the service provider has Packet over SONET (POS)
links from each PE to the core, and also direct PE-to-PE POS links for geographically
adjacent PEs. Furthermore, the service provider has two customers, Blue and Red.
Customer Blue has contracted with the provider for a premium service so that Blue trafc
that is destined for geographically adjacent CEs is tunneled over the direct PE-to-PE links.
However, Red trafc always is switched through the MPLS core, even when there is a
shorter path to the destination CEs through the direct PE-to-PE links. Figure 15-19
illustrates the desired operation of this scenario. Because MPLS TE is unidirectional,
separate tunnels would be required for the same behavior in the return direction.
Figure 15-19 MPLS Per-VPN TE Operation Example
Customer Blue traffic is sent over the direct
link to the adjacent PE (not through core).
Blue CE Router
(Ingress)
PE Router
(Egress)
PE Router
Red CE Router
Red CE Router
P Routers
MPLS VPN
Core
Blue CE Router
592
Figure 15-20 zooms in on the relevant subsection of the previous diagram and provides
specic addressing detail for this example.
Figure 15-20 MPLS Per-VPN TE Example Details
Customer Blue traffic is sent over the direct
link to the adjacent PE (not through core).
Blue CE1 Router
10.1.1.0/24
10.20.1.0/30
PE1
PE2
Tunnel 0
20.1.12.0/30
15.1.1.0/24
15.20.1.0/30
15.2.2.0/24
Lo: 20.2.2.2
Lo: 20.1.1.1/32
20
.1
.2
3.
0/
30
30
0/
3.
.1
.1
20
15.20.2.0/30
Tunnel 1
Lo: 20.3.3.3
P Router
The conguration for this example of MPLS per-VPN TE spans three routers: PE1 conguration (see Example 15-15), PE2 conguration (see Example 15-16), and the P-router conguration (see Example 15-17).
To achieve the desired behavior of forcing Customer Blues trafc down the shorter MPLS
tunnel and forcing Customer Reds trafc down the longer tunnel, a combination of static
and BGP policy-based routing is used (relying on recursive routing on each PE).
When Customer Blues geographically adjacent CE networks are received at the PE, BGP
directs these prexes to be processed by the TUNNEL-ASSIGNMENT route map. This
route map matches Blues prexes against access-list 1 and sets the BGP next-hop attribute
to the ctitious route of 16.16.16.16. Similarly, Customer Reds prexes are matched
against access-list 2 and have their BGP next-hop attribute set to the ctitious route of
17.17.17.17. Then each of these ctitious routes is resolved through static-routing
statements that direct the ow to the desired MPLS tunnel interface. This is detailed in
Example 15-15.
Example 15-15 PE1 MPLS Per-VPN TE Example Conguration
!
hostname PE1
!
593
continues
594
!
interface POS6/0
description PE1=>P-Router (Core) POS Link
ip address 20.1.13.1 255.255.255.252
mpls traffic-eng tunnels
! MPLS TE enabled on int
tag-switching ip
! MPLS enabled on int
ip rsvp bandwidth 77500 77500
! RSVP enabled on int for 77.5 Mbps
!
router ospf 100
mpls traffic-eng router-id Loopback0
! MPLS TE RID
mpls traffic-eng area 0
! Enables OSPF area 0 for MPLS TE
log-adjacency-changes
redistribute connected subnets
network 20.1.12.0 0.0.0.3 area 0
network 20.1.13.0 0.0.0.3 area 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
redistribute connected
neighbor 20.2.2.2 remote-as 100
neighbor 20.2.2.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 20.2.2.2 activate
! MPLS VPN neighbor (PE2)
neighbor 20.2.2.2 send-community extended
neighbor 20.2.2.2 route-map TUNNEL-ASSIGNMENT in ! Applies BGP PBR
exit-address-family
!
address-family ipv4 vrf BLUE
redistribute connected
neighbor 10.20.1.1 remote-as 10
! EBGP peer with Customer Blue CE1
neighbor 10.20.1.1 activate
neighbor 10.20.1.1 default-originate
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4 vrf RED
redistribute connected
neighbor 15.20.1.1 remote-as 15
! EBGP peer with Customer Red CE1
neighbor 15.20.1.1 activate
neighbor 15.20.1.1 default-originate
no auto-summary
no synchronization
exit-address-family
595
Adjacent
Adjacent
Adjacent
Adjacent
Customer
Customer
Customer
Customer
Blue subnets
Blue subnets
Red subnets
Red subnets
Because all tunnels are unidirectional, the same logic is applied in the reverse direction,
where the ctitious addresses are 18.18.18.18 (for Blue) and 19.19.19.19 (for Red), as
detailed in Example 15-16.
Example 15-16 PE2 MPLS Per-VPN TE Example Conguration
!
hostname PE2
!
!
ip vrf BLUE
rd 100:1
route-target
route-target
!
ip vrf RED
rd 150:1
route-target
route-target
!
continues
596
597
! MPLS TE RID
! Enables OSPF area 0 for MPLS TE
!
router bgp 100
no synchronization
bgp log-neighbor-changes
redistribute connected
neighbor 20.1.1.1 remote-as 100
neighbor 20.1.1.1 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 20.1.1.1 activate
! MPLS VPN neighbor (PE1)
neighbor 20.1.1.1 send-community extended
neighbor 20.1.1.1 route-map TUNNEL-ASSIGNMENT in
! Applies BGP PBR
exit-address-family
!
address-family ipv4 vrf BLUE
redistribute connected
neighbor 10.20.2.1 remote-as 10
! EBGP peer with Customer Blue CE2
neighbor 10.20.2.1 activate
neighbor 10.20.2.1 default-originate
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4 vrf RED
redistribute connected
neighbor 15.20.2.1 remote-as 15
! EBGP peer with Customer Red CE2
neighbor 15.20.2.1 activate
neighbor 15.20.2.1 default-originate
no auto-summary
no synchronization
exit-address-family
!
ip classless
ip route 18.18.18.18 255.255.255.255 Tunnel0 ! Static Route for BLUE Tunnel
ip route 19.19.19.19 255.255.255.255 Tunnel1 ! Static Route for RED Tunnel
!
ip bgp-community new-format
!
ip explicit-path name BLUE-TUNNEL enable
! Explicit Path for BLUE Tunnel
next-address 20.1.12.1
! Direct to PE1
!
ip explicit-path name RED-TUNNEL enable
! Explicit Path for RED Tunnel
next-address 20.1.23.2
! First to P-Router (Core)
next-address 20.1.13.1
! Then to PE1
continues
598
!
!
!
!
Adjacent
Adjacent
Adjacent
Adjacent
Customer
Customer
Customer
Customer
Blue subnets
Blue subnets
Red subnets
Red subnets
599
! MPLS TE RID
! Enables OSPF area 0 for MPLS TE
Verication commands:
600
Tunnel
Yes
Yes
No
No
Operational
Yes
Yes
Yes
Yes
601
continues
602
Example 15-23 Solution Verication with ping vrf and show interface tunnel Commands (Continued)
Sending 5, 100-byte ICMP Echos to 15.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
PE1#ping vrf RED 15.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 15.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
PE1#ping vrf RED 15.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 15.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
PE1#
PE1#show interface tunnel 0
Tunnel0 is up, line protocol is up
Hardware is Tunnel
Description: BLUE-TUNNEL (PE1=>PE2)
Interface is unnumbered. Using address of Loopback0 (20.1.1.1)
MTU 1514 bytes, BW 9 Kbit, DLY 500000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source UNKNOWN, destination 20.2.2.2
Tunnel protocol/transport Label Switching, key disabled, sequencing disabled
Checksumming of packets disabled, fast tunneling enabled
Last input never, output never, output hang never
Last clearing of "show interface" counters 00:00:28
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
5 packets output,
output 500 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
PE1#
PE1#show interface tunnel 1
Tunnel1 is up, line protocol is up
Hardware is Tunnel
Description: RED-TUNNEL (PE1=>P=>PE2)
Interface is unnumbered. Using address of Loopback0 (20.1.1.1)
MTU 1514 bytes, BW 9 Kbit, DLY 500000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source UNKNOWN, destination 20.2.2.2
Tunnel protocol/transport Label Switching, key disabled, sequencing disabled
Checksumming of packets disabled, fast tunneling enabled
603
Example 15-23 Solution Verication with ping vrf and show interface tunnel Commands (Continued)
Last input never, output never, output hang never
Last clearing of "show interface" counters 00:00:37
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
15 packets output,
output 1500 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
PE1#
MPLS DS-TE
MPLS trafc engineering allows constraint-based routing (CBR) of IP trafc. One of the
constraints satised by CBR is the availability of required bandwidth over a selected path.
DiffServ-aware trafc engineering extends MPLS trafc engineering to enable you to
perform constraint-based routing of guaranteed trafc, which satises a more restrictive
bandwidth constraint than that required for regular trafc. The more restrictive bandwidth
is termed a subpool, and the regular TE tunnel bandwidth is called the global pool (the
subpool is a portion of the global pool). This capability to satisfy a more restrictive
bandwidth constraint translates into a capability to achieve higher quality of service
performance (in terms of delay, jitter, or loss) for the guaranteed trafc.
For example, DS-TE can be used to ensure that trafc is routed over the network so that,
on every link, there is never more than 35 percent (or any assigned percentage) of the link
capacity of guaranteed trafc (for example, voice), while there can be up to 100 percent of
the link capacity of regular trafc. Assuming that QoS mechanisms also are used on every
link to queue guaranteed trafc separately from regular trafc, it then becomes possible to
enforce separate overbooking ratios for guaranteed and regular trafc.
Also, through the capability to enforce a maximum percentage of guaranteed trafc on
any link, the network administrator directly can control the end-to-end QoS performance
parameters without having to rely on overengineering or on expected shortest-path routing
behavior. This is essential for transport of applications that have very high QoS requirements (such as real-time voice, virtual IP leased line, and bandwidth trading), where
overengineering cannot be assumed everywhere in the network.
DS-TE involves extending the IGP link-state protocols so that the available subpool bandwidth at each preemption level is advertised in addition to the available global pool bandwidth
at each preemption level. DS-TE modies constraint-based routing to take this more complex advertised information into account during path computation.
604
Lower the priority (remember lower is better) of the MPLS DS-TE tunnel so that it
can preempt reservations, as needed:
PE1(config)#interface tunnel 0
PE1(config-if)# tunnel mpls traffic-eng priority 0 0
Tighten down on the MPLS DS-TE headend tunnel admission control criteria (via
static routes and/or policy-based routing).
605
A simplifying assumption was made in the previous scenario (MPLS per-VPN TE) that
each customers subnets would not overlap. In the real world, however, this is an unlikely
assumption. Therefore, in this second MPLS TE example, additional ratcheting has been
done on the tunnel headends to allow only Voice trafc from Customer Blue to traverse the
shorter tunnel, despite the fact that, in this example, both Customer Blue and Customer Red
are using the same private address space. Voice trafc is identied as destined for the voice
VLAN subnets of the CE routers (10.1.10x.0/24), as shown in Figure 15-21.
Figure 15-21 MPLS DS-TE Example Details
Customer Blue traffic is sent over the direct
link to the adjacent PE (not through core).
10.1.1.0/24
10.1.101.0/24
Tunnel 0
PE1
PE2
20.1.12.0/30
10.20.1.0/30
Lo: 20.1.1.1/32
Lo: 20.2.2.2
0/
20
30
.1
0/
.2
3.
3.
.1
10.2.2.0/24
10.2.102.0/24
.1
20
Tunnel 1
10.20.2.0/30
10.2.2.0/24
10.2.102.0/24
30
10.1.1.0/24
10.1.101.0/24
Lo: 20.3.3.3
P Router
In addition to identifying Voice trafc by destination subnet address, the BGP VPNv4 route
targets must match Customer Blues assigned route target (100:1). In this manner, only
Customer Blue, which has purchased a premium service, gains access to the direct DS-TE
tunnel to geographically adjacent CEs (despite the fact that Customer Red is using identical
private IP addresses).
NOTE
Only standard IP Extended Community lists (numbered 1 to 99) support the route target
(RT) keyword and functionality.
Additionally, very basic core DiffServ policies are applied to the POS links connecting PE
and P routers. A simplifying assumption is made that trafc has been marked correctly on
606
the CEs and is being mapped to MPLS EXP values using the standard (default) DSCPto-EXP mapping (for example, DSCP EF is mapped to MPLS EXP 5). For simplicity, no
policers are shown in Example 15-24; these are reintroduced, however, in the nal case
study example at the end of this chapter.
As with the previous example, the conguration for this MPLS DS-TE example spans three
routers: PE1 conguration (see Example 15-24), PE2 conguration (see Example 15-25),
and the P router (see Example 15-26) conguration.
Example 15-24 PE1 MPLS DS-TE Example Conguration
!
hostname PE1
!
!
ip vrf BLUE
! BLUE MPLS VPN definition
rd 100:1
route-target export 100:1
route-target import 100:1
!
ip vrf RED
! RED MPLS VPN definition
rd 150:1
route-target export 150:1
route-target import 150:1
!
ip cef
! IP CEF is required for MPLS and MPLS TE
mpls ldp logging neighbor-changes
mpls traffic-eng tunnels
! MPLS TE is enabled globally
!
!
class-map match-all CORE-REALTIME
match mpls experimental topmost 5
class-map match-all CORE-CRITICAL-DATA
match mpls experimental topmost 6
match mpls experimental topmost 3
!
!
policy-map CORE-THREE-CLASS-SP-MODEL
! Per-link scheduling policy
class CORE-REALTIME
priority percent 35
class CORE-CRITICAL-DATA
bandwidth percent 55
class class-default
fair-queue
!
!
interface Loopback0
! Loopback interface for MPLS TE RID
ip address 20.1.1.1 255.255.255.255
!
interface Tunnel0
description TUNNEL0 (PE1=>PE2)
ip unnumbered Loopback0
tunnel destination 20.2.2.2
607
mode
mpls
mpls
mpls
mpls traffic-eng
traffic-eng priority 0 0
! Lower value is preferred
traffic-eng bandwidth sub-pool 54250
! MPLS DS-TE sub-pool
traffic-eng path-option 1 explicit name TUNNEL0
!
interface Tunnel1
description TUNNEL0 (PE1=>P=>PE2)
ip unnumbered Loopback0
tunnel destination 20.2.2.2
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng priority 7 7
tunnel mpls traffic-eng bandwidth 77500
tunnel mpls traffic-eng path-option 1 explicit name TUNNEL1
!
!
interface FastEthernet1/0
description FE to Customer Blue CE1
ip vrf forwarding BLUE
! Interface to Blue CE1
ip address 10.20.1.2 255.255.255.252
! Same IP address as Red
!
interface FastEthernet1/1
description FE to Customer Red CE1
ip vrf forwarding RED
! Interface to Red CE1
ip address 10.20.1.2 255.255.255.252
! Same IP address as Blue
!
interface POS5/0
description PE1=>PE2 POS Link
ip address 20.1.12.1 255.255.255.252
max-reserved-bandwidth 100
service-policy output CORE-THREE-CLASS-SP-MODEL
! Scheduling applied
mpls traffic-eng tunnels
tag-switching ip
ip rsvp bandwidth 77500 sub-pool 54250
! Sub-pool defined on int
!
interface POS6/0
description PE1=>P-Router (Core) POS Link
ip address 20.1.13.1 255.255.255.252
max-reserved-bandwidth 100
service-policy output CORE-THREE-CLASS-SP-MODEL
! Scheduling applied
mpls traffic-eng tunnels
tag-switching ip
ip rsvp bandwidth 77500 77500
! No change to PE-P RSVP
!
router ospf 100
mpls traffic-eng router-id Loopback0
mpls traffic-eng area 0
log-adjacency-changes
redistribute connected subnets
network 20.1.12.0 0.0.0.3 area 0
network 20.1.13.0 0.0.0.3 area 0
continues
608
609
continues
610
611
continues
612
!
!
!
!
!
!
Identifies
Identifies
Identifies
Identifies
Identifies
Identifies
(Blue) Voice-VLAN
(Blue) Data-VLAN
(Blue) PE-CE link
(Red) Voice-VLAN
(Red) Data-VLAN
(Red) PE-CE Link
A P routers conguration for this MPLS DS-TE example is shown in Example 15-26 to
highlight the MPLS DS-TE congurations required in the core.
Example 15-26 P-Router MPLS DS-TE Example Conguration
!
hostname P-Router
!
!
ip cef
! IP CEF is required for MPLS and MPLS TE
mpls ldp logging neighbor-changes
mpls traffic-eng tunnels
! MPLS TE is enabled globally
!
!
class-map match-all CORE-REALTIME
match mpls experimental topmost 5
613
Verication commands:
614
615
Example 15-27 Verication of Subpool and Global-Pool RSVP Reservations for DS-TE (Continued)
bw[0]:
bw[1]:
bw[2]:
bw[3]:
bw[4]:
bw[5]:
bw[6]:
bw[7]:
Total Allocated
BW (kbps)
--------------0
0
0
0
0
0
0
77500
Global Pool
Reservable
BW (kbps)
----------77500
77500
77500
77500
77500
77500
77500
0
Sub Pool
Reservable
BW (kbps)
---------0
0
0
0
0
0
0
0
PE1#
616
617
Figure 15-22 Case Study: MPLS VPN QoS Design Example Details
MPLS DS-TE policies:
Customer Blue Voice traffic is sent over direct link
to adjacent PEs (not through core).
Five-Class CE-PE
Mapping Policies
ABCs CE1 Router
(SP customer class: Blue)
10.20.1.0/30
10.1.1.0/24
10.1.101.0/24
PE1
PE2
Tunnel 0
10.20.2.0/30
10.2.2.0/24
10.2.102.0/24
20.1.12.0/30
10.20.1.0/30
DSCP-to-CoS
Remapping Policy
30
0/
3.
.1
.1
20
Red CE1
Router
Lo: 20.1.1.1/32
Lo: 20.2.2.2
20
.1
.2
3.
0/
30
10.1.1.0/24
10.1.101.0/24
Tunnel 1
Short-Pipe Mode
ingress policies:
MPLS EXP values
are explicitly set
by service provider.
10.20.2.0/30
Red CE2 Router
10.2.2.0/24
10.2.102.0/24
Lo: 20.3.3.3
P Router
On ingress, SP XYZ applies a ve-class short pipe MPLS DiffServ tunneling mode policer
to identify (through MPLS EXP values) trafc that is in contract or out-of-contract.
DiffServ policies are applied throughout the MPLS VPN core, and MPLS DS-TE also is
provisioned for voice trafc to geographically adjacent CEs. On egress, SP XYZ applies a
ve-class provider-edge model, which is based on the customers DiffServ markings. In this
example, company ABC, Inc., ts service provider XYZs customer Blue prole.
The conguration for this example spans six routers: Blue-CE1, Blue-CE2, Red-CE1,
Red-CE2, PE1, PE2, and P router. However, because CE congurations are virtually identical, only one is presented here (Blue-CE1see Example 15-29), along with the
congurations for PE1 (see Example 15-30), PE2 (see Example 15-31), and the P router
(see Example 15-32).
Example 15-29 Blue-CE1 Case Study MPLS VPN QoS Design Example
!
hostname CE1-BLUE
!
ip cef
!
class-map match-all ROUTING
match ip dscp cs6
continues
618
Example 15-29 Blue-CE1 Case Study MPLS VPN QoS Design Example (Continued)
class-map match-all VOICE
match ip dscp ef
class-map match-all INTERACTIVE-VIDEO
match ip dscp af41
class-map match-all STREAMING-VIDEO
match ip dscp cs4
class-map match-all MISSION-CRITICAL-DATA
match ip dscp 25
class-map match-any CALL-SIGNALING
match ip dscp af31
match ip dscp cs3
class-map match-all TRANSACTIONAL-DATA
match ip dscp af21
class-map match-all BULK-DATA
match ip dscp af11
class-map match-all NETWORK-MANAGEMENT
match ip dscp cs2
class-map match-all SCAVENGER
match ip dscp cs1
!
!
policy-map CE-FIVE-CLASS-SP-MODEL
class ROUTING
bandwidth percent 3 ! Routing is assigned (by default) to Critical SP class
class VOICE
priority percent 18 ! Voice is admitted to Realtime SP class
class INTERACTIVE-VIDEO
priority percent 15
set ip dscp cs5
! Interactive-Video is assigned to the Realtime SP class
class STREAMING-VIDEO
bandwidth percent 13
set ip dscp af21
! Streaming-Video is assigned to the Video SP class
class CALL-SIGNALING
priority percent 2
! Call-Signaling gets LLQ for this scenario
set ip dscp cs5
! Call-Signaling is assigned to the Realtime SP class
class MISSION-CRITICAL-DATA
bandwidth percent 12
random-detect
set ip dscp af31
! MC Data is assigned to the Critical SP class
class TRANSACTIONAL-DATA
bandwidth percent 5
random-detect
set ip dscp cs3
! Transactional Data is assigned to Critical SP class
class NETWORK-MANAGEMENT
bandwidth percent 2 ! Net Mgmt (mainly UDP) is admitted to Video SP class
class BULK-DATA
bandwidth percent 5 ! Bulk Data is assigned to Bulk SP class
random-detect
class SCAVENGER
bandwidth percent 1
set ip dscp 0
619
Example 15-29 Blue-CE1 Case Study MPLS VPN QoS Design Example (Continued)
class class-default
bandwidth percent 24
random-detect
!
!
policy-map CE-LAN-EDGE-OUT
class class-default
set cos dscp
continues
620
Example 15-29 Blue-CE1 Case Study MPLS VPN QoS Design Example (Continued)
max-reserved-bandwidth 100
service-policy output CE-FIVE-CLASS-SP-MODEL
!
!
router bgp 10
no synchronization
bgp log-neighbor-changes
redistribute connected
neighbor 10.20.1.2 remote-as 100
no auto-summary
!
!
The conguration for the rst PE router for this MPLS VPN QoS design case study
example is shown in Example 15-30.
Example 15-30 PE1 Case Study MPLS VPN QoS Design Example
!
hostname PE1
!
!
ip vrf BLUE
rd 100:1
route-target export 100:1
route-target import 100:1
!
ip vrf RED
rd 150:1
route-target export 150:1
route-target import 150:1
!
ip cef
mpls ldp logging neighbor-changes
mpls traffic-eng tunnels
!
!
!
class-map match-any REALTIME
match ip dscp ef
match ip dscp cs5
class-map match-any CRITICAL-DATA
match ip dscp cs6
match ip dscp af31
match ip dscp cs3
class-map match-any VIDEO
match ip dscp af21
match ip dscp cs2
class-map match-any BULK-DATA
match ip dscp af11
match ip dscp cs1
621
Example 15-30 PE1 Case Study MPLS VPN QoS Design Example (Continued)
class-map match-all CORE-REALTIME
match mpls experimental topmost 5 ! Identifies in-contract Realtime
class-map match-all CORE-CRITICAL-DATA
match mpls experimental topmost 3 ! Identifies in-contract Critical-Data
match mpls experimental topmost 7 ! Identifies out-of-contract Critical Data
match mpls experimental topmost 2 ! Identifies in-contract Video
match mpls experimental topmost 1 ! Identifies in-contract Bulk
match mpls experimental topmost 6 ! Identifies out-of-contract Bulk
!
!
policy-map PE-FIVE-CLASS-SHORT-PIPE-MARKING
class
REALTIME
exceed-action
set-mpls-exp-topmost-transmit 7
police cir 1050000
conform-action set-mpls-exp-topmost-transmit 5 ! Conforming RT set to 5
! Excess Realtime is dropped
exceed-action drop
class CRITICAL-DATA
police cir 600000
conform-action set-mpls-exp-topmost-transmit 3 ! Critical Data set to 3
! Excess Critical set 7
exceed-action set-mpls-exp-topmost-transmit 7
class VIDEO
police cir 450000
conform-action set-mpls-exp-topmost-transmit 2 ! Conforming Video set to 2
! Excess Video dropped
exceed-action drop
class BULK-DATA
police cir 150000
conform-action set-mpls-exp-topmost-transmit 1 ! Conforming Bulk set to 1
! Excess Bulk set to 6
exceed-action set-mpls-exp-topmost-transmit 6
class class-default
police cir 750000
conform-action set-mpls-exp-topmost-transmit 0 ! Conforming BE set to 0
! Excess BE set to 4
exceed-action set-mpls-exp-topmost-transmit 4
!
!
policy-map PE-FIVE-CLASS-SP-MODEL
class REALTIME
! Realtime SP class gets 35% LLQ
priority percent 35
class CRITICAL-DATA
! Critical-Data SP class gets 40% CBWFQ
bandwidth percent 20
! DSCP-based WRED enabled on class
random-detect dscp-based
class VIDEO
! Video SP class gets 15% CBWFQ
bandwidth percent 15
! DSCP-based WRED enabled on Video SP class
random-detect dscp-based
class BULK-DATA
! Bulk Data SP class gets 15% CBWFQ
bandwidth percent 5
! DSCP-based WRED enabled on Bulk Data SP class
random-detect dscp-based
class class-default
! Best Effort SP class gets 25% CBWFQ
bandwidth percent 25
! WRED enabled on Best Effort SP class
random-detect
!
continues
622
Example 15-30 PE1 Case Study MPLS VPN QoS Design Example (Continued)
!
policy-map CORE-THREE-CLASS-SP-MODEL
class CORE-REALTIME
priority percent 35
! CORE-REALTIME gets 35% LLQ
class CORE-CRITICAL-DATA
bandwidth percent 55
! CORE-CRITICAL gets 55% CBWFQ
class class-default
fair-queue
! CORE-BEST-EFFORT gets FQ
!
!
interface Loopback0
! Loopback interface for MPLS TE RID
ip address 20.1.1.1 255.255.255.255
!
interface Tunnel0
description TUNNEL0 (PE1=>PE2)
ip unnumbered Loopback0
tunnel destination 20.2.2.2
! Enables MPLS TE on tunnel
tunnel mode mpls traffic-eng
! Best priority
tunnel mpls traffic-eng priority 0 0
tunnel mpls traffic-eng bandwidth sub-pool 54250 ! Assigns sub-pool
tunnel mpls traffic-eng path-option 1 explicit name TUNNEL0
!
interface Tunnel1
description TUNNEL1 (PE1=>P=>PE2)
ip unnumbered Loopback0
tunnel destination 20.2.2.2
! Enables MPLS TE
tunnel mode mpls traffic-eng
! Worst priority
tunnel mpls traffic-eng priority 7 7
! Assigns global pool
tunnel mpls traffic-eng bandwidth 77500
tunnel mpls traffic-eng path-option 1 explicit name TUNNEL1
!
!
interface ATM2/0
no ip address
ima-group 1
!
interface ATM2/1
no ip address
ima-group 1
!
interface ATM2/ima1
no ip address
no atm ilmi-keepalive
!
interface ATM2/ima1.20 point-to-point
description Dual-T1 ATM IMA Link to Blue CE1
ip vrf forwarding BLUE
ip address 10.20.1.2 255.255.255.252
pvc 0/120
vbr-nrt 3072 3072
! Overrides 75% BW
max-reserved-bandwidth 100
623
Example 15-30 PE1 Case Study MPLS VPN QoS Design Example (Continued)
service-policy input PE-FIVE-CLASS-SHORT-PIPE-MARKING
service-policy output PE-FIVE-CLASS-SP-MODEL
!
!
interface ATM2/2
no ip address
ima-group 2
!
interface ATM2/ima2
no ip address
no atm ilmi-keepalive
!
interface ATM2/ima2.20 point-to-point
description Dual-T1 ATM IMA Link to Red CE1
ip vrf forwarding RED
ip address 10.20.1.2 255.255.255.252
pvc 0/220
vbr-nrt 3072 3072
! Overrides 75% BW
max-reserved-bandwidth 100
! Short Pipe Marking
service-policy input PE-FIVE-CLASS-SHORT-PIPE-MARKING
! Egress policy to CE
service-policy output PE-FIVE-CLASS-SP-MODEL
!
!
interface ATM2/3
no ip address
ima-group 2
!
!
interface POS5/0
description PE1=>PE2 POS Link
ip address 20.1.12.1 255.255.255.252
! Overrides 75% BW limit
max-reserved-bandwidth 100
! Applies Core DS policies
service-policy output CORE-THREE-CLASS-SP-MODEL
! Enables MPLS TE on int
mpls traffic-eng tunnels
tag-switching ip
! Assigns sub-pool BW
ip rsvp bandwidth 77500 sub-pool 54250
!
interface POS6/0
description PE1=>P-Router (Core) POS Link
ip address 20.1.13.1 255.255.255.252
! Overrides 75% BW limit
max-reserved-bandwidth 100
! Applies Core DS policies
service-policy output CORE-THREE-CLASS-SP-MODEL
! Enables MPLS TE on int
mpls traffic-eng tunnels
tag-switching ip
! Assigns global-pool BW
ip rsvp bandwidth 77500 77500
!
router ospf 100
! MPLS TE RID
mpls traffic-eng router-id Loopback0
! Enables OSPF area 0 for MPLS TE
mpls traffic-eng area 0
log-adjacency-changes
continues
624
Example 15-30 PE1 Case Study MPLS VPN QoS Design Example (Continued)
redistribute connected subnets
network 20.1.12.0 0.0.0.3 area 0
network 20.1.13.0 0.0.0.3 area 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
redistribute connected
neighbor 20.2.2.2 remote-as 100
neighbor 20.2.2.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 20.2.2.2 activate
neighbor 20.2.2.2 send-community extended
neighbor 20.2.2.2 route-map TUNNEL-ASSIGNMENT in ! Applies BGP PBR
exit-address-family
!
address-family ipv4 vrf RED
redistribute connected
neighbor 10.20.1.1 remote-as 15
neighbor 10.20.1.1 activate
neighbor 10.20.1.1 default-originate
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4 vrf BLUE
redistribute connected
neighbor 10.20.1.1 remote-as 10
neighbor 10.20.1.1 activate
neighbor 10.20.1.1 default-originate
no auto-summary
no synchronization
exit-address-family
!
ip extcommunity-list 2 permit rt 150:1
ip classless
ip route 16.16.16.16 255.255.255.255 Tunnel0 ! Static route for Tunnel 0
ip route 17.17.17.17 255.255.255.255 Tunnel1 ! Static route for Tunnel 1
!
ip extcommunity-list 1 permit rt 100:1
! Identifies Blue VPN by RT
ip extcommunity-list 2 permit rt 150:1
! Identifies Red VPN by RT
ip bgp-community new-format
!
ip explicit-path name TUNNEL0 enable
! Defines explicit path for Tu0
next-address 20.1.12.2
!
ip explicit-path name TUNNEL1 enable
! Defines explicit path for Tu1
next-address 20.1.13.2
next-address 20.1.23.1
!
625
Example 15-30 PE1 Case Study MPLS VPN QoS Design Example (Continued)
access-list 1 permit 10.2.102.0 0.0.0.255
access-list 2 permit 10.2.2.0 0.0.0.255
access-list 2 permit 10.20.2.0 0.0.0.3
access-list 3 permit 10.2.102.0 0.0.0.255
access-list 3 permit 10.2.2.0 0.0.0.255
access-list 3 permit 10.20.2.0 0.0.0.3
!
route-map TUNNEL-ASSIGNMENT permit 10
match ip address 1
match extcommunity 1
set ip next-hop 16.16.16.16
!
route-map TUNNEL-ASSIGNMENT permit 20
match ip address 2
match extcommunity 1
set ip next-hop 17.17.17.17
!
route-map TUNNEL-ASSIGNMENT permit 30
match ip address 3
match extcommunity 2
set ip next-hop 17.17.17.17
!
!
!
!
!
!
!
!
Identifies
Identifies
Identifies
Identifies
Identifies
Identifies
(Blue) Voice-VLAN
(Blue) Data-VLAN
(Blue) PE-CE link
(Red) Voice-VLAN
(Red) Data-VLAN
(Red) PE-CE Link
Example 15-31 shows the conguration for the second PE router for this MPLS VPN QoS
design case study example.
Example 15-31 PE2 Case Study MPLS VPN QoS Design Example
!
hostname PE2
!
!
ip vrf BLUE
rd 100:1
route-target export 100:1
route-target import 100:1
!
ip vrf RED
rd 150:1
route-target export 150:1
route-target import 150:1
!
ip cef
mpls ldp logging neighbor-changes
mpls traffic-eng tunnels
!
!
continues
626
Example 15-31 PE2 Case Study MPLS VPN QoS Design Example (Continued)
!
class-map match-any REALTIME
match ip dscp ef
match ip dscp cs5
class-map match-any CRITICAL-DATA
match ip dscp cs6
match ip dscp af31
match ip dscp cs3
class-map match-any VIDEO
match ip dscp af21
match ip dscp cs2
class-map match-any BULK-DATA
match ip dscp af11
match ip dscp cs1
class-map match-all CORE-REALTIME
match mpls experimental topmost 5 ! Identifies in-contract Realtime
class-map match-all CORE-CRITICAL-DATA
match mpls experimental topmost 3 ! Identifies in-contract Critical-Data
match mpls experimental topmost 7 ! Identifies out-of-contract Critical Data
match mpls experimental topmost 2 ! Identifies in-contract Video
match mpls experimental topmost 1 ! Identifies in-contract Bulk
match mpls experimental topmost 6 ! Identifies out-of-contract Bulk
!
!
policy-map PE-FIVE-CLASS-SHORT-PIPE-MARKING
class REALTIME
police cir 1050000
conform-action set-mpls-exp-topmost-transmit 5 ! Conforming RT set to 5
! Excess Realtime is dropped
exceed-action drop
class CRITICAL-DATA
police cir 600000
conform-action set-mpls-exp-topmost-transmit 3 ! Critical Data set to 3
! Excess Critical set 7
exceed-action set-mpls-exp-topmost-transmit 7
class VIDEO
police cir 450000
conform-action set-mpls-exp-topmost-transmit 2 ! Conforming Video set to 2
! Excess Video dropped
exceed-action drop
class BULK-DATA
police cir 150000
conform-action set-mpls-exp-topmost-transmit 1 ! Conforming Bulk set to 1
! Excess Bulk set to 6
exceed-action set-mpls-exp-topmost-transmit 6
class class-default
police cir 750000
conform-action set-mpls-exp-topmost-transmit 0 ! Conforming BE set to 0
! Excess BE set to 4
exceed-action set-mpls-exp-topmost-transmit 4
!
!
policy-map PE-FIVE-CLASS-SP-MODEL
class REALTIME
! Realtime SP class gets 35% LLQ
priority percent 35
class CRITICAL-DATA
! Critical-Data SP class gets 40% CBWFQ
bandwidth percent 20
627
Example 15-31 PE2 Case Study MPLS VPN QoS Design Example (Continued)
random-detect dscp-based
class VIDEO
bandwidth percent 15
random-detect dscp-based
class BULK-DATA
bandwidth percent 5
random-detect dscp-based
class class-default
bandwidth percent 25
random-detect
!
!
policy-map CORE-THREE-CLASS-SP-MODEL
class CORE-REALTIME
priority percent 35
! CORE-REALTIME gets 35% LLQ
class CORE-CRITICAL-DATA
bandwidth percent 55
! CORE-CRITICAL gets 55% CBWFQ
class class-default
fair-queue
! CORE-BEST-EFFORT gets WFQ
!
!
interface Loopback0
! Loopback interface for MPLS TE RID
ip address 20.2.2.2 255.255.255.255
!
interface Tunnel0
description TUNNEL0 (PE2=>PE1)
ip unnumbered Loopback0
tunnel destination 20.1.1.1
! Enables MPLS TE on tunnel
tunnel mode mpls traffic-eng
! Best priority
tunnel mpls traffic-eng priority 0 0
! Assigns sub-pool
tunnel mpls traffic-eng bandwidth sub-pool 54250
tunnel mpls traffic-eng path-option 1 explicit name TUNNEL0
!
interface Tunnel1
description TUNNEL1 (PE2=>P=>PE1)
ip unnumbered Loopback0
tunnel destination 20.1.1.1
! Enables MPLS TE
tunnel mode mpls traffic-eng
! Worst priority
tunnel mpls traffic-eng priority 7 7
! Assigns global pool
tunnel mpls traffic-eng bandwidth 77500
tunnel mpls traffic-eng path-option 1 explicit name TUNNEL1
!
!
interface ATM2/0
no ip address
ima-group 1
!
interface ATM2/1
no ip address
ima-group 1
continues
628
Example 15-31 PE2 Case Study MPLS VPN QoS Design Example (Continued)
!
interface ATM2/ima1
no ip address
no atm ilmi-keepalive
!
interface ATM2/ima1.20 point-to-point
description Dual-T1 ATM IMA Link to Blue CE2
ip vrf forwarding BLUE
ip address 10.20.2.2 255.255.255.252
pvc 0/120
vbr-nrt 3072 3072
max-reserved-bandwidth 100
! Overrides 75% BW
service-policy input PE-FIVE-CLASS-SHORT-PIPE-MARKING
! Short Pipe Marking
service-policy output PE-FIVE-CLASS-SP-MODEL
! Egress policy to CE
!
!
interface ATM2/2
no ip address
ima-group 2
!
interface ATM2/ima2
no ip address
no atm ilmi-keepalive
!
interface ATM2/ima2.20 point-to-point
description Dual-T1 ATM IMA Link to Red CE2
ip vrf forwarding RED
ip address 10.20.2.2 255.255.255.252
pvc 0/220
vbr-nrt 3072 3072
max-reserved-bandwidth 100
! Overrides 75% BW
service-policy input PE-FIVE-CLASS-SHORT-PIPE-MARKING
! Short Pipe Marking
service-policy output PE-FIVE-CLASS-SP-MODEL
! Egress policy to CE
!
!
interface POS5/0
description PE2=>PE1 POS Link
ip address 20.1.12.2 255.255.255.252
! Overrides 75% BW limit
max-reserved-bandwidth 100
! Applies Core DS policies
service-policy output CORE-THREE-CLASS-SP-MODEL
! Enables MPLS TE on int
mpls traffic-eng tunnels
tag-switching ip
! Assigns sub-pool BW
ip rsvp bandwidth 77500 sub-pool 54250
!
interface POS6/0
description PE2=>P-Router (Core) POS Link
ip address 20.1.23.1 255.255.255.252
! Overrides 75% BW limit
max-reserved-bandwidth 100
! Applies Core DS policies
service-policy output CORE-THREE-CLASS-SP-MODEL
! Enables MPLS TE on int
mpls traffic-eng tunnels
tag-switching ip
! Assigns global-pool BW
ip rsvp bandwidth 77500 77500
629
Example 15-31 PE2 Case Study MPLS VPN QoS Design Example (Continued)
!
router ospf 100
!
mpls traffic-eng router-id Loopback0
!
mpls traffic-eng area 0
log-adjacency-changes
redistribute connected subnets
network 20.1.12.0 0.0.0.3 area 0
network 20.1.23.0 0.0.0.3 area 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
redistribute connected
neighbor 20.1.1.1 remote-as 100
neighbor 20.1.1.1 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 20.1.1.1 activate
neighbor 20.1.1.1 send-community extended
neighbor 20.1.1.1 route-map TUNNEL-ASSIGNMENT
exit-address-family
!
address-family ipv4 vrf RED
redistribute connected
neighbor 10.20.2.1 remote-as 15
neighbor 10.20.2.1 activate
neighbor 10.20.2.1 default-originate
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4 vrf BLUE
redistribute connected
neighbor 10.20.2.1 remote-as 10
neighbor 10.20.2.1 activate
neighbor 10.20.2.1 default-originate
no auto-summary
no synchronization
exit-address-family
!
ip classless
ip route 18.18.18.18 255.255.255.255 Tunnel0 !
ip route 19.19.19.19 255.255.255.255 Tunnel1 !
!
ip extcommunity-list 1 permit rt 100:1
!
ip extcommunity-list 2 permit rt 150:1
!
ip bgp-community new-format
!
MPLS TE RID
Enables OSPF area 0 for MPLS TE
in
continues
630
Example 15-31 PE2 Case Study MPLS VPN QoS Design Example (Continued)
ip explicit-path name TUNNEL0 enable
next-address 20.1.12.1
!
ip explicit-path name TUNNEL1 enable
next-address 20.1.23.2
next-address 20.1.13.1
!
access-list 1 permit 10.1.101.0 0.0.0.255
access-list 2 permit 10.1.1.0 0.0.0.255
access-list 2 permit 10.20.1.0 0.0.0.3
access-list 3 permit 10.1.101.0 0.0.0.255
access-list 3 permit 10.1.1.0 0.0.0.255
access-list 3 permit 10.20.1.0 0.0.0.3
!
route-map TUNNEL-ASSIGNMENT permit 10
match ip address 1
match extcommunity 1
set ip next-hop 18.18.18.18
!
route-map TUNNEL-ASSIGNMENT permit 20
match ip address 2
match extcommunity 1
set ip next-hop 19.19.19.19
!
route-map TUNNEL-ASSIGNMENT permit 30
match ip address 3
match extcommunity 2
set ip next-hop 19.19.19.19
!
!
!
!
!
!
!
!
Identifies
Identifies
Identifies
Identifies
Identifies
Identifies
(Blue) Voice-VLAN
(Blue) Data-VLAN
(Blue) PE-CE link
(Red) Voice-VLAN
(Red) Data-VLAN
(Red) PE-CE Link
The conguration for the P router for this MPLS VPN QoS design case-study example is
shown in Example 15-32.
Example 15-32 P-Router Case Study MPLS VPN QoS Design Example
!
hostname P-Router
!
!
ip cef
mpls ldp logging neighbor-changes
mpls traffic-eng tunnels
!
!
class-map match-all CORE-REALTIME
match mpls experimental topmost 5 !
class-map match-all CORE-CRITICAL-DATA
match mpls experimental topmost 3 !
match mpls experimental topmost 7 !
match mpls experimental topmost 2 !
631
Example 15-32 P-Router Case Study MPLS VPN QoS Design Example (Continued)
match mpls experimental topmost 1
match mpls experimental topmost 6
!
!
policy-map CORE-THREE-CLASS-SP-MODEL
class CORE-REALTIME
priority percent 35
! CORE-REALTIME gets 35% LLQ
class CORE-CRITICAL-DATA
bandwidth percent 55
! CORE-CRITICAL gets 55% CBWFQ
class class-default
fair-queue
! CORE-BEST-EFFORT gets WFQ
!
!
interface Loopback0
! Loopback interface for MPLS TE RID
ip address 20.3.3.3 255.255.255.255
!
!
interface POS5/0
description P-Router (Core) => PE1 POS Link
ip address 20.1.13.2 255.255.255.252
! Overrides 75% BW limit
max-reserved-bandwidth 100
! Applies Core DS policies
service-policy output CORE-THREE-CLASS-SP-MODEL
! Enables MPLS TE on int
mpls traffic-eng tunnels
tag-switching ip
ip rsvp bandwidth 77500 77500
! Assigns global-pool BW
!
interface POS6/0
description P-Router (Core) => PE2 POS Link
ip address 20.1.23.2 255.255.255.252
max-reserved-bandwidth 100
! Overrides 75% BW limit
service-policy output CORE-THREE-CLASS-SP-MODEL
! Applies Core DS policies
mpls traffic-eng tunnels
! Enables MPLS TE on int
tag-switching ip
ip rsvp bandwidth 77500 77500
! Assigns global-pool BW
!
router ospf 100
mpls traffic-eng router-id Loopback0
! MPLS TE RID
mpls traffic-eng area 0
! Enables OSPF area 0 for MPLS TE
log-adjacency-changes
redistribute connected subnets
network 20.1.13.0 0.0.0.3 area 0
network 20.1.23.0 0.0.0.3 area 0
!
!
Verication commands:
632
Summary
MPLS VPNs are rapidly gaining popularity as private WAN alternatives. This chapter
presented QoS design principles and designs to achieve end-to-end service levels over
MPLS VPNs.. The foremost design principle is that enterprise subscribers and service
providers have to cooperatively deploy QoS over MPLS VPNs in a consistent and
complementary manner.
Enterprise (customer) considerations, such as class-collapsing guidelines and trafcmixing principles, were overviewed along with re-marking examples.
Service-provider edge QoS policies were presented for three-, four-, and ve-class edge
models. Additionally, details on how RFC 3270 tunneling modes (Uniform, Short Pipe, and
Pipe) can be implemented within Cisco IOS Software were provided.
Service provider core QoS options, such as aggregate bandwidth overprovisioning or
deploying DiffServ in the backbone, were considered along with platform-specic
considerations, such as MDRR on the 12000 GSR.
MPLS trafc engineering was introduced in brief, and two examples of MPLS TE for QoS
were presented (MPLS per-VPN TE and MPLS DS-TE).
The chapter concluded with a case-study continuation from previous chapters, showing
how an enterprise that is compliant with the QoS Baseline can migrate its private WAN to
an MPLS VPN. The service providers QoS designs also were detailed within the case
study.
Further Reading
Standards:
Further Reading
633
Books:
Pepelnjak, Ivan, and Jim Guichard. MPLS and VPN Architectures. Cisco Press, 2002.
Osborne, Eric, and Ajay Simha. Trafc Engineering with MPLS. Cisco Press, 2003.
Pepelnjak, Ivan, Jim Guichard, and Jeff Apcar. MPLS and VPN Architectures. Cisco
Press, 2003.
Conguring MPLS and MPLS trafc engineering (Cisco IOS Release 12.2): http://
www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fswtch_c/
swprt3/xcftagc.htm.
MPLS Cisco IOS documentation main link (Cisco IOS Release 12.3):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123cgcr/
swit_vcg.htm#999526.
IPSec VPNs are the most widely deployed VPNs and are found in three main contexts:
QoS considerations for site-to-site and teleworker IPSec VPNs are examined in this design
chapter (as QoS is rarelyif everdeployed in remote-access client IPSec VPN
scenarios). These considerations include the following:
CHAPTER
16
636
Site-to-Site
IPSec VPN
Central Site
Service Provider/
Internet
WAN
Aggregators
IPSec VPN
Headers
Teleworker
IPSec VPN
IPSec VPN
Tunnels
Remote Access
IPSec VPN
(Software Client)
Enabling converged services, such as voice and video, on an IPSec VPN has been dubbed
V3PN. V3PN is essentially the overlaying of QoS technologies over IPSec VPNs to provide
the required service levels to voice and video applications. As such, V3PN solutions relate
to only two of the three IPSec VPN design contexts: site-to-site VPNs and telecommuter
VPNs. (Little, if any, QoS is available in remote-access client networks.)
This chapter discusses QoS design considerations and recommendations for both site-tosite and telecommuter V3PN solutions.
NOTE
It is beyond the scope of this chapter to detail IPSec encryption operation and conguration;
a working knowledge of IPSec is assumed.
637
The advantages, disadvantages, features, and limitations of these options are discussed
next.
638
639
Figure 16-2 IPSec Transport Mode Versus Tunnel Mode for a G.729 VoIP Packet
IPSec ESP
Transport Mode
120 Bytes
IPSec ESP
Tunnel Mode
140 Bytes
IPSec
Hdr
ESP
Hdr
ESP
IV
GRE
IP
Hdr
UDP
RTP
Voice
ESP
Pad/NH
ESP
Auth
20
20
12
20
2-257
12
IPSec
Hdr
ESP
Hdr
ESP
IV
GRE IP
Hdr
GRE
IP
Hdr
UDP
RTP
Voice
ESP
Pad/NH
ESP
Auth
20
20
20
12
20
2-257
12
The Cisco IOS prefragmentation feature for IPSec VPNs (discussed later in the chapter) is
not supported for transport mode because the decrypting router cannot determine whether
the fragmentation was done before or after encryption (for example, by a downstream
router between the encrypting and decrypting routers).
Although IPSec transport mode saves a small to moderate amount of link bandwidth, it does
not provide any reduction in packets per second switched by the router. Therefore, because
the number of packets per second primarily affects CPU performance, no signicant CPU
performance gain is realized by using IPSec transport mode.
IPSec tunnel mode is the default conguration option. To congure transport mode, it must
be specied under the IPSec transform set, as shown in Example 16-1.
Example 16-1 Enabling IPSec Transport Mode
!
crypto ipsec transform-set ENTERPRISE esp-3des esp-sha-hmac
! Enables IPSec Transport mode
mode transport
!
640
NOTE
The design principles in this chapter were proven by scalability testing in the Cisco
Enterprise Solutions Engineering labs. These large-scale testing methods were designed to
test worst-case scenarios. From a design standpoint, these entailed enabling the following:
Strong Triple-Digital Encryption Standard (3DES) encryption for both Internet Key
Exchange (IKE) and IPSec
IP GRE with IPSec tunnel mode
Dife-Hellman Group 2 (1024 bit) for IKE
Secure Hash Algorithm (SHA) 160-bit RFC 2104 Keyed-Hashing for Message
641
The additional overhead represents a 40 percent increase in the bandwidth required for an
encrypted G.711 call.
The 280-byte packets header, data, and trailer elds for an IPSec tunnel-mode ESP
encrypted G.711 call are shown in Figure 16-3.
Figure 16-3 Anatomy of an IPSec-Encrypted G.711 Packet
G.711
200 Bytes
IP GRE
224 Bytes
GRE IP
GRE
Hdr
20
IPSec ESP
IPSec ESP ESP GRE IP
GRE
Tunnel Mode Hdr
Hdr
Hdr IV
280 Bytes
20
20
IP
Hdr
UDP
RTP
Voice
20
12
160
IP
Hdr
UDP
RTP
Voice
20
12
160
IP
Hdr
UDP
RTP
Voice
ESP
Pad/NH
ESP
Auth
20
12
160
2257
12
Encrypted
Authenticated
The Layer 3 data rate for a G.729 call (at 50 pps) is 24 kbps. IP GRE tunnel overhead adds
24 bytes per packet. IPSec ESP adds another 52 bytes. The combined additional overhead
increases the rate from 24 kbps (clear voice) to just less than 56 kbps (IPSec ESP tunnelmode encrypted voice).
The calculation is as follows:
The additional overhead represents a 227 percent increase in the bandwidth required for an
encrypted G.729 call.
642
The 136-byte packets header, data, and trailer elds for an IPSec tunnel-mode ESP
encrypted G.729 call are shown in Figure 16-4.
Figure 16-4 Anatomy of an IPSec-Encrypted G.729 Packet
IP
Hdr
UDP
RTP
Voice
20
12
20
IP
Hdr
UDP
RTP
Voice
20
12
20
GRE
IP
Hdr
UDP
RTP
Voice
ESP
Pad/NH
ESP
Auth
20
12
20
2257
12
G.729
60 Bytes
IP GRE
84 Bytes
GRE IP
GRE
Hdr
20
IPSec ESP
Tunnel Mode
136 Bytes
20
Encrypted
Authenticated
It is important to note that these bandwidth allocations are Layer 3 bandwidth requirements
and do not include Layer 2 overhead (which is media dependent). Therefore, Layer 2
overhead needs to be added on top of the Layer 3 requirements in provisioning LLQ and
CBWFQ bandwidth. This is illustrated in Figure 16-5, where Ethernet overhead (Ethernet
plus 802.1Q trunking) and Frame Relay overhead are added and removed from the packet
in transit.
Key Layer 2 overhead values are reiterated in Table 16-1.
Table 16-1
Overhead
Ethernet
Frame Relay
MLP
ATM
643
IPSec VPN
(Frame Relay
Access)
140
Payload
(20)
Layer 2
Size
FR (4)
60
20
78
78
Packet
Size (Bytes)
Ethernet (14)
IPSec (52)
Ethernet (14)
60
802.1Q (4)
GRE (24)
802.1Q (4)
IP (20)
IP (20)
IP (20)
IP (20)
IP (20)
UDP (8)
UDP (8)
UDP (8)
UDP (8)
UDP (8)
RTP (12)
RTP (12)
RTP (12)
RTP (12)
RTP (12)
Payload
(20)
Payload
(20)
Payload
(20)
Payload
(20)
Payload
(20)
20
Payload
(20)
644
However, one of the caveats of encryption is that key portions of the original IP packet that
could be referenced for QoS (and other) purposes are no longer readable. Such is the case
with cRTP.
cRTP and IPSec are inherently incompatible standards. The original IP/UDP/RTP header
already is encrypted by IPSec by the time the RTP compressor is called upon to perform
the compression. Therefore, because cRTP cannot associate the encrypted IP/UDP/RTP
packet with a known media stream, compression cannot occur and cRTP bandwidth savings
cannot be realized. The encrypted IP/UDP/RTP packet simply bypasses the compression
process and continues (uncompressed) to the transmit queue.
This is illustrated in Figure 16-6.
Figure 16-6 IPSec and cRTP Incompatibility
Identify RTP
Traffic
RTP
Traffic
!@#!
IPSec
Crypto
Engine
Compress RTP
Traffic
RTP
Compressor
Huh?
Transmit
Queue
!@#!
!@#!
$#@
!@#!
!@#!
Configured
Queuing
!@#!
Non-RTP
Traffic
It is important to recognize that cRTP functions on a hop-by-hop basis, whereas IPSec can
span multiple intermediate (Layer 3) hops between IPSec endpoints. This distinction
further exacerbates incompatibility between the features.
Although developments are under way to address these incompatibilities, at the time of this
writing, cRTP cannot be utilized to achieve bandwidth savings in an IPSec VPN
environment.
Prefragmentation
A problem arises when a packet is nearly the size of the maximum transmission unit (MTU)
of the outbound link of the encrypting router and then is encapsulated with IPSec headers.
645
The resulting packet is likely to exceed the MTU of the outbound link. This causes packet
fragmentation after encryption, which makes the decrypting router reassemble in the
process path.
Cisco IOS Release 12.2(13)T introduced a new feature: prefragmentation for IPSec VPNs.
Prefragmentation increases the decrypting routers performance by enabling it to operate in
the high-performance CEF path instead of the process path.
This feature enables an encrypting router to predetermine the encapsulated packet size from
information available in transform sets, which are congured as part of the IPSec security
association. If it is predetermined that the packet will exceed the MTU of the output
interface, the packet is fragmented before encryption. This function avoids process-level
reassembly before decryption and helps improve decryption performance and overall IPSec
trafc throughput.
Prefragmentation for IPSec VPNs is enabled globally by default for Cisco VPN routers
running Cisco IOS Release 12.2(13)T or higher.
Bandwidth Provisioning
Chapter 2, QoS Design Overview, presented the 33 Percent LLQ Rule, along with the
design rationale behind the recommendation. Furthermore, the rule was expressed as
a conservative design recommendation that might not be valid under all constraints.
Provisioning for VoIP over IPSec on slow links sometimes poses constraints that might
preclude applying the 33 Percent LLQ Rule.
As shown in Table 16-2, the percentage of LLQ required on 64-, 128-, and 256-kbps links
for a single encrypted G.729 call exceeds the recommended 33 percent LLQ limit. Enterprises considering such deployments must recognize the impact on data trafc traversing
such links when encrypted voice calls were madespecically, data applications would
slow down signicantly. If that is considered an acceptable trade-off, not much can be said
or done. Otherwise, it is recommended to increase bandwidth to the point that encrypted
VoIP calls can be made and still fall within the 33 percent bandwidth recommendation for
priority queuing.
When planning the bandwidth required for a branch ofce, consider the number of concurrent calls traversing the IPSec VPN that the branch is expected to make during peak call
periods. This varies based on the job function of the employees located at a branch. For
example, an ofce of software engineers would be expected to make fewer calls than an
ofce of telemarketers. A typical active call ratio may be one active call for every six people
(1:6), but this could range from 1:4 or 1:10, depending on the job function of the employees.
Given the 512-kbps link from Table 16-2 as an example, with a target of 3 G.729 calls, this
link theoretically could support a branch ofce of between 12 and 30 people. As with all
other topologies, call admission control must be administered properly to correspond to the
QoS policies deployed within the network infrastructure.
646
Table 16-2
NOTE
G.729 Calls by Link Speeds (FRF.12 Is Enabled on Link Speeds 768 kbps Only)
Line Rate (kbps)
Maximum Number
of G.729 Calls
LLQ Bandwidth
(kbps)
LLQ Bandwidth
(Percentage)
64 (FRF.12)
1 (58 kbps)
58
91%
128 (FRF.12)
1 (58 kbps)
58
46%
256 (FRF.12)
2 (58 kbps)
116
46%
512 (FRF.12)
3 (58 kbps)
174
34%
768 (FRF.12)
4 (58 kbps)
232
31%
1024
6 (56 kbps)
336
33%
1536
9 (56 kbps)
504
33%
2048
12 (56 kbps)
672
33%
Logical Topologies
Similar to private WANs, but unlike fully meshed MPLS VPNs, IPSec VPNs typically are
deployed in a (logical) hub-and-spoke topology.
The QoS implications of hub-and-spoke topologies include that access rates to remote
sites need to be constrained and shaped at the hub, to avoid delays and drops within the
providers cloud. Shaping at the IPSec VPN hub is done in a manner similar to that of
private WAN NBMA media, such as Frame Relay or ATM. Refer to the Headend VPN
Edge QoS Options for Site-to-Site V3PNs section, later in this chapter, and also to
Chapter 13, WAN Aggregator QoS Design, for additional details.
IPSec VPNs are not limited to hub-and-spoke designs. They also can be deployed in partialmesh or even fully meshed topologies. In such cases, shaping is recommended on any links
where speed mismatches occur (similar to private WAN scenarios).
Another alternative is to deploy IPSec VPNs via Dynamic Multipoint Virtual Private Networks (DMVPN), which establish site-to-site IPSec tunnels as needed and tear them down
647
when they no longer are required. As with the previously discussed logical topologies,
shaping is required on DMVPN NBMA links with speed mismatches. Specically, shapers
are required to be created dynamically and applied to logical DMVPN tunnels to offset any
speed mismatches attributed to physical NMBA links. However, as of the time of this writing, no shaping or queuing solution exists to guarantee QoS SLAs over DMVPN topologies
(although Cisco IOS solutions currently are being evaluated and are in development).
Performance and scalability testing results suggest that, in most cases, the additional delay
caused by encryption and decryption is approximately 4 to 10 ms (combined). These
incremental delays are shown in Figure 16-7.
Figure 16-7 IPSec Encryption/Decryption Incremental Delays
Service
Provider
Si
Si
Campus
CODEC
10-50 ms
(Depends on
Sample Size)
Branch
O
Offic
Office
Queuing
Variable
(Can Be Reduced
Using Hardware
PQs)
Encrypt
Minimal
2-5 ms
Queuing +
Serialization
Variable
(Can Be Reduced
Using LLQ+LFI)
Latency Target
Propagation and
Network
6.3 s / Km +
Network
Delay
(Variable)
Decrypt
Jitter Buffer
Minimal
2-5 ms
20-100 ms
(Depends on
Sample Size)
150 ms
648
This delay might not seem signicant for a campus-to-branch call (hub-to-spoke), but
the delay might be more relevant in branch-to-branch (spoke-to-spoke) scenarios because
encryption and decryption might occur twice (depending on the logical topology of the
VPN). This is illustrated in Figure 16-8.
Figure 16-8 IPSec VPN Spoke-to-Spoke Encryption/Decryption Delays
Campus
(IPSec VPN Hub)
Decryption (2-5 ms)
Branch A
(IPSec VPN Spoke A)
NOTE
Branch B
(IPSec VPN Spoke B)
Not only do encryption delays need to be factored into spoke-to-spoke IPSec VPN
scenarios, but queuing and serialization delays for both legs of the tunnel do as well
(as they also would in private WAN spoke-to-spoke scenarios).
649
through IPSec, the original ToS byte values also are encrypted and, thus, unusable by QoS
mechanisms that process the packet (post encryption).
To overcome this predicament, the IPSec protocol standards inherently have provisioned
the capability to preserve the ToS byte information of the original IP header by copying it
to the IP headers added by the tunneling and encryption process.
As shown in Figure 16-9, the original IP ToS byte values are copied initially to the IP header
added by the GRE encapsulation. Then these values are copied again to the IP header added
by IPSec encryption.
Figure 16-9 IP ToS Byte Preservation
ToS byte is copied from
the original IP header to
the IP GRE header.
GRE IP
GRE
Hdr
GRE
IP
Hdr
UDP
RTP
Voice
IP
Hdr
UDP
RTP
Voice
IP
Hdr
UDP
RTP
Voice
ESP
Pad/NH
ESP
Auth
This process compensates for the fact that the original IP header (including the ToS byte)
is actually unreadable (because of encryption) and allows the packet to be processed by
(post encryption) QoS mechanisms in the same manner as any other packet.
Additionally, this process underscores the importance of ensuring that the encrypted trafc
is marked properly (at Layer 3) before encryption.
QoS Pre-Classify
The QoS Pre-Classify feature often is confused with ToS byte preservation. QoS PreClassify is a Cisco IOS feature that allows for packets to be classied on header parameters
other than ToS byte values after encryption.
Because all original packet header elds are encrypted, including source or destination IP
addresses, Layer 4 protocol, and source or destination port addresses, post-encryption QoS
mechanisms cannot perform classication against criteria specied within any of these
elds.
650
A solution to this constraint is to create a clone of the original packets 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,
any QoS decisions based on header criteria, except for ToS byte valueswhich have been
preservedcan be performed by matching on any or all of the ve access-list tuple values
of the clone. In this manner, advanced classication can be administered even on encrypted
packets. The process is illustrated in Figure 16-10.
Figure 16-10 QoS Pre-Classify Feature Operation
Packet
clone
particle1
particle2
Input Interface
particleN
%$#*&1
Crypto Engine
clone
%$#*& 2
%$#*& N
class-map NET-MGMT
match access-group 123
Output Interface
Encrypted Packet
!
access-list 123 permit tcp any host 10.45.15.1 eq telnet
QoS Pre-Classify allows for advanced classification (beyond ToS byte values)
such as source/dest IP addrs, Layer 4 protocols, and source/dest port numbers.
A key point to remember regarding QoS Pre-Classify is that it is applicable only at the
encrypting routers output interface. The elds preserved by QoS Pre-Classify 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 Pre-Classify 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
classication. Testing has shown that when hardware-based encryption cards are combined
with QoS, the Cisco IOS Software implementation of the QoS Pre-Classify feature slightly
enhances performance, even when matching only on ToS byte values. Furthermore,
enabling QoS Pre-Classify by default eliminates the possibility that its conguration will
be overlooked if the QoS policy later is changed to include matching on IP addresses, ports,
or protocols.
651
Design recommendations for the QoS Pre-Classify feature can be summarized as follows:
Enable QoS Pre-Classify on all branch IPSec VPN routers that support the feature.
Enable QoS Pre-Classify on headend IPSec VPN routers only when both the VPN
termination and QoS policies reside on the same device.
Pre-Encryption Queuing
The hardware crypto engine within a Cisco VPN routers chassis can be viewed as an
internal interface that processes packets for encryption or decryption.
Before Cisco IOS Release 12.2(13)T, packets to be encrypted were handed off to the crypto
engine in a rst-in-rst-out (FIFO) basis. No distinction was made between voice packets
and data packets. The FIFO queuing for crypto engines is illustrated in Figure 16-11.
Figure 16-11 FIFO Crypto Engine QoS
Input
Interface(s)
FIFO Input
Queue
Crypto
Engine
Output
Interface
Consider a Cisco 2651XM router deployed at a branch site congured with a full-duplex
Fast Ethernet interface, a Serial E1 interface (also full duplex), and an AIM-BP encryption
accelerator. The Fast Ethernet interface connects to the branchs LAN, and the serial
interface connects to the Internet. These factors could limit throughput (causing a
bottleneck) in this scenario:
The clock rate of the slowest interface (in bits per secondin this case, 2 Mbps
transmitted or 2 Mbps received over the E1 interface)
The packet-forwarding rate of the routers main CPU (in packets per second)
The crypto engine encryption/decryption rate (in packets per second)
The performance characteristics of these items further are inuenced by the trafc mix,
including the rates and sizes of the IP packets being switched through the router and the
congured Cisco IOS switching path (process-switched, fast-switched, or CEF-switched).
NOTE
In most hardware platforms, the packets-per-second capabilities of the router are more
important for planning purposes than bits per second switched through the router. For
example, if the average packet size of packets switched through the router increases from
128 bytes to 256 bytes, the packet-per-second capabilities of the main CPU are not
necessarily cut in half.
652
The control plane requirements also factor into the CPUs utilization. These requirements
are determined by the routing protocol(s) in use, the number of routes in the routing table,
the overall network stability, and any redistribution requirements. Management requirements such as NTP and SNMP also add to the CPU tax. Additionally, Cisco IOS HA, QoS,
multicast, and security features all consume CPU resources and must be taken into account.
Another factor in the equation is the ratio of packets switched through (and originated by)
the router in relation to the number of packets selected by the crypto maps access list for
encryption or decryption. If an IP GRE tunnel is being encrypted, this tends to be a large
percentage of encrypted packets to total packets; if an IP GRE tunnel is not being
encrypted, the ratio could be quite small.
Hardware crypto engines can become congested when their packet-processing capabilities
are less than those of the routers main CPU and interface clock speeds. In such a case, the
crypto engine becomes a bottleneck, or a congestion point. The crypto engine might be
oversubscribed on either a momentary or (worse case) sustained basis. Such internal
precrypto congestion could affect the quality of real-time applications, such as VoIP.
Cisco internal testing and evaluation has shown it to be extremely difcult for conditions to
arise that cause hardware crypto engine congestion. In nearly all cases, the Cisco VPN
router platforms main CPU is exhausted before reaching the limit of the crypto engines
packet-processing capabilities.
Nevertheless, Cisco provides a solution to this potential case of congestion in the rare event
that a hardware crypto engine is overwhelmed so that VoIP quality will be preserved. This
feature, low-latency queuing (LLQ) for IPSec encryption engines, was introduced in Cisco
IOS Release 12.2(13)T.
The LLQ for Crypto Engine feature provides a dual-input queuing strategy for packets
being sent to the crypto engine:
This feature is targeted at alleviating any effects of momentary or sustained oversubscription of the hardware crypto engines that could result in priority trafc (such as voice and
video) experiencing quality issues. This feature is illustrated in Figure 16-12.
NOTE
Because software-based crypto adds unacceptable latency and jitter, there are no plans to
incorporate this feature for software crypto. Hardware accelerators for IPSec encryption are
highly recommended.
653
Input
Interface(s)
LLQ/CBWFQ
Classification
LLQ
Best Effort
Crypto
Engine
Output
Interface
The classication component to segregate trafc between the priority (LLQ) queue and the
best-effort queue is based on the MQC service policy on the output interface(s).
No additional conguration is required to enable LLQ for crypto engines; it is enabled
internally by the presence of a service policy with an LLQ priority command that is
applied to an output interface of an IPSec VPN router.
Trafc specied in the service policy to be assigned to the interfaces priority queue (LLQ)
automatically is sent to the crypto engines LLQ. Trafc included in any CBWFQ bandwidth classes (including the default class) automatically is assigned to the crypto engines
best-effort queue.
It is possible to congure different service policies, each with different trafc assigned to
an LLQ, on different interfaces. For example, perhaps voice is assigned to the LLQ of
Serial1/0 and video is assigned to the LLQ of an ATM PVC. Assuming that both voice and
video are to be encrypted, the question arises, which type of trafc (voice or video) will be
assigned to the crypto engines LLQ?
Because the crypto engine acts like a single interface inside the VPN router, encrypting and
decrypting all outbound and inbound trafc streams for each interface on which crypto is
applied, in the case of multiple service policies (on different interfaces) the crypto engine
maps all interface priority queues (LLQ) to its LLQ and all other queues to its best-effort
queue. Therefore, both voice and video would be assigned to the crypto engines LLQ.
In short, the LLQ for Crypto Engine feature ensures that if packets are dropped by momentary or sustained congestion of the crypto engine, the dropped packets will be of appropriately lower priority (not VoIP packets).
Although the feature is enabled by the presence of a service policy with an LLQ priority
statement, as with interface queuing itself, crypto-engine queuing does not actually engage
prioritization through the dual-FIFO queuing strategy until the crypto engine itself
experiences congestion.
654
The LLQ for Crypto Engine feature in Cisco IOS Software is not a prerequisite for
deploying QoS for IPSec VPN implementations in a high-quality manner. As indicated
previously, internal Cisco evaluations have found it extremely difcult to produce network
trafc conditions that resulted in VoIP quality suffering because of congestion of the
hardware crypto engine.
In general, the LLQ for Crypto Engine feature offers the most benet under one of the
following conditions:
When implementing Cisco IOS VPN router platforms that have a relatively high
amount of main CPU resources relative to crypto engine resources (these vary
depending on the factors outlined earlier in this discussion).
When the network experiences a periodic or sustained burst of large packets (for
example, for video applications).
To summarize, high-quality IPSec VPN deployments are possible today without the LLQ
for Crypto Engine feature in Cisco IOS software. The addition of this feature in Cisco IOS
software further ensures that high-priority applications, such as voice and video, can operate
in a high-quality manner even under harsh network conditions.
Anti-Replay Implications
IPSec offers inherent message-integrity mechanisms to provide a means to identify whether
an individual packet is being replayed by an interceptor or hacker. This concept is called
connectionless integrity. IPSec also provides for a partial sequence integrity, preventing the
arrival of duplicate packets. These concepts are outlined in RFC 2401, Security Architecture
for the Internet Protocol.
When ESP authentication (esp-sha-hmac) is congured in an IPSec transform set, for each
security association, the receiving IPSec peer veries that packets are received only once.
Because two IPSec peers can send millions of packets, a 64-packet sliding window
is implemented to bound the amount of memory required to tally the receipt of a peers
packets. Packets can arrive out of order, but they must be received within the scope of the
window to be accepted. If they arrive too late (outside the window), they are dropped.
The operation of the Anti-Replay window protocol is as follows:
1 The sender assigns a unique sequence number (per security association) to encrypted
packets.
2 The receiver maintains a 64-packet sliding window, the right edge of which includes
655
If a received packets sequence number falls within the window and was not
received previously, the packet is accepted and marked as received.
If the received packets sequence number falls within the window and
previously was received, the packet is dropped and the replay error counter
is incremented.
If the received packets sequence number is greater than the highest
sequence in the window, the packet is accepted and marked as received, and
the sliding window is moved to the right.
If the received packets sequence number is less than the lowest sequence in
the window, the packet is dropped and the replay error counter is
incremented.
In a converged IPSec VPN implementation with QoS enabled, lower-priority packets are
delayed so that higher-priority packets receive preferential treatment. This has the unfortunate side effect of reordering the packets to be out of sequence from an IPSec Anti-Replay
sequence number perspective. Therefore, there is a concern that through the normal QoS
prioritization process, the receiver might drop packets as Anti-Replay errors, when, in fact,
they are legitimately sent or received packets.
Figure 16-13 provides a visualization of the process. In this example, voice packets 4
through 67 have been received, and data packet 3 was delayed and transmitted following
voice packet 68. When the Anti-Replay logic is called to process packet 3, it is dropped
because it is outside the left edge of the sliding window. Packets can be received out of
order, but they must fall within the window to be accepted.
Figure 16-13 Anti-Replay Operation
Outside
Window
64-Packet
Anti-Replay
Window
64 Packet
SlidingSliding
Window
69
68
3
Anti-Replay
Drop
64
65
66
67
656
Anti-Replay drops can be eliminated in a pure IPSec tunnel design (no encrypted IP GRE
tunnel) by creating separate security associations for voice and data; voice and data packets
must match a separate line in the access list referenced by the crypto map. This is implemented easily if the IP phones are addressed by network addresses (such as private RFC
1918 addresses) separate from the workstations.
However, if IPSec tunnel mode (with an encrypted IP GRE tunnel) is used for a converged
network of voice and data, Anti-Replay drops impact data packets instead of voice packets
because the QoS policies prioritize voice over data.
Consider the effect of packet loss on a TCP-based application: TCP is connection oriented
and incorporates a ow-control mechanism within the protocol. The TCP application
cannot see why a packet was dropped. A packet dropped by a service policy on a congested
output interface is no different to the application than a packet lost by an Anti-Replay drop.
From a network perspective, however, it would be more efcient to drop the packet before
sending it over the WAN link (where bandwidth is the most expensive, only to have it
dropped by the Anti-Replay mechanism on the receiving IPSec VPN router), but the
location or nature of the packet loss is immaterial to the TCP driver.
Anti-Replay drops of data trafc ows are usually in the order of 1 percent to 1.5 percent
on IPSec VPN links that experience sustained congestion and have queuing engaged
(without any additional policy tuning).
Output drops on the output WAN interface, however, tend to be few, if any, and certainly
are far fewer than those dropped by Anti-Replay. This is because Anti-Replay triggers
packet drops more aggressively than the output service policy, which is a function of the
size of the output queues and the number of dened classes.
By default, each CBWFQ class receives a queue with a length of 64 packets. This can be
veried with the show policy interface verication command. Meanwhile, the receiving
IPSec peer has a single 64-packet Anti-Replay window (per IPSec Security Association)
with which to process all packets from all LLQ and CBWFQ bandwidth classes.
So, it stands to reason that the Anti-Replay mechanism on the receiving VPN router will be
more aggressive at dropping packets delayed by QoS mechanisms preferential to VoIP than
the service policy at the sending router. This is because of the size mismatch of the queue
depth on the senders output interface (multiple queues of 64 packets each) compared to the
width of the receivers Anti-Replay window (a single sliding window of 64 packets per SA).
As more bandwidth classes are dened in the policy map, this mismatch increases. As
mentioned, this is an inefcient use of expensive WAN/VPN bandwidth because packets
are transmitted only to be dropped before decryption.
The default value of 64 packets per CBWFQ queue is designed to absorb bursts of data
trafc and delay rather than drop those packets. This is optimal behavior in a non-IPSec
enabled network.
657
When IPSec authentication is congured (esp-sha-hmac) in the network, the scenario can
be improved by reducing the queue limit (max threshold) of the bandwidth classes of the
senders output service policy so that it becomes more aggressive at dropping packets than
buffering or delaying them. Extensive lab testing has shown that such queue-limit tuning
can reduce the number of Anti-Replay drops from 1 percent to less than a tenth of percent
(< 0.1 percent). This is because decreasing the service policy queue limits causes the senders
output service policy to become more aggressive in dropping instead of signicantly delaying packets (which occurs with large queue depths). This, in turn, decreases the number of
Anti-Replay drops.
As a rule of thumb, the queue limits should be reduced in descending order of application
priority. For example, the queue limit for Scavenger should be set lower than the queue limit
for a Transactional Data class, as is shown later in Examples 16-3 through 16-6.
NOTE
In many networks, the default queue limits and IPSec Anti-Replay performance are considered
acceptable. A modication of queue-limit values entails side effects on the QoS service
policy and related CPU performance. When queue limits are tuned, a careful eye should be
kept on CPU levels.
! ISAKMP ACL
658
Best-Effort
25%
Voice
33%
Scavenger 1%
Call-Signaling 5%
Transactional Data 31%
Internetwork Control 5%
659
NOTE
! VoIP
! New Call-Signaling
! Old Call-Signaling
! IP Routing
! References ISAKMP ACL
! Transactional-Data
! Scavenger
! ISAKMP ACL
660
Verication commands:
show policy
show policy interface
661
Interactive-Video
15%
Scavenger 1%
Bulk Data 4%
Call-Signaling 5%
Internetwork Control 5%
VOICE
! VoIP
INTERACTIVE-VIDEO
af42
CALL-SIGNALING
! Interactive-Video
! Old Call-Signaling
! New Call-Signaling
INTERNETWORK-CONTROL
name IKE
TRANSACTIONAL-DATA
af22
BULK-DATA
af12
SCAVENGER
! IP Routing
! References ISAKMP ACL
! Transactional-Data
! Bulk Data
! Scavenger
!
policy-map EIGHT-CLASS-V3PN-EDGE
class VOICE
priority percent 18
class INTERACTIVE-VIDEO
priority percent 15
continues
662
! Call-Signaling provisioning
! Control Plane provisioning
! Transactional-Data provisioning
! Optional: Anti-Replay tuning
! Bulk-Data provisioning
! Optional: Anti-Replay tuning
! Scavenger class is throttled
! Optional: Anti-Replay tuning
! Best Effort needs BW guarantee
! Optional: Anti-Replay Tuning
!
ip access-list extended IKE
permit udp any eq isakmp any eq isakmp
!
! ISAKMP ACL
Verication commands:
show policy
show policy interface
663
Voice 18%
Interactive-Video
15%
Scavenger 1%
Bulk Data 4%
Streaming-Video
10%
Call-Signaling 5%
Internetwork Control 5%
Transactional Data 5%
Network-Management 2%
Mission-Critical Data 10%
Example 16-5 QoS Baseline (Eleven-Class) Site-to-Site V3PN Model Conguration Example
!
class-map match-all
match ip dscp ef
class-map match-all
match ip dscp af41
class-map match-any
match ip dscp cs3
match ip dscp af31
class-map match-any
match ip dscp cs6
match access-group
class-map match-all
match ip dscp cs2
class-map match-all
match ip dscp 25
class-map match-all
match ip dscp af21
class-map match-all
match ip dscp cs4
class-map match-all
match ip dscp af11
class-map match-all
match ip dscp cs1
VOICE
! VoIP
INTERACTIVE-VIDEO
af42
CALL-SIGNALING
! Interactive-Video
! Old Call-Signaling
! New Call-Signaling
INTERNETWORK-CONTROL
name IKE
NET-MGMT
! IP Routing
! References ISAKMP ACL
! Network Management
MISSION-CRITICAL-DATA
! Interim MC Data
TRANSACTIONAL-DATA
af22
STREAMING-VIDEO
! Transactional Data
! Streaming Video
BULK-DATA
af12
SCAVENGER
! Bulk Data
! Scavenger
continues
664
Example 16-5 QoS Baseline (Eleven-Class) Site-to-Site V3PN Model Conguration Example (Continued)
!
policy-map QOSBASELINE-V3PN-EDGE
class VOICE
priority percent 18
! VoIP gets 18% LLQ
class INTERACTIVE-VIDEO
priority percent 15
! IP/VC gets 15% LLQ
class CALL-SIGNALING
bandwidth percent 5
! Call-Signaling provisioning
class INTERNETWORK-CONTROL
bandwidth percent 5
! Control Plane provisioning
class NET-MGMT
bandwidth percent 2
! Network Management provisioning
class MISSION-CRITICAL-DATA
bandwidth percent 10
! Mission-Critical Data provisioning
queue-limit 6
! Optional: Anti-Replay tuning
class TRANSACTIONAL-DATA
bandwidth percent 5
! Transactional-Data provisioning
queue-limit 3
! Optional: Anti-Replay tuning
class STREAMING-VIDEO
bandwidth percent 10
! Streaming-Video provisioning
queue-limit 6
! Optional: Anti-Replay tuning
class BULK-DATA
bandwidth percent 4
! Bulk-Data provisioning
queue-limit 3
! Optional: Anti-Replay tuning
class SCAVENGER
bandwidth percent 1
! Scavenger throttling
queue-limit 1
! Optional: Anti-Replay tuning
class class-default
bandwidth percent 25
! Best Effort needs BW guarantee
queue-limit 16
! Optional: Anti-Replay tuning
!
!
ip access-list extended IKE
permit udp any eq isakmp any eq isakmp
! ISAKMP ACL
!
Verication commands:
show policy
show policy interface
At remote sites, these policies can be applied to the physical interfaces connecting them to
the service provider (provided that the SLAs are for line ratesotherwise, shapers must be
used). For example, if the service provider guarantees a full T1 rate to a remote site and the
access medium is Frame Relay, the service policy can be applied directly to the main Frame
Relay interface. If the service provider guarantees only 768 kbps across the same link,
Frame Relay trafc shaping (either legacy or class-based FRTS) combined with FRF.12
must be used at the remote site.
665
For the central site(s) WAN aggregators, however, unique considerations exist. These are
discussed in the next section.
NOTE
It is critical to keep an eye on CPU levels when IPSec VPN encryption and per-tunnel
QoS policies are applied on the same router. CPU levels, in general, should not exceed
75 percent during normal operating conditions. Conguring hierarchical shaping and
queuing policies on a per-tunnel (per-SA) basis to a large number of sites could be very
CPU intensive, especially when such sites experience periods of sustained congestion.
666
Example 16-6 Per-Tunnel Hierarchical Shaping and Queuing MQC Policy for VPN Headends/WAN Aggregators
!
policy-map SHAPING-T1-TUNNEL
class class-default
shape average 1460000 14600 0
! Shaped to 95% of T1 line-rate
service-policy V3PN-EDGE
! Nested queuing policy
!
!
interface Tunnel120
description VPN Pipe to V3PN Site#120 (T1 Link)
bandwidth 1536
ip address 10.10.120.1 255.255.255.252
ip mtu 1420
service-policy output SHAPING-T1-TUNNEL
! Policy applied to tunnel int
qos pre-classify
! Performance recommandation
tunnel source 192.168.1.1
tunnel destination 192.168.2.2
crypto map VPN
!
VPN Headend
Routers
Central Site
IPSec
Tunnel
Home VPN
Router
Service
Provider
Internet
Broadband
Provider
Home Office
667
Cost savingsA traditional remote worker setup involves toll charges for dial-up and
additional phone lines. Integrating services into a single, broadband-based connection
can eliminate these charges while delivering superior overall connectivity
performance.
Although QoS designs for IPSec V3PN teleworker scenarios share many of the same
concerns of site-to-site V3PN scenarios, additional specic considerations relating to
teleworker deployment models and broadband access technologies need to be taken into
account.
668
Given these requirements, there are three main deployment models for business-ready
teleworker V3PN solutions, as illustrated in Figure 16-18. These include the Integrated
Unit Model, the Dual-Unit Model, and the Integrated Unit + Access Model.
Figure 16-18 Business-Ready Teleworker Deployment Models
IP
Router
QoS, VPN
Service
Provider
Backbone
IP
VPN
Device
Integrated Unit +
Access Model
IP
Router
QoS, VPN
Enterprise
Router
QoS
Broadband
Access
Device
NOTE
The Cisco routers used in these scenarios require an IP/FW/PLUS 3DES Cisco IOS
Software feature set. This feature set would include support for LLQ/CBWFQ with classbased hierarchical trafc shaping, and also support for Easy VPN (EZVPN), PKI, IDS,
AES, URL ltering, and EIGRP.
669
The Integrated Model is a preferred model for service providers offering a fully managed
V3PN teleworker service.
From a QoS design perspective, this model is highly similar to a site-to-site V3PN, except
that it interfaces with a broadband media instead of a traditional WAN access media.
Dual-Unit Model
In this model, one device (such as a Cisco 831, 837, or 1700-series router) provides basic
services and QoS, and a second device (a Cisco router or a PIX 501 or even a VPN 3002)
performs security/VPN services.
Advantages include the following:
From a QoS design perspective, this model is no different from the previous (Integrated
Unit) model.
670
Solution support even when no router interface for a specic broadband circuit type
is available
Additional QoS complexity because, in this model, the router does not control the
broadband circuit and, thus, must perform hierarchical shaping, as shown in
Figure 16-19.
Figure 16-19 Hierarchical QoS Requirements for Integrated Unit + Access Teleworker Deployment Model
Logical Bottleneck: Traffic is shaped to uplink speed on Ethernet egress of
the VPN/QoS router to force queueing to engage at this
interface whenever the uplink speed is exceeded.
10/100 Mbps
10 Mbps
384 kbps
Ethernet/Fast Ethernet
Ethernet
VPN/QoS
Router
Broadband
Modem
Broadband
Service
Provider
Internet
Service
Provider
VPN
Headend
Physical Bottleneck:
Without induced shaping, congestion would
occur at broadband modem, but this device
lacks QoS capabilities.
671
Example 16-7 Hierarchical Shaping and Queuing MQC Policy for a 384-kbps Cable Connection
!
policy-map SHAPE-384-CABLE
class class-default
shape average 364800 3640
! Shapes to 95% of 384 kbps cable link
service-policy V3PN-TELEWORKER
! Nested V3PN Teleworker queuing policy
!
...
!
interface Ethernet0
service-policy output SHAPE-384-CABLE
! Shaper applied to LAN interface
!
The Integrated Unit + Access Model is a preferred model for enterprise V3PN teleworker
deployments because it completely abstracts any service provider or access media
specic requirements (a one-size-ts-all solution).
Broadband-Access Technologies
In North America, there are four main broadband-access technology options for telecommuter scenarios: DSL, cable, ISDN, and wireless. DSL and cable are by far the dominant
broadband technologies.
Because of per-minute costs, ISDN is used considerably less; however, ISDN at rate is
becoming available and will make ISDN a good option for areas where DSL or cable is
not available. Last-mile wireless is a new option that is being piloted in certain areas to
determine viability.
The minimum recommended broadband data rate for most deployments is 160 kbps
(uplink)/860 kbps (downlink). Data rates below this speed require more troubleshooting by
support staff and are less likely to provide acceptable voice quality. The recommended data
rate for V3PN teleworker deployments is 256 kbps (uplink)/1.4 Mbps (downlink) or higher
rates. Although V3PN can be deployed at rates less than 160 kbps/860 kbps, generally the
voice quality at that service level is in the cell phone quality range, and support costs are
higher.
Because QoS design for ISDN was discussed in Chapter 13, and because wireless as a lastmile broadband technology has yet to gain wide deployment, this section focuses only on
DSL and cable broadband technologies.
DSL and cable topologies are illustrated in Figure 16-20. Cable is a shared medium
between the teleworkers cable modem and the broadband providers cable headend router.
DSL is a dedicated circuit between the teleworkers DSL modem (bridge) and the DSL
Access Multiplexer (DSLAM). Both cable and DSL offerings utilize shared uplinks
between these aggregation devices and the service providers core network. QoS typically
672
is not provisioned within the broadband service providers cloud in either medium. This
lack of QoS within the broadband cloud underscores the requirement of adequate QoS
provisioning at the endpoints of the VPN tunnels.
Figure 16-20 DSL and Cable Topologies
IPSec V3PN
Headend
Routers
ATM
ATM
DSLAM/IP
DSL Switch
DSL
Bridge
Cable
Modem
IPSec V3PN
Teleworker
Routers
Broadband
Service Provider
Broadband Router
673
Residential access speeds are generally 128 to 384 kbps upstream and 608 kbps to 1.5 Mbps
downstream. For ADSL circuits with upstream speeds less than 256 kbps, G.729 VoIP
codecs are recommended.
ADSL also utilizes a single best-effort PVC using RFC 2516based PPP over Ethernet
(PPPoE) encapsulation. In DSL networks, delay and jitter are very low but are not guaranteed. Because PPPoE is used, no LFI is available in service provider DSL networks. In the
future, QoS at Layer 2 might be available across service provider networks using familiar
ATM variable bit-rate (VBR) denitions.
Single-pair high bit-rate DSL (G.SHDSL) is the new high-speed standard for business
DSL. Most residences will continue to be served by ADSL, while small business and
branch ofces likely will use G.SHDSL. G.SHDSL offers varying rates controlled by the
service provider; the upstream and downstream rates are the same speed (symmetric).
G.SHDSL is seen as an eventual replacement for T1s in the United States and will become
increasingly available from more service providers.
The telecommuter deployment options for DSL circuits include all three teleworker
deployment models: Integrated Unit, Dual-Unit, and Integrated Unit + Access, as shown
in Figure 16-21.
Figure 16-21 Teleworker Deployment Models for DSL
DSL
Backbone
IP
To Enterprise
VPN
Device
Integrated Unit +
Access Model
IP
831/171X
DSL
Modem
Cable
Cable offers a shared service with symmetric speeds varying from 100 kbps to 4 Mbps. In
the past, delay and jitter varied too greatly over cable, making it unsuitable for VoIP.
The common installed base of cable services today is made up of Data-over-Cable Service
Interface Specications (DOCSIS) 1.0. No LFI is available with DOCSIS 1.0, although
DOCSIS 1.1 denes fragmentation and interleaving mechanisms.
674
DOCSIS 1.1 also provides the capabilities to shape trafc at Layer 2 before transmission
over the cable network. Although the circuit and frequencies physically are shared, access
to the medium can be controlled by the headend so that a device can be guaranteed specied
bandwidth.
At the time of this writing, the only recommended deployment model for cable is the
Integrated Unit + Access Model, as shown in Figure 16-22.
Figure 16-22 Teleworker Deployment Model for Cable
Integrated Unit +
Access Model
DSL
Backbone
To Enterprise
IP
831/171X
DSL
Modem
Bandwidth Provisioning
A few key differences with respect to bandwidth provisioning need to be taken into account
for broadband teleworker scenarios, as compared to site-to-site VPNs.
The rst is that usually only a single call needs to be provisioned for (unless two teleworkers share a single residential broadband connection, which is rarely the case). If bandwidth
is low, G.729 codecs are recommended. The second key bandwidth-provisioning consideration is the inclusion of the overhead required by the broadband access technologies,
whether DSL or cable.
NOTE
675
exchange between the peers. This feature addresses the environment in which IPSec
packets must pass through a NAT/pNAT device, and it adds 16 bytes to each voice and data
packet. The overhead that this feature adds is shown in Figure 16-23.
Figure 16-23 NAT Transparency Feature (Layer 3) Overhead
IPSec ESP Tunnel Mode UDP Encapsulation 128 Bytes
IP
Hdr
UDP
Hdr
Non-IKE
Mkr
ESP
Hdr
ESP
IV
IP
Hdr
UDP
RTP
Voice
ESP
Pad/NH
ESP
Auth
20
20
12
20
2-257
12
Encrypted
This feature adds
16 bytes per packet
or 6400 bps per
G.729 call.
Authenticated
No additional overhead is caused by NAT transparency on a G.729 call over DSL (PPPoE/
AAL5) because there is enough AAL5 cell padding to absorb the 16 additional bytes per
packet (discussed in more detail in the following section). In cable implementations, these
additional 16 bytes increase the number of bits on the wire and, thus, the overall bandwidth
consumption. At the headend, NAT transparency increases the bandwidth consumption of
VoIP trafc by 1 Mbps for approximately every 82 concurrent G.729 calls; on the teleworker
router, NAT transparency increases the bandwidth required by 6.4 kbps per G.729 call.
Unless there is a need to implement this feature, the recommendation is to disable it when
bandwidth conservation is a requirement. This feature can be disabled with the no crypto
ipsec nat-transparency udp-encapsulation global conguration command.
676
Figure 16-24 IPSec-Encrypted G.729 Packet Size Through AAL5 + PPPoE Encapsulation
PPP
LLC 802.3 oE IPSec
Snap Hdr PPP
Hdr
10
14
ESP ESP
Hdr IV
20
IP
Hdr
UDP
RTP
Voice
ESP
Pad/NH
ESP
Auth
20
12
20
12
AAL5 AAL5
Pad Trail
40
The 192 bytes of cell payload are incorporated through ATM SAR into the (48-byte)
payloads of four 53-byte ATM cells (192 / 48 = 4 cells).
Therefore, the bandwidth required for an IPSec (only) encrypted G.729 VoIP call over DSL
is calculated as follows:
Thus, an encrypted G.729 call requires 85 kbps of bandwidth, while an encrypted G.711
requires seven ATM cells or 148,400 bps on the wire.
This results in the LLQ conguration values of 85 kbps (priority 85) for a G.729 VoIP call
and 150 kbps for a G.711 (priority 150) VoIP call, respectively, for DSL.
Cable Overhead
For cable deployments, the Layer 2 overhead is less than that for DSL. The IPSec packet is
encapsulated in an Ethernet header (and trailer) that includes a 6-byte DOCSIS header, as
shown in Figure 16-25.
Figure 16-25 IPSec-Encrypted G.729 Packet Size Through Ethernet and DOCSIS Encapsulation
DOC 802.3 IPSec
SIS
Hdr
Hdr Hdr
14
20
ESP ESP
Hdr IV
8
IP
Hdr
UDP
RTP
Voice
ESP
Pad/NH
ESP
Auth
802.3
CRC
20
12
20
12
677
If baseline privacy is enabled (baseline privacy encrypts the payload between a cable
modem and the headend), the extended header is used, adding another 5 bytes.
The packet size of a G.729 call (with a zero-length extended header) is 136 bytes or
54,400 bps (at 50 pps); a G.711 call is 280 bytes or 112,000 bps (at 50 pps).
To simplify conguration and deployment, the values of 64 kbps (for G.729) and 128 kbps
(for either G.729 or G.711) can be used for priority queue denition for cable.
678
NOTE
It is not recommended to run UDP-based video applications on broadband links 768 kbps
that do not support Layer 2 LFI in a V3PN teleworker scenario. This is because such
applications regularly generate large UDP packets that, obviously, are not subject to TCP
MSS and thus can cause signicant and unmitigatable serialization delays to VoIP packets.
The recommended TCP MSS value of 542 was calculated to eliminate the IPSec crypto
algorithm (3DES) padding and the ATM AAL5 padding in DSL implementations (cable
implementations have 3DES padding but no AAL5). Therefore, a TCP MSS value of 542
bytes is valid for cable but is optimized for DSL. Figure 16-26 illustrates a TCP packet with
an MSS size of 542.
NOTE
Both the ESP and AAL5 pad lengths are 0. A TCP packet with a TCP MSS value of 542 ts
exactly into 14 ATM cells, with no wasted bytes because of cell padding.
679
Figure 16-26 Optimized TCP MSS Value for DSL (542 Bytes)
AAL5
10
ATM
Hdr
IP
TCP
MISS
Size
20
20
542
IPSec
Hdr
ESP
SPI
ESP
Seq
ESP
IV
IP
TCP
MISS
Size
20
20
20
542
Ethernet
Header
PPPoE
SAR PDU
48 Bytes
ATM
Hdr
ESP
PAD Pad Len/
NH
0
ESP
Auth
12
Encrypted Packet
14
582
Bytes
632
SAR PDU
48 Bytes
ATM
Hdr
IPSec ESP
Tunnel Mode
SHA-1 3DES
632 Bytes
PAD
AAL5
672
Bytes
SAR PDU
48 Bytes
14 Cell Total
The evident negative aspect of using this technique to minimize the impact of serialization
delay is the decreased efciency of large data transfers, coupled with an increase in the
number of packets per second that the router must switch. The higher packets-per-second
rate is not as much of an issue at the remote router as at the headend, where hundreds or
thousands of remote connections are concentrated. However, adjusting the TCP MSS value
provides a means for the network manager to deploy voice over broadband connections,
which do not support any LFI mechanism at rates less than 768 kbps.
Split Tunneling
The teleworker is usually not the only user of the residential broadband connection. The
workers spouse and children also might utilize this link from other devices, such as
additional PCs or laptops or even gaming units. In such cases, only work-related trafc
would require encryption and could be given a preferential treatment, through QoS, over
general Internet trafc.
In this situation, prioritization could be made based on the destination address of the trafc.
One method to accomplish this would be to create a separate bandwidth class (for example,
named CORPORATE) and provision this class with a dedicated CBWFQ queue.
680
Given the sample topology illustrated in Figure 16-27, a suitable QoS conguration is
broken down as follows:
VOICEA single calls VoIP packets assigned to an LLQ, with the bandwidth
allocation based on codec and broadband media (DSL or cable).
CORPORATEAll other trafc that is destined to the enterprise through the IPSec
tunnel, in a CBWFQ queue, allocated 25 percent.
Broadband/Internet
Service Provider
IPSec
Headend
Router(s)
150.102.223.4
The following conguration fragment provides a means to implement this policy. It assumes
that the headend IPSec crypto peers reside on network 150.102.223.0/29. In this example
environment, two peers are congured at 150.102.223.3 and 150.102.223.4. Packets within
the IPSec tunnelthose matching the CORP-INTRANET access control list (identifying
RFC 1918 private addresses that are assumed in this example to represent the intranets
behind the headends)will be encapsulated in an ESP (IPSec-IP protocol 50) IP header. A
class-map CORPORATE is congured that references the CORPORATE extended access
list, pointing to the VPN headend subnet.
A policy map named V3PN-SPLIT-TUNNEL is created that includes classes for VOICE,
INTERNETWORK-CONTROL, and CALL-SIGNALING, along with a bandwidth class
for CORPORATE.
681
In this example, the VOICE class is provisioned for a G.711 codec over a (384-kbps) DSL
uplink, allocating 150 kbps (or 40 percent, whichever syntax is preferred) for VoIP.
Example 16-8 shows the relevant conguration fragment.
Example 16-8 V3PN-SPLIT-TUNNEL Policy Example
!
crypto map SPLIT-TUNNEL-CRYPTO-MAP 1 ipsec-isakmp
set peer 150.102.223.3
set peer 150.102.223.4
set transform-set TS
! References CORP-INTRANET ACL
match address CORP-INTRANET
! Enables QoS Pre-Classify
qos pre-classify
!
!
class-map match-all VOICE
match ip dscp ef
! VoIP
class-map match-any INTERNETWORK-CONTROL
match ip dscp cs6
! IP Routing
! References ISAKMP ACL
match access-group name IKE
class-map match-any CALL-SIGNALING
match ip dscp cs3
! New Call-Signaling
match ip dscp af31
! Old Call-Signaling
class-map match-all CORPORATE
! References CORPORATE ACL
match access-group name CORPORATE
!
policy-map V3PN-SPLIT-TUNNEL
class VOICE
priority 150
! Encrypted G.711 over DSL (PPPoE/AAL5)
class INTERNETWORK-CONTROL
bandwidth percent 5
! Control Plane provisioning
class CALL-SIGNALING
bandwidth percent 5
! Call-Signaling provisioning
class CORPORATE
bandwidth percent 25
! "Work-related" traffic provisioning
queue-limit 15
! Optional: Anti-Replay Tuning
class class-default
fair-queue
queue-limit 15
! Optional: Anti-Replay Tuning
!
...
!
ip access-list extended CORP-INTRANET
! CORP-INTRANET ACL (RFC 1918)
permit ip any 10.0.0.0 0.255.255.255
permit ip any 172.16.0.0 0.15.255.255
permit ip any 192.168.0.0 0.0.255.255
!
ip access-list extended IKE
! ISAKMP ACL
permit udp any eq isakmp any eq isakmp
!
ip access-list extended CORPORATE
! CORPORATE ACL (VPN Head-ends)
permit esp any 150.102.223.0 0.0.0.7
!
682
Furthermore, there are two main broadband deployment media: DSL and cable. DSL
supports all three teleworker deployment models, but cable supports (at the time of writing)
only the Integrated Unit + Access Model.
Best-Effort
50%
Call-Signaling 5%
Internetwork Control 5%
683
Example 16-9 Integrated Unit/Dual-Unit V3PN Teleworker QoS Design Example for a 384-kbps (PPPoE/ATM)
DSL Uplink
!
class-map match-all
match ip dscp ef
class-map match-any
match ip dscp cs6
match access-group
class-map match-any
match ip dscp cs3
match ip dscp af31
VOICE
! VoIP
INTERNETWORK-CONTROL
! IP Routing
name IKE
! References ISAKMP ACL
CALL-SIGNALING
! New Call-Signaling
! Old Call-Signaling
!
!
policy-map V3PN-TELEWORKER
class VOICE
priority 150
class INTERNETWORK-CONTROL
bandwidth percent 5
class CALL-SIGNALING
bandwidth percent 5
class class-default
fair-queue
queue-limit 30
continues
684
Example 16-9 Integrated Unit/Dual-Unit V3PN Teleworker QoS Design Example for a 384-kbps (PPPoE/ATM)
! ISAKMP ACL
Verication commands:
show policy
show policy interface
show atm pvc
384 kbps
Cable Uplink Rate
Shaped to 95%
of Uplink Rate
Best-Effort
60%
Call-Signaling 5%
Internetwork Control 5%
685
VOICE
! VoIP
INTERNETWORK-CONTROL
! IP Routing
name IKE
! References ISAKMP ACL
CALL-SIGNALING
! Old Call-Signaling
! New Call-Signaling
!
!
policy-map V3PN-TELEWORKER
class VOICE
priority 128
class INTERNETWORK-CONTROL
bandwidth percent 5
class CALL-SIGNALING
bandwidth percent 5
class class-default
fair-queue
queue-limit 30
Verication commands:
show policy
show policy interface
686
687
Central
Campus
Tunnel 101
10.100.101.0/30
Branch
Tunnel 102
10.100.102.0/30
20.20.20.0/30
ATM OC3
VPN HE 1
WAG 1
VPN HE 2
WAG 2
Internet
Service
Provider
20.20.20.4/30
ATM OC3
Central Site
Intranet
192.168.1.0/24
Branch
Intranet
172.16.1.0/24
25.25.25.0/30
Frame Relay T1
Broadband
Service
Provider
VPN Headend
Subnet
100.100.100.0/24
ADSL
1.5 Mbps Downlink
384 kbps Uplink
DHCP
Teleworker
Teleworker
Intranet
10.200.1.0/24
The conguration solution for this example spans multiple routers: VPN headend routers
(see Example 16-11), WAN aggregators (see Example 16-12), branch routers (see Example
16-13), and telecommuter routers (see Example 16-14). To minimize redundancy, only a
single example of each router type is presented.
A key point to notice in the VPN headend designs, as detailed in Example 16-11, is that
QoS Pre-Classify is not required because encryption and QoS are being performed on
separate routers at the central site.
Example 16-11 Case Study Example: Part 1, VPN Headend Design
!
hostname VPN-HEADEND-1
!
ip cef
!
continues
688
Example 16-11 Case Study Example: Part 1, VPN Headend Design (Continued)
!
crypto isakmp policy 1
encr 3des
authentication pre-share
group 2
crypto isakmp key SECRETKEY address 25.25.25.1
!
!
crypto ipsec transform-set V3PN-TS esp-3des esp-sha-hmac
!
crypto map V3PN-CM 10 ipsec-isakmp
set peer 25.25.25.1
set transform-set V3PN-TS
match address V3PN-SITE1
[REPEAT CRYPTO MAP ENTRIES FOR EVERY REMOTE SITE, INCLUDING TELEWORKER SITES]
!
crypto map static-map local-address GigabitEthernet0/1
!
...
!
interface Tunnel101
ip address 10.100.101.1 255.255.255.252
tunnel source 100.100.100.1
tunnel destination 25.25.25.1
! Applies crypto-map to tunnel interface
crypto map V3PN-CM
!
[REPEAT TUNNEL INTERFACES FOR EVERY REMOTE SITE, INCLUDING TELEWORKER SITES]
!
interface GigabitEthernet0/1
description CENTRAL SITE DATA SUBNET
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
media-type rj45
no negotiation auto
!
!
interface GigabitEthernet0/2
description VPN HEADEND SUBNET
ip address 100.100.100.1 255.255.255.0
duplex auto
speed auto
media-type rj45
no negotiation auto
! Applies crypto map to GE 0/2
crypto map V3PN-CM
!
...
!
ip access-list extended V3PN-SITE1
permit gre host 100.100.100.1 host 25.25.25.1
!
689
Verication commands:
show policy
show policy interface
Some key points to notice in the WAN aggregator designs, as detailed in Example 16-12,
include these:
Because the central sites link to the ISP is a (very) high-speed ATM PVC (OC3), no
tuning of the Tx-ring is required.
ISAKMP trafc is not encrypted and thus can be classied by a simple ACL (UDP
port 500).
A six-class V3PN policy has been deployed on the WAN aggregators edge.
WRED in conjunction with queue-limit tuning is supported on distributed platforms
(such as the Cisco 7500), although it currently is not supported on nondistributed
platforms (until the release of Consistent QoS Behavior, as described in Chapter 13).
Example 16-12 Case Study Example: Part 2, WAN Aggregator QoS Design
!
hostname WAG-1
!
ip cef distributed
!
class-map match-all VOICE
match ip dscp ef
class-map match-any CALL-SIGNALING
match ip dscp cs3
match ip dscp af31
class-map match-any INTERNETWORK-CONTROL
match ip dscp cs6
match access-group name IKE
class-map match-all TRANSACTIONAL-DATA
match ip dscp af21 af22
class-map match-all SCAVENGER
match ip dscp cs1
!
!
policy-map SIX-CLASS-V3PN-EDGE
class VOICE
priority percent 33
class CALL-SIGNALING
bandwidth percent 5
class INTERNETWORK-CONTROL
bandwidth percent 5
! Distributed platform
! VoIP
! New Call-Signaling
! Old Call-Signaling
! IP Routing
! References ISAKMP ACL
! Transactional-Data
! Scavenger
continues
690
Example 16-12 Case Study Example: Part 2, WAN Aggregator QoS Design (Continued)
class TRANSACTIONAL-DATA
bandwidth percent 31
random-detect dscp-based
queue-limit 20
class SCAVENGER
bandwidth percent 1
queue-limit 1
class class-default
bandwidth percent 25
random-detect dscp-based
queue-limit 16
!
...
!
interface GigabitEthernet1/0/0
description VPN HEADEND SUBNET
ip address 100.100.100.3 255.255.255.0
duplex auto
speed auto
media-type rj45
no negotiation auto
!
...
!
interface ATM1/1/0
no ip address
no atm ilmi-keepalive
!
interface ATM1/1/0.100 point-to-point
description ATM OC3 TO ISP
ip address 20.20.20.1 255.255.255.252
pvc 0/100
vbr-nrt 149760 149760
service-policy out SIX-CLASS-V3PN-EDGE
!
!
...
!
ip access-list extended IKE
permit udp any eq isakmp any eq isakmp
!
Verication commands:
show policy
show policy interface
! Transactional-Data provisioning
! WRED + QL tuning supported on 7500
! Optional: Anti-Replay tuning
! Scavenger class is throttled
! Optional: Anti-Replay tuning
! Best Effort needs BW guarantee
! WRED + QL tuning supported on 7500
! Optional: Anti-Replay Tuning
! ISAKMP ACL
691
Some key points to notice in the V3PN branch router designs, as detailed in Example 16-13,
include these:
A six-class V3PN policy has been deployed on the branch VPN access edge.
Even though Frame Relay is being used as the access medium, no shaping is required
because all sites are running at full (T1) port speeds.
QoS Pre-Classify is enabled on both crypto map entries and tunnel interfaces, to
enhance performance.
The delay parameter has been tuned on the tunnel interfaces to inuence the routing
protocols (EIGRP, in this instance) choice for primary and secondary tunnels.
Example 16-13 Case Study Example: Part 3, V3PN Branch Router Design
!
hostname V3PN-BRANCH-1
!
ip cef
!
!
crypto isakmp policy 1
encr 3des
authentication pre-share
group 2
crypto isakmp key SECRETKEY address 100.100.100.1
crypto isakmp key SECRETKEY address 100.100.100.2
!
!
crypto ipsec transform-set V3PN-TS esp-3des esp-sha-hmac
!
crypto map V3PN-CM 10 ipsec-isakmp
set peer 100.100.100.1
set transform-set V3PN-TS
match address V3PN-HE1
! Enables QoS Pre-Classify
qos pre-classify
crypto map V3PN-CM 20 ipsec-isakmp
set peer 100.100.100.2
set transform-set V3PN-TS
match address V3PN-HE2
! Enables QoS Pre-Classify
qos pre-classify
!
crypto map static-map local-address Serial0/0
!
continues
692
Example 16-13 Case Study Example: Part 3, V3PN Branch Router Design (Continued)
!
class-map match-all VOICE
match ip dscp ef
class-map match-any CALL-SIGNALING
match ip dscp cs3
match ip dscp af31
class-map match-any INTERNETWORK-CONTROL
match ip dscp cs6
match access-group name IKE
class-map match-all TRANSACTIONAL-DATA
match ip dscp af21 af22
class-map match-all SCAVENGER
match ip dscp cs1
!
!
policy-map SIX-CLASS-V3PN-EDGE
class VOICE
priority percent 33
class CALL-SIGNALING
bandwidth percent 5
class INTERNETWORK-CONTROL
bandwidth percent 5
class TRANSACTIONAL-DATA
bandwidth percent 31
queue-limit 20
class SCAVENGER
bandwidth percent 1
queue-limit 1
class class-default
bandwidth percent 25
queue-limit 16
!
!
...
!
interface Tunnel101
ip address 10.100.101.2 255.255.255.252
delay 50000
qos pre-classify
tunnel source 25.25.25.1
tunnel destination 100.100.100.1
crypto map V3PN-CM
!
interface Tunnel102
ip address 10.100.102.2 255.255.255.252
delay 60000
qos pre-classify
tunnel source 25.25.25.1
tunnel destination 100.100.100.2
crypto map V3PN-CM
!
!
! VoIP
! New Call-Signaling
! Old Call-Signaling
! IP Routing
! References ISAKMP ACL
! Transactional-Data
! Scavenger
693
Example 16-13 Case Study Example: Part 3, V3PN Branch Router Design (Continued)
interface FastEthernet0/0
description V3PN-BRANCH-1 INTRANETS
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
...
!
interface Serial0/0
description FRAME RELAY T1 TO ISP
bandwidth 1536
ip address 25.25.25.1 255.255.255.252
service-policy output SIX-CLASS-V3PN-EDGE ! MQC policy applied to T1 int
encapsulation frame-relay
frame-relay interface-dlci 100
crypto map V3PN-CM
!
...
!
! ISAKMP ACL
ip access-list extended IKE
permit udp any eq isakmp any eq isakmp
!
ip access-list extended V3PN-HE1
permit gre host 25.25.25.1 host 100.100.100.1
!
ip access-list extended V3PN-HE2
permit gre host 25.25.25.1 host 100.100.100.2
!
Verication commands:
show policy
show policy interface
Some key points to notice in the V3PN teleworker router designs, as detailed in Example 16-14,
include these:
In this example, an ADSL link (of 1536 kbps downlink and 384 kbps uplink)
is provisioned for V3PN. Because of the overhead of DSL, VoIP bandwidth is
provisioned for 150 kbps (which can support either G.711 or G.729).
A hierarchical QoS policy is set to shape (and queue within the shaped rate) to
70 percent of the uplinks rate and is applied to the Ethernet interface facing the
DSL modem.
694
A split-tunneling policy is provisioned on teleworker routers, determining workrelated trafc as being destined to private intranet addresses.
695
Verication commands:
show policy
show policy interface
696
Summary
IPSec VPNs, the most commonly deployed VPN solutions today, are found in three main
contexts: site-to-site VPNs, teleworker VPNs, and remote-access VPNs. The overlaying of
QoS technologies on top of IPSec VPNs is dubbed V3PN, for voice- and video-enabled
Virtual Private Networks. This chapter presented considerations and design recommendations for V3PN deployments in site-to-site and teleworker contexts. A summary of the
design recommendations for encryption and QoS for site-to-site and teleworker IPSec
V3PNs is illustrated in Figure 16-31.
Figure 16-31 IPSec V3PN Site-to-Site and Teleworker Design Summary Comparison
Encryption
IPSec/GRE
LLQ/CBWFQ/LFI
HDLC
MLP
ATM
WAN Media
Site-to-Site
QoS
Frame
Relay
Ethernet
IPSec Only
Hierarchical Shaping +
Queuing + TCP MSS
DSL
Cable
Broadband Media
Teleworker
Some site-to-site considerations that were discussed include the bandwidth implications
of various IPSec modes of operations and the incompatibility of cRTP and IPSec. The
interrelation of IPSec VPN logical hub-and-spoke topologies and the effect these have on
spoke-to-spoke delay budgets also were examined. Subsequently, the ToS byte preservation
mechanism was overviewed along with the QoS Pre-Classify Cisco IOS Software feature,
which allows for the classication of packets already encrypted (on the same router)
through ACLs. QoS and Anti-Replay implications then were discussed, illustrating how
QoS policies that reorder packets potentially can exacerbate Anti-Replay drops (an IPSec
message-integrity mechanism). Techniques for minimizing such undesired QoS/Anti-Reply
interaction effects, such as reducing the queue length of data queues, were presented. Next,
the need for control plane provisioning was highlighted, along with basic designs for doing so.
Several site-to-site QoS models were detailed, ranging from a six-class V3PN QoS model
to a complex 11-class V3PN QoS Baseline model. WAN aggregator considerations specic
to IPSec VPN deployments were examined next, including QoS provisioning for IPSec
over private WANs, per-tunnel hierarchical shaping and queuing, and recommendations for
decoupled VPN headend/WAN aggregation deployment models, where encryption and
QoS are performed on different routers.
Further Reading
697
Attention then shifted to teleworker scenarios and the three main teleworker deployment
models: the Integrated Unit Model, the Dual-Unit Model, and the Integrated Unit + Access
Model. The two main broadband media types, DSL and cable, were broken down to
ascertain the bandwidth-provisioning implications of each media. Neither DSL nor
(DOCSIS 1.0) cable includes any mechanism for serialization delay mitigation, so TCP
maximum segment-size tuning was considered as an alternative mechanism to achieve this.
Split-tunneling designs, to address spouse-and-child requirements, were introduced.
Teleworker V3PN designs then were detailed for Integrated Unit and Dual-Unit models
over DSL, in addition to an Integrated Unit + Access Model solution for cable.
The chapter concluded with a case study (which, likewise, concluded the case studies
presented in each previous design chapter) highlighting how an enterprise could overlay
QoS on top of an existing site-to-site IPSec VPN to enable a V3PN. Additionally, a solution
was presented for a business-ready teleworker.
Further Reading
Standards:
RFC 2404, The Use of HMAC-SHA-1-96 within ESP and AH: http://www.ietf.org/
rfc/rfc2404.txt.
RFC 2405, The ESP DES-CBC Cipher Algorithm with Explicit IV:
http://www.ietf.org/rfc/rfc2405.txt.
RFC 2403, The Use of HMAC-MD5-96 Within ESP and AH: http://www.ietf.org/
rfc/rfc2403.txt.
698
RFC 2410, The NULL Encryption Algorithm and Its Use with IPSec:
http://www.ietf.org/rfc/rfc2410.txt.
RFC 2412, The OAKLEY Key Determination Protocol: http://www.ietf.org/rfc/
rfc2412.txt.
Books:
Mason, Andrew. Cisco Secure Virtual Private Networks. Indianapolis: Cisco Press,
2001.
Malik, Saadat. Network Security Principles and Practices. Indianapolis: Cisco Press,
2002.
Conguring Internet Key Exchange Security Protocol (Cisco IOS Release 12.2):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/
fsecur_c/psenc/scke.htm.
Quality of service for Virtual Private Networks (Cisco IOS Release 12.2[2]T):
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122newft/
122t/122t2/ftqosvpn.htm.
Low-latency queuing (LLQ) for IPSec encryption engines (Cisco IOS Release
12.2[13]T): http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/
122newft/122t/122t13/llqfm.htm.
Further Reading
699
QoS Tools
QoS is the measure of transmission quality and service
availability of a network (or internetworks). The
transmission quality of the network is determined
by the following factors: Latency, Jitter, and Loss.
L3 IP Packet
L4 Segment
L7 Data Payload
NBAR PDLM
Delay
(Latency)
DelayVariation
(Jitter)
Packet
Loss
Classification
and Marking
STOP
used
IP Precedence
Un
IP ECN
RFC 3168
IP ECN Bits
Policing and
Markdown
Traffic Shaping
Scheduling
(Queuing and
Selective-Dropping)
Link-Specific
Mechanisms
cut here
cut here
Application
1
IP Routing
L3 Classification
PHB
DSCP
CS6
48
Voice
EF
46
RFC 3246
Interactive-Video
AF41
34
RFC 2597
Streaming-Video
CS4
32
RFC 2474-4.2.2
Mission-Critical Data
AF31
26
RFC 2597
Call-Signaling
CS3
24
RFC 2474-4.2.2
Transactional Data
AF21
28
RFC 2597
CS2
16
RFC 2474-4.2.2
8 Network-Management
9
Bulk Data
AF11
Bulk Data
10
RFC 2597
10
Scavenger
CS1
Scavengor
Internet 2
No BW Guarentee + RED
11
Best-Effort
0Best Effort
RFC 2474-4.1
The IP Routing class is intended for IP Routing protocols, such as BGP, OSPF, etc.
Voice refers to VoIP bearer traffic only (and does not include Call-Signaling traffic).
The Call-Signaling class is intended for voice and/or video signaling traffic,
such as Skinny, SIP, H.323, etc.
RFC 2474-4.2.2
Recommended Configuration
13
Referencing
Standard 12
10
11
The Best-Effort class is also the default class. Unless an application has been
assigned for preferential/deferential service, it remains in this default class.
Most enterprises have hundredsif not thousandsof applications on their
networks; the majority of which will remain in the Best-Effort service class.
12
13
QoS Best-Practices
A successful QoS deployment includes three
key phases:
Strategically defining the business objectives to
be achieved via QoS.
Analyzing the service-level requirements of
the traffic classes.
Designing and testing QoS policies
1 Strategically defining the business objectives to
be achieved by QoS.
Business QoS objectives need to be defined:
Is the objective to enable VoIP only or is video
also required?
If so, is video-conferencing required or streaming
video? Or both?
Are there applications that are considered
mission-critical? If so, what are they?
Does the organization wish to squelch certain
types of traffic? If so, what are they?
Does the business want to use QoS tools to
mitigate DoS/worm attacks?
How many classes of service are needed to
meet the business objectives?
Because QoS introduces a system of managed unfairness,
most QoS deployments inevitably entail political and
organizational repercussions when implemented. This is
typically because disagreement often arises over which
applications are to be considered "mission-critical,"
which is a non-technical, subjective evaluation (MissionCritical applications are foreground, interactive
applications that most directly contribute to the main
business objective of the enterprise).
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.
Application
Predictable Flows
Drop + Delay Sensitive
UDP Priority
150-ms one-way delay
30-ms jitter
1% loss
17 kbps-106 kbps VoIP
+Call-Signaling
Voice
Unpredictable Flows
Drop + Delay Sensitive
Video
UDP Priority
150-ms one-way delay
30-ms jitter
1% loss
Overprovision stream by 20% to
account for headers + bursts
PBH
DSCP
Routing
CS6
48
Voice
EF
46
Interactive-Video
AF41
34
32
Streaming-Video
CS4
Mission-Critical Data
AF31
26
Call-Signaling
CS3
24
Transactional Data
AF21
28
Network-Management
CS2
16
10
Bulk Data
AF11
Bulk Data
Scavengor
CS1
Scavengor
Best-Effort
0Best Effort
Scavenger
Best-Effort
25%
Real-Time
33%
InteractiveVideo
Bulk Data
Critical Data
Data
Streaming-Video
Internetwork
Control
Network-Management
cut here
Call-Signaling
cut here
Scavenger/DSCP CS1
Normal/Abnormal Threshold
Best-Effort
Policing Policy
Policing Policy
Normal Traffic
Normal Traffic
Scavenger
Best-Effort
25%
Bulk Data
Real-Time
35%
InteractiveVideo
Critical
20%
StreamingVideo
Call-Signaling
NetworkManagement
Routing
Transactional
Data
Mission-Critical
Data
Anomalous Traffic
Queuing Policy
Routing
DSCP
CS6
48
VVLAN +
DSCP EF
Yes
EF
46
Interactive-Video
AF41
34
CoS
CoS 7
CS6
CoS 6
EF
CoS 5
AF41
CoS 4
CS4
CoS 4
DSCP 25
CoS 3
AF31/CS3
CoS 3
AF21
CoS 2
CS2
CoS 2
AF11
CoS 1
1P3Q1T
No
Yes
No
CoS 6
Drop
VVLAN +
DSCP
CS3
Yes
32 kbps
Yes
32 kbps
DVLAN
ANY
Yes
5 Mbps
Yes
Re-Mark to DSCP 0
Streaming-Video
CS4
32
Mission-Critical
AF31
26
Call-Signaling
CS3
24
Transactional Data
AF21
28
Network-Management
CS2
16
Bulk Data
AF11
Bulk Data
10
Trust-DSCP + Queuing
Conditional Trust +
Policing + Queuing
Scavengor
CS1
Scavengor
Untrusted + Policing +
Queuing
Best-Effort
0Best Effort
Per-User Microflow
Policing
No
CoS 3
CoS 0
Re-Mark to DSCP 0
No
Yes
Queue 3
(70%)
CoS 2
Yes
CoS 4
No
No
VVLAN
ANY
Q4
Priority Queue
CoS 7
128 kbps
No
Voice
DSCP
CoS 5
Start
L3 Classification
PBH
CS1
CoS 1
Queue 2
(25%)
Queue 1 (5%)
CoS 1
Queue 1 (5%)
Server Farms
cut here
IP Phones + PCs
IP Phones + PCs
cut here
Real-Time
8-Class Model
Voice 18%
Call-Signaling
Call-Signaling
Branch
Scavenger 1%
Voice
InteractiveVideo 15%
Bulk Data
4%
WAG
StreamingVideo 10%
Interactive-Video
Video
WAG
Best-Effort
25%
QoS Baseline
Model
Voice
Transactional
Data 7%
Streaming-Video
Call-Signalling
Mission-Critical
Data 10%
Call-Signaling
5%
Routing 3%
Network-Management
Frame Relay
Cloud
Branch
IP Routing
Network Control
Mission-Critical Data
Critical Data
UDP Hdr
8 Bytes
RTP Hdr
12 Bytes
VoIP
Mission-Critical Data
Transactional Data
Bulk Data
cRTP Header
2-5 Bytes
Best-Effort
Best-Effort
Scavenger
Scavenger
Scavenger
ATM
Cloud
Branch
cRTP saves:
~20% for G.711
~60% for G.729
Bulk Data
Best-Effort
WAG
VoIP
FR
Cloud
Branch
Time
Data
Data
VoIP
Data
Scavenger 1%
InteractiveVideo 15%
Bulk Data
4%
2. The propagation
mechanism
3. The payload
Call-Signaling
5%
Routing 3%
Network-Management
2%
Misson-Critical
Data 15%
Transactional
Data 12%
1 Unidirectional Applications
L2 Frame
L3 IP Packet
L4 Segment
L7 Data Payload
Worm
2 Ingress Classification
Branch Router
Branch Switch
DVLAN
WAN/VPN
VVLAN
cut here
WAN Edge
LAN Edge
Optional: DSCP-to-CoS Mapping Policies
for Campus-to-Branch Traffic
cut here
WAN
Branch
Branch CE
Central CE
MPLS
VPN
Branch CE
Service-Provider PE Routers
QoS Design
for MPLS
VPN Subscribers
MPLS VPN service providers offer classes of service to
enterprise subscribers.
Admission criteria for these classes is the DSCP
markings of enterprise traffic. Thus, enterprises may
have to re-mark application traffic to gain admission
into the required service-provider class.
Some best practices to consider when assigning
enterprise traffic to service-provider classes of service
include:
Dont put Voice and Interactive-Video into the Real-Time
class on slow-speed ( 768 kbps) CE-to-PE links.
Dont put Call-Signaling into the Real-Time class on
slow-speed CE-to-PE links.
Dont mix TCP applications with UDP applications
within a single service-provider class (whenever
possible); UDP applications may dominate the class
when congested.
DSCP
Routing
CS6
Voice
EF
Interactive-Video
AF41 CS5
Streaming-Video
CS4 AF21
Mission-Critical Data
DSCP 25 AF31
AF31
Call-Signalling
AF31/CS3 CS5
CS3
Transactional Data
AF21 CS3
Service-Provider
Classes of Service
EF
Real-Time
35%
CS5
CS6
Critical
20%
AF21
Video
15%
CS2
Network-Management
CS2
Bulk Data
AF11
Scavenger
CS1 0
Best-Effort
Bulk Data 5%
AF11/CS1
Best-Effort
25%
Best-Effort
25%
Video
15%
InteractiveVideo 15%
Real-Time
35%
Critical
20%
Call-Signaling 5%
Routing 3%
Transactional
Data 5%
Mission-Critical
Data 12%
MPLS VPN
PE Router
CE Router
PE Router
CE Router
P Routers
IPP3/DSCP AF31
Packet initially
marked to IPP3/
DSCO AF31.
MPLS EXP 4
MPLS EXP 0
MPLS EXP 4
MPLS EXP 0
DSCP AF31
MPLS EXP 4
DSCP AF31
Topmost label is
marked down by
a policer.
DSCP AF31
Topmost label is
popped and EXP
valueis copied to
underlying label.
DSCP AF31
Original customer-marked
IPP/DSCP values are
preserved.
P Routers
CE Router
PE Router
PE Router
CE Router
Required
Optional
MPLS VPN
PE-to-CE
LLQ/CBWFQ/WRED/
Shaping/LFI
RFC 3270 presents three modes of MPLS/DiffServ marking for service providers:
Uniform Mode: Service provider can re-mark customer DSCP values
Pipe Mode: Service provider does not re-mark customer DSCP values (service
provider uses independent MPLS EXP markings); final PE-to-CE policies are
based on service providers markings
Short Pipe Mode (shown above): Service provider does not re-mark customer
DSCP values (service provider uses independent MPLS EXP markings); final
PE-to-CE policies are based on customers markings
Service providers can guarantee service levels within their core by:
Aggregate Bandwidth Overprovisioning: Adding redundant links when utilization
hits 50%(simple to implement, but expensive and inefficient)
Core DiffServ policies: Simplified DiffServ policies for core links
MPLS TE: TE provides granular policy-based control over traffic flows within the core
cut here
cut here
2 Encryption/Decryption Delays
A marginal time element for encryption and decryption should be factored into the end-to-end delay budget
for Real-Time applications, such as VoIP. Typically these processes require 2-10 ms per hop but may be
doubled in the case of spoke-to-spoke VoIP calls that are homed through a central VPN headend hub.
e)
e)
Service
Provider
Si
Si
Campus
1 IPSec Bandwidth Overhead
CODEC
10-50 ms
(Depends on
Sample Siz
Branch
O
Offic
Office
Queuing
Variable
(Can Be Reduced
Using LLQs)
Encrypt
Serialization
Propagation and
Network
Variable
(Can Be Reduced
Using LFI)
Minimal
2-10 ms
End-to-End Delay
(6.3 s / Km) +
Network Delay
(Variable)
Decrypt
Jitter Buffer
Minimal
2-10 ms
20-100 ms
(Depends on
Sample Siz
150 ms
3 Anti-Replay Interactions
Anti-Relay is a standards-defined mechanism to protect IPSec VPNs from hackers. If packets arrive outside of
a 64-byte window, they are considered compromised and are dropped prior to decryption. QoS queuing policies
may reorder packets such that they fall outside of the Anti-Replay window. Therefore, IPSec VPN QoS policies
need to be properly tuned to minimize Anti-Replay drops.
IPSec ESP
Tunnel Mode
G.729 VoIP
136 Bytes
G.729 VoIP
60 Bytes
20
IP
Hdr
UDP
RTP
64-Packet
Anti-Replay
Window
64 Packet
SlidingSliding
Window
Voice
69
GRE
IP
Hdr
UDP
RTP
Voice
20
12
20
ESP
ESP
Pad/NH Auth
2257
12
68
64
65
66
67
3
Anti-Replay
Drop
INDEX
Numerics
10-Class WAN Edge Model, 515
1P2Q1T queuing and dropping, 401404
1P2Q2T queuing and dropping, 405408
1P3Q1T mode, 322
1P3Q1T queuing and dropping, 408410
1P3Q8T queuing and dropping, 411414
1P7Q8T queuing and dropping, 415418
1PxQyT queuing, 36
2Q2T queuing and dropping, 396-398
show qos info config 2q2 tx verification
command, 398
show qos info runtime verification command,
399400
show queuing interface verification command,
400
33 percent limit (sum of LLQs), 450
4Q1T mode, 322
802.11e, 275277
802.1D, classes of service, 279
802.1Q/p, translating to and from DSCP, 9293
A
access control entries (ACEs), 225
access layer
Catalyst 3550 QoS design, 325
policers, 54
access point (AP), 271
access switches
configuring to conditionally trust CoS, 319
access switches (campus networks), 291
access-edge QoS design, 290
access-edge trust boundaries, 302
Conditionally Trusted Endpoint Models, 303,
307312
Trusted Endpoint Models, 302304
Untrusted Endpoint Models, 304307
access-edge utilization, 293
ACEs (access control entries), 225
ACLs, MQC-based class maps, 233
adaptive jitter buffers, 36
admission control, 197
714
B
backbone, 583587
bandwidth
Catalyst 4500, 251
Eight-Class Model, 461
guarantees, 137, 565
ISDN, 501
provisioning, 143, 645
Best-Effort class, 449
Real-Time class, 449
teleworker V3PN QoS, 674677
WAN aggregators, 449
VoIP, 646
reservations, 195
RSVP, 196197
statements, on class default, 457
VoIP streams, 3638
Bc (committed burst), 105, 479
Be (excess burst), 110, 480
bearer trafc
jitter, 3638
latency, 3435
loss, 34
Best-Effort class
bandwidth provisioning, 449
enabling WRED, 457
Best-Effort data, 44
best-effort networks, 11
best-effort service, 15
binary eponential backoff, 274
branch router QoS design, 513
case study, 535540
LAN edge, 517
C
cable, 671-673
DOCSIS 1.1 specification, 678
Integrated Unit + Access Models, 684685
overhead, 676677
uplink connections, 677
CAC (call admision control), 205
CallManager locations CAC, 209211
defined, 206
GK CAC, 211
local CAC tools, 208
measurement-based CAC tools, 208
prering CAC, 212
resource-based CAC tools, 209
RSVP, 212
tool categories, 207
VoIP CAC through RSVP, 215
Call-Signaling
MPLS VPN CE QoS design considerations, 553
campus QoS design, 295
Call-Signaling trafc, jitter, 38
case studies
715
716
case studies
commands
717
718
commands
719
720
CWmax
D
data
applications by class, 4647
QoS, 4243
Best-Effort data, 44
DLSw+, 4748
locally dened Mission-Critical Data, 45
Transactional Data/Interactive Data, 45
data frames (802.11), 272
data VLANs (DVLANs), 314
datagrams, 153
data-link connection identiers (DLCIs), 123
data-link switching plus (DLSw+), 4748
DBL (dynamic buffer limiting), 366-367
DCF (Distributed Coordination Function), 272
Interframe Spaces, 272
random backoffs, 273
DDR (dial-on-demand routing), 503
DDT (delay to dial tone), 38
delay budgets (IPSec VPNs), 647
delay to dial tone (DDT), 38
delay variation, 1314. See also jitter
deploying
IPSec VPNs via DMVPN, 646
LFI tools, 450
policers, 106
QoS designs, 62
Untrusted Server Model on Catalyst 2950, 315
designing QoS
classification and marking principles, 57
deployment, 62
DoS and worm mitigation principles, 6162
policing and markdown principles, 5758
queuing and dropping principles, 5860
destination IP address classication, 520
DHCP, translating to Frame Relay DE bit, 94
dial-on-demand routing (DDR), 503
Differentiated Services code points (DSCPs), 87
DiffServ, 16
advantages of DiffServ model, 16
deploying in backbone
platform specic considerations, 585587
E
EAP (Extensible Authentication Protocols), 308
ECN bit, 164165
ecn keyword, 165
ECT bit, 163
EDCF (Enhanced Distributed Coordination
Function), 275277
EI (Enhanced Image), 232
Eight-Class Model, 460-462
Eight-Class Site-to-Site V3PN Model, 660664
EMI (Enhanced Multilayer Software Image), 243
enabling
MLPoATM, 499
QoS
Catalyst 4500, 248
Catalyst 6500, 254
Catalyst 2970/3750, 343
encryption, delay budgets, 648
end users network expectations, 9
endpoints, 201, 304
end-to-end QoS, 10
Enhanced Distributed Coordination Function
(EDCF), 275, 277
Enhanced Image (EI), 232
Enhanced Multilayer Software Image (EMI), 243
enterprise resource planning (ERP), 42
ERP (enterprise resource planning), 42
errors (Anti-Replay), 655
ESP authentication, 654
721
F
FIFO Tx-ring, 152
Five-Class Model, 456459
Five-Class Provider-Edge Model, 565566
MPLS VPN CE QoS design considerations,
561563
Fixed Slot Time Default values, 278
ow control, disabling, 327
Four-Class Provider-Edge Model, 565
MPLS VPN CE QoS design considerations,
559561
fragment sizes
distributed platform Frame Relay links, 486
WAN link fragmentation, 183184
frame-based codecs, 34
Frame Relay
cRTP, 176
Frame-Relay fragmentation, 185
FRF.11.1 and FRF.12.1, 187188
LFI for Frame Relay/ATM service
interworking, 188189
PVCs, 186187
PIPQ, 150
WAN edge link-specific QoS design, 478
Bc, 479
Be, 480
CIR, 479
distributed platform links, 486487
high-speed links, 484485
medium-speed links, 482484
slow-speed links, 480482
Frame Relay bundles, 148
Frame Relay DE bit, translating to from DSCHP, 94
Frame Relay Dual-FIFO, 150
Frame Relay trafc shaping (FRTS), 122123
722
G-H
G.729 voice compression, 170
G.SHDSL, 673
gatekeepers (GK), 211
generic trafc shaping, 126
GK (gatekeepers), 211
GK CAC, 211
global synchronization, 159
goals of convergence, 449
guaranteed load service, 197
guaranteed services, 15
guarantees (bandwidth), 137, 195, 565
handoffs (WAN aggregator/branch router), 420422
hardware compression, 181
hardware crypto engines, 652
HDLC (High-Level Data Link Control), 135, 175
header-compression techniques, 170
class-based header compression, 178179
formats,
Cisco propriety format, 173
IETF format, 174
IPHC, 173
Layer 2 encapsulation protocol support, 175
ATM, 176
Frame Relay, 176
HDLC, 175
PPP, 175
RTP header compression (cRTP), 172
standards, 171
TCP header compression (cTCP), 171
hierarchical class-based shaping, 127
hierarchical policing, 114
I
IANA (Internet Assigned Numbers Authority), 522
IETF (Internet Engineering Task Force), 7
IETF format, 174
IMA (ATM inverse multiplexing over ATM), 493
Integrated Services, 6
Integrated Unit + Access Model, 669670, 684685
Integrated Unit Model, 668, 682
Interactive Data, 45
Interactive-Video, 39
Interframe Spaces, 272
Internal DSCP value, 225
Internet Assigned Numbers Authority (IANA), 522
interoperability (RSVP), 213
IntServ, 7, 15
IP conguring stations, 303
IP header compression format (IPHC), 171173
IP Precedence, 567
IP routing, 4849
ip rsvp bandwidth command, 215
IP RTP header compression, 451
IP RTP priority, 139
IP telephony, 307
IP ToS (IP type of service), 8687
IP VPN Multiservice, 551
IPHC (IP header compression format), 171173
Layer 2
IPSec
authentication, 657
incompatibility with cRTP, 643644
LLQ, 145
prefragmentation, 190
IPSec-encrypted G.729 packets, 642
IPSec Encryption Engines, 652
IPSec QoS design, 635
Anti-Replay functionality, 655
anti-replay functionality, 654656
bandwidth provisioning, 645646
control plane provisioning, 657
cRTP and IPSec incompatibility, 643644
delay budget increases, 647
headend VPN edge QoS options for site-to-site
V3PNs, 665666
packet overhead increases, 640642
pre-encryption queuing, 651653
prefragmentation, 645
QoS Pre-Classify, 649
site-to-site V3PN, 637
IPSec transport mode (encrypting an IP
GRE tunnel), 638
IPSec tunnel mode (encrypting an IP GRE
tunnel), 639640
IPSec tunnel mode (No IP GRE tunnel),
638
site-to-site V3PN QoS models
Eight-Class Site-to-Site V3PN Model,
660-664
Six-Class Site-to-Site V3PN Model,
658659
teleworker V3PN QoS, 666667
asymmetric links and unidirectional QoS,
677
bandwidth provisioning, 674677
broadband-access technologies, 671673
deployment models, 667670
topologies, 646
ToS byte preservation, 649
VPNs, 635
IPSec transport mode (encrypting an IP GRE
tunnel), 638
IPSec tunnel mode (encrypting an IP GRE tunnel),
639640
IPSec tunnel mode (No IP GRE tunnel), 638
723
J-K
jitter, 13, 35, 450
jitter buffers, 3738
adaptive, 36
underruns, 14
keywords, 358
L
LAN edge QoS design, 517
branch-to-campus classification and marking,
519525
DSCP-to-CoS remapping, 518
NBAR known worm classification and
policing, 526535
LANs
switching environments, 223
QoS for wired vs. wireless, 270
latency
converged networks, 13
VoIP, 3435
Layer 2
access (MPLS VPN CE QoS design), 550551
marking elds, 8182
ATM CLP, 84
Frame-Relay DE bit, 83
MPLS EXP bits, 84
queuing mechanisms, 150
queuing subsystems, 136
724
M
mapping
Catalyst 2950, 233
Catalyst 2970, 243
Catalyst 3550, 237
Catalyst 3750, 243
Catalyst 4500, 248249
Catalyst 6500, 254256
IP Precedence, 567
Mapping Models (enterprise-to-service
provider)
Five-Class Provider-Edge Model,
565566
Four-Class Provider-Edge Model, 565
Three-Class Provider-Edge Model,
563564
markdown, 5758
Catalyst 2950, 234
Catalyst 2970, 244
Catalyst 3550, 238239
Catalyst 3750, 244
Catalyst 4500, 249250
Catalyst 6500, 257259
Catalyst QoS Models, 227
markers (policers as), 107
marking, 57, 6869
branch-to-campus, 519
Catalyst 2970, 243
Catalyst 3550, 237
725
726
N
NAT transparency feature overhead, 675
NBAR (Network-Based Application Recognition),
25, 72
application classication, 523524
known-worm classication and policing, 526
Code Red, 527
CodeRedv2, 528
future worms, 533534
NIMDA, 529
policing worms, 534535
RPC DCOM/W32MS Blaster, 531532
Sasser worm, 532533
SQL Slammer, 530
Packet Description Language Modules
(PDLMs), 520
protocol classification, 7476
RTP payload classification, 77
NBAR exchange PDLM, 532
NBAR netbios PDLM, 532
NBMA (nonbroadcast multiaccess), 119
nested hierarchical policing, 115
Network-Based Application Recognition. See
NBAR
networks
Best-Effort, 11
end user expectations, 9
management (QoS), 49
VoIP design considerations, 34
NIMDA, 529
nonbroadcast multiaccess (NBMA), 119
O-P
out-of-prole trafc, 227
overprovisioning LLQ trafc, 450
P routers, 549
packets, 18
MLP, reordering, 502
overhead increases (IPSec QoS design),
640642
packetization delay, 13
prefragmentation, 644
PAK_priority, 153, 452, 657
PAK_priority ag, 49
PBR (policy-based routing), 79
PBS (peak burst size), 112
PDLMs (NBAR Packet Description Language
Modules), 74, 520
PE QoS considerations, 563
Enterprise-to-Service Provider Mapping
Models
Five-Class Provider-Edge Model,
565566
Four-Class Provider-Edge Model, 565
Mapping Models, 563
Three-Class Provider-Edge Model,
563564
MPLS DiffServ Tunneling modes, 566
Pipe Mode, 573582
Short Pipe Mode, 569573
Uniform Mode, 567569
PE routers, 620630
peak burst size (PBS), 112
peak information rate (PIR), 112, 118
peak rate, 121
peak-rate shaping, 121
percent keyword, 140
percentage-based policing, 116
QoS
727
Q
QBSS IE (QoS basic service set information
element), 278
QoS
access-edge design, 290
branch routers, 513514
728
QoS
R
radio downstream QoS, 271
radio upstream QoS, 271
RAI (resource activity indicator), 209
random backoffs, 273
random-detect command
ecn keyword, 165
Real-Time class
admission criterion, 563565
bandwidth provisioning, 449
RED (Random Early Detection), 160
re-marking
MPLS VPN CE QoS design considerations,
554556
traffic, 304
reservations, 196197
resource activity indicator (RAI), 209
resource-based CAC tools, 209
RFC 2205, 195
RFC 2597, 58
RFC 3168, 163
RFC 3246, 36
ROHC (robust header compression), 171
routers
branch routers, 447
hub routers, 548
729
P routers, 549
policies, 549
roles in WANs, 447
WAN aggregators, 447
bandwidth provisioning, 449
distributed platform QoS, 453
IP RTP header compression, 451
link speeds, 452
PAK_priority, 452
required QoS policies, 448
serialization, 450
software queuing, 448449
Tx-ring tuning, 451
routing
DDR, 503
packets-per-second capability, 651
RPC DCOM/W32/MS Blaster, 531532
RSVP, 195
admission control, 197
CAC, 212
configuring, 196
cRTP, 180
interoperability, 213
LLQ, 199
overview, 196
scalability, 199
security, 213
service types, 197
VoIP CAC through RSVP, 215
RSVP-DiffServ integration, 200
RSVP PATH message, 196
RSVP RESV message, 196
RTP header compression (cRTP)
class-based header compression, 178179
formats, 173
Cisco propriety format, 173
IETF format, 174
IPHC, 173
formats and encapsulation summary, 177178
Layer 2 encapsulation protocol support, 175
Frame Relay, 176
HDLC, 175
PPP, 175
policing and shaping, 180
tunnels, 180
RTP payload classication, 77
730
S
SAR (Segmentation and Reassembly) engine, 675
SAs (security associations), 638
Sasser worm, 532533
scalability
IPSec VPN QoS design case study, 686
RSVP, 199
Scavenger class
DoS and worm mitigation, 5054
QoS, 49
Scavenger-class QoS strategy, 294
SCCP (Skinny Call Control Protocol), 295
scheduling tools, 133-134
SCSP mutation maps (Catalyst 6500), 257
security
RSVP, 213
worms, 50
security associations (SAs), 638
Serial Line IP (SLIP) protocol, 173
serialization, 678
delay, 13
WAN aggregators, 450
servers, 303
service provider service-level agreements, 551
service types (RSVP), 197
service-policy, 20
services for CallManagers, 295
shapers, 103, 118
ATM networks, 121122
class-based Frame Relay traffic shaping,
123124
class-based shaping, 126127
compared to policers, 104
cRTP, 180
distributed traffic shaping (DTS), 128
Frame Relay traffic shaping (FRTS), 122123
Frame Relay voice-adaptive traffic shaping,
124
generic traffic shaping, 126
peak-rate shaping, 121
shaping algorithms, 120
Short Pipe Mode, 569573
show atm bundle command, 493
show atm pvc command, 489
show atm vc command, 492
show class-map verication command, 318
731
T
table map feature, 98
tail drops, 241
TCP
global synchronization behavior, 159
packet loss, 656
and UDP, 553554
TCP/UDP classication, 522
TAM (time-division multiplexing), 105
teleworker V3PN QoS, 666667
asymmetric links and unidirectional QoS, 677
bandwidth provisioning, 674
cable overhead, 676677
DSL (AAL5 + PPPoE) overhead, 675676
NAT transparency feature overhead, 675
broadband serialization mitigation through TCP
maximum segment size tuning, 678679
broadband-access technologies, 671
cable, 673
DSL, 672
business-ready teleworker design, 666
Deployment Models, 667, 682
Dual-Unit Model, 669
Integrated Unit + Access Model, 669670.
684-685
Integrated Unit Model, 668
Integrated Unit/Dual Unit Models,
682-684
split tunneling, 679681
Three-Class (Voice and Data) Model, 454-456
Three-Class Provider-Core Model, 583
Three-Class Provider-Edge Model, 556559,
563564
time-division multiplexing (TDM), 105
token bucker algorithms, 105
topologies
IPSec QoS design, 646
split tunnel, 680
ToS (type of service), 47
byte preservation, 649
reflection, 90
732
U
UBR (unspecied bit rate), 491
UDP and TCP, 553554
underruns (jitter buffers), 14
unidirectional applications, 513515
unidirectional QoS, 677
Uniform Mode, 567569
unspecied bit rate (UBR), 491
Untrusted Endpoint Models (trust boundaries),
304307
Untrusted Multiapplication Server Model, 315318
show class-map and show policy-map
verification commands, 318
show mls masks qos verification command, 319
show mls qos interface policers verification
command, 318
Untrusted PC with SoftPhone Model
Catalyst 2950, 315
Catalyst 2970/3750, 344
Catalyst 3550, 327329
Catalyst 4500, 359360
WAN aggregators
V
variable network delay. See jitter
VBR (variable bit-rate), 673
verication command, 320
verifying
ATM IMA group, 496
tag-switching configuration (MPLS per-VPN
TE), 600
vertical separation of trafc, 107
very-high-speed ATM links, 496497
video
MPLS VPN CE QoS design considerations, 553
QoS, 39
Interactive-Video, 39
Streaming-Video, 41
Streaming-Video, protecting, 557
surveillance systems, 303
videoconferencing
any-to-any, 548549
gateways and systems, 303
videoconferencing rate, 40
violating trafc, 107
viruses, 526
VoFR (Voice over Frame Relay), 149
voice
gateway packet marking, 7981
MPLS VPN CE QoS design considerations, 553
VVLANs, 314
733
W
WAN aggregation router QoS design
case study, 505507
WAN aggregator/branch router handoff, 420422
WAN aggregators, 447, 548
bandwidth provisioning, 449
distributed platform QoS, 453
IP RTP header compression, 451
link speeds, 452
PAK_priority, 452
required QoS policies, 448
serialization, 450
software queuing, 448449
Tx-ring tuning, 451
734
Cisco Press
Your first-step to
networking starts here
Are you new to the world of networking? Whether you are taking your first
networking class or simply need a better understanding of a specific technology
to choose your next networking class, Cisco Press First-Step books are right
for you.
No experience required
Includes clear and easily understood explanations
Makes learning easy
Check out each of these First-Step books that cover key networking topics
Computer Networking
First-Step
ISBN: 1-58720-101-1
Network Security
First-Step
ISBN: 1-58720-099-6
TCP/IP First-Step
ISBN: 1-58720-108-9
October 2004
LAN Switching
First-Step
ISBN: 1-58720-100-3
Routing First-Step
ISBN: 1-58720-122-4
September 2004
Wireless Networks
First-Step
ISBN: 1-58720-111-9
Cisco Press
Visit www.ciscopress.com/series for details about the Network Business series and a complete list
of titles.
Cisco Press
FUNDAMENTALS SERIES
ESSENTIAL EXPLANATIONS AND SOLUTIONS
When you need an authoritative introduction
to a key networking topic, reach for a Cisco
Press Fundamentals book. Learn about network
topologies, deployment concepts, protocols,
and management techniques and master
essential networking concepts and solutions.
IP Addressing Fundamentals
ISBN: 1-58705-067-6
IP Routing Fundamentals
ISBN: 1-57870-071-X
Cisco Press
Gain hands-on
experience with
Practical Studies
books
Practice testing
skills and build
confidence with
Flash Cards and
Exam Practice
Packs
Cisco Press
SEARCH THOUSANDS
OF BOOKS FROM
LEADING PUBLISHERS
Safari Bookshelf is a searchable electronic reference library for IT
professionals that features more than 2,000 titles from technical
publishers, including Cisco Press.
Search the full text of thousands of technical books, including more than 70 Cisco Press
titles from authors such as Wendell Odom, Jeff Doyle, Bill Parkhurst, Sam Halabi, and
Karl Solie.
Read the books on My Bookshelf from cover to cover, or just flip to the information
you need.
With a customized library, youll have access to your books when and where you need
themand all you need is a user name and password.
Cisco Press
3 STEPS TO LEARNING
STEP 1
STEP 2
STEP 3
First-Step
Fundamentals
Networking
Technology Guides
STEP 1
STEP 2
STEP 3
Cisco Press
SAVE UP TO 25%
Become a member and save at ciscopress.com!