Propogated route list from ER vs UDR.

secui-se-team 21 Reputation points
2022-04-19T05:52:13.49+00:00

Hello :) Below is my issue plz give me some advice.

When server(Vnet1 vms) try to communicate on-prim network need to be pass on VM1 which place in Vnet2
( server_Vnet1 --> Vnet2's VM1--> Expressroute --> on -prim )
The part that I concern is "server_Vnet1 --> Vnet2's VM1"
Cause Through ER (BGP) the server know the on-prime network.

And this is my question,
(server's subnet network)

Q1.

  1. dst on-prim(1.1.1.0/24) next hop VNG (propagted by ER)
  2. dst on-prim(1.1.1.0/24) next hop VM1'ip (user defined)

Which one has higher priority ??

Q2. If UDR has higher priority, the longest prefix match rule is higher than it?

  1. dst on-prim(1.1.1.0/24) next hop VNG (propagted by ER)
  2. dst on-prim(1.1.0.0/24) next hop VM1'ip (user defined)

Which one has higher priority ??

Azure ExpressRoute
Azure ExpressRoute
An Azure service that provides private connections between Azure datacenters and infrastructure, either on premises or in a colocation environment.
373 questions
0 comments No comments
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 49,591 Reputation points Microsoft Employee
    2022-04-19T07:00:21.997+00:00

    Hello @secui-se-team ,

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

    Please find the answers to your queries below:

    Q1. Which one has higher priority?

    1. dst on-prim(1.1.1.0/24) next hop VNG (propagated by ER)
    2. dst on-prim(1.1.1.0/24) next hop VM1'ip (user defined)

    Answer : dst on-prim(1.1.1.0/24) next hop VM1'ip (user defined) has higher priority.

    If multiple routes contain the same address prefix, Azure selects the route type, based on the following priority: User-defined route > BGP route > System route.
    Refer : https://video2.skills-academy.com/en-us/azure/virtual-network/virtual-networks-udr-overview#how-azure-selects-a-route

    Q2. If UDR has higher priority, the longest prefix match rule is higher than it? Which one has higher priority?

    1. dst on-prim(1.1.1.0/24) next hop VNG (propagated by ER)
    2. dst on-prim(1.1.0.0/24) next hop VM1'ip (user defined)

    Answer : Yes, Azure always selects a route based on LPM (longest prefix match) algorithm. Only when multiple routes contain the same address prefix, UDR will take precendence. I believe the address prefixes that you shared in this question do not overlap. But for example:

    1. dst on-prim(1.1.1.0/24) next hop VNG (propagated by ER)
    2. dst on-prim(1.1.1.0/16) next hop VM1'ip (user defined)

    In this case, the BGP route advertised from ExpressRoute will be preferred.

    Refer : https://video2.skills-academy.com/en-us/azure/virtual-network/virtual-networks-udr-overview#how-azure-selects-a-route

    When outbound traffic is sent from a subnet, Azure selects a route based on the destination IP address, using the longest prefix match algorithm. For example, a route table has two routes: One route specifies the 10.0.0.0/24 address prefix, while the other route specifies the 10.0.0.0/16 address prefix. Azure routes traffic destined for 10.0.0.5, to the next hop type specified in the route with the 10.0.0.0/24 address prefix, because 10.0.0.0/24 is a longer prefix than 10.0.0.0/16, even though 10.0.0.5 is within both address prefixes.

    So, in conclusion the Azure routing would be as below:
    LPM --> Always takes priority.
    Only when multiple routes contain the same address prefix, Azure selects the route type as follows : User-defined route > BGP route > System route.

    Kindly let us know if the above helped 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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.