How-to Guide: Create Azure Virtual Network (Vnet)

  • Post category:Solutions
  • Reading time:12 mins read

Are you interested in getting started with Azure Virtual Network? If so, this blog post is for you. I will cover what a virtual network (Vnet) is and how to get one set up.

What exactly is a virtual network (Vnet)?

There are several definitions on the internet but one of them says: ” A virtual network provides isolation from other networks while using shared resources such as gateway, DNS servers, subnets, IP address range, SqlServer instances, etc. “

I think that is enough for us to understand what it is.

As you know Azure has several PaaS services that are used by very large companies such as Facebook, Skyscanner, and many more.

So let’s start to write down all the things we have so far about VNETs in Azure:

The virtual network provides isolation from other networks while using shared resources such as gateway, DNS servers, subnets, IP address range, SqlServer instances, etc.

Now you have all the necessary information to compare VNET with the Classic VM deployment model which is similar to an on-premise environment where everything can be connected to IaaS and PaaS together, such as Domain Controller and SQL server which will be available outside of your virtual environment.

The classic VM model is not helpful in the long term for large-scale projects where we  need to separate networks to avoid network leaks between environments or scale issues and so on.

What does it mean for us?

We can define a VNET as a self-contained private cloud inside an Azure account meaning we can deploy our workloads (websites, services) inside VNET without exposing them to the internet and do all this by applying some security rules, either IPsec VPN with custom IP ranges CIDR blocks with Network Security Groups. Well I know it sounds very complicated but if you are able to understand my previous definition, you can easily understand what I’m trying to say.

Let’s Create an Azure virtual network

  • Log in to the Azure portal.
  • Click on the All services blade and search virtual networks and click on the virtual networks tab as shown below:

Vnet

  • Now click on + Create and fill details under basics as mentioned in table 1.

Azure Virtual Network

Fields Value
Subscription Default
Resource Group Create a new resource group if you do not have one else select the existing one
Name thincloudly_vnet1
Region (US) Central US

Table 1.

  • Please click on the review + create a tab to complete the validation and once validation completes please click on create button and wait for the deployment completion.

Now we have completed the first part of the lab let’s move on to the next part wherein we have to create 2 virtual machines.

Let’s Create 2 virtual machines

  • Go to all services blade search and click virtual machines.
  • On the Virtual machine blade please click on +create and +Virtual machine.

Azure VM

  • Fill below details mentioned in Table 2. in the Basic tab
Settings Values
Subscription Select default Subscription
Resource group Create a new resource group or select an existing one
Virtual machine name thinkcloudlyVM1
Region (US) Central US
Availability Options No Infrastructure availability required
Image Windows Server 2019 Datacenter – Gen1
Size Keep Default one
Administrator account username thinkcloudly
Administrator account password Thinkcloudly@1234
Inbound port rules – **Allow select ports **
Select inbound ports RDP (3389) and HTTP (80)
Licensing Click on check box  and confirm the license eligibility

Table 2. 

  • Go to the Networking tab. It is important that the virtual machine be placed at thincloudly_vnet1. Default settings should be checked, but no changes should be made. Click on Review + Create and then click on create after Validation completes.

Azure VM

  • Continue with creating the second machine, while keeping an eye on your deployment. 
  • Now create the second virtual machine to do that please follow the 1 and 2 and fill the details in table 3
Settings Values
Subscription Select default Subscription
Resource group Create new resource group or select existing one
Virtual machine name thinkcloudlyVM2
Region (US) Central US
Availability Options No Infrastructure availability required
Image Windows Server 2019 Datacenter – Gen1
Size Keep Default one
Administrator account username thinkcloudly
Administrator account password Thinkcloudly@1234
Inbound port rules – **Allow select ports **
Select inbound ports RDP (3389) and HTTP (80)
Licensing Click on check box  and confirm the license eligibility

Table 3.

  • Go to the Networking tab. It is important that the virtual machine be placed at thincloudly_vnet1. Default settings should be checked, but no changes should be made. Click on Review + Create and then click on create after Validation completes.
  • Monitor the deployment to get completed for both of the machines.
  • You can check the status of both VMs in the Virtual Machines blade:

VM

It is time to TEST !!!

We’ll check if the virtual machines can communicate with each other during the Ping test. If this fails, we will install an ICMP rule to enable the connection. Normally, the ICMP connection is blocked.

  • Open All resources blade and check for thinkcloudlyVM1 then open Overview blade, and make sure the Status of the machine is Running. If needed, please refresh the page to see the changes.
  • On the thinkcloudlyVM1 page please click on connect and then RDP and download the file.

RDP

RDP

  • Open the RDP file from downloads click on connect

Azure Vnet 

  • Give username thinkcloudly and password Thinkcloudly@1234 to login to VM.

Azure Vnet

  • In VM click on the Start button, and in Search type PowerShell, right-click on Windows PowerShell and click on Run as administrator

Type below command to see if the machine is pinging the second machine or not:  Ping thinkcloudlyVM2

pic 10 6

Congratulations!!! We are able to ping the VM2 from VM1 this LAB is completed here.

After you finish the lab, make sure to delete or deallocate it. If it is still running, you will be charged for it and your subscription may be suspended.

Conclusion :

Azure Virtual Network (Vnet) is a networking system that allows you to create virtual private networks for your company. The Vnet system simplifies the process of creating and managing these virtual networks, which are beneficial to protect sensitive data from being accessed by unauthorized personnel or hackers. Some other benefits include flexibility with network configuration as well as having more control over how much bandwidth different office locations will need depending on their usage needs. If you’re interested in learning more about this technology, check out our blog posts and training courses on cloud technologies!

Leave a Reply