Skip to content

Professional Cloud Network Engineer · Domain 2: Implementing a VPC network · 20% of the exam

Task 2.2: Configuring VPC routing.

Static and dynamic routes with Cloud Router, regional or global dynamic routing, network tags and priorities, policy-based routes, an internal load balancer as next hop, and custom route import and export over peering and Network Connectivity Center.

Study it

  • VPC routing: static and dynamic routes, priorities, network tags, policy-based routes and an internal load balancer as next hop

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.

Question 1 · choose 1

A VPC network uses regional dynamic routing. Its only Cloud Router is in us-east1, with BGP sessions over HA VPN tunnels to the data center. A new subnet in us-west1 hosts VMs that on-premises clients must reach, and those VMs must be able to reply. The data center's routers accept whatever Google Cloud advertises. Which single change makes the us-west1 VMs reachable from on premises in both directions?

  1. AAdd the us-west1 subnet range as a custom advertised route on the us-east1 Cloud Router
  2. BCreate a static route in us-west1 for the data center prefix with the existing us-east1 HA VPN tunnel as its next hop
  3. CChange the dynamic routing mode of the VPC network from regional to global, keeping the existing BGP sessions
  4. DCreate a second Cloud Router in us-west1 in the same VPC network, with no BGP sessions of its own
Show the answer and why
  • AAdd the us-west1 subnet range as a custom advertised route on the us-east1 Cloud Router

    Incorrect

    On-premises traffic would arrive, but in regional mode the us-west1 VMs get no dynamic routes back to the data center, whose routes have next hops only in us-east1.

  • BCreate a static route in us-west1 for the data center prefix with the existing us-east1 HA VPN tunnel as its next hop

    Incorrect

    A static route's VPN tunnel next hop must be a Classic VPN tunnel; HA VPN tunnels exchange routes through Cloud Router.

  • CChange the dynamic routing mode of the VPC network from regional to global, keeping the existing BGP sessions

    Correct

    Global mode advertises subnets of all regions on the existing sessions and applies the learned on-premises routes in every region.

  • DCreate a second Cloud Router in us-west1 in the same VPC network, with no BGP sessions of its own

    Incorrect

    A region's dynamic routes come from routes learned by Cloud Router BGP sessions; a router without sessions learns and advertises nothing.

The dynamic routing mode decides two things at once: which regions' subnets a Cloud Router advertises to its peers, and in which regions the routes it learns are applied. In regional mode both stay in the router's own region, so a subnet in another region is neither advertised nor given a return route. Global mode fixes both directions with one setting.

Question 2 · choose 1

A VM with the network tag via-fw sends a packet to 10.8.4.20. The address isn't in any subnet of the VPC network or its peers, and no policy-based routes exist. The network has these static routes: R1 10.8.0.0/16, next hop internal passthrough Network Load Balancer fw-ilb, no tag, priority 100. R2 10.8.4.0/24, next hop instance proxy-vm, tag via-fw, priority 900; proxy-vm is stopped. R3 10.8.4.0/24, next hop instance backup-vm, no tag, priority 1000; backup-vm is running. Where does the packet go?

  1. ATo backup-vm through R3
  2. BTo fw-ilb through R1, the route with the best priority
  3. CTo proxy-vm through R2, the tagged route for this VM
  4. DNowhere: it's dropped because the best matching route's next hop is down
Show the answer and why
  • ATo backup-vm through R3

    Correct

    Only the /24 routes survive the most specific destination step; R2 is then disregarded because its next hop is stopped, leaving R3.

  • BTo fw-ilb through R1, the route with the best priority

    Incorrect

    Priority is compared only among routes with the most specific destination, and R1's /16 is less specific than the /24 routes.

  • CTo proxy-vm through R2, the tagged route for this VM

    Incorrect

    A static route whose next hop VM is stopped is disregarded, even when the sending VM has the route's tag.

  • DNowhere: it's dropped because the best matching route's next hop is down

    Incorrect

    Disregarding R2 leaves R3, which has the same destination and a usable next hop.

Google Cloud applies the routing order step by step: after special paths, policy-based and subnet routes, it keeps only the routes with the most specific destination, removes those whose next hops are unusable, such as a stopped next hop VM, and only then compares priorities. R1 loses at the first step despite its priority of 100.

Question 3 · choose 1

Stateful firewall VMs have nic0 in the untrusted network and nic1 in the trusted network. Each network has an internal passthrough Network Load Balancer over the same VMs and a static route that uses it as next hop; the forwarding rules and routes were created in 2025. Both load balancers use PER_CONNECTION tracking and identical health checks. Session affinity is CLIENT_IP_PORT_PROTO on the trusted side and CLIENT_IP_NO_DESTINATION on the untrusted side. Return packets often reach a different firewall VM than the request did. The servers must keep seeing the clients' original addresses. What fixes this?

  1. AConfigure source NAT on the firewall VMs so that replies always return to the VM that translated the request
  2. BRe-create both forwarding rules and both next hop routes to turn on symmetric hashing
  3. CSet both load balancers' session affinity to CLIENT_IP_NO_DESTINATION
  4. DSet the untrusted side's session affinity to CLIENT_IP_PORT_PROTO, the same as the trusted side
Show the answer and why
  • AConfigure source NAT on the firewall VMs so that replies always return to the VM that translated the request

    Incorrect

    SNAT would make the servers see the firewall's address instead of the client's.

  • BRe-create both forwarding rules and both next hop routes to turn on symmetric hashing

    Incorrect

    Symmetric hashing is on automatically for forwarding rules created on or after June 22, 2021; re-creating them doesn't change the affinity mismatch.

  • CSet both load balancers' session affinity to CLIENT_IP_NO_DESTINATION

    Incorrect

    The common setting can't be CLIENT_IP_NO_DESTINATION, because symmetric hashing needs destination information in the hash.

  • DSet the untrusted side's session affinity to CLIENT_IP_PORT_PROTO, the same as the trusted side

    Correct

    Both load balancers must select backends the same way, with one common affinity that includes destination information, so both directions of a flow hash to the same VM.

When traffic passes through two next hop internal passthrough Network Load Balancers that share backend VMs, both must have the same eligible backends, connection tracking mode and session affinity. Symmetric hashing then gives both directions of a flow the same hash, so no SNAT is needed. Every affinity except CLIENT_IP_NO_DESTINATION supports this.

Question 4 · choose 1

A partner site is reached through a Classic VPN tunnel with static routing. When the tunnel goes down, the network engineer notices that the custom static routes pointing to the tunnel are still listed in the VPC network. What explains this?

  1. AThe routes are cached by Cloud Router and expire after the BGP hold timer
  2. BStatic routes to Classic VPN tunnels aren't removed automatically when the tunnels stop running
  3. CThe tunnel is actually still up, because static routes are removed the moment a tunnel goes down
  4. DThe routes belong to a peered network and can't be changed locally
Show the answer and why
  • AThe routes are cached by Cloud Router and expire after the BGP hold timer

    Incorrect

    Static routes to a Classic VPN tunnel don't involve Cloud Router or BGP.

  • BStatic routes to Classic VPN tunnels aren't removed automatically when the tunnels stop running

    Correct

    The static routes page states this behavior for Classic VPN tunnel next hops.

  • CThe tunnel is actually still up, because static routes are removed the moment a tunnel goes down

    Incorrect

    Static routes to Classic VPN tunnels stay listed even when the tunnel is down.

  • DThe routes belong to a peered network and can't be changed locally

    Incorrect

    Nothing in the scenario involves peering; these are the network's own static routes.

Unlike dynamic routes, which follow BGP sessions, custom static routes with a Classic VPN tunnel next hop aren't automatically removed when the tunnel isn't running. Google Cloud does disregard a route whose Classic VPN tunnel has no established IKE security association when it selects routes.

Question 5 · choose 1

Traffic between a VPC network and a data center runs over HA VPN tunnels whose BGP sessions are all on a single Cloud Router in us-east4. An engineer proposes adding another Cloud Router in the region so that one router no longer limits how many packets can be forwarded. What should the network engineer point out?

  1. ACloud Routers manage the BGP sessions only; Andromeda routes and forwards the packets
  2. BAnother Cloud Router doubles the packet forwarding capacity for the region's tunnels
  3. CEach Cloud Router forwards only its own sessions' packets, so each tunnel needs a router
  4. DCloud Router forwarding scales by itself, so another router helps only at its limit
Show the answer and why
  • ACloud Routers manage the BGP sessions only; Andromeda routes and forwards the packets

    Correct

    Andromeda handles all packet routing and forwarding; Cloud Routers don't provide packet routing or forwarding capability.

  • BAnother Cloud Router doubles the packet forwarding capacity for the region's tunnels

    Incorrect

    Cloud Routers don't provide packet forwarding, so there is no capacity to double.

  • CEach Cloud Router forwards only its own sessions' packets, so each tunnel needs a router

    Incorrect

    Cloud Routers manage BGP sessions; they forward no packets for any tunnel.

  • DCloud Router forwarding scales by itself, so another router helps only at its limit

    Incorrect

    There is no Cloud Router forwarding capacity to reach; forwarding isn't done by Cloud Router.

Cloud Router and Google's Andromeda network virtualization stack work together: Cloud Routers manage BGP sessions and turn the routes they learn into dynamic routes, while Andromeda handles all packet routing and forwarding. Adding Cloud Routers doesn't add forwarding capacity.

Question 6 · choose 1

A policy-based route sends all traffic from VMs with the network tag compute-vm, source 0.0.0.0/0, to an internal passthrough Network Load Balancer of inspection appliances. Backup servers in 10.30.0.0/24, which also carry the tag, must bypass the appliances and still reach their destinations. What should the network engineer create?

  1. AA static route for 10.30.0.0/24 with a higher priority than the policy-based route
  2. BA firewall rule that denies the backup servers' traffic to the load balancer's address
  3. CA higher-priority policy-based route for 10.30.0.0/24 with --next-hop-other-routes=DEFAULT_ROUTING
  4. DA second policy-based route for 10.30.0.0/24 with a lower priority and the same load balancer next hop
Show the answer and why
  • AA static route for 10.30.0.0/24 with a higher priority than the policy-based route

    Incorrect

    Policy-based routes are evaluated before static routes, whatever the static route's priority.

  • BA firewall rule that denies the backup servers' traffic to the load balancer's address

    Incorrect

    Denying the traffic would drop it instead of letting it reach its destinations.

  • CA higher-priority policy-based route for 10.30.0.0/24 with --next-hop-other-routes=DEFAULT_ROUTING

    Correct

    A matching higher-priority route of this type makes Google Cloud ignore the other policy-based routes and continue with the normal routing order.

  • DA second policy-based route for 10.30.0.0/24 with a lower priority and the same load balancer next hop

    Incorrect

    A lower-priority route is evaluated after the existing one, and it would send the traffic to the same appliances.

Policy-based routes are evaluated before subnet, static and dynamic routes. To exempt some sources, create a higher-priority policy-based route for them with the DEFAULT_ROUTING next hop: when it matches, Google Cloud skips the other policy-based routes and proceeds to the most specific destination step.

Practice domain 2 →Practice all domains →