Creating an Azure Virtual Network with Four Subnets (192.148.30.0/26)
Tags: azure, cloudcomputing, networking, microsoft
Published: 2024-07-13 04:25:24


A virtual network (VNet) in Azure acts as the foundation for your private cloud environment. It defines a secure communication space for your Azure resources, including virtual machines (VMs). This blog will guide you through creating a VNet with four subnets using the address space 192.148.30.0/26.

**Prerequisites:**


- An Azure account with an active subscription

**Steps**


**1.Access the Azure Portal:**

Log in to the Azure portal https:[//azure.microsoft.com/en-us/get-started/azure-portal](url) using your Azure account credentials.

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


**2.**  **Create a Virtual Network:**


- In the Azure portal search bar, type "Virtual Network" and select the service from the results.


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

- Click on the "+ Create" button.

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


**3.** **Configure Virtual Network Settings:**

- Provide a unique name for your VNet (e.g., "MyVNet").
- Select the appropriate subscription that you want to use for this virtual network.
- Choose a resource group or create a new one to organize your Azure resources.
- Select the appropriate location for your VNet deployment.
- Click on the IP Address on your top left options

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


**4.**  **Define the IP Address Space:**

- For the "Address space" field, enter "192.148.30.0/26" as the address space for the virtual network.
- A /26 subnet mask provides 64 usable IP addresses within the VNet.
- Leave the other settings at their default values and click on the "Next: Subnets" button.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q92cad6yvvbb26d7x1ct.png)


**5.** **Create and Configure the Subnets:**


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


- Provide a name for your subnet (e.g., "Subnet1").

- Define the subnet address range. In this step, you'll divide the /26 VNet address space (192.148.30.0/26) into four subnets. To achieve this, you'll use a /28 subnet mask. This configuration provides 16 usable IP addresses per subnet, offering a balanced approach for your four-subnet virtual network.


- Subnet 1:

1. Name: Subnet 1
2. Subnet address range: 192.148.30.0/28
3. Click "Add".

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

- Subnet 2

1.Name: Subnet 2
2.Subnet address range: 192.148.30.16/28 
3. Click "Add"


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

- Subnet 3

1.Name: Subnet 3
2.Subnet address range: 192.148.30.32/28 
3.Click "Add"
 

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

- Subnet 4

1. Name: Subnet 4
2. Subnet address range: 192.148.30.48/28
3. Click " Add"


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

 
**6**.  **Review and create the virtual network**

1. Review the configuration details of your VNet and subnets to ensure they are correct.
2. Once satisfied, click on the "Review + create" button to validate the settings. 
3. After validation is successful, click on the "Create" button to deploy your virtual network with the four subnets

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

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


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

**Excellent work!** You've meticulously divided your Azure virtual network's /26 address space (192.148.30.0/26) into four efficiently sized subnets, providing a solid foundation for deploying your resources.