Hello , Welcome to MS Q&A
I think Currently, Azure’s route API does not expose a property that directly tells you if a prefix is learned from ExpressRoute, VPN, or Route Server. This is a known limitation and feedback has been provided by many users for more granular route source information.
Hence ,
- There is no explicit API property for "ExpressRoute" as the source.
- Use the combination of
nextHopType
and known MSEE IPs to infer ExpressRoute-learned prefixes.
Moreover you can utilize BGP Community values to identify prefixes from each Azure region. This method helps in optimizing routing and ensuring that traffic takes the optimal path. For example, specific BGP Community values are assigned to different Azure regions, which can be used to identify the source of the prefix.
For more detailed information, you can refer to the Azure documentation on optimizing routing for ExpressRoute. This documentation provides insights into using BGP Community values and other techniques to manage routing effectively.
Pls check and let us know if it helps
Thanks
Deepanshu