Flex-Algo is an algorithm that allows an IGP to calculate eligible paths automatically based on the link cost, delay, or TE constraint to flexibly meet TE requirements.
Traditionally, IGPs can use only the SPF algorithm to calculate the shortest paths to destination addresses based on link costs. As the SPF algorithm is fixed and cannot be adjusted by users, the optimal paths cannot be calculated according to users' diverse requirements, such as the requirement for traffic forwarding along the lowest-delay path or without passing through certain links.
On a network, constraints used for path calculation may be different. For example, as autonomous driving requires an ultra-low delay, an IGP needs to use delay as the constraint to calculate paths on such a network. Another constraint that needs to be considered is cost, so some links with high costs need to be excluded in path calculation. These constraints may also be combined.
To make path calculation more flexible, users may want to customize IGP route calculation algorithms to meet their varying requirements. They can define an algorithm value to identify a fixed algorithm. When all devices on a network use the same algorithm, their calculation results are also the same, preventing loops. Since users, not standards organizations, are the ones to define these algorithms, they are called Flex-Algos.
SRv6 Flex-Algo is implemented as follows:
Because each user can individually define their Flex-Algos, the same Flex-Algo running on devices in the same IGP domain may have different FADs. To ensure that the path calculated using a specific Flex-Algo is loop-free, one FAD must be preferentially selected and advertised in the domain.
A Flex-Algo represents a user's forwarding path requirements. When SRv6 uses the IGP to calculate paths, it selects Flex-Algo links based on the Flex-Algo information carried in locator routes and runs Flex-Algos to calculate SRv6 BE paths that meet different requirements.