Configuration Examples For Class-Based Policing; Example Configuring A Service Policy That Includes Traffic Policing - Cisco ASR 900 Series Configuration Manual

Aggregation services router qos: policing and shaping configuration guide, cisco ios xe release 3s
Hide thumbs Also See for ASR 900 Series:
Table of Contents

Advertisement

Configuration Examples for Class-Based Policing

Configuration Examples for Class-Based Policing

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 the interface.
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 FastEthernet interface 1/1/1 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 is greater than the length of the packet (for example, B),
• If the number of bytes in the conform bucket is less than the length of the packet, but the number of
• 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).
QoS: Policing and Shaping Configuration Guide, Cisco IOS XE Release 3S (Cisco ASR 900 Series)
8
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:
then the packet conforms and B bytes should be removed from the bucket. 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 in the exceed bucket is greater than the length of the packet (for example, B), the packet exceeds
and B bytes are removed from the bucket.
action is taken. The action is complete for the packet.
Class-Based Policing

Advertisement

Table of Contents
loading

Table of Contents