Table Of Contents
Configuring Modular QoS Congestion Management on Cisco ASR 9000 Series Routers
Contents
Prerequisites for Configuring QoS Congestion Management on Cisco ASR 9000 Series Routers
Information About Configuring QoS Congestion Management on Cisco ASR 9000 Series Routers
Congestion Management Overview
Modified Deficit Round Robin
Low-Latency Queueing with Strict Priority Queueing
Traffic Shaping
Traffic-Shaping Mechanism Regulates Traffic
Traffic Policing
Hierarchical Policing
Packet Marking Through the IP Precedence Value, IP DSCP Value, and the MPLS Experimental Value Setting
Regulation of Traffic with the Policing Mechanism
Traffic Shaping Versus Traffic Policing
Congestion Management Using DEI
How to Configure QoS Congestion Management on Cisco ASR 9000 Series Routers
Configuring Guaranteed and Remaining Bandwidths
Restrictions
Configuring Guaranteed Bandwidth
Configuring Bandwidth Remaining
Configuring Low-Latency Queueing with Strict Priority Queueing
Restrictions
Configuring Traffic Shaping
Restrictions
Configuring Traffic Policing
Configuring Hierarchical Policing
Configuration Examples for Configuring QoS Congestion Management on Cisco ASR 9000 Series Routers
Traffic Shaping for an Input Interface: Example
Traffic Policing for a Bundled Interface: Example
Hierarchical Policing: Example
Multi-action Set/Policer: Example
Additional References
Related Documents
Standards
MIBs
RFCs
Technical Assistance
Configuring Modular QoS Congestion Management on Cisco ASR 9000 Series Routers
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 ASR 9000 Series Aggregation Services Routers :
•
Modified Deficit Round Robin (MDRR)
•
Low-latency queueing (LLQ) with strict priority queueing (PQ)
•
Traffic shaping
•
Traffic policing
Line Card, SIP, and SPA Support
Feature
|
ASR 9000 Ethernet Line Cards
|
SIP 700 for the ASR 9000
|
Congestion Management Using DEI
|
yes
|
no
|
Guaranteed and Remaining Bandwidth
|
yes
|
yes
|
Low-Latency Queueing with Strict Priority Queueing
|
yes
|
yes
|
Traffic Policing
|
yes
|
yes
|
Traffic Shaping
|
yes
|
yes
|
Feature History for Configuring Modular QoS Congestion Management on Cisco ASR 9000 Series Routers
Release
|
Modification
|
Release 3.7.2
|
The Congestion Avoidance feature was introduced on ASR 9000 Ethernet Line Cards..
The Guaranteed and Remaining Bandwidth, Low-Latency Queueing with Strict Priority Queueing, Traffic Policing, and Traffic Shaping features were introduced on ASR 9000 Ethernet Line Cards.
|
Release 3.9.0
|
The Guaranteed and Remaining Bandwidth, Low-Latency Queueing with Strict Priority Queueing, Traffic Policing, and Traffic Shaping features were supported on the SIP 700 for the ASR 9000.
|
Release 4.0
|
The Congestion Management Using DEI feature was introduced on ASR 9000 Ethernet Line Cards.
|
Release 4.0.1
|
The police rate command was updated to include packet-based specifications of policing rates and burst sizes.
|
Contents
•
Prerequisites for Configuring QoS Congestion Management on Cisco ASR 9000 Series Routers
•
Information About Configuring QoS Congestion Management on Cisco ASR 9000 Series Routers
•
How to Configure QoS Congestion Management on Cisco ASR 9000 Series Routers
•
Configuration Examples for Configuring QoS Congestion Management on Cisco ASR 9000 Series Routers
•
Additional References
Prerequisites for Configuring QoS Congestion Management on Cisco ASR 9000 Series Routers
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. The command reference guides include the task IDs required for each command. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
•
You must be familiar with Cisco IOS XR QoS configuration tasks and concepts.
Information About Configuring QoS Congestion Management on Cisco ASR 9000 Series Routers
To implement QoS congestion management features in this document, you must understand the following concepts:
•
Congestion Management Overview
•
Modified Deficit Round Robin
•
Low-Latency Queueing with Strict Priority Queueing
•
Traffic Shaping
•
Traffic-Shaping Mechanism Regulates Traffic
•
Traffic Policing
•
Regulation of Traffic with the Policing Mechanism
•
Traffic Shaping Versus Traffic Policing
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 Congestion Management on Cisco ASR 9000 Series Routers" module in this guide 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 the traffic for transmission at a later time.
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.
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.
When MDRR is 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 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.
Low-Latency Queueing with Strict Priority Queueing
The LLQ feature brings strict priority queueing (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 the 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.
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 peak burst size 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 peak burst size is greater than 0, the interface can send as many as the burst size plus peak burst 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 peak burst 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 an access control list (ACL) or the 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.
Figure 1 illustrates how a traffic shaping mechanism regulates traffic flow.
Figure 1 How a Traffic Shaping Mechanism Regulates Traffic
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 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. Traffic policing also 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.
Note
The two-rate policer and two-token bucket algorithm is supported in Cisco IOS XR software.
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.
Hierarchical Policing
The Hierarchical Policing feature is an MQC-based solution that supports hierarchical policing on both the ingress and egress interfaces on Cisco ASR 9000 Series Routers.
This feature allows enforcement of service level agreements (SLA) while applying the classification submodel for different QoS classes on the inbound interface.
Hiearchical policing provides support at two levels:
•
Parent level
•
Child level
•
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. Packet marking as a policer action is conditional marking.
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 the "Class-based, Unconditional Packet Marking Examples" section in this guide to learn how to perform packet classification.
Note
Marking IP fields on an MPLS-enabled interface results in non-operation on that particular interface.
Regulation of Traffic with the Policing Mechanism
Figure 2 illustrates how a single-rate token bucket policer marks packets as either conforming or exceeding a CIR.
Figure 2 How a Traffic Policing Mechanism Regulates Traffic
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.
Traffic Shaping Versus Traffic Policing
Although traffic shaping and traffic policing can be implemented together on the same network, there are distinct differences between them, as shown in Table 1.
Table 1 Differences Between Traffic Shaping and Traffic Policing
| |
Traffic Shaping
|
Traffic Policing
|
Triggering Event
|
• Occurs automatically at regular intervals (Tc).
or
Occurs whenever a packet arrives at an interface.
|
• Occurs whenever a packet arrives at an interface.
|
What it Does
|
• Classifies packets.
• If a packet does not meet match criteria, no further action is taken.
• Packets meeting match criteria are sent (if there are enough tokens in the token bucket)
or
Packets are placed in a queue for transmission later.
• If the number of packets in the queue exceed the queue limit, the packets are dropped.
|
• Classifies packets.
• If a packet does not meet match criteria, no further action is taken.
• Packets meeting match criteria and conforming to or exceeding a specified rate, receive the configured policing action (for example, drop, send, mark, then send).
• Packets are not placed in a queue for transmission later.
|
Congestion Management Using DEI
You can manage congestion based on the Drop Eligible Indicator (DEI) bit that is present in 802.1ad frames and 802.1ah frames. Random early detection based on the DEI value is supported on 802.1ad packets for:
•
Layer 2 subinterfaces
•
Layer 2 main interfaces
•
Layer 3 main interfaces
•
Ingress and egress
Note
If there are any marking actions in the policy, the marked values are used for doing WRED.
How to Configure QoS Congestion Management on Cisco ASR 9000 Series Routers
This section contains instructions for the following tasks:
•
Configuring Guaranteed and Remaining Bandwidths
•
Configuring Low-Latency Queueing with Strict Priority Queueing
•
Configuring Traffic Shaping
•
Configuring Traffic Policing
Configuring Guaranteed and Remaining Bandwidths
Guaranteed Service rate of a queue is defined as the bandwidth the queue receives when all the queues are congested. It is defined as:
Guaranteed Service Rate = minimum bandwidth + excess share of the queue
The bandwidth command allows you to specify the minimum guaranteed bandwidth to be allocated for a specific class of traffic. MDRR is implemented as the scheduling algorithm.
The bandwidth remaining command specifies a weight for the class to the MDRR. The MDRR algorithm derives the weight for each class from the bandwidth remaining value allocated to the class. The bandwidth remaining is divided among the classes in a policy using either bandwidth remaining ratio or bandwidth remaining percent commands. If you do not configure the bandwidth remaining command for any class, the leftover bandwidth is allocated equally to all classes for which bandwidth remaining is not explicitly specified.
Restrictions
The amount of bandwidth configured should be large enough to also accommodate Layer 2 overhead.
The bandwidth command is supported only on policies configured on outgoing interfaces.
Configuring Guaranteed Bandwidth
SUMMARY STEPS
1.
configure
2.
policy-map policy-name
3.
class class-name
4.
bandwidth {rate [units] | percent percentage-value}
5.
exit
6.
class class-name
7.
bandwidth {rate [units] | percent percentage-value}
8.
exit
9.
class class-name
10.
bandwidth {rate [units] | percent percentage-value}
11.
exit
12.
exit
13.
interface type interface-path-id
14.
service-policy {input | output} policy-map
15.
end
or
commit
16.
show policy-map interface type interface-path-id [input | output]
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RSP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
policy-map policy-name
Example:
RP/0/RSP0/CPU0:router(config)# policy-map
policy1
|
Enters policy map configuration mode.
• Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
Step 3
|
class class-name
Example:
RP/0/RSP0/CPU0:router(config-pmap)# class
class1
|
Specifies the name of the class whose policy you want to create or change.
|
Step 4
|
bandwidth {rate [units]| percent
percentage-value}
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth
percent 40
|
Enters policy map class configuration mode.
• Specifies the bandwidth allocated for a class belonging to a policy map.
• In this example, class class1 is guaranteed 40 percent of the interface bandwidth.
|
Step 5
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
|
Returns the router to policy map configuration mode.
|
Step 6
|
class class-name
Example:
RP/0/RSP0/CPU0:router(config-pmap)# class
class2
|
Specifies the name of the class whose policy you want to create or change.
|
Step 7
|
bandwidth {rate [units]| percent
percentage-value}
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth
percent 40
|
Enters policy map class configuration mode.
• Specifies the bandwidth allocated for a class belonging to a policy map.
• In this example, class class2 is guaranteed 40 percent of the interface bandwidth.
|
Step 8
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
|
Returns the router to policy map configuration mode.
|
Step 9
|
class class-name
Example:
RP/0/RSP0/CPU0:router(config-pmap)# class
class-default
|
Specifies the name of the class whose policy you want to create or change.
|
Step 10
|
bandwidth {rate [units]| percent
percentage-value}
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth
percent 20
|
Enters policy map class configuration mode.
• Specifies the bandwidth allocated for a class belonging to a policy map.
• In this example, class class-default is guaranteed 20 percent of the interface bandwidth.
|
Step 11
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
|
Returns the router to policy map configuration mode.
|
Step 12
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap)# exit
|
Returns the router to global configuration mode.
|
Step 13
|
interface type interface-path-id
Example:
RP/0/RSP0/CPU0:router(config)# interface
gigabitethernet 0/2/0/0
|
Enters interface configuration mode and configures an interface.
|
Step 14
|
service-policy {input | output} policy-map
Example:
RP/0/RSP0/CPU0:router(config-if)#
service-policy output policy1
|
Attaches a policy map to an input or output interface to be used as the service policy for that interface.
• In this example, the traffic policy evaluates all traffic leaving that interface.
|
Step 15
|
end
or
commit
Example:
RP/0/RSP0/CPU0:router(config-if)# end
or
RP/0/RSP0/CPU0:router(config-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
– Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
– Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
– Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 16
|
show policy-map interface type
interface-path-id [input | output]
Example:
RP/0/RSP0/CPU0:router# show policy-map
interface gigabitethernet 0/2/0/0
|
(Optional) Displays policy configuration information for all classes configured for all service policies on the specified interface.
|
Configuring Bandwidth Remaining
SUMMARY STEPS
1.
configure
2.
policy-map policy-name
3.
class class-name
4.
bandwidth remaining {percent percentage-value | ratio ratio-value}
5.
exit
6.
class class-name
7.
bandwidth remaining {percent percentage-value | ratio ratio-value}
8.
exit
9.
class class-name
10.
bandwidth remaining {percent percentage-value | ratio ratio-value}
11.
exit
12.
exit
13.
interface type interface-path-id
14.
service-policy {input | output} policy-map
15.
end
or
commit
16.
show policy-map interface type instance [input | output]
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RSP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
policy-map policy-name
Example:
RP/0/RSP0/CPU0:router(config)# policy-map
policy1
|
Enters policy map configuration mode.
• Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
Step 3
|
class class-name
Example:
RP/0/RSP0/CPU0:router(config-pmap)# class
class1
|
Specifies the name of the class whose policy you want to create or change.
|
Step 4
|
bandwidth remaining percent percentage-value
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth
remaining percent 40
|
Specifies how to allocate leftover bandwidth for class class1.
|
Step 5
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
|
Returns the router to policy map configuration mode.
|
Step 6
|
class class-name
Example:
RP/0/RSP0/CPU0:router(config-pmap)# class
class2
|
Specifies the name of the class whose policy you want to create or change.
|
Step 7
|
bandwidth remaining percent percentage-value
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth
remaining percent 40
|
Specifies how to allocate leftover bandwidth for class class2.
|
Step 8
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
|
Returns the router to policy map configuration mode.
|
Step 9
|
class class-name
Example:
RP/0/RSP0/CPU0:router(config-pmap)# class
class-default
|
Specifies the name of the class whose policy you want to create or change.
|
Step 10
|
bandwidth remaining percent percentage-value
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth
remaining percent 20
|
Specifies how to allocate leftover bandwidth for class class-default.
|
Step 11
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
|
Returns the router to policy map configuration mode.
|
Step 12
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap)# exit
|
Returns the router to global configuration mode.
|
Step 13
|
interface type interface-path-id
Example:
RP/0/RSP0/CPU0:router(config)# interface
gigabitethernet 0/2/0/0
|
Enters interface configuration mode and configures an interface.
|
Step 14
|
service-policy {input | output} policy-map
Example:
RP/0/RSP0/CPU0:router(config-if)#
service-policy output policy1
|
Attaches a policy map to an input or output interface to be used as the service policy for that interface.
• In this example, the traffic policy evaluates all traffic leaving that interface.
|
Step 15
|
end
or
commit
Example:
RP/0/RSP0/CPU0:router(config-if)# end
or
RP/0/RSP0/CPU0:router(config-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
– Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
– Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
– Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 16
|
show policy-map interface type
interface-path-id [input | output]
Example:
RP/0/RSP0/CPU0:router# show policy-map
interface gigabitethernet 0/2/0/0
|
(Optional) Displays policy configuration information for all classes configured for all service policies on the specified interface.
|
Configuring Low-Latency Queueing with Strict Priority Queueing
The priority command configures low-latency queueing (LLQ), providing strict priority queueing (PQ). Strict PQ allows delay-sensitive data, such as voice, to be dequeued and sent before packets in other queues are dequeued. When a class is marked as high priority using the priority command, it is required that you configure a policer to limit the priority traffic. This configuration ensures that the priority traffic does not starve all of the other traffic on the line card, which protects low priority traffic from starvation. Use the police command to explicitly configure the policer.
Note
Two levels of priority are supported: priority level 1 and priority level 2. If no priority level is configured, the default is priority level 1.
Restrictions
•
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 queued to the same single priority queue.
SUMMARY STEPS
1.
configure
2.
policy-map policy-name
3.
class class-name
4.
police rate {value [units] | percent percentage} [burst burst-size [burst-units]] [peak-burst peak-burst [burst-units]] [peak-rate value [units]]
5.
exceed-action action
6.
exit
7.
priority [level priority-level]
8.
exit
9.
exit
10.
interface type interface-path-id
11.
service-policy {input | output} policy-map
12.
end
or
commit
13.
show policy-map interface type interface-path-id [input | output]
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RSP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
policy-map policy-name
Example:
RP/0/RSP0/CPU0:router(config)# policy-map voice
|
Enters policy map configuration mode.
• Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
Step 3
|
class class-name
Example:
RP/0/RSP0/CPU0:router(config-pmap)# class voice
|
Enters policy map class configuration mode.
• Specifies the name of the class whose policy you want to create or change.
|
Step 4
|
police rate {value [units] | percent
percentage} [burst burst-size [burst-units]]
[peak-burst peak-burst [burst-units]]
[peak-rate value [units]]
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# police
rate 250
|
Configures traffic policing and enters policy map police configuration mode.
• In this example, the low-latency queue is restricted to 250 kbps to protect low-priority traffic from starvation and to release bandwidth.
|
Step 5
|
exceed-action action
Example:
RP/0/RSP0/CPU0:router(config-pmap-c-police)#
exceed-action drop
|
Configures the action to take on packets that exceed the rate limit.
|
Step 6
|
|
|
Step 7
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c-police)#
exit
|
Returns the router to policy map class configuration mode.
|
Step 8
|
priority [level priority-level]
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# priority
|
Specifies priority to a class of traffic belonging to a policy map.
Note If no priority level is configured, the default is priority 1.
|
Step 9
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
|
Returns the router to policy map configuration mode.
|
Step 10
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap)# exit
|
Returns the router to global configuration mode.
|
Step 11
|
interface type interface-path-id
Example:
RP/0/RSP0/CPU0:router(config)# interface
gigabitethernet 0/2/0/0
|
Enters interface configuration mode, and configures an interface.
|
Step 12
|
service-policy {input | output} policy-map
Example:
RP/0/RSP0/CPU0:router(config-if)#
service-policy output policy1
|
Attaches a policy map to an input or output interface to be used as the service policy for that interface.
• In this example, the traffic policy evaluates all traffic leaving that interface.
|
Step 13
|
end
or
commit
Example:
RP/0/RSP0/CPU0:router(config-if)# end
or
RP/0/RSP0/CPU0:router(config-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
– Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
– Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
– Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 14
|
show policy-map interface type
interface-path-id [input | output]
Example:
RP/0/RSP0/CPU0:router# show policy-map
interface gigabitethernet 0/2/0/0
|
(Optional) Displays policy configuration information for all classes configured for all service policies on the specified interface.
|
Configuring Traffic Shaping
Traffic shaping allows you to control the traffic 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.
Shaping performed on incoming and outgoing interfaces is done at the Layer 2 level and includes the Layer 2 header in the rate calculation.
Restrictions
The bandwidth, priority, and shape average commands should not be configured together in the same class.
SUMMARY STEPS
1.
configure
2.
policy-map policy-name
3.
class class-name
4.
shape average {percent value | rate [units]}
5.
exit
6.
exit
7.
interface type interface-path-id
8.
service-policy {input | output} policy-map
9.
end
or
commit
10.
show policy-map interface type interface-path-id [input | output]
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RSP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
policy-map policy-name
Example:
RP/0/RSP0/CPU0:router(config)# policy-map
policy1
|
Enters policy map configuration mode.
• Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
Step 3
|
class class-name
Example:
RP/0/RSP0/CPU0:router(config-pmap)# class
class1
|
Enters policy map class configuration mode.
• Specifies the name of the class whose policy you want to create or change.
|
Step 4
|
shape average {percent value | rate [units]}
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# shape
average percent 50
|
Shapes traffic to the indicated bit rate according to average rate shaping in the specified units or as a percentage of the bandwidth.
|
Step 5
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
|
Returns the router to policy map configuration mode.
|
Step 6
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap)# exit
|
Returns the router to global configuration mode.
|
Step 7
|
interface type interface-path-id
Example:
RP/0/RSP0/CPU0:router(config)# interface
gigabitethernet 0/2/0/0
|
Enters interface configuration mode and configures an interface.
|
Step 8
|
service-policy {input | output} policy-map
Example:
RP/0/RSP0/CPU0:router(config-if)#
service-policy output policy1
|
Attaches a policy map to an input or output interface to be used as the service policy for that interface.
• In this example, the traffic policy evaluates all traffic leaving that interface.
|
Step 9
|
end
or
commit
Example:
RP/0/RSP0/CPU0:router(config-if)# end
or
RP/0/RSP0/CPU0:router(config-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
– Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
– Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
– Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 10
|
show policy-map interface type
interface-path-id [input | output]
Example:
RP/0/RSP0/CPU0:router# show policy-map
interface gigabitethernet 0/2/0/0
|
(Optional) Displays policy configuration information for all classes configured for all service policies on the specified interface.
|
Configuring Traffic Policing
Traffic policing allows you to control the maximum rate of traffic sent or received on an interface.
SUMMARY STEPS
1.
configure
2.
policy-map policy-name
3.
class class-name
4.
police rate {value [units] | percent percentage} [burst burst-size [burst-units]] [peak-burst peak-burst [burst-units]] [peak-rate value [units]]
5.
conform-action action
6.
exceed-action action
7.
exit
8.
exit
9.
exit
10.
interface type interface-path-id
11.
service-policy {input | output} policy-map
12.
end
or
commit
13.
show policy-map interface type interface-path-id [input | output]
Note
The multi-action set/policer feature allows you to configure multiple conform and exceed actions. Hence, you can repeat the conform-action and exceed-action commands multiple times in your configuration.
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RSP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
policy-map policy-name
Example:
RP/0/RSP0/CPU0:router(config)# policy-map
policy1
|
Enters policy map configuration mode.
• Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
Step 3
|
class class-name
Example:
RP/0/RSP0/CPU0:router(config-pmap)# class
class1
|
Enters policy map class configuration mode.
• Specifies the name of the class whose policy you want to create or change.
|
Step 4
|
police rate {value [units] | percent
percentage} [burst burst-size [burst-units]]
[peak-burst peak-burst [burst-units]]
[peak-rate value [units]]
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# police
rate 250000
|
Configures traffic policing and enters policy map police configuration mode. The traffic policing feature works with a token bucket algorithm.
|
Step 5
|
conform-action action
Example:
RP/0/RSP0/CPU0:router(config-pmap-c-police)#
conform-action set mpls experimental topmost 3
|
Configures the action to take on packets that conform to the rate limit. The action argument is specified by one of the following keywords:
• drop—Drops the packet.
• set—Has the following keywords and arguments:
– cos value—Sets the class of service value. Range is 0 to 7.
– discard-class value—Sets the discard class value. Range is 0 to 7.
– dscp value—Sets the differentiated services code point (DSCP) value and sends the packet.
– mpls experimental {topmost | imposition} value—Sets the experimental (EXP) value of the Multiprotocol Label Switching (MPLS) packet topmost label or imposed label. Range is 0 to 7.
– precedence precedence—Sets the IP precedence and sends the packet.
– qos-group—Sets the QoS group value. Range is 0 to 63.
• transmit—Transmits the packets.
|
Step 6
|
exceed-action action
Example:
RP/0/RSP0/CPU0:router(config-pmap-c-police)#
exceed-action set mpls experimental topmost 4
|
Configures the action to take on packets that exceed the rate limit. The action argument is specified by one of the keywords specified in Step 5.
|
Step 7
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c-police)#
exit
|
Returns the router to policy map class configuration mode.
|
Step 8
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
|
Returns the router to policy map configuration mode.
|
Step 9
|
exit
Example:
RP/0/RSP0/CPU0:router(config-pmap)# exit
|
Returns the router to global configuration mode.
|
Step 10
|
interface type interface-path-id
Example:
RP/0/RSP0/CPU0:router(config)# interface
gigabitethernet 0/5/0/0
|
Enters configuration mode and configures an interface.
|
Step 11
|
service-policy {input | output} policy-map
Example:
RP/0/RSP0/CPU0:router(config-if)#
service-policy output policy1
|
Attaches a policy map to an input or output interface to be used as the service policy for that interface.
• In this example, the traffic policy evaluates all traffic leaving that interface.
|
Step 12
|
end
or
commit
Example:
RP/0/RSP0/CPU0:router(config-if)# end
or
RP/0/RSP0/CPU0:router(config-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
– Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
– Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
– Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 13
|
show policy-map interface type
interface-path-id [input | output]
Example:
RP/0/RSP0/CPU0:router# show policy-map
interface gigabitethernet 0/2/0/0
|
(Optional) Displays policy configuration information for all classes configured for all service policies on the specified interface.
|
Configuring Hierarchical Policing
Hierarchical policing provides support at two levels:
•
Parent level
•
Child level
SUMMARY STEPS
1.
configure
2.
policy-map policy-name
3.
class class-name
4.
service-policy policy-map-name
5.
police rate percent percentage
6.
conform-action action
7.
exceed-action action
8.
exit
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RSP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
policy-map policy-name
Example:
RP/0/RSP0/CPU0:router(config)# policy-map
policy1
|
Enters policy map configuration mode.
• Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.
|
Step 3
|
class class-name
Example:
RP/0/RSP0/CPU0:router(config-pmap)# class
class1
|
Enters policy map class configuration mode.
• Specifies the name of the class whose policy you want to create or change.
|
Step 4
|
service-policy policy-map-name
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)#
service-policy child
|
Attaches a policy map to an input or output interface to be used as the service policy for that interface.
|
Step 5
|
police rate percent percentage
Example:
RP/0/RSP0/CPU0:router(config-pmap-c)# police
rate percent 50
|
Configures traffic policing and enters policy map police configuration mode.
|
Step 6
|
conform-action action
Example:
RP/0/RSP0/CPU0:router(config-pmap-c-police)#
conform-action transmit
|
Configures the action to take on packets that conform to the rate limit. The allowed action is:
transmit—Transmits the packets.
|
Step 7
|
exceed-action action
Example:
RP/0/RSP0/CPU0:router(config-pmap-c-police)#
exceed-action drop
|
Configures the action to take on packets that exceed the rate limit. The allowed action is:
drop—Drops the packet.
|
Step 8
|
end
or
commit
Example:
RP/0/RSP0/CPU0:router(config-if)# end
or
RP/0/RSP0/CPU0:router(config-if)# commit
|
Saves configuration changes.
• When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
– Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
– Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
– Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Configuration Examples for Configuring QoS Congestion Management on Cisco ASR 9000 Series Routers
This section provides the following configuration examples:
•
Traffic Shaping for an Input Interface: Example
•
Traffic Policing for a Bundled Interface: Example
•
Hierarchical Policing: Example
•
Multi-action Set/Policer: Example
Traffic Shaping for an Input Interface: Example
The following example shows how to configure a policy map on an input interface:
interface GigabitEthernet0/4/0/24
RP/0/RSP0/CPU0:Jun 8 16:55:11.819 : config[65546]: %MGBL-LIBTARCFG-6-COMMIT :
Configuration committed by user 'cisco'. Use 'show configuration commit changes
1000006140' to view the changes.
The following example shows the display output for the previous policy map configuration:
RP/0/RSP0/CPU0:router# show policy-map interface GigabitEthernet 0/4/0/24 input
GigabitEthernet0/4/0/24 input: p2
Classification statistics (packets/bytes) (rate - kbps)
Inst-queue-len (packets) : 0
Taildropped(packets/bytes) : 0/0
RED random drops(packets/bytes) : 0/0
Classification statistics (packets/bytes) (rate - kbps)
Transmitted : Un-determined
Total Dropped : Un-determined
Traffic Policing for a Bundled Interface: Example
The following example shows how to configure a policy map for a bundled interface:
RP/0/RSP0/CPU0:Jun 8 16:51:51.679 : config[65546]: %MGBL-LIBTARCFG-6-COMMIT :
Configuration committed by user 'cisco'. Use 'show configuration commit changes
1000006135' to view the changes.
RP/0/RSP0/CPU0:Jun 8 16:52:02.650 : config[65546]: %MGBL-LIBTARCFG-6-COMMIT :
Configuration committed by user 'cisco'. Use 'show configuration commit changes
1000006136' to view the changes.
The following example shows the display output for the successful policy map configuration in which policing was configured in percentage:
RP/0/RSP0/CPU0:router# show policy-map interface bundle-ether 1
Classification statistics (packets/bytes) (rate - kbps)
Policing statistics (packets/bytes) (rate - kbps)
Policed and dropped : 0/0
Classification statistics (packets/bytes) (rate - kbps)
High watermark (packets) : 0
Inst-queue-len (bytes) : 0
Avg-queue-len (bytes) : 0
TailDrop Threshold(bytes) : 239616000
Taildropped(packets/bytes) : 0/0
Hierarchical Policing: Example
The following configuration is an example of typical hierarchical policing:
Multi-action Set/Policer: Example
The following example shows how to configure multi-action set/policer in the ingress direction:
police rate 3125000 peak-rate 100000000 peak-burst 3125000
conforfm-action set mpls exp imp 1
conform-action set discard-class 1
Additional References
The following sections provide references related to implementing QoS congestion management.
Related Documents
Related Topic
|
Document Title
|
Initial system bootup and configuration
|
Cisco ASR 9000 Series Aggregation Services Router Getting Started Guide
|
Master command reference
|
Cisco ASR 9000 Series Aggregation Services Router Master Command Listing
|
QoS commands
|
Cisco ASR 9000 Series Aggregation Services Router Modular Quality of Service Command Reference
|
User groups and task IDs
|
"Configuring AAA Services on Cisco ASR 9000 Series Router" module of Cisco Cisco ASR 9000 Series Aggregation Services Router System Security Configuration Guide
|
Standards
Standards
|
Title
|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
|
—
|
MIBs
RFCs
RFCs
|
Title
|
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.
|
—
|
Technical Assistance
Description
|
Link
|
The Cisco Technical Support website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.
|
http://www.cisco.com/techsupport
|