2-5
To do…
Use the command…
Remarks
Enter system view
system-view
—
Create a policy and enter policy
view
qos policy
policy-name
Required
Associate a class with a
behavior in the policy
classifier
tcl-name behavior
behavior-name
Required
If an ACL is referenced by a QoS policy for defining traffic match criteria, packets matching the ACL are
organized as a class and the behavior defined in the QoS policy applies to the class regardless of
whether the match mode of the
if-match
clause is
deny
or
permit
.
Applying the QoS Policy
You can apply a QoS policy to different occasions:
z
Applied to an interface, the policy takes effect on the traffic sent or received on the interface.
z
Applied to a user profile, the policy takes effect on the traffic sent or received by the online users of
the user profile.
z
Applied to a VLAN, the policy takes effect on the traffic sent or received on all ports in the VLAN.
z
You cannot modify the classification rules, traffic behaviors, and classifier-behavior associations in
a QoS policy already applied. To check whether a QoS policy has been applied successfully, use
the
display qos policy interface
command.
z
The switch may save the applications of some QoS policies that have failed to be applied due to
insufficient hardware resources in the configuration file. After the switch reboots, these policies
may preempt other user configurations for resources, resulting in loss of configurations. Suppose
that the
user-bind
command is configured on GigabitEthernet 1/0/2, and the application of a QoS
policy to GigabitEthernet 1/0/1 is saved in the configuration file even though the application has
failed due to insufficient resources. After the switch reboots, it may assign resources to have the
QoS policy take effect preferentially, while the
user-bind
configuration may be lost due to
insufficient resources.
z
The QoS policies applied to ports, VLANs, and the system globally have descending priorities. For
example, if a port and a VLAN carried on the port have both referenced a QoS policy for incoming
traffic, the one on the port is used to match traffic prior to the one for the VLAN.
Applying the QoS policy to an interface
A policy can be applied to multiple ports. Only one policy can be applied in inbound direction of a
port/port group.