Linux command
tracepath 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Trace
tracepath -p 33434 [host]
Trace
tracepath -p [port] [host]
tracepath -b [host]
Specify
tracepath -m [max_hops] [host]
Specify
tracepath -l [packet_length] [host]
Use
tracepath -6 [host]
说明
tracepath traces the path to a network host, discovering the MTU (Maximum Transmission Unit) along the path. Unlike traceroute, it does not require superuser privileges and can detect path MTU. The output shows each hop with its RTT and MTU information.
参数
- -p _port_
- Set initial destination port
- -b
- Print both hostnames and numerical IP addresses
- -m _max_hops_
- Set maximum number of hops (TTL)
- -l _length_
- Set initial packet length
- -4
- Use IPv4 only
- -6
- Use IPv6 only
- -n
- Print only numeric addresses
FAQ
What is the tracepath command used for?
tracepath traces the path to a network host, discovering the MTU (Maximum Transmission Unit) along the path. Unlike traceroute, it does not require superuser privileges and can detect path MTU. The output shows each hop with its RTT and MTU information.
How do I run a basic tracepath example?
Run `tracepath -p 33434 [host]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -p _port_ do in tracepath?
Set initial destination port