【问题标题】:Google Compute Engine instances cannot ping each other on internal addressesGoogle Compute Engine 实例无法在内部地址上相互 ping 通
【发布时间】:2017-04-17 13:14:36
【问题描述】:

我有几个在 Google Compute 引擎中运行的实例:

NAME       ZONE       MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP      STATUS
inst-dns2  xx-xxxx-x  f1-micro                    10.240.0.4   x.x.x.x          RUNNING
inst-st0   xx-xxxx-x  f1-micro                    10.240.0.2   x.x.x.x          RUNNING
inst-www0  xx-xxxx-x  n1-standard-2               10.240.0.3   x.x.x.x          RUNNING
inst-dns3  xx-xxxx-x  f1-micro                    10.240.0.5   x.x.x.x          RUNNING

如您所见,它们的 IP 都在同一个子网中。我从开始就一直使用内置的default网络。

NAME     MODE    IPV4_RANGE     GATEWAY_IPV4
default  legacy  10.240.0.0/16  10.240.0.1

我还有default-allow-internal 防火墙规则:

NAME                    NETWORK  SRC_RANGES     RULES                         SRC_TAGS  TARGET_TAGS
default-allow-internal  default  10.240.0.0/16  tcp:1-65535,udp:1-65535,icmp

然而,我的所有实例都不能互相 ping 通。

The docs 状态,“在默认网络中,默认情况下,由于上述默认防火墙规则,网络中的所有虚拟机实例都可以相互通信。”

所以,我很困惑。我认为我可以做到这一点,而无需创建自定义网络等等。

任何意见将不胜感激。

【问题讨论】:

  • 如果停止并重新启动这些实例会怎样?
  • 这并没有改变行为。

标签: google-compute-engine


【解决方案1】:

我通过使用官方 FreeBSD 实例映像而不是我自己的预构建映像解决了这个问题。注意:官方图像有自己的问题,例如问题系统日期/时间。在投入生产之前进行研究和测试。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-06
    • 1970-01-01
    • 2013-09-29
    • 2016-09-09
    相关资源
    最近更新 更多