
tracert命令
Windows operating system provides some basic tools to troubleshoot the network. tracert
is one of the most used tools. tracert
command simply traceroute to the given IP address or remote host. tracert
mainly provides the route to the remote IP address.
Windows操作系统提供了一些基本工具来对网络进行故障排除。 tracert
是最常用的工具之一。 tracert
命令只需traceroute到给定的IP地址或远程主机。 tracert
主要提供到远程IP地址的路由。
tracert命令语法 (tracert Command Syntax)
Syntax of tracert command is like below.
tracert命令的语法如下。
tracert OPTIONS HOSTNAME
使用tracert命令的Traceroute (Traceroute with tracert Command)
In this example, we will simply trace the path to the remote host. We do not provide any option. Before command, the hostname will be resolved as expected. In this example, we will traceroute to the google.com
在此示例中,我们将简单地跟踪到远程主机的路径。 我们不提供任何选择。 在命令之前,主机名将按预期解析。 在此示例中,我们将跟踪路线到google.com
> tracert google.com

不解析主机名(Do Not Resolve Hostname)
tracert
will resolve the DNS of all intermediate hops. This will cause the slowness of the operation. We can prevent tracert to resolve the DNS of intermediate hosts with -d
.
tracert
将解析所有中间跃点的DNS。 这将导致操作缓慢。 我们可以使用-d
阻止tracert解析中间主机的DNS。
> tracert -d google.com

强制IPv4解析(Force IPv4 Resolution)
Some times if IPv6 is available it may be preferred automatically. We can prevent to trace the path with traceroute using IPv6. We will use -4
option to force IPv4 address usage.
有时,如果IPv6可用,它可能会自动成为首选。 我们可以防止使用IPv6使用traceroute跟踪路径。 我们将使用-4
选项来强制使用IPv4地址。
> tracert -4 google.com
强制IPv6解析 (Force IPv6 Resolution)
if IPv4 is available it may be preferred automatically. We can prevent to trace the path with traceroute using IPv4. We will use -6
option to force IPv6 address usage.
如果IPv4可用,它可能会自动成为首选。 我们可以防止使用IPv4使用traceroute跟踪路径。 我们将使用-6
选项来强制使用IPv6地址。
> tracert -6 google.com
设置最大跳数 (Set Maximum Hop Count)
As we know IP networks or the internet consist of mesh-like systems and stations that connect each other. The tracer will send packets to hop by hop. We can set maximum hop count with option -h
. After the specified number of hops tracert
will stop.
众所周知,IP网络或互联网由相互连接的网状系统和站点组成。 跟踪器将逐跳发送数据包。 我们可以使用选项-h
设置最大跳数。 在指定的跳数之后, tracert
将停止。
> tracert -h 4 google.com

翻译自: https://www.poftut.com/windows-tracert-command-tutorial-examples-find-path-remote-host/
tracert命令