Using multiple IP addresses

Overview

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

This feature is only supported for Linux VMs.

Migrate for Compute Engine supports IP address ranges of up to 32 addresses or up to 27 CIDR ranges. Google Cloud 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 Migrate for Compute Engine 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.
    Migrate for Compute Engine 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)
本頁內容對您是否有任何幫助?請提供意見:

傳送您對下列選項的寶貴意見...

這個網頁
Migrate for Compute Engine (formerly Velostrata)