Configuring Modular Quality of Service
Congestion Management on Cisco IOS XR
Software
Congestion management controls congestion after it has occurred on a network. Congestion can be
managed on Cisco IOS XR software by using packet queueing methods, and by shaping the packet flow
through use of traffic regulation mechanisms.
Packet queueing methods define packet scheduling or the order in which packets are dequeued to the
interface for transmission on the physical wire. Furthermore, queueing methods support minimum
bandwidth guarantees and low latencies based on the order and number of times that a queue is serviced.
The following types of queueing methods and traffic regulation mechanisms are supported on the
Cisco IOS XR software:
• Modified Deficit Round Robin (MDRR)
• Low-latency queueing (LLQ) with strict priority queueing (PQ)
• Traffic shaping
• Traffic policing
This module provides the conceptual and configuration information for Quality of Service (QoS) packet
queueing methods and traffic regulation mechanisms on Cisco IOS XR software.
NoteFor additional conceptual information about QoS in general and complete descriptions of the QoS
commands listed in this module, see the “Related Documents” section of this module. To locate
documentation for other commands that might appear in the course of executing a configuration task,
search online in the Cisco IOS XR software master command index.
Cisco IOS XR Modular Quality of Service Configuration Guide
QC-29
Contents
Contents
Configuring Modular Quality of Service Congestion Management on Cisco IOS XR Software
Feature History for Configuring Modular QoS Congestion Management on Cisco IOS XR Software Contents
ReleaseModification
Release 2.0This feature was introduced on the Cisco CRS-1.
Release 3.0No modification.
Release 3.2This feature was first supported on the Cisco XR 12000 Series Router with
the exception of the following:
Two-rate policer and two-token bucket algorithm.
The pir and violate-action keywords for the police command.
Packet-by-packet MDRR scheduling mechanism.
Added configuration examples.
• Prerequisites for Configuring QoS Congestion Management on Cisco IOS XR Software,
page QC-30
• Information About Configuring QoS Congestion Management on Cisco IOS XR Software,
page QC-30
• How to Configure QoS Congestion Management on Cisco IOS XR Software, page QC-37
• Configuration Examples for Configuring QoS Congestion Management on Cisco IOS XR Software,
page QC-47
• Where to Go Next, page QC-49
• Additional References, page QC-50
Prerequisites for Configuring QoS Congestion Management on
Cisco IOS XR Software
The following prerequisites are required for configuring QoS congestion management on your network:
• You must be in a user group associated with a task group that includes the proper task IDs for QoS
commands. Task IDs for commands are listed in the Cisco IOS XR Task ID Reference Guide.
For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
• You must be familiar with Cisco IOS QoS configuration tasks and concepts.
Information About Configuring QoS Congestion Management on
Cisco IOS XR Software
To implement QoS congestion management features in this document, you must understand the
following concepts:
• Congestion Management Overview, page QC-31
• Modified Deficit Round Robin, page QC-31
QC-30
Cisco IOS XR Modular Quality of Service Configuration Guide
Configuring Modular Quality of Service Congestion Management on Cisco IOS XR Software
Information About Configuring QoS Congestion Management on Cisco IOS XR Software
• Low-Latency Queueing with Strict Priority Queueing, page QC-32
• Traffic Shaping Versus Traffic Policing, page QC-37
Congestion Management Overview
Congestion management features allow you to control congestion by determining the order in which a
traffic flow (or packets) is sent out an interface based on priorities assigned to packets. Congestion
management entails the creation of queues, assignment of packets to those queues based on the
classification of the packet, and scheduling of the packets in a queue for transmission. The congestion
management features in Cisco IOS XR software allow you to specify creation of a different number of
queues, affording greater or lesser degree of differentiation of traffic, and to specify the order in which
that traffic is sent.
During periods with light traffic flow, that is, when no congestion exists, packets are sent out the
interface as soon as they arrive. During periods of transmit congestion at the outgoing interface, packets
arrive faster than the interface can send them. If you use congestion management features, packets
accumulating at an interface are queued until the interface is free to send them; they are then scheduled
for transmission according to their assigned priority and the queueing method configured for the
interface. The router determines the order of packet transmission by controlling which packets are placed
in which queue and how queues are serviced with respect to each other.
In addition to queueing methods, QoS congestion management mechanisms, such as policers and
shapers, are needed to ensure that a packet adheres to a contract and service. Both policing and shaping
mechanisms use the traffic descriptor for a packet. See the “Configuring Modular Quality of Service
Packet Classification on Cisco IOS XR Software” module for information about the traffic descriptor.
Policers and shapers usually identify traffic descriptor violations in an identical manner through the
token bucket mechanism, but they differ in the way they respond to violations. A policer typically drops
traffic flow; whereas, a shaper delays excess traffic flow using a buffer, or queueing mechanism, to hold
Low-Latency Queueing feature that uses a strict priority queue with policing to shape the flow.)
Traffic shaping and policing can work in tandem. For example, a good traffic shaping scheme should
make it easy for nodes inside the network to detect abnormal flows. This activity is sometimes called
policing the traffic of the flow.
Modified Deficit Round Robin
MDRR is a class-based composite scheduling mechanism that allows for queueing of up to eight traffic
classes. It operates in the same manner as class-based weighted fair queueing (CBWFQ) and allows
definition of traffic classes based on customer match criteria (such as access lists); however, MDRR does
not use the weighted fair queueing algorithm.
With MDRR configured in the queueing strategy, nonempty queues are served one after the other. Each
time a queue is served, a fixed amount of data is dequeued. The algorithm then services the next queue.
When a queue is served, MDDR keeps track of the number of bytes of data that were dequeued in excess
of the configured value. In the next pass, when the queue is served again, less data is dequeued to
Cisco IOS XR Modular Quality of Service Configuration Guide
QC-31
Configuring Modular Quality of Service Congestion Management on Cisco IOS XR Software
Information About Configuring QoS Congestion Management on Cisco IOS XR Software
compensate for the excess data that was served previously. As a result, the average amount of data
dequeued per queue is close to the configured value. In addition, MDRR allows for a strict priority queue
for delay-sensitive traffic.
Each queue within MDRR is defined by two variables:
• Quantum value—Average number of bytes served in each round.
• Deficit counter—Number of bytes a queue has sent in each round. The counter is initialized to the
quantum value.
Packets in a queue are served as long as the deficit counter is greater than zero. Each packet served
decreases the deficit counter by a value equal to its length in bytes. A queue can no longer be served after
the deficit counter becomes zero or negative. In each new round, the deficit counter for each nonempty
queue is incremented by its quantum value.
NoteIn general, the quantum size for a queue should not be smaller than the maximum transmission unit
(MTU) of the interface to ensure that the scheduler always serves at least one packet from each nonempty
queue.
The Cisco CRS-1 implements a slight variation of the MDRR scheduling mechanism called
packet-by-packet MDRR (P2MDRR). Using P2MDRR, queues are scheduled after every packet is sent
compared to MDRR in which queues are scheduled after a queue is emptied. All non-high-priority
queues with minimum bandwidth guarantees use P2MDRR.
Low-Latency Queueing with Strict Priority Queueing
The LLQ feature brings strict PQ to the MDRR scheduling mechanism. PQ in strict priority mode
ensures that one type of traffic is sent, possibly at the expense of all others. For PQ, a low-priority queue
can be detrimentally affected, and, in the worst case, never allowed to send its packets if a limited amount
of bandwidth is available or the transmission rate of critical traffic is high.
Strict PQ allows delay-sensitive data, such as voice, to be dequeued and sent before packets in other
queues are dequeued.
LLQ enables use of a single, strict priority queue within MDRR at the class level, allowing you to direct
traffic belonging to a class. To rank class traffic to the strict priority queue, you specify the named class
within a policy map and then configure the priority command for the class. (Classes to which the
priority command is applied are considered priority classes.) Within a policy map, you can give one or
more classes priority status. When multiple classes within a single policy map are configured as priority
classes, all traffic from these classes is enqueued to the same, single, strict priority queue.
Through use of the priority command, you can assign a strict PQ to any of the valid match criteria used
to specify traffic. These methods of specifying traffic for a class include matching on access lists,
protocols, IP precedence, and IP differentiated service code point (DSCP) values. Moreover, within an
access list you can specify that traffic matches are allowed based on the DSCP value that is set using the
first six bits of the IP type of service (ToS) byte in the IP header.
QC-32
Cisco IOS XR Modular Quality of Service Configuration Guide
Configuring Modular Quality of Service Congestion Management on Cisco IOS XR Software
Information About Configuring QoS Congestion Management on Cisco IOS XR Software
Traffic Shaping
Traffic shaping allows you to control the traffic flow exiting an interface to match its transmission to the
speed of the remote target interface and ensure that the traffic conforms to policies contracted for it.
Traffic adhering to a particular profile can be shaped to meet downstream requirements, thereby
eliminating bottlenecks in topologies with data-rate mismatches.
To match the rate of transmission of data from the source to the target interface, you can limit the transfer
of data to one of the following:
• A specific configured rate
• A derived rate based on the level of congestion
The rate of transfer depends on these three components that constitute the token bucket: burst size, mean
rate, and time (measurement) interval. The mean rate is equal to the burst size divided by the interval.
When traffic shaping is enabled, the bit rate of the interface does not exceed the mean rate over any
integral multiple of the interval. In other words, during every interval, a maximum of burst size can be
sent. Within the interval, however, the bit rate may be faster than the mean rate at any given time.
When the exceed burst size (Be) equals 0, the interface sends no more than the burst size every interval,
achieving an average rate no higher than the mean rate. However, when the Be size is greater than 0, the
interface can send as many as the conform burst size (Bc) plus Be bits in a burst, if in a previous time
period the maximum amount was not sent. Whenever less than the burst size is sent during an interval,
the remaining number of bits, up to the Be size, can be used to send more than the burst size in a later
interval.
Traffic Shaping Mechanism Regulates Traffic
When incoming packets arrive at an interface. The packets are classified using a classification technique,
such as use of an access control list (ACL) or setting of the IP Precedence bits through the Modular QoS
CLI (MQC). If the packet matches the specified classification, the traffic shaping mechanism continues.
Otherwise, no further action is taken.
Cisco IOS XR Modular Quality of Service Configuration Guide
QC-33
Configuring Modular Quality of Service Congestion Management on Cisco IOS XR Software
Information About Configuring QoS Congestion Management on Cisco IOS XR Software
Figure 2 illustrates how a traffic shaping mechanism regulates traffic flow.
Figure 2How a Traffic Shaping Mechanism Regulates Traffic
Token bucket
Ye s
Incoming packets
Match
Classify
Packet classification
criteria applied
(e.g., via the MQC)
Configured
traffic shaping rate
"Token bucket"
shaping
Enough
tokens in
the token
bucket?
No
Outgoing packets
transmitted
Outgoing packets
placed in shaping queue
(transmitted later)
117493
Packets matching the specified criteria are placed in the token bucket. The maximum size of the token
bucket is the confirm burst (Bc) size plus the Be size. The token bucket is filled at a constant rate of Bc
worth of tokens at every Tc. This is the configured traffic shaping rate.
If the traffic shaping mechanism is active (that is, packets exceeding the configured traffic shaping rate
already exist in a transmission queue) at every Tc, the traffic shaper checks to see if the transmission
queue contains enough packets to send (that is, up to either Bc [or Bc plus Be] worth of traffic).
If the traffic shaper is not active (that is, there are no packets exceeding the configured traffic shaping
rate in the transmission queue), the traffic shaper checks the number of tokens in the token bucket. One
of the following occurs:
• If there are enough tokens in the token bucket, the packet is sent (transmitted).
• If there are not enough tokens in the token bucket, the packet is placed in a shaping queue for
transmission at a later time.
Traffic Policing
In general, traffic policing allows you to control the maximum rate of traffic sent or received on an
interface, and to partition a network into multiple priority levels or class of service (CoS).
Traffic policing manages the maximum rate of traffic through a token bucket algorithm. The token bucket
algorithm can use the user-configured values to determine the maximum rate of traffic allowed on an
interface at a given moment in time. The token bucket algorithm is affected by all traffic entering or
leaving (depending on where the traffic policy with traffic policing is configured) and is useful in
managing network bandwidth in cases in which several large packets are sent in the same traffic stream.
Traffic entering the interface with traffic policing configured is placed into one of these categories.
Within these three categories, users can decide packet treatments. For instance, packets that conform can
be configured to be sent, packets that exceed can be configured to be sent with a decreased priority, and
packets that violate can be configured to be dropped.
Cisco IOS XR Modular Quality of Service Configuration Guide
QC-34
Configuring Modular Quality of Service Congestion Management on Cisco IOS XR Software
Information About Configuring QoS Congestion Management on Cisco IOS XR Software
Traffic policing is often configured on interfaces at the edge of a network to limit the rate of traffic
entering or leaving the network. In the most common traffic policing configurations, traffic that
conforms is sent and traffic that exceeds is sent with a decreased priority or is dropped. Users can change
these configuration options to suit their network needs.
For Cisco IOS XR software, a single-rate, two-color policer is supported that provides one token bucket
with two actions for each packet: a conform action and an exceed action. Traffic policing provides a
certain amount of bandwidth management by allowing you to set the burst size (Bc) for the committed
information rate (CIR). When the peak information rate (PIR) is supported, a second token bucket is
enforced and the traffic policer is then called a two-rate policer.
NoteThe two-rate policer and two-token bucket algorithm is not supported on this release of
Cisco IOS XR software.
Packet Marking Through the IP Precedence Value, IP DSCP Value, and the MPLS Experimental
Value Setting
In addition to rate-limiting, traffic policing allows you to independently mark (or classify) the packet
according to whether the packet conforms or violates a specified rate. Packet marking also allows you
to partition your network into multiple priority levels or CoS.
Use the traffic policer to set the IP precedence value, IP DSCP value, or Multiprotocol Label Switching
(MPLS) experimental value for packets that enter the network. Then networking devices within your
network can use this setting to determine how the traffic should be treated. For example, the Weighted
Random Early Detection (WRED) feature uses the IP precedence value to determine the probability that
a packet is dropped.
If you want to mark traffic but do not want to use traffic policing, see “Class-Based Packet Marking
Feature and Benefits” to learn how to perform packet classification.
Traffic Policing Mechanism Regulates Traffic
Figure 3 illustrates how a single-rate token bucket policer marks packets as either conforming or
exceeding a CIR.
Cisco IOS XR Modular Quality of Service Configuration Guide
QC-35
Configuring Modular Quality of Service Congestion Management on Cisco IOS XR Software
Information About Configuring QoS Congestion Management on Cisco IOS XR Software
Figure 3How a Traffic Policing Mechanism Regulates Traffic
CIR
Bc
Packet of size B
No
B>Tc
Ye s
Exceed
Action
No
Conform
Action
127091
The time interval between token updates (Tc) to the token bucket is updated at the CIR value each time
a packet arrives at the traffic policer. The Tc token bucket can contain up to the Bc value. If a packet of
size B is greater than the Tc token bucket, then the packet exceeds the CIR value and a configured action
is performed. If a packet of size B is less than the Tc token bucket, then the packet conforms and a
different configured action is performed.
QC-36
Cisco IOS XR Modular Quality of Service Configuration Guide
Loading...
+ 16 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.