242
Step
Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Create a traffic behavior and
enter traffic behavior view.
traffic behavior behavior-name
By default, no traffic behavior
exists.
3.
Configure a mirroring action
for the traffic behavior.
•
Mirror traffic to an interface:
mirror-to
interface
interface-type
interface-number
•
Mirror traffic to the CPU:
mirror-to cpu
By default, no mirroring action is
configured for a traffic behavior.
4.
(Optional.) Display traffic
behavior configuration.
display traffic behavior
Available in any view.
Configuring 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 class with a
traffic behavior in the QoS
policy.
classifier
tcl-name behavior
behavior-name
By default, no traffic behavior is
associated with a class.
4.
(Optional.) Display QoS
policy configuration.
display qos policy
Available in any view.
Applying a QoS policy
Applying a QoS policy to an interface
By applying a QoS policy to an interface, you can mirror the traffic in the specified direction of the
interface. A policy can be applied to multiple interfaces. In one direction (inbound or outbound) of an
interface, only one policy can be applied.
To apply a QoS policy to an interface:
Step
Command
1.
Enter system view.
system-view
2.
Enter interface view.
interface
interface-type interface-number
3.
Apply a policy to the interface.
qos apply policy policy-name
{
inbound
|
outbound
}
Applying a QoS policy to a VLAN
You can apply a QoS policy to a VLAN to mirror the traffic in the specified direction on all ports in the
VLAN.
To apply the QoS policy to a VLAN: