VPS路由线路回程测试及简单分辨CN2 GIA/CN2 GT/163骨干

前言

路由线路分为去程和回程,去程和回程也许并不一样,所以准确的线路测试应该分别测试去程和回程;
并且有些服务商提供的线路在国内不同区域也许并不一致,复杂的网络环境就需要自己去慢慢测试了;

线路

  • 163骨干
    这是最常见的线路,骨干节点全部都以202.97开头,因为用的人多,并且优化程度低,因此在出国线路上比较拥堵,速度慢,并且丢包率高;
  • CN2 GT
    GT是Global Transit的简称,是CN2中的中端产品,在CN2里的等级比较低,去程和回国路线中会出现59.43202.97开头的节点,线路使用的是163骨干和CN2 GIA混合线路,因为163骨干线路的原因所以在晚高峰时期有可能会出现网络拥堵的情况,但是相比于传统163骨干网依然有不少的提升;
  • CN2 GIA
    GIA是Global Internet Access的简称,是目前CN2中的最高端的产品,在CN2中的等级最高,路线中全部都走59.43的节点,全程没有202.97因此线路表现最好、最稳定,很少出现拥堵的情况,但是价格也是最高;
  • 说明
    无论是163骨干还是CN2 GTCN2 GIA都是电信的网路,联通和移动的也有自己的网络线路,而常说的三网GIA其实是指借道电信的网络线路,就目前而言,电信的网络虽然宽带频宽最大,但使用人数也是最多的,所以晚高峰也会非常拥堵;

区别

  • 163骨干:节点全部为202.97段开头的即为163骨干网络;
  • CN2 GT:节点为207.9759.43混合即为CN2 GT网络;
  • CN2 GIA:节点全部为59.43的即为CN2 GIA网络;

以上方法可以用于简单的判定网络线路质量,但不排除少数一些复杂的融合线路,那就需要自己判断了;

去程测试

去程测试可以直接使用IPIP.NET提供的TraceRoute即可;
前往:TraceRoute

回程测试

方法一

BestTrace

mkdir /home/BestTrace

cd /home/BestTrace

wget --no-check-certificate https://raw.githubusercontent.com/sunpma/cdn/master/other/besttrace4linux.zip
## 或者
wget --no-check-certificate https://cdn.ipip.net/17mon/besttrace4linux.zip

unzip besttrace4linux.zip

chmod +x besttrace

./besttrace 8.8.8.8

# 8.8.8.8为测试需要达到的IP地址

ARM机型

chmod +x besttracearm

./besttracearm 8.8.8.8

# 8.8.8.8为测试需要达到的IP地址

测试结果,展开查看

root@ubuntu:~# ./besttrace 61.128.192.68
traceroute to 61.128.192.68 (61.128.192.68), 30 hops max, 60 byte packets
 1  *
    *
    *
 2  11.56.8.105  0.27 ms  *  美国 defense.gov
    11.56.8.105  0.31 ms  *  美国 defense.gov
    11.56.8.105  0.26 ms  *  美国 defense.gov
 3  *
    *
    *
 4  11.131.180.242  1.30 ms  *  美国 defense.gov
    11.131.180.242  0.87 ms  *  美国 defense.gov
    11.131.180.242  0.96 ms  *  美国 defense.gov
 5  47.246.113.178  1.24 ms  *  中国 香港 阿里云
    47.246.113.178  1.33 ms  *  中国 香港 阿里云
    47.246.113.178  1.11 ms  *  中国 香港 阿里云
 6  203.100.48.253  1.18 ms  *  中国 香港 电信
    203.100.48.253  1.19 ms  *  中国 香港 电信
    203.100.48.253  1.16 ms  *  中国 香港 电信
 7  59.43.181.189  1.59 ms  AS4809  中国 香港 电信
    59.43.181.189  1.58 ms  AS4809  中国 香港 电信
    59.43.181.189  1.55 ms  AS4809  中国 香港 电信
 8  59.43.188.121  34.41 ms  AS4809  中国 广东 广州 电信
    59.43.188.121  19.16 ms  AS4809  中国 广东 广州 电信
    59.43.188.121  6.48 ms  AS4809  中国 广东 广州 电信
 9  59.43.187.157  28.92 ms  AS4809  中国 广东 广州 电信
    *
    59.43.187.157  7.53 ms  AS4809  中国 广东 广州 电信
10  59.43.130.117  8.74 ms  AS4809  中国 广东 广州 电信
    59.43.130.117  8.04 ms  AS4809  中国 广东 广州 电信
    59.43.130.117  8.01 ms  AS4809  中国 广东 广州 电信
11  59.43.101.54  39.30 ms  AS4809  中国 重庆 电信
    59.43.101.54  37.82 ms  AS4809  中国 重庆 电信
    59.43.101.54  38.01 ms  AS4809  中国 重庆 电信
12  *
    *
    *
13  222.176.9.18  37.76 ms  AS4134  中国 重庆 电信
    222.176.9.18  37.69 ms  AS4134  中国 重庆 电信
    222.176.9.18  37.85 ms  AS4134  中国 重庆 电信
14  222.176.49.6  48.03 ms  AS4134  中国 重庆 电信
    222.176.49.6  47.81 ms  AS4134  中国 重庆 电信
    222.176.49.6  47.75 ms  AS4134  中国 重庆 电信
15  61.128.192.68  37.73 ms  AS4134  中国 重庆 电信
    61.128.192.68  37.72 ms  AS4134  中国 重庆 电信
    61.128.192.68  37.79 ms  AS4134  中国 重庆 电信

方法二

testrace 一键脚本

wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.sh

bash testrace.sh

测试结果,展开查看

[Info] 请输入你要测试的目标 ip :
输入 ip 地址:61.128.192.68
traceroute to 61.128.192.68 (61.128.192.68), 30 hops max, 60 byte packets
 1  *
 2  11.56.8.105  0.25 ms  *  {"as":"*","area":"美国\t美国\t\tdefense.gov\t\t37.09024\t-95.712891"}
 3  *
 4  11.131.180.242  0.99 ms  *  {"as":"*","area":"美国\t美国\t\tdefense.gov\t\t37.09024\t-95.712891"}
 5  47.246.113.178  2.31 ms  *  {"as":"*","area":"中国\t香港\t\t\t阿里云\t22.396428\t114.109497"}
 6  203.100.48.253  1.14 ms  *  {"as":"*","area":"中国\t香港\t\t\t电信\t22.396428\t114.109497"}
 7  59.43.181.189  1.59 ms  AS4809  {"as":"AS4809","area":"中国\t香港\t\t\t电信\t22.396428\t114.109497"}
 8  59.43.188.121  6.47 ms  AS4809  {"as":"AS4809","area":"中国\t广东\t广州\t\t电信\t23.12911\t113.264385"}
 9  *
10  59.43.130.117  8.03 ms  AS4809  {"as":"AS4809","area":"中国\t广东\t广州\t\t电信\t23.12911\t113.264385"}
11  59.43.101.54  38.01 ms  AS4809  {"as":"AS4809","area":"中国\t重庆\t重庆\t\t电信\t29.431586\t106.912251"}
12  *
13  222.176.9.18  37.73 ms  AS4134  {"as":"AS4134","area":"中国\t重庆\t重庆\t\t电信\t29.431586\t106.912251"}
14  222.176.49.6  50.82 ms  AS4134  {"as":"AS4134","area":"中国\t重庆\t重庆\t\t电信\t29.431586\t106.912251"}
15  61.128.192.68  37.72 ms  AS4134  {"as":"AS4134","area":"中国\t重庆\t重庆\t\t电信\t29.431586\t106.912251"}

MTR测试

MTR是用于对线路各个节点的实时延迟及丢包进行测试的工具
安装:

# CentOS系统
yum update && yum install mtr -y
 
# Debian/Ubuntu
apt-get update && apt-get install mtr -y

测试:

# 持续测试(持续测试不会主动停止,需要手动停止测试 Ctrl+C)
mtr 8.8.8.8

# 指定测试次数(指定测试次数不会实时显示,会在测试完成后输出测试结果)
mtr -c 100 --report 8.8.8.8

# 指定测试端口(一般DNS服务器的端口都是53)
mtr --tcp 8.8.8.8 53

测试结果,展开查看

# 持续测试
                                   My traceroute  [v0.93]
SunPma (10.0.8.14)                                                  2020-11-17T15:28:10+0800
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                                    Packets               Pings
 Host                                             Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 9.31.63.130                                    9.9%   100    0.8   1.8   0.6  36.3   4.5
 2. 9.31.122.222                                  32.3%   100    0.5   0.7   0.5   1.6   0.2
 3. 10.196.18.29                                   0.0%   100    0.7   0.7   0.6   2.1   0.2
 4. 10.196.92.113                                  0.0%   100    0.9   1.9   0.7  21.2   3.8
 5. 10.196.93.230                                  0.0%   100    0.8   1.0   0.7   3.5   0.3
 6. 58.254.152.113                                40.0%   100    0.6   0.6   0.6   0.7   0.0
 7. 120.80.137.33                                  0.0%   100    2.4   6.6   1.2  98.7  16.1
 8. 221.4.0.225                                   11.0%   100    2.4   5.9   2.2  35.3   6.2
 9. 219.158.114.114                                2.0%   100   26.3  26.9  26.1  50.8   2.9
10. 221.5.239.62                                   0.0%   100   29.2  29.1  28.9  29.8   0.1
11. 221.5.253.138                                  0.0%   100   32.6  34.2  32.4  51.8   2.9
12. 221.5.203.98                                   0.0%   100   27.4  27.1  26.6  30.1   0.5

# 指定测试次数
HOST: SunPma                      Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 9.31.63.130                4.0%   100    0.9   1.9   0.6  36.2   4.6
  2.|-- 9.31.122.222              17.0%   100    0.7   0.8   0.5   2.0   0.3
  3.|-- 10.196.18.29               0.0%   100    0.8   0.9   0.6  14.4   1.4
  4.|-- 10.196.92.113              0.0%   100    1.7   1.1   0.7  10.1   1.2
  5.|-- 10.196.93.230              0.0%   100    1.0   1.0   0.7   7.3   0.7
  6.|-- 58.254.152.113            28.0%   100    0.6   0.6   0.6   0.7   0.0
  7.|-- 120.80.137.33              0.0%   100    2.8   7.4   1.2 101.6  17.8
  8.|-- 221.4.0.225               21.0%   100   15.6  10.2   2.3  36.7   7.1
  9.|-- 219.158.114.114            1.0%   100   26.3  28.2  26.1  56.8   5.9
 10.|-- 221.5.239.62               0.0%   100   29.2  29.5  28.9  68.1   3.9
 11.|-- 221.5.253.138              0.0%   100   41.3  42.7  32.4 281.6  38.4
 12.|-- cache2.cqnetcom.com.cn     0.0%   100   26.8  27.1  26.6  28.2   0.4


Windows 系统可以使用下面的工具进行MTR测试;
下载地址:https://sunpma.lanzouw.com/iEBfvvdag7c

目标IP

目标IP可以使用国内三大服务商提供的DNS地址:https://sunpma.com/766.html

服务商及地区BestTraceMTRMTR-100
广东电信./besttrace 202.96.128.86mtr 202.96.128.86mtr -c 100 --report 202.96.128.86
广东联通./besttrace 210.21.196.6mtr 210.21.196.6mtr -c 100 --report 210.21.196.6
广东移动./besttrace 211.136.192.6mtr 211.136.192.6mtr -c 100 --report 211.136.192.6
重庆电信./besttrace 61.128.192.68mtr 61.128.192.68mtr -c 100 --report 61.128.192.68
重庆联通./besttrace 221.5.203.98mtr 221.5.203.98mtr -c 100 --report 221.5.203.98
重庆移动./besttrace 218.201.4.3mtr 218.201.4.3mtr -c 100 --report 218.201.4.3
山东电信./besttrace 219.150.32.132mtr 219.150.32.132mtr -c 100 --report 219.150.32.132
山东联通./besttrace 202.102.128.68mtr 202.102.128.68mtr -c 100 --report 202.102.128.68
山东移动./besttrace 218.201.96.130mtr 218.201.96.130mtr -c 100 --report 218.201.96.130

发表评论