- Policing and Shaping Overview
- IPv6 QoS: MQC Traffic Policing
- Configuring Traffic Policing
- IPv6 QoS: MQC Traffic Shaping
- Two-Rate Policer
- Policer Enhancement - Multiple Actions
- Percentage-Based Policing and Shaping
- Modular QoS CLI Three-Level Hierarchical Policer
- ATM Policing by Service Category for SVC and SoftPVC
- Modular QoS CLI Unconditional Packet Discard
- Control Plane Policing
- Control Plane Protection
- Control Plane Logging
- Management Plane Protection
- Class-Based Policing
- QoS Percentage-Based Policing
- Overhead Accounting
- Adaptive QoS over DMVPN
Contents
- Two-Rate Policer
- Finding Feature Information
- Prerequisites for Two-Rate Policer
- Restrictions for Two-Rate Policer
- Information About Two-Rate Policer
- Benefits
- How to Use the Two-Rate Policer
- Configuring the Two-Rate Policer
- Verifying the Two-Rate Policer Configuration
- Troubleshooting Tips
- Monitoring and Maintaining the Two-Rate Policer
- Configuration Examples
- Example Limiting the Traffic Using a Policer Class
- Additional References
- Feature Information for Two-Rate Policer
Two-Rate Policer
This document describes the Two-Rate Policer feature and how to configure it. Two-Rate Policer allows you to manage traffic rates through an interface; it is especially helpful in managing network bandwidth where large packets are in the same traffic stream.
- Finding Feature Information
- Prerequisites for Two-Rate Policer
- Restrictions for Two-Rate Policer
- Information About Two-Rate Policer
- How to Use the Two-Rate Policer
- Configuration Examples
- Additional References
- Feature Information for Two-Rate Policer
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for Two-Rate Policer
Supported Platforms
Cisco 2600 series
Cisco 3620
Cisco 3640
Cisco 7100 series
Cisco 7200 series
Cisco 7500 series (VIP-based platform only)
Note | The set-clp-transmit action available with Two-Rate Policer, the Enhanced ATM Port Adapter (PA-A3) is required. The set-clp-transmit action is not supported on any platform that does not support the PA-A3 adapter (such as the Cisco 2600 series router, the Cisco 3620 router, and the 3640 router). For more information, see the documentation for your specific router. |
On a Cisco 7500 series router, Cisco Express Forwarding or Distributed Cisco Express Forwarding must be configured on the interface before you can use the Two-Rate Policer.
A traffic class and a service policy must be created, and the service policy must be attached to a specified interface. These tasks are performed using the Modular quality of service (QoS) Command-Line Interface (CLI) (MQC). For information on the MQC, see the "Applying QoS Features Using the MQC" module.
Restrictions for Two-Rate Policer
The following restrictions apply to the Two-Rate Policer feature:
On a Cisco 7500 series router, traffic policing can monitor Cisco Express Forwarding or Distributed Cisco Express Forwarding switching paths only. Cisco Express Forwarding or Distributed Cisco Express Forwarding must be configured on both the interface receiving the packet and the interface sending the packet.
On a Cisco 7500 series router, traffic policing cannot be applied to packets that originated from or are destined to a router.
Two-rate policing can be configured on an interface, a subinterface, a Frame Relay data-link connection identifier (DLCI), and an ATM permanent virtual circuit (PVC).
Two-rate policing is not supported on the following interfaces: - Fast EtherChannel
- PRI
- Any interface on a Cisco 7500 series router that does not support Cisco Express Forwarding or Distributed Cisco Express Forwarding
Information About Two-Rate Policer
Networks police traffic by limiting the input or output transmission rate of a class of traffic based on user-defined criteria. Policing traffic 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).
The Two-Rate Policer performs the following functions:
Limits the input or output transmission rate of a class of traffic based on user-defined criteria.
Marks packets by setting the IP precedence value, IP differentiated services code point (DSCP) value, Multiprotocol Label Switching (MPLS) experimental value, Quality of Service (QoS) group, ATM Cell Loss Priority (CLP) bit, and the Frame Relay Discard Eligibility (DE) bit.
With the Two-Rate Policer, you can enforce traffic policing according to two separate rates--committed information rate (CIR) and peak information rate (PIR). You can specify the use of these two rates, along with their corresponding values, by using two keywords, cir and pir, of the police command.
The Two-Rate Policer 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 the interface (depending on the location of the interface on which the Two-Rate Policer is configured) and is useful in managing network bandwidth in cases where several large packets are sent in the same traffic stream.
The token bucket algorithm provides users with three actions for each packet: a conform action, an exceed action, and an optional violate action. Traffic coming into the interface with the Two-Rate Policer configured is assigned 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.
The Two-Rate Policer 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 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.
Note | Two-Rate Policer enables you to use Differentiated Services (DiffServ) Assured Forwarding (AF) Per-Hop Behavior (PHB) traffic conditioning. For more information about DiffServ, see the "Implementing DiffServ for End-to-End Quality of Service Overview" module. |
Note | Starting with Cisco IOS Release 12.1(5)T, you can police traffic by using the Traffic Policing feature (sometimes referred to as the single-rate policer). The Two-Rate Policer (available with Cisco IOS Release 12.2(4)T) is in addition to the Traffic Policing feature, and it provides additional functionality. For more information about the Traffic Policing feature, see the "Traffic Policing" module. |
Benefits
Bandwidth Management Through Rate Limiting
Two-Rate Policer provides improved bandwidth management through rate limiting. Before this feature was available, you could police traffic with the single-rate Traffic Policing feature. The Traffic Policing feature provided a certain amount of bandwidth management by allowing you to set the peak burst size (be). The Two-Rate Policer supports a higher level of bandwidth management and supports a sustained excess rate. With the Two-Rate Policer, you can enforce traffic policing according to two separate rates--CIR and PIR--specified in bits per second (bps).
Packet Marking Through IP Precedence, DSCP Value, MPLS Experimental Value, and the QoS Group Setting
In addition to rate-limiting, the Two-Rate Policer allows you to independently mark the packet according to whether the packet conforms, exceeds, or violates a specified rate. Packet marking also allows you to partition your network into multiple priority levels or CoSs.
Use the Two-Rate Policer to set the IP precedence value, the IP DSCP value, or the 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 will be dropped.
Use the Two-Rate Policer to assign packets to a QoS group. The router uses the QoS group to determine how to prioritize packets within the router.
If you want to mark traffic but do not want to use the Two-Rate Policer, see the "Marking Network Traffic" module.
Packet Marking for Frame Relay Frames
The Two-Rate Policer allows users to mark the Frame Relay DE bit of the Frame Relay frame. The Frame Relay DE bit is one bit and, therefore, can be set to either 0 or 1. In congested environments, frames that have the DE bit set to 1 are discarded before frames that have the DE bit set to 0.
Packet Marking for ATM Cells
The Two-Rate Policer allows users to mark the ATM CLP bit in ATM cells. The ATM CLP bit is used to prioritize packets in ATM networks. The ATM CLP bit is one bit and, therefore, can be set to either 0 or 1. In congested environments, cells that have the ATM CLP bit set to 1 are discarded before cells that have the ATM CLP bit set to 0.
How to Use the Two-Rate Policer
- Configuring the Two-Rate Policer
- Verifying the Two-Rate Policer Configuration
- Troubleshooting Tips
- Monitoring and Maintaining the Two-Rate Policer
Configuring the Two-Rate Policer
Verifying the Two-Rate Policer Configuration
Command |
Purpose |
---|---|
Router# show policy-map interface |
Displays statistics and configurations of all input and output policies attached to an interface. |
Troubleshooting Tips
Check the interface type. Verify that your interface is not listed as a nonsupported interface in the Restrictions for Two-Rate Policer section of this module.
For input traffic policing on a Cisco 7500 series router, verify that Cisco Express Forwarding or Distributed Cisco Express Forwarding is configured on the interface on which traffic policing is configured.
For output traffic policing on a Cisco 7500 series router, ensure that the incoming traffic is Cisco Express Forwarding-switched or Distributed Cisco Express Forwarding-switched. Traffic policing cannot be used on the switching path unless Cisco Express Forwarding or Distributed Cisco Express Forwarding switching is enabled.
Monitoring and Maintaining the Two-Rate Policer
Command |
Purpose |
---|---|
Router# show policy-map |
Displays all configured policy maps. |
Router# show policy-map policy-map-name |
Displays the user-specified policy map. |
Router# show policy-map interface |
Displays statistics and configurations of all input and output policies that are attached to an interface. |
Configuration Examples
Example Limiting the Traffic Using a Policer Class
In this example, the Two-Rate Policer is configured on a class to limit traffic to an average committed rate of 500 kbps and a peak rate of 1 Mbps:
Router(config)# class-map police Router(config-cmap)# match access-group 10 1 Router(config-cmap)# policy-map policy1 Router(config-pmap)# class police Router(config-pmap-c)# police cir 500000 bc 10000 pir 1000000 be 10000 conform-action transmit exceed-action set-prec-transmit 2 violate-action drop Router(config)# interface serial3/0 Router(config-if)# service-policy output policy1 Router(config-if)# end Router# show policy-map policy1 Policy Map policy1 Class police police cir 500000 conform-burst 10000 pir 1000000 peak-burst 10000 conform-action transmit exceed-action set-prec-transmit 2 violate-action drop
Traffic marked as conforming to the average committed rate (500 kbps) will be sent as is. Traffic marked as exceeding 500 kbps, but not exceeding 1 Mbps, will be marked with IP Precedence 2 and then sent. All traffic exceeding 1 Mbps will be dropped. The burst parameters are set to 10,000 bytes.
Router# show policy-map interface serial3/0 Serial3/0 Service-policy output: policy1 Class-map: police (match all) 148803 packets, 36605538 bytes 30 second offered rate 1249000 bps, drop rate 249000 bps Match: access-group 101 police: cir 500000 bps, conform-burst 10000, pir 1000000, peak-burst 100000 conformed 59538 packets, 14646348 bytes; action: transmit exceeded 59538 packets, 14646348 bytes; action: set-prec-transmit 2 violated 29731 packets, 7313826 bytes; action: drop conformed 499000 bps, exceed 500000 bps violate 249000 bps Class-map: class-default (match-any) 19 packets, 1990 bytes 30 seconds offered rate 0 bps, drop rate 0 bps Match: any
Additional References
The following sections provide references related to the Two-Rate Policer feature.
Related Documents
Related Topic |
Document Title |
---|---|
MQC |
|
QoS features such as class-based weighted fair queueing (CBWFQ), traffic marking, and traffic policing |
Standards
Standard |
Title |
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
-- |
MIBs
MIB |
MIBs Link |
---|---|
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: |
RFCs
RFC |
Title |
---|---|
RFC 2698 |
A Two Rate Three Color Marker |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. |
Feature Information for Two-Rate Policer
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to . An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Information |
---|---|---|
Two-Rate Policer |
12.2(4)T 12.2(4)T3 12.0(26)S 12.2(28)SB 12.2(33)SRA 12.2(33)SXH Cisco IOS XE Release 2.1 Cisco IOS XE 3.1.0 SG |
This feature was introduced. Support for the Cisco 7500 series routers was added. This feature was integrated into Cisco IOS Release 12.0(26)S for the Cisco 7200 and 7500 series routers. This feature was integrated into Cisco IOS Release 12.2(28)SB. This feature was integrated into Cisco IOS Release 12.2(33)SRA. This feature was integrated into Cisco IOS Release 12.2(33)SXH. This feature was implemented on Cisco ASR 1000 Series Routers. This feature was integrated into Cisco IOS XE 3.1.0 SG. |