The Wayback Machine - https://web.archive.org/web/20241006094417/https://www.geeksforgeeks.org/microsoft-azure-virtual-network/
Open In App

Microsoft Azure – Virtual Network

Last Updated : 06 May, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Pre-requisite: Azure

Whenever an organization moves from on-premises to a cloud-like Azure, they require the same networking functionality as they had in on-premises deployment with some level of network isolation. Azure provides different networking components to carry out these functionalities and services. One of them is the Azure virtual network (VNet).

What is Azure Virtual Network?

It is a representation of the on-premises network on the cloud. It helps us logically isolate the Azure cloud network dedicated to our subscription. It helps us to manage and provision virtual private networks in Azure, link the virtual networks with other virtual networks in Azure, or with on-premises IT infrastructure and networks that help us create hybrid or cross-premises solutions. 

Each virtual network we create has its own Classless Inter-Domain Routing (CIDR) block and can be linked with other virtual and on-premises networks of the CIDR blocks that do not overlap. We also have control of DNS server settings and segmentation of the virtual networks into the subnets.

Microsoft Azure - Virtual Network

 

How Does Virtual Networking Work?

Virtual networking is used to make a connection between resources and services within the Azure cloud environment. Virtual networking is like an isolated environment Like It can offer capabilities like private IP address space, network security groups, and routing tables apart from your on-premises network.

How Virtual Network Works in Azure:

  1. Virtual Networks: Virtual network is a logically isolated network where we maintain our virtual machines and other resources.
  2. Subnets: Subnets are part of a virtual network where we can group all of them based on our requirements like functionality, security, and based on other requirements. With the subnets, we can control the incoming traffic to our application. 
  3. Routing: Routing is used to direct the traffic between virtual machines and resources placed in a virtual network.
  4. VPN and Express Route: We connect to a virtual network in Azure from on-premises in two ways by using VPN(Virtual Private Network) for secure connection or we can use Express route for dedicated private connection.

You can build a flexible, scalable, and secure cloud architecture in Azure that is tailored to your company’s needs by leveraging virtual networking.

Examples of Virtual Networking

A virtual network is a fundamental component of Azure Cloud that provides flexibility, scalability, and secure network connectivity. Some of them are mentioned below

  1. Azure Load Balancer: The load balancer can distribute the traffic across multiple virtual machines in a virtual network. To distribute traffic to various apps or microservices, the load balancer and Azure Application Gateway can function together.
  2. Azure VPN Gateway: A virtual device called Azure VPN Gateway offers a safe connection between your on-premises network and an Azure Virtual Network. A secure tunnel is built between the on-premises network and the Azure Virtual Network using VPN Gateway and the IPSec protocol.
  3. Azure ExpressRoute: With the help of ExpressRoute we can establish a dedicated, private connection between on-premises infrastructure and Azure virtual network. ExpressRoute routes public traffic faster and more securely.
  4. Azure Firewall: A virtual firewall called Azure Firewall gives resources inside an Azure Virtual Network network security. In accordance with application- and network-level policies, Azure Firewall is able to examine and filter traffic.

Usage of Virtual Networks 

Virtual networks help us in many ways. Some of its use cases are as follows: 

  • Create a Dedicated Private Cloud-Only Virtual Network: This solution can be used when we don’t require a hybrid configuration. When we create a virtual network, our virtual machines and services within it can communicate directly and securely with each other in the cloud. We can still configure endpoint connections for our services and virtual machines which requires internet communication. 
  • Extend Our Data Center with Security: Site-to-site virtual private networks use IPSEC to provide us with a secure connection between our corporate virtual private network gateway and Azure. We can use this to securely scale our data center’s capacity. 
  • Create Cross-Premises Scenarios: Virtual networks help us securely connect cloud-based applications to any on-premises system such as Unix systems and mainframes. It gives us the flexibility to support a range of hybrid or cross-premises solutions.

Subnets: Subnets help us get logical divisions within our network which help us increase performance, improve security and make it easier to manage the network. A virtual network can be segmented into one or more subnets. Each and every subnet contains a range of IP addresses that fall within the virtual network address space. This range should be unique within the address space and not overlap with other subnet address ranges. The address space should be specified using CIDR.

Elements of Azure Virtual Network

  1. Subnets: Subnets can be used to split up a virtual network into smaller, simpler networks. It is possible to designate each subnet to a different security zone and control traffic between subnets using network security groups.
  2. Network Security Groups: Network traffic between subnets or between virtual machines (VMs) inside a subnet is filtered using NSGs. The source or destination IP address, port number, or protocol can all be used to define rules in an NSG that allow or refuse communication.
  3. Virtual Network Interface Cards:  Virtual Network Interface Cards will help our VMs to other resources via the internet. Each VM can have more than one NIC.
  4. Virtual Private Network Gateway: Virtual Private Network Gateway (VPNG) technology can link on-premises resources to cloud resources.
  5. Azure Application Gateway: You may manage and scale web applications using the load balancer for web traffic known as Azure Application Gateway. It offers SSL offloading, URL-based routing, cookie-based session affinity, and web application firewall (WAF) features.

Creating Virtual Networks

We can create new virtual networks at any time or add virtual networks whenever we create a virtual machine. We have to define the address space and at least one subnet when creating the virtual network. 

By default, we can create up to 50 virtual networks per region in a subscription. We can also increase the limit up to 500 by contacting Microsoft Azure support.

Step-By-Step Demo of Creating Azure Virtual Machine And Virtual Network

Step 1: Navigate to your Azure portal.

Azure Console

 

Step 2: Click on the Create resource option. You will be listed with different resources that can be deployed on Azure.

Search Virtual Network

 

Step 3: Type in a virtual network in the search bar. Click on Create option.

Virtual Network

 

Step 4: You will be prompted to fill in details about the virtual network we wish to create. 

Step 5: In the basics, tab fill in the required details

  • Subscription: The subscription in which you wish to create the virtual network.
  • Resource Group: Choose the resource group where you wish to create the virtual network. You can create a new resource by clicking on create a new option.
  • Name: Enter the name of your virtual network.
  • Region: Choose the region for your virtual network.
Create Virtual Network

 

Step 6: Click on the Next: IP Addresses button. In the IP Addresses tab enter the following details

  • IPv4 address space: Enter the IPV4 address range in CIDR notation (e.g. 192.208.9.0/32).
  • Subnet: Create a subnet for your virtual network. There should be at least one subnet.
Configure Ip addresses.

 

Step 7: Click on ‘Next ‘: Security tab and choose the security settings you wish for your virtual network.

Select Security Groups

 

Step 8: Click on the review + create option. Wait for all the validations to pass. 

Review+Create

 

Step 9: Click on create option to create your virtual network.

Virtual Network Created

 

This is how we can create an Azure virtual network. It serves as the fundamental building block for our private network in Azure. The virtual network is similar to a traditional network that we operate in our data centers with additional benefits of cloud infrastructure like scalability, isolation, and availability. 

Azure IP addressing is critical in ensuring that all the resources are accessible. Private IP addresses are used to communicate between resources in Azure while public IP addresses are used to access Azure resources directly through the internet.  

Advantages of Using Azure Virtual Network

  • You may build a secure, segregated network environment with Azure Virtual Network that only permits authorized access. To manage network traffic and stop illegal access, you can employ network security groups, firewall rules, and virtual private networks (VPNs).
  • It is possible to link Azure Virtual Network with other Microsoft Azure services including the load balancer, autoscaling, azureVPN gateway, and application gateway.
  • We may modify our network in accordance with our needs thanks to Azure Virtual Network. We can adjust our IP addresses, subnetting, and routing to meet the needs of our applications.
  • We can create a multi-region network that is spanned across the multi-region. 
  • You can scale your network resources up or down with Azure Virtual Network according to your business demands without experiencing any downtime.

Getting Familiar With IP Addressing And IP Subnetting

To Know more about IP addresses please refer to the What is an IP Address?  and Introduction To Subnetting. 



Previous Article
Next Article

Similar Reads

Microsoft Azure - RDP to Azure Virtual Machines using Azure Bastion
In this article, we will learn how to do RDP(Remote Desktop Protocol) / SSH(Secure Shell) Connection to an Azure VM using Azure Bastion. First, let's discuss Azure Bastion. The Azure Bastion service is a fully platform-managed PaaS service that you provision inside your virtual network. It provides secure and seamless RDP/SSH connectivity to your v
3 min read
Microsoft Azure - Setting up a Auto Shutdown For Azure Virtual Machine
Setting up an Auto-shutdown will help in reducing the cost of azure virtual machines. This setup is very useful during non-working hours as it saves cost and is a good practice for working with VMs in Azure. Implementation: Follow the below steps to set up auto-shutdown of Azure Virtual Machines: Step 1: Login to Azure Portal at https://portal.azur
2 min read
Microsoft Azure - Resize a Azure Virtual Machine for Windows or Linux Servers
In this article, we will look into the process of resizing Azure VM size for Linux and Windows servers. Implementation: Follow the below steps to resize a Azure Virtual Machine with new size. Note: The Process is same for both the Windows and Linux OS Servers. Step 1: Log in to Azure Portal. Step 2: Go to Virtual Machines and select your Virtual Ma
2 min read
Microsoft Azure - Track CPU Utilization of a Azure Virtual Machines using KQL Log Query
In this article, we will look into the process of finding the Minimum, Average, and Maximum CPU Utilization of all Azure Virtual Machines using KQL Log Query. Here the Perf KQL Counter Operator is used to find Azure Virtual Machines performance from collected data logs. Implementation: Follow the below steps to Run the Log Queries. Step 1: Log in t
4 min read
Microsoft Azure - Retrieve Azure Virtual Machine Admin User Name
In this article, you will get to know, how you can find an azure Virtual machine admin user name in crucial situations to recover an azure VM Username. Purpose - this username will help you to reset an azure VM password in the absence of Admin or else if some forget or In case of verifying the username. Implementation: Follow the below steps to fin
1 min read
Microsoft Azure - Manage Virtual Machine via Azure Mobile App
In this article, you will get to know how to stay connected and in control of Azure virtual machines while using the Azure mobile app. The Azure mobile app is also called a VM app. Implementation: You would see the metric chart and find that spike visually via the chart and then you have those commands available for you that you can just in one cli
2 min read
Microsoft Azure - Get Azure VM Properties using Azure PowerShell
The purpose of using the Azure PowerShell Commands is to quickly analyze the overall properties of VM/VMs at once the filtering the with select and where conditions. To find the properties of an Azure VM, you can perform the following commands in Azure Cloud Shell to get the details. Command: Get-AzVM Output: 1. Get all properties of an Azure Virtu
2 min read
Microsoft Azure - Configure Azure SQL with Azure CLI
In this article, we're going to take a closer look at how you can configure something like connectivity using the Azure CLI. What we have here is we are in Azure Data Studio and similar to the SQL notebook we are actually using a PowerShell notebook. That just means all our code cells are going to run PowerShell and we are just connecting to localh
4 min read
Microsoft Azure - Get CPU Utilization Data of a Azure VM in Azure Portal
Azure Virtual Machines (VM) is one of several types of on-demand, scalable computing resources that Azure offers. In this article, we will look into the process of getting the CPU Utilization data of an Azure VM in Azure Portal. Implementation: Follow the steps to get the CPU Utilization of an Azure VM in Azure Portal: Step 1: Log in to your Azure
2 min read
Microsoft Azure - Archive Azure VM to Azure Storage Account
In this article, we will be implementing a solution to archive a select azure VM snapshot to a select storage account for archiving using azure cloud shell. For implementation, we will be using Azure CLI commands. Prerequisite:VM SnapshotA storage account is neededUser needs "Storage Blob Contributor Data" IAM Role Access on Archiving Storage Accou
2 min read
Microsoft Azure - Check Status of Azure VM using Azure PowerShell
The following Azure PowerShell command helps you to find the Azure VM Config and properties details of Os Name, Os Version, Hyper V Generation, Disks properties, Extensions properties of Type Handler Version, Status and Message, VM Agents properties of Type Handler Version, Status and Message and also VM Power Status Codes, Messages, Plugins, Time
3 min read
Microsoft Azure - Azure VM Disk Space in Percentage using Azure KQL
Here we'll be using the Azure Insights Metric Query to find the free disk space in percentage using KQL. The purpose of this query is to find disk drive free space of all the Azure VMs without logging into every server. You can Run the following KQL log Queries in Azure Monitor or Azure VM Logs or Log Analytics Workspace. Note: VM Insights Agent sh
1 min read
Microsoft Azure - Enable Azure Monitor VM Insights Agent For Azure VM
Azure Monitor VM Insights Agent enables you to get more visibility into the health and performance of your Azure VM. Here we'll see how we can enable Azure Monitor VM Insights to monitor the health, performance, and dependencies of azure virtual machines. Implementation: Follow the below steps to enable Azure Monitor VM insights agents for an Azure
2 min read
Microsoft Azure - Azure CLI Commands to Manage Azure VMs
Azure Command-line interface is used to manage or to create Azure resources. By using the simple AZ CLI command we can manage Azure VM quickly and at a Scale. Let's get started by using a few important Azure CLI commands to manage Azure Virtual Machines. 1. Start a Specific Stopped VM in a Select Resource Group Use the below command to start a spec
2 min read
Microsoft Azure - Manage Azure VMs using Azure PowerShell Commands
Here we are using Azure PS Commands to manage azure resources from Azure Cloud Shell or by using Windows PowerShell. By using the simple AZ PS command we can manage Azure VM Quicks without any efforts of navigating in Azure Portal and at Scale. Let's get started by using the major Azure PS commands to manage Azure Virtual Machine. 1. Start a Specif
2 min read
Microsoft Azure - Query Azure Storage Logs in Azure Monitor Log Analytics
Pre-requisite:- Azure Log Analytics is a tool offered by Azure, which is used to edit and run log queries against data in the Azure Monitor Logs store and helps interactively analyze their results. One can easily use Log Analytics queries to retrieve records that match particular criteria, identify trends, analyze patterns, and provide various insi
5 min read
Microsoft Azure - Install Azure Command Line Interface (Azure CLI)
Azure CLI is a very powerful tool that can be used to automate tasks, create, update, manage or delete azure resources or to troubleshoot problems with az module cmdlets. By installing az modules on your system or on your development system you and your development team can easily create, update or manage Azure AD and Azure resources such as manage
4 min read
Microsoft Azure - Map a Network File Share to Azure Windows VM
In this article, we will see or learn to connect an azure storage account file share to an azure windows server or azure Windows VM using a network share. Azure File share is used to store the data or it can be used to share data from the azure server to the storage account or vice versa. The advantage of using is file share is secure and data shar
3 min read
Microsoft Azure- Backing Up, Restoring, and Cloning Microsoft Azure App Services
Microsoft is well known for developing relevant software which are using in today's time of technology to conquer the demand of users and developers to build up applications. In sequence of it Microsoft introduces Azure well known as Microsoft Azure to make quality applications. In this article, we will discuss Backing up, restoring and cloning Mic
8 min read
Microsoft Azure -Create a User in Microsoft Entra ID from Azure Portal
A user in Microsoft Entra ID is an individual who can get access to Azure identity. This Microsoft Entra ID identity can be used to access applications and resources that are protected within the organization or project. Users can be created manually or automatically, and they can be assigned to groups and roles to control their access permissions.
3 min read
Microsoft Azure- Disk Storage in Microsoft Azure
Azure Disk Storage is the only shared cloud block storage that supports both Windows and Linux-based clustered or high-availability applications via Azure shared disks. There are two types of Disks in Azure : Managed Disks Unmanaged Disks.Managed DisksSimplest optionLower management overhead as Azure manages the storage accounts.Only LRS replicatio
6 min read
How to Delete Virtual Network in Azure
We often create virtual networks in Azure to manage and maintain our virtual machines. When the virtual machines or resources are no longer needed, we manage them by deleting the virtual machines, and sometimes we may also find the virtual network is no longer needed. We may find the VNET no longer needed considering the factors including resource
6 min read
What is Azure Virtual Network Peering ?
Imagine we have a virtual network named vnet1 which has address space assigned dynamically and subnets under that. so, the resources can be connected to subnets and they will be assigned with static Ip address. The resources which are connected to subnets can communicate with each other unless we restrict them. This is a default behavior. Similarly
5 min read
How to Create Virtual Network in Azure using PowerShell ?
Microsoft Azure provides various resources and services to provide us with a scalable environment for development and testing processes. Azure provides a virtual machine service, which allows us to leverage the resources virtually. We may have more than one virtual machine as a resource, according to our requirements. To manage and monitor our virt
9 min read
What is Azure Virtual Network Manager
If you think about it, in the big picture of cloud computing, network management is a critical functionality for proper operation and communication signaling across disparate nodes. Of course, Microsoft Azure offers you quite a bit more than just this and that is what we are going to explore shortly but again, the topic of Azure Virtual Network Man
11 min read
What is An Azure NVA (Network Virtual Appliance)
Businesses are rapidly moving to the cloud which leads to the extreme importance of strong network infrastructure and security. Find out how Microsoft Azure had multiple tools and services to help you do this migration easily. Within this landscape can be found tools such as Network Virtual Appliances (NVAs), which is a key component in increasing
9 min read
How to Change Virtual Network/Subnet in Azure VM
Before diving into how to change a VM's subnet, let's understand what a subnet is. Subnet Definition: A subnet, also known as a subnetwork, is a segmented portion of a larger virtual network. It allows you to divide your Azure network into smaller, more manageable sections. This approach enhances network security and performance by:Confining traffi
5 min read
Microsoft Azure - Reduce Cost Using Virtual Machine
In this article, we will look into tips to save costs with Azure VMs. Here, we'll explore five tips that will help you to reduce the costs of your Azure VMs. Let's start by creating a VM. Here in the Azure portal, we click on "Create Resource". And then select the "Compute" category and select a "Virtual Machine." We'll start by selecting a resourc
2 min read
Microsoft Azure - Managing Multiple Virtual Machines
In this article, we will look into how to easily start, restart, or stop multiple VMs in Microsoft Azure. You may already know that you could start, stop, and even delete VMs inside of the Azure portal. But did you know that you could do these operations to multiple VMs at the same time? Let's go over to the virtual machine section. Here we have tw
2 min read
Virtual Machines in Microsoft Azure
Before we move on with how to deploy and use virtual machines in Microsoft Azure let's know a few things. A Virtual Machine (VM) is like any physical laptop, smartphone, or server that we use in our day-to-day life. It has features like CPU, memory, storage size, and different networking ports with boot disk similar to the gadgets mentioned above.
4 min read
Article Tags :