tracert(windows)和traceroute(linux)

我正在追踪tracert(Windows)和traceroute(linux)之间的一些服务器在同一个networking。
但是输出是不同的。
tracert可以跟踪目标服务器。
但是traceroute不能。 traceroute输出在下面(一些星号省略)。

traceroute to xxx.com (112.125.57.195), 64 hops max, 52 byte packets 1 192.168.1.1 (192.168.1.1) 1.347 ms 0.729 ms 1.083 ms 2 113.109.124.1 (113.109.124.1) 6.519 ms 5.903 ms 6.368 ms 3 183.56.38.137 (183.56.38.137) 6.094 ms 37.891 ms 5.314 ms 4 58.61.243.129 (58.61.243.129) 7.002 ms 8.967 ms 7.673 ms 5 61.144.3.22 (61.144.3.22) 6.169 ms 6.147 ms 5.359 ms 6 202.97.34.117 (202.97.34.117) 40.194 ms 532.342 ms 536.089 ms 7 220.181.16.54 (220.181.16.54) 578.522 ms 586.950 ms 627.117 ms 8 220.181.70.150 (220.181.70.150) 607.408 ms 681.635 ms 671.447 ms 9 182.92.255.228 (182.92.255.228) 760.188 ms 766.492 ms 399.930 ms 10 * * * 11 * * * 

这不能跟踪目标服务器。 所有的输出都是星号。

* NIX中的大部分traceroute都默认为sdending UDP数据包(虽然通常有一个选项可以改变这种情况),Windows将默认使用ICMP echo请求。

tracert(windows)和traceroute(linux)的区别在于:

tracert(windows)将只使用ICMP回应请求。

traceroute(linux)[有些依赖linux发行版]默认为UDP echo请求。

两种解决scheme都非常老旧,而且令人吃惊的是已经工作了很长一段时间,因为互联网历史的很大一部分,互联网的很多部分仍然会传递这两种types的stream量,而没有对其进行过滤。 然而,随着时间的推移,越来越多的核心stream量路由器开始过滤这些“回声”请求。 (有关回应请求的更多信息,请从这里开始: https : //en.wikipedia.org/wiki/Echo_Protocol )

TCP Traceroute使用ICMP或UDP回应请求的替代scheme,因为它使用TCP SYN数据包,能够更好地穿越现代防火墙。

 TCP Traceroute on Windows And Linux http://simulatedsimian.github.io/tracetcp.html https://github.com/SimulatedSimian/tracetcp/releases 

并为它的工作如何写作:

 https://support.logicboxes.com/helpdesk/index.php?/Knowledgebase/Article/View/11/37/using-tcp-traceroute-on-windows-and-linux 

下面是一个简单/典型用法示例的副本:

 C:\tracetcp>tracetcp www.redhat.com:443 -h 3 Tracing route to 184.85.48.112 [a184-85-48-112.deploy.akamaitechnologies.com] on port 443 Over a maximum of 30 hops. 3 32 ms 50 ms 56 ms 172.20.16.65 4 34 ms 14 ms 33 ms 172.26.16.1 5 503 ms 14 ms 68 ms 172.20.7.34 6 43 ms 170 ms 25 ms 203.117.35.9 7 28 ms 86 ms 26 ms 203.117.34.2 8 216 ms 168 ms 99 ms 203.117.34.14 9 * * * Request timed out. 10 Destination Reached in 211 ms. Connection established to 184.85.48.112 Trace Complete. 

您必须安装此版本的winpcap库才能正常工作。 tracetcp已经使用这个库的版本3 *和4 *进行了testing。 (因为WinXP SP2删除了原始套接字。)但是,如果你是一个networking人,你可能已经安装了winpcap&wireshark。