(资料图片仅供参考)
Linux traceroute命令使用方法实例详解
一、默认使用的是UDP协议(30000以上端口)
二、使用TCP协议
-T -p
三、使用ICMP协议
-I
四、实战
[root@localhost hping-master]# whereis traceroutetraceroute: /usr/bin/traceroute /usr/share/man/man8/traceroute.8.gz[root@localhost hping-master]#[root@localhost hping-master]# traceroute www.jd.comtraceroute to www.jd.com (117.34.35.1), 30 hops max, 60 byte packets1 192.168.0.1 (192.168.0.1) 4.065 ms 3.654 ms 3.574 ms2 100.64.0.1 (100.64.0.1) 4.726 ms 4.854 ms 3.738 ms3 10.224.21.1 (10.224.21.1) 4.738 ms 5.593 ms 5.431 ms4 10.224.211.9 (10.224.211.9) 5.217 ms 5.065 ms 10.224.211.5 (10.224.211.5) 4.752 ms5 172.16.4.2 (172.16.4.2) 3.521 ms 3.988 ms 3.841 ms6 10.224.126.2 (10.224.126.2) 17.562 ms 10.843 ms 10.224.216.114 (10.224.216.114) 7.593 ms7 117.34.35.1 (117.34.35.1) 5.011 ms 6.352 ms 11.069 ms[root@localhost hping-master]# traceroute -n www.jd.comtraceroute to www.jd.com (117.34.35.1), 30 hops max, 60 byte packets1 192.168.0.1 4.622 ms 3.958 ms 3.765 ms2 100.64.0.1 7.772 ms 7.962 ms 7.922 ms3 10.224.21.1 6.844 ms 6.204 ms 5.427 ms4 10.224.211.5 5.653 ms 5.279 ms 10.224.211.29 6.425 ms5 172.16.4.2 3.843 ms 4.457 ms 3.391 ms6 10.224.216.114 15.708 ms 10.224.126.2 10.909 ms 10.224.216.114 8.939 ms7 117.34.35.1 7.788 ms 7.741 ms 7.461 ms[root@localhost hping-master]# traceroute -In www.jd.comtraceroute to www.jd.com (117.34.35.1), 30 hops max, 60 byte packets1 192.168.0.1 2.212 ms 1.879 ms 1.852 ms2 100.64.0.1 4.385 ms 4.432 ms 9.885 ms3 10.224.21.1 9.979 ms 9.758 ms 9.455 ms4 10.224.211.5 10.302 ms 10.197 ms 10.268 ms5 172.16.4.2 9.495 ms 9.318 ms 9.467 ms6 10.224.216.114 28.641 ms 25.982 ms 23.369 ms7 117.34.35.1 5.225 ms 4.488 ms 4.759 ms[root@localhost hping-master]# traceroute -T -p 80 -n www.jd.comtraceroute to www.jd.com (117.34.35.1), 30 hops max, 60 byte packets1 192.168.0.1 2.542 ms 2.198 ms 2.150 ms2 * * *3 * * *4 * * *5 * * *6 * * *7 * * *8 117.34.35.1 6.363 ms 6.176 ms 5.060 ms
如有疑问请留言或者到本站社区交流讨论,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!