45
5
Traffic policing and line rate
configuration
Traffic policing, traffic shaping, and rate limit are QoS techniques that help assign
network resources such as bandwidth. They increase network performance and user
satisfaction. For example, you can configure a flow to use only the resources committed
to it in a certain time range, thus avoiding network congestion caused by burst traffic.
Traffic policing and generic traffic shaping (GTS) limit traffic rate and resource usage
according to traffic specifications. Once a particular flow exceeds its specifications
such as bandwidth, it is shaped or policed to ensure that it conforms to the
specifications. Token buckets are typical tools for evaluating traffic specifications.
Traffic evaluation and token bucket
Token bucket features
A token bucket is analogous to a container that holds a certain number of tokens. Each
token represents a certain forwarding capacity, typically, a one-bit forwarding authority.
The system puts tokens into the bucket at a set rate. When the token bucket is full, the
extra tokens overflow.
Evaluating traffic with the token bucket
A token bucket mechanism evaluates traffic by looking at the number of tokens in the
bucket. To forward an n-bit packet,
n
tokens are required. If the number of tokens in the
bucket is enough for forwarding the packets, the traffic conforms to the specification,
and is called conforming traffic. Otherwise, the traffic does not conform to the
specification, and is called excess traffic.
A token bucket has the following configurable parameters:
Mean rate at which tokens are put into the bucket, which specifies the permitted
average rate of traffic. It is usually set to the committed information rate (CIR).
Burst size or the capacity of the token bucket. It specifies the maximum traffic size
permitted in each burst. It is usually set to the committed burst size (CBS). The set
burst size must be greater than the maximum packet size.