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.
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. |
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:<~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