Your custom mode VPC has a subnet named "prod-us" with a primary range of 10.10.0.0/24 in the us-central1 region. Recent growth means new VM instances can no longer be assigned addresses in this subnet, but you must avoid any service interruption to the existing workloads. Which action should you take to immediately provide additional addresses while keeping all running VMs online?
Run gcloud compute networks subnets expand-ip-range prod-us --region=us-central1 --range=10.10.0.0/23 to grow the primary range.
Use gcloud compute networks subnets update to change the ipCidrRange field of the subnet to 10.10.0.0/23.
Enable VPC Flow Logs on the subnet; the platform will automatically assign additional internal IP addresses when needed.
Delete the prod-us subnet and recreate it with a /22 range during a scheduled maintenance window.
Expanding a subnet's primary CIDR block is a non-disruptive operation in Google Cloud. The gcloud compute networks subnets expand-ip-range command lets you supply either a larger CIDR block or a shorter prefix length that includes the current range, for example moving from /24 to /23. Existing VMs keep their addresses and continue running, and the extra addresses become available right away. Deleting and recreating the subnet would force VM deletion, updating the ipCidrRange property is not supported, and VPC Flow Logs has no effect on address capacity.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a CIDR block?
Open an interactive chat with Bash
How does expanding a subnet's primary range in GCP work?
Open an interactive chat with Bash
Why can't the ipCidrRange property be directly updated for a subnet?
Open an interactive chat with Bash
What is a custom mode VPC in Google Cloud?
Open an interactive chat with Bash
What does the gcloud compute networks subnets expand-ip-range command do?
Open an interactive chat with Bash
Why can't the ipCidrRange property of a subnet be directly updated?
Open an interactive chat with Bash
GCP Associate Cloud Engineer
Ensuring successful operation of a cloud solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .