Home  >  Article  >  Operation and Maintenance  >  Detailed explanation on the use of traceroute command in Linux

Detailed explanation on the use of traceroute command in Linux

黄舟
黄舟Original
2017-10-14 10:29:513500browse

This article mainly introduces the relevant information and detailed examples of how to use the Linux traceroute command. I hope this article can help everyone and let everyone understand this part of the application. Friends in need can refer to the following

Linux traceroute command examples for detailed explanation

1. The default is the UDP protocol (port 30000 or above)

2. Use TCP protocol


##

-T -p

3. Use ICMP protocol



-I

四、actual combat


##

[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

The above is the detailed content of Detailed explanation on the use of traceroute command in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn