QoS Traffic Policing Explained

Hello Roshan

At the very beginning, when the device is turned on and QoS policing mechanisms take place, the token bucket is full. Let’s say that the maximum capacity of the bucket is 24K tokens for argument’s sake.

Tokens are removed from the bucket every time a packet arrives. The size of the packet in bytes is the number of tokens that are removed.

So if a packet of 50 bytes arrives, it will remove (50x8=400 bits) 400 tokens from the bucket, resulting in 23600 tokens at that specific moment in time.

Remember that tokens are replenished based on the amount of time that has passed between packets. This is why we use the (packet arrival time - previous packet arrival time) formula. This can also be described as “as long as the circuit is idle”. If you set a CIR of 96kbps, then you are setting your token replenishing rate at 96000 bits per second as long as the circuit is idle.

Every time a packet comes, we remove tokens, and every time interval where the circuit is idle passes, the tokens are replenished at a rate of (idle time) * CIR.

I hope this has been helpful!

Laz

1 Like