nerdexam
Google

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…

Submitted by hans_de· Apr 18, 2026Implementing a Google Cloud network

Question

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 \ --destination-range 0.0.0.0/0 \ --next-hop instance nat-gateway \ --next-hop instance-zone us-central1-a \ --tags no-ip --priority 800 You want existing instances to use the new NAT gateway. Which command should you execute?

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)
  • A
    12% (4)
  • B
    79% (27)
  • C
    6% (2)
  • D
    3% (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

#Compute Engine Networking#Custom Routes#NAT Gateway#Instance Tags

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-NETWORK-ENGINEER Practice