![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Traffic Policing
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Table of ContentsTraffic PolicingFeature Overview
Supported Platforms Supported Standards, MIBs, and RFCs Prerequisites Configuration Tasks Monitoring and Maintaining Traffic Policing Configuration Examples Command Reference police Glossary Traffic PolicingThis feature module describes the Traffic Policing feature. It includes information on the benefits of the feature, supported platforms, related documents, and so forth. This document includes the following sections:
Feature OverviewThe Traffic Policing feature performs the following functions:
Traffic policing is used to control the rate of traffic flowing across an interface. These matching criteria are defined in a traffic class (which is configured with the class-map command). The Traffic Policing feature is applied when you configure a service policy in the Modular Quality of Service Command-Line Interface (Modular QoS CLI). For information on configuring the Modular QoS CLI, see the Modular Quality of Service Command-Line Interface Overview on CCO and the Documentation CD-ROM. BenefitsBandwidth Management Through Rate Limiting Traffic policing allows you to control the maximum rate of traffic transmitted or received on an interface. Traffic policing is often configured on interfaces at the edge of a network to limit traffic into or out of the network. Traffic that falls within the rate parameters is transmitted, whereas traffic that exceeds the parameters is dropped or transmitted with a different priority. Packet Marking Through IP Precedence, QoS Group, and DSCP Value Setting Packet marking allows you to partition your network into multiple priority levels or classes of service (CoS).
Restrictions
Related Features and Technologies
Related Documents
Supported Platforms
Supported Standards, MIBs, and RFCsStandards No new or modified standards are supported by this feature. MIBs No new or modified MIB's are supported by this feature. For descriptions of supported MIBs and how to use MIBs, see the Cisco MIB web site on CCO at http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml. RFC's No new or modified RFCs are supported by this feature. PrerequisitesCisco Express Forwarding (CEF) must be configured on the interface before traffic policing can be used. For additional information on Cisco Express Forwarding, see the Cisco Express Forwarding and Distributed Cisco Express Forwarding feature modules. Configuration TasksSee the following sections for configuration tasks for the Traffic Policing feature. Each task in the list indicates if the task is optional or required.
Configuring Traffic PolicingTo successfully configure the Traffic Policing feature, a traffic class and a service policy have to be created, and the service policy must be attached to a specified interface. These tasks are performed using the Modular QoS CLI. For information on the Modular QoS CLI, see the Modular Quality of Service Command-Line Interface document on CCO or the Documentation CD-ROM. The Traffic Policing feature is configured in the service policy. To configure the Traffic Policing feature, use the following command in policy map configuration mode:
The Traffic Policing feature works with a token bucket. For a description of a token bucket and an explanation of how it works, see the "What is a Token Bucket?" section of the Policing and Shaping Overview document. An example of how the token bucket algorithm works is also given in the Command Reference section of this document. Verifying Traffic PolicingUse the show policy-map interface EXEC command to verify that the Traffic Policing feature is configured on your router. If the feature is configured on your interface, the show policy-map interface command output displays policing statistics: Router# show policy-map interface Ethernet1/7 service-policy output: x class-map: a (match-all) 0 packets, 0 bytes 5 minute rate 0 bps match: ip precedence 0 police: 1000000 bps, 10000 limit, 10000 extended limit conformed 0 packets, 0 bytes; action: transmit exceeded 0 packets, 0 bytes; action: drop last packet: 1096090208ms ago, current burst: 0 bytes conformed 0 bps, exceed 0 bps Troubleshooting Tips
Monitoring and Maintaining Traffic Policing
Configuration ExamplesThis section provides the following configuration example: Configuring a Service Policy that Includes Traffic PolicingThe following configuration shows how to define a traffic class (with the class-map command) and associate that traffic class with a service policy (with the policy-map command). Traffic policing is applied in the service policy. The service-policy command is then used to attach the service policy to the interface. For additional information on configuring traffic classes and service policies, see the Modular Quality of Service Command-Line Interface document on CCO and the Documentation CD-ROM. In this particular example, traffic policing is configured with the average rate at 8000 bits per second, the normal burst size at 2000 bytes, and the excess burst size at 4000 bytes. Packets coming into Fast Ethernet interface 0/0 are evaluated by the token bucket algorithm to analyze whether packets conform or exceed. Packets that conform are transmitted, whereas packets that exceed are assigned a QoS transmit value of 4. For a description of a token bucket and an explanation of how a token bucket works, see the "What is a Token Bucket?" section of the Policing and Shaping Overview document. An example of how the token bucket works is also given in the "Command Reference" section of this document. 7200-uut(config)# class-map larry 7200-uut(config-cmap)# match access-group 2 7200-uut(config-cmap)# exit 7200-uut(config)# policy-map bird 7200-uut(config-pmap)# class larry 7200-uut(config-pmap-c)# police 8000 2000 4000 conform-action transmit exceed-action set-qos-transmit 4 7200-uut(config-pmap-c)# exit 7200-uut(config-pmap)# exit 7200-uut(config)# interface fastethernet 0/0 7200-uut(config-if)# service-policy input bird Command Reference
policeTo configure the Traffic Policing feature, use the police policy map configuration command. The no form of this command removes the Traffic Policing feature from the configuration. police bps burst-normal burst-max conform-action action exceed-action actionno police bps burst-normal burst-max conform-action action exceed-action action Syntax Description Description
Defaults Disabled Command Modes Policy-map configuration mode Command History
Usage Guidelines The Traffic Policing feature operates with a token bucket. For a description of a token bucket and an explanation of how a token bucket works, see the "What is a Token Bucket?" section of the Policing and Shaping Overview document. The following configuration shows users how to define a traffic class (using the class-map command) and associate the match criteria from the traffic class with the Traffic Policing configuration, which is configured in the service policy (using the policy-map command). The service-policy command is then used to attach this service policy to the interface. In this particular example, traffic policing is configured with the average rate at 1 bit per second, the normal burst size at 2 bytes per second, and the excess burst size at 4 bytes per second for all packets leaving Fast Ethernet interface 0/0. 7200-uut(config)# class-map larry 7200-uut(config-cmap)# match access-group 2 7200-uut(config-cmap)# exit 7200-uut(config)# policy-map bird 7200-uut(config-pmap)# class larry 7200-uut(config-pmap-c)# police 1 2 4 conform-action transmit exceed-action set-qos-transmit 4 7200-uut(config-pmap-c)# exit 7200-uut(config-pmap)# exit 7200-uut(config)# interface fastethernet 0/0 7200-uut(config-if)# service-policy input bird Below is a step-by-step summation of how a series of packets entering Fast Ethernet interface 0/0 are treated. This example assumes that all entering packets conform to the specified matching criteria and that 1 data unit enters the token bucket for each time unit.
The following table summarizes the example: Table 1: Token Bucket Configuration Example
Related Commands
Glossaryaverage rateMaximum long-term average rate of conforming traffic. conform actionAction to take on packets with a burst size below the rate allowed by the rate limit. DSCPdifferentiated services code point exceed actionAction to take on packets that exceed the rate limit. excess burst sizeBytes allowed in a burst before all packets will exceed the rate limit. normal burst sizeBytes allowed in a burst before some packets will exceed the rate limit. Larger bursts are more likely to exceed the rate limit. QoS groupInternal QoS group ID for a packet used to determine weighted fair queuing characteristics for that packet. policing policyRate limit, conform actions, and exceed actions that apply to traffic matching a certain criteria. Versatile Interface Processor (VIP)Interface card used by Cisco 7500 series and Cisco 7000 series with RSP7000 routers.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||