You can use either of the following methods to associate an ACL with a service module (traffic policy or simplified traffic policy), and apply the ACL to a VLAN:
The following commands are only for you reference. You should comply with the command line syntax of the version running on your device.
Run the traffic behavior behavior-name command in the system view to create a traffic behavior and enter the traffic behavior view.
There are two actions for packet filtering: deny and permit. For other traffic actions, see Configuration Guide - QoS of the corresponding product version.
Run the traffic policy policy-name [ match-order { auto | config } ] command in the system view to create a traffic policy and enter the traffic policy view.
Run the classifier classifier-name behavior behavior-name command to configure a traffic behavior for the specified traffic classifier in the traffic policy. That is, bind the traffic behavior to the classifier.
Apply the traffic policy.
Run the traffic-policy policy-name { inbound | outbound } command in the VLAN view to apply the traffic policy.
Method 2: Apply the simplified traffic policy with the specified VLAN ID globally.
Run the following commands in the system view:
Traffic policing based on ACL
Redirection based on ACL
traffic-redirect vlan vlan-id inbound acl xxx
Re-mark based on ACL
Traffic statistics collection based on ACL
Traffic mirroring based on ACL
traffic-mirror vlan vlan-id inbound acl xxx