




Block diagram for token bucket shaper Input data Added each token to Token Bucket Token Bucket No ucket full Queue Processor Departure Yes Discard Take input data from host computer and added each token to Token Bucket. . Let bucket can hold b packets. The token is discarded when the bucket is filled. .When a packet with m bytes are arrived, m tokens are removed from the bucket and the packet is sent to the network. If the receives the tokens which are less than n and doesn't remove any token form the network, the packet is said to be non-conformant
Assumed data The maximum capacity of the bucket-C The maximum output rate-M The token generated time (or) arrival time-p The burst length-S Calculate the burst length (S) is as follows C = S (M-p) (M-p) b) Consider the data . The leaky bucket rate (M) 1,000,000 packets/second....... (1) The token bucket size (C) 2.000 tokens Each packet requires 4 tokens to be served Now convert from tokens to packets: 2000 . The token generation rate (p 100,000 tokens/second -25000 packets / second...(3) 4
Using (1). (2), and (3) to calculate the burst length(S) as given below: (M-p) 500 (1000000-25000) 500 975000 - 5.12x101 Average output rate is calculated as given below: Averageoutput rate-MxS -1000000x5.12x10 512.82 packets/second c) The minimum inter-departure time between the packets observed at the output is calculated as given below: Minimum in ter-departure time packet size average rate - 4 512.82 7.8ms
d) For arrival rate oftraffic is 1,000 packets/second: If the token generation rate (p)- 1000 packets/second Detenmine the burst length S as given below. (M -p) 500 (1000000-1000) 5.005 x10 Average output rate is calculated as given below: Average output rate =M × S = 1000000 x 5.005 × 10-4 500.5 packets/second
For arrival rate of traffic is 100,000 packets/second: If the token generation rate (ρ)-100000 packets/second Determine the burst length S as given below: (M -P) 500 (1000000 100000 -5.55 x104 Average output rate is calculated as given below: Average output rate MxS -1000000x5.55x10 - |555packets/second