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.
A subnet (10.10.10.0/24) in us-central1 hosts 16 Compute Engine VMs without external IP addresses that share a single Public Cloud NAT gateway. Normal traffic uses under 1,024 concurrent outbound connections per VM, but peak batch jobs require up to 4,096 connections per VM to the same destination.
You must meet these requirements:
198.51.100.0/28 and 203.0.113.16/29 through dedicated allowlisted static external IP addresses.Which configuration should you implement?
MANUAL_ONLY IP allocation, disable Endpoint-Independent Mapping (EIM), and enable dynamic port allocation (minPortsPerVm=1024, maxPortsPerVm=4096). Reserve 4 static external IPs: assign 2 to the default rule and 2 different IPs to a priority 100 rule matching inIpRange(destination.ip, '198.51.100.0/28') || inIpRange(destination.ip, '203.0.113.16/29').This configuration combines Public Cloud NAT rules using Common Expression Language (CEL) match expressions, manual static IP allocation (MANUAL_ONLY), and dynamic port allocation to enforce segregated egress IP pools while scaling port capacity efficiently.
100 evaluates before the built-in default rule (priority 65,001). Its CEL expression inIpRange(destination.ip, '198.51.100.0/28') || inIpRange(destination.ip, '203.0.113.16/29') matches traffic destined for either partner range and translates it using only its dedicated 2-IP pool.100 falls through to the default rule (0.0.0.0/0), which uses its own non-overlapping 2-IP pool.0–1023). With 16 VMs bursting to maxPortsPerVm = 4,096, each rule requires 16 × 4,096 = 65,536 ports. Because Cloud NAT allocates ports independently per destination-based rule and the default rule, and NAT IPs cannot overlap across rules, each rule needs ⌈65,536 ÷ 64,512⌉ = 2 static IPs (4 static IPs total).1,024 ports per VM per rule and doubles allocations (1,024 → 2,048 → 4,096) only when needed.MANUAL_ONLY and keeping Endpoint-Independent Mapping (EIM) disabled satisfies all prerequisites for both Cloud NAT rules and dynamic port allocation.minExtraIpsNeeded confirm full capacity without OUT_OF_RESOURCES drops.Unlike static port allocation fixed at 4,096 or single-IP rules that fall 1,024 ports short of 65,536, this design satisfies every Cloud NAT rule constraint while guaranteeing full peak concurrency across all 16 VMs with minimal idle port consumption.
MANUAL_ONLY IP allocation, enable Endpoint-Independent Mapping (EIM), and configure static port allocation (minPortsPerVm=4096). Reserve 4 static external IPs: assign 2 to the default rule and 2 different IPs to a priority 100 rule matching inIpRange(destination.ip, '198.51.100.0/28') || inIpRange(destination.ip, '203.0.113.16/29').This configuration pairs static port allocation at 4,096 ports per VM with Endpoint-Independent Mapping (EIM) and 4 static external IP addresses across a custom destination-based rule and the default rule.
4,096 source ports per VM on every rule—even during normal periods when each VM uses fewer than 1,024 connections—wasting reserved port tuples that could otherwise be shared.ENDPOINT_INDEPENDENCE_CONFLICT packet drops.minPortsPerVm=1024 and maxPortsPerVm=4096, and all other settings (4 non-overlapping static IPs and the CEL rule) remained unchanged.MANUAL_ONLY IP allocation, disable Endpoint-Independent Mapping (EIM), and enable dynamic port allocation (minPortsPerVm=1024, maxPortsPerVm=4096). Reserve 2 static external IPs: assign 1 to the default rule and 1 to a priority 100 rule matching inIpRange(destination.ip, '198.51.100.0/28') || inIpRange(destination.ip, '203.0.113.16/29').This configuration correctly sets up dynamic port allocation, manual IP assignment, and a valid Common Expression Language (CEL) destination rule, but it under-provisions the static external IP addresses per rule by assuming a single NAT IP provides 65,536 usable ports or sizing only for minPortsPerVm.
1024–65535), because Cloud NAT excludes the 1,024 well-known privileged ports (0–1023).maxPortsPerVm (4,096), each rule requires 16 × 4,096 = 65,536 ports. A single NAT IP falls short by 1,024 ports (65,536 - 64,512), leaving at least one VM unable to obtain its full 4,096-port allocation.OUT_OF_RESOURCES packet drops on the affected rule.64,512, never 65,536, when calculating static NAT IP counts.65,001).minPortsPerVm (16 × 1,024 = 16,384 ports) leaves the gateway vulnerable when dynamic port allocation doubles allocations during traffic bursts.15 × 4,096 = 61,440 <= 64,512), or if 2 distinct static external IP addresses were assigned to each rule (4 IPs total).MANUAL_ONLY IP allocation, disable Endpoint-Independent Mapping (EIM), and enable dynamic port allocation (minPortsPerVm=1024, maxPortsPerVm=4096). Reserve 4 static external IPs: assign 2 to a priority 100 rule matching inIpRange(source.ip, '10.10.10.0/24') && (inIpRange(destination.ip, '198.51.100.0/28') || inIpRange(destination.ip, '203.0.113.16/29')) and 2 different IPs to a priority 200 rule matching inIpRange(destination.ip, '0.0.0.0/0').This option provisions the correct number of static external IP addresses (4 total, 2 per pool) and appropriate dynamic port allocation limits, but it uses invalid Common Expression Language (CEL) match conditions that violate Public Cloud NAT rule specifications.
inIpRange(source.ip, ...) and inIpRange(destination.ip, ...) with && in one rule causes rule creation to fail.0.0.0.0/0 custom rule: Cloud NAT explicitly forbids creating custom NAT rules with 0.0.0.0/0 as the source or destination range because 0.0.0.0/0 is reserved exclusively for the built-in default rule at priority 65,001.10.10.10.0/24) is handled at the Cloud NAT gateway subnet mapping level rather than inside a destination-based rule's CEL expression.0 through 65,000, while unmatched traffic automatically falls back to the built-in default rule (65,001).100 rule matched only inIpRange(destination.ip, '198.51.100.0/28') || inIpRange(destination.ip, '203.0.113.16/29') (removing source.ip), and the priority 200 rule were removed so the built-in default rule (65,001) handled all remaining egress traffic with the second pair of static IPs.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