What is the value of the value token bucket when doing single rate shaping and also what determines the rate at which the token bucket is replenished/refilled when packets are forwarded?
Every Tc, we get a fresh suppy of tokens equal to the Bc.
If the CIR is 64,000 and the Bc is 6,400 our Tc would be 100ms. Tc=Bc/CIR.
Each token is permission to send a certain number of bits into the network.
To send a packet, tokens are removed from the bucket, equal in representation to the packet size.
If not enough tokens are in the bucket to send a packet, the packet waits until the bucket has enough tokens.
The bucket itself has a specified capacity. If the bucket fills to capacity, newly arriving tokens are discarded and are not available to future packets, which means that the largest burst that can be sent into the network is roughly proportional to the size of the bucket.
Token bucket is a drug-induced way of merely explaining the "permission to send" concept...
You can only send 'x' number of bits per second based on your line speed. You can try to get any more than that as much as you want, but it ain't gonna happen.
So you shape at something less. And you mathematically figure out that in order to send 'y' (less than 'x') bits per second, I need to send 'z' bits per time cycle (Tc) based on whatever you come up with.
If you want to send y = 64000 bps over 125ms (1/8 sec) Tc, then you get 8000 bits every Tc. Think of it as tokens if it makes you feel better, but the problem with that is that it's not like you get rollover tokens (Yes, thank you Cingular Wireless --> AT&T Wireless). Physics doesn't work that way.
Keith nicely explains that with the "newly arriving tokens are discarded" but (IMHO) this still involves a significant amount of pharmaceutical expirimentation to get on board with. Can't we just call it math and be done with it? Or does math scare people?
Sorry Keith. Love ya, but.... Despise tokens.
I kind of like the /rant. Your rants seems too ooze valuable information!