PROFESSIONAL-CLOUD-NETWORK-ENGINEER · Question #72
You have configured a Compute Engine virtual machine instance as a NAT gateway. You execute the following command: gcloud compute routes create no-ip-internet-route \ --network custom-network1 \…
The correct answer is B. gcloud compute instances add-tags [existing-instance] --tags no-ip. In GCP, custom routes with a --tags parameter only apply to VM instances that have that specific network tag. The route was created with --tags no-ip, meaning only VMs tagged no-ip will route their 0.0.0.0/0 traffic through the NAT gateway VM. To make existing instances use…
Question
Options
- Asudo sysctl -w net.ipv4.ip_forward=1
- Bgcloud compute instances add-tags [existing-instance] --tags no-ip
- Cgcloud builds submit --config=cloudbuild.waml --substitutions=TAG_NAME=no-ip
- Dgcloud compute instances create example-instance --network custom-network1 \ --subnet subnet-
How the community answered
(34 responses)- A12% (4)
- B79% (27)
- C6% (2)
- D3% (1)
Explanation
In GCP, custom routes with a --tags parameter only apply to VM instances that have that specific network tag. The route was created with --tags no-ip, meaning only VMs tagged no-ip will route their 0.0.0.0/0 traffic through the NAT gateway VM. To make existing instances use this route, you must add the no-ip tag to them using gcloud compute instances add-tags [existing-instance] --tags no-ip. Option A (net.ipv4.ip_forward=1) enables IP forwarding on the NAT gateway itself - this is a prerequisite for the NAT gateway VM but doesn't affect which instances use the route. Options C and D are unrelated to the task.
Topics
Community Discussion
No community discussion yet for this question.