traceroute
ネットワーク
書き方
traceroute -n <host>目的地までに通る経路装置を一行ずつ並べます。途中に `* * *` が出ても道が切れたのではなく、その装置が答えないだけです。
よく使うオプション
| オプション | 意味 |
|---|---|
| -n | Skip reverse DNS, which makes it much faster. |
| -m 20 | Stop after twenty hops instead of the default thirty. |
| -q 1 | One probe per hop instead of three. |
| -w 1 | Wait one second per probe. |
| -I | Use ICMP echo instead of UDP; needs root. |
| -T -p 443 | Use TCP to a real port, which firewalls usually let through (Linux). |
例
traceroute -n 8.8.8.8The path packets take, without name lookups.
sudo traceroute -T -p 443 example.comTrace over TCP 443 when UDP probes are blocked (Linux).
つながらないとき、どこまで行けたのかを絞ります — 名前が引けないのか、経路がないのか、ポートが閉じているのか。
読み方
- 角括弧 [ ] は省いてよい部分です。
- 三点 … は複数並べられるという意味です。
- オプションは大文字小文字を区別します — -r と -R が別物のコマンドもあります。
よくある質問
Q. traceroute は何をしますか。
目的地までに通る経路装置を一行ずつ並べます。途中に `* * *` が出ても道が切れたのではなく、その装置が答えないだけです。
Q. どう打ちますか。
traceroute -n <host> — 角括弧は省いてよい部分です。
Q. よく使うオプションはいくつですか。
ここにまとめたのは6個です。全部は man traceroute にあります。このコマンドはネットワークの仲間です。
関連するコマンド
man ページ: man traceroute