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 manage a Public Cloud NAT gateway serving Compute Engine VMs with bursty outbound traffic. Currently, the gateway uses static port allocation (--min-ports-per-vm=2048) with Endpoint-Independent Mapping (EIM) enabled. Port usage metrics show:
You must migrate to dynamic port allocation without interrupting active connections, accommodate 6,000-port bursts while minimizing wasted ports, and prevent unexpected connection resets during future threshold tuning.
Which implementation strategy should you choose?
--min-ports-per-vm=64 and --max-ports-per-vm=1024 first to preserve existing connections, and then raise --max-ports-per-vm to 8192 while relying on connection draining if you ever reduce --max-ports-per-vm later.This option disables Endpoint-Independent Mapping (EIM), performs a staged migration to dynamic port allocation using --min-ports-per-vm=64 and --max-ports-per-vm=1024 before raising the maximum to 8192, and assumes connection draining protects active flows if the maximum threshold is lowered later.
min=2048) to dynamic port allocation breaks existing NAT connections whenever the new --max-ports-per-vm is less than the previous static --min-ports-per-vm (or less than 1024). Because 1024 is lower than the existing 2048 static allocation, this staged step immediately drops active connections.--max-ports-per-vm in dynamic port allocation. Instead, all active NAT connections break immediately and VM allocations temporarily reset to --min-ports-per-vm.64 ports is below the 100-port baseline of most VMs, forcing unnecessary immediate port doubling even during normal operation.--max-ports-per-vm must be greater than or equal to both 1024 and the prior static --min-ports-per-vm to keep existing sessions alive.--min-ports-per-vm or --max-ports-per-vm in dynamic port allocation is non-disruptive, whereas lowering --max-ports-per-vm is always immediately disruptive.The initial dynamic port allocation configuration set --max-ports-per-vm directly to 8192 (or at least 2048), --min-ports-per-vm were sized to 128, and you avoided lowering --max-ports-per-vm during active traffic.
--min-ports-per-vm=128 and --max-ports-per-vm=8192 so ports double incrementally on demand, and avoid lowering --max-ports-per-vm while active traffic is running.Dynamic port allocation allows a Public Cloud NAT gateway to assign different numbers of NAT source IP address and source port tuples to each VM based on real-time demand rather than locking every VM to a fixed allocation. Because Endpoint-Independent Mapping (EIM) is incompatible with dynamic port allocation, disabling EIM enforces Endpoint-Dependent Mapping (EDM), which is mandatory before dynamic port allocation can be enabled.
min=2048) to dynamic port allocation preserves all active connections as long as the new --max-ports-per-vm is at least 1024 and not less than the previous static minimum (2048). Setting --max-ports-per-vm=8192 satisfies both rules.128 and 8192 are valid powers of two. Each VM starts at 128 ports (covering the 100-port baseline while conserving NAT IP capacity) and automatically doubles its port allocation on demand (128 -> 256 -> 512 -> 1024 -> 2048 -> 4096 -> 8192) to absorb the 6,000-connection peak, then releases unused ports when traffic subsides.--max-ports-per-vm immediately breaks all active NAT connections and temporarily resets every VM back to --min-ports-per-vm. Avoiding reductions to the maximum threshold during live traffic prevents sudden outages.128 ports instead of the 32-port default accommodates the 100-connection baseline immediately, minimizing the number of doubling transitions and potential OUT_OF_RESOURCES packet drops during rapid bursts.--min-ports-per-vm can be lowered safely without breaking active sessions.This approach satisfies the mandatory EDM constraint, uses valid power-of-two thresholds sized accurately around the 100-port baseline and 6,000-port peak, preserves existing connections during the transition from 2048 static ports, and accounts for the asymmetric connection-reset behavior when tuning dynamic port limits.
--min-ports-per-vm=128 and --max-ports-per-vm=6144, and safely lower --max-ports-per-vm during off-peak hours without dropping active connections.This option attempts to combine Endpoint-Independent Mapping (EIM) with dynamic port allocation, set a custom maximum port ceiling close to the 6,000-connection peak (6144), and adjust the maximum port limit downward later without affecting active connections.
--min-ports-per-vm and --max-ports-per-vm must be strict powers of two (between 32 and 32,768 for minimum, and 64 and 65,536 for maximum). Because 6144 is not a power of two (4096 and 8192 are the nearest valid values), Cloud NAT rejects the setting.--max-ports-per-vm is always disruptive—it immediately terminates all established NAT connections across the gateway and resets every VM's port allocation to the configured minimum.32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536).EIM were disabled to use EDM, --max-ports-per-vm were set to a valid power of two such as 8192, and the operational plan avoided lowering --max-ports-per-vm while active traffic is flowing.
A common misconception is that because EIM allows simultaneous port reuse across distinct destination 3-tuples, keeping EIM enabled helps handle bursts alongside dynamic allocation. In reality, dynamic port allocation requires EIM to be turned off completely.
--min-ports-per-vm=32 and --max-ports-per-vm=8192 so Cloud NAT scales ports linearly in increments of 32 during bursts, and avoid reducing --min-ports-per-vm later because reducing the minimum breaks all active NAT connections.This option disables Endpoint-Independent Mapping (EIM) and enables dynamic port allocation using the minimum possible threshold (32 ports) and a 8192-port maximum, while assuming linear port scaling and warning against reducing --min-ports-per-vm.
32. Instead, when a VM approaches port exhaustion, Cloud NAT doubles the VM's current port allocation (32 -> 64 -> 128 -> 256 -> ... -> 8192).--min-ports-per-vm=32 when typical VMs use 100 ports forces every normal VM to undergo multiple doubling cycles (32 -> 64 -> 128). During sudden 6,000-connection bursts, going through extra doubling steps increases the window in which Cloud NAT is still allocating ports, leading to latency or OUT_OF_RESOURCES dropped packets.--min-ports-per-vm does not break existing NAT connections or disrupt traffic. It is reducing --max-ports-per-vm that immediately breaks active connections.--max-ports-per-vm and reclaiming ports when usage drops significantly.--min-ports-per-vm breaks active connections only under static port allocation, not under dynamic port allocation.--min-ports-per-vm slightly above typical baseline usage (such as 128 for a 100-port average) reduces allocation churn and packet loss during bursts.It accounted for power-of-two doubling rather than linear increments, raised --min-ports-per-vm to 128 to cover the 100-port baseline during bursts, and identified --max-ports-per-vm (not --min-ports-per-vm) as the disruptive threshold to avoid reducing.
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