Token Bucket Example - ZyXEL Communications P-660HW-Tx v3 User Manual

Zyxel 802.11g wireless adsl2+ 4-port gateway
Hide thumbs Also See for P-660HW-Tx v3:
Table of Contents

Advertisement

Chapter 16 Quality of Service (QoS)

16.7 Token Bucket Example

This is an example of how the token bucket works.
Table 73 Example Data
b=125,000 bytes
(around 1 Megabit)
t=100
The algorithm works as follows (see also
A: Assume that there are 2000 tokens in the bucket at the first moment (T = 0).
B: One hundred tokens are added to the bucket after one second. A packet of
1500 bytes arrives and the ZyXEL Device transmits it directly as there are already
enough tokens in the bucket to cover the size of the packet. The ZyXEL Device
then deducts 1500 tokens from the bucket leaving 600 tokens in the bucket
(2100-1500).
C: One hundred more tokens are added in the bucket after one second. A packet
of 500 bytes arrives and the ZyXEL Device again transmits it directly and then
deducts 500 tokens from the bucket leaving just 200 tokens (700-500).
D: After one more second, one hundred more tokens are added to the bucket. A
packet of 1000 bytes flows in. The ZyXEL Device holds the packet since the
number of tokens are insufficient.
E: After enough tokens (1000) are in the bucket, the ZyXEL Device transmits it
and then deducts 1000 tokens from the bucket.
Figure 105 Token Bucket Scenario Example
2000
1200
400
0
266
This is the size of the bucket. The bucket holds up to 125,000
tokens.
This means a token is generated every 0.01 (=1/t) seconds. The
maximum instantaneous transmission rate for outgoing traffic is
(b'x8)/t Mbps where b' is the number of tokens in the bucket at
that instant.
A
2000
B
2100-1500
C
=600
700-500
=200
Figure 105 on page
D
400
300
1000-1000
=0
Time (sec)
P-660HW-Tx v3 User's Guide
266):
E

Advertisement

Table of Contents
loading

Table of Contents