The car command configures user-specific traffic policing in a QoS profile.
The undo car command cancels user-specific traffic policing in a QoS profile.
By default, user-specific traffic policing is not configured in a QoS profile.
car { cir cir-value [ pir pir-value ] | cir cir-percentage cir-percentage-value [ pir pir-percentage pir-percentage-value ] } [ cbs cbs-value [ pbs pbs-value ] ] [ green { discard | pass [ service-class class color color ] } | yellow { discard | pass [ service-class class color color ] } | red { discard | pass [ service-class class color color ] } ] * [ inbound | outbound ] [ color-aware ]
car { cir cir-value [ pir pir-value ] } [ cbs cbs-value [ pbs pbs-value ] ] [ green { discard | pass [ service-class class color color ] } | yellow { discard | pass [ service-class class color color ] } | red { discard | pass [ service-class class color color ] } ] * [ inbound | outbound ] [ color-aware ]
undo car [ inbound | outbound ]
Parameter | Description | Value |
---|---|---|
cir cir-value |
Specifies the committed information rate (CIR). |
The value is an integer ranging from 0 to 4294967295, in kbit/s. |
pir pir-value |
Specifies the peak information rate (PIR). |
The value is an integer ranging from 0 to 4294967295, in kbit/s. The pir-value must be greater than or equal to the configured cir-value unless pir-value is 0. |
cir-percentage cir-percentage-value |
Specifies a CIR percentage. |
The value is an integer ranging from 0 to 100, in percentage. |
pir-percentage pir-percentage-value |
Specifies a PIR percentage. |
The value is an integer ranging from 0 to 100, in percentage. |
cbs cbs-value |
Specifies the committed burst size (CBS). The CBS indicates the committed volume of traffic that an interface allows to pass and the depth of the first bucket (assuming it is bucket C). |
The value is an integer ranging from 0 to 4294967295, in bytes. The cbs-value must be greater than the configured cir-value. The default value of CBS varies with the configured cir-value. The CBS value is calculated using the following formula: cbs-value = cir-value*187.
|
pbs pbs-value |
Specifies the peak burst size (PBS). The PBS indicates the depth of the second token bucket (assuming that it is bucket P). |
The value is an integer ranging from 0 to 4294967295, in bytes. The default value of PBS varies with pir-value and can be calculated using the following formula: pbs-value = pir-value*187
|
green |
Indicates the action to be taken on the traffic whose rate conforms to the CIR. The default action is pass. |
- |
discard |
Discards packets of a specific color (green, yellow, or red). |
- |
pass |
Allows packets of a specific color (green, yellow, or red) to pass. |
- |
service-class class |
Specifies the service class to which packets are re-marked. |
The value can be cs7, cs6, ef, af4, af3, af2, af1, or be. |
color color |
Specifies the color to which packets are re-marked. |
The value can be green, yellow, or red. |
yellow |
Indicates the action to be taken on the traffic whose rate is greater than the CIR but less than or equal to the PIR. The default action is pass. |
- |
red |
Indicates the action to be taken on the traffic whose rate exceeds the PIR. The default action is discard. |
- |
inbound |
Specifies the inbound direction. |
- |
outbound |
Specifies the outbound direction. |
- |
color-aware |
Specifies the color-aware mode. By default, the color-blind mode is used. |
- |
Usage Scenario
To configure CAR in a QoS profile, run the car command. After the QoS profile is applied to an interface, CAR applies to traffic on the interface.
If color-aware is specified in this command, CAR works in color-aware mode. CAR works in color-blind mode by default. The packet matching rules vary between the color-aware mode and color-blind mode.Precautions
<HUAWEI> system-view [~HUAWEI] qos-profile p1 [*HUAWEI-qos-profile-p1] car cir 1000 pir 6000 inbound