Multiple IP Support in GCP Cloud

In order to preserve multi-IP configuration when migrating to GCP, you can configure an additional Alias IP Range per instance in GCP. Velostrata adds all the IPs in the range to the instance NIC.

This feature is only supported after the VM is detached.

Velostrata supports ranges of up to 32 addresses/27 CIDR. GCP currently only supports a single CIDR mask, enabling you to specify one of the following:

  • x.x.x.x/32 - single IP address
  • x.x.x.x/31 - 2 addresses
  • x.x.x.x/30 - 4 addresses
  • x.x.x.x/29 - 8 addresses
  • x.x.x.x/28 - 16 addresses
  • x.x.x.x/27 - 32 addresses

Note: This only applies to Linux machines.

You can either specify up to 32 IP addresses or specify just a CIDR mask up to /27 (32 IP address) to have a range of IPs assigned automatically. The range must belong to the specified subnet's range. The range you choose must not already be in use, even in part, by any other resource on the VPC network.

  1. To enable multiple IP support, set one of the following:
    • In the project metadata, set the apply-alias-ip-ranges key to true, or
    • In the instance metadata  set the apply-alias-ip-ranges key to true.

Note: The instance metadata has priority over the project metadata.

  1. Go to the VM instance page in the Google Cloud Platform Console. 
  2. Select the required instance.
  3. In the VM instance details  page, click Edit.
  4. Scroll down to the Network interfaces section.
  5. Click Show alias IP ranges.
  6. Enter a Subnet range.
  7. Enter an Alias IP range in CIDR notation. This range must be an unused subrange of the primary range.
  1. Click Done.