Deploy a Virtual Network (VNet) in Azure
This tutorial guides you through the process of creating and deploying a Virtual Network (VNet) in Microsoft Azure. VNets are the fundamental building blocks for your private network in Azure, enabling you to create a hybrid cloud solution and securely isolate your cloud resources.
Prerequisites
Before you begin, ensure you have:
- An active Azure subscription. If you don't have one, you can create a free account.
- Permissions to create network resources in your subscription.
Steps to Deploy a VNet
1. Sign in to the Azure portal
Open your web browser and navigate to the Azure portal. Sign in with your Azure account credentials.
2. Create a Virtual Network
In the Azure portal, search for "Virtual networks" and select it. Then, click on "+ Create".
You will be presented with a form to configure your VNet:
- Subscription: Select your Azure subscription.
- Resource group: Choose an existing resource group or create a new one. Resource groups are logical containers for your Azure resources.
- Name: Enter a descriptive name for your VNet (e.g.,
myAzureVNet
). - Region: Select the Azure region where you want to deploy your VNet.

3. Configure IP Addresses
Under the "IP Addresses" tab, you can define the address space for your VNet and its subnets.
- IPv4 address space: Specify a private IP address range for your VNet. For example,
10.0.0.0/16
. Ensure this range does not overlap with your on-premises networks if you plan to create a hybrid connection. - Subnets: A VNet must contain at least one subnet. You can add multiple subnets to segment your network. Azure reserves the first four IP addresses in each subnet for translation services.
- Click "+ Add subnet".
- Enter a Name for the subnet (e.g.,
default
orapp-subnet
). - Define the Address range for the subnet within the VNet's address space (e.g.,
10.0.1.0/24
).
4. Security Settings (Optional)
On the "Security" tab, you can configure options like:
- Azure DDoS Protection: Enable basic DDoS protection for your VNet.
- Firewall: Integrate Azure Firewall for advanced threat protection.
- Network Security Groups (NSGs): Define NSGs to filter network traffic to and from Azure resources in an Azure virtual network.
5. Review and Create
After configuring all settings, click "Review + create". Azure will validate your configuration. Once validation passes, click "Create" to deploy your Virtual Network.
# Example Azure CLI command to create a VNet and subnet
az network vnet create \
--resource-group myResourceGroup \
--name myAzureVNet \
--location eastus \
--address-prefix 10.0.0.0/16 \
--subnet-name default \
--subnet-prefix 10.0.1.0/24
Next Steps
Once your VNet is deployed, you can:
- Create a virtual machine and associate it with your VNet.
- Configure peered VNets to connect them.
- Set up VPN Gateway or ExpressRoute for hybrid connectivity.
- Deploy Network Security Groups to control traffic flow.
You have now successfully deployed a Virtual Network in Azure, providing a secure and isolated network environment for your cloud resources.