About migrating to Google Cloud with Hybrid Subnets (original) (raw)

This page describes how you can use hybrid subnet routing to help migrate workloads to Google Cloud.

Hybrid subnet routing lets a VPC network share a CIDR block with a connected on-premises network. If a packet matches a hybrid subnet route, but the destination IP address isn't associated with a resource in that subnet, Google Cloud can route the packet to the on-premises network by using dynamic or static routes.

This configuration helps you migrate workloads to Google Cloud incrementally without needing to change their IP addresses. During migration, workloads that have migrated to your VPC network can communicate with those remaining in the on-premises network by using internal IP addresses. After all workloads have migrated, you can disable hybrid subnet routing to restore normal routing behavior.

Migrating to Google Cloud with Hybrid Subnets requires three distinct components that function together:

A three-stage diagram illustrates migrating workloads from   on-premises to Google Cloud by using Hybrid Subnets.

Figure 1. During migration, hybrid subnet routing lets workloads in an on-premises network communicate with workloads in a connected VPC network by using internal IP addresses, even though subnets in both networks use the same CIDR block (click to enlarge).

Specifications

To configure Hybrid Subnets to support migrating workloads to Google Cloud from an on-premises network, your environment must meet the following requirements.

A Cloud Router and an on-premises router handle routing   across a CIDR block that is shared between on-premises and VPC networks.

Figure 2. This diagram summarizes how to configure a VPC network and an on-premises network to maintain internal connectivity across a shared CIDR block (click to enlarge).

Hybrid subnet routing

When you've completed the configuration described in the Hybrid Subnets specifications, VMs in both networks can communicate by using internal IP addresses.

The following sections describe routing behavior in the VPC network that contains a subnet with hybrid subnet routing enabled and in an on-premises network once this configuration is in place.

Routing in the VPC network

During the subnet routes matching step of the VPC routing model, if a packet's destination matches a local or peering subnet route, Google Cloud attempts to deliver the packet using the matching subnet route. In a regular subnet, if the destination isn't associated with a running VM or internal forwarding rule, the packet is dropped, and all other routes are disregarded.

However, if hybrid subnet routing is enabled for the subnet, the subnet route becomes a hybrid subnet route, and the routing behavior is different:

In a subnet with hybrid subnet routing enabled, packet A is routed locally, and packet B is   routed to an on-premises destination.

Figure 3. In a subnet that uses hybrid subnet routing, if a packet's destination matches a resource in the subnet, Google Cloud routes the traffic to that resource; for unmatched resources, Google Cloud uses the unmatched resources in hybrid subnets process (click to enlarge).

For example, in figure 3, packet A is routed to a VM in the local subnet by using a local hybrid subnet route. Packet B's destination isn't associated with a running VM or internal forwarding rule in the subnet that uses hybrid subnet routing, so Google Cloud checks for dynamic or static routes that fit within the destination range of the hybrid subnet route. A match is found, and Google Cloud uses the dynamic route to deliver Packet B to the on-premises network.

Routing in the on-premises network

This section describes routing behavior in an on-premises network. In this example, the on-premises network is connected to a VPC network by using Cloud VPN tunnels.

When a client VM in the on-premises network sends a packet to a server VM that is within the CIDR block that is shared by the two networks, the on-premises network's router or first-hop device performs a routing table lookup:

An on-premises router uses proxy ARP to route a packet from a   workload in an on-premises network to a VM that has migrated to Google Cloud.

Figure 4. An on-premises router uses proxy ARP to route a packet from a workload in the on-premises network to a VM that has migrated to Google Cloud (click to enlarge).

Limitations

Hybrid Subnets has the following limitations.

Also keep the following practical limitations in mind.

Migration options

Google recommends using Migrate to Virtual Machines with Hybrid Subnets to automate the process of migrating VMs from a VMware sourceor from a Google Cloud VMware Engine source.

Alternatively, you can use third-party migration tools with Hybrid Subnets, as long as the requirements of Hybrid Subnets that are described in this document are fulfilled.

For information about planning a migration with Migrate to Virtual Machines, see Migration journey with Migrate to VMs.

For more information about migration options, seeMigration resources.

For support with planning a migration to Google Cloud by using Hybrid Subnets, file a support case.

Considerations for using Hybrid Subnets

The following sections describe considerations for using Hybrid Subnets to migrate workloads to Google Cloud.

Proxy ARP and Hybrid Subnets

Hybrid Subnets requiresproxy ARP to be configured on the on-premises network's router or first-hop device (the point where a host first sends traffic that has a destination outside of its local network).

The first-hop device can be a router, virtual appliance, firewall, or a VM running a software solution such aschoparp.

We recommend the following for using proxy ARP in your on-premises network:

Regionality limitation

This limitation applies when traffic matches a hybrid subnet route but the destination IP address isn't associated with a running VM or internal forwarding rule. During theunmatched resources in hybrid subnetsstep of Google Cloud's route selection model, routes are evaluated as if a packet's source is in the same VPC network as the hybrid subnet route.

If a static or dynamic route with a destination range that fits within a hybrid subnet route has next hops in a different region:

Make sure that the following resources are located in the same region:

For example, suppose there is a subnet with the IP address range192.0.2.0/24 that has hybrid subnet routing enabled. The subnet is in the region us-central1. The Cloud Router has learned two routes with destination ranges that fit within the hybrid subnet route:

A packet is sent to destination 192.0.2.2. This IP address isn't associated with a running VM or internal forwarding rule in the local subnet, so the route selection model selects the custom route that has the most specific destination, which is 192.0.2.0/30. This route doesn't have a next hop in the subnet's region, so the packet is dropped.

For more information, seeunmatched resources in hybrid subnets.

VPC Network Peering

You can connect a VPC network containing a subnet that uses hybrid subnet routing to a peer VPC network by usingVPC Network Peering.

Traffic from clients in a peered network can reach destinations within the shared CIDR block, regardless of whether the destinations are Google Cloud resources or in the on-premises network. If a packet from a client in the peered network has a destination that matches a peering hybrid subnet route, and the destination doesn't match a running VM or internal forwarding rule, the packet can be routed by using a static or dynamic route in the peered VPC network.

Routing using a static or dynamic route in the peered VPC network doesn't depend on exchanging custom routes with the VPC network that contains the client. However, the following are still relevant:

Network performance

Hybrid Subnets uses Layer 3 of the OSI model to route packets between the on-premises and VPC networks. This approach helps Hybrid Subnets avoid challenges with latency, jitter, and throughput that can happen during migrations when some workloads exist on an on-premises network but other workloads have migrated to the cloud.

In particular, avoiding Layer 2 tunneling helps prevent the performance degradation that's associated with the encapsulation and encryption of an additional Layer 2 overlay. Additionally, Layer 3 routing lets Hybrid Subnets avoid a common issue with Layer 2 tunneling, where traffic is sent to a central node before reaching destinations that can be close to the traffic's point of origin. This issue is sometimes called network tromboning.

Because Hybrid Subnets uses this routing approach, you can expect performance that's similar to, or the same as, a network that doesn't use Hybrid Subnets.

Firewalls and Hybrid Subnets

Hybrid Subnets avoids challenges related to using firewalls with traffic that's encapsulated in Layer 2 overlays. For Layer 2 traffic, firewalls can only inspect packets at or beyond the overlay endpoints, unless you take specific measures such as transparent decryption or deep inspections of overlay traffic.

No special considerations are needed to use existing firewalls and firewall rules with Hybrid Subnets. However, you need to Configure firewall rulesto ensure that Google Cloud VMs can communicate with workloads in the on-premises network.

Pricing

For information about pricing for Hybrid Subnets, seeVirtual Private Cloud pricing.

What's next