# How to use the MTR tool

Tracing is most often useful in diagnosing various problems related to the operation of a network.

## Linux \[Traceroute]

First you should install this utility if it is not on your server:

```
apt install mtr
```

**For CentOS**:

```
yum install mtr
```

{% hint style="info" %}
Utility command usage structure:

**mtr «arguments» «ip»**
{% endhint %}

{% hint style="info" %}
List of valid arguments:

* **-h** — short reference.
* **-v** — utility version output.
* **--udp** — use **UDP** packets instead of standard **ICMP**.
* **--tcp** — use **TCP** packets instead of standard **ICMP**.
* **-4** — **IPv4** protocol usage.
* **-6** — **IPv6** protocol usage.
* **-с** — the number of packets to be sent.
* **-r** — Collect the trace in the background and display the report when it is complete.
* **-w** — performs the same function as `-r` , but in a more complete format.
* **-s** — specify the size of the packets to send.
* **-f** — entering the initial **TTL** value.
* **-e** — mpls data display.
* **-n** — do not use domain names for host names (only IP addresses will be used).
* **-o** — displaying only specific data categories.
* **-p** — output data in line format.
* **-l** — display information in a non-formalized form.
* **-a** — Specify the address of the interface from which packets will be sent during tracing.
  {% endhint %}

Try to make a trace in the standard way:

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

For example, if you want to trace 7 TCP packets to the `wiki.spacecore.pro` host and get information about the nodes in the format of IP addresses, you can use this command:

```
mtr --tcp -c 7 -n wiki.spacecore.pro
```

The result will be:

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

## Windows \[WinMTR]

We are installing the **WinMTR** utility. It is available at the [link](https://mirror.spacecore.info/uploads/winmtr-v092.zip). We run the version of the program depending on the bit of your operating system.

In the **Host** field, specify the destination server to which you want to build the trace. Then click the **Start** button.

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

We wait until at least 1000 packages have been sent. Usually this time is sufficient.

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

To export the trace result as a text document, use the **Export TEXT** button and save the file.

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

If you have collected a trace to diagnose any problem as requested by the technical support officer in the ticket, please, in addition to tracing, do not forget to attach the address from which the trace was made.


---

# 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://spacecore.gitbook.io/wiki/en/system-monitoring/traceroute-mtr.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.
