How to Configure Azure VNet-to-VNet

Learning Center | Cloud Networking | How to Configure Azure VNet-to-VNet

 

Learning Objectives

After reading this article you will be able to:

  • What is Azure Virtual Network
  • Capabilities of Azure VNET
  • Creating the second virtual networks
  • Configuring two virtual networks
  • Communicate between the VM’s

 

CLOUD NETWORKING ARTICLES

What is a Hybrid Cloud Network?
What is Terraform and Infrastructure as Code?
What is AWS VPC Peering?
What is Transitive Routing?
Azure Networking Fundamentals
Microsoft Azure VNet Features
Azure Virtual Private Network (VPN)
How do I configure Azure VNet to VNet

 

How to Configure Azure VNET to VNET

Imagine if you could connect and monitor multiple devices or perhaps computers from a central machine; it makes the connection to those devices easier and smarter than if you had to be present at every location. Well, that’s literally what the Azure Virtual Network is capable of doing and if you are working with Azure and you know how impactful Microsoft Azure can be, you will be interested in maximally utilizing Azure networks to meet your networking/cloud goals.

Connecting two computers can be somewhat tedious, not to mention joining two virtual networks. But with Azure in place, communication will be much better and organized with a few clicks of the mouse.

What is Azure Virtual Network?

An Azure Virtual Network (VNET) is a virtual rendition of your network in the cloud. Right from your portal, you can control and monitor your resources, policies and other settings. Interestingly, Azure provides a secure connection for your azure resources, internet-based connections, or even on-premise data centers. Usually, a VM is assigned to particular geolocation. However, virtual network peering has enabled for flexible connectivity and communications between the virtual network in various locales.

Capabilities of Azure VNET

With this technology, networking experts need not worry about the long typical process when communicating from different data centers across the world. All they need to do is to tap into the capabilities of Azure virtual network peering.

An Azure Virtual Network ensures the following capabilities are provided:

  1. Isolation and Segmentation
  2. Communicate with on-premise data centers
  3. Filtering network traffic
  4. Communicating with the internet
  5. Communicating between azure resources
  6. Routing network traffic

Since this blog is structured to teach the cloud enthusiast how to configure Azure VNET Peering, it won’t be going into much detail around peripheral topics, but you can gain more insight on the listed capabilities by clicking here to learn more.

Creating a Virtual Network

To build a virtual network, you must perform the following:

  1. Open this website http://portal.azure.com/ through your browser. You will have to sign to your account to gain access to your portal.
  2. Open the Create Resource menu and navigate to the Networking option where you click on Virtual Networks.
  3. Type the name of the virtual network menu when it opens and then configure your address space as well. Select between frontend and backend before selecting the subnet CIDR block. Other information on that page will be based on your location or purpose of work.

Creating the second virtual network

Now that your first VNET is set up, you will now create another virtual network. You can apply this simple generic values when building your virtual networks.

SETTING VALUE
Name myVirtualNetwork1
Address space 10.0.0.0/16
Subscription Select your subscription.
Resource group Select Create new and enter myFlyGroup.
Location Select West US.
Subnet Name Subnet1
Subnet Address range 10.0.0.0/24

Source: Microsoft Azure portal

    1. Complete the same steps with changes in the nameaddress spaceresource group, and subnet address range. To connect two virtual networks, every VNET will need a subnet gateway. Afterward, add a public IP address to your virtual network.

  1. To create a network gateway, you’ll need to click new on the management portal and search for virtual network gateway in the search fields. Follow the procedures and name the virtual network gateway pane you have created.
  2. Link the new gateway with the virtual network to the public IP address created in the previous steps by clicking virtual network and IP address respectively.
  3. Choose the resource group and click create.

Configuring two virtual networks

  1. Just click the new menu in the management portal and select the networking options.
  2. Click connection when the networking pane opens
  3. Give the new connection a name when the connection pane opens.
  4. When choosing the connection type, ensure you select VNET-to-VNET.
  5. Remember you will need to create a network gateway for the two VNETS. Input the two VNETS in the first and second network gateway fields respectively. Choose a long key in the Shared Key (PSK) field to establish the VPN connection between the VNets.
  6. Select an existing resource group and click create.

So here you have it, you have configured your VNET to VNET successfully if you followed the instructions outlined above.