if-match ipv6 source-address

Function

The if-match ipv6 source-address command configures a matching rule for complex traffic classification based on the source IP addresses of IPv6 packets.

The undo if-match ipv6 source-address command cancels the configuration.

By default, the matching rule for complex traffic classification based on the source IP addresses of IPv6 packets is not configured in traffic classifier view.

Format

if-match ipv6 source-address ipv6-address prefix-length

undo if-match ipv6 source-address ipv6-address prefix-length

Parameters

Parameter Description Value
prefix-length

Specifies the mask length of the IPv6 address.

It is an integer ranging from 0 to 128.

source-address ipv6-address

Specifies a source IP address to be matched by IPv6 packets.

The format of an IPv6 address is X:X::X:X with each X 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 perform the traffic policy based on source IP addresses of IPv6 packets, you can run this command in the traffic classifier view to configure a matching rule for the complex traffic classification based on source IP addresses of IPv6 packets. Then, you need to configure the 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 IPv6 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

A traffic policy carrying matching rules based on source IP addresses is valid for both upstream and downstream traffic.

You can configure more than one source IPv6 address in one traffic classifier to match IP packets with different source IP addresses.

After the configuration, source IPv6 addresses are sorted in the configuration order. A matching rule can be deleted only when the specified source IPv6 address and mask length are the same as those that are specified in the matching rule. The deletion order can be different from the configuration order.

Example

# Configure the packets with the source IP address as 1001::1 to match the traffic classifier c1.
<HUAWEI> system-view
[~HUAWEI] traffic classifier c1
[*HUAWEI-classifier-c1] if-match ipv6 source-address 2001:db8:2:: 48
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >