QoS Traffic Policing Explained

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

1 Like