Site to site IPSec VPN over Express Route

Ali Shaikh 0 Reputation points
2024-12-13T03:59:19.2666667+00:00

We have a requirement from the customer to build IPSec over Expressroute circuit. In Azure we have a Hub and spoke topology. Resources deployed in the spoke needs to communicate with on-prem networks using the IPsec tunnel. It is observed that traffic from Azure is not going via the IPSec tunnel.

Currently IPSec us not configured with BGP and its only using traffic selectors to route traffic.

Routing over IPSec:

On Prem Network: 172.16.1.240/32

Azure Network: 10.247.218.128/26

Routing over ER (BGP):

On Prem Network: 172.16.1.0/32

Azure Network: 10.247.218.0/24

Log Analytics indicate the traffic is taking the route over ER circuit and not the IPSec VPN. As per Azure documentation Longest prefix match should be the route selection criteria. I am struggling to understand why the traffic is not routing through IPSec tunnel.

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,592 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.
398 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 48,081 Reputation points Microsoft Employee
    2024-12-16T06:50:42.4933333+00:00

    @Ali Shaikh ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I see you are following Configure a Site-to-Site VPN connection over ExpressRoute private peering.

    Wrt your verbatim,

    1 . I am not sure how you say Azure advertises "10.247.218.128/26 over IPSec" and "10.247.218.0/24 over ExR"

    • This is not correct
    • Azure will always advertise the entire Azure VNET's range(and peered VNETs) in both the case.
    • See : Traffic advertised from Azure
    • This means, you have to make sure that the OnPrem routes the traffic to Azure in the desired way. i.e., either via VPN Device or ExR

    2 . You also mentioned On Prem Network advertises "172.16.1.240/32 over IPSec" and "172.16.1.0/24 over ExR"

    • In this case, traffic from Azure to OnPREM destined to 172.16.1.240/32 should go via IPSec tunnel only.
    • I believe this is because BGP is not employed here
    • I see the recommendation here is to use BGP, refer : Route Traffic from Azure to on-premises networks
      • And the only option mentioned here is to Advertise more specific prefixes on the VPN BGP session when there is a overlap between the address prefixes of the ExR and VPN.

    I would suggest you start using BGP if you would like to route traffic via IPSec

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.