Google Cloud Professional Cloud Network Engineer — Question 63

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?

Answer options

Correct answer: B

Explanation

The correct answer is B because adding the 'no-ip' tag to existing instances allows them to utilize the NAT gateway configured with that same tag. Option A is incorrect as it pertains to enabling IP forwarding but does not connect instances to the NAT gateway. Option C is unrelated to instance tagging and focuses on building processes. Option D creates a new instance rather than modifying existing ones to access the NAT gateway.