FAQ-How Do I Configure Rate Limiting

Publication Date:  2015-03-25 Views:  6499 Downloads:  0
Issue Description
How Do I Configure Rate Limiting?
Solution
Configuring Interface-based or Flow-based Rate Limiting on the S7700 and S9700
  • Configuring rate limiting on an interface
# Set the rate limit for inbound packets on the interface to 10 Mbit/s.

[Quidway] qos car car1 cir 10240 cbs 1024000
[Quidway] interface GigabitEthernet1/0/0
[Quidway-GigabitEthernet1/0/0] qos car inbound car1


# Set the rate limit for outbound packets on the interface to 10 Mbit/s.

[Quidway] interface gigabitethernet1/0/0
[Quidway-GigabitEthernet1/0/0] qos lr cir 10240 pir 10240
  • Configuring rate limiting for a flow
# Set the rate limit for any inbound and outbound flows on an interface to 10 Mbit/s.

[Quidway] traffic classifier c1 operator and
[Quidway-classifier-c1] if-match any
[Quidway-classifier-c1] quit
[Quidway] traffic behavior b1
[Quidway-behavior-b1] car cir 10240 pir 10240 green pass yellow pass red discard
[Quidway-behavior-b1] quit
[Quidway] traffic policy p1
[Quidway-trafficpolicy-p1] classifier c1 behavior b1
[Quidway-trafficpolicy-p1] quit
[Quidway] interface gigabitethernet1/0/1
[Quidway-GigabitEthernet1/0/1] traffic-policy p1 inbound
[Quidway-GigabitEthernet1/0/1] traffic-policy p1 outbound 


    NOTE:
A traffic policy can be used in the inbound and outbound directions in the system view, interface view, and VLAN view.

Configuring Rate Limiting on the S2700, S3700, and S5700

The following rate limiting configuration is recommended:
  • Set the CIR, CBS, and PBS and do not set the PIR.
  • Set the CBS to 200 times the CIR.
  • Set the PBS to 2 times the CBS, that is, 400 times the CIR.
The CIR is expressed in Kbit/s (1024 bit/s), and the CBS and PBS are expressed in bytes.
  • Set the rate limit for outbound packets on the interface to 10 Mbit/s.
[HUAWEI] interface ethernet 0/0/1
[HUAWEI-Ethernet0/0/1] qos lr outbound cir 10240 cbs 2048000
  • Set the rate limit for inbound packets on the interface to 10 Mbit/s.
[HUAWEI] interface ethernet 0/0/1
[HUAWEI-Ethernet0/0/1] qos lr inbound cir 10240 cbs 2048000

 
   NOTE:
A traffic policy can be used in the physical interface view, Eth-Trunk interface view, and VLAN view. When a traffic policy is used in the VLAN view, interfaces in the VLAN share the bandwidth specified by the rate limit specified by the traffic policy.
On the S5700, a physical interface is a GE interface.

Configuring Rate Limiting on the S6700

The following rate limiting configuration is recommended:
  • Set the CIR, CBS, and PBS and do not set the PIR.
  • Set the CBS to 200 times the CIR.
  • Set the PBS to 2 times the CBS, that is, 400 times the CIR.
The CIR is expressed in Kbit/s (1024 bit/s), and the CBS and PBS are expressed in bytes.
  • Set the rate limit for outbound packets on the interface to 10 Mbit/s.
[HUAWEI] interface XGigabitEthernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] qos lr outbound cir 10240 cbs 2048000
  • Set the rate limit for inbound packets on the interface to 10 Mbit/s.
[HUAWEI] interface XGigabitEthernet 1/0/1
[HUAWEI-XGigabitEthernet1/0/1] qos lr inbound cir 10240 cbs 2048000

END