top of page
Search

How to Peer Virtual Networks in Azure: A Step-by-Step Guide

  • aferencz21
  • Jul 22
  • 2 min read

In modern cloud architectures, it's common to segment workloads across multiple virtual networks (VNets) for security, scalability, or organizational reasons. Azure Virtual Network Peering allows seamless connectivity between VNets, enabling resources to communicate as if they were on the same network.


In this post, I’ll go through the why and how of VNet peering in Azure, including a hands-on guide using the Azure Portal.


Why Use VNet Peering?

VNet peering is ideal when you want to:

  • Connect VNets across different regions (Global VNet Peering)

  • Enable low-latency, high-bandwidth communication between VNets

  • Maintain network isolation while allowing selective communication

  • Avoid the complexity of VPN gateways or ExpressRoute for intra-Azure communication


Prerequisites

Before you begin, ensure:

  • You have at least two VNets created in the same or different Azure regions.

  • You have Owner or Network Contributor permissions on both VNets.

  • The IP address spaces of the VNets do not overlap.


🔧 Step-by-Step: Peering VNets via Azure Portal


Step 1: Navigate to the First VNet

  1. Go to the Azure Portal.

  2. Search for Virtual Networks and select your first VNet (e.g., VNet-A).


Step 2: Add a Peering

  1. In the left-hand menu, click Peerings.

  2. Click + Add.

  3. Fill in the following:

    • Peering link name (e.g., VNetA-to-VNetB)

    • Remote virtual network: Select the second VNet (e.g., VNet-B)

    • Peering link name for remote network: (e.g., VNetB-to-VNetA)

    • Traffic settings:

      • Allow traffic to remote VNet: Yes

      • Allow traffic from remote VNet: Yes

      • Allow gateway transit: Optional (used for shared gateways)

      • Use remote gateways: Optional (used if the remote VNet has a VPN gateway)

  4. Click Add.


Step 3: Verify the Peering

  1. Go to both VNets and check the Peerings blade.

  2. Ensure the peering status is Connected.


ree

Test the Connection

To verify connectivity:

  1. Deploy a VM in each VNet.

  2. Ensure NSGs and firewall rules allow ICMP or TCP traffic.

  3. Use tools like ping, telnet, or Test-NetConnection to confirm communication.


📝 Notes and Best Practices

  • Global Peering incurs data transfer costs—plan accordingly.

  • DNS resolution across VNets requires custom DNS or Azure Private DNS Zones.

  • Peering is non-transitive: if VNet-A peers with VNet-B, and VNet-B peers with VNet-C, A cannot reach C unless explicitly peered.


VNet peering is a powerful feature that simplifies network architecture in Azure. Whether you're building a hub-and-spoke model or connecting workloads across regions, peering provides a secure and efficient way to scale your cloud network.


 
 
 

Comments


bottom of page