Depending on the configured options of the loopfree-alternates command, the LFA SPF in an IGP instance runs algorithms in the following order:
To protect an adjacency SID, the LFA selection algorithm uses the following preference order:
Adjacency of an alternate parallel link to the same neighbor. If more than one adjacency exists, select one as follows:
adjacency with the lowest metric
adjacency to the neighbor with the lowest router ID (OSPF) or system ID (IS-IS), and the lowest metric
with the lowest interface index and the lowest router ID (OSPF) or system ID (IS-IS)
An ECMP next hop to a node-SID of the same neighbor that is different from the next hop of the protected adjacency. If more than one next hop exists, select one as follows:
next hop with the lowest metric
next hop to the neighbor with the lowest router ID (OSPF) or system ID (IS-IS) if same lowest metric
next hop to the lowest interface index if same neighbor router ID (OSPF) or system ID (IS-IS
LFA backup outcome of a node SID of the same neighbor, in the following preference order:
TI-LFA backup
LFA backup
RLFA backup