Hi Veera,
Based on the information you’ve provided, it seems that you’re trying to test a failover scenario where traffic is rerouted from your on-premises network (A) to a third-party vendor © and then to Azure (B) via a private connection and Site-to-Site (S2S) connection. However, the return traffic is not following the same path.
This could be due to the active state of the ExpressRoute (ER) circuit and the precedence of the ExpressRoute Gateway (ERGW) over the VPN gateway. The implications:
- In Azure, the routing of traffic is determined by system routes, user-defined routes, and Border Gateway Protocol (BGP) routes, in that order so when there are multiple routes to the same destination, Azure selects the route type based on the priority order: User-defined routes > BGP routes > System routes
https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview
- If there are two S2S connections from Azure (B) to your on-premises network (A), the traffic will follow the route determined by Azure’s routing mechanisms. If both S2S connections are advertised with BGP, Azure VPN gateway will honor AS Path prepending to help make routing decisions. That's mean A shorter AS Path will be preferred in BGP path selection
If you want to change the routing behaviour to prefer S2S connection 2, you might need to modify the BGP advertisements or use user-defined routes. However, manipulating routing might have unintended side effects. Therefore, be carefull with any change on BGP could impact your entire network.
Here another question than you can check with information about active/active azure routing:
Let me know if this information is helpful.
Cheers,
Luis