mpls te affinity (SR Tunnel interface view)

Function

The mpls te affinity command configures an affinity for an MPLS TE tunnel to be established.

The undo mpls te affinity command deletes an affinity for an MPLS TE tunnel to be established.

By default, no affinity is configured for an MPLS TE tunnel to be established.

Format

mpls te affinity { primary | secondary } { include-all | exclude | include-any } { bit-name } &<1-32>

undo mpls te affinity { primary | secondary } { include-all | exclude | include-any } { bit-name } &<1-32>

undo mpls te affinity { primary | secondary }

Parameters

Parameter Description Value
primary

Set parameter for primary LSP.

-

secondary

Set parameter for secondary.

-

include-all

Include all.

-

exclude

Exclude.

-

include-any

Include any.

-

bit-name

Specifies the referenced affinity names.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported.

Views

Tunnel interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
mpls-te write

Usage Guidelines

Usage Scenario

An affinity property is a 32-bit vector representing a tunnel link. You can name each affinity bit. After an affinity is configured for a tunnel, a device compares the affinity with the administrative group attribute during link selection to determine whether a link with specified attributes is selected or not. You can configure affinities for the primary CR-LSP, backup CR-LSP, and best-effort path in a tunnel.

Prerequisites

MPLS TE has been configured as a tunnel protocol using the tunnel-protocol mpls te command.

Mappings between names and bit values in an affinity have been configured using the attribute command.

Example

# Configure an affinity for the primary CR-LSP on a tunnel interface Tunnel1.
<HUAWEI> system-view
[~HUAWEI] mpls
[*HUAWEI-mpls] mpls te
[*HUAWEI-mpls] mpls rsvp-te
[*HUAWEI-mpls] quit
[*HUAWEI] path-constraint affinity-mapping
[*HUAWEI-pc-af-map] attribute yellow bit-sequence 3
[*HUAWEI-pc-af-map] quit
[*HUAWEI] interface tunnel 1
[*HUAWEI-Tunnel1] tunnel-protocol mpls te
[*HUAWEI-Tunnel1] mpls te signal-protocol segment-routing
[*HUAWEI-Tunnel1] mpls te affinity primary include-any yellow
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >