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 connects a Google Cloud VPC (vpc-hybrid, subnet 10.10.0.0/16) in us-central1 to a multi-cloud environment over two Dedicated Interconnect VLAN attachments on Cloud Router cr-central. The VPC uses legacy best path selection and global dynamic routing.
You must route traffic to 12 contiguous subnets (172.24.0.0/24–172.24.11.0/24) without modifying peer BGP configurations while meeting these requirements:
peer-primary under normal conditions.peer-backup if peer-primary goes down.Which configuration should you apply?
gcloud compute routers update-bgp-peer to configure the summarized prefixes 172.24.0.0/21,172.24.8.0/22 as custom learned routes on both sessions with default priority, and apply an import BGP route policy on peer-backup to set med.set(200).BGP route policies use Common Expression Language (CEL) rules applied to a BGP peer in either the IMPORT (inbound learned routes) or EXPORT (outbound advertised routes) direction. Import policies allow Cloud Router to drop unwanted routes or modify BGP attributes such as MED or AS-PATH before installing routes into the dynamic route control plane.
med.set(200) action never modifies the custom learned routes on peer-backup.100 to custom learned routes on both peer-primary and peer-backup, Cloud Router treats both paths as equal cost and performs ECMP load balancing across both links instead of strictly preferring peer-primary.--custom-learned-route-priority causes Cloud Router to assign a MED value of 100 to all custom learned routes on both sessions.This approach would work if the remote peer routers were dynamically advertising 172.24.0.0/21 and 172.24.8.0/22 via BGP rather than relying on custom learned routes, allowing the IMPORT BGP route policy on peer-backup to match those BGP-received prefixes and raise their MED to 200.
gcloud compute routers update-bgp-peer to configure the summarized prefixes 172.24.0.0/21,172.24.8.0/22 as custom learned routes on both sessions, setting --custom-learned-route-priority=200 on peer-primary and 100 on peer-backup.The --custom-learned-route-priority flag sets the Multi-Exit Discriminator (MED) metric (from 0 to 65535) applied to every custom learned route configured on that BGP session. Cloud Router's dynamic route control plane uses these MED values to rank competing next hops for identical destination prefixes.
200 to peer-primary and 100 to peer-backup causes Cloud Router to select peer-backup as the active best path during normal operation, starving peer-primary of egress traffic.peer-backup drops, traffic flows over the unintended backup link during normal operations.100) always has higher routing priority than a higher numerical MED (200).--custom-learned-route-priority is omitted, Google Cloud internally assigns a default MED value of 100.This configuration would be correct if peer-backup were meant to carry primary egress traffic and peer-primary were designated as the standby failover path, or if the priority values were reversed (100 on peer-primary and 200 on peer-backup).
gcloud compute routers update-bgp-peer to configure the summarized prefixes 172.24.0.0/21,172.24.8.0/22 as custom learned routes on both sessions, setting --custom-learned-route-priority=100 on peer-primary and 200 on peer-backup.Custom learned routes let you manually define destination IP ranges on a Cloud Router BGP session so Cloud Router behaves as if those prefixes were received from the remote BGP peer. Aggregating contiguous subnets into minimal CIDR blocks ensures large address spaces fit within Cloud Router's strict custom learned route limits while preserving exact address boundaries.
--custom-learned-route-priority=100 on peer-primary and 200 on peer-backup assigns Multi-Exit Discriminator (MED) values to all custom learned routes on each session. In Google Cloud, smaller MED values indicate higher priority, so 100 strictly beats 200 under legacy best path selection.peer-primary goes down, its custom learned dynamic routes are automatically withdrawn, and traffic immediately fails over to peer-backup.172.24.0.0/24 through 172.24.7.0/24 into 172.24.0.0/21 and 172.24.8.0/24 through 172.24.11.0/24 into 172.24.8.0/22 reduces 12 prefixes down to 2 exact prefixes. Because the same 2 prefixes are reused across both peers, usage stays well below the limit of 10 custom learned routes per BGP session and 10 unique prefixes per region per VPC.10.10.0.0/16 VPC subnet range, ensuring Cloud Router does not ignore them.vpc-hybrid without altering remote BGP configurations.us-central1 is exported to all other VPC regions automatically.This configuration is optimal because it simultaneously satisfies the 10-prefix hard limit through exact CIDR aggregation, enforces active/passive traffic steering using native MED priority values, and relies exclusively on supported BGP session attributes.
gcloud compute routers update-bgp-peer to configure all 12 /24 prefixes (172.24.0.0/24 through 172.24.11.0/24) as custom learned routes on both sessions, setting --custom-learned-route-priority=100 on peer-primary and 200 on peer-backup.Configuring custom learned routes on a Cloud Router BGP session allows you to inject destination IP prefixes directly into the VPC routing table as dynamic routes without requiring the remote peer to advertise them over BGP. Each prefix added via --set-custom-learned-route-ranges is treated as a custom learned route entry associated with that specific BGP session.
/24 prefixes to a BGP session exceeds the limit and causes the configuration update to be rejected./32 for IPv4 or /128 for IPv6, each consuming one slot against the 10-route limit.This approach would succeed if there were 10 or fewer non-summarizable prefixes to inject, or if the 12 contiguous /24 prefixes were aggregated into summary CIDR blocks (172.24.0.0/21 and 172.24.8.0/22) before applying them.
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