# QoS Traffic Policing Explained

**URL:** <https://forum.networklessons.com/t/qos-traffic-policing-explained/995>\
**Category:** Lessons Discussion\
**Created:** [December 26, 2016, 5:48pm UTC](https://forum.networklessons.com/t/qos-traffic-policing-explained/995 "2016-12-26T17:48:04Z")\
**Posts on this page:** 1\
**Showing post:** 43

<div class="post-metadata">

**Author:** ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)\
**Post date:** [August 30, 2019, 5:57am UTC](https://forum.networklessons.com/t/qos-traffic-policing-explained/995/43 "2019-08-30T05:57:02Z")

</div>

Hello Ajai

Here’s an example I hope will help.

Let’s use the same values used by Rene. We have a CIR of 128000 bps and a PIR of 256000 bps. One second elapses between packets arriving, so the buckets will have:

- Bc bucket = 1 \* 128000/8 = 16000 tokens
- PIR bucket = 1 \* 256000/8 = 32000 tokens

The whole key to this algorithm is the fact that the Bc bucket and the PIR bucket are replenished at the same time, but **at different rates** , so you will always have a difference in the number of tokens in each bucket. Specifically, the difference between them is in direct proportion to the difference between the CIR and PIR.

Let’s assume that at a specific point in time, the buckets have the number of tokens calculated above. Let’s look at three scenarios:

1. Let’s say that the very next packet arriving is 12000 bytes. Compare this value to the number of tokens in the buckets and we see that **packet \< Bc**. Since this is true, the packet is considered **conforming**.
2. Instead of 12000 bytes, let’s say the very next packet arriving is 24000 bytes. Here we see that **Bc \< packet \< PIR** , by definition this means that the packet is exceeding.
3. Instead, let’s say the very next packet arriving is 36000 bytes. In this case **PIR \< packet** so the packet is violating.

I hope this has been helpful!

Laz

---

_[View the full topic](https://forum.networklessons.com/t/qos-traffic-policing-explained/995)._
