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 microservices on Compute Engine VMs in a Shared VPC subnet (app-subnet) that connect to external APIs through a Cloud NAT gateway (prod-nat). To diagnose intermittent outbound timeouts caused by suspected NAT port exhaustion and inspect short-lived egress traffic patterns at minimal Cloud Logging cost, you must meet these requirements:
Which configuration and querying approach should you implement?
--aggregation-interval=interval-5-sec, --flow-sampling=0.5, and --metadata=exclude-all-metadata; update Cloud NAT with --enable-logging --log-filter=ALL to inspect both dropped outbound requests and dropped inbound responses; and query networkmanagement.googleapis.com/vpc_flows in the host project.This approach configures VPC Flow Logs with a 5-second aggregation interval, a 0.5 secondary sampling rate, no metadata annotations (exclude-all-metadata), and default (disabled) TCP connection logging, while setting Cloud NAT to log all events (--log-filter=ALL) in an attempt to capture both outbound and inbound packet drops.
--metadata=exclude-all-metadata removes all optional metadata fields, including nat_gateway_details, preventing VPC Flow Logs from identifying the Cloud NAT gateway handling each flow.--log-filter=ALL logs both successful NAT translations and port-exhaustion drops, significantly increasing Cloud Logging ingestion volume compared to ERRORS_ONLY.--flow-sampling=0.5 means short-lived TCP flows can be missed by primary sampling or dropped during secondary sampling.You needed to audit both successful NAT translations and outbound drops (--log-filter=ALL), only required base IP/port 5-tuple data without NAT gateway metadata (exclude-all-metadata), and did not need guaranteed capture of short-lived TCP connection attempts.
--logging-metadata=exclude-all, update Cloud NAT with --enable-logging --log-filter=ERRORS_ONLY, and query logs in the service project.This approach combines a subnet-level Compute Engine API VPC Flow Logs configuration with an organization-level Network Management API configuration, strips all metadata annotations using --logging-metadata=exclude-all, enables error-only logging on Cloud NAT, and directs log queries to the Shared VPC service project.
app-subnet generates a second, redundant stream of flow logs, increasing Cloud Logging ingestion costs.--logging-metadata=exclude-all discards all metadata fields—including nat_gateway_details—leaving only base 5-tuple and byte/packet fields.0.5 secondary sampling rate and do not support TCP connection logging, so short-lived outbound TCP attempts can be missed by primary packet sampling.compute.googleapis.com/vpc_flows for Compute Engine API and networkmanagement.googleapis.com/vpc_flows for Network Management API).connection, reporter, bytes_sent) are taken from packet headers, whereas nat_gateway_details and VM identifiers are optional metadata.SYN and inbound SYN-ACK events requires a Network Management API configuration at the subnet, VPC network, or organization level.endpoint.project_id inside Cloud NAT logs identifies the service project VM, the nat_gateway and VPC Flow Logs streams reside in the host project.You removed the overlapping Compute Engine API configuration, used a single Network Management API configuration with TCP connection logging enabled and custom metadata for nat_gateway_details, and queried the logs in the Shared VPC host project.
--aggregation-interval=interval-5-sec, --connection-logging=enabled, --flow-sampling=1.0, --metadata=custom-metadata, and --metadata-fields=nat_gateway_details,src_instance; update Cloud NAT with --enable-logging --log-filter=ERRORS_ONLY; and query networkmanagement.googleapis.com/vpc_flows and compute.googleapis.com/nat_flows in the host project.This solution pairs a customized Network Management API VPC Flow Logs configuration on app-subnet with targeted Cloud NAT error logging, directing queries to the Shared VPC host project where network telemetry is consolidated.
--connection-logging=enabled captures outbound TCP SYN packets (connection_direction="EGRESS"), while --aggregation-interval=interval-5-sec and --flow-sampling=1.0 preserve granular visibility. Setting --metadata=custom-metadata with --metadata-fields=nat_gateway_details,src_instance retains Cloud NAT gateway and source VM details while omitting all unnecessary metadata fields.--enable-logging --log-filter=ERRORS_ONLY emits log entries exclusively when outbound TCP or UDP packets are dropped because no NAT port is available (allocation_status="DROPPED"), avoiding the ingestion cost of logging successful OK translations.networkmanagement.googleapis.com/vpc_flows and Cloud NAT logs write to compute.googleapis.com/nat_flows inside the host project.SYN connection event and subsequent data packets share the same 5-tuple within the 5-second aggregation interval, VPC Flow Logs merges them into a single log entry.--metadata-fields keeps log payloads compact while automatically capturing any future subfields added under those parent objects.ERRORS_ONLY keeps Cloud Logging volume focused strictly on port-exhaustion failures.nat_flows entries in the host project, the endpoint.project_id field still identifies the specific service project owning the affected VM.Unlike the Compute Engine API, the Network Management API supports TCP connection logging and custom metadata field selection on subnets. Compared to --log-filter=ALL or INCLUDE_ALL_METADATA, this setup eliminates high-volume translation logs and extraneous annotations while preserving every signal needed to pinpoint NAT port exhaustion and short-lived egress flows.
--aggregation-interval=interval-15-min, --connection-logging=disabled, --flow-sampling=0.1, and --metadata=include-all-metadata; update Cloud NAT with --enable-logging --log-filter=TRANSLATIONS_ONLY; and query compute.googleapis.com/vpc_flows and compute.googleapis.com/nat_flows in the host project.This configuration enables a Network Management API flow log policy using a 15-minute aggregation window, a 0.1 secondary sampling rate, full metadata retention (include-all-metadata), disabled TCP connection logging, translation-only Cloud NAT logging, and a query targeting compute.googleapis.com/vpc_flows.
--log-filter=TRANSLATIONS_ONLY records only newly created NAT connections (allocation_status="OK") and suppresses dropped-packet error records (allocation_status="DROPPED").--connection-logging leaves brief TCP flows vulnerable to being skipped by dynamic primary packet sampling, and lowering --flow-sampling to 0.1 discards 90% of generated flow entries.--metadata=include-all-metadata attaches every available annotation (such as geographic, load balancer, and PSC fields), inflating log volume instead of excluding unneeded metadata.networkmanagement.googleapis.com/vpc_flows (resource.type="vpc_flow_logs_config"), whereas compute.googleapis.com/vpc_flows is populated only by Compute Engine API subnet configurations.interval-15-min) is designed to reduce log volume for networks dominated by long-lived connections, not for diagnosing rapid, short-lived traffic bursts.ESSENTIAL tier): A 0.1 rate is suited for coarse traffic volume and cost estimation rather than per-flow troubleshooting.TRANSLATIONS_ONLY, failed NAT attempts still count toward the VM's 50–100 log entries per second per vCPU threshold, which can starve successful translation logs during exhaustion spikes.You needed coarse long-term capacity forecasting for long-lived connections (interval-15-min, flow-sampling=0.1), wanted to audit only successful NAT mappings (TRANSLATIONS_ONLY), and created the flow log configuration via the Compute Engine API so it wrote to compute.googleapis.com/vpc_flows.
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