# SR OAM DPM

Load **top2.sdn.transport.init.cfg** in topology1.

```
#XR1-11
configure
load top2.sdn.transport.init.cfg
commit replace
y

#IOS-XE
config replace bootflash:top2.sdn.transport.init.cfg
```

<figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2Fpi637M5ITfCU7RJkjgGG%2Fimage.png?alt=media&#x26;token=b2dcf08c-f007-45b5-9d8a-d0f025aa0ec6" alt=""><figcaption></figcaption></figure>



SR-MPLS using ISIS is already configured.



Configure data plane monitoring on XR3 so that all adjacency SIDs and prefix SIDs are tested every 1 minute for correct ingress and egress forwarding. Limit the testing to 20 pps.



Note that this lab requires XRv9000 to fully work properly (at least for XR3).













































## Answer <a href="#id-4f22ffe5-31c3-4133-8aec-80bbf5470bfa" id="id-4f22ffe5-31c3-4133-8aec-80bbf5470bfa"></a>

```
#All XR routers
mpls oam

#XR3
mpls oam
 dpm
  pps 20
  interval 1
```



## Explanation <a href="#c373fda8-041f-41e4-9b30-7d04002b832c" id="c373fda8-041f-41e4-9b30-7d04002b832c"></a>

MPLS OAM DPM for SR is a fairly simple mechanism used to detect forwarding issues. DPM stands for data plane monitoring. First the process will perform an Adj-SID check for every Adj-SID of its directly connected neighbors. The router simply sends an LSP Ping with the top label as the Adj-SID for the neighbor’s adjacency with itself.



For example, on the XR3-XR2 link, XR3 sends an LSP ping to XR2 with the top label as XR2’s Adj-SID for that link. This causes XR2 to simply loop the packet back to XR3.



TI-LFA is not enabled, so XR3 only tests the single non-FRR Adj-SID. On XR2, we see that this is 24005:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FYqcfyDXj2fYv76vAVIfN%2Fimage.png?alt=media&#x26;token=363f9ae2-51db-4b84-9c1c-54cfce7b73d3" alt=""><figcaption></figcaption></figure></div>



XR3 sends an LSP ping with label 24005:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FVPLSuvCz43NoIhmltENu%2Fimage.png?alt=media&#x26;token=97cb5c2c-ffd6-4ed1-a33a-64bcd3a88122" alt=""><figcaption></figcaption></figure></div>



XR2 replies to XR3 with a successful result:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FY4UpkpibGVWF6pJBzbEw%2Fimage.png?alt=media&#x26;token=cad55381-cea1-40ea-926e-6926fa11892c" alt=""><figcaption></figcaption></figure></div>



We can see the results of the adjacency SID tests using the following command on XR3:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FM2nMLnLsM77J5jAyKY1v%2Fimage.png?alt=media&#x26;token=aabc90ff-2ba1-48df-970a-91cbd0e5d588" alt=""><figcaption></figcaption></figure></div>



Next, XR3 validates every prefix SID in its RIB. It verifies both the ingress and egress forwarding path in a clever way. It sets the TTL to 2 and sends the LSP Ping “backwards” to an upstream client with the client’s Adj-SID for itself. This causes the LSP Ping to be received inbound to XR3. Then XR3 forwards it egress to a downstream router, and verifies that it gets a successful reply.



For example, XR3 sends an LSP Ping to XR4 with top label as XR4’s Adj-SID with XR3, and then a subsequent label for the prefix SID for 10.0.0.1/32.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FRpMPmmd6jiuSPzjDVd9e%2Fimage.png?alt=media&#x26;token=e5dbe05d-f738-4e29-92f2-04bbcc7a25e6" alt=""><figcaption></figcaption></figure></div>



XR4 pops the top label and loops this back to XR3:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FE8oJlwxLgtCjzx1AizLg%2Fimage.png?alt=media&#x26;token=51aae4a5-d265-4ff4-a45d-00842e755569" alt=""><figcaption></figcaption></figure></div>



Now XR3 forwards this to XR1 on vlan 101 after popping the top label:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FUxPTA3ZlwEn9DsIpe4yr%2Fimage.png?alt=media&#x26;token=90119507-4272-4e80-949c-d2e4226052b6" alt=""><figcaption></figcaption></figure></div>



XR1 sends a successful reply:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F8DvZ6t7zLgOpY1LwbxCa%2Fimage.png?alt=media&#x26;token=b970756c-144d-4f5a-b642-95090e4d784b" alt=""><figcaption></figcaption></figure></div>



This process is iterated for every upstream/downstream combination for every prefix SID. We can see the results using the following show command:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FHhMnCZX62wc442dGqNxD%2Fimage.png?alt=media&#x26;token=b1b6ea93-19e0-45d8-b4b4-8ca4dc91664b" alt=""><figcaption></figcaption></figure></div>



To see the details of the upstream/downstream combinations, we can specify a particular prefix:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F9pkFESz3YJBfa9InaM7l%2Fimage.png?alt=media&#x26;token=ddc0f56f-46e5-4075-944e-b7cb08724819" alt=""><figcaption></figcaption></figure></div>



DPM is ECMP aware, so in te case that multiple ECMP paths exist, all will be tested. For example, 10.0.0.11/32 is ECMP with two downstream nexthops:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FvIFryuMWXjJn1frDqC59%2Fimage.png?alt=media&#x26;token=87235cdd-bdd0-49e8-85f4-4db7468da7b4" alt=""><figcaption></figcaption></figure></div>
