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.
You are configuring a Public Cloud NAT gateway in us-central1 with manual NAT IP address assignment to support 64 Compute Engine VM instances that lack external IP addresses and use only primary internal IPv4 addresses. Your workload has the following requirements:
203.0.113.50:443) while minimizing ENDPOINT_INDEPENDENCE_CONFLICT drops.nat_allocation_failed errors.Which Cloud NAT configuration should you implement?
This option configures static port allocation with 1,024 ports per VM, enables Endpoint-Independent Mapping (EIM), and assigns 2 manual NAT IP addresses (129,024 usable ports), which provides enough capacity for up to 126 VMs (⌊129,024 / 1,024⌋) at that port level.
1,024 ports reserved, each VM is capped at 1,024 simultaneous TCP connections to 203.0.113.50:443, causing connections beyond 1,024 up to 1,500 to fail with OUT_OF_RESOURCES packet drops.TIME_WAIT exhaustion: Cloud NAT marks closed TCP connections as unusable for the duration of the TIME_WAIT timeout, further reducing the effective concurrency below 1,024.ENDPOINT_INDEPENDENCE_CONFLICT drops. Keeping minPortsPerVm at 1,024 instead of 2,048 increases the probability of these tuple collisions.1,024-port cap even when the gateway's 2 NAT IPs have unallocated ports sitting idle.minPortsPerVm from 1,024 to 2,048 later is non-disruptive, but requires provisioning a 3rd NAT IP address beforehand.Each VM opened fewer than 1,024 simultaneous connections (including TIME_WAIT slots) to any single destination 3-tuple and experienced minimal EIM tuple collisions.
This configuration correctly selects static port allocation, sets minPortsPerVm to 2,048, and enables Endpoint-Independent Mapping (EIM), but it only assigns 2 static regional external IP addresses to the Public Cloud NAT gateway.
65,536 ports (0–65,535), Cloud NAT does not use the well-known privileged ports (0–1,023). Consequently, each NAT IP address provides only 64,512 usable source ports—not 65,536.2 × 64,512 = 129,024 usable ports. At 2,048 ports per VM, the gateway can support at most ⌊129,024 / 2,048⌋ = 63 VMs.131,072 required ports) with 129,024 available ports leaves the 64th VM without its port allocation, triggering nat_allocation_failed = true and console warnings to allocate at least one additional external IP address.2,048 tuples to span across the two assigned NAT IPs, the aggregate pool still lacks 2,048 ports.minPortsPerVm is later reduced under static port allocation to fit within 2 IPs, all existing NAT connections break immediately.The subnet hosted 63 or fewer VMs, or if each VM required at most 1,024 ports (and minPortsPerVm were reduced to 1,024), in which case 2 NAT IP addresses would support up to 126 VMs.
Static port allocation reserves a fixed number of NAT source IP address and source port tuples for every VM served by the Cloud NAT gateway, using multiples of powers of two greater than or equal to the configured minimum ports per VM instance (minPortsPerVm). Endpoint-Independent Mapping (EIM) ensures that when a VM sends packets from a specific internal IP address and ephemeral port to multiple external destinations, Cloud NAT translates all of those packets to the exact same NAT source IP address and source port tuple.
minPortsPerVm to 2,048 is the smallest allocation that supports 1,500 simultaneous connections to a single unique destination 3-tuple (203.0.113.50, port 443, TCP). The extra 548 ports provide necessary headroom for closed connections lingering in TCP TIME_WAIT and reduce the likelihood of ENDPOINT_INDEPENDENCE_CONFLICT drops.64,512 usable source ports (privileged ports 0–1,023 are excluded). Supporting 64 VMs at 2,048 ports per VM requires 64 × 2,048 = 131,072 total ports. Dividing 131,072 / 64,512 equals 2.0317, so you must assign 3 static regional external IP addresses (193,536 usable ports).minPortsPerVm does not interrupt active traffic, whereas reducing minPortsPerVm under static port allocation breaks established connections immediately without connection draining.Only static port allocation with 2,048 ports per VM, EIM enabled, and 3 manual NAT IP addresses satisfies STUN traversal compatibility, handles 1,500 concurrent connections to a single destination 3-tuple, and accommodates all 64 VMs without port exhaustion.
Dynamic port allocation allows a Cloud NAT gateway to start each VM with a low minimum ports per VM value (512) and automatically double its allocated NAT source IP and port tuples on demand up to a maximum ports per VM ceiling (4,096). Once a VM's port utilization drops below a threshold, unused ports are released back to the gateway pool for other VMs.
minPortsPerVm (32–32,768) and maxPortsPerVm (64–65,536) must be powers of two, with the maximum strictly greater than the minimum.The application did not require Endpoint-Independent Mapping (EIM) for STUN-based NAT traversal and could tolerate brief port-doubling latency (or tune tcp_syn_retries) during connection ramp-ups.
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