Google Cloud Associate Cloud Engineer — Question 78
Your VMs are running in a subnet that has a subnet mask of 255.255.255.240. The current subnet has no more free IP addresses and you require an additional
10 IP addresses for new VMs. The existing and new VMs should all be able to reach each other without additional routes. What should you do?
Answer options
- A. Use gcloud to expand the IP range of the current subnet.
- B. Delete the subnet, and recreate it using a wider range of IP addresses.
- C. Create a new project. Use Shared VPC to share the current network with the new project.
- D. Create a new subnet with the same starting IP but a wider range to overwrite the current subnet.
Correct answer: A
Explanation
Option A is correct because using gcloud to expand the IP range allows for adding more IP addresses while keeping the existing configuration intact. Option B would require downtime and reconfiguration of the subnet, which is not necessary if expansion is possible. Option C creates additional complexity with project management and does not directly solve the IP address shortage. Option D is incorrect as it would overwrite the current subnet and potentially disrupt existing VMs.