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.
- 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.
- Go to the VM instance page in the Google Cloud Platform Console.
- Select the required instance.
- In the VM instance details page, click Edit.
- Scroll down to the Network interfaces section.
- Click Show alias IP ranges.
- Enter a Subnet range.
- Enter an Alias IP range in CIDR notation. This range must be an unused subrange of the primary range.
- Click Done.