方法一:使用traceroute命令
(检测一次)
[root@sre01 ~]# traceroute www.baidu.com
traceroute to www.baidu.com (39.156.66.14), 30 hops max, 60 byte packets
1 gateway (192.168.236.2) 24.103 ms 23.554 ms 23.238 ms
2 192.168.31.1 (192.168.31.1) 30.348 ms 29.803 ms 29.589 ms
3 10.53.0.1 (10.53.0.1) 29.396 ms 29.222 ms 28.463 ms
4 211.136.88.189 (211.136.88.189) 27.265 ms 211.136.88.185 (211.136.88.185) 33.560 ms 211.136.88.189 (211.136.88.189) 29.006 ms
5 111.13.121.66 (111.13.121.66) 28.788 ms 111.13.0.170 (111.13.0.170) 28.552 ms 111.13.121.66 (111.13.121.66) 38.060 ms
6 111.13.0.174 (111.13.0.174) 50.539 ms 39.156.27.5 (39.156.27.5) 9.227 ms 111.13.0.174 (111.13.0.174) 8.922 ms
7 39.156.67.17 (39.156.67.17) 7.991 ms 39.156.27.5 (39.156.27.5) 7.728 ms 8.175 ms
8 39.156.67.17 (39.156.67.17) 42.225 ms * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
[root@sre01 ~]#
方法二:使用mrt命令(持续监控)
[root@sre01 ~]# mtr www.baidu.com -n
My traceroute [v0.85]
sre01 (0.0.0.0) Fri Sep 27 11:34:20 2024
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
1. 192.168.236.2 0.0% 8 2.2 2.2 0.6 7.6 2.4
2. 192.168.31.1 0.0% 8 3.5 3.8 2.5 9.0 2.0
3. 10.53.0.1 0.0% 8 10.2 9.7 6.6 19.5 4.3
4. ???
5. 111.13.0.170 0.0% 7 20.0 16.1 9.7 21.3 4.0
6. 111.13.0.174 0.0% 7 8.5 11.5 8.5 16.0 2.5
7. 39.156.27.5 0.0% 7 8.5 11.3 8.5 14.0 2.1
8. 39.156.67.17 0.0% 7 14.4 17.0 11.5 24.0 4.3
9. ???
10. ???
11. ???
12. 39.156.66.18 0.0% 7 13.7 11.6 8.6 14.1 1.8