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.
Question
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)- A13% (9)
- B7% (5)
- C3% (2)
- D78% (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.
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.
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.
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.
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
Community Discussion
No community discussion yet for this question.