trace命令和tracert命令的用途

来源:百度知道 编辑:UC知道 时间:2024/06/22 05:04:52
不太明白啊,请高手解释一下,要通俗易懂的。

tracert /?

Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]
[-R] [-S srcaddr] [-4] [-6] target_name

Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list (IPv4-only).
-w timeout Wait timeout milliseconds for each reply.
-R Trace round-trip path (IPv6-only).
-S srcaddr Source address to use (IPv6-only).
-4 Force using IPv4.
-6 Force using IPv6.

Tracert命令详解

该诊断实用程序将包含不同生存时间 (TTL) 值的 Internet 控制消息协议 (ICMP) 回显数据包发送到目标,以决定到达目标采用的路由。要在转发数据包上的 TTL 之前至少递减 1,必需路径上的每个路由器,所以 TTL 是有效的跃点计数。数据包上的 TTL 到达 0 时,路由器应该将“ICMP 已超时”的消息发送回源系统。Tracert 先发送 TTL 为 1 的回显数据包,并在随后的每次发送过程将 TTL 递增 1,直到目标响应或 TTL 达到最大值,从而确定路由。路由通过检查中级路由器发送回的“ICMP 已超时”的消息来确定路由。不过,有些路由器悄悄地下传包含过期 TTL 值的数据包,而 tracert 看不到。
tracert [-d] [-h maximum_hops] [-j computer-list] [-w timeout] target_name
使用 tracer