TE Tunnel Path Control Principle of Affinity Attribute and Link Management Group

  During the dynamic establishment of an MPLS-TE tunnel, there are many factors that can be used to control tunnel path selection, among which the "affinity attribute" of the tunnel and the "link management group " of the link are two very important factors. However, many friends think that the working principles of these two technologies are complicated and difficult to understand, so they are introduced here in a special article.

      1. Affinity attribute and link management group    

  The Affinity attribute is a 32 -bit vector describing the link attributes required by the newly created MPLS TE tunnel, and a 32 -bit mask, similar to the combination of an IPv4 address and a subnet mask. Each bit also represents an attribute, which is configured on the Tunnel interface of the Ingress node of the tunnel and carried in the RSVP-TE signaling, which can affect the LSP established for the tunnel on the current device , so that the system can The tunnel calculates and selects a new path.

  The link management group, also called link color or link attribute, is a 32 -bit vector representing link attributes and is configured on the physical interface of each link. Each bit in the link attribute represents an attribute, which can be set or not set, and can also be associated with any desired meaning. For example , it is used to represent link bandwidth, performance or management strategy. The link attribute takes effect only for the newly created LSP through this interface , and does not affect the established LSP .

       The establishment of MPLS TE tunnel must first determine the tunnel path through RSVP-TE signaling, and let each node device in the path reserve certain bandwidth resources for the tunnel. In terms of tunnel path selection, the RSVP-TE signaling issued by the tunnel ingress node is flooded with the OSPF TE or ISIS TE routing information. Every time a node passes through, it selects a path to continue to the destination according to the affinity attribute configured in the tunnel. A suitable path for directional transmission. The selection method is to compare the tunnel affinity attribute value carried in the signaling with the link attributes configured on each MPLS TE capability-enabled link on the current node device. The path selected by this node.

1.png      

  The mask in the affinity attribute is used to determine the bits that need to be compared when the link attribute is compared with the affinity attribute: when the mask is 0 , it means that the bits corresponding to the two do not need to be compared (the value of the corresponding bit of the link attribute can be arbitrary) , when it is 1 , the corresponding bits of the two need to be compared (the value of the corresponding bit of the link attribute must be the same as the value of the corresponding bit of the affinity attribute). Similarly, when comparing whether two IP addresses need the same IP network segment, it is only necessary to compare whether the "network ID " part with the subnet mask of 1 is the same, and the "host ID " of the subnet mask of 0 does not need to be compared. Same.

  2. Comparison rules between link attributes and affinity attributes

  We know that to compare whether two IP addresses are in the same IP network segment is to perform a logical "AND" operation between the two IP addresses and the subnet mask of the network segment. If the result is the same, it is in the same IP network segment, otherwise are not on the same IP network segment. The comparison method of link attribute and affinity attribute is also the same, that is, they are logically ANDed with the mask respectively . If the obtained results are the same, the two attributes are considered to be matched, and when the tunnel is selected, the Select the corresponding path, otherwise give up selecting the path. The specific comparison rules are as follows:

  (1)在所有掩码中为1的位(表示对应链路的链路属性必须与隧道亲和属性必须进行匹配比较的位)中,链路属性中至少有1位与亲和属性中的对应位都为1(只有值为1的位才表示对应的位启用了某种链路属性),即两者至少有一种属性相同,不能完全不同

  (2)亲和属性为0的位(相当于没有启用对应链路属性)对应的链路属性位不能为1(即也只能为0,也不能启用对应链路属性),否则对应链路的链路属性不符合隧道的链路属性要求。

  如亲和属性为0x0000FFFF,掩码为0xFFFFFFFF,则可用链路属性取值如下:

  • 16位只能取0,因为本示例中亲和属性的高16位全为0,而根据规定,亲和属性为0的位对应的链路属性位不能为1,也只能为0

  • 16位至少有1位为1,因为本示例中亲和属性和掩码的低16位都全为1,而根据规定,在所有掩码为1的位中,链路属性中至少有1位与亲和属性中的相应位都为1

  由此可得出本示例中可使用的链路属性取值范围是0x000000010x0000FFFF

 (3)对于掩码为0的位,则不对链路属性的相应位进行检查,即对应的链路属性位的值可以任意。

  如亲和属性为0xFFFFFFFF,掩码为0xFFFF0000,则可用链路属性取值如下:

  • 16位至少有1位为1,因为掩码的高16位也全为1,而根据规定,所有掩码为1的位中,链路属性中至少有1位与亲和属性中的相应位都为1

  • The lower 16 bits can be arbitrarily set to 0 or 1 , because the lower 16 bits of the mask are all 0 , and according to the regulations, for the bits whose mask is 0 , the corresponding bits of the link attribute are not checked, that is, they can be any 0 or 0. 1 .

From this, it can be concluded that the value range of the management group attribute of the available link in this example is 0x00010000 to 0xFFFFFFFF .


The above content is extracted from Huawei's only official HCIE training material , "Huawei MPLS Technology Study Guide" , and the supporting textbooks include "Huawei MPLS VPN Study Guide" and "Huawei VPN Study Guide" .

Huawei MPLS.png


Finally, I will give you a synchronization exercise. Suppose that the affinity attribute configured on an MPLS-TE tunnel is 0xFFFFFFF0 and the mask is 0x0000FFFF . Please calculate the range of link attributes configured on each node on the path to the destination. Please write your own answer in the comments and the answer will be published next week.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324509957&siteId=291194637