Frame Relay Traffic Policing and Shaping - Page 2

 By Cisco Press
Page 2 of 6   |  Back to Page 1
Print Article

A token bucket is used to manage a device that regulates the data in a flow. For example, the regulator might be a traffic policer, such as CAR, or a traffic shaper, such as FRTS or GTS. A token bucket has no discard or priority policy. Rather, a token bucket discards tokens and leaves to the flow the problem of managing its transmission queue if the flow overdrives the regulator. (CAR, FRTS, and GTS do not implement either a true token bucket or a true leaky bucket.)

In the token bucket metaphor, the following occurs:

  • Tokens are put into the bucket at a certain rate. The bucket has a specified capacity.
  • If the bucket fills to capacity, newly arriving tokens are discarded.
  • Each token has permission for the source to send a certain number of bits into the network.
  • To send a packet, the regulator must remove from the bucket a number of tokens equal in representation to the packet size.
  • If not enough tokens are in the bucket to send a packet, the packet either waits until the bucket has enough tokens (in the case of GTS), or the packet is discarded or marked down (in the case of CAR).
  • If the bucket is already full of tokens, incoming tokens overflow and are not available to future packets. Thus, at any time, the largest burst that a source can send into the network is roughly proportional to the size of the bucket.
The token bucket mechanism used for traffic shaping has both a token bucket and a data buffer, or queue. If the token bucket mechanism for traffic shaping did not have a data buffer, it would be a traffic policer.

The following applies for traffic shaping:

  • Packets that arrive that cannot be sent immediately are delayed in the data buffer.
  • A token bucket permits burstiness, but also bounds it.
  • Traffic shaping guarantees that the burstiness is bounded so that the flow will never send more quickly than the capacity of the token bucket plus the time interval multiplied by the established rate at which tokens are placed in the bucket.
  • Traffic shaping guarantees that the long-term transmission rate will not exceed the established rate at which tokens are placed in the bucket.

This article was originally published on Feb 11, 2002
Get the Latest Scoop with Networking Update Newsletter