Your two Azure virtual networks (VNets) are peered, the peering shows Connected on both sides, and the VMs in them talked to each other fine until recently. Now pings and TCP connections between them time out, and nothing in the portal looks broken. The change in between is usually a new route table: someone added a user-defined route (UDR) to push traffic through a firewall or a network virtual appliance (NVA). The peering status is accurate, but it only describes the link between the two networks. The path a packet takes is decided per network interface (NIC), and the NIC's effective routes are where you find the answer.
This guide walks through the checks in the order a support engineer would run them, all from the Azure CLI and all read-only until you decide what to fix.
How Azure picks a route for cross-VNet traffic
Every subnet gets a set of system routes from Azure without you doing anything. These include the VNet's own address space (next hop VnetLocal), the address space of each peered VNet (next hop VNet peering), and a default route 0.0.0.0/0 to the Internet. When you associate a route table with a subnet, its UDRs are added to that list.
When several routes match a destination, Azure first picks the most specific prefix (longest prefix match). Only when two routes have the same prefix does the source decide: a user-defined route beats a BGP route from a gateway, and a BGP route beats a system route.
This order explains a common confusion. A UDR for 0.0.0.0/0 pointing at a firewall does not, by itself, divert traffic to a peered VNet, because the peering route for something like 10.2.0.0/16 is more specific and still wins. Traffic gets pulled away from the peering when someone adds a UDR with the same prefix as the peered VNet, or a more specific one such as 10.2.1.0/24. If that UDR points at an appliance that is down, misconfigured, or not forwarding, the traffic disappears without any error message. A UDR with next hop type None drops matching traffic on purpose.
Customers often say they only added a default route. The effective routes show whether that is the whole story.
Read the effective routes on the source NIC
Effective routes are the final, merged route list that Azure applies to one NIC: system routes, UDRs, and any BGP routes, with overridden entries marked. Microsoft's guide on troubleshooting peering route propagation and sync problems starts at the same place: the effective routes on the source VM's NIC.
First find the NIC attached to the source VM, then ask for its effective route table. The VM must be running, otherwise Azure has nothing to compute.
# Find the NIC(s) attached to the source VM
az vm show --resource-group rg-app --name vm-app-01 --query 'networkProfile.networkInterfaces[].id' --output tsv
# Show the merged route table Azure applies to that NIC
az network nic show-effective-route-table --resource-group rg-app --name vm-app-01-nic --output table
The output lists each route with its source, state, prefix, next hop type, and next hop IP. In this illustrative example, VNet A is 10.1.0.0/16 and the peered VNet B is 10.2.0.0/16:
| Source | State | Address Prefix | Next Hop Type | Next Hop IP |
|---|---|---|---|---|
| Default | Active | 10.1.0.0/16 | VnetLocal | |
| Default | Invalid | 10.2.0.0/16 | VNetPeering | |
| User | Active | 10.2.0.0/16 | VirtualAppliance | 10.1.1.4 |
| Default | Active | 0.0.0.0/0 | Internet |
The second row is the peering route. Its state is Invalid because a user-defined route with exactly the same prefix replaced it. The third row is the winner: everything for VNet B now goes to 10.1.1.4. So the peering is still Connected, and Azure is no longer using it directly for this subnet.
While you are reading the list, also look for routes to the peered range that came from a gateway (source VirtualNetworkGateway). Prefixes advertised from on-premises over BGP that overlap or clash with a peered VNet can send traffic toward the gateway instead, which the same Microsoft article calls out as a cause of unpredictable routing.
Ask Azure for the next hop of one specific flow
The effective route table shows every route. When you only care about one source and one destination, Network Watcher's next hop check gives a single answer, and it also tells you which route table produced it. Network Watcher has to be enabled in the VM's region.
# Which hop will a packet from 10.1.0.4 to 10.2.0.4 take, and which route table decided it?
az network watcher show-next-hop --resource-group rg-app --vm vm-app-01 --source-ip 10.1.0.4 --dest-ip 10.2.0.4
# List the routes in the route table returned in routeTableId
az network route-table route list --resource-group rg-network --route-table-name rt-app-subnet --output table
The response contains nextHopType, nextHopIpAddress, and routeTableId. When routeTableId is set, a UDR made the decision, and the ID points straight at the route table to inspect. That saves a lot of guessing in a subscription with dozens of route tables. When nextHopType is None, the traffic is dropped by design, and the fix is to change or remove that route rather than debug anything downstream.
When the UDR points at an appliance that does not forward
If the winning route sends traffic to an NVA, the packets reach that appliance and then depend on it. Several settings have to line up, and each one fails silently:
- Something must actually own the next hop IP. A typo or a rebuilt appliance with a new address leaves the route pointing at nothing.
- The appliance's Azure NIC must have IP forwarding enabled. Without it, Azure drops packets that arrive at the NIC addressed to another IP.
- The appliance's operating system must forward packets. On a Linux-based NVA that is the
net.ipv4.ip_forwardkernel setting. Vendor appliances expose this in their own configuration. - The appliance's firewall rules must allow the flow.
- If the appliance sits in a different VNet from the destination, the peering into the destination VNet must allow forwarded traffic. Otherwise packets that the NVA forwards over the peering are refused.
# 2. Is IP forwarding enabled on the NVA's Azure NIC? (property name can vary by CLI version)
az network nic show --resource-group rg-network --name nva-01-nic --query 'enableIPForwarding'
# 3. On a Linux NVA, is the kernel forwarding packets? 1 means yes
sysctl net.ipv4.ip_forward
# 5. Does the peering accept traffic forwarded from outside the remote VNet?
az network vnet peering show --resource-group rg-app-b --vnet-name vnet-b --name vnet-b-to-vnet-a --query 'allowForwardedTraffic'
The forwarded-traffic flag matters most in hub-and-spoke designs, where spokes reach each other only through an NVA in the hub. Peering does not chain across VNets, so that NVA is the only way spoke-to-spoke traffic can work. If that part is new to you, the article on non-transitive peering explains why a third network is unreachable without it.
Check the return path, then re-run everything after the fix
When the outbound path looks correct and traffic still fails, run the same effective routes check on the destination VM's NIC, this time looking at the route back to the source prefix. Microsoft's peering troubleshooting guide names this as a very common cause: outbound packets go through the NVA or firewall, but the return packets take the direct peering route and bypass it. A stateful firewall sees only one half of the conversation and drops the replies. The fix is symmetric routing, usually a matching UDR on the destination subnet that sends the return traffic back through the same appliance.
If both directions route the way you expect, the remaining suspect is filtering. A broad Deny rule in a network security group (NSG) on either the subnet or the NIC, on either side, can block the flow. Both inbound and outbound NSGs along the path must allow it. IP Flow Verify in Network Watcher tells you which NSG rule allows or denies a specific flow, and Microsoft's guide on NSG misconfigurations that block traffic covers that check.
After you change a route table, NVA setting, or peering flag, repeat the checks instead of trusting the change. Run show-effective-route-table on both NICs again and confirm the route you intended is now Active. Run show-next-hop in both directions and confirm the next hop and route table ID match your design. Then test a real connection from inside the VM, for example nc -vz 10.2.0.4 443 against a port you know is listening. Effective routes can take a short while to reflect a change, so a failed test right after saving is worth one more run before you dig further.
The practical rule: when cross-VNet traffic stops after a routing change, ignore the peering status and read the effective routes on the source NIC first, then on the destination NIC. Those two lists tell you which route won, where the packets went, and whether the replies come back the same way. Most of these cases are solved before you need to open the appliance at all.