MPLS TE Affinity Attribute

This topic is to discuss the following lesson:

Hi Rene,

Thank you so much for your post. Your SP topics are really well explained, and are helping me study for my SP core exam here coming up.

Understanding these attributes has been such a pain for me because of the way people explain it. You explained it extremely well and I think I get it. I wanted to confirm with you if I understood it correctly.

Below I came up with my own table of TE attributes, along with requirements. Can you tell me if I got the requirements correct or not?

0x2 = high speed links - 0000 0010
0x4 = low speed links - 0000 0100
0x10 = low latency links - 0001 0000
0x12 = high latency links - 0001 0010
0x8 = commercial ISP links - 0000 1000
0x13 = starlink satellite links - 0001 0011

Only use high speed links, as well as low latency links.

  • tunnel mpls traffic-eng affinity 0x12 mask 0x12

Exclude commerical ISP links.

  • tunnel mpls traffic-eng affinity 0x0 mask 0x8

Use low latency links, and low speed links, exclude everything else.

  • tunnel mpls traffic-eng affinity 0x14 mask 0xff

Use starlink sattelite links, and high latency links. Don’t care about the rest.

  • tunnel mpls traffic-eng affinity 0x25 mask 0xff

Hello Victor

Notice the following phrase in the lesson:

An attribute flag is 32-bit, meaning you can use this to define 32 separate properties on a link. It’s written in hexadecimal and, by default, all set to zeroes.

You must remember that this 32-bit value is actually a flag. Flag means that it indicates a boolean function, either 1 or 0. So you can actually think of the attribute flag as a series of 32 bit flags. Take a look at this NetworkLessons note on best practices for choosing your attribute flags.

Now in your case, you have overlapping flags because you are using multiple bits for certain link types. So you can’t successfully exclude or include specific traffic unless you follow the best practice in the note, and make the flags unique.

Take a look and try to readjust your flags before attempting the affinity and mask values again.

I hope this has been helpful!