Establishment of a VNet Peering within Microsoft Azure [Exclusive Guide]

4:45 am February 19, 20178924

the updates and new features are so regular and recurring on Azure that it is sometimes difficult to follow… Since end of 2016, it is now possible to interconnect 2 Virtual Networks through a VNet Peering . And the advantage is that this feature is very simple to implement, it is enough to just a few clicks. Only one constraint, the resources in question must belong to the same region (West Europe, North Europe, etc.).

I propose to see it via a simple test.

Step 1 – Prerequisites

first of all we need to create some resources at the level of your subscription in Azure. For my part, I have several different subscriptions, so to make the test more interesting I’ll create my resources on 2 different subscriptions.

Resource Group 1 :

  • 1 resource separate group: VM1 ,
  • 1 VM called VM1 and its associated account storage (possibly a public IP according to what you want to do),
  • 1 virtual partner network: VM1-vnet with for IP address: 10.221.0.0/24 (and a subnet associated by default with the same beach)
  • ,

  • location: West Europe ,
  • Subscription: Visual Studio Premium with MSDN .

Resource Group 2 :

  • 1 resource separate group: VM2 ,
  • 1 VM called VM2 and its associated account storage (possibly a public IP according to what you want to do),
  • 1 virtual partner network: VM2-vnet with for IP address: 10.133.0.0/24 (and a subnet associated by default with the same beach)
  • ,

  • location: West Europe ,
  • Subscription: Visual Studio with MSDN Enterprise .

In this example, you will notice the 2 following things:

  1. the VNet Peering is possible that breast of a same location (in my case West Europe),
  2. I created my 2 resource groups within 2 different subscriptions.

Step 2 – Activate the VNet Peering

as the name VNet Peering takes place directly at the level of the Virtual Network (VNet) objects. Finally, note that we will need to perform this procedure on 2 occasions: once to create an interconnection in the sense VM2-vnet to VM1-vnet then again VM2-vnet to VM1.vnet .

Let’s start with the first VNet VM1-vnet . Once you select in the menu on the left to Peerings .

In the new window that appears:

  • choose a name for your peering: Peering-VNet1-to-VNet2 (for example)
  • Resource Manager,
  • choose your subscription and then simply select the another VNet to which you want to establish an interconnection.

As you can see the status is for the moment in Initiated because we have to perform the same procedure in either direction of the VNet2 to VNet1 .

We’re going on the VNet 2 and we realize the same operation by choosing as the name for our peering: Peering-VNet2-to-VNet1 .

After a few moments and as soon as you have created 2 interconnections, you will see the connection status will pass in a Connected state of .

Step 3 – Test

our VNet peering is now in place. We just what to check. The basic principle is that our VM 2 (and in general the 2 VNet with all those they contain) are now interconnected. So we should respectively reach one from the other…

Check this in RDP. Once logged in on one of the VM 2, we can see that it is possible to PING each other or connect to RDP to the second from the first! 🙂

in my case, I have the following IP: VM1 / 10.221.0.4 & VM2 / 10.133.0.4 .

Don’t forget to configure the Windows firewall, which, by default, does not allow PING – otherwise the test will fail.

For a limited time for a migration or any other need longer term… it is really very simple and quick to set up. 😉

further, the official video presentation of Microsoft .