# PIM RPF Troubleshooting #1

Load **pim.rpf.tshoot.cfg**

```
#IOS-XE
config replace flash:pim.rpf.tshoot.cfg
 
#IOS-XR
configure
load bootflash:pim.rpf.tshoot.cfg
commit replace
y
```



CSR2 has joined two SSM groups:

* (7.1.7.1, 232.1.1.1)
* (2007:7:1:7::1, FF35::1)



CSR1 has joined two SSM groups:

* (9.2.5.2, 232.1.1.1)
* (2009:9:2:5::2, FF35::1)



None of this traffic is working. Troubleshoot the issue and find a way to fix it.













































## Answer <a href="#id-4ab86b82-7ebd-48fe-863b-37791a64423f" id="id-4ab86b82-7ebd-48fe-863b-37791a64423f"></a>

```
#R10
no ip mroute 0.0.0.0 0.0.0.0 10.10.11.11
no ipv6 route 2009:9:2:5::2/128 FD00:10:10:11::11 multicast

#XR1
multicast-routing
 address-family ipv4
  no static-rpf 7.1.7.1 32 GigabitEthernet0/0/0/0.501 10.10.11.10
 !
 address-family ipv6
  no static-rpf 2007:7:1:7::1 128 GigabitEthernet0/0/0/0.501 fd00:10:10:11::10
```



## Explanation <a href="#id-65dde099-a6e8-42eb-84fe-beaa9c32d826" id="id-65dde099-a6e8-42eb-84fe-beaa9c32d826"></a>

As a first step, we can verify that the LHRs have the proper state entries. Each LHR should have the locally-joined (S, G) entries, and the (S, G) entries that were initiated from the remote receiver.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FEsPauC6wy5fH8bNWsl82%2Fimage.png?alt=media&#x26;token=e23b0ffd-fac6-4db3-ae1b-6bf123304ec6" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FrZK25EpYO6jA8KYGJCgP%2Fimage.png?alt=media&#x26;token=7505e99b-30f8-4aaf-b4f8-d9f8110fd887" alt=""><figcaption></figcaption></figure></div>



<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FtTVp8VNxYRDzh4w1WHsP%2Fimage.png?alt=media&#x26;token=76e345e6-05a7-46e8-87fa-97a0010d223c" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FORrIeRHV5gvnlbRskWJ1%2Fimage.png?alt=media&#x26;token=94cbf9e7-1c36-4991-9565-6af25797df9a" alt=""><figcaption></figcaption></figure></div>



All we see are the locally-joined (S, G) trees, not the trees built from the receiver at the other end. This means that the PIM signalling must not be working somewhere in the path between R1 and R2.



Let’s go to the next routers upstream, R10 and XR1. We’ll look at R10 first.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F42JpzFywb6tPQoMbdyjB%2Fimage.png?alt=media&#x26;token=3112d69c-db50-4799-b975-3bb5799b47e9" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FaBVPegaXztGEeFFkSM9q%2Fimage.png?alt=media&#x26;token=11d70ac9-ac5b-42bb-aa84-cb154e1c1ae0" alt=""><figcaption></figcaption></figure></div>





Notice above that both entries point to the same RPF interface, which doesn’t make sense. Also, one entry has an OIL that is null.



Let’s look at the routing for the entries with the null OIL.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FFc9VTtrsBlBOrW2cNn2f%2Fimage.png?alt=media&#x26;token=9d1c592f-c606-484d-a56c-9c30e94f3b83" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FIqNyjAZlt4zDxQAqrFzp%2Fimage.png?alt=media&#x26;token=b4f7debe-3d55-456a-8806-2d52f6822d89" alt=""><figcaption></figcaption></figure></div>



We see that R10’s unicast route towards the R2 source addresses and the RPF interface do not match. The output also tells us that the RPF check is using a static mroute.



We can further verify this by looking at the multicast RPF routing table. Notice that the IPv4 table is only populated with a 0/0 route and connected/local routes.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FrdZoEnfDl6io3yXi7YQH%2Fimage.png?alt=media&#x26;token=642b4325-9d28-40bc-b55c-99ba8e441828" alt=""><figcaption></figcaption></figure></div>



This is due to an interesting caveat with IPv4 mroutes. IPv4 RPF checks do not use a longest-prefix-match like you might expect. Instead, a static route overrides all longer-matches that are a worse admin distance.



Checking the IPv6 RPF table reveals that mroutes do not override longer matches. We can see a ::/0 static mroute, but all longer-matches are still present.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FsGbMOuP5fWJIFQW988eN%2Fimage.png?alt=media&#x26;token=74b69f38-dcd1-4986-b2e6-fe8940eeb927" alt=""><figcaption></figcaption></figure></div>



The ipv6 mroute giving us trouble is a /128:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2Fwu1Z4MTn9jkUKyjMwOML%2Fimage.png?alt=media&#x26;token=660d04c7-3c97-406c-9465-f33eb3a859a9" alt=""><figcaption></figcaption></figure></div>



Removing these static RPF routes will solve our issue:

```
#R10
no ip mroute 0.0.0.0 0.0.0.0 10.10.11.11
no ipv6 route 2009:9:2:5::2/128 FD00:10:10:11::11 multicast
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FG2LM2nQLIlXOtclveV2i%2Fimage.png?alt=media&#x26;token=1fc7c3a5-25a6-4aaa-9df1-472ec9065f0e" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FtbdFrxp6pPkaXNLy7NT2%2Fimage.png?alt=media&#x26;token=a885728b-2899-43b2-bb2e-20bf54d7b7bc" alt=""><figcaption></figcaption></figure></div>



Traffic sourced from R2 now gets a reply from R1:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F5KAUpLf9BDL1wVf4feFQ%2Fimage.png?alt=media&#x26;token=b6367bad-6985-4f48-b8ff-ba5194a77d19" alt=""><figcaption></figcaption></figure></div>



We’ll now move on to XR1. XR1 shows that the R1 source addresses have an RPF interface of the interface facing R10, which is incorrect.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FCvxmOAjEktXrCNF6swqg%2Fimage.png?alt=media&#x26;token=e5999602-4035-41b0-a4f4-4a9f7733ca1f" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FPQZFUd3JuxmfHOl8UlDJ%2Fimage.png?alt=media&#x26;token=3a683919-80e6-4949-8efa-32826817a679" alt=""><figcaption></figcaption></figure></div>



We can verify the RPF check on XR1:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FTYGfDlxQj4G1LCcrEWdC%2Fimage.png?alt=media&#x26;token=4e344319-0705-4a0c-ba7c-5df609c1f141" alt=""><figcaption></figcaption></figure></div>



A clue that this is wrong is that these are matched against host routes, while the unicast route match is a subnet:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FXlX0GHnrWnZiYbEKPF0V%2Fimage.png?alt=media&#x26;token=97a20012-09c7-434e-8821-22f3a018ade8" alt=""><figcaption></figcaption></figure></div>



IOS-XR only allows host routes for RPF “mroutes.” These are considered static RPF entries. If we remove these, the RPF check should resolve to the unicast route again, and the PIM Join should be directed to R7 instead of R10.

```
#XR1
multicast-routing
 address-family ipv4
  no static-rpf 7.1.7.1 32 GigabitEthernet0/0/0/0.501 10.10.11.10
 !
 address-family ipv6
  no static-rpf 2007:7:1:7::1 128 GigabitEthernet0/0/0/0.501 fd00:10:10:11::10
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F6l3UoC9wH8orhjGn47lw%2Fimage.png?alt=media&#x26;token=63ba949c-2118-445a-aff9-ace3a3f6461b" alt=""><figcaption></figcaption></figure></div>



Traffic sourced from R1 is now getting a reply from R2:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F6eMslFvUkk4pGRfedOQq%2Fimage.png?alt=media&#x26;token=633a4d71-5b5b-4a21-93b7-28b9469b8417" alt=""><figcaption></figcaption></figure></div>



In summary, the RPF static override routes behave differently on IOS-XE and IOS-XR:

* For IOS-XE, the IPv4 RPF table uses admin distance instead of a longest-prefix-match. A shorter match but better admin distance overrides a longer match.
* For IOS-XE, the IPv6 RPF table uses longest-prefix-match, which is more intuitive and more inline with how normal routing works.
* For IOS-XR, a static RPF entry must only be a host route (/32 or /128). So there is no concern about longest-prefix-match behavior.
