无法 ping 默认网关但有互联网连接

网络工程 路由 路由器 子网
2021-07-16 15:26:10

我使用 ssh 连接到我的 vlan 中的一个远程盒子(这个 openwrt 盒子与路由器级联)。

当我 ping 默认网关时,它不起作用:

route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.14.164.126   0.0.0.0         UG    0      0        0 eth0

平:

ping 10.14.164.126
PING 10.14.164.126 (10.14.164.126): 56 data bytes
^C
--- 10.14.164.126 ping statistics ---
11 packets transmitted, 0 packets received, 100% packet loss

同时traceroute使用的是默认网关,可以出去访问Internet:

traceroute google.com
traceroute to google.com (173.194.40.128), 30 hops max, 38 byte packets
 1  10.14.164.126 (10.14.164.126)  0.359 ms  0.706 ms  0.349 ms
 2  172.24.120.93 (172.24.120.93)  2.318 ms  2.809 ms  2.417 ms
..etc

我想知道为什么 ping 不起作用!

3个回答

您的默认网关是否配置为响应 ping?

如果您可以 ping 通 DG(例如到 google.com)但无法 ping 通,则路由没问题。

问候

您的默认网关配置为阻止包括 ping 在内的所有 ICMP 消息,但允许其他流量通过其外部接口。

是的,我同意在这种情况下使用 ICMP 消息块。