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 production subnet hosts Compute Engine VMs maintaining long-lived TCP connections to an on-premises database over Cloud Interconnect. VPC Flow Logs are configured on the subnet via the Network Management API using default settings (INTERVAL_5_SEC, 1.0 secondary sampling, INCLUDE_ALL_METADATA), causing high Cloud Logging ingestion costs.
You must optimize the subnet configuration to:
Which configuration change should you implement?
INTERVAL_5_SEC and INCLUDE_ALL_METADATA, lower the secondary sampling rate to 0.25, and enable TCP connection logging (--connection-logging=ENABLED) to avoid missing TCP connections.This option lowers the secondary sampling rate to 0.25 in an attempt to cut ingestion volume by 75%, while enabling TCP connection logging to capture initial SYN and SYN-ACK packets and leaving the 5-second interval and full metadata unchanged.
--flow-sampling=0.25 discards 75% of connection events and 75% of primary-sampled flow records.SYN or SYN-ACK event without subsequent sampled data packets during the aggregation interval, rtt_msec and bytes_sent are not populated.INCLUDE_ALL_METADATA continues ingesting unneeded geographic and GKE metadata fields, while INTERVAL_5_SEC keeps generating frequent entries for long-lived connections.The subnet hosted workloads with short-lived TCP connections missed by primary sampling, the secondary sampling rate remained at 1.0, and metadata and aggregation intervals were tuned separately.
INTERVAL_5_SEC, lower the secondary sampling rate to 0.1, and set metadata to EXCLUDE_ALL_METADATA.This configuration keeps the default 5-second reporting cadence while aggressively reducing log volume by discarding 90% of primary-sampled flow records and removing every optional metadata annotation from the emitted entries.
0.1 instructs VPC Flow Logs to randomly discard 90% of the flow log entries produced by the primary packet sampling process. Connections that are short-lived or low-volume are frequently missed.EXCLUDE_ALL_METADATA strips all optional metadata fields from every log record. While base fields like the 5-tuple IP addresses, bytes_sent, and rtt_msec remain, Flow Analyzer loses VM instance names, VPC network names, and subnet labels needed for resource-level drill-downs.INTERVAL_5_SEC continues emitting frequent records for long-lived TCP flows instead of consolidating them into 15-minute intervals.0.1 sampling: A 0.1 rate corresponds to the ESSENTIAL tier of organization policy constraints, which is intended only for coarse traffic volume and cost estimation rather than per-flow analysis.EXCLUDE_ALL_METADATA, engineers must manually correlate raw IP addresses to VM and VPC inventories outside of the log payload.The organization only required rough aggregate byte and packet volume estimates for cost allocation across subnets, did not need VM or VPC annotations in Flow Analyzer, and could tolerate missing individual flow records.
gcloud compute networks subnets update) with interval-15-min, logging-metadata=custom, and logging-flow-sampling=1.0, while leaving the existing Network Management API configuration active.This approach enables subnet-level VPC Flow Logs through the Compute Engine API (compute.googleapis.com/vpc_flows) alongside the already active Network Management API configuration (networkmanagement.googleapis.com/vpc_flows).
INTERVAL_5_SEC and INCLUDE_ALL_METADATA, adding a second configuration increases total Cloud Logging ingestion volume instead of reducing it.resource.type="gce_subnetwork" and compute.googleapis.com/vpc_flows, whereas Network Management API logs write under resource.type="vpc_flow_logs_config" and networkmanagement.googleapis.com/vpc_flows.The existing Network Management API configuration were deleted (or disabled) first and the team specifically needed to use Compute Engine API-managed subnet settings—for example, to comply with the constraints/compute.requireVpcFlowLogs organization policy, which applies only to Compute Engine API configurations.
INTERVAL_15_MIN, set metadata to CUSTOM_METADATA with only the instance and VPC parent fields specified, and keep the secondary sampling rate at 1.0.Updating the existing Network Management API VPC Flow Logs configuration tunes the three primary cost and granularity levers—aggregation interval, metadata annotations, and secondary sampling rate—within a single log stream (networkmanagement.googleapis.com/vpc_flows).
1.0 ensures 100% of the flow entries generated by primary packet sampling are emitted to Cloud Logging. Because connection (5-tuple), bytes_sent, packets_sent, and rtt_msec are base fields, they are always included in every record regardless of metadata settings.--metadata to CUSTOM_METADATA with parent fields (such as instance and VPC fields via --metadata-fields) retains the VM and network details needed for Flow Analyzer drill-downs while stripping bulky geographic, GKE, and load balancing metadata.INTERVAL_5_SEC to INTERVAL_15_MIN consolidates packets from long-lived TCP connections into far fewer log entries. Modifying the existing configuration avoids creating overlapping log streams.Rather than discarding connections with aggressive secondary sampling or stripping all context with EXCLUDE_ALL_METADATA, extending the aggregation interval for long-lived flows and trimming unneeded annotations with CUSTOM_METADATA achieves substantial Cloud Logging savings without sacrificing telemetry fidelity.
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