question

secuiseteam-6442 avatar image
0 Votes"
secuiseteam-6442 asked GitaraniSharmaMSFT-4262 answered

Propogated route list from ER vs UDR.

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GitaraniSharmaMSFT-4262 avatar image
0 Votes"
GitaraniSharmaMSFT-4262 answered

Hello @secuiseteam-6442 ,

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://docs.microsoft.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://docs.microsoft.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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.