if-match source-mac

Function

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.

Format

if-match source-mac mac-address

undo if-match source-mac mac-address

Parameters

Parameter Description Value
source-mac mac-address

Specifies the source MAC address to be matched.

It is in the form of H-H-H with each H representing four hexadecimal digits.

Views

Traffic classifier view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
qos write

Usage Guidelines

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.

Example

# Configure the packets with the source MAC address being 00e0-fc12-3456 to match the traffic classifier c1.
<HUAWEI> system-view
[~HUAWEI] traffic classifier c1
[*HUAWEI-classifier-c1] if-match source-mac 00e0-fc12-3456
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >