traceroute is a classic routing Tracing plug-in that sends detection packets by increasing TTL hop by hop, and records the response Probe and delay of each hop. Supports three protocol modes: ICMP, TCP, and UDP. In TCP/UDP mode, it cooperates with the underlying packet capture to accurately correlate the returned ICMP timeout/unreachable messages.key=value format, with each pair separated by \r\n.| Parameter name | Type | Required | Default value | Explanation and impact |
|---|---|---|---|---|
host | string | yes | — | Target Host name or IP address. The domain name will be resolved by DNS first, and the resolution time will be output separately. |
port | integer | no | 0 | Destination port. If the value is greater than 0 and less than 65536, Force TCP mode. In TCP/UDP mode, if no port is specified, 80 is used by default. Determining the transport layer target port of the probe packet also affects the automatic inference logic of the protocol. |
protocol | string | no | automatic inference | Explicit protocol selection: icmp, tcp, udp. If not specified and port>0, TCP is automatically used. Directly determines the underlying socket type and the probe packet format sent. |
| Parameter name | Type | Required | Default value | Explanation and impact |
|---|---|---|---|---|
hops | integer | no | 30 | Maximum number of hops (TTL limit). The probe increments hop-by-hop starting from TTL=1 and stops after reaching this value. The larger the value, the longer the detectable path, but the time consumption increases linearly. |
count | integer | no | 3 | The number of probe packets sent by each hop. The larger the value, the more stable the single-hop delay statistics (can eliminate accidental jitter), but it will significantly increase the total time consumption. |
size | integer | no | 32 | The expected size of the detection packet payload, in bytes. If settings are not data, the plug-in uses the default text and automatically repeats/truncates to this length; if settings are data, size is overwritten by the actual payload length. In ICMP mode, it is the Echo Request data segment length; in TCP/UDP mode, it is the additional data length. |
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. If this parameter is set, the length of the detection packet shall be based on the actual decoded length of data, and the size parameter will be invalid. Can be used to construct specific payloads to test DPI or QoS behavior on a path. |
| 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 for detection; otherwise, IPv4 is used by default. Address families, socket creation, and packet encapsulation formats that affect domain name resolution. The name must be ipVersion |
dnsServer | string | no | System default | Custom DNS server address. After filling in, the parsing of host will be forced to use this server, and the parsing time will be output as an independent indicator. |
nounreached | string | no | 0 | Target unreachable Error suppression switch. When 1 is filled in, even if the target does not arrive within hops hops, the 99002 Error code will not be reported, and only the detected path data will be output. Suitable for scenarios where only partial path quality is of concern. |
| Stage | Indicator name | Unit | Description |
|---|---|---|---|
0 | Total time spent | ms | The overall elapsed time from task start to complete completion. Reflects the total execution time of this traceroute. |
1 | DNS Lookup Time | ms | Time taken to resolve host into an IP address. If you fill in the IP directly, 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 is nounreached=1), it may be 0 or not output. |
| Error code | info value | meaning |
|---|---|---|
612007 | DNS resolution failed | Domain name resolution failed |
699001 | settings Error | Typically host is empty or unspecified. |
699002 | Goal unattainable | No target response is received within hops hops and reported at nounreached ≠ 1. |
host=www.example.com
hops=20
count=3
size=64host=www.example.com
port=443
protocol=tcp
hops=30
count=5host=8.8.8.8
port=53
protocol=udp
hops=25
size=1024host=2001:4860:4860::8888
ipVersion=IPv6
protocol=icmp
hops=30