Hello @Rice Wu ,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that you have an existing S2S VPN without BGP between your Azure VNET and on-premises and you would like to create an ExpressRoute VNET gateway/connection with on-premises and cutover the traffic from S2S VPN to ER in future. And you would like to know if you can keep the existing "no BGP" setting for S2S VPN connection or change it to use BGP to coexist with ExpressRoute connection.
You can setup VPN and ExpressRoute coexistence scenario with both "BGP" and "no BGP" setting for S2S VPN connection.
In both the cases, ExpressRoute will be preferred over Site-to-Site VPN when both routes are the same. However, if specific routes are added in the Local Network Gateway of the VPN, then Azure will use the longest prefix match to choose the route towards the packet's destination as per Azure's default route selection algorithm.
Refer : https://learn.microsoft.com/en-us/azure/expressroute/how-to-configure-coexisting-gateway-portal#configure-a-site-to-site-vpn-as-a-failover-path-for-expressroute
https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview#how-azure-selects-a-route
It is not mandatory to use VPN with BGP in a co-existence setup. You can use BGP if needed.
Refer : https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-vpn-faq#can-i-use-bgp-for-s2s-vpn-in-an-azure-expressroute-and-s2s-vpn-coexistence-configuration
The benefits of using VPN with BGP in a co-existence setup are below:
- Easy management of the routes between VPN and ExR.
- You can configure AS path prepending to influence routing decisions between VPN and ExpressRoute.
Refer : https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-vpn-faq#does-azure-vpn-gateway-honor-as-path-prepending-to-influence-routing-decisions-between-multiple-connections-to-my-on-premises-sites - You can enable transit routing between ExpressRoute and Azure VPN by setting up Azure Route Server.
Refer : https://learn.microsoft.com/en-us/azure/expressroute/how-to-configure-coexisting-gateway-portal#to-enable-transit-routing-between-expressroute-and-azure-vpn
Kindly let us know if the above helps or you need further assistance on this issue.
----------------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.