Configuration Examples - Cisco ASR 920 Series Configuration Manual

Policing and shaping configuration guide
Hide thumbs Also See for ASR 920 Series:
Table of Contents

Advertisement

Class-Based Policing

Configuration Examples

Example Configuring a Service Policy that Includes Traffic Policing
In the following example, Class-Based Policing is configured with the average rate at 8000 bits per second,
the normal burst size at 1000 bytes, and the excess burst size at 1000 bytes for all packets leaving Fast Ethernet
interface 0/0.
class-map access-match
match access-group 1
exit
policy-map police-setting
class access-match
police 8000 1000 1000 conform-action transmit exceed-action set-qos-transmit 1 violate-action
drop
exit
exit
service-policy output police-setting
The treatment of a series of packets leaving Fast Ethernet interface 0/0 depends on the size of the packet and
the number of bytes remaining in the conform and exceed token buckets. The series of packets are policed
based on the following rules:
• If the previous arrival of the packet was at T1 and the current arrival of the packet is at T, the bucket is
(time between packets <which is equal to T - T1> * policer rate)/8 bytes
• If the number of bytes in the conform bucket B is greater than or equal to 0, the packet conforms and
• If the number of bytes in the conform bucket B is less than 0, the excess token bucket is checked for
• If the number bytes in the exceed bucket B is fewer than 0, the packet violates the rate and the violate
In this example, the initial token buckets starts full at 1000 bytes. If a 450-byte packet arrives, the packet
conforms because enough bytes are available in the conform token bucket. The conform action (send) is taken
by the packet and 450 bytes are removed from the conform token bucket (leaving 550 bytes).
If the next packet arrives 0.25 seconds later, 250 bytes are added to the conform token bucket
((0.25 * 8000)/8), leaving 800 bytes in the conform token bucket. If the next packet is 900 bytes, the packet
does not conform because only 800 bytes are available in the conform token bucket.
The exceed token bucket, which starts full at 1000 bytes (as specified by the excess burst size) is then checked
for available bytes. Because enough bytes are available in the exceed token bucket, the exceed action (set the
QoS transmit value of 1) is taken and 900 bytes are taken from the exceed bucket (leaving 100 bytes in the
exceed token bucket.
updated with T -T1 worth of bits based on the token arrival rate. The refill tokens are placed in the
conform bucket. If the tokens overflow the conform bucket, the overflow tokens are placed in the exceed
bucket. The token arrival rate is calculated as follows:
the conform action is taken on the packet. If the packet conforms, B bytes are removed from the conform
bucket and the conform action is taken. The exceed bucket is unaffected in this scenario.
bytes by the packet. If the number of bytes in the exceed bucket B is greater than or equal to 0, the exceed
action is taken and B bytes are removed from the exceed token bucket. No bytes are removed from the
conform bucket in this scenario.
action is taken. The action is complete for the packet.
QoS: Policing and Shaping Configuration Guide (Cisco ASR 920 Series)
Configuration Examples
5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents