DEV Community

Cover image for CREATE AN AZURE VIRTUAL NETWORK WITH FOUR SUBNET
Seyi Lufadeju
Seyi Lufadeju

Posted on

CREATE AN AZURE VIRTUAL NETWORK WITH FOUR SUBNET

Introduction to Azure Virtual Network (VNet)

An Azure Virtual Network (VNet) is a fundamental building block for your private network in Azure. It enables many types of Azure resources, such as Azure Virtual Machines (VMs), to communicate securely with each other, the internet, and on-premises networks. VNets are isolated from one another and provide control over IP addressing, DNS settings, security, and routing.

A VNet includes features like:

  • Subnets: Logical segments of the VNet for better organization and traffic management.
  • Network Security Groups (NSGs): To restrict inbound and outbound traffic.
  • Virtual Network Peering: To connect VNets.
  • Integration with Azure Services: Many services can be deployed directly within a VNet.

Step-by-Step Guide to Create a Virtual Network with Four Subnets

  • Prerequisites

An active Azure subscription.
Access to the Azure portal.

Step 1: Log in to Azure
Navigate to the Azure Portal.
Log in using your Azure credentials.

Image description

Step 2: Create a Virtual Network (VNet)
In the Azure portal, click the Search bar at the top and type Virtual networks. Click on it when it appears in the dropdown.

Image description

Click + Create or + Add at the top.

Image description

Fill in the basic information:
Subscription: Select your subscription.
Resource Group: Select an existing resource group or create a new one.

Image description

Name: Enter a name for your VNet, e.g., MyVNet.
Region: Select the region closest to your users or resources.

Image description

Step 3: Configure the Address Space
Under the IP Addresses tab:
In the Address space section, enter 192.148.30.0/24. This provides 64 IP addresses (usable: 256).

Image description

Step 4: Create Subnets
Under the same IP Addresses tab, in the Subnets section:

  • Click + Add subnet.

Image description

  • Add the following subnets:

Subnet1:
Name: Subnet1
Address range: 192.148.30.0/26 (64 IPs, usable: 59)
Note: Azure reserves 5 addresses

Image description

Subnet2:
Name: Subnet2
Address range: 192.148.30.16/26 (64 IPs, usable: 59)
Note: Azure reserves 5 addresses

Image description

Subnet3:
Name: Subnet3
Address range: 192.148.30.32/26 (64 IPs, usable: 59)
Note: Azure reserves 5 addresses

Image description

Subnet4:
Name: Subnet4
Address range: 192.148.30.48/26 (64 IPs, usable: 59)
Note: Azure reserves 5 addresses

Image description

Note: The /26 subnet mask ensures each subnet has 64 addresses.

Click Add after defining each subnet.

Image description

  • Step 5: Review and Create Click on the Review + create tab. Azure will validate your configuration. Ensure there are no errors. Once validation passes, click Create.

Image description

Note: Azure reserves 5 addresses
Image description

Top comments (0)