Configure vNet Peering in Azure

Lab overview

In this lab, you'll learn how to create and configure Virtual Network (vNet) Peering in Azure. vNet Peering allows you to connect two virtual networks, enabling low-latency, high-speed communication between them as if they were part of a single network.

You'll walk through the process of setting up bi-directional peering between two virtual networks, ensuring secure communication and resource access across the networks. By the end of the lab, you'll have a fully functional vNet Peering setup, allowing for efficient network connectivity between isolated virtual networks.

Why you'd do this

Virtual networks are isolated by design. A VM in vNet-App can't reach a database in vNet-Prod any more than it can reach a server in another company, even though both networks sit in the same subscription. That isolation is a feature right up until the application tier needs to talk to the data tier, and then you need a way to connect the two without routing everything through the public internet. vNet peering is that way: traffic between peered networks rides Microsoft's backbone, stays private, and runs at the same speed as traffic inside a single vNet. It's the standard answer whenever two vNets in the same organization need to talk, and it's the mechanism behind the hub-and-spoke topology that AZ-305 and AZ-700 both expect you to know.

The part that trips people up is that a peering is really two links, one in each direction, and both have to exist before traffic flows. Older versions of the portal made you create them separately on each vNet; the current wizard builds both from one side, which is why you name two links in this lab, prod-app and app-prod. Naming them so the direction is obvious pays off later, because a peering that shows Connected on one side and Disconnected on the other is a classic troubleshooting scenario and the link names are how you tell which half is missing.

Two things to keep in mind as you click through. Peering only works if the two address spaces don't overlap, which is why the vNet lab before this one made such a point of planning them. And peering is not transitive: if App peers with Prod and Prod peers with Shared, App still can't reach Shared without its own peering or a hub that routes for it. The additional settings you scroll past control whether the peered network can reach a gateway or forward traffic, and the defaults are right for a straightforward two-network connection.

For certification prep, configuring virtual network peering is an AZ-104 objective, network topology and hub-spoke design appear in AZ-305, and peering is foundational AZ-700 material.

Lab details

  • Source vNet: vNet-App
  • Target vNet: vNet-Prod
  • Peering link (App → Prod): prod-app
  • Peering link (Prod → App): app-prod
  • Connection type: Bi-directional peering

Learning objectives

  1. Understand how to navigate the Azure portal to manage virtual networks.
  2. Learn how to create vNet Peering between two Azure virtual networks.
  3. Gain hands-on experience configuring and naming peering links to ensure proper management and tracking.
  4. Understand the importance of bi-directional peering for secure communication between networks.
  5. Verify the successful creation and functionality of vNet Peering in the Azure portal.

Exam relevance

  • AZ-104 — Azure Administrator — Configure virtual network peering, Manage network connectivity, Implement inter-network communication.
  • AZ-305 — Azure Solutions Architect — Design network topology, Plan virtual network connectivity, Implement hub-spoke architectures.
  • AZ-700 — Azure Network Engineer — Design and implement vNet peering, Configure network routing, Manage network traffic flow.

Step-by-step instructions

  1. Click Virtual networks in the Azure portal to view all virtual networks in your subscription.
  2. Click on vNet-App to open its overview page.
  3. Click Peerings in the left-hand menu to manage peering connections for vNet-App.
  4. Click Add to begin creating a new peering connection.
  5. Configure the peering link from vNet-App to vNet-Prod:
    • Enter prod-app as the peering link name.
    • Click the Virtual network dropdown and select vNet-Prod.
  6. Configure the reverse peering link from vNet-Prod back to vNet-App:
    • Enter app-prod as the second peering link name.
  7. Scroll down to review all additional peering settings.
  8. Click Add to create the peering connection.
  9. Confirm the new peering appears in the peerings list under vNet-App, verifying the bi-directional connection is active.

An Introduction to Microsoft Entra ID

Learn what you need to know to get started with Microsoft Entra ID with this easily-digestible 5-hour bootcamp from best-selling instructor, Thomas Mitchell.

Disable these ads by becoming a labITpro Supporter!

Azure vNets Explained

Want to learn about Azure virtual networks? In this quick-hitting explanation, you’ll learn what they are, what they do, and you’ll learn about key Azure vNet features.

Disable these ads by becoming a labITpro Supporter!