The mpls te bypass-attributes affinity command configures an affinity for a bypass tunnel.
The undo mpls te bypass-attributes affinity command deletes an affinity for a bypass tunnel.
By default, no affinity is configured for a bypass tunnel.
mpls te bypass-attributes affinity property properties [ mask mask-value ]
mpls te bypass-attributes affinity { include-all | include-any | exclude } { bit-name } &<1-32>
undo mpls te bypass-attributes affinity { include-all | include-any | exclude } { bit-name } &<1-32>
undo mpls te bypass-attributes affinity
Parameter | Description | Value |
---|---|---|
mask mask-value |
Specifies the mask of affinities. The mask helps a node determine which link attributes are checked when selecting a path for a bypass tunnel. |
The 32-bit value ranges from 0x0 to 0xFFFFFFFF, each bit in which represents an attribute. The default value is 0x0. |
include-all |
Enables CSPF to include a link when calculating a path, only if each link administrative group bit has the same name as each affinity bit. |
- |
include-any |
Enables CSPF to include a link when calculating a path, if at least one link administrative group bit has the same name as an affinity bit. |
- |
exclude |
Enables CSPF to exclude a link when calculating a path, if any link administrative group bit has the same name as an affinity bit. |
- |
bit-name |
Specifies the referenced affinity names. |
The value is a string of 1 to 31 case-sensitive characters. |
property properties |
Specifies the affinity value of a link. |
The 32-bit value ranges from 0x0 to 0xFFFFFFFF, each bit in which represents an attribute. The default value is 0x0. |
Usage Scenario
In an MPLS TE Auto FRR scenario, to control the selection of a path over which an automatic bypass tunnel is established, run the mpls te bypass-attributes affinity command. An affinity is a 32-bit vector representing tunnel link preference. After you configure an affinity for a bypass tunnel, a PLR compares the affinity with an administrative group value during link selection to determine whether a link with specified attributes is selected or not.
Configure an affinity of an automatic bypass tunnel in either of the following modes: 1.Set a hexadecimal number. Run the mpls te bypass-attributes affinity property properties [ mask mask-value ] command. A PLR uses a 32-bit mask to represent bits to be compared between an affinity and an administrative group value. The rules for selecting a link for an automatic bypass tunnel are as follows:Prerequisites
FRR has been enabled using the mpls te fast-reroute command.
Before running the mpls te bypass-attributes affinity { include-all | include-any | exclude } bit-name &<1-32> command, some or all affinity bits have been named using the attribute command.Configuration Impact
If an affinity of an automatic bypass tunnel is changed, a node starts the make-before-break mechanism to reestablish the primary tunnel and checks the binding between the primary and automatic bypass tunnels.
Precautions
With an affinity configured, if an automatic bypass tunnel that satisfies the specified affinity cannot be established, a node will bind a manual bypass tunnel satisfying the affinity to the primary tunnel.
<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] mpls 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 fast-reroute [*HUAWEI-Tunnel1] mpls te bypass-attributes affinity include-any yellow
<HUAWEI> system-view [~HUAWEI] mpls [*HUAWEI-mpls] mpls te [*HUAWEI-mpls] quit [*HUAWEI] interface tunnel 1 [*HUAWEI-Tunnel1] tunnel-protocol mpls te [*HUAWEI-Tunnel1] mpls te fast-reroute [*HUAWEI-Tunnel1] mpls te bypass-attributes affinity property a04 mask e0c