
measurementlab/traceroute-callertraceroute-caller是Measurement Lab (M-Lab) 开发的网络测量工具,用于处理和分析traceroute数据。它能够与measurementlab/tcpinfo事件和measurementlab/uuid-annotator注释服务协同工作,提供本地开发环境,并包含trex命令行工具,用于解析和分析scamper生成的MDA traceroute数据(JSONL格式)。
tcpinfo和uuid-annotator服务,构建完整的本地测试环境./testdata)快速启动和验证功能验证docker-compose版本:
shdocker-compose version
预期输出示例:
docker-compose version 1.27.4, build 40524192 docker-py version: 4.3.1 CPython version: 3.7.7 OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020
克隆仓库并进入根目录:
shgit clone [***] cd traceroute-caller
使用docker-compose启动服务:
shdocker-compose up
此命令将创建并运行三个容器(前缀为当前目录名,通常为traceroute-caller)。
触发网络连接以生成测试数据:
shdocker exec -it traceroute-caller_traceroute-caller_1 apt-get update
查看生成的结果文件:
shls -lR ./local
停止并重启环境:
shdocker-compose down docker-compose up
获取traceroute数据样本(示例使用M-Lab归档数据):
shmkdir ~/traceroutes cd ~/traceroutes gsutil cp gs://archive-measurement-lab/ndt/scamper1/2021/10/01/20211001T003000.005106Z-scamper1-mlab1-lis02-ndt.tgz . tar xzf 20211001T003000.005106Z-scamper1-mlab1-lis02-ndt.tgz
构建trex工具:
shgit clone [***] cd traceroute-caller/cmd/trex go build
查看帮助信息:
sh./trex -h
输出:
Usage: ./trex [-cehv] [-d <seconds>] path [path...] path a pathname to a file or directory (if directory, all files are processed recursively) -h print usage message and exit -c print flow IDs and file names of traceroutes that completed ("--" for incomplete traceroutes) -d print times and file names of traceroutes that took more than the specified duration -e print examples how to use this tool and exit -v enable verbose mode (mostly for debugging)
提取单路径traceroute:
sh./trex /traceroutes/2022/04/01/20220401T001905Z_ndt-qqvlt_***_000000000009379D.jsonl
输出示例:
file: /traceroutes/2022/04/01/20220401T001905Z_ndt-qqvlt_***_000000000009379D.jsonl src: 209.170.110.216 dst: 199.19.248.6 scamper start: *** tracelb start: *** (0 seconds after scamper start) scamper stop: *** (1 seconds after scamper start) flowid: 1 TTL TX(ms) RX(ms) RTT(ms) IP address 1 N/A N/A 0.000 209.170.110.193 2 150 151 0.653 213.248.100.57 3 1055 1062 7.244 199.19.248.6 <=== destination
启用verbose模式:
sh./trex -v /traceroutes/2022/04/01/20220401T001905Z_ndt-qqvlt_***_000000000009379D.jsonl
输出将包含所有flow ID的详细路径信息。
筛选长时traceroute(超过300秒):
sh./trex -d 300 /traceroutes/2021
输出示例:
428 /traceroutes/2021/10/01/20211001T000053Z_ndt-292jb_***_00000000000516D4.jsonl 386 /traceroutes/2021/10/01/20211001T000151Z_ndt-292jb_***_000000000005160D.jsonl ... files found: 425 files skipped (not .jsonl): 0 files that could not be read: 0 files that could not be parsed: 0 files successfully parsed: 425 files with no traceroute data: 0 minimum duration: 4 seconds maximum duration: 456 seconds average duration: 220 seconds
检查traceroute完整性:
sh./trex -c /traceroutes/2021
输出示例:
1 /traceroutes/2021/10/01/20211001T000014Z_ndt-292jb_***_00000000000516C8.jsonl 1 /traceroutes/2021/10/01/20211001T000015Z_ndt-292jb_***_00000000000516C9.jsonl -- /traceroutes/2021/10/01/20211001T000023Z_ndt-292jb_***_00000000000516C4.jsonl ... files found: 425 files skipped (not .jsonl): 0 files that could not be read: 0 files that could not be parsed: 0 files successfully parsed: 425 files with no traceroute data: 0 files with complete traceroutes: 149 (35%)




manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务