Azure – Networking – Part 2 – Azure Virtual Network (Vnet)

Hello Friends,

Let’s continue with Azure Networking. As said in my last article, I am going into explore each component in details level. Today in this article we will discuss on Azure Virtual network (Vnet). An Azure Virtual Network (VNet) is a representation of our own network in the cloud. It is a logical isolation of the Azure cloud dedicated to your subscription.It provides following benefits.

  • Bring our own networks.
  • Allow to create subnets with our private IP addresses.
  • Bring our own DNS or use Azure – Provided DNS.
  • Secure with Network Security Group ACLs.
  • Control traffic flow with User Defined Routes.

Create New Azure Virtual Network Using Azure Portal:

1. Connect to your Azure portal dashboard using your subscription account. If you don’t have any subscription, in that case you can get trial Azure subscription with one-month of validity. Then you can connect to the azure portal dashboard as in following figure.

Figure 1: Azure – portal dashboard

2. On the left side menu of the screen, select Create a resource >  Networking > Virtual network. In Create virtual network page, enter or select the information like Name, Subscription, Resource Group, Location, Subnet – Name ( currently I have set the default one), Subnet – Address range. Here I have set the default address range for Subnet .

One more important information need to be set. One is Virtual Network address space . One should think and planed well before creating the V-Net. It Specifies the number of the IPs provided by the virtual network. There is a calculation on this by considering teh IP mask. By default the Vnet Address space is 10. 1.0.0/16. This means, the first two section is fixed and the Vnet will provide the address between 10.1.0.0 to 10.1.256.256 (65536 addresses). And later we will see how can we divide the total address among multiple Subnets. 

Following image shown an example of  V-Net  with  only  256  Addresses.


Figure 2 – Azure Virtual Network with 256 addresses

Following image shown an example of  V-Net  with  only  65536  Addresses.


Figure 3 – Azure Virtual Network with 65536 addresses

3. Leave the rest of the value as defaults and select Create button as shown in the above image. It will take couple of seconds to create the Virtual Network as shown in the following image.

Figure 4 – Azure -newly created Azure Virtual network
Figure 5 – Azure -newly created Azure Virtual network Overview

Create New Azure Virtual Network Using Power Shell :

In the above example we have covered, how to create Virtual Network through Azure Portal. Now we will create a virtual network using Power Shell in a different resource group.So let’s create  a new  resource group in a  different region for the new VNet.

Before we proceed to use the power shell , Open Cloud Shell in our browser or Click the Cloud Shell button on the menu in the upper right of the Azure portal as shown in the following figure. Those modules are pre-installed and easy to use. We can also install and use PowerShell locally .

Figure 6 – Azure – Open Cloud Shell

Now once we are ready with powershell editor let’s first create a new resource group with New-AzureRmResourceGroup and then Create a virtual network with New-AzureRmVirtualNetwork. the following example creates a new virtual network named ManasVirtualNetwork in the EastUS location:

Figure 7 – Azure – Creating VNet Using Power Shell
Figure 8 – Azure – Created New VNet using Power Shell

Create a virtual network using the Azure CLI :

Now we will create Azure Virtual Network using Azure CLI. Before we proceed to use the Azure CLI , Open Cloud Shell in our browser or Click the Cloud Shell button on the menu in the upper right of the Azure portal as shown in the above figure 6. Those modules are pre-installed and easy to use. We can also install and use Azure CLI locally .

Let’s create a resource group to host the virtual network if not exists yet. Create a resource group with az group create and Create a virtual network with az network vnet create. Following scrip is doing all the magic as we can see in the following figures.

Figure 9 – Azure – Creating New VNet using Azure CLI
Figure 10 – Azure – Created New VNet using Azure CLI
Figure 11 – Azure – Created all 3 VNet using different Approaches

In upcoming articles , we will discuss more on the best practices, to configure/planning Azure networking topology.

Thanks for reading  🙂

Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more. If you have any suggestion / feedback / doubt, you are most welcome.

Stay tuned on Knowledge-Junction, will come up with more such articles.

Advertisements

Comments

2 comments on “Azure – Networking – Part 2 – Azure Virtual Network (Vnet)”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.