FREE STUDY NOTES · AZ-700

How Azure selects routes: longest prefix match, UDRs and forced tunnelling

Longest prefix match, system routes versus user-defined routes, and how a 0.0.0.0/0 route forces internet traffic on-premises.

From Ultra Transcenders AZ-700 by Tony Rough (publishing soon)

Every subnet has a set of effective routes built from system routes, routes learned over BGP and any user-defined routes. Knowing how Azure chooses between them explains most “why didn’t my traffic go through the firewall?” problems.

Longest prefix match first

A workload subnet has three kinds of route: the VNet address-space system route, a 0.0.0.0/0 UDR to VirtualNetworkGateway, and /32 UDRs to Internet for the Azure KMS IPs. Traffic to a VM in the same VNet uses the system route and goes direct; traffic to the KMS IP uses the /32 route and goes straight to the internet; any other internet address matches only 0.0.0.0/0, so it is forced through the VPN to on-premises.
Figure 4.1: Longest prefix match on a force-tunnelled subnet

Common trap: Assuming that a 0.0.0.0/0 UDR to an NVA sends VM-to-VM traffic within the same VNet through the NVA - it doesn’t, because the VNet address-space system route is a longer prefix match.

Which subnets a route table affects

Common trap: Assuming every subnet’s internet traffic passes through a hub firewall once some subnets have a default route to it - a subnet in a peered VNet with no UDR still goes straight to the Internet.

Valid route prefixes

Get the whole book

This note is one section of Ultra Transcenders AZ-700: Designing and Implementing Microsoft Azure Networking Solutions, an independent study guide that explains every topic the exam covers by technology, with comparison tables, diagrams and the common traps, plus a glossary linked to Microsoft Learn.

Amazon.co.ukKindle: coming soonPaperback: coming soon
Amazon.comKindle: coming soonPaperback: coming soon

Publishing soon on Amazon in Kindle and paperback editions.

About the book · Free AZ-700 glossary · All AZ-700 study notes

More AZ-700 study notes