我试图弄清楚为什么我无法从外部 IP ping 我家里的机器(或路由器),如果我能
ping 93.185.29.240
100%的包裹都丢失了。我还做了:
traceroute 93.185.29.240
并得到:
1 router1-lon.linode.com (212.111.33.229) 2.705 ms 2.427 ms 2.236 ms
2 109.74.207.10 (109.74.207.10) 2.110 ms 109.74.207.22 (109.74.207.22) 0.604 ms 109.74.207.16 (109.74.207.16) 1.933 ms
3 ldn-b4-link.telia.net (62.115.41.64) 3.372 ms ix-ae-13-0.tcore2.ldn-london.as6453.net (80.231.62.149) 1.741 ms 1.617 m s
4 ldn-bb3-link.telia.net (62.115.134.134) 1.553 ms ldn-bb4-link.telia.net (62.115.134.138) 1.356 ms ldn-bb3-link.telia.ne t (62.115.134.134) 4.981 ms
5 if-ae-17-2.tcore1.l78-london.as6453.net (80.231.130.129) 29.554 ms prs-bb4-link.telia.net (62.115.114.229) 29.370 ms if -ae-17-2.tcore1.l78-london.as6453.net (80.231.130.129) 29.346 ms
6 ffm-bb4-link.telia.net (62.115.114.99) 29.265 ms ffm-bb3-link.telia.net (62.115.123.12) 20.259 ms if-ae-3-2.tcore1.pye- paris.as6453.net (80.231.154.142) 15.222 ms
7 if-ae-11-2.tcore1.pvu-paris.as6453.net (80.231.153.49) 19.913 ms 19.870 ms 19.795 ms
8 rostelecom-ic-319651-ffm-b1.c.telia.net (62.115.151.97) 73.235 ms 73.180 ms 73.101 ms
9 87.226.183.57 (87.226.183.57) 78.962 ms 87.226.181.75 (87.226.181.75) 78.930 ms 195.219.36.34 (195.219.36.34) 61.343 m s
10 * * 87.226.183.57 (87.226.183.57) 83.506 ms
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
位置 8 处有“rostelecom . . .”,这是我的互联网提供商(可能 87.226.183.57 也是提供商服务器),但我在 traceroute 输出中没有看到我的家庭 IP 地址 93.185.29.240。这是什么意思?
我是否应该在路由器设置中启用“ping”?或者数据包根本无法到达路由器?
编辑1:
我还将路由器上的端口 22 转发到 IP 为 192.168.0.103 的本地主机,但是
telnet 93.185.29.240 22
无法连接。
编辑2:
我可以从本地网络 ping 我的路由器:
ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=2.74 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=3.33 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=2.14 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=2.77 ms
在路由器上打开“忽略 ping”选项可防止本地 ping 工作。
编辑3
traceroute 8.8.8.8
在我的本地机器上输出如下:
1 _gateway (192.168.0.1) 3.863 ms 3.888 ms 3.882 ms
2 100.83.176.1 (100.83.176.1) 11.444 ms 25.150 ms 25.156 ms
3 * * *
4 188.254.2.2 (188.254.2.2) 20.788 ms 20.769 ms 20.770 ms
5 92.50.229.138 (92.50.229.138) 25.105 ms 72.14.223.226 (72.14.223.226) 20.758 ms 18.730 ms
6 216.239.42.53 (216.239.42.53) 25.082 ms 74.125.244.132 (74.125.244.132) 22.785 ms 74.125.244.133 (74.125.244.133) 19.806 ms
7 209.85.246.61 (209.85.246.61) 29.313 ms 216.239.42.53 (216.239.42.53) 26.783 ms 108.170.235.240 (108.170.235.240) 29.758 ms
8 209.85.249.173 (209.85.249.173) 33.175 ms 72.14.234.107 (72.14.234.107) 34.899 ms 74.125.253.109 (74.125.253.109) 24.828 ms
9 172.253.66.108 (172.253.66.108) 32.934 ms 209.85.254.174 (209.85.254.174) 38.215 ms 172.253.51.221 (172.253.51.221) 24.784 ms
10 * * *
11 * * 216.239.63.65 (216.239.63.65) 38.783 ms
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * google-public-dns-a.google.com (8.8.8.8) 24.026 ms 21.591 ms
答案1
提供商将我的 IP 设为静态(顺便说一下,还更改了其他内容,但我不知道是什么),ping 和传入连接开始工作。所以我可以肯定地说,问题不是出在路由器上,而是出在提供商上。