使用BestTrace追蹤路由
Windows
BestTrace 是 ipip.net 開發的使用很廣泛的路由追蹤工具,可以用於查看線路走向,方便判斷 VPS 路線情況,以圖形化的形式在地圖上顯示經過的路徑。
Windows下的使用就不用多說了都是圖形界面化的,輸入IP或者域名就可以進行追蹤
在本地追蹤路徑的缺點就是只能看到去程走向,然而去程走向其實參考價值是比較低的,雖然軟件對於有的線路也會顯示預測的回程線路,但准確性也不高。所以實際就需要從 VPS 那邊的服務器端來發起路徑追蹤,才能准確的了解服務器的真實線路情況。
Linux
Linux 版的 BestTrace 程序因為是使用 GO 語言寫的,所以使用起來是十分的簡單,SSH 登陸 VPS,直接下載並解壓即可:
# yum install -y wget unzip
# wget https://cdn.ipip.net/17mon/besttrace4linux.zip
# unzip besttrace4linux.zip
# chmod +x besttrace
# chmod +x besttrace32
# ./besttrace -q 1 目標 IP
例如一台Google的HongKong -VPS追蹤臨沂的一個IP地址
程序全部命令可以使用./besttrace -help
命令查看:
[root@hongkong ]# ./besttrace -help
Usage of ./besttrace:
-6, --ipv6
Use ipv6.
-J, --json
Print traceroute result with JSON format.
-g, --lang string
Language only supported cn and en now.
-m, --maxhop int
Specifies the maximum number of hops (max time-to-live value) traceroute will probe. The default is 30. (default 30)
-a, --noas
Do not try to map IP addresses to AS when displaying them.
-n, --nodomain
Do not try to map IP addresses to host names when displaying them.
-l, --nolocation
Do not try to map IP addresses to location when displaying them.
-q, --queries int
Sets the number of probe packets per hop. The default is 3. (default 3)
-z, --sendtime int
Minimal time interval between probes (default 0).
If the value is more than 10, then it specifies a number in milliseconds, else it is a number of seconds (float point values allowed too).
Useful when some routers use rate-limit for ICMP messages.
-f, --starthop int
Specifies with what TTL to start. Defaults to 1. (default 1)
--sync
Send icmp package by sync.
-T, --tcp
Use TCP SYN for probes.
-V, --version
Print the version and exit.
-w, --waittime int
Set the time (in seconds) to wait for a response to a probe. (default 3)
Linux 版本 BestTrace 雖然沒有 Windows 下的圖形界面,但對於查看回程路線也是足夠了,IP 庫也基本挺新,除了部分內網 IP 基本都能正確識別。
辨別CN2
路由中有 ip 開頭為 59.43.,AS4809,首先即判斷有一段為 CN2 網絡。CN2 上承載了兩個較為常見的套餐,那怎么判斷是哪一種呢,我們來分析幾種特殊情況。 CN2 GT 的省級出口為 202.97 節點(163骨干網節點),在跨境時才進入 CN2 骨干網,國際跨境節點為 59.43 開頭。即使處在 CN2 節點城市,如上海,也會先走 202.97 節點。以此類推其他城市,不再列出。可見目前所有的 CN2 GT 路由都會有 202.97 開頭的 ip
根據中國電信國際有限公司官網數據提供的 2018 年 5,6,7 月三個月的 CN2 質量平均情況(未知端點城市,看着像上海,也可能是幾個城市平均下來的數據),理論上可看作為最佳情況下,常見 CN2 節點城市與中國連接延遲排序(ms)
香港 | 首爾 | 東京 | 新加坡 | 莫斯科 | 聖何塞 | 洛杉磯 | 法蘭克福 |西雅圖
28.27 | 60.37 | 67.32 | 67.65 | 134.78 | 166.44 | 175.62 | 180.65 | 185.47