The qos queue shaping command enables traffic shaping for a queue on a specified interface and sets traffic shaping parameters.
The undo qos queue shaping command restores the default scheduling parameters of each queue on an interface.
The following table describes the default scheduling parameters on an interface.
qos queue queue-index shaping cir cir-value pir pir-value [ cbs cbs-value pbs pbs-value ]
undo qos queue queue-index shaping
For the S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, and S5731S-S, only pir pir-value takes effect.
Parameter |
Description |
Value |
---|---|---|
queue-index |
Specifies the queue index. |
The value is an integer that ranges from 0 to 7. |
cir cir-value |
Specifies the committed information rate (CIR) of a queue. |
The value is an integer, in kbit/s. The value range differs depending on the interface type:
|
pir pir-value |
Specifies the peak information rate (PIR) of a queue. |
The value is an integer, in kbit/s. The value range differs depending on the interface type:
The PIR must be greater than or equal to the CIR. The default PIR is equal to the CIR. |
cbs cbs-value |
Specifies the committed burst size (CBS), which is the average volume of burst traffic that can pass through an interface. |
The value is an integer that ranges from 4000 to 4294967295, in bytes. NOTE:
On the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S, the maximum CBS is 65535 bytes. |
pbs pbs-value |
Specifies the peak burst size (PBS), which is the maximum volume of burst traffic that can pass through an interface. |
The value is an integer that ranges from 4000 to 4294967295, in bytes. NOTE:
On the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S, the maximum PBS is 65535 bytes. |
Ethernet interface view, MultiGE interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, port group view
Usage Scenario
When the traffic rate of an interface on a downstream device is lower than that of the connected interface on the upstream device, traffic congestion may occur on the interface of the downstream device. You can configure traffic shaping for queues on the outbound interface of the upstream device and adjust the transmit rate of the interface.
The qos queue shaping command configures traffic shaping on packets of a specific service on an interface.
Prerequisites
Priority mapping based on simple traffic classification has been configured to map packet priorities to PHBs and colors, or internal priority re-marking based on complex traffic classification has been configured so that packets of different services enter different queues.
Precautions
If traffic shaping is configured both on an interface queue and an interface (using the qos lr outbound command), the CIR of the interface cannot be lower than the sum of CIR values of all the queues on the interface; otherwise, traffic shaping result may be incorrect. For example, the queue with a lower priority may occupy the bandwidth of the queue with a higher priority.
It is recommended that the CBS be 120 times the CIR.
After traffic shaping is configured on an interface, the number of packets that can be forwarded on the interface every second is relevant to the packet length calculation method. By default, the device calculates the 20-byte inter-frame gap and preamble. That is, the device calculates the actual packet length plus 20-byte inter-frame gap and preamble.
When interface queue shaping is configured on the S2720-EI, S5720I-SI, S5720-LI, S5720S-LI, S5720S-SI, S5720-SI, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI, only pir and pbs take effect, and the maximum value of pbs is 16380000.
If you run the qos queue shaping command multiple times on the same interface, only the latest configuration takes effect.
On the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S, after traffic shaping is configured, statistics on the number of discarded packets in the display qos queue statistics command output may be incorrect upon heavy traffic bursts.