Module 2 · Configure Virtual Network Peering
MS Learn: Configure Azure Virtual Network Peering ·
learn.wwl.configure-vnet-peeringModule note for Path MOC
Overview
Connect separate VNets so they can talk to each other with near-LAN performance via the Microsoft backbone. The module covers when to peer, how to enable gateway transit, and how to do hub-and-spoke / service chaining with UDRs.
Learning objectives (from Microsoft Learn)
In this module, you learn how to:
- Identify usage cases and product features of Azure Virtual Network peering.
- Configure your network to implement Azure VPN Gateway for transit connectivity.
- Extend peering by using a hub and spoke network with user-defined routes and service chaining.
Units
- Introduction
- Determine Azure Virtual Network peering use cases
- Determine gateway transit connectivity
- Create peering
- Determine service-chaining use cases
- Interactive lab: Configure VNet peering
- Knowledge check
- Summary and resources
Concepts introduced
- Virtual Network peering — direct non-transitive VNet-to-VNet link.
- User-defined routes (UDRs) — used for service chaining (spoke→hub traffic).
- VPN Gateway — gateway transit for spoke-to-on-premises reachability.
- Virtual WAN — alternative managed hub-and-spoke model.
Key terms & commands (Azure CLI)
az network vnet peering create -g <rg1> --name peer-1to2 --vnet-name <vnet1> --remote-vnet <vnet2-id> --allow-vnet-access
az network vnet peering create -g <rg2> --name peer-2to1 --vnet-name <vnet2> --remote-vnet <vnet1-id> --allow-vnet-accessHands-on
- Create two VNets with non-overlapping ranges, peer them (both directions), and verify VM connectivity.
- Enable gateway transit on the hub and use remote gateways on a spoke; confirm spoke→on-prem path.
- Add a UDR on a spoke to force traffic through the hub’s Firewall/NVA (service chaining).
Exam focus
- Peering is non-transitive — the classic gotcha.
- Each VNet needs its own peering link (both sides).
- No overlapping address spaces between peered VNets.
- Gateway transit (hub) + use remote gateways (spoke) settings.
Related
Path MOC · vnet-peering · vnet · route-table · vpn-gateway · virtual-wan