Google Associate Cloud Engineer Question 267
Single answerGoogle Cloud PlatformYour company has a VPC network in Google Cloud with a subnet that is running out of IP addresses. The subnet is currently configured with the CIDR range 10.0.0.0/24. As a Google Certified Associate Cloud Engineer, you need to expand this subnet to accommodate more IP addresses without causing downtime. What steps would you take to achieve this?
- A
Change the existing subnet's CIDR range to 10.0.0.0/23 directly in the Google Cloud Console.
- B
Delete the existing subnet and create a new subnet with a larger CIDR range.
- C
Create an additional subnet in the VPC with a non-overlapping CIDR range to provide more IP addresses.
- D
Resize the existing subnet by modifying the CIDR range to 10.0.0.0/23 using the gcloud command.
Show answer and explanation
Correct answer: C
Explanation
In Google Cloud, you cannot directly modify the CIDR range of an existing subnet to expand it. To provide additional IP addresses, you can create a new subnet within the same VPC with a larger or additional non-overlapping CIDR range. This approach avoids downtime and maintains the existing network configuration.
- A. Incorrect.
Google Cloud does not allow you to directly change the CIDR range of an existing subnet. You would need to either delete and recreate the subnet or add a new subnet.
- B. Incorrect.
Deleting and recreating the subnet would cause downtime and potential disruption to services using the existing IP addresses, which is not recommended.
- C. Correct.
Creating an additional subnet in the VPC with a non-overlapping CIDR range is a viable solution to provide more IP addresses without affecting the existing resources.
- D. Incorrect.
Google Cloud does not provide a feature to resize existing subnets by changing their CIDR ranges. The gcloud command cannot be used to modify the CIDR range of an existing subnet.