182
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:
Step Command
1. Enter system view.
system-view
2. Apply a QoS policy to a VLAN.
qos vlan-policy
policy-name
vlan
vlan-id-list {
inbound
|
outbound
}
Applying a QoS policy globally
You can apply a QoS policy globally to mirror the traffic in the specified direction on all ports.
To apply a QoS policy globally:
Step Command
1. Enter system view.
system-view
2. Apply a QoS policy globally.
qos apply policy
policy-name
global
{
inbound
|
outbound
}
Applying a QoS policy to the control plane
You can apply a QoS policy to the control plane to mirror the traffic in the specified direction on all
ports of the control plane.
To apply a QoS policy to the control plane:
Step Command
1. Enter system view.
system-view
2. Enter control plane view.
control-plane slot
slot-number
3. Apply a QoS policy to the
control plane.
qos apply policy
policy-name
inbound
Flow mirroring configuration example
Network requirements
As shown in Figure 63, configure flow mirroring so that the server can monitor following traffic:
• All traffic that the Technical department sends to access the Internet.
• IP traffic that the Technical department sends to the Marketing department during working
hours (8:00 to 18:00) on weekdays.