index service-class match (SRv6 mapping policy service-class view)

Function

The index service-class match command configures the mapping between a service class and an SRv6 TE Policy or native IP address.

The undo index service-class match command deletes the mapping between a specified service class and an SRv6 TE Policy or native IP address.

By default, no mapping between an SRv6 TE Policy or native IP address and a service class is configured in an SRv6 mapping policy.

Format

index index-value service-class { be | af1 | af2 | af3 | af4 | ef | cs6 | cs7 } * match { srv6-te-policy color color-value | native-ip }

undo index index-value [ service-class { be | af1 | af2 | af3 | af4 | ef | cs6 | cs7 } * match { srv6-te-policy color color-value | native-ip } ]

Parameters

Parameter Description Value
be

Indicates that the service type is BE.

-

af1

Indicates that the service type is AF1.

-

af2

Indicates that the service type is AF2.

-

af3

Indicates that the service type is AF3.

-

af4

Indicates that the service type is AF4.

-

ef

Indicates that the service type is EF.

-

cs6

Indicates that the service type is CS6.

-

cs7

Indicates that the service type is CS7.

-

srv6-te-policy

Specifies an SRv6 TE Policy.

-

color color-value

Specifies the color of an SRv6 TE Policy.

The value is an integer ranging from 0 to 4294967295.

native-ip

Indicates IPv6 forwarding.

-

index index-value

Specifies the index of an SRv6 mapping policy.

The value is an integer that ranges from 1 to 4294967294.

Views

SRv6 mapping policy service-class view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
teflowgroup write

Usage Guidelines

Usage Scenario

Each SRv6 TE Policy in an SRv6 TE Flow Group has its own color attribute.

Using the index service-class { be | af1 | af2 | af3 | af4 | ef | cs6 | cs7 } * match srv6-te-policy color command, you can configure the mapping between a color and a service class.

Using the index service-class { be | af1 | af2 | af3 | af4 | ef | cs6 | cs7 } * match native-ip command, you can configure the mapping between native IPv6 addresses and service classes.

In an SRv6 mapping policy, the Service Class->Color->SRv6 TE Policy mapping is formed through the association of colors. After the service class value is associated with an SRv6 TE Policy, IP packets can be diverted to the SRv6 TE Policy based on the service class value. If the mapping between the service class and native IP address is configured, traffic is forwarded through IPv6 after the service class is associated with the native IP address.

Precautions

In an SRv6 mapping policy, you can specify the mapping between an SRv6 TE Policy or native IP address and a service class for traffic. Each service class value can be associated with only one SRv6 TE Policy or native IP address.

Only an SRv6 TE Policy in the Up state can be mapped to a service class.

The traffic carrying the service class value enters the SRv6 TE Policy group and is forwarded based on the following rules:

  1. The traffic strictly matches the SRv6 TE Policy or native IP address corresponding to the service class value.
  2. If condition 1 is not met, the SRv6 TE Policy or native IP route with the default priority is selected.
  3. If the default mapping policy is not configured or the configured default mapping policy is not Up, the SRv6 mapping policy with a smaller index value in the Up state is preferentially used for traffic diversion.
  4. The SRv6 Mapping Policy mapping rule with a smaller index value (be<af1<af2<af3<af4<ef<cs6<cs7) is preferred for traffic diversion. Therefore, you are advised to configure the mapping rule with a smaller service class value (be<af1<af2<af3<af4<ef<cs6<cs7) in the SRv6 Mapping Policy mapping rule with a smaller index value to ensure that the bandwidth of high-priority services is not preempted.

Example

# Configure the mapping between SRv6 TE Policy colors and service classes in an SRv6 mapping policy.
<~HUAWEI> system-view
[~HUAWEI] segment-routing ipv6
[*HUAWEI-segment-routing-ipv6] mapping-policy a color 1
[*HUAWEI-segment-routing-ipv6-mapping-policy-a] match-type service-class
[*HUAWEI-segment-routing-ipv6-mapping-policy-a-service-class] index 1 service-class af1 af2 match srv6-te-policy color 10
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >