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