A cloud administration team manages a custom-mode Virtual Private Cloud (VPC) network in Google Cloud. An application subnet in `europe-west3` currently uses the primary IPv4 CIDR range . Due to increased instance deployment, the team needs to expand the capacity of this subnet to a netmask length ( IP addresses). The adjacent IP block is completely unassigned, while the block is actively used by a database subnet in the same VPC network. Which strategy should the team implement to resolve the capacity requirement without causing IP allocation errors?
- Provision a new subnet using a non-overlapping block such as and migrate the workloads to the new subnet.Cevap
- BRun the subnet expansion command to expand directly to because Google Cloud automatically re-assigns overlapping IP addresses.
- CExpand the subnet by setting the new primary range to to force expansion upward into .
- DConvert the VPC network mode from custom to automatic mode so Google Cloud automatically resizes the subnet range.
Cevap
Provision a new subnet using a non-overlapping block such as and migrate the workloads to the new subnet.
When expanding a primary subnet IP range in Google Cloud, the new range must encompass the original range and align to a valid binary CIDR boundary corresponding to the new prefix length. For an odd third octet like in , expanding to forces the lower boundary back to the even number (). Because is already assigned, GCP will reject the expansion to prevent IP overlap. The only viable path is provisioning a separate, non-overlapping subnet (such as ) and migrating resources.
Adım Adım Çözüm
Anahtar Kavram
GCP Subnet Expansion Alignment and Overlap Constraints