Understand the routes propagation in Azure
Hi folks,
I want a bit of clarity around how 'route propagation' works in Azure and how does it affect different types of resources.
My current understanding is that if we have an expressroute gateway in place, we advertise all of our routes (Azure + On- Prem) at the expressroute level and the same gets propagated to our Vnet gateway in Azure.
Now, if we want same set of routes at our NICs, we just have to 'enable' the route propagation toggle in the Route Table configuration.
However, I recently have come across a situation which has put a question mark on my understanding.
Below are details and the ask:
- We follow Hub- Spoke architecture in our Azure with expressroute type Vnet gateway as Hubs and enabling us to connect to the On-Prem networks throughs expressroute Connections and Circuits.
- I have a vm in one of the Spoke Vnet (let's call it spokevm), and I have attached the rt to the Subnet of it by enabling the Route Propagation.
- I exported all of the routes which are being listed as 'Effective Routes' to that nic.
- I, then, exported list of all learned routes on the Vnet gateway (Type- expressroute) to which my vm's Vnet is peered with (with Az PowerShell Command Get-azVvrtualNetworkGatewaylearnedroute).
And here the confusion starts:
- I tried tracing the Next Hop to the address range of the different vm deployed in a different Spoke Vnet (let's call it destvm).
- When I searched for the Next Hop of the address range for the Vnet of destvm in the effective routes exported from my spokevm, it shows me a random IP address which I don't find anywhere in Azure (neither the address range).
- When I searched for the same address space in LearnedRoutes list, I found the Next Hop IP as the gatewaysubnet (which is quite obvious I guess?).
Pasting a chart below to visualize the results which I'm getting (have highlighted the different next hop ip is Cyan (or light blue).
Notes: 10.191--is the Subnet in which vnetgateway is deployed so that makes sense (to me).
But, from can't understand 10.2.--, from where is this IP coming?
Could someone please help me understand that:
- Why I see the difference in the next hop ip address in the effective routes of nic and the Vnetgateway learned routes.
- How the bgp propagated routes exactly works.
- How to track/ map the different routes being shown at the different resources in Azure.
Pasting a basic diagram below to understand the flow (and the ask)
Thanks much in advance!