这篇文章主要介绍了Linux traceroute命令使用方法实例详解的相关资料,希望通过本文能帮助到大家,让大家理解应用这部分内容, 需要的朋友可以参考下
Linux traceroute命令使用方法实例详解
一、默认使用的是UDP协议(30000以上端口)
二、使用TCP协议
-T -p
三、使用ICMP协议
-I
四、实战
[root@localhost hping-master]# whereis traceroute traceroute: /usr/bin/traceroute /usr/share/man/man8/traceroute.8.gz [root@localhost hping-master]# [root@localhost hping-master]# traceroute www.jd.com traceroute to www.jd.com (117.34.35.1), 30 hops max, 60 byte packets 1 192.168.0.1 (192.168.0.1) 4.065 ms 3.654 ms 3.574 ms 2 100.64.0.1 (100.64.0.1) 4.726 ms 4.854 ms 3.738 ms 3 10.224.21.1 (10.224.21.1) 4.738 ms 5.593 ms 5.431 ms 4 10.224.211.9 (10.224.211.9) 5.217 ms 5.065 ms 10.224.211.5 (10.224.211.5) 4.752 ms 5 172.16.4.2 (172.16.4.2) 3.521 ms 3.988 ms 3.841 ms 6 10.224.126.2 (10.224.126.2) 17.562 ms 10.843 ms 10.224.216.114 (10.224.216.114) 7.593 ms 7 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.com traceroute to www.jd.com (117.34.35.1), 30 hops max, 60 byte packets 1 192.168.0.1 4.622 ms 3.958 ms 3.765 ms 2 100.64.0.1 7.772 ms 7.962 ms 7.922 ms 3 10.224.21.1 6.844 ms 6.204 ms 5.427 ms 4 10.224.211.5 5.653 ms 5.279 ms 10.224.211.29 6.425 ms 5 172.16.4.2 3.843 ms 4.457 ms 3.391 ms 6 10.224.216.114 15.708 ms 10.224.126.2 10.909 ms 10.224.216.114 8.939 ms 7 117.34.35.1 7.788 ms 7.741 ms 7.461 ms [root@localhost hping-master]# traceroute -In www.jd.com traceroute to www.jd.com (117.34.35.1), 30 hops max, 60 byte packets 1 192.168.0.1 2.212 ms 1.879 ms 1.852 ms 2 100.64.0.1 4.385 ms 4.432 ms 9.885 ms 3 10.224.21.1 9.979 ms 9.758 ms 9.455 ms 4 10.224.211.5 10.302 ms 10.197 ms 10.268 ms 5 172.16.4.2 9.495 ms 9.318 ms 9.467 ms 6 10.224.216.114 28.641 ms 25.982 ms 23.369 ms 7 117.34.35.1 5.225 ms 4.488 ms 4.759 ms [root@localhost hping-master]# traceroute -T -p 80 -n www.jd.com traceroute to www.jd.com (117.34.35.1), 30 hops max, 60 byte packets 1 192.168.0.1 2.542 ms 2.198 ms 2.150 ms 2 * * * 3 * * * 4 * * * 5 * * * 6 * * * 7 * * * 8 117.34.35.1 6.363 ms 6.176 ms 5.060 ms
Atas ialah kandungan terperinci Linux中关于traceroute命令的使用详解. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!