The index dscp match command configures the mapping between DSCP values and the colors of SRv6 TE Policies or native IP links.
The undo index dscp match command deletes the mapping between DSCP values and the colors of SRv6 TE Policies or native IP links.
By default, the mapping between DSCP values and the colors of SRv6 TE Policies or native IP links is not configured in an SRv6 mapping policy.
Parameter | Description | Value |
---|---|---|
ipv4 |
Indicates the IPv4 address family. |
- |
ipv6 |
Indicates the IPv6 address family. |
- |
dscpBegin |
Specifies the start DSCP value. |
The value is an integer ranging from 0 to 63. |
to dscpEnd |
Specifies the end DSCP value. |
The value is an integer ranging from 0 to 63. |
srv6-te-policy |
Indicates 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 rule. |
The value is an integer ranging from 0 to 4294967295. |
Usage Scenario
This command is used together with the default match command.
The index dscp match srv6-te-policy color command configures the mapping between DSCP values and the colors of SRv6 TE Policies. In an SRv6 TE flow group, DSCP values and SRv6 TE Policies are associated using the color attribute. IP packets can then be steered into the specified SRv6 TE Policy based on their DSCP values. The index dscp match native-ip command configures the mapping between DSCP values and native IP links. When an IP packet carries a specified DSCP value, it is forwarded through IPv6. The default match { srv6-te-policy color | native-ip } command enables a device to steer packets that do not match the DSCP value configured using the index dscp match command to a specified SRv6 TE Policy or forward them through IPv6.Precautions
In an SRv6 mapping policy, you can specify the mapping between DSCP values and the colors of SRv6 TE Policies or native IP links for each of the IPv4 and IPv6 address families. In the same address family (IPv4/IPv6), each DSCP value can be mapped to only one SRv6 TE Policy's color or native IP link.
In an SRv6 TE flow group generated using an SRv6 mapping policy, only an up SRv6 TE Policy or a reachable IPv6 route can be mapped to a DSCP value. During IPv4/IPv6 traffic forwarding, packets with DSCP values are matched against SRv6 TE Policies in an SRv6 TE flow group in the following order:<HUAWEI> system-view [~HUAWEI] segment-routing ipv6 [*HUAWEI-segment-routing-ipv6] mapping-policy MapPolicy color 34 [*HUAWEI-segment-routing-ipv6-mapping-policy-MapPolicy] match-type dscp [*HUAWEI-segment-routing-ipv6-mapping-policy-MapPolicy-dscp] index 10 dscp ipv4 6 match srv6-te-policy color 5
<HUAWEI> system-view [~HUAWEI] segment-routing ipv6 [*HUAWEI-segment-routing-ipv6] mapping-policy MapPolicy color 34 [*HUAWEI-segment-routing-ipv6-mapping-policy-MapPolicy] match-type dscp [*HUAWEI-segment-routing-ipv6-mapping-policy-MapPolicy-dscp] index 10 dscp ipv6 10 match native-ip