Question

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

An enterprise cloud network engineer is planning network expansion for a custom-mode Virtual Private Cloud (VPC) network on Google Cloud. An application subnet in region `us-east4` currently uses the primary IP range 10.240.16.0/2410.240.16.0/24 and must be expanded to support at least 500 virtual machine instances.

The VPC network and connected environments currently have the following IP address allocations:
- Subnet A (Application subnet to expand): 10.240.16.0/2410.240.16.0/24
- Subnet B (Database subnet in `us-east4`): 10.240.17.0/2410.240.17.0/24
- Subnet C (Analytics subnet in `us-central1`): 10.240.18.0/2310.240.18.0/23
- On-premises data center network (connected via Cloud VPN): 10.240.20.0/2210.240.20.0/22

Which strategy should the network engineer implement to meet the capacity requirement without violating Google Cloud VPC networking constraints?

  1. Provision a new subnet using the non-overlapping range 10.240.24.0/2310.240.24.0/23 in `us-east4` and migrate the application workloads to the new subnet.Answer
  2. B
    Expand the existing primary subnet CIDR block from 10.240.16.0/2410.240.16.0/24 to 10.240.16.0/2310.240.16.0/23 using the gcloud compute networks subnets expand-ip-range command.
  3. C
    Convert the VPC network from custom-mode to auto-mode so Google Cloud automatically resizes the subnet to accommodate 500 instances.
  4. D
    Change the primary subnet CIDR block from 10.240.16.0/2410.240.16.0/24 to 10.240.16.0/2210.240.16.0/22 to bypass the collision with 10.240.17.0/2410.240.17.0/24.

Answer

The network engineer must provision a new subnet using a non-overlapping range such as 10.240.24.0/2310.240.24.0/23 in `us-east4` and migrate the application workloads.
Expanding a primary subnet range in GCP requires contiguous IP space. The current subnet 10.240.16.0/2410.240.16.0/24 expanded to /23/23 covers 10.240.16.010.240.16.0 to 10.240.17.25510.240.17.255. Because 10.240.17.0/2410.240.17.0/24 is already allocated to Subnet B, in-place expansion is rejected by Google Cloud. Therefore, creating a new non-overlapping subnet (such as 10.240.24.0/2310.240.24.0/23) and migrating workloads is the only valid solution.

Step-by-Step Solution

1
Calculate required CIDR prefix length for 500 hosts
A /23/23 subnet provides 2(3223)=5122^{(32-23)} = 512 total IP addresses (507 usable in GCP), meeting the requirement for 500 instances.
Google Cloud reserves 4 IP addresses per subnet plus 1 broadcast address, so a /24/24 (256 addresses) is insufficient, while a /23/23 (512 addresses) provides enough usable IPs.
2
Evaluate in-place expansion of primary IP range 10.240.16.0/2410.240.16.0/24
Expanding 10.240.16.0/2410.240.16.0/24 to /23/23 produces the range 10.240.16.010.240.16.010.240.17.25510.240.17.255.
Subnet expansion in GCP can only decrease the netmask prefix length (making the range larger) while keeping the start IP aligned. The new /23/23 block incorporates 10.240.17.0/2410.240.17.0/24.
3
Check for CIDR collisions within the VPC and hybrid network
10.240.17.0/2410.240.17.0/24 is already assigned to Subnet B in the same VPC. Thus, expanding Subnet A in-place causes an illegal CIDR overlap.
GCP VPC architecture strictly prohibits overlapping primary IP ranges between subnets within the same VPC or connected via VPC Peering / Cloud VPN.
4
Determine the valid alternative architecture
Select an unallocated block such as 10.240.24.0/2310.240.24.0/23 that does not conflict with existing subnets (10.240.16.0/2410.240.16.0/24, 10.240.17.0/2410.240.17.0/24, 10.240.18.0/2310.240.18.0/23) or on-premises ranges (10.240.20.0/2210.240.20.0/22).
When contiguous IP expansion is blocked by adjacent subnets, creating a new disjoint subnet with non-overlapping IP space is the required GCP architectural solution.

Key Concept

VPC Subnet IP Range Expansion Constraints and Overlap Prevention
Rate this question