I have gone through token bucket algorithm. However, I am struggling to apply this knowledge into the real devices like CISCO, etc. So, for QoS policing, interface meter. I am trying to understand terminologies with respect to token bucket. Also, I am unsure about what I have understood is really correct or not? Please say yes/ no for each of my points so that I know what I have understood is correct or not.

1) Does token depth i.e. number of tokens is equal to the CBS ( committed Bust Size)? If not, what is it use for? I am having a difficulty in understanding this.

2) Does the rate at which token bucket is filled is CBS/CIR ? This means the OS or networking hardware - timer should replenish the bucket with tokens at the time interval of CBS/CIR. Is my understanding correct?

3) PIR concept doesn't come in simple token bucket? The Peak information rate concept comes when we have 2 buckets - the exceeded information rate - EIR. Thus, PIR is equal to CIR + EIR. The bucket size here is EBS.

In simple terms, what does CBS or EBS means?

Scenarios - Please correct me with yes/no and explanation.

a) If the bucket is filled completely and let's say the number of packets comes equal to the number of tokens then the bucket will be empty and all the packets will be moved out to the network.

b) Once the bucket is empty, it will start replenishing at the rate of CBS/CIR. Now, let's say that the packet comes before it has got even one token then the packet will stay in the queue and won't be transmitted out.

c) Once a token arrives i.e. even 1 token then the one packet is moved out. If between the two time stamps 2 packets have arrived then only one packet will move out since there is only 1 token. However, once the next token comes the other packet will move.

d) If the the token is full and if there are more packets than token then all the packets equal to the number of token will move out and rest of the packets will be in the queue waiting for the tokens to fill up in the bucket.

e) is it all done in the hardware or these algorithms are implemented in software?

  • Cisco has some documents that explain it all in Cisco terms if you simply search. The answers to your questions are really too large for this type of site. Read what Cisco has to say, the you can ask specific question (please, one question per posted question).
    – Ron Maupin
    Jul 10, 2018 at 12:40
  • In short, is CBS same as Token Bucket size? Jul 10, 2018 at 23:10


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.