index dscp match (SRv6 mapping policy DSCP view)

Function

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.

Format

index index-value dscp { ipv4 | ipv6 } { { dscpBegin [ to dscpEnd ] } &<1-64> } match { srv6-te-policy color color-value | native-ip }

undo index index-value dscp { ipv4 | ipv6 } [ { { dscpBegin [ to dscpEnd ] } &<1-64> } match { srv6-te-policy color color-value | native-ip } ]

Parameters

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.

Views

SRv6 mapping policy DSCP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
teflowgroup write

Usage Guidelines

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:

  1. The IPv4/IPv6 packets are first strictly matched against the SRv6 TE Policy-specific or native IP link-specific rule configured with specified DSCP values in the corresponding address family.
  2. If the matching fails, the packets are matched against the SRv6 TE Policy-specific or native IP link-specific rule configured with the default priority in the local address family.
  3. If the matching fails, the packets are matched against the SRv6 TE Policy-specific or native IP link-specific rule configured with the smallest DSCP value in the local address family.
  4. If the matching fails, the packets are matched against the SRv6 TE Policy-specific or native IP link-specific rule configured with the default priority in the other address family.
  5. If the matching fails, the packets are matched against the SRv6 TE Policy-specific or native IP link-specific rule configured with the smallest DSCP value in the other address family.

Example

# Configure the mapping between the DSCP values of IPv4 packets and the colors of SRv6 TE Policies in an SRv6 mapping policy.
<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
# Configure the mapping between the DSCP values of IPv6 packets and native IP links in an SRv6 mapping policy.
<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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >