HP MSR2000/3000/4000 Router Series MPLS Command Reference

66
Syntax
mpls te affinity-attribute attribute-value [ mask mask-value ]
undo mpls te affinity-attribute
Default
The affinity is 0x00000000, and the mask is 0x00000000. That is, a tunnel can use any link.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
attribute-value: Specifies the affinity value in the range of 0x00000000 to 0xFFFFFFFF. An affinity is a
32-bit binary number. Each bit of the affinity represents an attribute, which takes a value of 0 or 1.
mask mask-value: Specifies the mask of the affinity bits, in the range of 0x00000000 to 0xFFFFFFFF. A
mask is a 32-bit binary number. Each bit of the mask determines whether to check the corresponding bit
of the link attribute. If the mask bit is 1, the corresponding link attribute bit must be checked with the
affinity bit and the link can be used by the tunnel only when the link attribute bit meets certain
requirements. If the mask bit is 0, the corresponding link attribute bit is not checked.
Usage guidelines
Affinity determines which links a tunnel can use. The affinity attribute and its mask, and the link attribute
are all 32-bit long. A link is available for a tunnel if the link attribute meets the following requirements:
The link attribute bits corresponding to the affinity attribute's 1 bits whose mask bits are 1 must have
at least one bit set to 1.
The link attribute bits corresponding to the affinity attribute's 0 bits whose mask bits are 1 must have
no bit set to 1.
The link attribute bits corresponding to the 0 bits in the affinity mask are not checked.
For example, if the affinity is 0xFFFFFFF0 and the mask is 0x0000FFFF, a link is available for the tunnel
when its attribute bits meet the following requirements: the highest 16 bits each can be 0 or 1 (no
requirements), the 17
th
through 28
th
bits must have at least one bit whose value is 1, and the lowest four
bits must be 0.
Examples
# Configure the tunnel affinity as 0x101 and mask as 0x303, so a link is available for the tunnel only
when the link attribute bits (from left to right) meet the following requirements: the 23
rd
bit is 0, the 31
st
bit
is 0, and at least one bit from the 24
th
to 32
nd
bits must be 1.
<Sysname> system-view
[Sysname] interface tunnel 0 mode mpls-te
[Sysname-Tunnel0] mpls te affinity-attribute 101 mask 303
Related commands
display mpls te tunnel-interface
mpls te link-attribute