Question

Difficulty: MediumPlanning Virtual Private Cloud (VPC) Networks and Subnets

A network administrator needs to expand the primary IPv4 address range of an existing custom-mode VPC subnet in Google Cloud from 10.1.0.0/2410.1.0.0/24 to 10.1.0.0/2310.1.0.0/23 without creating IP conflicts or interrupting active virtual machines. In what chronological order should the administrator execute the following steps to ensure a successful and non-disruptive range expansion?

  1. 1Audit existing on-premises and peered VPC network address spaces to confirm that the contiguous IP block 10.1.0.0/2310.1.0.0/23 (10.1.0.010.1.1.25510.1.0.0 - 10.1.1.255) has no overlapping ranges.
  2. 2Confirm that the target subnet mask (/23/23) is broader than the existing mask (/24/24) and that the expanded boundary fully encloses the current 10.1.0.0/2410.1.0.0/24 block.
  3. 3Run the gcloud compute networks subnets expand-ip-range command specifying the subnet name, region, and new prefix length of 23.
  4. 4Inspect the subnet properties in the Google Cloud Console or via gcloud to confirm the updated primary IPv4 range reflects 10.1.0.0/2310.1.0.0/23.

Answer

The correct operational sequence begins with auditing adjacent networks for IP overlaps (10.1.0.0/2310.1.0.0/23), confirming that the requested CIDR expansion fully encloses the existing subnet range with a smaller netmask prefix, running the gcloud compute networks subnets expand-ip-range command, and finally verifying the updated subnet CIDR configuration.
Expanding a primary IPv4 range in GCP requires verifying non-overlapping address space across interconnected networks before making changes, confirming that the new prefix encloses the old range (e.g., expanding from /24/24 to /23/23), executing the gcloud compute networks subnets expand-ip-range command, and verifying the change upon completion.

Step-by-Step Solution

1
Audit connected networks for IP conflicts
Ensures 10.1.0.0/2310.1.0.0/23 is completely clear across on-premises and peered networks.
Expanding a subnet into an already used range will cause routing issues and break VPC peering or hybrid interconnects.
2
Validate subnet mask enclosing constraints
Confirms the expansion adheres to GCP VPC subnet expansion constraints.
Google Cloud VPC subnets can only be expanded to a larger range (smaller prefix length) that encloses the original range.
3
Execute the expansion command using gcloud CLI
Modifies the subnet configuration non-disruptively in GCP.
The expand-ip-range command performs an in-place range expansion without requiring VM re-creation.
4
Verify updated subnet properties
Confirms successful expansion to 10.1.0.0/2310.1.0.0/23.
Post-implementation validation guarantees that the network resource state matches expected architecture requirements.

Key Concept

Subnet IP range expansion procedures and constraints in GCP Custom Mode VPCs
Rate this question