You're viewing documentation for a prior version of Migrate for Compute Engine (formerly Velostrata). You can continue using this version, or use the current version.

Using multiple IP addresses

Overview

If an on-premises VM uses multiple IPs, you can replicate the configuration in by adding an additional GCP Alias IP Range per instance. If you enable multiple IP support, Velostrata adds all of the IPs in the Alias IP range to the instance's NIC in GCP during VM migration.

This feature is only supported for Linux VMs.

Velostrata supports IP address ranges of up to 32 addresses or up to 27 CIDR ranges. GCP only supports an IP address range consisting of a single CIDR mask chosen from the following list:

  • 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

The CIDR range must belong to that subnet's range. The range you choose cannot already be in use, even in part, by any other resource on the Virtual Private Cloud network. For more information, see the Alias IP documentation.

Enabling multiple IP support

To enable multiple IP support, set the apply-alias-ip-ranges key to true on either the project or instance metadata. Note that changes to the instance metadata take priority over changes to the project metadata.

After you enable multiple IP support and restart the VM, the Velostrata package on the instance configures multiple IP addresses allocated in the Alias IP range.

After enabling support, you must also configure additional alias IPs at the instance or project level.

  1. Go to the VM instances page in the Google Cloud Platform Console.
  2. Select your instance.
  3. On 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 part of the primary range.
  8. If you would like to add additional IP ranges for this VM, click the + Add IP range button.
  9. Click Done.
  10. Click Save.
  11. Click Reset on the top bar of the console to restart the VM.
    Screenshot of Alias IP Range (click to enlarge)
    Screenshot of Alias IP Range (click to enlarge)

Option 2: Modifying project metadata

  1. In the Google Cloud Platform Console, select your project and select the Metadata screen.
  2. Set the apply-alias-ip-ranges key to true.
    Velostrata configures the guest VM to accept connections on multiple IP addresses. As with the single-instance option, the IP addresses or ranges are set on the instance's metadata.
    Screenshot of setting project metadata (click to enlarge)
    Screenshot of setting project metadata (click to enlarge)
Was this page helpful? Let us know how we did:

Send feedback about...

Migrate for Compute Engine (formerly Velostrata)