Virtual Network Gateway Routing

Handian Sudianto 4,246 Reputation points
2024-05-19T14:03:17.9533333+00:00

Hello, If i have one virtual network gateway (VNG) to connecting onprem to azure and the VNG have 2 connection to Local Netwrok Gateway (LNG) with overlap subnet, what will happened? Example LNG 1 have subnet 10.100.0.0/16 and LNG 2 have 10.100.10.0/24. To which LNG the traffic will pas thru when the azure want go to host 10.100.10.1 for example? In onprem as we know the longest network id will be prefered, will azure use same concept?

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,205 questions
0 comments No comments
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 37,646 Reputation points Microsoft Employee
    2024-05-21T08:08:07.5633333+00:00

    @Handian Sudianto ,

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

    As you are aware, this is not a recommended setup and hence, we will not able to provide a definite answer on the behavior.

    Generally, Azure selects a route based on the destination IP address, using the longest prefix match algorithm.

    • See : How Azure selects a route
    • This means, we can expect that the connection with the longest prefix match should to be preferred over the other.

    This behavior may vary and we recommend that you do not have any overlaps

    Please let us know if we can be of any further assistance here.

    Thanks,

    Kapil


    Please Accept an answer if correct.

    Original posters help the community find answers faster by identifying the correct answer.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Marcin Policht 14,580 Reputation points MVP
    2024-05-19T14:34:53.3166667+00:00

    AFAIK, this configuration is not recommended.

    As per https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal

    Address space: The address space refers to the address ranges for the network that this local network represents. You can add multiple address space ranges. Make sure that the ranges you specify here don't overlap with ranges of other networks that you want to connect to.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin