How Do I Set Parameters Such as the CIR and CBS When Configuring Rate Limiting?
- The CBS value must be greater than or equal to the maximum length of packets that are allowed to pass through the network.
Because the device uses the packet-by-packet forwarding mode, all packets are discarded when the CBS value is smaller than the maximum length of packets that are allowed to pass through the network.
Example:
Assume that the maximum traffic rate is set to 10 Mbit/s and a small CBS value is set (such as 1000 bytes) in the mode of two buckets at a single rate. If each packet during a period of time is longer than 1000 bytes, these packets will all be discarded. As a result, no packet is forwarded within this period of time, and the packet forwarding rate is 0. This wastes network resources and causes service exceptions.
- If the CBS value is set too large, the rate limiting configuration is meaningless.
Example:
Assume that the maximum traffic rate is set to 10 Mbit/s and the CBS value is set to 7200 MB in the mode of two buckets at a single rate. When buckets are full of tokens, if the total length of packets with various lengths in 1 hour is 7200 MB, these packets can obtain tokens and be forwarded. The packet forwarding rate in this hour is 16 Mbit/s (7200 MB x 8 bps/3600s = 16 Mbit/s). Traffic rate limiting is not achieved.
Similarly, the PIR and PBS values must be set within a proper range in the mode of double-rate and double-bucket.
- You are advised to set the CIR and PIR values to a multiple of the minimum committed access rate (CAR) granularity.
If the CIR and PIR values are both a multiple of the minimum CAR granularity, traffic policing and rate limiting are performed based on the specified values. Otherwise, the traffic rate is limited based on a multiple of the minimum granularity.
Example:
The minimum CAR granularity for traffic policing is 64 kbit/s on the device. If the CIR value is set to smaller than 64 kbit/s, the traffic rate is limited to 64 kbit/s. If the CIR value is larger than 128 kbit/s and smaller than or equal to 192 kbit/s, the traffic rate is limited to 192 kbit/s.