affinity property (MPLS TE P2P template view)

Function

The affinity property command defines an affinity in a P2P TE tunnel template.

The undo affinity property command deletes an affinity.

By default, no affinities are defined in a P2P TE tunnel template.

Format

affinity property properties [ mask mask-value ]

undo affinity property

Parameters

Parameter Description Value
properties

Specifies the affinity value of a link.

The 32-bit value ranges from 0x0 to 0xFFFFFFFF, each bit in which represents a property. The default value is 0x0.

mask mask-value

Specifies the mask of affinities.

The 32-bit value ranges from 0x0 to 0xFFFFFFFF. The default value is 0x0.

Views

MPLS TE P2P template view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
mpls-te write

Usage Guidelines

Usage Scenario

An affinity is a 32-bit vector value used to describe an MPLS link. An affinity and an administrative group attribute define the nodes through which an MPLS TE tunnel passes. Affinity masks determine the link properties that should be checked by a device. If some bits in the mask are 1, at least one bit in an administrative group is 1, and the corresponding bit in the affinity must be 1. If the bits in the affinity are 0s, the corresponding bits in the administrative group cannot be 1.

To use an affinity to control nodes through which a P2P TE tunnel passes, run the affinity property command in the view of the P2P TE tunnel template.

Prerequisites

A P2P TE tunnel template has been configured using the mpls te p2p-template command.

Example

# Create a P2P TE tunnel template named Template1 and set the affinity to a04 and its mask to e0c in the view of this template.
<HUAWEI> system-view
[~HUAWEI] mpls
[*HUAWEI-mpls] mpls te
[*HUAWEI-mpls] quit
[*HUAWEI] mpls te p2p-template Template1
[*HUAWEI-te-p2p-template-Template1] affinity property a04 mask e0c
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >