car (QoS profile view)

Function

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.

Format

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 ]

Parameters

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.

  • If the cir-value is less than 100000 kbit/s, the CBS that is expressed in bytes is calculated using the following formula: cbs-value = cir-value*187.
  • If the cir-value is greater than or equal to 100000 kbit/s, the default cbs-value that is expressed in bytes is equal to 18700000 (100000*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

  • If pir-value is set to a value less than 100000 kbit/s, the default pbs-value that is expressed in bytes is calculated using the following formula: pbs-value = pir-value*187.
  • If pir-value is set to a value greater than or equal to 100000 kbit/s, the default pbs-value that is expressed in bytes is equal to 18700000 (100000*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.

-

Views

QoS profile view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
qos write

Usage Guidelines

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

  • If member interfaces of a trunk interface reside on different forwarding or traffic management modules, the effective CIR or PIR for CAR or user-queue can be a multiple of the configured one.
  • The car command is used to specify traffic policing parameters for users in the QoS profile view. If a QoS profile in which CAR is configured is applied to an interface, the QoS profile is mutually exclusive with the user-queue command on the interface.
  • If no direction is specified, the command takes effect on both directions by default.

    After packets are marked colors, they are remarked with CoSs. If the CoS of a packet is re-marked as EF, BE, CS6, or CS7, the packet can be re-marked only in green. Both the upstream and the downstream packets can be re-marked with CoSs and colors.
  • This command is cyclic in nature. That is, if the command is configured in the same QoS profile view more than once, the last configuration takes effect. If uni-directional traffic policing (on either incoming traffic or outgoing traffic) is already configured, you cannot configure traffic policing without specifying the traffic direction. Conversely, if directionless traffic policing is already configured, you cannot configure uni-directional traffic policing.
  • Direction-oriented and directionless CAR cannot be configured at the same time. If direction-oriented CAR is configured on an interface, the configuration takes effect only when the direction to which the QoS profile applies is the same as the direction configured for CAR.
  • If member interfaces of a trunk interface reside on different forwarding or traffic management modules, the effective CIR or PIR for CAR or can be a multiple of the configured one.
  • A QoS profile in which CAR is configured cannot be applied to an interface on which CAR parameters have been configured, and CAR parameters cannot be configured for an interface to which a QoS profile in which CAR is configured has been applied.

Example

# Create a QoS profile named p1. Access the profile view to configure parameters for user traffic policing. Then, set the CIR and PIR for the incoming traffic to 1 Mbit/s and 6 Mbit/s, respectively.
<HUAWEI> system-view
[~HUAWEI] qos-profile p1
[*HUAWEI-qos-profile-p1] car cir 1000 pir 6000 inbound
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >