How to configure interface-based rate limiting on a CE series switch

3

- Configure interface-based rate limiting in the inbound direction. In the following example, QoS CAR profile qoscar1 is configured to specify the rate limit, and the profile is applied to 10GE1/0/1.
<HUAWEI> system-view [~HUAWEI] qos car qoscar1 cir 10000 cbs 10240 [*HUAWEI] interface 10ge 1/0/1 [*HUAWEI-10GE1/0/1] qos car inbound qoscar1 [*HUAWEI-10GE1/0/1] commit
Note: When the packet forwarding mode is set to Cut Through on a CE8860EI, CE7850EI, CE6850U-HI, CE6851HI, or CE6850HI switch, the switch does not support interface-based rate limiting in the inbound direction. Before configuring interface-based rate limiting in the inbound direction, run the assign forward mode store-and-forward command to change the packet forwarding mode to store-and-forward.
- Configure interface-based rate limiting in the outbound direction. In the following example, the qos lr cir cir-value [ kbps | mbps | gbps ] [ cbs cbs-value [ bytes | kbytes | mbytes ] ] [ outbound ] command is executed in the interface view to limit the rate of outgoing traffic on the interface. Note: When the packet forwarding mode is set to Cut Through on a CE8860EI, CE7850EI, CE6850U-HI, CE6851HI, or CE6850HI switch, the switch does not support interface-based rate limiting in the outbound direction. Before configuring interface-based rate limiting in the outbound direction, run the assign forward mode store-and-forward command to change the packet forwarding mode to store-and-forward.
- (Optional) Configure the inter-frame gap and preamble. In V100R005C00 and later versions, you can configure switches to calculate or not to calculate the inter-frame gap and preamble of packets during inbound traffic rate limit calculation on an interface. By default, a switch calculates the inter-frame gap and preamble of packets when it calculates the inbound traffic rate limit on an interface. You can run the qos car ifg disable command in the system view to configure a switch not to calculate the inter-frame gap and preamble of packets during inbound traffic rate limit calculation, to improve rate limit accuracy.

Other related questions:
How to delete the rate limit configuration on an interface from a CE series switch
- Delete the rate limit configuration in the inbound direction of an interface. In the following example, QoS CAR profile qoscar1 is unbound from 10GE1/0/1 and the profile is deleted. <HUAWEI> system-view [~HUAWEI] interface 10ge 1/0/1 [~HUAWEI-10GE1/0/1] undo qos car inbound [*HUAWEI-10GE1/0/1] quit [*HUAWEI] undo qos car qoscar1 [*HUAWEI] commit - Delete the rate limit configuration in the outbound direction of an interface. You can run the undo qos lr [ outbound ] command in the interface view to delete the rate limit configuration on an interface.

How to delete the rate limiting configuration on interfaces of an S series switch
For S series fixed switches (except the S1700), you can run the undo qos lr inbound command in the interface view to delete the rate limiting configuration on the inbound interface. This method can be used on S series fixed switches, such as the S1720GFR, S1720GW-E, S1720GWR-E, S2700, S3700, S5700, and S6700. For S series modular switches, to delete the rate limiting configuration on the inbound interface, you can cancel the application of a CAR profile on the interface and then delete the profile. For example, cancel the application of CAR profile qoscar1 on GE1/0/1, and then delete the profile. [HUAWEI] interface gigabitethernet 1/0/1 [HUAWEI-GigabitEthernet1/0/1] undo qos car inbound [HUAWEI-GigabitEthernet1/0/1] quit [HUAWEI] undo qos car qoscar1 This method can be used on S series modular switches, such as the S7700, S9700, S12700, and S9300. For S series switches (except the S1700), you can run the undo qos lr outbound command in the interface view to delete the rate limiting configuration on the outbound interface. This method can be used on S series switches, such as the S1720GFR, S1720GW-E, S1720GWR-E, S2700, S3700, S5700, S6700, S7700, S9700, S12700, and S9300. For S series switches (except the S1700), you can run the undo qos lr command in the management interface view to delete the rate limiting configuration on the management interface. The management interface of fixed switches (such as the S5700 and S6700) is meth 0/0/1. The management interface of modular switches (such as the S7700, S9700, S12700 and S9300) is Ethernet 0/0/0.

How to configure a traffic policy for rate limiting on a CE series switch
- Limit traffic rates based on IP addresses. In the following example, the rate limit of packets from the PC with IP address 192.168.1.10 is set to 4 Mbit/s. <HUAWEI> system-view [~HUAWEI] acl 2000 [*HUAWEI-acl4-basic-2000] rule permit source 192.168.1.10 0.0.0.0 [*HUAWEI-acl4-basic-2000] quit [*HUAWEI] traffic classifier c1 [*HUAWEI-classifier-c1] if-match acl 2000 [*HUAWEI-classifier-c1] quit [*HUAWEI] traffic behavior b1 [*HUAWEI-behavior-b1] car cir 4096 [*HUAWEI-behavior-b1] quit [*HUAWEI] traffic policy p1 [*HUAWEI-trafficpolicy-p1] classifier c1 behavior b1 [*HUAWEI-trafficpolicy-p1] quit [*HUAWEI] interface 10ge 1/0/1 [*HUAWEI-10GE1/0/1] traffic-policy p1 inbound [*HUAWEI-10GE1/0/1] quit [*HUAWEI] commit - Limit the rate of packets from devices on a specified network segment. In the following example, the rate limit of packets from devices on the network segment 192.168.1.0 is set to 50 Mbit/s. <HUAWEI> system-view [~HUAWEI] acl 2000 [*HUAWEI-acl4-basic-2000] rule permit source 192.168.1.0 0.0.0.255 [*HUAWEI-acl4-basic-2000] quit [*HUAWEI] traffic classifier c1 [*HUAWEI-classifier-c1] if-match acl 2000 [*HUAWEI-classifier-c1] quit [*HUAWEI] traffic behavior b1 [*HUAWEI-behavior-b1] car cir 51200 [*HUAWEI-behavior-b1] quit [*HUAWEI] traffic policy p1 [*HUAWEI-trafficpolicy-p1] classifier c1 behavior b1 [*HUAWEI-trafficpolicy-p1] quit [*HUAWEI] interface 10ge 1/0/1 [*HUAWEI-10GE1/0/1] traffic-policy p1 inbound [*HUAWEI-10GE1/0/1] quit [*HUAWEI] commit - Limit traffic rates based on IP addresses and protocols. In the following example, the rate limit of HTTP traffic (port 80) from devices on the network segment 192.168.1.0 is set to 10 Mbit/s. <HUAWEI> system-view [~HUAWEI] acl 3000 [*HUAWEI-acl4-advance-3000] rule permit tcp destination-port eq 80 source 192.168.1.0 0.0.0.255 [*HUAWEI-acl4-advance-3000] quit [*HUAWEI] traffic classifier c1 [*HUAWEI-classifier-c1] if-match acl 3000 [*HUAWEI-classifier-c1] quit [*HUAWEI] traffic behavior b1 [*HUAWEI-behavior-b1] car cir 10240 [*HUAWEI-behavior-b1] quit [*HUAWEI] traffic policy p1 [*HUAWEI-trafficpolicy-p1] classifier c1 behavior b1 [*HUAWEI-trafficpolicy-p1] quit [*HUAWEI] interface 10ge 1/0/1 [*HUAWEI-10GE1/0/1] traffic-policy p1 inbound [*HUAWEI-10GE1/0/1] quit [*HUAWEI] commit

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top