To achieve this, we need to monitor the traffic entering the network and implement car (Committed Access rate).
CAR: Limit the rate of user traffic entering the network within the agreed range, thereby avoiding network congestion.
CIR (Committed information Rate): The rate at which a token is served in the C bucket (only one token bucket in a single bucket, called a C-bucket), that is, the average rate at which the C-bucket allows the transmission or forwarding of messages.
CBS (Committed Burst size): Committed burst size, indicating the capacity of C-barrels, that is, the C-barrel can be instantaneous through the promise of burst traffic. The maximum number of passes that can be placed in a box of a pass card, that is, the maximum number of vehicles that can be allowed to pass through the automatic card system.
EBS (Excess Burst size): Excess burst size, indicating the capacity of e-barrels, that is, the e-barrel can be passed in an instant beyond the burst of traffic.
PIR (peak information rate): The peak rate of information, which indicates the rate at which tokens are served in the P bucket, that is, the peak speed at which the P-bucket is allowed to transmit or forward messages. The value of the PIR should be greater than CIR (where there is enough service card and insufficient pass).
PBS (peak Burst size): Peak burst size, which represents the capacity of the P-bucket, the peak burst that the P-bucket can pass instantaneously.
Note: At present, the Huawei Ethernet switch only supports single-speed single-barrel and two-speed dual-barrel mode.
Simply put, the bandwidth parameter setting depends on the speed limit needed for the actual business. In principle, the token bucket capacity needs to be greater than or equal to the maximum reported length that may occur in the network and the normal burst of business traffic. For Huawei's Ethernet switches, we have a summary of empirical formulas:
L Bandwidth ≤100mbit/s, token bucket capacity (Bytes) = Bandwidth (kbit/s) * (s)/8
L Bandwidth > 100mbit/s, token bucket capacity (Bytes) = 100000 (kbit/s) * (s)/8
In addition, Huawei's Ethernet switch, different series of single board support car granularity is different. In the case of traffic regulation and speed limit,
L if the configured Cir, PIR is an integer multiple of the minimum granularity, the regulation and speed limit are based on the configured rate.
L if the configured CIR, PIR is not an integer multiple of the minimum granularity, the traffic is supervised and speed limited according to the smallest integer multiples.
For example, the regulation on the device and the speed limit granularity are 64kbit/s, if the CIR value ≤64kbit/s, according to 64kbit/s processing, if the 128kbit/s < CIR value ≤192kbit/s, follow 192kbit/s processing.
Token bucket principle Application interface speed limit
The token bucket principle can be applied to the orientation and direction of the device. Depending on the application of the token bucket principle in different directions, different functions can be realized.
The relationship between traffic policing, traffic shaping, interface speed limit and token bucket algorithms is shown in the table below.
Application direction |
Single-speed single barrel |
Two-speed two-barrel |
Device in direction |
interface-based interface speed limit |
Flow-based monitoring for traffic |
Device out Direction |
interface-based interface speed limit |
Queue-based for traffic shaping |
Traffic regulation is a flow control strategy that restricts traffic and network resources by monitoring traffic specifications. If this flow control policy is applied to the in direction of the device interface, the interface speed limit can also be achieved in the direction. This approach introduces the MQC (Modular QoS command-line Interface), which is more flexible than the interface-based interface speed limit implemented by interfaces.
What we call the speed limit is the generalized interface speed limit, which includes interface-based and MQC-based interface speed limits.
CIR,CBS,EBS,PIR,PBS noun Explain token bucket application