本文目录导读:

我来介绍几种常用的路由追踪工具和方法。
traceroute (Linux/macOS)
最经典的路由追踪工具:
# 基本用法 traceroute google.com # 跳过DNS解析,显示IP地址 traceroute -n google.com # 设置最大跳数(默认30) traceroute -m 20 google.com
tracert (Windows)
Windows系统内置工具:
# 基本用法 tracert google.com # 不解析主机名 tracert -d google.com
pathping (Windows)
结合ping和traceroute的功能:
pathping google.com
mtr (Linux/macOS)
实时动态追踪,结合ping和traceroute:
# 安装(Ubuntu/Debian) sudo apt install mtr # 使用 mtr google.com # 非交互模式 mtr -r google.com # 报告模式,指定次数 mtr -r -c 10 google.com
在线工具
浏览器访问即可:
- WhatIsMyIP 的路径追踪
- YouGetSignal 的视觉化路由追踪
- ICANN Lookup 提供WHOIS和路径信息
图形化工具
- WinMTR(Windows):图形化mtr
- VisualRoute:地图显示路由路径
- PingPlotter:可视化延迟和丢包
实用参数说明
| 参数 | 作用 |
|---|---|
-n |
不解析主机名,只显示IP |
-w |
等待响应超时时间(秒) |
-m |
最大跳数限制 |
-q |
每跳发送探测包数量 |
解读结果示例
1 <1 ms <1 ms <1 ms 192.168.1.1
2 10 ms 12 ms 11 ms 10.0.0.1
3 * * * Request timed out.
4 35 ms 34 ms 36 ms 203.0.113.1
5 50 ms 48 ms 49 ms 8.8.8.8
- 星号(*):该跳无响应(可能防火墙阻止)
- 延迟时间:显示三个探测包的响应时间
- 跳数:从1开始递增
有什么具体场景需要追踪路由吗?我可以给你更针对性的建议。
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。