18
Step Command Remarks
2. Create a traffic behavior and
enter traffic behavior view.
traffic behavior
behavior-name
By default, no traffic behavior
exists.
3. Configure actions in the
traffic behavior.
See the subsequent chapters,
depending on the purpose of the
traffic behavior: traffic policing,
traffic filtering, priority marking,
traffic accounting, and so on.
By default, no action is configured
for a traffic behavior.
Defining a QoS policy
You associate a traffic behavior with a traffic class in a QoS policy to perform the actions defined in
the traffic behavior for the traffic class of packets.
When an ACL is used by a QoS policy for traffic classification, the action (permit or deny) in the ACL
is ignored, and the actions in the associated traffic behavior are performed.
To associate a traffic class with a traffic behavior in a QoS policy:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Create a QoS policy and
enter QoS policy view.
qos policy
policy-name By default, no QoS policy exists.
3. Associate a traffic class with
a traffic behavior to create a
class-behavior association
in the QoS policy.
classifier
classifier-name
behavior
behavior-name
[
insert-before
before-classifier-name
]
By default, a traffic class is not
associated with a traffic behavior.
Repeat this step to create more
class-behavior associations.
Applying the QoS policy
You can apply a QoS policy to the following destinations:
• Interface—The QoS policy takes effect on the traffic sent or received on the interface.
• VLAN—The QoS policy takes effect on the traffic sent or received on all ports in the VLAN.
• Globally—The QoS policy takes effect on the traffic sent or received on all ports.
• Control plane—The QoS policy takes effect on the traffic received on the control plane.
• User profile—The QoS policy takes effect on the traffic sent or received by the online users of
the user profile.
You can modify traffic classes, traffic behaviors, and class-behavior associations in a QoS policy
even after it is applied. If a traffic class uses an ACL for traffic classification, you can delete or modify
the ACL (such as add rules to, delete rules from, and modify rules of the ACL).
QoS policies applied to an interface, a VLAN, and globally are in descending order of priority. The
switch first matches the criteria in the QoS policy applied to an interface. If there is a match, the
switch executes the QoS policy applied to the interface and ignores the QoS policies applied to the
VLAN and globally.
Applying the QoS policy to an interface
You can apply QoS policies to both Layer 2 and Layer 3 Ethernet interfaces. The term "interface" in
this section collectively refers to these two types of interfaces. You can use the port link-mode