MENU

Linux云服务器三网回程路由追踪一键测试脚本

• October 5, 2019 • Read: 1224 • 网站运维

Linux云服务器三网回程路由追踪一键测试脚本

Linux系统服务器基本信息、性能、带宽的测试,有很多脚本可以使用。
小维在博客也收集整理了部分,个人比较常用的是bench.shSuperspeed.sh
今天在这里为大家分享一个Linux云服务器三网回程路由追踪一键测试脚本,根据大佬们制作的脚本修改了测试节点,可以一键测试服务器到北京电信、天津联通、北京移动、杭州电信、宁波联通、杭州移动、贵阳电信、贵阳联通、贵阳移动、广州电信、深圳联通、广州移动、上海电信、上海联通、上海移动、成都教育网16个节点的回程路由情况,涵盖了华北、华东、西南地区的电信、联通、移动节点,相对来说测试节点分布比较合理。
当然有兴趣的自己也可以修改节点,文章后面会介绍如何修改。

一、脚本测试命令

1、如果需要测试服务器国内节点的回程路由情况,使用SSH工具连接服务器后,输入下面命令即可。

yum -y install wget
wget -qO- git.io/fphX1 | bash

#或
yum -y install wget 
wget -qO- https://raw.githubusercontent.com/wn789/VPS-/master/autoBestTrace.sh | bash

2、测试结果展示。

----------------------------------------------------------------------
北京电信
traceroute to 220.181.22.1 (220.181.22.1), 30 hops max, 60 byte packets
 1  14.192.50.254  0.46 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  0.85 ms  *  局域网
 3  10.20.32.129  0.68 ms  *  局域网
 4  100.100.101.4  1.11 ms  *  共享地址
 5  *
 6  63.140.7.29  1.49 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.93  2.95 ms  *  中国 香港 电信
 8  59.43.246.225  40.47 ms  *  中国 广东 广州 电信
 9  59.43.188.77  43.07 ms  *  中国 北京 电信
10  59.43.132.9  47.02 ms  *  中国 北京 电信
11  *
12  *
13  *
14  220.181.22.1  43.35 ms  AS23724  中国 北京 电信

----------------------------------------------------------------------
辽宁联通
traceroute to 220.201.8.6 (220.201.8.6), 30 hops max, 60 byte packets
 1  14.192.50.254  1.52 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  0.75 ms  *  局域网
 3  *
 4  100.100.101.4  0.74 ms  *  共享地址
 5  *
 6  63.140.7.29  1.14 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.85  1.88 ms  *  中国 广东 广州 电信
 8  59.43.250.173  40.65 ms  *  中国 北京 电信
 9  59.43.188.85  42.38 ms  *  中国 北京 电信
10  59.43.132.25  49.74 ms  *  中国 北京 电信
11  219.158.40.165  46.01 ms  AS4837  中国 北京 联通
12  219.158.5.129  50.03 ms  AS4837  中国 北京 联通
13  219.158.21.66  53.87 ms  AS4837  中国 辽宁 沈阳 联通
14  218.61.254.222  58.95 ms  AS4837  中国 辽宁 沈阳 联通
15  218.61.254.202  56.37 ms  AS4837  中国 辽宁 沈阳 联通
16  218.61.252.150  54.37 ms  AS4837  中国 辽宁 沈阳 联通
17  218.61.252.149  54.83 ms  AS4837  中国 辽宁 沈阳 联通
18  218.61.252.150  71.37 ms  AS4837  中国 辽宁 沈阳 联通
19  218.61.252.149  54.55 ms  AS4837  中国 辽宁 沈阳 联通
20  218.61.252.150  54.53 ms  AS4837  中国 辽宁 沈阳 联通
21  218.61.252.149  55.13 ms  AS4837  中国 辽宁 沈阳 联通
22  218.61.252.150  53.95 ms  AS4837  中国 辽宁 沈阳 联通
23  218.61.252.149  54.69 ms  AS4837  中国 辽宁 沈阳 联通
24  218.61.252.150  54.66 ms  AS4837  中国 辽宁 沈阳 联通
25  218.61.252.149  54.87 ms  AS4837  中国 辽宁 沈阳 联通
26  218.61.252.150  54.51 ms  AS4837  中国 辽宁 沈阳 联通
27  218.61.252.149  54.88 ms  AS4837  中国 辽宁 沈阳 联通
28  218.61.252.150  55.40 ms  AS4837  中国 辽宁 沈阳 联通
29  218.61.252.149  57.54 ms  AS4837  中国 辽宁 沈阳 联通
30  218.61.252.150  58.41 ms  AS4837  中国 辽宁 沈阳 联通

----------------------------------------------------------------------
北京移动
traceroute to 221.130.33.1 (221.130.33.1), 30 hops max, 60 byte packets
 1  14.192.50.254  0.40 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  6.80 ms  *  局域网
 3  10.20.32.129  0.89 ms  *  局域网
 4  *
 5  *
 6  63.140.7.29  1.32 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.85  1.91 ms  *  中国 广东 广州 电信
 8  59.43.246.209  72.37 ms  *  中国 北京 电信
 9  59.43.188.69  40.02 ms  *  中国 北京 电信
10  59.43.132.13  44.48 ms  *  中国 北京 电信
11  202.97.12.177  41.22 ms  AS4134  中国 北京 电信
12  *
13  221.176.23.53  42.26 ms  AS9808  中国 北京 移动
14  221.183.9.197  41.36 ms  AS9808  中国 北京 移动
15  *
16  *
17  221.130.33.1  42.88 ms  AS56048  中国 北京 移动

----------------------------------------------------------------------
杭州电信
traceroute to 60.176.0.1 (60.176.0.1), 30 hops max, 60 byte packets
 1  14.192.50.254  0.49 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  0.82 ms  *  局域网
 3  *
 4  *
 5  *
 6  63.140.7.29  68.41 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.246.181  20.51 ms  *  中国 香港 电信
 8  59.43.249.26  28.73 ms  *  中国 上海 电信
 9  *
10  59.43.138.53  25.72 ms  *  中国 上海 电信
11  59.43.47.94  31.14 ms  *  中国 电信
12  *
13  1.0.176.60.broad.hz.zj.dynamic.163data.com.cn (60.176.0.1)  56.09 ms  AS4134  中国 浙江 杭州 电信

----------------------------------------------------------------------
宁波联通
traceroute to 60.12.17.1 (60.12.17.1), 30 hops max, 60 byte packets
 1  14.192.50.254  0.62 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  0.78 ms  *  局域网
 3  10.20.32.129  0.87 ms  *  局域网
 4  100.100.101.4  0.95 ms  *  共享地址
 5  *
 6  63.140.7.29  5.47 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.246.177  2.48 ms  *  中国 香港 电信
 8  59.43.248.206  28.74 ms  *  中国 上海 电信
 9  *
10  59.43.130.213  39.35 ms  *  中国 上海 电信
11  *
12  219.158.113.197  35.89 ms  AS4837  中国 上海 联通
13  219.158.106.122  39.13 ms  AS4837  中国 浙江 杭州 联通
14  *
15  *
16  60.12.17.1  37.40 ms  AS4837  中国 浙江 宁波 联通

----------------------------------------------------------------------
杭州移动
traceroute to 211.140.0.2 (211.140.0.2), 30 hops max, 60 byte packets
 1  14.192.50.254  1.08 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  1.68 ms  *  局域网
 3  10.20.32.129  0.93 ms  *  局域网
 4  100.100.101.4  0.67 ms  *  共享地址
 5  *
 6  63.140.7.29  3.44 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.85  2.32 ms  *  中国 广东 广州 电信
 8  59.43.248.206  28.67 ms  *  中国 上海 电信
 9  *
10  59.43.130.213  31.09 ms  *  中国 上海 电信
11  59.43.80.94  31.00 ms  *  中国 上海 电信
12  202.97.82.98  35.61 ms  AS4134  中国 浙江 杭州 电信
13  *
14  221.183.54.37  32.82 ms  AS9808  中国 浙江 杭州 移动
15  221.183.25.145  33.03 ms  AS9808  中国 浙江 杭州 移动
16  211.140.0.2  33.79 ms  AS56041  中国 浙江 杭州 移动

----------------------------------------------------------------------
贵阳电信
traceroute to 58.42.224.1 (58.42.224.1), 30 hops max, 60 byte packets
 1  14.192.50.254  0.49 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  1.44 ms  *  局域网
 3  10.20.32.129  0.82 ms  *  局域网
 4  *
 5  *
 6  63.140.7.29  10.17 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.85  1.95 ms  *  中国 广东 广州 电信
 8  59.43.187.177  6.76 ms  *  中国 广东 广州 电信
 9  59.43.187.93  8.96 ms  *  中国 广东 广州 电信
10  59.43.130.101  10.48 ms  *  中国 广东 广州 电信
11  59.43.18.245  12.67 ms  *  中国 广东 广州 电信
12  59.43.42.66  29.38 ms  *  中国 贵州 贵阳 电信
13  *
14  59.51.187.141  52.66 ms  AS4134  中国 贵州 贵阳 电信
15  58.42.224.1  56.50 ms  AS4134  中国 贵州 贵阳 电信

----------------------------------------------------------------------
贵阳联通
traceroute to 58.16.28.1 (58.16.28.1), 30 hops max, 60 byte packets
 1  14.192.50.254  0.46 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  0.69 ms  *  局域网
 3  *
 4  100.100.101.4  0.65 ms  *  共享地址
 5  *
 6  63.140.7.29  1.54 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.246.177  5.49 ms  *  中国 香港 电信
 8  59.43.187.181  6.90 ms  *  中国 广东 广州 电信
 9  *
10  59.43.130.157  10.59 ms  *  中国 广东 广州 电信
11  59.43.18.249  9.60 ms  *  中国 广东 广州 电信
12  *
13  219.158.9.73  9.51 ms  AS4837  中国 广东 广州 联通
14  219.158.12.6  32.52 ms  AS4837  中国 贵州 贵阳 联通
15  58.16.18.22  34.04 ms  AS4837  中国 贵州 贵阳 联通
16  *
17  58.16.28.1  31.80 ms  AS4837  中国 贵州 贵阳 联通

----------------------------------------------------------------------
贵阳移动
traceroute to 211.139.0.10 (211.139.0.10), 30 hops max, 60 byte packets
 1  14.192.50.254  17.19 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  0.82 ms  *  局域网
 3  10.20.32.129  1.34 ms  *  局域网
 4  *
 5  *
 6  63.140.7.29  1.36 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.85  4.01 ms  *  中国 广东 广州 电信
 8  59.43.183.105  5.91 ms  *  中国 广东 广州 电信
 9  *
10  59.43.130.149  7.59 ms  *  中国 广东 广州 电信
11  202.97.82.38  18.39 ms  AS4134  中国 广东 广州 电信
12  202.97.69.86  36.44 ms  *  中国 贵州 贵阳 电信
13  *
14  221.183.54.49  40.21 ms  AS9808  中国 贵州 贵阳 移动
15  221.183.25.165  32.72 ms  AS9808  中国 贵州 贵阳 移动
16  221.183.13.94  35.65 ms  AS9808  中国 贵州 贵阳 移动
17  ns1.gz.chinamobile.com (211.139.0.10)  32.89 ms  AS9808  中国 贵州 贵阳 移动

----------------------------------------------------------------------
广州电信
traceroute to 14.215.116.1 (14.215.116.1), 30 hops max, 60 byte packets
 1  14.192.50.254  1.98 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  0.81 ms  *  局域网
 3  *
 4  *
 5  *
 6  63.140.7.29  1.24 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.93  1.27 ms  *  中国 香港 电信
 8  59.43.248.249  6.10 ms  *  中国 广东 广州 电信
 9  *
10  59.43.130.105  10.92 ms  *  中国 广东 广州 电信
11  202.97.55.54  15.50 ms  AS4134  中国 广东 广州 电信
12  183.61.221.53  9.24 ms  AS58543  中国 广东 广州 电信
13  183.56.129.14  44.19 ms  AS58543  中国 广东 广州 电信
14  14.215.116.1  10.27 ms  AS58543  中国 广东 广州 电信

----------------------------------------------------------------------
深圳联通
traceroute to 58.250.0.1 (58.250.0.1), 30 hops max, 60 byte packets
 1  14.192.50.254  1.80 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  5.41 ms  *  局域网
 3  10.20.32.129  1.14 ms  *  局域网
 4  *
 5  *
 6  63.140.7.29  1.09 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.93  1.22 ms  *  中国 香港 电信
 8  59.43.183.109  6.51 ms  *  中国 广东 广州 电信
 9  59.43.187.113  8.24 ms  *  中国 广东 广州 电信
10  59.43.130.145  7.98 ms  *  中国 广东 广州 电信
11  59.43.18.245  10.04 ms  *  中国 广东 广州 电信
12  *
13  219.158.9.73  11.91 ms  AS4837  中国 广东 广州 联通
14  221.4.0.158  19.53 ms  AS17816  中国 广东 深圳 联通
15  58.250.0.1  11.53 ms  AS17623  中国 广东 深圳 联通

----------------------------------------------------------------------
广州移动
traceroute to 211.139.145.34 (211.139.145.34), 30 hops max, 60 byte packets
 1  14.192.50.254  1.31 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  0.86 ms  *  局域网
 3  10.20.32.129  0.92 ms  *  局域网
 4  100.100.101.4  0.94 ms  *  共享地址
 5  *
 6  63.140.7.29  1.07 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.93  1.28 ms  *  中国 香港 电信
 8  59.43.188.121  5.93 ms  *  中国 广东 广州 电信
 9  59.43.187.105  7.43 ms  *  中国 广东 广州 电信
10  59.43.130.125  9.26 ms  *  中国 广东 广州 电信
11  202.97.82.34  9.61 ms  AS4134  中国 广东 广州 电信
12  202.97.18.233  10.38 ms  AS4134  中国 广东 广州 电信
13  221.183.30.77  8.28 ms  AS9808  中国 广东 广州 移动
14  221.176.22.133  9.16 ms  AS9808  中国 广东 广州 移动
15  221.183.24.70  13.61 ms  AS9808  中国 广东 深圳 移动
16  211.136.203.26  13.42 ms  AS56040  中国 广东 广州 移动
17  211.136.203.26  16.65 ms  AS56040  中国 广东 广州 移动
18  211.139.145.34  16.87 ms  AS56040  中国 广东 广州 移动

----------------------------------------------------------------------
上海电信
traceroute to 101.95.120.109 (101.95.120.109), 30 hops max, 60 byte packets
 1  14.192.50.254  1.11 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  1.31 ms  *  局域网
 3  10.20.32.129  3.54 ms  *  局域网
 4  *
 5  *
 6  63.140.7.29  2.82 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.93  1.31 ms  *  中国 香港 电信
 8  59.43.248.245  6.27 ms  *  中国 广东 广州 电信
 9  59.43.187.117  8.33 ms  *  中国 广东 广州 电信
10  59.43.130.125  10.49 ms  *  中国 广东 广州 电信
11  59.43.16.133  46.06 ms  *  中国 上海 电信
12  101.95.88.50  36.13 ms  AS4812  中国 上海 电信
13  101.95.120.109  33.26 ms  AS4812  中国 上海 电信

----------------------------------------------------------------------
上海联通
traceroute to 211.95.72.254 (211.95.72.254), 30 hops max, 60 byte packets
 1  14.192.50.254  2.67 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  0.66 ms  *  局域网
 3  *
 4  100.100.101.4  0.65 ms  *  共享地址
 5  *
 6  63.140.7.29  1.37 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.246.181  1.24 ms  *  中国 香港 电信
 8  59.43.249.30  24.74 ms  *  中国 上海 电信
 9  *
10  59.43.130.213  34.50 ms  *  中国 上海 电信
11  *
12  219.158.113.197  33.19 ms  AS4837  中国 上海 联通
13  *
14  139.226.201.58  31.70 ms  AS17621  中国 上海 联通
15  112.65.207.22  58.51 ms  AS17621  中国 上海 联通
16  140.207.207.126  42.94 ms  AS17621  中国 上海 联通
17  211.95.72.254  30.33 ms  AS17621  中国 上海 联通

----------------------------------------------------------------------
上海移动
traceroute to 183.192.160.3 (183.192.160.3), 30 hops max, 60 byte packets
 1  14.192.50.254  0.84 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  0.66 ms  *  局域网
 3  10.20.32.129  0.77 ms  *  局域网
 4  100.100.101.4  0.91 ms  *  共享地址
 5  *
 6  63.140.7.29  1.21 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.247.85  1.73 ms  *  中国 广东 广州 电信
 8  59.43.248.242  101.12 ms  *  中国 上海 电信
 9  59.43.246.213  28.89 ms  *  中国 上海 电信
10  59.43.130.217  30.68 ms  *  中国 上海 电信
11  59.43.80.110  34.34 ms  *  中国 上海 电信
12  202.97.46.66  29.58 ms  AS4134  中国 上海 电信
13  221.183.66.161  38.04 ms  AS9808  中国 上海 移动
14  221.176.22.17  32.34 ms  AS9808  中国 上海 移动
15  221.183.12.162  32.52 ms  AS9808  中国 上海 移动
16  *
17  120.204.194.14  37.04 ms  AS9808  中国 上海 移动
18  120.204.197.126  33.25 ms  AS9808  中国 上海 移动
19  *
20  *
21  *
22  *
23  *
24  *
25  *
26  *
27  *
28  *
29  *
30  *

----------------------------------------------------------------------
成都教育网
traceroute to 202.112.14.151 (202.112.14.151), 30 hops max, 60 byte packets
 1  14.192.50.254  2.91 ms  AS132839  中国 香港 lighthosting.com.my
 2  10.0.0.9  4.14 ms  *  局域网
 3  10.20.32.129  0.93 ms  *  局域网
 4  *
 5  *
 6  63.140.7.29  1.14 ms  AS4809  中国 香港 chinatelecom.com.cn
 7  59.43.246.181  1.26 ms  *  中国 香港 电信
 8  59.43.248.1  45.48 ms  *  中国 北京 电信
 9  59.43.188.77  44.77 ms  *  中国 北京 电信
10  59.43.132.9  49.99 ms  *  中国 北京 电信
11  202.97.12.177  41.42 ms  AS4134  中国 北京 电信
12  202.97.34.38  48.20 ms  AS4134  中国 广东 广州 电信
13  202.97.63.206  46.72 ms  AS4134  中国 广东 广州 电信
14  *
15  *
16  101.4.117.33  85.76 ms  AS4538  中国 湖南 长沙 教育网
17  101.4.112.38  59.95 ms  AS4538  中国 湖北 武汉 教育网
18  101.4.112.29  84.82 ms  AS4538  中国 重庆 教育网
19  *
20  101.4.116.90  82.33 ms  AS4538  中国 四川 成都 教育网
21  202.115.255.242  88.10 ms  AS4538  中国 四川 成都 四川教育和科研计算机网 教育网
22  202.115.254.238  83.66 ms  AS4538  中国 四川 成都 四川教育和科研计算机网 教育网
23  202.115.0.1  83.13 ms  AS4538,AS24355  中国 四川 成都 电子科技大学 教育网
24  *
25  202.112.14.151  86.61 ms  AS24355  中国 四川 成都 教育网

----------------------------------------------------------------------

二、脚本备份

如果需要修改自定义节点只需修改“ip_list”后面的IP地址和“ip_addr”后面的对应节点名称即可。另外“for i in”后面的 {0..15}根据自己的测试节点数量要填写清楚,像蜗牛修改后是16个节点,数字是0…15,如果你修改后是18个节点那么对应的数字是0…17。

#!/bin/bash

# apt -y install unzip

# install besttrace
if [ ! -f "besttrace" ]; then
    wget https://github.com/wn789/VPS-/raw/master/besttrace
    # unzip besttrace4linux.zip
    chmod +x besttrace
fi

## start to use besttrace

next() {
    printf "%-70s\n" "-" | sed 's/\s/-/g'
}

clear
next

ip_list=(220.181.22.1 61.181.81.1 221.130.33.1 60.176.0.1 60.12.17.1 211.140.0.2 58.42.224.1 58.16.28.1 211.139.0.10 14.215.116.1 58.250.0.1 211.139.145.34 101.95.120.109 211.95.72.254 183.192.160.3 202.112.14.151)
ip_addr=(北京电信 天津联通 北京移动 杭州电信 宁波联通 杭州移动 贵阳电信 贵阳联通 贵阳移动 广州电信 深圳联通 广州移动 上海电信 上海联通 上海移动 成都教育网)
# ip_len=${#ip_list[@]}

for i in {0..15}
do
    echo ${ip_addr[$i]}
    ./besttrace -q 1 ${ip_list[$i]}
    next
done

Linux云服务器三网回程路由追踪一键测试脚本 - 原文链接:http://blog.isww.cn/128.html

Last Modified: June 24, 2021
Archives QR Code Tip
QR Code for this page
Tipping QR Code
开往-友链接力