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 organization runs a stateless data-enrichment workload on an autoscaling Compute Engine Managed Instance Group (MIG) in us-central1 using VMs without external IP addresses. The workload has the following characteristics and requirements:
Which Cloud NAT configuration should you deploy, and how will Google Cloud scale its external IP addresses?
--auto-allocate-nat-external-ips). During scale-in, Cloud NAT dynamically reallocates active VMs onto fewer external IP addresses to immediately release unused IPs, and records a Cloud NAT log event each time an IP address is reserved or removed.Automatic NAT IP address allocation (--auto-allocate-nat-external-ips) enables a Public Cloud NAT gateway to dynamically provision regional external IPv4 addresses as VM workloads scale out and remove those addresses when they are no longer needed.
This option misrepresents both scale-in behavior and observability for automatically allocated NAT IP addresses:
It accurately stated that Cloud NAT preserves established connections by avoiding VM reallocation across IP addresses—deallocating an IP only when its last assigned VM uses zero ports—and noted that scaling events for auto-allocated IPs are not emitted as Cloud NAT logging events.
If you require explicit control to consolidate VMs onto fewer IP addresses and reclaim unused external IPs quickly after a scale-in, you must use manual NAT IP address assignment and perform IP draining, which stops new connections on selected IPs while allowing existing connections to finish gracefully.
--nat-external-ip-pool) and dynamic port allocation (--enable-dynamic-port-allocation), because automatic NAT IP allocation only supports static port allocation and is limited to 300 external IP addresses per gateway.Manual NAT IP address assignment (--nat-external-ip-pool) requires administrators to pre-reserve static regional external IPv4 addresses and explicitly attach them to a Public Cloud NAT gateway, optionally paired with dynamic port allocation (--enable-dynamic-port-allocation) to vary port reservations per VM.
This option relies on two false technical premises and introduces unnecessary operational overhead:
The external public endpoints required strict source IP allowlisting (such as partner firewalls or third-party APIs), which makes manual NAT IP address assignment mandatory so you can provide a known, fixed set of external IP addresses ahead of time.
--auto-allocate-nat-external-ips) and dynamic port allocation (--enable-dynamic-port-allocation). Google Cloud automatically provisions static regional external IP addresses based on the selected network tier, VM count, and reserved ports per VM, and only removes an IP address when the last VM assigned to it no longer uses any ports.Automatic NAT IP address allocation (--auto-allocate-nat-external-ips) is the default provisioning mode for Public Cloud NAT in which Google Cloud dynamically reserves and removes regional external IPv4 addresses on behalf of a gateway. Pairing this with dynamic port allocation (--enable-dynamic-port-allocation) allows the gateway to adjust the number of source ports assigned to each VM between configured minimum and maximum bounds based on actual egress demand.
Compared to manual NAT IP address assignment, which caps gateways at 300 IPs and requires administrators to pre-calculate port exhaustion and drain IPs manually, automatic IP allocation combined with dynamic port allocation provides maximum elasticity with minimal operational overhead when external allowlisting is unnecessary.
--auto-allocate-nat-external-ips) for peak scaling, and then switch to manual NAT IP address assignment (--nat-external-ip-pool) during scale-in to preserve and drain the automatically allocated IP addresses.Cloud NAT allows administrators to edit an existing Public NAT gateway to change its IP allocation method between automatic NAT IP address allocation and manual NAT IP address assignment (--nat-external-ip-pool).
Attempting to start with automatic allocation and switch to manual assignment during scale-in fails for three critical operational reasons:
nat_allocation_failed metric.The workload required IP allowlisting from the outset and the gateway had been deployed with manual NAT IP address assignment from creation, allowing administrators to drain excess static IPs during scale-in without disrupting active sessions.
To avoid breaking established connections in production, choose between automatic and manual IP allocation during initial gateway design based on whether external destinations require predictable, allowlisted source 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