car percent
Use car percent to configure a CAR action in percentage in a traffic behavior.
Use undo car to restore the default.
Syntax
car cir percent cir-percent [ cbs cbs-time [ ebs ebs-time ] ] [ green action | red action | yellow action ] *
car cir percent cir-percent [ cbs cbs-time ] pir percent pir-percent [ ebs ebs-time ] [ green action | red action | yellow action ] *
undo car
Default
No CAR action is configured.
Views
Traffic behavior view
Predefined user roles
network-admin
Parameters
cir percent cir-percent: Specifies the CIR in percentage, in the range of 1 to 100.
cbs cbs-time: Specifies the CBS in milliseconds. The actual CBS value is cbs-time × the actual CIR value. The value range for the cbs-time argument is 50 to 2000.
ebs ebs-time: Specifies the EBS in milliseconds. The actual EBS value is ebs-time × the actual CIR value. The value range for the ebs-time argument is 0 to 2000.
pir percent pir-percent: Specifies the PIR in percentage, in the range of 1 to 100. The PIR value must be greater than or equal to the CIR value.
green action: Specifies the action to take on packets that conform to the CIR. The default is pass.
red action: Specifies the action to take on packets that conform to neither CIR nor PIR. The default is discard.
yellow action: Specifies the action to take on packets that conform to the PIR but not to the CIR. The default 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 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. Alternatively, you can specify the new-dscp argument with af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, cs1, cs2, cs3, cs4, cs5, cs6, cs7, default, or ef.
remark-mpls-exp-pass new-exp: Sets the EXP field value of the MPLS packet to new-exp and permits the packet to pass through. The new-exp argument is in the range of 0 to 7.
remark-prec-pass new-precedence: Sets the IP precedence of the packet to new-precedence and permits the packet to pass through. The new-precedence argument is in the range of 0 to 7.
Usage guidelines
To use two rates for traffic policing, configure the car percent command with the pir percent pir-percent option. To use one rate for traffic policing, configure the car percent command without the pir percent pir-percent option.
A QoS policy that uses a traffic behavior configured with percentage-based CAR can be applied in the inbound or outbound direction of an interface.
If you execute the car percent command multiple times in the same traffic behavior, the most recent configuration takes effect.
A QoS policy that uses a behavior configured with percentage-based CAR can be applied only to interfaces.
The actual CIR value is cir-percent × bandwidth. The actual PIR value is pir-percent × bandwidth. In the policy nesting case, the bandwidth used for the CIR and PIR calculations is determined by using the following rules:
The top policy uses the interface bandwidth.
A child policy uses the CIR value in GTS configured in the behavior of the child policy.
If the CIR value is not available in the behavior, the child policy uses the CIR value in GTS configured in the behavior of the higher-level policy.
If the CIR value is not available in the behavior of the higher-level policy, the child policy uses the interface bandwidth.
Examples
# Configure a CAR action in percentage in traffic behavior database. The CAR parameters are as follows: CIR is 20% and CBS is 100 ms.
<Sysname> system-view [Sysname] traffic behavior database [Sysname-behavior-database] car cir percent 20 cbs 100