Prevent Azure Expressroute from learning routes from VPN Gateway

ktipssioyv 1 Reputation point
2021-11-25T11:44:04.303+00:00

How can I prevent Azure Expressroute from learning routes from VPN gateway? We're setting up a IPsec over Azure Expressroute. We want the Azure Expressroute just be a circuit. Right now Azure Expressroute is advertising the routes that's learned from VPN Gateway to the Edge routers.

Is there a way to prevent Azure Expressroute from learning routes from VPN gateway?

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,436 questions
Azure ExpressRoute
Azure ExpressRoute
An Azure service that provides private connections between Azure datacenters and infrastructure, either on premises or in a colocation environment.
342 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,261 Reputation points Microsoft Employee
    2021-11-25T14:05:51.133+00:00

    Hello @ktipssioyv ,

    AFAIK and as mentioned in this doc, the ExpressRoute gateway will advertise the Address Space(s) of the Azure VNet, you can't include/exclude at the subnet level. Also, if VNet Peering is used and the peered VNet has "Use Remote Gateway" enabled, the Address Space of the peered VNet will also be advertised. So as long as the Vnet is linked to the ExpressRoute circuit, there is no way to stop Azure ExpressRoute from learning the Vnet routes from VPN Gateway.

    However, if you want your on-prem routes to NOT be advertised to the subnets, you can do so by disabling a property called "Virtual network gateway route propagation" on the route tables of those subnets.
    Refer: https://video2.skills-academy.com/en-us/azure/virtual-network/virtual-networks-udr-overview#border-gateway-protocol
    https://video2.skills-academy.com/en-us/azure/virtual-network/manage-route-table#create-a-route-table

    If you want the Azure ExpressRoute to just be a circuit, then I would recommend you to unlink the Vnet from your ExpressRoute by removing the connection.

    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.