Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to force GCP to use only one BGP path for outbound traffic over Partner Interconnect?

Hi everyone,

I'm experiencing an issue with GCP and would appreciate your help:

  • On GCP, I created two Cloud Routers, each associated with a Partner Interconnect VLAN attachment.
    Each Cloud Router establishes a BGP session with my on-premise router.
  • From the on-premise side, I’m advertising the same route (192.168.90.0/24) to both Cloud Routers.
  • As a result, in VPC > Routes, I see two routes for 192.168.90.0/24: one via Cloud-Router-1 and one via Cloud-Router-2.
  • The problem is that GCP is load-balancing outbound traffic (from GCP to on-premise) across both BGP peers.

What I want is for GCP to prefer only one path for outbound traffic, and use the second one only as a backup (failover).

On the on-premise router, I’ve already tried adjusting MED, Local Preference, and AS Path Prepending. On the GCP side, I also applied BGP Route Policies to manipulate MED, but nothing seems to have any effect.

Can anyone help me understand how to solve this issue or force GCP to prioritize only one BGP path?

1 2 60
2 REPLIES 2

You're encountering a known behavior of GCP's Cloud Router, which does ECMP (Equal-Cost Multi-Path) routing by default when multiple BGP paths are considered equal — and unfortunately, GCP does not support a manual preference or prioritization between multiple BGP routes learned for the same prefix.

Here's what you need to know and do:
🧠 Key Behavior:
GCP always load-balances outbound traffic if two BGP paths are considered equal.

GCP ignores MED, AS path, Local Preference, and prepending when deciding route preference between different Cloud Routers — it only considers:

Prefix length (more specific preferred),

Static vs dynamic (static preferred),

Route type (peering, direct, etc.),

And then it uses ECMP if they're still equal.

🔧 Goal: Prefer One Interconnect Path, Use Second as Failover
To achieve this, you must ensure only one Cloud Router advertises the route at any given time.

Use selective advertisement on-prem
On your on-prem router:

Advertise the route to only one Cloud Router at a time.

Only advertise to the second one when the primary is down (e.g., with conditional advertisements or BGP route-maps based on reachability).

Pros: Simple and effective
Cons: Requires changes on-prem

Thank you so much for your support.

I think on the on-premise router, I will try to advertise two /25 prefixes on the active BGP peer. I hope it will work in failover.
Do you think this is possible?