Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Network Engineer practice bank has an additional 2,437 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your VPC network vpc-prod uses global dynamic routing mode, connects to a Network Connectivity Center (NCC) hub, and peers with vpc-shared (importing custom routes). A VM app-vm (10.10.1.5, tag inspect-traffic, in us-central1) sends a packet to 172.16.20.15, which matches no subnet route or Private Service Connect endpoint.
The following applicable routes exist in vpc-prod:
| Route | Type | Match / Destination | Priority | Next Hop (State) |
|---|---|---|---|---|
pbr-bypass | Policy-based (DEFAULT_ROUTING) | Src 10.10.1.0/24, Dst 172.16.0.0/16, Tag inspect-traffic | 10 | Skip other policy-based routes |
pbr-nva | Policy-based | Src 0.0.0.0/0, Dst 172.16.20.0/24, Tag inspect-traffic | 50 | ilb-nva (healthy) |
peering-dyn-1 | Peering dynamic | 172.16.20.0/24 | 100 | vpc-shared VLAN attachment (up) |
ncc-dyn-1 | NCC dynamic | 172.16.20.0/24 | 50 | Hybrid spoke VLAN attachment (up) |
local-dyn-1 | Local dynamic (us-east1) | 172.16.20.0/24 | 65536 | HA VPN tunnel vpn-east (up) |
local-static-1 | Local static | 172.16.20.0/24 | 1000 | VM fw-vm-1 (stopped) |
local-static-2 | Local static | 172.16.0.0/16 | 10 | VM fw-vm-2 (running) |
Which next hop does Google Cloud select to forward the packet?
vpn-east via local-dyn-1.A local dynamic route is programmed in a VPC network by a local Cloud Router via Border Gateway Protocol (BGP) over HA VPN tunnels, Cloud Interconnect VLAN attachments, or Router appliance VMs. When global dynamic routing mode is enabled on the VPC, dynamic routes learned in one region (such as us-east1) are programmed across all regions of the VPC, making local-dyn-1 applicable to app-vm in us-central1.
Google Cloud evaluates the packet through a strict, deterministic sequence:
pbr-bypass (priority 10) outranks pbr-nva (priority 50) because PBRs ignore prefix specificity and evaluate solely by priority. Its DEFAULT_ROUTING action skips pbr-nva and moves evaluation to standard routing.local-static-2 (172.16.0.0/16), leaving only the 172.16.20.0/24 routes.ncc-dyn-1 (priority 50) and peering-dyn-1 (priority 100) have numerically better priorities, the presence of local custom routes (local-dyn-1 and local-static-1) removes both ncc-dyn-1 and peering-dyn-1 from consideration.local-static-1 because its next hop VM (fw-vm-1) is stopped.local-dyn-1 (Andromeda priority 65536) remains, so the packet is forwarded over vpn-east.us-east1 BGP paths usable from us-central1 workloads.65536, intentionally lower precedence than any valid static route (0–65535).Selecting vpn-east reflects the exact interplay of PBR bypass rules, longest prefix match, custom route source hierarchy, and next-hop health validation, ensuring traffic uses an active local hybrid link rather than a stopped VM or remote transit path.
ilb-nva via pbr-nva.pbr-nva isA policy-based route (PBR) directs matching packets to an internal passthrough Network Load Balancer based on criteria beyond destination IP alone, including source IP range, protocol, and network tags. Policy-based routes are evaluated after special routing paths and before subnet, static, and dynamic routes.
Although pbr-nva specifies a narrower destination prefix (172.16.20.0/24) than pbr-bypass (172.16.0.0/16), policy-based routes do not use longest-prefix matching. Instead, Google Cloud evaluates matching policy-based routes strictly by route priority, where lower numbers indicate higher precedence. Because pbr-bypass has priority 10 and matches app-vm's tag, source IP (10.10.1.5), and destination IP (172.16.20.15), it wins over pbr-nva (priority 50).
Furthermore, pbr-bypass is configured with nextHopOtherRoutes set to DEFAULT_ROUTING. When this type of policy-based route matches with higher priority, Google Cloud ignores all lower-priority policy-based routes—including pbr-nva—and advances directly to the most specific destination step of standard VPC routing.
DEFAULT_ROUTING creates explicit exceptions to broader PBR rules.This option would be selected if pbr-bypass had a numerically higher priority value (lower precedence) than 50, or if app-vm's source IP address fell outside 10.10.1.0/24.
fw-vm-2 via local-static-2.local-static-2 isA local static route manually maps a CIDR destination prefix to a specific next hop—such as a running VM instance (next-hop-instance or next-hop-address)—within the local VPC network. Static routes support priorities from 0 (highest) to 65535 (lowest).
Although local-static-2 has the highest numerical static route priority (10) and points to a running VM (fw-vm-2), it is eliminated early in the routing pipeline by longest prefix match (LPM). In Google Cloud, the most specific destination step evaluates before unusable next hop removal, route priority comparison, and preference category selection.
Because 172.16.20.0/24 is a more specific prefix covering 172.16.20.15 than 172.16.0.0/16, Google Cloud discards local-static-2 immediately at the longest prefix match step. Even after local-static-1 (172.16.20.0/24) is later disregarded because fw-vm-1 is stopped, Google Cloud never falls back to a broader /16 prefix when a valid /24 route (local-dyn-1) remains—in fact, it would drop the packet rather than fall back to /16 even if all /24 next hops were down.
/24) always overrides a higher-priority route with a shorter mask (/16)./24, broader routes are permanently excluded for that packet.This option would be selected if none of the 172.16.20.0/24 routes existed in vpc-prod, making 172.16.0.0/16 the most specific matching destination.
ncc-dyn-1.ncc-dyn-1 isAn NCC dynamic route is a route imported into a VPC spoke from a Network Connectivity Center (NCC) hub that originates from a hybrid spoke located in a different routing VPC network. It enables centralized hybrid connectivity sharing across multiple spoke VPCs.
A common misconception is that ncc-dyn-1 should win among the 172.16.20.0/24 routes because its priority (50) is numerically higher precedence than peering-dyn-1 (100), local-static-1 (1000), and local-dyn-1 (65536). However, Google Cloud compares custom route types before it compares route priorities.
During the select only the most favorable custom route type step, Google Cloud removes all NCC dynamic routes whenever the route model contains at least one local static or local dynamic route for the exact same destination prefix. Because local-dyn-1 (and local-static-1) are local custom routes for 172.16.20.0/24 in vpc-prod, ncc-dyn-1 and peering-dyn-1 are both eliminated before priority metrics are ever evaluated.
This option would be selected if vpc-prod contained no local static or local dynamic routes for 172.16.20.0/24, allowing ncc-dyn-1 to beat peering-dyn-1 in the custom route type hierarchy.
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 Validated