Creating an Azure Virtual Network with Subnets
Tags: virtualnetwork, subnets, cloudcomputing
Published: 2024-07-09 19:38:05

Creating an Azure virtual network (VNet) with four subnets using the address space **192.148.30.0/26** several steps in the Azure portal. Below is a step-by-step guide with screenshots to help you through the process:

### Step 1: Sign in to Azure Portal

-  Open your web browser and navigate to the [Azure Portal](https://portal.azure.com).
-  Sign in with your Azure account credentials.

### Step 2: Create a Resource Group (if needed)

If you do not already have a resource group where you want to create the virtual network, you can create one:

-  In the Azure portal, click on **Resource groups** in the left-hand menu.
-  Click **+ Add** to create a new resource group.
-  Fill in the required details (Subscription, Resource group name, Region), and click **Review + create** and then **Create**.

### Step 3: Create a Virtual Network

Now, let's create the virtual network with the specified address space and subnets:

- In the Azure portal, click on **Virtual networks** from the home page, then click **+ Create**.

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

- Fill in the required details:
   - **Subscription**: Choose your Azure subscription.
   - **Resource group**: Select the resource group you created or want to use.
   - **Name**: Enter a name for your virtual network.
   - **Region**: Choose the Azure region where you want to deploy the virtual network.
   
  
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/19djha6kwqawyjgmyyvx.png)

- **IPv4 address space**: Enter `192.148.30.0/26` for the address space.The image below shows that we can have 64 addresses within this network.

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

### Step 4: Configure Subnets

Now, let's configure the four subnets within the virtual network:

- Under **Subnets**, click **+ Add subnet**.
   
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ssg2jth2k95vvz8m6wvx.png)
   

- Configure each subnet as follows:
   - **Subnet Name**: Enter a name for the subnet (e.g., Subnet-1, Subnet-2, etc.).
- **Subnet Address range**: Specify the subnet range within the virtual network address space (`192.148.30.0/26`). Ensure each subnet range is within the `/26` address space (`192.148.30.0` to `192.148.30.63`)

- Click **Add** for each subnet after configuring its details

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

 - For Subnet-1: **`192.148.30.0/28` - `192.148.30.15/28`**

 - For Subnet-2: **`192.148.30.16/28` - `192.148.30.31/28`**

 - For Subnet-3: **`192.148.30.32/28` - `192.148.30.47/28`**

 - For Subnet-4: **`192.148.30.48/28` - `192.148.30.63/28`**

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

- Once all four subnets are added, click **Review + create**.

### Step 5: Review and Create

- Review the details of your virtual network configuration.
- Click **Create** to deploy the virtual network and its subnets.

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

### Step 6: Deployment Progress

Wait for Azure to deploy the virtual network and subnets. This process usually takes a few minutes.

### Step 7: Verification

- Once deployment is complete, click on **Go to resources**.
- Navigate to Settings,click on subnets

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

Congratulations! You have successfully created an Azure virtual network with four subnets using the address space `192.148.30.0/26`.

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