Question

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

A system administrator needs to accommodate 1,000 additional virtual machines within an existing custom-mode VPC primary subnet located in the `us-west1` region. The current subnet uses the primary IP CIDR block 10.50.4.0/2410.50.4.0/24. The company's on-premises network uses 10.50.0.0/2210.50.0.0/22, so any new address space must not overlap with on-premises routes. Which action should the administrator take to expand the subnet capacity without causing downtime or IP space collisions?

  1. A
    Expand the primary IP range of the existing subnet to 10.50.4.0/2110.50.4.0/21 using the Google Cloud CLI.
  2. B
    Expand the primary IP range of the existing subnet to 10.50.8.0/2110.50.8.0/21 using the Google Cloud CLI.
  3. Expand the primary IP range of the existing subnet to 10.50.4.0/2210.50.4.0/22 using the Google Cloud CLI.Answer
  4. D
    Switch the VPC network from custom mode to auto mode so that Google Cloud automatically resizes the subnet.

Answer

Expand the primary IP range of the existing subnet to 10.50.4.0/2210.50.4.0/22 using the Google Cloud CLI.
Expanding the primary range to 10.50.4.0/2210.50.4.0/22 decreases the prefix length from `/24` to `/22`, provides over 1,000 usable IP addresses, fully encompasses the original 10.50.4.0/2410.50.4.0/24 range, and avoids overlapping with the on-premises range 10.50.0.0/2210.50.0.0/22.

Step-by-Step Solution

1
Analyze capacity requirements and subnet expansion rules in GCP.
To support 1,000 VMs, a subnet mask of at least `/22` (providing 2104=10202^{10} - 4 = 1020 usable IPs) is required. GCP allows expanding primary subnet ranges without downtime, provided the prefix length decreases (e.g., from `/24` to `/22`) and the new range fully contains the existing range.
GCP subnet primary ranges can only be expanded, never shrunk, and the original range must remain within the boundary of the new CIDR block.
2
Evaluate the CIDR boundary for 10.50.4.0/2210.50.4.0/22.
The range 10.50.4.0/2210.50.4.0/22 spans IP addresses 10.50.4.010.50.4.0 through 10.50.7.25510.50.7.255. This fully encompasses the existing 10.50.4.0/2410.50.4.0/24 range (10.50.4.010.50.4.010.50.4.25510.50.4.255).
This maintains continuity for existing workloads and provides 1,024 total IP addresses.
3
Verify collision avoidance with on-premises networks.
The on-premises network uses 10.50.0.0/2210.50.0.0/22 (10.50.0.010.50.0.010.50.3.25510.50.3.255). The new GCP subnet range 10.50.4.0/2210.50.4.0/22 (10.50.4.010.50.4.010.50.7.25510.50.7.255) is completely disjoint from the on-premises range.
Prevents routing ambiguity across hybrid Cloud VPN or Interconnect connections.

Key Concept

VPC Subnet Primary CIDR Expansion Rules
Rate this question