What is Flexible Algorithm or Flex Algo? And specially, how it can be used in Segment Routing Traffic Engineering (Segment Routing Flex Algo). We will answer the question in this video. In the next video we will implement the application of Flex Algo in the Segment Routing Traffic Engineering.

What is Flexible Algorithm or Flex Algo? That means to run OSPF or ISIS process with your own desired algorithm. By default ISIS or OSPF is to find the path with lowest metric or best bandwidth. But probably you want to ask ISIS to find best path based on lowest delay. Also you may want ISIS or OSPF to ignore unreliable and unsecure links.
what is Flex Algo
what is Flex Algo

It is called flexible algorithm because everyone can run ISIS or OSPF with their own algorithm. To understand better, assume you have this topology in which there are multiple paths between PE1 and PE2. The default metric of all links is 10 except for the links that I wrote the metric. For example, the value of the metric between PE1 and P1 is 5 and the value of metric is 9 in one of two links between P1-P2 and P3-P4.

When we run the ISIS process, by default the best path is the path with the lowest metric, which is PE1-P1-P2-PE2. suppose you run an ISIS process with an algorithm with different algorithm where the best path is the path with the lowest delay. Now the best path will be a different one, which is indicated here by the black dashed line PE1-P3-P4-PE2. So we have run ISIS with our desired algorithm with different path.

Now the question is how Flex Algo is useful in segment routing traffic engineering? to see the application, I will show the advantage of Flex Algo with an Example. In the same Topology I will run SRTE once without Flex Algo and once with Flex Algo to see the difference.

Prefix-SID of each router, assigned to loopback 0 of the routers are also displayed in the topology. 16001 and 16002 for PE1 and PE2 router. 16011 to 16014 for routers from P1 to P4.

SRTE without Flex Algo
SRTE without Flex Algo

First SRTE without Flex Algo. Suppose we write two SRTE policies in the PE1 router for the destination PE2. The first policy is to route traffic on the best IGP path. the result is PE1-P1-P2-PE2. The question is how many labels will be added to the traffic matching this policy in PE1? Just one label, 16002 which points to PE2 is enough to forward traffic through this path since the traffic engineering path is the same as the best IGP path.

The second policy is to route traffic on the path with minimum delay. Assume the result path is PE1-P3-P4-PE2. The question is how many labels is added to the traffic in PE1 for the traffic matching policy2. It is definitely not possible to route traffic with just one label since it differs from best IGP path. At least two labels are required to route traffic through this path. In this topology, the first label can be 16013 for example to route traffic to the P3 router, then label 16002 which is the label of PE2. the best IGP path from P3 to PE2 is the path we expect, P4 and then PE2 since it is best IGP path. So two labels are required to forward delay sensitive traffic in the this new path.

Now let’s assume the same scenario, but this time with Flex Algo. This time I will be running two ISIS processes with different algorithms. Our first process is our normal ISIS process which we call Flex Algo 0. the prefix SID of each router for Flex Algo 0 is also shown in blue color. 16001 and 16002 for PE1 and PE2. 16011 to 16014 for routers P1 to P4. we run also a second process, we call Flex Algo 129 in which the algorithm is to minimize delay. Prefix-SID of routers in the second process is completely different from the first process. I have displayed the prefix-SID of routers with red color.  16901 and 16902 for PE1 and PE2 routers. 16911 to 16914 for routers P1 to P4.

SRTE with Flex Algo
SRTE with Flex Algo

Again we have two policies from PE1 to PE2. In our new polices we can configure a specific Flex Algo to be used. First policy is to use Flex Algo 0 with best IGP path.  the result path is PE1-P1-P2-PE2. How many label is required to be added to the traffic in PE1 for the traffic matching policy1? Just one label, 16002, since the best IGP path matches traffic engineering path in policy1.

second policy is to use Flex Algo 129 with minimum delay algorithm. the result path is PE1-P3-P4-PE2. Again the question, how many label is required to be added to the traffic in PE1 for the traffic matching policy2? This time just one label, 16902, label of PE2 router in Flex Algo 129, Since this path is the best IGP path with new algorithm. Here is the difference with the scenario that we did not use Flex Algo. We can with just one label forward traffic through minimum delay Path.

so with Flex Algo in SRTE, you are able to forward traffic always with just one label in your desired path.

another use case with Flex Algo is to create multiplane networks. suppose we have normal network displayed with blue color and in Flex Algo 0. we will create a Flex Algo 128 including only black nodes (PE1-P1-P2-PE2) for applications with high bandwidth requirement and Flex Algo 129 including only red nodes (PE1-P3-P4-PE2) for applications with low delay requirement. Now I can write a policy pointing to a specific Flex Algo. So traffic from different applications will be forwarded to different network plane.

Flex Algo use case: multiplane network
Flex Algo use case: multiplane network

another point is that protected path of each Flex Algo is also in the same Flex Algo. For example if the link between P1 and P2 with metric 9 is disconnected then the traffic will be forwarded to the second link between P1 and P2 which in the same Flex Algo.

In the next video we will implement Flex Algo in similar topology in Segment Routing Traffic Engineering Application with ODN Policy and Automatic Steering.

3. segment routing control-plane and data-plane process

Refrences:

cisco dcloud Flex Algo Scenario
segmen-routing website

Back to: Segment Routing > Segment Routng Flex Algo

Leave a Reply

Your email address will not be published. Required fields are marked *


Post comment