affinity (flexible algorithm view)

Function

The affinity command configures an affinity attribute for a Flex-Algo.

The undo affinity command deletes the affinity attribute configured for a Flex-Algo.

By default, no affinity attribute is configured for a Flex-Algo.

Format

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

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

undo affinity

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.

-

name-string

Specifies the names of affinity bits.

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

Views

Flexible algorithm view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
flexalgo write

Usage Guidelines

Usage Scenario

With Flex-Algo, an IGP can automatically calculate eligible paths based on the link cost, delay, or TE constraint to flexibly meet TE requirements.

A FAD can constrain a path to include a link with a specific affinity attribute or exclude a link with a specific affinity attribute. A FAD defines three types of affinity attributes:

  • Exclude Admin Group: excludes a specified link when a device uses a Flex-Algo for path computation.
  • Include-Any Admin Group: includes a specified link that meets any one condition when a device uses a Flex-Algo for path computation.
  • Include-All Admin Group: includes a specified link that meets all the conditions when a device uses a Flex-Algo for path computation.

Example

# Configure Flex-Algo 128 to include all the red and yellow attributes and exclude the blue attribute when computing paths.
<HUAWEI> system-view
[~HUAWEI] path-constraint affinity-mapping
[*HUAWEI-pc-af-map] attribute red bit-sequence 0
[*HUAWEI-pc-af-map] attribute yellow bit-sequence 1
[*HUAWEI-pc-af-map] attribute blue bit-sequence 2
[*HUAWEI-pc-af-map] quit
[*HUAWEI] flex-algo identifier 128
[*HUAWEI-flex-algo-128] affinity include-all red yellow
[*HUAWEI-flex-algo-128] affinity exclude blue
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >