Microsoft Docs

Route traffic in Azure Virtual WAN

This guide explains how to configure routing for your Azure Virtual WAN to control how traffic flows between your on‑premises networks, Azure resources, and the internet.

Prerequisites

Step‑by‑step

  1. Open the Virtual WAN blade

    In the Azure portal, navigate to Virtual WAN > <your‑wan> and select Configuration.

  2. Configure hub routing tables

    Choose a hub and click Routing > Routing tables. You can use the default hub routing table or create a custom one.

    az network vhub routing-table create \
        --resource-group MyResourceGroup \
        --vhub-name MyHub \
        --name MyRoutingTable
  3. Add static routes (if needed)

    Static routes let you override learned routes. Specify the destination prefix and next‑hop type.

    az network vhub routing-table route add \
        --resource-group MyResourceGroup \
        --vhub-name MyHub \
        --route-table-name MyRoutingTable \
        --address-prefix 10.0.0.0/16 \
        --next-hop-type VirtualAppliance \
        --next-hop-ip-address 10.1.1.4
  4. Associate routing table with a hub

    After creating the routing table, associate it with the hub or specific connection.

    az network vhub update \
        --resource-group MyResourceGroup \
        --name MyHub \
        --routing-table MyRoutingTable

Validate routing

Use Azure Network Watcher to verify the effective routes for a virtual machine or hub.

az network watcher show-next-hop \
    --resource-group MyResourceGroup \
    --target-resource-id /subscriptions/xxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM \
    --source-ip 10.0.0.4 \
    --dest-ip 8.8.8.8

Best practices

For more details, see Virtual WAN routing concepts.