Router Shaping in Azure Virtual WAN
Router shaping lets you control the bandwidth allocated to each type of traffic flowing through a Virtual WAN hub. By configuring shaping policies, you can ensure critical applications receive the required throughput while preventing less‑important traffic from consuming excess capacity.
When to Use Router Shaping
- Multi‑tenant environments where each tenant must be guaranteed a minimum bandwidth.
- Scenarios with a mix of latency‑sensitive (e.g., VoIP) and bulk transfer (e.g., backup) traffic.
- Compliance requirements that mandate bandwidth caps for specific services.
Key Concepts
| Term | Description | 
|---|---|
| Shaping Policy | A collection of rules that define bandwidth limits per traffic class. | 
| Traffic Class | A grouping based on protocol, port, or custom tags (e.g., “Video”, “Backup”). | 
| Maximum Bandwidth (Mbps) | Upper limit for a traffic class on a specific hub. | 
| Guaranteed Bandwidth (Mbps) | Minimum reserved bandwidth; traffic will be prioritized up to this value. | 
Creating a Shaping Policy
- Navigate to Virtual WAN > Hubs in the Azure portal.
- Select the hub you want to configure.
- Click Router Settings > Shaping Policies.
- Press Create Policy and fill in the following fields:
        - Name: Descriptive identifier (e.g., Video_Streaming_Policy).
- Traffic Class: Choose from predefined or create a custom class.
- Maximum Bandwidth: Enter the ceiling value.
- Guaranteed Bandwidth: Enter the floor value.
 
- Name: Descriptive identifier (e.g., 
- Save the policy. The hub will apply the shaping rules within a few minutes.
Example: Prioritizing VoIP Traffic
{
  "policyName": "VoIP_Priority",
  "trafficClass": "VoIP",
  "maxBandwidthMbps": 500,
  "guaranteedBandwidthMbps": 200
}
    This policy guarantees 200 Mbps for VoIP traffic and caps it at 500 Mbps, ensuring consistent call quality even during peak usage.
Monitoring & Diagnostics
Use the Metrics Explorer to view real‑time bandwidth consumption per traffic class. The RouterShapingPolicy log provides audit information whenever a policy is added, modified, or deleted.
Best Practices
- Start with conservative guarantees and adjust based on observed traffic patterns.
- Combine shaping with Azure Firewall policies for layered security.
- Regularly review metrics to avoid over‑provisioning.