Articles → MICROSOFT AZURE → Virtual Network Peering In Azure

Virtual Network Peering In Azure






Purpose





Types Of Peering


  1. Virtual network peering → This type of virtual network peering creates peering between the virtual network within the same Azure region
  2. Global virtual network peering → This type of virtual network peering creates peering between the virtual network across Azure regions

Steps




  1. Create a virtual network
  2. Create virtual machines
  3. Accessing one virtual machine from other
  4. Virtual network peering comes into the picture
  5. Output

Create A Virtual Network




Picture showing address spaces of two virtual networks
Click to Enlarge


Create Virtual Machines




Picture showing two virtual machines mapped to two different virtual networks
Click to Enlarge


Accessing One Virtual Machine From Other




Picture showing the error message when one virtual machine is trying to access second virtual machine by using the private IP address without peering
Click to Enlarge




Virtual Network Peering Comes Into The Picture




  1. Go to the Peerings submenu in any of the virtual networks. For this example, I am working on vNet1
  2. Click on the + Add button
  3. Picture showing the add button for adding the new peering between the virtual machines
    Click to Enlarge

  4. A screen will appear to enter the information
  5. Picture showing the add peering screen in Azure
    Click to Enlarge

  6. Enter the required information and click on the Add button
  7. Once the button is clicked, 2 virtual network peering resources will be created (one for each virtual network)
  8. Picture showing the notification while adding the peering in both the virtual networks
    Click to Enlarge





Output




Picture showing the IIS home page when one virtual machine is trying to access second virtual machine by using the private IP address after peering is done
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Saturday, May 8, 2021
 
Updated On  -  Sunday, September 26, 2021

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250