
When a VPC network connects to on-premises over more than one hybrid connection, BGP decides which connection carries traffic in each direction. Each direction is controlled by the side that sends the routes, and lower values win in both. Cloud Router controls traffic coming into Google Cloud through the advertised route priority it places in the MED (Multi-exit Discriminator) of the routes it sends. The on-premises routers control traffic leaving Google Cloud through the MED they advertise back. The Professional Cloud Network Engineer exam expects you to know which setting belongs to which direction, and what happens to traffic when a path fails.
Cloud Router takes each BGP session's advertised route priority and places it into the MED of the routes it sends to on-premises. The on-premises router prefers the route with the lowest MED. To make one connection the primary for inbound traffic, you give its BGP session a low advertised route priority and give the backup session a higher one.
Sessions default to an advertised route priority of 100, so sessions left at their defaults look equal to on-premises. Raising the backup session above the primary, or lowering the primary below the backup, makes on-premises prefer the primary. A higher number always makes a path less attractive, so the value meant to win is always the smaller one. The same approach applies when HA VPN backs up Cloud Interconnect. The VLAN attachment sessions get the low advertised route priority and the HA VPN sessions a much higher one, and with matching MEDs from on-premises, Interconnect becomes the primary path in both directions.
The other direction is controlled from on-premises. Cloud Router applies the routes it learns with a route priority that matches their MED, and the VPC network prefers the lowest priority. When two sessions carry the same prefixes with the same AS path length and origin, Cloud Router compares MED during best path selection. The on-premises router therefore steers this direction by advertising its prefixes with a lower MED over the primary session and a higher MED over the backup. Routes from the lower-MED session become the dynamic routes the VPC network uses first, and routes from the higher-MED session wait in reserve until the first session goes down.
BGP attributes differ in how far they travel, and that decides which ones can influence path selection in Google Cloud. MED travels with the routes to the eBGP peer, and Cloud Router compares it, which is why MED is the on-premises side's signal for traffic leaving Google Cloud. Local preference stays inside the network that sets it, because it is never sent to an eBGP peer, so it shapes only the on-premises router's own outbound choices. Vendor weight is narrower still and never leaves the router where it is set. Community values are a separate case. By default, Cloud Router does not use received community values when it selects routes, and they only matter when a BGP route policy on Cloud Router is written to match them.
Two gcloud commands give different views of a Cloud Router. The describe command returns only the configuration you set up, such as peers, interfaces, ASNs and custom advertisements, and shows nothing about which routes were received or which ones won selection. The get-status command shows what the router is actually doing at runtime.
gcloud compute routers get-status ROUTER_NAME --region REGIONIts output lists the best routes the router selected, and each entry includes the destination range, the next hop IP address and the priority. It also reports the status of every BGP peer, including how many routes each peer sent. Because learned routes take a priority that matches the MED they arrived with, this runtime view shows how the MEDs sent from on-premises translated into Google Cloud's path choice.
With global dynamic routing, each Cloud Router also advertises subnets from other regions, and it adds an inter-region cost to those routes. That cost is at least 201. The MED that on-premises sees for a remote-region subnet is the router's base priority plus the inter-region cost. A subnet in the router's own region is advertised at the base priority with nothing added. With regional dynamic routing, each Cloud Router advertises only its own region's subnets, so a connection in one region can't serve as a path for another region's subnets.
The numbers matter when one connection should carry inbound traffic for every region while a connection in another region stands by. The router meant to win gets a low base priority. The backup router advertises its own region's subnets at its base priority, while the winning router advertises those same subnets at its base priority plus the inter-region cost. The backup router's base priority therefore has to be larger than that sum, or the backup router keeps winning for its own local subnets. Because the inter-region cost is at least 201, a backup base priority below 201 can never hold those local subnets back, even when the winning router's base priority is 0. As long as the backup router keeps advertising every subnet, it carries the traffic if the primary connection fails.
The same cost appears inside Google Cloud. A VM in one region sees a Cloud Interconnect route learned in another region with the inter-region cost added. A backup VPN route therefore needs a priority high enough to stay above the Interconnect route even after that cost is added, so that the Interconnect route still wins for VMs outside the Interconnect's region.
For Professional Cloud Network Engineer scenarios, it helps to first identify which direction of traffic needs to change, since that decides whether the change belongs on Cloud Router or on-premises. From there, check that the primary has the lower value, that the backup stays up so failover is automatic, and, with global dynamic routing, that any base priority meant to lose is larger than the winning router's base priority plus the inter-region cost.
Our Professional Cloud Network Engineer practice exams cover Cloud Router route priority and MED alongside Cloud Interconnect and HA VPN design, with detailed explanations that drill these distinctions.