Question

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

An organization is planning a network expansion inside a custom-mode Virtual Private Cloud (VPC) network in Google Cloud. An existing application subnet in region us-central1 uses the primary CIDR range 192.168.4.0/24192.168.4.0/24. Due to planned instance scaling, the subnet needs to support at least 400 internal IP addresses. A adjacent subnet in the same VPC is currently assigned 192.168.6.0/23192.168.6.0/23. Which CIDR range configuration should the cloud engineer select when expanding the primary range of the application subnet to avoid network overlap?

  1. 192.168.4.0/23192.168.4.0/23Answer
  2. B
    192.168.4.0/22192.168.4.0/22
  3. C
    192.168.5.0/23192.168.5.0/23
  4. D
    192.168.0.0/21192.168.0.0/21

Answer

The primary CIDR range should be expanded to 192.168.4.0/23192.168.4.0/23.
Expanding the subnet to 192.168.4.0/23192.168.4.0/23 increases available host addresses from 256 to 512 (192.168.4.0192.168.5.255192.168.4.0 - 192.168.5.255). This strictly contains the original 192.168.4.0/24192.168.4.0/24 range and stops right before the adjacent 192.168.6.0/23192.168.6.0/23 subnet (192.168.6.0192.168.7.255192.168.6.0 - 192.168.7.255), avoiding any CIDR overlap.

Step-by-Step Solution

1
Determine the required host capacity
Supporting 400 hosts requires a subnet block with at least 512 total addresses, which corresponds to a /23 prefix length (23223=5122^{32-23} = 512).
A /24 subnet provides only 256 addresses, which is insufficient for 400 hosts.
2
Calculate the expanded IP range boundaries for 192.168.4.0/23192.168.4.0/23
The range spans from 192.168.4.0192.168.4.0 through 192.168.5.255192.168.5.255.
In GCP, subnet expansion must preserve the existing network starting address while decreasing the netmask prefix length.
3
Verify non-overlapping status with adjacent subnets
The adjacent subnet uses 192.168.6.0/23192.168.6.0/23 (192.168.6.0192.168.6.0 to 192.168.7.255192.168.7.255). The range 192.168.4.0/23192.168.4.0/23 ends at 192.168.5.255192.168.5.255, ensuring zero IP overlap.
VPC subnets within the same network cannot have overlapping primary IPv4 address ranges.

Key Concept

VPC Subnet Primary CIDR Range Expansion Rules and IP Non-Overlap Planning
Rate this question