|
The Single Token Bucket Policer
The combination of a token bucket meter and an algorithmic dropper forms the Single Token Bucket Policer. It represents a means to enforce an upper bound on the amount of traffic a source or a port is allowed to transmit over any specified time interval.
The operation of the policer is as follows:
Data packets that arise from the source reach the metering point of the token bucket. At that time instance a comparison is done between the size of the packet and the available tokens in the bucket.
If there are sufficient tokens corresponding to the size of the packet then the packet is tagged ‘conformant’ and equivalent amount of tokens are removed from the bucket. The subsequent dropper will allow this packet to continue into the network.
If there are insufficient tokens corresponding to the size of the packet, then the packet is tagged ‘non conforming’ and no tokens are removed from the bucket. The subsequent algorithmic dropper discards the packet.
Tokens accumulate at constant pace, which is equal to CIR bits/sec. As long as the amount of tokens does not exceed the bucket depth tokens are accumulated, otherwise tokens are lost. The term ‘overflow’ or ‘overspill’ is often used to depict this situation.
The Token Bucket Policer does not involve queuing. Policing is executed on data flows ‘on the fly’. Typically in network devices a policing stage is followed by a queuing stage, although egress policing (after the egress queuing stage) also exists, mainly when policing is applied on an aggregate, such as traffic belonging to subscribers of an ISP over a wholesaler’s network gear.
By convention, a token bucket starts full at time zero.
|