# SR OAM Tools

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

```
#XR1-10
configure
load configs/top2.sdn.transport.init.cfg
commit replace
y

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

<figure><img src="/files/c7arQI0VkbnKnqKK4vhr" alt=""><figcaption></figcaption></figure>

Enable MPLS OAM everywhere.

```
#XR1-11
mpls oam
```

MPLS ping and traceroute can be used with SR-MPLS. MPLS ping and traceroute are used to verify an MPLS LSP, as basic ping and traceroute can fallback to IP forwarding.

When using SR-MPLS, the router will automatically use the SR Prefix SID FEC type with basic **mpls ping** and **mpls traceroute** even though you do not specify it.

## MPLS Ping <a href="#id-30a71fa9-fdfd-492b-ae1a-84ea27dc7188" id="id-30a71fa9-fdfd-492b-ae1a-84ea27dc7188"></a>

```
#XR3
ping mpls ipv4 10.0.0.11/32 source 10.0.0.3 repeat 1
```

<div align="left"><figure><img src="/files/YHUrc9PgnuCy40mt97mT" alt=""><figcaption></figcaption></figure></div>

The “more proper” way to do this from the CLI would be to use **ping sr-mpls** and specifying the target FEC. This produces the exact same LSP Ping as seen above. (FEC type is Prefix SID from ISIS).

```
#XR3
ping sr-mpls 10.0.0.11/32 source 10.0.0.3 fec-type igp isis repeat 1
```

If you use **ping sr-mpls** without the fec-type, it will be a generic fec type instead.

```
#XR3
ping sr-mpls 10.0.0.11/32 source 10.0.0.3 repeat 1
```

<div align="left"><figure><img src="/files/2OeLS7ZdQjJ6rbt4884u" alt=""><figcaption></figcaption></figure></div>

**ping sr-mpls** gives us the ability to ping using an SR policy as well. We must specify the endpoint of the policy when using this.

<div align="left"><figure><img src="/files/MbV80FIbIEN1Esm1UnDP" alt=""><figcaption></figcaption></figure></div>

```
#XR3
ping sr-mpls policy binding-sid 24011 lsp-end-point 10.0.0.11 repeat 1
```

Finally, we can use a nil-fec type in order to program an arbitrary stack of labels. This can be done with either **ping sr-mpls** or **ping mpls**, there is no difference. You must specify the output interface and nexthop.

```
#XR3
ping sr-mpls nil-fec labels 16004,16002,16011 output interface gi0/0/0/0.101 nexthop 10.1.3.1
ping mpls nil-fec labels 16004,16002,16011 output interface gi0/0/0/0.101 nexthop 10.1.3.1
```

## MPLS Traceroute <a href="#id-4ac2d029-3ae9-4d68-b303-51cea6224090" id="id-4ac2d029-3ae9-4d68-b303-51cea6224090"></a>

Just like with MPLS Ping, MPLS traceroute can be used with either **traceroute mpls** or **traceroute sr-mpls**. When **traceroute mpls** is used, the FEC type is automatically the Prefix SID with the IGP protocol. When using **traceroute sr-mpls**, the FEC type is generic by default, and you can specify IGP or BGP.

MPLS traceroute simply uses LSP echo requests but with a downstream mapping TLV to allow each hop to verify the correct mapping information upon ingress. (The first hop sends its downstream neighbor’s IP address and label value. The second hop verify this is correct and return its own downstream mapping to be used for the next probe).

```
#XR3
traceroute mpls ipv4 10.0.0.11/32 source 10.0.0.3
traceroute sr-mpls 10.0.0.11/32 source 10.0.0.3
```

MPLS traceroute can be multipath aware. Use the following traceroute to see all ECMP paths:

```
#XR3
traceroute sr-mpls multipath 10.0.0.11/32 source 10.0.0.3 verbose
traceroute mpls multipath ipv4 10.0.0.11/32 source 10.0.0.3 verbose
```

Just as with the LSP Ping, the benefit of **traceroute sr-mpls** is the ability to trace and SR policy.

```
#XR3
traceroute sr-mpls policy binding-sid 24011 lsp-end-point 10.0.0.11 source 10.0.0.3
```

We can also use a nil-fec type to trace using any arbitrary stack of labels.

```
#XR3
traceroute sr-mpls nil-fec labels 16004,16002,16011 output interface gi0/0/0/0.101 nexthop 10.1.3.1
traceroute mpls nil-fec labels 16004,16002,16011 output interface gi0/0/0/0.101 nexthop 10.1.3.1
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ccie-sp.gitbook.io/ccie-spv5.1-labs/labs/sr/sr-oam-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
