mytrace is a plug-in that performs MTR (My Traceroute) Network path detection. It measures the Network path quality hop by hop by sending incremental TTL detection packets to the target, and supports three detection modes: ICMP, TCP, and UDP.key=value, case-sensitive, and each pair is separated by \r\n.| Parameter name | Type | Required | Default value | Explanation and impact |
|---|---|---|---|---|
host | string | yes | — | Target Host name or IP address. If you fill in the domain name, the plug-in will first perform DNS resolution, and the resolution time will be included in the output indicators. |
port | integer | no | 0 | Destination port. If it is greater than 0, TCP mode is forcibly enabled, and the plug-in will send TCP SYN packets for detection. When 0, the ICMP protocol is used by default (unless protocol is explicitly specified). |
protocol | string | no | automatic inference | Explicitly specify the detection protocol: icmp, tcp, udp. If port is greater than 0 and protocol is not specified, TCP is automatically used. This parameter determines the type of detection packets sent by the bottom layer and the result statistics method. |
| Parameter name | Type | Required | Default value | Explanation and impact |
|---|---|---|---|---|
hops | integer | no | 30 | Maximum number of hops (maximum TTL). The probe increments starting at TTL=1 and stops when this upper limit is reached. If the target is not reached within hops hops, the target is deemed unreachable. The larger the value, the longer the detection takes. |
count | integer | no | 3 | Number of probe packets sent per TTL. By default, 3 packets are sent when not set. |
interval | integer | no | 0 (internally forced to 100) | The sending interval between adjacent probe packets, in milliseconds. If it is not set or is set to 0, the plug-in will forcibly increase it to 100 ms. A value that is too small may cause packet loss due to speed limit on the intermediate router. |
size | integer | no | 32 | The payload size of the detection packet, in bytes. In ICMP mode, it is the data segment length of Echo Request; in TCP/UDP mode, it is the additional data length. Some Network devices have different processing delays for large packets and can be used to simulate specific business traffic. |
data | string | no | Ping data from networkbench.com. | Customize the detection packet payload content. The hex: prefix is supported, and subsequent content is decoded in hexadecimal and filled in the payload. Can be used to send specific identification content, or bypass simple DPI in some scenarios. |
| Parameter name | Type | Required | Default value | Explanation and impact |
|---|---|---|---|---|
ipVersion | string | no | IPv4 | Specify the IP protocol version. Fill in IPv6 to force the use of IPv6 stack for detection; otherwise, IPv4 is used by default. Affects DNS resolution type, socket creation, and the entire probe path. The name must be ipVersion |
dnsServer | string | no | System default | Custom DNS server address (such as 114.114.114.114). After filling in, the domain name resolution of host will be performed through the server, and the resolution time will be output as a separate indicator. |
nounreached | boolean | no | 0 | Error processing switch when the target is unreachable. When 1 is filled in, even if the target does not arrive within hops hops, the Error code (699002) will not be reported, and only the detected path data will be output. Suitable for scenarios where only part of the path needs to be measured. |
| Stage | Indicator name | Unit | Description |
|---|---|---|---|
0 | Total time spent | ms | The overall elapsed time from the start of the mission to the completion of the detection. Reflects the total duration of a single complete MTR probe. |
1 | DNS Lookup Time | ms | The time taken to resolve host to an IP address. If host directly fills in the IP, the value will be close to 0. |
2 | hop count | Jump | The TTL value when the target is actually reached. If the target is not reached (and nounreached=1), 0 may be output or not output. |
| Error code | info value | meaning |
|---|---|---|
612007 | DNS cannot be resolved | Domain name resolution failed (WinInet Error). |
699001 | settings Error | Usually host is empty or has an illegal format. |
699002 | Goal unattainable | The target response is not received within the hops jump and is triggered at nounreached ≠ 1. |