The qos car command creates a QoS CAR profile and sets parameters in the QoS CAR profile.
The undo qos car command deletes a QoS CAR profile.
By default, no QoS CAR profile is created.
Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S support this command.
qos car car-name cir cir-value [ cbs cbs-value [ pbs pbs-value ] | pir pir-value [ cbs cbs-value pbs pbs-value ] ]
undo qos car car-name
Parameter |
Description |
Value |
---|---|---|
car-name |
Specifies the name of a QoS CAR profile. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. The value cannot be c, ci, or cir. |
cir cir-value |
Specifies the committed information rate (CIR), which is the average rate of traffic that can pass through an interface. |
The value is an integer that ranges from 64 to 4294967295, in kbit/s. |
pir pir-value | Specifies the peak information rate (PIR), which is the maximum rate of traffic that can pass through an interface. |
The value is an integer that ranges from 64 to 4294967295, in kbit/s. 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. If the PIR is not set, the default CBS is 188 times the CIR. If the PIR is set, the default CBS is 125 times the CIR. |
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. By default, the PBS is 125 times the PIR. |
Usage Scenario
Traffic policing controls traffic by monitoring the rate of traffic, and discards excess traffic to limit traffic within a proper range and to protect network resources.
When data is sent from a high-speed link to a low-speed link, the bandwidth on the interface of the low-speed link is insufficient. As a result, a large number of packets are discarded. To solve this problem, configure traffic policing for outgoing traffic on the interface of the high-speed link. The interface then discards the packets whose rate exceeds the traffic policing rate so that the outgoing traffic rate is limited within a proper range. You can also configure traffic policing for incoming traffic on the interface of the low-speed link. The interface then discards the received packets whose rate exceeds the traffic policing rate.
Precautions
A maximum of 512 QoS CAR profiles can be created on the switch.
When the traffic shaping rate is greater than the maximum rate of an interface, traffic policing is not performed on the interface. You need to set the CIR or PIR to be smaller than the maximum rate of the interface.
When the CBS is smaller than the number of bytes in a packet, packets of this type are discarded.
To prevent a device failure to identify the packet color, you are advised to set the PBS to be larger than the CBS.
After traffic policing 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.