Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
An administrator manages a Google Cloud Virtual Private Cloud (VPC) network that has two custom static routes configured for on-premises connectivity:
192.168.0.0/16, Priority 100, Next hop vpn-gateway-a192.168.1.0/24, Priority 1000, Next hop nva-vm-bA Compute Engine instance in the VPC sends network traffic to the destination IP address 192.168.1.50.
Which route will the VPC routing table select to forward the packet?
Longest prefix match (LPM) is the foundational IP routing algorithm used by Google Cloud VPC routing tables to determine the most specific route destination for any given outbound packet. When a packet matches multiple route ranges, the router evaluates the subnet mask length (prefix length) before assessing any other routing attributes.
In this scenario, the packet's destination is 192.168.1.50. This IP address falls within both defined static routes:
192.168.0.0/16 (prefix length /16, spanning 192.168.0.0 to 192.168.255.255)192.168.1.0/24 (prefix length /24, spanning 192.168.1.0 to 192.168.1.255)Because /24 represents a longer, more specific CIDR prefix than /16, the VPC routing engine selects Route B immediately. Numerical priority is only evaluated when two or more routes share the exact same destination CIDR prefix.
/24 route will never fall back to a /16 route unless the /24 route is modified or deleted.Understanding that prefix length takes precedence over numerical priority is essential for designing predictable VPC network topologies, hub-and-spoke models, and next-generation firewall inspection paths.
Route priority in Google Cloud is a numeric attribute between 0 and 65535 used to rank routes. Lower numerical values signify higher precedence (for example, priority 100 is preferred over priority 1000).
While Route A has a lower numerical priority (100) than Route B (1000), numerical priority is only evaluated as a tiebreaker after the routing table evaluates the prefix length. Because Route B (/24) is more specific than Route A (/16), Route B wins during the longest prefix match phase, and the priority values are never compared.
192.168.1.0/24).Both Route A and Route B had the exact same destination CIDR prefix (for example, if both routes targeted 192.168.1.0/24). In that case, Route A would be selected because its priority of 100 is lower and therefore preferred over 1000.
In Google Cloud VPCs, next hops specify the resource or gateway that receives traffic matching the route. Examples of valid next hops include Cloud VPN gateways, Cloud Interconnect attachments, default internet gateways, and Compute Engine virtual machine instances.
Google Cloud routing order does not inherently rank next-hop types above one another based on resource type. A route pointing to a Cloud VPN gateway does not automatically override a route pointing to a VM instance or appliance. Instead, route selection is strictly governed by longest prefix match, followed by numerical priority.
Google Cloud implemented hardcoded resource-type hierarchies that favored managed VPN services over virtual appliances, but GCP VPC routing uses standard IP prefix evaluation rules instead.
Equal-Cost Multi-Path (ECMP) is a routing mechanism that load-balances traffic across multiple next hops simultaneously when multiple matching routes exist.
In Google Cloud VPC networks, ECMP is only triggered when multiple routes satisfy two strict conditions simultaneously:
In this scenario, Route A and Route B differ in both destination prefix length (/16 vs. /24) and priority (100 vs. 1000). Because Route B is a longer prefix match, traffic is forwarded exclusively through Route B, and ECMP hashing is not performed.
Route A and Route B both targeted 192.168.1.0/24 and both were configured with an identical priority (such as 100), allowing the VPC network to distribute traffic across both next hops.
Change the inputs and watch how the outcome changes.

Change the packet's destination, Route B's prefix, or Route B's priority to see which route the VPC routing table picks.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated