Hello @ Minh Tuan Nguyen,
Thanks for reaching out to Microsoft Q&A.
I can see you're facing an issue with your Azure VPN gateway where the peer_weight and routes_weight settings are not working as expected in your active/active configuration. It seems you want to prioritize one of your Site-to-Site VPN tunnels as primary and the other as secondary.
Azure VPN Gateway does not honor peer_weight or routes_weight for IPsec S2S VPN connections. These settings apply only to ExpressRoute gateway connections, not VPN tunnels. Therefore, modifying these values will not influence which tunnel Azure selects.
When you have two VPN tunnels (Primary & Secondary) between your on‑prem firewall and Azure, you want Azure to always use the Primary unless it goes down.
Azure uses BGP path selection, and the shortest AS Path is always preferred.
Flow Diagram:
Note: Azure can legitimately send flows over either tunnel in active/active; symmetric routing is not guaranteed. If strict symmetry is mandatory for your firewall, Active/Standby
In active–active mode, Azure may use either tunnel for return flows, and symmetric routing is not guaranteed. If your firewall requires strict symmetric paths, you may need to adjust local‑preference or routing metrics on‑premises, or consider deployment using active–standby mode instead.
If you need a true primary/secondary tunnel arrangement, you can use the active‑standby gateway mode instead. Active‑standby natively supports a primary tunnel and a secondary failover tunnel.
Reference document:
https://v4.hkg1.meaqua.org/en-us/azure/vpn-gateway/about-active-active-gateways
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".