Your project uses a custom mode VPC with a regional subnet 10.2.0.0/24 in us-central1. The subnet is running out of available addresses, but production workloads in the subnet must remain online. What should you do to add more addresses while keeping the subnet and its resources unchanged?
Delete the existing subnet and immediately recreate it with the larger range 10.2.0.0/22.
Create a new subnet 10.2.1.0/24 in the same region and migrate instances during a maintenance window.
Run gcloud compute networks subnets expand-ip-range to widen the subnet to 10.2.0.0/23.
Add a secondary IP range 172.16.0.0/24 to the subnet so instances can automatically draw from it.
Use gcloud compute networks subnets expand-ip-range to enlarge the subnet's primary CIDR non-disruptively. Supplying a supernet such as 10.2.0.0/23 (or a larger prefix) keeps the existing range inside the new one, so no VMs are moved or restarted. Creating a new subnet or secondary range would not increase the primary address pool for existing NICs, and deleting/re-creating the subnet would interrupt workloads.
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 CIDR in subnetworks?
Open an interactive chat with Bash
How does gcloud compute networks subnets expand-ip-range work?
Open an interactive chat with Bash
What is the difference between primary and secondary IP ranges in a VPC subnet?
Open an interactive chat with Bash
What is a custom mode VPC in GCP?
Open an interactive chat with Bash
What does the CIDR notation 10.2.0.0/23 mean?
Open an interactive chat with Bash
How does gcloud compute networks subnets expand-ip-range work?
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 .