# LFA Tiebreakers (ISIS)

Load **basic.isis.sr.enabled.cfg**

```
configure
load bootflash:basic.isis.sr.enabled.cfg
commit replace
y
```



Configure the R6-R7 link to have a metric of 25.



Configure LFA on R3 for the Gi0/0/0/5 link. Prefer node-protecting LFAs over SRLG-disjoint LFAs, and SRLG-disjoint LFAs over lowest-backup-metric paths.

















































## Answer <a href="#c7f73629-87a0-4cb8-a61e-7c6b0a4f5b97" id="c7f73629-87a0-4cb8-a61e-7c6b0a4f5b97"></a>

```
#R3
router isis 1
 address-family ipv4 unicast
  fast-reroute per-prefix tiebreaker node-protecting index 10
  fast-reroute per-prefix tiebreaker srlg-disjoint index 20
  fast-reroute per-prefix tiebreaker lowest-backup-metric index 30
 !
 interface GigabitEthernet0/0/0/5
  address-family ipv4 unicast
   fast-reroute per-prefix
```



## Explanation <a href="#id-1e5aacce-fc0f-4487-90dc-73e26ec29167" id="id-1e5aacce-fc0f-4487-90dc-73e26ec29167"></a>

Before changing the tiebreakers, let’s look at the default settings.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2Fy4UFVp5sVqGXTCpVZqgR%2Fimage.png?alt=media&#x26;token=fc8a31b7-cfdf-4f78-b6f2-ff5ca5fdf05e" alt=""><figcaption></figcaption></figure></div>



Above, we see the following tiebreakers under “Remote LFA.” This is a bit deceptive, because they apply only to LFA. (RLFA cannot use these). A lower index has higher preference in ISIS.

* Primary path (index 10)
  * When ECMP paths exist, the backup path is simply the other ECMP path which uses the other, non-protected interface
* Lowest backup metric (index 20)
  * Choose the path with the lowest metric
* Line-card disjoint (index 30)
  * Choose the path that uses an interface on a separate line card
* Node protecting (index 40)
  * Choose the path that does not traverse the nexthop



Each next step is only evaluated if the previous step does not result in a preferred path. For example, line-card disjointness is only evaluated if all candidate paths have the same metric.



Currently we have three LFAs in this topology for 7.7.7.1/32:

* via R9
  * Total metric = 30
  * Not node protecting
* via R6
  * Total metric = 35
  * Node protecting
* via R4
  * Total metric = 70
  * Not node protecting



The current LFA for 7.7.7.1/32 is R9 due to the **lowest-backup-metric** tiebreaker at index 20:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FTQT06kqr13cF7DmzqfI5%2Fimage.png?alt=media&#x26;token=37794378-1420-43d0-b963-610524c3a5b1" alt=""><figcaption></figcaption></figure></div>



Let’s now add in our custom tiebreakers. When we do this, these will completely overwrite the default tiebreakers.

```
#R3
router isis 1
 address-family ipv4 unicast
  fast-reroute per-prefix tiebreaker node-protecting index 10
  fast-reroute per-prefix tiebreaker srlg-disjoint index 20
  fast-reroute per-prefix tiebreaker lowest-backup-metric index 30
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F5BFYj7dP0ZwU9pCGJQS8%2Fimage.png?alt=media&#x26;token=a0ea3e34-245b-418e-8143-54f229f81559" alt=""><figcaption></figcaption></figure></div>



Now the backup path is via R6, because our first tiebreaker is node protection. Neither R4 nor R9 provide node protection.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FtmST2VFSBxkxp8plcua4%2Fimage.png?alt=media&#x26;token=b8a833df-e216-4075-a8d6-19cb289f0c19" alt=""><figcaption></figcaption></figure></div>



### Exploring SRLG-Disjointness <a href="#cec5ce38-bd5c-4fb7-911f-4a73701cb17c" id="cec5ce38-bd5c-4fb7-911f-4a73701cb17c"></a>

Let’s change our tiebreakers around to prefer SRLG-disjointness.

```
#R3
router isis 1
 address-family ipv4 unicast
  no fast-reroute per-prefix tiebreaker lowest-backup-metric
  no fast-reroute per-prefix tiebreaker node-protecting
  no fast-reroute per-prefix tiebreaker srlg-disjoint
  !
  fast-reroute per-prefix tiebreaker srlg-disjoint index 10
  fast-reroute per-prefix tiebreaker lowest-backup-metric index 20
```



R3 uses R9 as the LFA again because we have not configured SRLG on any interfaces, and the path via R9 is the lowest cost.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FnuRCZoOxx7hcuuFx5x5B%2Fimage.png?alt=media&#x26;token=c66abea2-3cab-4f6e-9c43-c62f55edb15b" alt=""><figcaption></figcaption></figure></div>



While SRLG values are propagated within MPLS-TE, SRLG-disjointness for LFAs only allow us to consider local interfaces on the router. If we place the protected link and the link towards R9 in the same SRLG, R3 will prefer the backup path via R6 due to the first srlg-disjoint tiebreaker.

```
#R3
srlg
 interface GigabitEthernet0/0/0/5
  name RED
 !
 interface GigabitEthernet0/0/0/9
  name RED
 !
 name RED value 1
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FQB0GkFYoHXmSObjpRJZk%2Fimage.png?alt=media&#x26;token=8b597b50-f9d8-4b8f-8a9f-0632637dc774" alt=""><figcaption></figcaption></figure></div>



If we move the lowest-backup-cost tiebreaker above srlg-disjoint, we will prefer R9 again because the path has a lower total metric. The SRLG-disjointness is never evaluated, because R9 wins at the first tiebreaker rule (lowest-backup-metric).

```
#R3
router isis 1
 address-family ipv4 unicast
  fast-reroute per-prefix tiebreaker lowest-backup-metric index 5
  fast-reroute per-prefix tiebreaker srlg-disjoint index 10
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F7uPiLS2RIDlVTvQMwHDZ%2Fimage.png?alt=media&#x26;token=26897f78-9fe3-4104-b794-ca38b964746f" alt=""><figcaption></figcaption></figure></div>



### Exploring “secondary-path” <a href="#a8794060-5130-4971-b862-c582ae726fb1" id="a8794060-5130-4971-b862-c582ae726fb1"></a>

The secondary-path option allows us to prefer a non-ECMP path. To test this out, we can create ECMP paths to R7 by setting the metric on the R6-R7 link to 10.

```
#R6
router isis 1
 interface GigabitEthernet0/0/0/7
  address-family ipv4 unicast
   no metric
```



We’ll remove all custom tiebreakers on R3.

```
#R3
router isis 1
 address-family ipv4 unicast
  no fast-reroute per-prefix tiebreaker lowest-backup-metric
  no fast-reroute per-prefix tiebreaker srlg-disjoint
```



The LFA for 7.7.7.1/32 is via R6 because it has the lowest metric. Note that LFA is not enabeld on Gi0/0/0/6. If it was, the backup path for the primary path via Gi0/0/0/6 would recipriocally be via Gi0/0/0/5.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F59tmm1LoW1laVCjMGd9Z%2Fimage.png?alt=media&#x26;token=55315ebd-dd29-4520-a1c6-536751d9753d" alt=""><figcaption></figcaption></figure></div>



We can instruct the router to prefer a non-ECMP path instead. I’m not sure what the use cases or benefits of this would be in particular, though.

```
#R3
router isis 1
 address-family ipv4 unicast
  fast-reroute per-prefix tiebreaker secondary-path index 10
```



The backup path is now via R9:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FNz4xlXJg94S95AQbG8vC%2Fimage.png?alt=media&#x26;token=d3162708-0829-429f-9fa9-8f6b5a04f33b" alt=""><figcaption></figcaption></figure></div>



#### Exploring “downstream” <a href="#d1d7fef1-abf0-4195-aa02-df84659a2219" id="d1d7fef1-abf0-4195-aa02-df84659a2219"></a>

The **downstream** tiebreaker evaluates whether the nexthop has a lower IGP cost to the destination than the PLR. If so, the downstream flag is “true.” By including this above the **lowest-backup-metric**, you can use a path that has a node that is more downstream, but has a higher IGP metric because the link between the PLR and the neighbor might be a high cost.



Let’s change our topology even further so that the R4-R5 link has a cost of 5, and the R6-R7 link has a cost of 20.

```
#R4
router isis 1
 interface GigabitEthernet0/0/0/5
  address-family ipv4 unicast
   metric 5

#R6
router isis 1
 interface GigabitEthernet0/0/0/7
  address-family ipv4 unicast
   metric 20
```



Let’s remove our existing tiebreakers on R3.

```
#R3
router isis 1
 address-family ipv4 unicast
  no fast-reroute per-prefix tiebreaker secondary-path
```



The topology now looks like this:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FPRXDWxIhe8iTdchc0oFG%2Fimage.png?alt=media&#x26;token=7f6a8180-22fe-499b-994a-767ddbe222d5" alt=""><figcaption></figcaption></figure></div>

\
R3 has only one LFA that has a downstream node, R4. R4 is downstream because its own cost to 7.7.7.1/32 is lower than R3’s cost to 7.7.7.1/32. However, R3 has a high metric link to R4, so the LFA via R6 is preferred.

\


The LFA is via R6. Notice below that the **D** (downstream) flag is set to “No.”

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2Fw8q8ruu89h3BKZqxXkgI%2Fimage.png?alt=media&#x26;token=f1aeedff-e20a-4f27-8afe-0f1848b39172" alt=""><figcaption></figcaption></figure></div>



If we use the **downstream** tiebreaker, the path via R4 is the LFA because R4 is a downstream node, while R6 and R9 are not.

```
#R3
router isis 1
 address-family ipv4 unicast
  fast-reroute per-prefix tiebreaker downstream index 10
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FMeLhQwcAh0OByZRk3xls%2Fimage.png?alt=media&#x26;token=799d2815-b253-439d-8e1b-c4279dc700be" alt=""><figcaption></figcaption></figure></div>



### Summary <a href="#id-4498dc20-58f4-4a04-8c97-e145a46150a4" id="id-4498dc20-58f4-4a04-8c97-e145a46150a4"></a>

Here is a list of tiebreakers that can be configured under the ISIS process at the address-family level:

```
RP/0/0/CPU0:R3(config)#router isis 1
RP/0/0/CPU0:R3(config-isis)#add ipv4
RP/0/0/CPU0:R3(config-isis-af)#fast-reroute per-prefix tiebreaker ?
  downstream            Prefer backup path via downstream node
  lc-disjoint           Prefer line card disjoint backup path
  lowest-backup-metric  Prefer backup path with lowest total metric
  node-protecting       Prefer node protecting backup path
  primary-path          Prefer backup path from ECMP set
  secondary-path        Prefer non-ECMP backup path
  srlg-disjoint         Prefer SRLG disjoint backup path
```
