Creating An Azure virtual Network with Subnets
Tags: networking, azure, virtualsubnets, cloudcomputing
Published: 2024-07-12 20:55:01

**Outline**
Step 1: Introduction
Step 2: Log in to Azure Portal
Step 3: Create a Virtual Network
Step 4: Configure the Basics Tab
Step 5: Configure IP Addresses Tab
Step 6: Configure Subnet
Step 7: Create Virtual Network
Step 8: Verification of Azure Virtual Network with subnets

**Step 1: Introduction**
An Azure Virtual Network (VNet) is a network or environment that can be used to run VMs and applications in the cloud. When it is created, the services and Virtual Machines within the Azure network interact securely with each other.
**Virtual network concepts**

- 
**Address space:** When creating a virtual network, you must specify a custom private IP address space using public and private (RFC 1918) addresses. Azure assigns resources in a virtual network a private IP address from the address space that you assign. For example, if you deploy a VM in a virtual network with address space, 10.0.0.0/16, the VM is assigned a private IP like 10.0.0.4.

**- Subnets:**
Subnets enable you to segment the virtual network into one or more subnetworks and allocate a portion of the virtual network's address space to each subnet. You can then deploy Azure resources in a specific subnet. Just like in a traditional network, subnets allow you to segment your virtual network address space into segments that are appropriate for the organization's internal network. Segmentation improves address allocation efficiency. You can secure resources within subnets using Network Security Groups.
 
**Step 2: Log in to Azure Portal**

Go to Azure Portal and log in with your Azure account credentials.

**Step 3: Create a Virtual Network**

- 
In the "Search the Marketplace box", type "Virtual Network" and select it from the results.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/020ax37d2o7l4wxm2wby.png)


- 
Click "Create" to start the Virtual Network creation process.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k68tbd1dofvkukpin91x.png)


**Step 4: Configure the Basics Tab**

- 
Subscription: Choose your Azure subscription.

- Resource Group
: Create or select an existing resource group or create a new one.

- Name:
 Enter a name for your virtual network.

- 
Region: Choose the Azure region where you want to create the VNet.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l21zt4stoigd2q6ya6r3.png)

**Step 5: Configure IP Addresses Tab**

- 
Enter the address space for your VNet, such as 192.148.30.0/26.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i62rt62myrj3943uz4mh.png)



- 
Click "+ Subnet" to add a new subnet.

**Step 6: Configure Subnet**

- 
Name: Enter a name for your subnet.

- 
Address range (CIDR block): Enter the address range for the subnet, such as 192.148.30.0/26.

- 
Click "Add" to create the subnet.

- 
Repeat the above steps to create additional subnets within the same VNet, adjusting the address ranges accordingly.
Subnet1: 192.148.30.0 - 192.148.30.63
Subnet2: 192.148.30.64 - 192.148.30.127
Subnet3: 192.148.30.128 - 192.148.30.191
Subnet4: 192.148.30.192 - 192.148.30.255

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oeyrzi4cuqpi55vsjf15.png)



- 
Security Tab (Optional):
Configure network security options such as DDoS Protection and Firewall.

- 
Tags Tab (Optional): Add tags to your VNet for better organization.

- 
Review + Create Tab: Review your configuration and click "Create" to deploy the VNet.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jjdl90k87a0mco7ofk5a.png)



**Step 7: Create Virtual Network**

- 
Click on Create

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4fhafbflo42cum970wx1.png)
\
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wys3vl5t8lbe8kc89ji5.png)




**Step 8: Verification of Azure Virtual Network with subnets**

- 
Go to the "Virtual networks" section in the Azure portal.

- 
Select the newly created VNet.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tcoy83iwzo33bjdjjii3.png)


- 
Verify that the VNet and its subnets are listed with the correct configurations.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rbn6vo859s8s1d6h6ego.png)