Traceroute 用于检查我的笔记本电脑和 google.com 之间的跳数

Traceroute 用于检查我的笔记本电脑和 google.com 之间的跳数

我是 Linux 新手,正在尝试在 ubuntu 终端中学习 traceroute 命令。我在终端中输入 ping 命令到 google.com,结果是:

vscoder@vscoder-VirtualBox:~$ ping google.com
PING google.com (142.250.194.142) 56(84) bytes of data.
64 bytes from del12s05-in-f14.1e100.net (142.250.194.142): icmp_seq=1 ttl=115 time=10.8 ms
64 bytes from del12s05-in-f14.1e100.net (142.250.194.142): icmp_seq=2 ttl=115 time=12.2 ms
64 bytes from del12s05-in-f14.1e100.net (142.250.194.142): icmp_seq=3 ttl=115 time=12.9 ms
64 bytes from del12s05-in-f14.1e100.net (142.250.194.142): icmp_seq=4 ttl=115 time=11.4 ms
64 bytes from del12s05-in-f14.1e100.net (142.250.194.142): icmp_seq=5 ttl=115 time=12.2 ms
64 bytes from del12s05-in-f14.1e100.net (142.250.194.142): icmp_seq=6 ttl=115 time=11.6 ms
64 bytes from del12s05-in-f14.1e100.net (142.250.194.142): icmp_seq=7 ttl=115 time=11.9 ms
^C
--- google.com ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6009ms
rtt min/avg/max/mdev = 10.800/11.862/12.926/0.631 ms
vscoder@vscoder-VirtualBox:~$  

但是当我跟踪路由到 google.com 时,它显示以下输出:

vscoder@vscoder-VirtualBox:~$ traceroute google.com
traceroute to google.com (142.250.194.142), 64 hops max
  1   10.0.2.2  0.284ms  0.299ms  0.270ms 
  2   *  *  * 
  3   *  *  * 
  4   *  *  * 
  5   *  *  * 
  6   *  *  * 
  7   *  *  * 
  8   *  *  * 
  9   *  *  * 
 10   *  *  * 
 11   *  *  * 
 12   *  *  * 
 13   *  * ^C
vscoder@vscoder-VirtualBox:~$ 

我不知道为什么它没有向我显示跃点的 IP 地址。请在这里帮助我。

答案1

我尝试了“traceroute -I google.com”并且它有效。

vscoder@vscoder-VirtualBox:~$ traceroute -I google.com
traceroute to google.com (142.250.193.206), 64 hops max
  1   10.0.2.2  0.421ms  0.212ms  0.192ms 
  2   192.168.1.1  1.871ms  4.654ms  1.739ms 
  3   117.212.40.1  13.236ms  10.626ms  9.502ms 
  4   117.212.40.1  10.222ms  11.393ms  8.989ms 
  5   218.248.107.38  31.941ms  21.067ms  18.296ms 
  6   117.216.207.203  15.960ms  15.869ms  * 
  7   142.250.160.182  16.680ms  16.075ms  17.754ms 
  8   172.253.68.7  18.031ms  17.957ms  18.856ms 
  9   142.251.54.97  18.216ms  16.466ms  17.305ms 
 10   142.250.193.206  18.071ms  15.997ms  16.900ms 
vscoder@vscoder-VirtualBox:~$

traceroute -I, --icmp:指定使用ICMP ECHO作为探针。

答案2

尝试lft(“第四层跟踪路由,执行 TCP 跟踪路由,如traceroute -T”)

例子:-

sudo lft google.com  
Tracing .........**T
TTL LFT trace to lhr25s26-in-f14.1e100.net (172.217.169.14):80/tcp
 1  router (192.168.1.1) 0.5ms
**  [neglected] no reply packets received from TTLs 2 through 3
 4  132.hiper04.sheff.dial.plus.net.uk (195.166.143.132) 5.7ms
 5  peer7-et-0-0-4.telehouse.ukcore.bt.net (109.159.252.156) 10.3ms
 6  109.159.253.185 6.3ms
 7  72.14.232.76 7.7ms
 8  209.85.241.95 7.1ms
 9  [target open] lhr25s26-in-f14.1e100.net (172.217.169.14):80 6.0ms

相关内容