Virtual WAN Hub Configuration

Earn 25 points (50 with Pro) in two steps

  1. ① Read through the lesson — each section gets a ✓ as you scroll through it.
  2. ② When every section has a ✓, tap Complete lesson.

0 of 10 read · keep scrolling

✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro

Mastering Virtual WAN Hub Configuration: A Comprehensive Guide

Introduction: The Evolution of Global Networking

In the early days of cloud computing, connecting different parts of an organization’s network was a relatively manual process. Engineers would create individual Virtual Networks (VNets) and link them using VNet Peering. While this works perfectly for small or medium-sized environments, it quickly becomes a management nightmare as the network grows. When you have dozens of VNets across multiple regions, manually managing peering connections, route tables, and firewall appliances creates a complex web that is prone to human error and difficult to troubleshoot.

Azure Virtual WAN (vWAN) was designed specifically to address this complexity by providing a unified, global networking service. At the heart of this service lies the Virtual WAN Hub. Think of the Hub as the central post office for your global network. Instead of connecting every VNet to every other VNet, you connect your VNets to the Hub, and the Hub handles the traffic routing, security, and connectivity between them. This approach, often referred to as a "Hub-and-Spoke" architecture, simplifies management, improves performance, and provides a centralized point for enforcing security policies.

Understanding how to configure the Virtual WAN Hub is essential for any cloud engineer or architect working in enterprise environments. Whether you are connecting branch offices via SD-WAN, linking remote users with Point-to-Site VPNs, or connecting hundreds of VNets across different continents, the Hub is the engine that makes it happen. This lesson will take you from the fundamental concepts of Hub configuration to advanced routing scenarios, ensuring you have the knowledge to build a reliable and scalable global network.


Not read yet

Understanding the Virtual WAN Architecture

Before we dive into the configuration steps, it is important to clearly define what constitutes a Virtual WAN Hub. The Virtual WAN is a global resource that acts as the container for your network. Within this container, you deploy Hubs in specific Azure regions. These Hubs are the regional entry points for your traffic.

Key Components of a Virtual WAN Hub

  • Virtual Hub: This is the core resource in a specific region. It acts as the routing engine and the focal point for all connections.
  • Gateway Infrastructure: Depending on your needs, a Hub can host VPN gateways, ExpressRoute gateways, and Azure Firewall instances.
  • Routing Table: The Hub contains one or more routing tables that determine how traffic is directed between connected VNets and external sites.
  • Connections: These are the links that attach your VNets, branch offices, or remote users to the Hub.

Callout: Virtual WAN vs. Traditional VNet Peering Many engineers ask why they should move from VNet peering to a Virtual WAN. The primary difference is scalability and management. VNet peering is a point-to-point relationship; to connect 10 VNets in a full mesh, you need 45 separate peering links. With a Virtual WAN Hub, you simply connect each of the 10 VNets to the Hub, resulting in 10 connections. Furthermore, the Hub automates the propagation of routes, significantly reducing the administrative burden of maintaining route tables.


Not read yet

Planning Your Virtual WAN Hub Deployment

Before you start clicking through the Azure portal or running command-line scripts, you must plan your Hub deployment. A poorly planned network will eventually lead to IP address overlaps, performance bottlenecks, and security vulnerabilities.

Addressing and IP Planning

Every Virtual Hub requires its own unique address space. This address space must not overlap with any of the VNets you plan to connect to the hub, nor can it overlap with your on-premises network address spaces. A common mistake is using a small CIDR block (like a /24) for the Hub. Because the Hub manages gateway instances and internal services, it is best practice to allocate a larger block, such as a /22 or /23, to ensure you have room for future growth and gateway scaling.

Choosing the Right Region

The placement of your Hub is dictated by the location of your resources. If you have the majority of your workloads in North Europe and West Europe, it makes sense to deploy a Hub in each of those regions. Traffic between VNets connected to the same Hub is processed locally, keeping latency low. Traffic between Hubs travels over the Microsoft global backbone, which is significantly faster and more reliable than the public internet.


Not read yet

Step-by-Step: Configuring a Virtual WAN Hub

Deploying a Virtual WAN Hub is a multi-stage process. You first create the Virtual WAN resource, then add the Hub, and finally attach your spokes.

Step 1: Creating the Virtual WAN

The Virtual WAN resource acts as the parent container. You can create this via the Azure portal under the "Virtual WANs" service. During creation, you must choose a "Type" (Standard or Basic).

  • Basic: Supports only VPN connectivity. Use this if your requirements are limited to basic branch-to-branch or branch-to-VNet connectivity.
  • Standard: Supports ExpressRoute, VPN, Point-to-Site, and Azure Firewall. This is the recommended choice for almost all enterprise scenarios.

Step 2: Adding the Hub

Once the Virtual WAN is created, navigate to the "Hubs" section and click "+ New Hub."

  1. Region: Select the region where your Hub will reside.
  2. Name: Give it a descriptive name (e.g., vwan-hub-east-us).
  3. Address Space: Enter your chosen CIDR block (e.g., 10.0.0.0/22).
  4. Hub Routing Preference: You can choose between "ExpressRoute" or "VPN" as the primary path if you have both, though "ExpressRoute" is usually preferred for performance.

Step 3: Configuring Gateways

After the Hub is created, you can add gateway instances. To add a VPN gateway, go to the Hub settings and select "VPN (Site-to-site)." You must specify the "Scale Unit" (capacity). Each scale unit provides a specific amount of throughput. If you expect high traffic, you can increase the number of scale units later, but it is better to start with an accurate estimate to avoid service disruptions.

Warning: Gateway Scaling Increasing the number of scale units for a gateway is not always instantaneous. It can take several minutes to provision the additional capacity, and in some rare cases, it can cause a brief reconnection of existing tunnels. Always perform capacity adjustments during a maintenance window if possible.


Not read yet

Advanced Routing: The Heart of the Hub

The true power of the Virtual WAN Hub lies in its routing capabilities. By default, the Hub manages routes automatically. When you connect a VNet, the Hub automatically learns the address space of that VNet and propagates it to other connected VNets. However, there are scenarios where you need more granular control.

Custom Route Tables

In complex environments, you might want to isolate certain workloads. For example, you may have a "Production" VNet and a "Development" VNet and wish to prevent them from talking to each other, even though both are connected to the same Hub. You can achieve this by creating custom route tables.

  1. Create a Route Table: In the Hub settings, go to "Route Tables" and create a new table.
  2. Define Labels: Labels allow you to group connections. You can associate connections with specific labels.
  3. Define Routes: You can manually add routes to the table to direct traffic to specific virtual appliances or internal services.
  4. Associate and Propagate: You associate a connection with a route table to determine where its traffic goes, and you enable propagation to ensure the connection's routes are shared with other networks.

Integrating Azure Firewall

One of the most common requirements is inspecting traffic between VNets. While the Hub handles routing, it does not inspect traffic by default. To do this, you deploy an Azure Firewall inside the Hub. Once deployed, you configure the Hub to route traffic through the firewall. This is known as "Secured Virtual Hub."

  • Firewall Deployment: In the Hub settings, select "Security" and then "Azure Firewall."
  • Routing Policy: Once the firewall is deployed, you can configure "Routing Intent." This tells the Hub to send all internet-bound traffic or all private (inter-VNet) traffic through the firewall for inspection.

Not read yet

Code Example: Automating Hub Configuration with Azure CLI

While the portal is great for learning, enterprise networking should be managed via Infrastructure as Code (IaC). Using the Azure CLI allows you to ensure consistency across environments.

Below is a snippet to create a Virtual WAN and a Hub using the Azure CLI:

# Create the Virtual WAN
az network vwan create \
    --name my-vwan \
    --resource-group my-rg \
    --location eastus \
    --type Standard

# Create the Virtual Hub
az network vhub create \
    --name my-hub \
    --resource-group my-rg \
    --vwan my-vwan \
    --address-prefix 10.0.0.0/22 \
    --location eastus

# Add a VPN Gateway to the Hub
az network vhub gateway vpn create \
    --name my-vpn-gateway \
    --resource-group my-rg \
    --vhub-name my-hub \
    --scale-unit 1

Explanation of the code:

  1. The first block creates the vwan container. We specify the Standard type to ensure we can use advanced features like firewalls and ExpressRoute.
  2. The second block deploys the actual vhub resource. The address-prefix is critical here; ensure it doesn't conflict with your existing infrastructure.
  3. The third block provisions the VPN gateway. By setting the scale-unit to 1, we are allocating the base capacity. You can update this value later if your bandwidth needs increase.

Not read yet

Best Practices and Industry Standards

Managing a global network requires a disciplined approach. Follow these best practices to keep your Virtual WAN Hub environment stable and secure.

1. Plan IP Spaces Meticulously

IP address exhaustion is the most common reason for network redesigns. Use an IP address management (IPAM) tool to track your allocations across regions. Never assume you have enough space; always design for 3-5 years of growth.

2. Implement "Least Privilege" Routing

Do not just let all VNets talk to each other by default. Use custom route tables to enforce segmentation. If a web tier doesn't need to communicate with a database tier in a different VNet, ensure your routing configuration blocks that traffic.

3. Monitor with Network Watcher

Azure provides excellent tools for monitoring. Use "Connection Monitor" in Network Watcher to continuously test connectivity between your Hub and your spokes. If a route fails or latency spikes, you will be alerted immediately.

4. Use Infrastructure as Code (IaC)

Never configure your production Hub manually. Use Terraform, Bicep, or ARM templates. This ensures that your network configuration is version-controlled and can be recreated in the event of a disaster.

5. Leverage Branch-to-Branch Connectivity

If you have multiple branch offices, the Virtual WAN Hub can facilitate branch-to-branch communication without the traffic having to hairpin through your main data center. Enable this feature to reduce latency and improve the user experience for remote employees.

Note: The Importance of Route Propagation When you connect a new VNet to the Hub, it may take a few minutes for the routes to propagate throughout the entire network. During this time, you might experience intermittent connectivity. This is expected behavior; always verify route tables after attaching a new VNet.


Not read yet

Common Pitfalls and How to Avoid Them

Even experienced engineers can run into issues with Virtual WAN. Here are the most frequent mistakes and how to steer clear of them.

Overlapping Address Spaces

This is the "classic" networking error. If your VNet has an address space of 10.1.0.0/16 and your Hub has an address space of 10.1.0.0/22, routing will fail unpredictably.

  • Fix: Use a clear, non-overlapping hierarchy. For example, assign 10.0.0.0/16 to the Hub and use 10.1.0.0/16, 10.2.0.0/16, etc., for your spokes.

Misconfigured Gateway Scale Units

Choosing the wrong scale unit can lead to performance bottlenecks. If you deploy a gateway with 1 scale unit, but your traffic volume requires 3, users will experience packet loss and high latency.

  • Fix: Monitor your gateway metrics in the portal. Look at "Gateway Throughput" and "Connection Count." If you are consistently hitting 70% capacity, it is time to scale up.

Ignoring Hub-to-Hub Routing

If you have multiple Hubs, they are automatically connected via the Microsoft backbone. However, you must ensure that your routing tables are configured to allow traffic between Hubs.

  • Fix: Ensure that "Allow Hub-to-Hub traffic" is enabled in your Virtual WAN settings. This is a simple toggle that is often overlooked during initial setup.

Lack of Security Inspection

Many teams set up the network connectivity first and plan to add security "later." By the time later comes, the network is complex and retrofitting a firewall is difficult.

  • Fix: Include the Azure Firewall deployment in your initial Hub configuration template. It is much easier to start with a secured hub than to re-architect your routing later.

Not read yet

Comparison: Virtual WAN Hub Configurations

Feature Basic Hub Standard Hub
Supported Connectivity VPN only VPN, ExpressRoute, P2S, Firewall
Routing Static/Basic Dynamic Advanced (Custom Tables, Labels)
Firewall Integration No Yes (Secured Hub)
Hub-to-Hub Routing No Yes
Use Case Simple, small-scale Large, global enterprise

Frequently Asked Questions (FAQ)

Q: Can I change the address space of a Virtual Hub after it is created? A: No, the address space of a Virtual Hub is immutable. If you need to change it, you must delete the Hub and recreate it. This is why thorough planning is critical.

Q: Does the Virtual WAN Hub support IPv6? A: Yes, Azure Virtual WAN supports dual-stack (IPv4 and IPv6) connectivity for VNet-to-VNet and branch-to-VNet traffic. Ensure your resources are configured to support IPv6 before enabling it on the Hub.

Q: What happens if the Hub goes down? A: Microsoft designs the Virtual Hub as a managed, highly available service. It is deployed across multiple availability zones within a region. While a regional outage is possible, it is extremely rare. For mission-critical workloads, you should deploy Hubs in multiple regions and use global load balancing.

Q: Can I connect a non-Azure VPN device to the Hub? A: Yes, the Virtual WAN VPN gateway supports standard IPsec/IKE protocols. You can connect virtually any third-party SD-WAN appliance or traditional VPN router to the Hub.


Not read yet

Key Takeaways for Success

  1. Architecture Matters: Virtual WAN is a global-scale solution. Use it to replace complex, manual VNet peering meshes when your network grows beyond a handful of connections.
  2. Plan Your IP Space: Because Hub address spaces cannot be changed after creation, treat your IP planning as a permanent foundation for your network.
  3. Prioritize Security: Use the "Secured Virtual Hub" feature to integrate Azure Firewall directly into the routing path. Do not treat security as an afterthought.
  4. Automate Everything: Use CLI, PowerShell, or IaC tools to manage your Hub configurations. This prevents manual configuration drift and makes troubleshooting significantly easier.
  5. Monitor Performance: Keep a close eye on gateway metrics. Proactively scaling your gateway units prevents performance issues before they impact your users.
  6. Use Custom Routing for Segmentation: Don't settle for default connectivity. Use custom route tables and associations to enforce logical network isolation between different environments (e.g., Dev vs. Prod).
  7. Leverage Global Backbone: Trust the Microsoft global network. By connecting your Hubs, you gain high-speed, reliable transit across regions that you would otherwise have to manage yourself over the public internet.

By mastering the configuration of the Virtual WAN Hub, you transform from a network administrator managing individual links into a network architect controlling a global, high-performance ecosystem. This transition is vital for modern cloud infrastructure, where the speed of deployment and the reliability of connectivity are the primary indicators of a successful organization. Take the time to practice these configurations in a sandbox environment, experiment with custom route tables, and always keep your IaC scripts updated. Your future self—and your users—will thank you for the stability and simplicity you have built into the network.

Not read yet

Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.