4-14 Traffic Policing and Traffic Shaping ConfigurationWhen configuring traffic classification, traffic policing, and traffic shaping, go to these sections forinformation you are interested in:z Traffic Policing and Traffic Shaping Overviewz Traffic Policing, GTS and Line Rate Configurationz Displaying and Maintaining Traffic Policing, GTS and Line Ratez Traffic Policing and GTS Configuration ExamplesTraffic Policing and Traffic Shaping OverviewIf user traffic is not limited, burst traffic will make the network more congested. Therefore it is necessaryto limit user traffic in order to better utilize the network resources and provide better services for moreusers. For example, you can configure a flow to use only the resources committed to it in a 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 trafficspecifications. The prerequisite for traffic policing or GTS is to know whether a traffic flow has exceededthe specification. If yes, proper traffic control policies are applied. Generally, token buckets are used toevaluate traffic specifications.Traffic Evaluation and Token BucketToken bucket featuresA token bucket can be considered as a container holding a certain number of tokens. The system putstokens into the bucket at a set rate. When the token bucket is full, the extra tokens will overflow.Evaluating traffic with the token bucketThe evaluation for the traffic specification is based on whether the number of tokens in the bucket canmeet the need of packet forwarding. If the number of tokens in the bucket is enough to forward thepackets (generally, one token is associated with a 1-bit forwarding authority), the traffic conforms to thespecification, and the traffic is called conforming traffic; otherwise, the traffic does not conform to thespecification, and the traffic is called excess traffic.A token bucket has the following configurable parameters:z Mean rate: At which tokens are put into the bucket, namely, the permitted average rate of traffic. Itis usually set to the committed information rate (CIR).z Burst size: the capacity of the token bucket, namely, the maximum traffic size that is permitted ineach burst. It is usually set to the committed burst size (CBS). The set burst size must be greaterthan the maximum packet size.