You have two routes in Google Cloud Platform (GCP) with the same destination range but different priorities. Route A has priority 1000 and Route B has priority 500. Which route will GCP use to send traffic to that destination?
In GCP routing, lower priority numbers mean higher priority.
GCP uses the route with the lowest priority number to send traffic. So Route B with priority 500 is preferred over Route A with priority 1000.
You want to create a static route in GCP that directs traffic destined for 10.0.0.0/16 to a specific VM instance acting as a gateway. Which next hop type should you specify in the route configuration?
The next hop should be the VM instance acting as the gateway.
To route traffic through a specific VM instance, you specify the next hop as that instance in the route configuration.
You have two VPC networks in different regions connected via VPC peering. You want to ensure that traffic from region A to region B uses a specific firewall VM in region A as a gateway before reaching region B. Which routing approach achieves this?
Custom static routes can direct traffic through specific instances.
By creating a custom static route with the firewall VM as next hop, traffic to region B is forced through the firewall VM in region A.
You have a firewall rule allowing traffic from subnet A to subnet B. However, traffic is still blocked. You discover a route that sends subnet B traffic through a different gateway that blocks the traffic. What is the best way to fix this routing issue to allow traffic flow?
Routes with lower priority numbers take precedence.
Creating a new route with a higher priority (lower number) that directs traffic through the correct gateway ensures traffic flows as intended without deleting existing routes.
You have two routes in GCP with overlapping destination IP ranges: Route X with destination 10.0.0.0/16 and priority 1000, and Route Y with destination 10.0.0.0/24 and priority 1100. A VM sends traffic to IP 10.0.0.50. Which route will GCP use and why?
GCP prefers the most specific route regardless of priority.
GCP selects the route with the most specific destination range (longest prefix match) first, then uses priority if there is a tie. Here, 10.0.0.0/24 is more specific than 10.0.0.0/16, so Route Y is used.