The if-match source-mac command defines a matching rule for complex traffic classification based on the source MAC addresses of packets.
The undo if-match source-mac command cancels the configuration.
By default, the matching rule for complex traffic classification based on the source MAC addresses of packets is not configured in traffic classifier view.
Usage Scenario
To configure a certain traffic policy for the traffic with a certain source MAC address, you can run this command in the traffic classifier view to configure a matching rule for complex traffic classification based on the source MAC address. Then, you need to configure the corresponding traffic behavior and traffic policy, and apply the policy to interfaces.
Prerequisites
A traffic classifier is configured in the system view and the traffic classifier view is displayed.
Configuration Impact
The traffic action in the traffic behavior bound to the traffic classifier is performed for the traffic matching the specified source MAC address.
Follow-up Procedure
You need to configure the traffic behavior and traffic policy, bind the traffic behavior to the traffic classifier in the traffic policy, and apply the traffic policy to interfaces.
Precautions
The matching rule based on the source MAC addresses of packets is valid for only inbound policies.
This command can be used to set more than one source MAC address for one traffic classifier to match the packets with different source MAC addresses.