Easy1 markMultiple Choice
GCP ACE · Question 39 · Domain 4.5: Managing networking resources
Your company has a custom VPC with a subnet named 'app-subnet' using the IP range 10.0.0.0/24. You have run out of IP addresses in this subnet and need to expand it to a /20 range without recreating the subnet or disrupting existing VMs.
Which command should you use?
Your company has a custom VPC with a subnet named 'app-subnet' using the IP range 10.0.0.0/24. You have run out of IP addresses in this subnet and need to expand it to a /20 range without recreating the subnet or disrupting existing VMs.
Which command should you use?
Answer options:
A.
gcloud compute networks subnets update app-subnet --range=10.0.0.0/20
B.
gcloud compute networks subnets expand-ip-range app-subnet --prefix-length=20
C.
gcloud vpc subnets resize app-subnet --cidr=10.0.0.0/20
D.
You cannot expand a subnet; you must create a new one and migrate the VMs.
How to approach this question
Recall the specific gcloud command used to increase the size of a subnet.
Full Answer
B.gcloud compute networks subnets expand-ip-range app-subnet --prefix-length=20✓ Correct
In GCP, you can dynamically expand the IP range of a subnet without downtime, provided the new range does not overlap with other subnets. The correct command is `gcloud compute networks subnets expand-ip-range [SUBNET_NAME] --prefix-length=[NEW_PREFIX]`.
Common mistakes
Believing that subnets cannot be resized, or using the 'update' command instead of 'expand-ip-range'.
Practice the full GCP Associate Cloud Engineer Practice Exam 3
50 questions · hints · full answers · grading
More questions from this exam
Q01You are starting a new project in Google Cloud and need to create a new GCP project and enable th...EasyQ02A new team member has joined your operations team. They need to be able to view all Compute Engin...MediumQ03Your company is migrating to Google Cloud. You currently manage all employee identities in an on-...MediumQ04Your development team is experimenting with new GCP services in a sandbox project. The finance te...MediumQ05Your company wants to perform complex, custom SQL analysis on their Google Cloud billing data to ...Easy
Expert