Describe how a token bucket work Does token bucket police pe
Solution
Problem 1:
a) Token bucket algorithm
In a token bucket algorithm the size of a bucket is defined.Consider bucket as a container in which you can fill water upto exact size not more than that.
Intially a bucket starts is full and when the first packet arrives we remove byte from bucket.And when next packet arrives we add tokens to the bucket depending on the size of bucket and transmit the packets as bucket allows.Also the token transmission size is defined.
b)The token bucket is used in traffic policing and this mechanism discards the nonconforming packets.The token bucket is used to protect excessive traffic.
c)FIFO is the default mechanism which involves storing packets during congestion and forwarding the packets when network no longer remains congested.But FIFO do not have any pcket priority mechanism.And when the queue is full due the tail is dropped.
Priority Queue:
The priority of this mechanism is for the faster handling of network traffic and for important trafficIt is base on the network protocol,packet size,addresses,etc.There are four queues known as low base,normal,medium,high priority(Increasing order).And depending on the importance of the packet the queue is used.
Round Robin:
In round robin the packets are sorted into classes.This mechanism uses altrnating services between the classes.ex.When one packet is transmitted from class A then next packet is transmitted from class B.
Weighted Fair QUeuing:
It is the abstraction of round robin method.In this mechanism the packets are further classified into subclasses
d)In leaky bucket the rate of incoming packets and outgoing packet rates are constant(different from each other.So as explained above weighted fair queue can be used with leaky buckets to further subclass packets and sending out based on importance.
