Large-scale enterprise cloud migrations often stall due to complications with re-iping. It introduces risk, operational cost and extended testing cycles required when changing IP addresses hardcoded into legacy databases, scripts, firewalls, and internal services . By leveraging Google Cloud Hybrid Subnets alongside Migrate to Virtual Machines (M2VM), organizations can extend on-premises subnets into Google Cloud Virtual Private Cloud (VPC) networks at Layer 3, allowing workloads to migrate incrementally with zero changes to their IP addresses.
The Challenge: Why Enterprise Migrations Need Subnet Extension
In mature enterprise environments spanning hundreds or thousands of virtual machines, IP addresses are rarely just network identifiers; they are embedded across application codebases, security policies, and service registries .
-
Hardcoded Dependencies: Internal configuration files, API endpoints, and database connection strings frequently use raw IP addresses rather than DNS records .
-
Firewall Rule Proliferation: Decades of accumulated perimeter and internal security rules reference specific static IP lists .
-
High UAT Overhead: Changing an application’s IP requires extensive User Acceptance Testing (UAT) by business stakeholders to uncover undocumented dependencies .
Solution Architecture: Hybrid Subnets
Unlike legacy Layer 2 data center interconnects (such as VXLAN overlays or stretched VLANs), Google Cloud’s Hybrid Subnets operate natively at Layer 3. Hybrid subnets are enabled in Google Cloud by using the --allow-cidr-routes-overlap flag on the subnet configuration.
The way Hybrid Subnets work is by advertising subnets from on-prem routers to Cloud Routers using BGP. Subnets with overlapping CIDR ranges are not advertised back to on-premises, however, if workloads are migrated to the Cloud inside the Hybrid Subnet IP space, a more specific route (e.g. prefix /32) is advertised back on-prem.
A critical piece in the on-prem configuration is the Proxy ARP protocol, which is a configuration on a router to tell on-prem hosts that the migrated workload VM is found inside a different subnet and not inside the broadcast domain. This is necessary, since VMs inside the same subnet on-prem would expect to receive the MAC address of another VM using an ARP (Address Resolution Protocol) request. This request is intercepted by a router running Proxy-ARP and answers with its own MAC Address.
Key Architectural Takeaways
| Consideration | Recommendation | Impact | |
|---|---|---|---|
| Tooling Integration | Pair Hybrid Subnets with Migrate to Virtual Machines (M2VM) . | Automates continuous replication, non-disruptive test-clones, and fast cutovers . | |
| Routing Strategy | Deploy Layer 3 host routing with BGP /32 prefix injection . | Eliminates Layer 2 overlay complexity and encapsulation overhead (e.g. VMware HCX) | |
| On-Prem ARP Resolution | Configure Proxy ARP on the first-hop default gateway . | Allows on-premises hosts to transparently reach migrated VMs in Google Cloud on the same CIDR . |
Best Practices
-
Automate Dynamic /32 Route Injection with Event-Driven Serverless (Cloud Run Functions): Eliminate manual BGP configuration and human error during time-critical cutover windows. Deploy an event-driven architecture using Eventarc and Cloud Run Functions (or Cloud Functions) triggered by Cloud Audit Logs (compute.instances.insert or instance start events filtered by network/tags). When a migrated VM powers on in the hybrid subnet, the function automatically invokes the Google Cloud Compute API to inject the /32 custom BGP route advertisement on the Cloud Router. A corresponding shutdown/delete trigger can automatically withdraw the route during rollbacks.
-
Validate all relevant network patterns before migrating first workloads. Hybrid subnets may introduce more complicated network traffic patterns than using
Common Pitfalls and Mitigation Strategies
Cross-Region Connection Drops
Hybrid subnet routing requires next hops to be in the same region as the subnet (Regionality limitation). This is no particular issue if your on-prem environment has a connection to only a single region. However, it leads to connection issues if your on-prem environment is connected with Interconnects or HA-VPNs to several regions. Machines in hybrid subnets (on-prem) would not be able to reach workloads in other Google Cloud regions.
In the above setup, the on-prem environment has two interconnects to Google Cloud which terminate in two distinct regions. Notice in the diagram that the on-prem subnet has been made hybrid, meaning that there is a subnet in us-east4 with equal CIDR range on Google Cloud and with the --allow-cidr-routes-overlap flag. This means that if the on-prem VM from the Hybrid subnet connects to VMs in the region us-central1 the next hop on the return path would be in us-central1.
While Hybrid subnet has this limitation, there are a few solution options which require careful evaluation, since they impact the overall network topology and routing patterns.
-
Consider advertising the routes of subnets in other regions than the subnet over a single Interconnect which terminates in the region of the Hybrid Subnet.
-
Consider placing migrated VMs inside Hybrid Subnets into a dedicated VPC. Connect the VPCs with an HA VPN.
Cloud Router Announced Route Limits and Scalability
When migrating large enterprise environments consisting of hundreds or thousands of VMs, advertising individual /32 host routes for each migrated instance can quickly run into route scale limits. Cloud Router Advertised Route Quotas: Google Cloud Router enforces default limits on the number of unique advertised IP address ranges per BGP session. which is limited by default to 200 (Maximum number of custom advertised routes per BGP session).
Mitigation strategies:
-
If possible, instead of migrating workloads randomly across the entire /24 or larger address space, organize migration waves into contiguous blocks (e.g., /28, /27, or /26).
-
When all workloads within a given contiguous block have cut over to Google Cloud, replace the individual /32 advertisements on Cloud Router with a single summary prefix for that block.
-
Set up Cloud Monitoring alerting policies on the metric router.googleapis.com/bgp/advertised_routes_count to ensure you maintain safe headroom well below quota thresholds.
-
Prioritize completing the remaining workloads in partially migrated subnets to transition the entire CIDR from Hybrid Subnet mode (
--allow-cidr-routes-overlap) to standard VPC routing. Once fully migrated, advertise only the overarching subnet prefix (e.g., /24) and withdraw all granular sub-routes.

