Question

Difficulty: Very hardPlanning Virtual Private Cloud (VPC) Networks and Subnets

An organization operates a custom-mode Virtual Private Cloud (VPC) in Google Cloud. A network engineer is tasked with expanding the primary IP range of `subnet-east` to accommodate additional compute instances.

The current VPC subnet allocation and connected routes are configured as follows:
- `subnet-east` primary IP range: 10.80.12.0/2310.80.12.0/23 (10.80.12.010.80.13.25510.80.12.0 - 10.80.13.255)
- `subnet-west` primary IP range: 10.80.14.0/2310.80.14.0/23 (10.80.14.010.80.15.25510.80.14.0 - 10.80.15.255)
- `subnet-central` primary IP range: 10.80.8.0/2310.80.8.0/23 (10.80.8.010.80.9.25510.80.8.0 - 10.80.9.255)
- On-premises network (via Cloud VPN): 10.80.0.0/2110.80.0.0/21 (10.80.0.010.80.7.25510.80.0.0 - 10.80.7.255)

The engineer plans to expand `subnet-east` to a /22/22 prefix length to double its IP capacity. Which statement accurately describes the outcome and requirements for this expansion?

  1. The expansion will fail because the only valid /22/22 CIDR block containing 10.80.12.0/2310.80.12.0/23 is 10.80.12.0/2210.80.12.0/22, which overlaps with `subnet-west` (10.80.14.0/2310.80.14.0/23).Answer
  2. B
    The expansion will succeed if `subnet-east` is expanded to 10.80.10.0/2210.80.10.0/22, utilizing the unused IP addresses between `subnet-central` and `subnet-east`.
  3. C
    The expansion will succeed if `subnet-east` is expanded to 10.80.8.0/2210.80.8.0/22, because Google Cloud automatically re-aggregates adjacent subnets within the same VPC.
  4. D
    The expansion will fail because Google Cloud subnets can only be expanded if the original prefix length is /24/24 or smaller.

Answer

The expansion will fail because the only valid /22/22 CIDR block containing 10.80.12.0/2310.80.12.0/23 is 10.80.12.0/2210.80.12.0/22, which overlaps with `subnet-west` (10.80.14.0/2310.80.14.0/23).
Expanding a primary subnet IP range in a GCP Virtual Private Cloud requires two fundamental conditions: the new netmask must be smaller (broader), and the new CIDR block must encompass the existing IP range while remaining aligned on a valid binary CIDR boundary. For 10.80.12.0/2310.80.12.0/23, the only encompassing /22/22 block is 10.80.12.0/2210.80.12.0/22 (10.80.12.010.80.15.25510.80.12.0 - 10.80.15.255). Because 10.80.14.0/2310.80.14.0/23 is already assigned to `subnet-west`, the expanded block creates an IP overlap, causing Google Cloud to reject the expansion.

Step-by-Step Solution

1
Determine the binary network alignment required for a /22/22 CIDR block.
A /22/22 IPv4 subnet mask covers 4 contiguous values in the third octet (23222=10242^{32-22} = 1024 total addresses) and must start at a third-octet value that is a multiple of 4 (e.g., 0, 4, 8, 12, 16).
CIDR blocks must align on standard binary subnet boundaries.
2
Identify the /22/22 block that encloses the current `subnet-east` range (10.80.12.0/2310.80.12.0/23).
The target range 10.80.12.0/2310.80.12.0/23 spans 10.80.12.010.80.13.25510.80.12.0 - 10.80.13.255. The only valid /22/22 block containing this range is 10.80.12.0/2210.80.12.0/22, spanning 10.80.12.010.80.15.25510.80.12.0 - 10.80.15.255.
Subnet primary IP expansion requires the existing range to be fully contained within the expanded CIDR block.
3
Evaluate the expanded /22/22 block against existing subnet allocations and routes.
10.80.12.0/2210.80.12.0/22 includes 10.80.14.010.80.15.25510.80.14.0 - 10.80.15.255, which is already assigned to `subnet-west` (10.80.14.0/2310.80.14.0/23).
Google Cloud VPC prevents subnet expansion if the new range overlaps with any existing subnet CIDR block in the same VPC network.

Key Concept

VPC Primary Subnet Expansion CIDR Boundary and Overlap Rules
Estimated Time:2m 0s
Rate this question