car
Use car to configure a CAR action in a traffic behavior.
Use undo car to delete the action.
Syntax
car cir committed-information-rate [ cbs committed-burst-size [ ebs excess-burst-size ] ] [ green action | red action | yellow action ] * [ hierarchy-car hierarchy-car-name [ mode { and | or } ] ]
car cir committed-information-rate [ cbs committed-burst-size ] pir peak-information-rate [ ebs excess-burst-size ] [ green action | red action | yellow action ] * [ hierarchy-car hierarchy-car-name [ mode { and | or } ] ]
undo car
Default
No CAR action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
cir committed-information-rate: Specifies the committed information rate (CIR) in kbps, which specifies an average traffic rate. The value range for the committed-information-rate argument is 8 and 160000000 in multiples of 8.
cbs committed-burst-size: Specifies the committed burst size (CBS) in bytes. The value range for the committed-burst-size argument is 512 and 256000000 in multiples of 512. The default value for this argument is the product of 62.5 and the CIR and must be an integral multiple of 512. When the product is not an integral multiple of 512, it is rounded up to the nearest integral multiple of 512. A default value greater than 256000000 is converted to 256000000.
ebs excess-burst-size: Specifies the excess burst size (EBS) in bytes. The value range for the excess-burst-size argument is 0 and 256000000 in multiples of 512, and the default value is 512.
pir peak-information-rate: Specifies the peak information rate (PIR) in kbps. The value range for the peak-information-rate argument is 8 and 160000000 in multiples of 8.
green action: Specifies the action to take on packets that conform to the CIR. The default setting is pass.
red action: Specifies the action to take on packets that conforms to neither CIR nor PIR. The default setting is discard.
yellow action: Action to take on packets that conform to the PIR but not to the CIR. The default setting is pass.
action: Sets the action to take on the packet:
discard: Drops the packet.
pass: Permits the packet to pass through.
remark-dot1p-pass new-cos: Sets the 802.1p priority value of the 802.1p packet to new-cos and permits the packet to pass through. The new-cos argument is in the range of 0 to 7.
remark-dscp-pass new-dscp: Sets the DSCP value of the packet to new-dscp and permits the packet to pass through. The new-dscp argument is in the range of 0 to 63.
remark-lp-pass new-local-precedence: Sets the local precedence value of the packet to new-local-precedence and permits the packet to pass through. The new-local-precedence argument is in the range of 0 to 7.
hierarchy-car hierarchy-car-name: Specifies a hierarchical CAR action to be used by its name.
mode: Specifies the collaborating mode of the hierarchical CAR action and the common CAR action:
and: AND mode, the default mode in which the traffic rate of a flow is limited by both the common CAR applied to it and the total traffic rate defined with hierarchical CAR. For example, use common CAR actions to limit the rates of both Internet access flow 1 and flow 2 to 128 kbps, and use a hierarchical CAR action to limit their total traffic rate to 192 kbps. When flow 1 is not present, flow 2 can access the Internet at the maximum rate, 128 kbps. If both flows are present, each flow cannot exceed its own rate limit, and the total rate cannot exceed 192 kbps.
or: OR mode, in which a flow can pass through at the rate equal to the common CAR applied to it or a higher rate if the total traffic rate of all flows does not exceed the hierarchical CAR. For example, use common CAR actions to limit the rates of both video flow 1 and flow 2 to 128 kbps, and then use a hierarchical CAR action to limit their total traffic rate to 512 kbps. As long as the rate of flow 1 does not exceed 128 kbps, flow 2 can pass at a rate up to 384 kbps.
Usage guidelines
To use two rates for traffic policing, configure the car command with the pir peak-information-rate option. To use one rate for traffic policing, configure the car command without the pir peak-information-rate option.
A QoS policy that uses the traffic behavior can be applied in either the inbound direction or outbound direction of an interface.
If you configure the car command multiple times in the same traffic behavior, the most recent configuration takes effect.
Examples
# Configure a CAR action in traffic behavior database as follows:
Set the CIR to 200 kbps, CBS to 51200 bytes, and EBS to 0.
Transmit the conforming packets, and mark the excess packets with DSCP value 0 and transmit them.
<Sysname> system-view [Sysname] traffic behavior database [Sysname-behavior-database] car cir 200 cbs 51200 ebs 0 green pass red remark-dscp-pass 0