2.1 Traffic Policing and Traffic Shaping Overview
This section describes the basic concepts of traffic policing and traffic shaping and the
differences between traffic policing and traffic shaping.
2.1.1 Traffic Policing
To make full use of limited network resources, perform traffic policing for special service flows
to adapt to the allocated network resources.
Traffic policing monitors the rate limit to limit the traffic and resource usage. It then discards
the excess traffic to limit traffic within a proper range and to protect network resources.
Token Bucket and Traffic Measurement
When the traffic exceeds the rate limit, the S3700 uses traffic control policies. Generally, the
S3700 uses a token bucket to measure the volume of traffic.
A token bucket is considered as a container that stores a certain number of tokens. The S3700
puts tokens at the configured rate (one token bucket can forward one bit of data) in a token
bucket. When the token bucket is full, the excess tokens overflow and the number of tokens no
longer increases.
When measuring the traffic in a token bucket, the S3700 forwards packets based on the number
of tokens in the token bucket. If there are sufficient tokens in the token bucket to forward packets,
the traffic rate is within the rate limit. Otherwise, the traffic rate exceeds the rate limit.
Figure 2-1
Using a token bucket to measure the traffic
Packets that need to be
sent from this interface
Continue to send
Token
bucket
Put tokens into the bucket at
the set rate
Classification
Drop
The S3700 supports the single token bucket and dual token buckets.
S3700HI Ethernet Switches
Configuration Guide - QoS
2 Traffic Policing and Traffic Shaping Configuration
Issue 01 (2012-03-15)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
53