Routing & UDRs
system routes · user-defined routes · next hop types · route selection · NVAs · BGP propagation
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
System routes
- Azure creates a route table for each subnet with system routes. You can't create or delete system routes, but you can override some of them with custom routes (UDRs or BGP).
| Address prefix | Next hop type |
|---|---|
| The vnet's own address prefixes | Virtual network |
| 0.0.0.0/0 | Internet |
| 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10 | None |
| 157.59.0.0/16, 127.0.0.0/8, 104.147.0.0/16, 104.146.0.0/17 | None |
- None means the traffic is dropped.
- If you assign one of the reserved private ranges to the vnet address space, that route's next hop changes from None to Virtual network.
- Optional system routes appear when you add features: Virtual network peering (all subnets), Virtual network gateway (BGP or local network gateway prefixes) and VirtualNetworkServiceEndpoint (only the subnet with the endpoint).
- Traffic to Azure service public IPs stays on the Azure backbone even over the default Internet route.
User-defined routes and route selection
- UDR next hop types you can choose: Virtual appliance, Virtual network gateway, None, Virtual network, Internet. You can't choose Virtual network peering or VirtualNetworkServiceEndpoint.
- CLI and PowerShell names:
VirtualNetworkGateway,VNetLocal,Internet,VirtualAppliance,None. - Longest prefix match wins first. With identical prefixes the order is UDR, then BGP, then system route.
- System routes for the vnet, peering and service endpoints are preferred even if a BGP route is more specific. A route with the service endpoint next hop can't be overridden, even with a route table.
- Service tags can be the address prefix in a UDR (up to 25 such routes per table). An explicit prefix beats a service tag.
Route tables
- A route table associates with subnets (not vnets). Each subnet has zero or one route table. One table can attach to many subnets.
- The table and the subnets must be in the same region and subscription.
- You can't delete a table while it is associated. A UDR prefix can't be duplicated in the same table.
- To disassociate, set Route table to None on the subnet. Azure reverts to the default routes.
- Microsoft's pages differ on the number of UDRs per route table: the routing article says 400 by default (1,000 with Virtual Network Manager routing configuration), and the limits page lists 1,000. User-defined route tables per subscription: 600.
NVAs and forced traffic
- A Virtual appliance next hop needs IP forwarding enabled on the NVA's NIC (an Azure setting that disables the source/destination check) and, typically, IP forwarding in the OS. You need both.
- The next hop can be an NVA NIC's private IP or an internal load balancer's private IP.
- Put the NVA in a different subnet from the traffic it inspects. The same subnet can cause a routing loop.
- Overriding 0.0.0.0/0 with an NVA or gateway sends all outbound traffic there, including traffic to Azure service public IPs that don't use service endpoints. Service endpoints create longer prefixes, so endpoint traffic still bypasses the 0.0.0.0/0 UDR.
- A UDR with next hop Virtual network gateway works only when the vnet's gateway is a VPN gateway (not ExpressRoute, Route Server or a virtual WAN hub router).
BGP propagation and special subnets
- ExpressRoute gateways need BGP; VPN gateways can use it optionally. Propagate gateway routes can be disabled per route table to stop BGP-learned routes being added to the subnet. Don't disable it on GatewaySubnet.
- Don't associate a route table that contains 0.0.0.0/0 with the VPN gateway subnet.
- AzureBastionSubnet: UDRs aren't supported. Create it without route tables or delegations.
- Disable peering route propagation (
disablePeeringRoute) is a public preview feature.
Configure and verify
- Order for forcing traffic through an NVA: 1 create the route table in the right region, 2 add the route (prefix, next hop Virtual appliance, next hop IP), 3 associate it with the source subnet, 4 enable IP forwarding on the NVA NIC (and in the OS).
- Effective routes: VM › Networking › NIC › Effective routes. The VM must be running. It lists all routes on a NIC.
- Next hop: Network Watcher Next hop answers for one destination IP. It returns the route table ID, or System Route.
- Permissions: Network Contributor, or actions such as
routeTables/read,write,delete,join/action(associate to a subnet),routes/*,networkInterfaces/effectiveRouteTable/actionandnetworkWatchers/nextHop/action.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Create route table | az network route-table create | New-AzRouteTable |
| Add route | az network route-table route create --route-table-name MyRouteTable --name StorageRoute --address-prefix Storage --next-hop-type VirtualAppliance --next-hop-ip-address 10.0.100.4 | New-AzRouteConfig -Name StorageRoute -AddressPrefix Storage -NextHopType VirtualAppliance -NextHopIpAddress 10.0.100.4, add to the table, then Set-AzRouteTable |
| Associate or dissociate | az network vnet subnet update (with the route table) | Set-AzVirtualNetworkSubnetConfig |
| Effective routes | az network nic show-effective-route-table | Get-AzEffectiveRouteTable |
| Next hop test | az network watcher show-next-hop | Get-AzNetworkWatcherNextHop |
| Delete route table | az network route-table delete | Remove-AzRouteTable |
Exam Tips
Tick each tip once you can answer it without looking.
“Force all internet-bound traffic from a subnet through a firewall VM” → Route table with 0.0.0.0/0, next hop Virtual appliance (the firewall IP), associated with the subnet. Trap: Next hop Internet.
“Traffic reaches the NVA but is dropped” → Enable IP forwarding on the NVA NIC (and in the OS). Trap: Adding an NSG rule.
“10.0.0.0/16 routes to an NVA and 10.0.0.0/24 routes to None; destination 10.0.0.5” → The /24 wins (longest prefix): traffic is dropped. Trap: Choosing the /16 route by UDR order.
“A UDR and a system route have the same prefix” → The UDR wins. Trap: The system route because it is more specific. The prefixes are identical.
“Associate one route table with subnets in two regions” → Not possible: the table and subnets must be in the same region and subscription. Trap: Thinking route tables are global.
“A subnet needs two route tables” → Not possible: zero or one per subnet. Trap: Expecting them to be merged.
“Delete a route table” → Dissociate it from all subnets first. Trap: Deleting the routes first.
“Stop on-premises BGP routes appearing on a subnet” → Disable virtual network gateway route propagation on that route table. Trap: Removing the VPN connection.
“Route table with 0.0.0.0/0 on the VPN GatewaySubnet” → Don't: it can break the gateway. Trap: Assuming it's required for forced tunneling.
“NVA in the same subnet as the workload, with a UDR through it” → Can cause a routing loop: use a separate subnet. Trap: Thinking it's fine if IP forwarding is on.
“Storage traffic must still go direct after a 0.0.0.0/0 UDR to an NVA” → Enable a service endpoint on the subnet: its route has a longer prefix. Trap: Expecting the 0.0.0.0/0 UDR to capture it.
“Next hop result for 10.1.0.5 when the vnet doesn't use that range, inside 10.0.0.0/8” → None (dropped). Trap: Internet.
“Next hop types you can NOT choose in a UDR” → Virtual network peering and VirtualNetworkServiceEndpoint. Trap: Virtual network. It is selectable.
“UDR next hop Virtual network gateway when the gateway is ExpressRoute” → Not supported: it works only with a VPN gateway. Trap: Assuming ExpressRoute is supported.
“Why traffic takes an unexpected path” → NIC effective routes, or Network Watcher Next hop. Trap: NSG flow logs.
“Spoke traffic to Azure Storage must go to the NVA instead of the endpoint path” → UDR using the Storage service tag with the NVA as next hop (up to 25 service-tag routes per table). Trap: Listing individual IP ranges.
“Put a UDR on AzureBastionSubnet” → Not supported: create it without route tables or delegations. Trap: Adding a 0.0.0.0/0 route to inspect Bastion traffic.
Sources
- Azure virtual network traffic routing
- Create, change, or delete a route table
- Network Watcher next hop overview
- Diagnose a VM network routing problem
- Azure Bastion FAQ
- Deploy Bastion with CLI
- Azure virtual network peering
- Azure subscription and service limits
Checked against Microsoft Learn on November 13, 2026.