default match (SRv6 mapping policy DSCP view)

Function

The default match command configures the mapping between DSCP values and SRv6 TE Policies or native IP addresses that are not exactly matched.

The undo default match command deletes the mapping between DSCP values and SRv6 TE Policies or native IP addresses that are not exactly matched.

By default, no default mapping is configured for non-exact DSCP matching.

Format

{ ipv4 | ipv6 } default match { srv6-te-policy color color-value | native-ip }

undo { ipv4 | ipv6 } default [ match { srv6-te-policy color color-value | native-ip } ]

Parameters

Parameter Description Value
ipv4

Specifies theIPv4 address family.

-

ipv6

Specifies theIPv6 address family.

-

srv6-te-policy

Specifies an SRv6 TE Policy.

-

color color-value

Specifies the color of an SRv6 TE Policy.

The value is an integer that ranges from 0 to 4294967295.

native-ip

Indicates IPv6 forwarding.

-

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 index dscp match command.

The index dscp match command specifies the mapping between a DSCP value and the color or native IP address of an SRv6 TE Policy.

The default match srv6-te-policy color command enables a device to redirect packets that do not match the DSCP value configured using the index dscp match command to a specified SRv6 TE Policy.

The default match native-ip command configures the device to forward packets that do not match the DSCP value configured using the index dscp match command through IPv6 by default.

Precautions

In an SRv6 mapping policy, you can specify the mapping between DSCP priorities and SRv6 TE Policies or native IP addresses for IPv4 and IPv6 address families. However, in the same address family (IPv4/IPv6), each DSCP value can be mapped to only one SRv6 TE Policy or native IP.

An SRv6 TE Policy/IPv6 route in the Up state can be mapped to a DSCP value only when the route is reachable.

IPv4/IPv6 traffic with DSCP values enters an SRv6 TE Flow Group and is forwarded based on the following rules:

  1. IPv4/IPv6 traffic is strictly matched against the SRv6 TE Policy or native IP address corresponding to the DSCP value of the corresponding address family.
  2. If condition 1 is not met, the SRv6 TE Policy or native IP address with the default priority in the local address family is selected.
  3. If conditions 1 and 2 are not met, the SRv6 TE Policy or native IP route with the smallest DSCP value in the local address family is selected.
  4. If none of the preceding conditions is met, the device selects the SRv6 TE Policy or native IP route with the default priority in the other address family.
  5. If none of conditions 1, 2, 3, and 4 is met, the SRv6 TE Policy or native IP route with the smallest DSCP value in the other address family is selected.

Example

# Configure an SRv6 mapping policy to map the default DSCP value of IPv4 packets to an SRv6 TE 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] ipv4 default match srv6-te-policy color 10
# Configure an SRv6 mapping policy to map the default DSCP value of IPv6 packets to the native IP address.
<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] ipv6 default match native-ip
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >