# SR and RSVP-TE interaction

Load **sr.rsvp-te.interaction.init.cfg**

```
configure
load bootflash:sr.rsvp-te.interaction.init.cfg
commit replace
y
```



R3 has a TE tunnel to R7’s loopback. When R1 does a traceroute to R7, the path ends up going through R3’s TE tunnel. Find a way to force R3 use the IGP path instead. Do not preform any configuration changes on R3.















































## Answer <a href="#id-468684bc-f75e-4cd8-926e-764f0d0b0e5b" id="id-468684bc-f75e-4cd8-926e-764f0d0b0e5b"></a>

```
#R7
router isis 1
 interface Loopback1
  address-family ipv4 unicast
   prefix-sid strict-spf index 77
```



## Explanation <a href="#id-81910843-9ff4-4f8d-9771-fe052557b4ab" id="id-81910843-9ff4-4f8d-9771-fe052557b4ab"></a>

By default, a prefix SID is advertised with algo 0. Algo 0 means to follow the IGP path, however, it allows a node to use a local policy that overrides the IGP path. A TE tunnel counts as a local policy that overrides the IGP path. R3 uses autoroute announce for the TE tunnel to R7. This means that R3 will steer any traffic destined for R7 through this TE tunnel. (The path to R7 uses algo 0, so R3 will use the TE tunnel for this).



We see on R3 that the incoming label for 16007 is popped and forwarded out the TE tunnel:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F0oG9qTSijKf7YgO3GQjY%2Fimage.png?alt=media&#x26;token=5a066d06-5002-44e6-aba3-5f2fd071635f" alt=""><figcaption></figcaption></figure></div>



An OAM traceroute confirms this:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FglAOPi7HVuPUVMbrxLkG%2Fimage.png?alt=media&#x26;token=8a18a6f8-17eb-402a-a48b-78edb3f0f37a" alt=""><figcaption></figcaption></figure></div>



What we need is a separate prefix SID that uses algo 1 instead. Algo 1 means to follow the strict SPF path. This would not allow R3 to divert this traffic into its TE tunnel. We can advertise an additional prefix SID on R7 that instead uses algo 1:

```
#R7
router isis 1
 interface Loopback1
  address-family ipv4 unicast
   prefix-sid strict-spf index 77
```



R7 now advertises two prefix SIDs for the same prefix (7.7.7.1/32). One with algo 0/index 7, and one with aglo 1/index 77.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FVqlQBhC825IzYKJ1l7wh%2Fimage.png?alt=media&#x26;token=6c5c76de-a558-4f5c-8e90-e94b9823e54f" alt=""><figcaption></figcaption></figure></div>



Because the new prefix SID with index 77 uses algo 1, R3 cannot divert the traffic into the TE tunnel. The end-to-end LSP must follow the strict SPF path. So on R3, label 16077 is swapped with 16077 and forwarded out the interface following the IGP bestpath:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FaHuhbD5CTcgTaToSeCo5%2Fimage.png?alt=media&#x26;token=a4f6e05b-a522-47ba-837d-ce97b2ec2b1f" alt=""><figcaption></figcaption></figure></div>



A regular OAM traceroute will still use 16007, as algo 0 is what is used for prefixes in the RIB:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FoOhHPNVxvg7JfQOJX9Yt%2Fimage.png?alt=media&#x26;token=385852c6-0cf1-420a-9ff9-726f4d15027e" alt=""><figcaption></figcaption></figure></div>



However, if we specifically push 16077 at R1, it will follow the strict IGP path.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FIDeKuFQJViKhqiIAYPFF%2Fimage.png?alt=media&#x26;token=9fc914c6-ab8a-441b-9348-7afafb70342f" alt=""><figcaption></figcaption></figure></div>
