首页 文章

NAT计算引擎实例的简便方法

提问于
浏览
4

我假设对NAT的支持已经可用于计算引擎中的路由和网络?寻找一些易于阅读的文档和命令来设置一个实例充当路由器而其他实例可以使用它来访问公共互联网的情况 . 我正在寻找的另一个场景是如何使没有外部IP地址的实例能够访问互联网 . 有一种gcutil友好的方式来编写这个吗?

1 回答

  • 2

    听起来你正在寻找Routes Collection . 对于第一种情况,示例应该通过为内部节点设置路由以将网关用作其流量的"next hop"来向您展示一个实例如何充当其他实例的网关 .

    对于您的第二个场景,列出caveat "Currently, any packets sent to the Internet must be sent by an instance that has an external IP address. If you create a route that sends packets to the Internet from a particular instance, that instance must also have an external IP. If you create a route that sends packets to the Internet gateway, but the source instance doesn't have an external IP address, the packet will be dropped."

相关问题