Monday, August 31, 2020

vNet to vNet Peering in Azure

 Description: Here I have explained, what is peering in vNet and how to configure it

What is vNet Peering in Azure: Virtual network peering enables connection between 2 seamless network. The traffic between virtual machine uses the microsoft backbone infrastructure 

Azure supports two types of peering:

  1. Virtual network peering: Connect virtual networks within the same Azure region.
  2. Global virtual network peering: Connecting virtual networks across Azure regions.
Benefits of virtual network peering

  • A low-latency, high-bandwidth connection between resources in different virtual networks.
  • The ability for resources in one virtual network to communicate with resources in a different virtual network.
  • The ability to transfer data between virtual networks across Azure subscriptions, Azure Active Directory tenants, deployment models, and Azure regions.
  • The ability to peer virtual networks created through the Azure Resource Manager.
  • The ability to peer a virtual network created through Resource Manager to one created through the classic deployment model. To learn more about Azure deployment models, see Understand Azure deployment models.
  • No downtime to resources in either virtual network when creating the peering, or after the peering is created.
How to configure vNet Peering?
  • First we create 2 vNet and One virtual machine on each vNet using different subnet as define in below image. 

  • Create virtual network from azure portal
  • Fill all require details and create 2 virtual network with different IP address space
VNet01

VNet02
  • After creating two virtual network, now we are going to create 2 virtual machine in each VNet
  • After create 2 VM check topology using network watcher 
  • After creating 2 VM verify connection between VM by ping each other machine. Currently you are not able to ping each other. For ping you need to allow ICMP in each VM NSG [Network Security Group]
  • Create Peeing from one VNet to another. We need to create peering for one Vnet it will automatically create for another VNet. If you want to allow only one way then disable network access. 

  • Now you are able to ping VM each other 
  • I have disable peering from VNet01 to VNet02 and your communication will drop
  • Now You are able to see peering between 2 VNet in topology under network watcher

No comments:

Post a Comment