简体   繁体   English

Google Cloud-向VM添加其他内部IP

[英]Google Cloud - Adding additional Internal IP to VM

I'm trying to build a webserver in Google Cloud Platform that hosts multiple websites (GBP, IE, FR, DK etc.) 我正在尝试在托管多个网站(GBP,IE,FR,DK等)的Google Cloud Platform中构建Web服务器。

Generally, we assign a range of IPs to the server statically, set the bindings in IIS, then loadbalance using a virtual IP. 通常,我们为服务器静态分配一定范围的IP,在IIS中设置绑定,然后使用虚拟IP进行负载平衡。

It seems near enough impossible to assign another internal IP in GCP. 在GCP中分配另一个内部IP似乎几乎是不可能的。 Lots of guides about additional external IPs, but we don't want a public facing webserver like this. 关于其他外部IP的大量指南,但我们不希望这样的面向公众的Web服务器。

Anybody have any idea on how to add additional internal IPs to a VM / Instance? 有人对如何向VM /实例添加其他内部IP有任何想法吗?

Also, I have tried changing the internal address I have assigned to the Instance to static in network adapter settings, next thing I know I can't access my VM for love nor money, had to delete and re-create. 另外,我尝试在网络适配器设置中将分配给实例的内部地址更改为静态,接下来我知道我无法出于爱或金钱目的访问我的VM,不得不删除并重新创建。 If I go into advanced settings to add additional static IPs, w'ere set to DHCP apparently, so can't add additional IPs. 如果我进入高级设置以添加其他静态IP,则显然将其设置为DHCP,因此无法添加其他IP。

Thanks all. 谢谢大家

Answer that I recieved from GCE discussion group, in Google Groups: 我从Google网上论坛的GCE讨论组收到的答案:

"You can add additional internal IP addresses to a VM instance. This is possible by enabling IP forwarding for the VM, creating a static network route, adding appropriate firewall rules, and setting additional internal IP addresses to network adapter of Windows. These steps are described in this article for Linux machines ( https://cloud.google.com/compute/docs/networking#set_a_static_target_ip_address ). The same steps are valid for Windows VMs. You will need to keep the initial internal IP address, subnet mask, gateway address and DNS settings of the adapter and manually enter them in properties of IPv4 of the network adapter. The below is a screenshot of my configuration on a VM instance (Windows 2008 R2) that perfectly works." “您可以向VM实例添加其他内部IP地址。这可以通过为VM启用IP转发,创建静态网络路由,添加适当的防火墙规则以及为Windows的网络适配器设置其他内部IP地址来实现。这些步骤是本文针对Linux机器( https://cloud.google.com/compute/docs/networking#set_a_static_target_ip_address )进行了说明。这些步骤对Windows VM有效。您需要保留初始内部IP地址,子网掩码,适配器的网关地址和DNS设置,然后在网络适配器的IPv4属性中手动输入它们。以下是我在虚拟机实例(Windows 2008 R2)上运行良好的配置的屏幕截图。”

Update: 更新:

Now, you can create instances with multiple network interfaces On Google Compute Engine and assign IPs. 现在,您可以在Google Compute Engine上创建具有多个网络接口的实例并分配IP。 For more information, refer to this public documentation link . 有关更多信息,请参考此公共文档链接 However, currently it has following limitations: 但是,目前有以下限制:

  • Alias IP ranges are not supported on any network interface on a VM that has multiple network interfaces enabled. 启用了多个网络接口的VM上的任何网络接口均不支持别名IP范围。
  • You cannot modify or delete the network interfaces after the VM has been created. 创建虚拟机后,不能修改或删除网络接口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google Cloud VM的其他静态IP地址 - Additional Static IP Address For Google Cloud VM Google Cloud VM其他IP地址相同的子网 - Google Cloud VM additional IP adress same subnet Google Cloud Endpoints定位到VM实例(计算引擎)的内部IP? - Google Cloud Endpoints target to Internal IP of VM Instance (Compute Engine)? Google Cloud Run 内部 DNS/IP 用于与同一区域 VM 进行通信 - Google Cloud Run Internal DNS/IP for communication with same region VM 将第二个内部/私有IP地址添加到google cloud vm实例 - Add 2nd internal/private ip address to google cloud vm instance 为什么VM无法使用VPC网络,static内部IP,连接到谷歌云平台ZC6E195553E6C7AC8592C389ACB9878A050AZ中的SSH? - Why can't VM with VPC networks, static internal IP, connect to SSH in Google Cloud Platform Web Console? 通过内部IP地址从Google Cloud Function访问VM实例 - Access VM instance from Google Cloud Function via internal ip address Google Cloud Platform联网:即使未运行,也将VM主机名解析为其分配的内部IP? - Google Cloud Platform networking: Resolve VM hostname to its assigned internal IP even when not running? 从GKE中的K8S pod连接到Google Cloud Platform上的VM内部IP - Connecting from K8S pod in GKE to a VM internal IP on Google Cloud Platform 从 Google Cloud 内部 IP 调用 Google Cloud Buckets - Calling Google Cloud Buckets from Google Cloud internal IP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM