Ends in
00
days
00
hrs
00
mins
00
secs
ENROLL NOW

Get $4 OFF in AWS Solutions Architect & Data Engineer Associate Practice Exams for $10.99 each ONLY!

How To Peer Two Azure Virtual Networks

Home » BLOG » How To Peer Two Azure Virtual Networks

How To Peer Two Azure Virtual Networks

Last updated on April 27, 2023

Organizations rely on efficient and secure communication between various infrastructure components in today’s breakneck speed and interconnected world. Virtual Network Peering is a powerful solution to address these needs by seamlessly connecting resources across different Azure virtual networks. This feature enables organizations to optimize their network performance, reduce latency, and enhance security, all while minimizing costs. In this article, we will delve into the concept of virtual network peering, explore its benefits, and how to peer two virtual networks and test the connection between the two peered virtual networks using Azure virtual machines.

Understanding Azure Virtual Network Peering

Virtual network peering allows organizations to establish a direct connection between two or more virtual networks, enabling resources within these networks to communicate as if they were part of the same network. This connection bypasses the public internet, traversing the Microsoft backbone infrastructure and ensuring secure and efficient network communication. Resources in peered virtual networks in the same region can communicate with each other with the same latency as if they were within the same virtual network.

How To Peer Two Azure Virtual Networks

Here are some things to remember:

  •  You can use network security groups to restrict access to other virtual networks or subnets.
  • The virtual networks to be peered must possess different IP address ranges that do not overlap.
  • The virtual networks to be peered can belong to the same subscription or different subscriptions.
  • Tutorials dojo strip
  • Virtual networks can be peered within the same region or across different regions. Peering virtual networks across different regions is also called Global VNet Peering.
  • If there are changes in the address spaces of your virtual network, make sure to initiate a sync after. This will not cause any downtime to your production environment.

How to peer two virtual networks

I have created the following resources for this article:

  • TDVnet1
  • TDVnet2

Our goal is to peer these two virtual networks.

1. Head over to the Azure portal, search, and click “Virtual Network“. This should take you to the Virtual Network pane.

How To Peer Two Azure Virtual Networks

 

2. Click TDVnet1 and look for the “Peerings” pane and click “Add” This will redirect you to an Add Peering pane

How To Peer Two Azure Virtual Networks

3. Leave the tick boxes to their default settings. We need to specify two peering link names in this Add Peering pane. The first is for TDVnet1, and the second is for TDVnet2. For this demo, we will name these two: TDVnet1-TDVnet2-Peering and TDVnet2-TDVnet1-Peering. Click Add once you are done naming the two peering names.

How To Peer Two Azure Virtual Networks

4. In the peerings pane, ensure the peering status is Connected.

  • Initiated: When you create the first peering, its status is Initiated.
  • Connected: When you create the second peering, the peering status becomes Connected for both peerings. The peering isn’t successfully established until the peering status for both virtual network peerings is Connected.

How To Peer Two Azure Virtual Networks

Testing the peering connection

We need to ping two virtual machines using their private IP address to test our connection. I created two virtual machines located in two Azure virtual networks.

  • TDVM1 is provisioned in TDVnet1.
  • TDVM2 is provisioned in TDVnet2.

1. The image below is before we peer the two virtual networks. How To Peer Two Azure Virtual Networks

2. After creating the peer, connect to TDMV1 again and initiate the ping command.

How To Peer Two Azure Virtual Networks

 

Get $4 OFF in AWS Solutions Architect & Data Engineer Associate Practice Exams for $10.99 ONLY!

Tutorials Dojo portal

Be Inspired and Mentored with Cloud Career Journeys!

Tutorials Dojo portal

Enroll Now – Our Azure Certification Exam Reviewers

azure reviewers tutorials dojo

Enroll Now – Our Google Cloud Certification Exam Reviewers

Tutorials Dojo Exam Study Guide eBooks

tutorials dojo study guide eBook

FREE AWS Exam Readiness Digital Courses

Subscribe to our YouTube Channel

Tutorials Dojo YouTube Channel

FREE Intro to Cloud Computing for Beginners

FREE AWS, Azure, GCP Practice Test Samplers

Recent Posts

Written by: Matt Hidalgo

Matt is a Solutions Architect for a managed services provider that specializes in AWS and Azure. After graduating from college with a degree in Geology, he decided to switch careers and self-taught himself with AWS and Azure. Matt specializes in the migration and deployment of workloads to AWS and Azure with 3 years of experience.

AWS, Azure, and GCP Certifications are consistently among the top-paying IT certifications in the world, considering that most companies have now shifted to the cloud. Earn over $150,000 per year with an AWS, Azure, or GCP certification!

Follow us on LinkedIn, YouTube, Facebook, or join our Slack study group. More importantly, answer as many practice exams as you can to help increase your chances of passing your certification exams on your first try!

View Our AWS, Azure, and GCP Exam Reviewers Check out our FREE courses

Our Community

~98%
passing rate
Around 95-98% of our students pass the AWS Certification exams after training with our courses.
200k+
students
Over 200k enrollees choose Tutorials Dojo in preparing for their AWS Certification exams.
~4.8
ratings
Our courses are highly rated by our enrollees from all over the world.

What our students say about us?