nerdexam
Google

ASSOCIATE-CLOUD-ENGINEER · Question #38

You have created a subnet named subnetace1 with 16,382 addresses using 192.168.0.0. Later you realize that you won't require too many addresses, and so you want to reduce addresses to 254. Which of th

The correct answer is D. There is no command in google cloud to reduce the number of available addresses in a subnet.. Google Cloud Platform allows expanding the IP range of an existing subnet, but there is no direct command or feature to reduce the IP address range once it has been created.

Submitted by mateo_ar· Mar 30, 2026Planning and configuring a cloud solution

Question

You have created a subnet named subnetace1 with 16,382 addresses using 192.168.0.0. Later you realize that you won't require too many addresses, and so you want to reduce addresses to 254. Which of the following command would you use?

Options

  • Agcloud compute networks subnets expand-ip-range subnetace1 --prefix-length=28
  • Bgcloud compute networks subnets expand-ip-range subnetace1 --size=248
  • Cgcloud compute networks subnets expand-ip-range subnetace1 --prefix-length=-12
  • DThere is no command in google cloud to reduce the number of available addresses in a subnet.

How the community answered

(72 responses)
  • A
    13% (9)
  • B
    7% (5)
  • C
    3% (2)
  • D
    78% (56)

Why each option

Google Cloud Platform allows expanding the IP range of an existing subnet, but there is no direct command or feature to reduce the IP address range once it has been created.

Agcloud compute networks subnets expand-ip-range subnetace1 --prefix-length=28

The `expand-ip-range` command is used to increase the size of a subnet, not decrease it, and specifying `--prefix-length=28` for an existing range would not reduce it if the original range was larger.

Bgcloud compute networks subnets expand-ip-range subnetace1 --size=248

The `expand-ip-range` command is used to increase the size of a subnet, not decrease it, and the `--size` flag is not a valid parameter for specifying subnet size reduction.

Cgcloud compute networks subnets expand-ip-range subnetace1 --prefix-length=-12

The `expand-ip-range` command is for increasing the subnet size, not decreasing it, and a negative prefix length value is not a valid parameter.

DThere is no command in google cloud to reduce the number of available addresses in a subnet.Correct

Google Cloud Platform does not provide a direct command to reduce the IP address range of an existing subnet. Subnets can be expanded to include more addresses, but their size cannot be contracted, as this could lead to IP address conflicts or service disruptions if resources are already using addresses within the range to be removed.

Concept tested: Subnet IP range management

Source: https://cloud.google.com/vpc/docs/create-expand-subnets

Topics

#subnets#IP range expansion#CIDR constraints#VPC networking

Community Discussion

No community discussion yet for this question.

Full ASSOCIATE-CLOUD-ENGINEER Practice