Usage Scenario
An affinity is a 32-bit vector representing a tunnel link color. After a tunnel is configured with an affinity, 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. An MPLS TE tunnel adopts a 32-bit mask to represent the affinity bits to be compared. The comparison rules are as follows:
- 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.
For example, an affinity is 0x0000FFFF and its mask is 0xFFFFFFFF. The higher-order 16 bits in an administrative group of available links are 0, and at least one of the lower-order 16 bits is 1. This means the administrative group attribute ranges from 0x00000001 to 0x0000FFFF.
- If some bits in a mask are 0, the corresponding bits in an administrative group are not compared with the affinity bits.
For example, an affinity is 0xFFFFFFFF, and its mask is 0xFFFF0000. At least one of higher-order 16 bits in an administrative group attribute is 1, and the lower-order 16 bits can be 0 and 1. This means the administrative group attribute ranges from 0x00010000 to 0xFFFFFFFF.
Prerequisites
The MPLS TE tunneling protocol has been specified using the tunnel-protocol mpls te command.
Configuration Impact
Changing an affinity leads to recalculation of paths for an existing TE tunnel.