affinity (MPLS TE P2MP template view)

Function

The affinity command configures an affinity constraint in the P2MP tunnel template view.

The undo affinity command deletes an affinity constraint.

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

Format

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

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

undo affinity primary

Parameters

Parameter Description Value
include-all

Indicates that CSPF includes a link when calculating a path, only if each link administrative group bit has the same name as each affinity bit.

-

include-any

Indicates that CSPF includes a link when calculating a path, if at least one link administrative group bit has the same name as an affinity bit.

-

exclude

Indicates that CSPF excludes a link when calculating a path, if any link administrative group bit has the same name as an affinity bit.

-

bit-name

Specifies the names of affinity bits.

The value is a string of 1 to 31 case-sensitive characters.

primary

Indicates the primary CR-LSP.

-

Views

MPLS TE P2MP template 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. To configure an affinity constraint, run the affinity command, which helps control path selection for P2MP CR-LSPs.

Prerequisites

1.A P2MP tunnel template has been configured using the mpls te p2mp-template command.

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

Example

# Configure an affinity constraint for the primary CR-LSP in a P2MP template named Template1.
<HUAWEI> system-view
[~HUAWEI] mpls
[*HUAWEI-mpls] mpls te
[*HUAWEI-mpls] mpls te p2mp-te
[*HUAWEI-mpls] quit
[*HUAWEI] path-constraint affinity-mapping
[*HUAWEI-pc-af-map] attribute yellow bit-sequence 3
[*HUAWEI-pc-af-map] quit
[*HUAWEI] mpls te p2mp-template Template1
[*HUAWEI-te-p2mp-template-Template1] affinity primary include-all yellow
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >