Hi everyone,
I'm experiencing an issue with GCP and would appreciate your help:
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?
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?