Jack McCauley
Jack McCauley

Reputation: 45

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.)

Generally, we assign a range of IPs to the server statically, set the bindings in IIS, then loadbalance using a virtual IP.

It seems near enough impossible to assign another internal IP in GCP. Lots of guides about additional external IPs, but we don't want a public facing webserver like this.

Anybody have any idea on how to add additional internal IPs to a VM / Instance?

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. If I go into advanced settings to add additional static IPs, w'ere set to DHCP apparently, so can't add additional IPs.

Thanks all.

Upvotes: 0

Views: 3676

Answers (2)

N Singh
N Singh

Reputation: 327

Update:

Now, you can create instances with multiple network interfaces On Google Compute Engine and assign IPs. 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.
  • You cannot modify or delete the network interfaces after the VM has been created.

Upvotes: 0

Jack McCauley
Jack McCauley

Reputation: 45

Answer that I recieved from GCE discussion group, in Google Groups:

"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."

Upvotes: 1

Related Questions