Azure Virtual Network (VNet) is the basic block for your private network in Azure. It enables secure communication between Azure resources such as VM’s databases, the internet, and on-premise network. By default, all resources in a VNet can reach the Internet.
So here’s how to create a virtual network in Azure!
Proceed according to these steps below.
You will need an active Azure account with a valid subscription.
How to Create an Azure Virtual Network
Here’s how to create a VNet in Azure.
STEP 1: ENTERING THE BASICS DETAILS
Step 1.1: Sign in to your Azure Portal.
Step 1.2: Search for Virtual Networks in the provided search bar and select the virtual network. Step 1.3: Here, enter the details of the resource group, VNet name, select the region and click Next.
|Subscription||Choose Your Subscription|
|Resource Group||Select Create new.|
|Name||Enter your VNet name|
|Region||Select the region|
STEP 2: ENTERING THE IP ADDRESSES
Step 2.1: In the IP address tab, enter private IP network ranges in the IPv4 address space as this will be the IP range of the virtual network. If you want to configure IPV6, you can tweak IPv6 address space as well.
Step 2.2: In the subnet section, you can see a default subnet is there.
Step 2.3: Click on Add subnet to create a new subnet.
Step 2.4: Here, provide a name for the new subnet and select an address range.
- The address range should be contained in the Virtual Network address space, and it should not be overlapped with any other subnet.
- For now, do not enable select NAT gateway and service endpoint. If there is any requirement, those features can be enabled.
Step 2.5: Now click on ADD.
Step 2.6: You can also add the subnet once you have created the Virtual network. For that go to Portal >> Virtual network >> Subnet >> Add.
Step 2.7: Once you have configured the subnet, click on Next, and you will be at the security tab.
Step 2.8: You can configure some additional Managed Azure Services (paid) if necessary. You can configure all the services later.
Step 2.9: Click on next.
STEP 3: TAGS TAB
This is the TAG tab, and you can associate tags for this service if required.
STEP 4: REVIEW + CREATE
Step 4.1: Click Review + create.
Step 4.2: You can deploy the new virtual network within a few seconds.
How to Create A VNet Using Azure CLI
- The below command will create a virtual network under the resource group “Sysally_testing” with name “sysallyvnet” , address range “192.168.0.0/16” , subnet range “192.168.1.0/24”
|az network vnet create -g Sysally_testing –location eastus –name sysallyvnet –address-prefixes 192.168.0.0/16 –subnet-name allysubnet –subnet-prefixes 192.168.1.0/24|
- To create a new subnet under the existing Vnet “sysallyvnet” with subnet prefix “192.168.2.0/24” and associate network security group “web-security-group”
|aznetworkvnetsubnetcreate-gSysally_testing–vnet-namesysallyvnet-n newsubnet–address-prefixes192.168.2.0/24–network-security-groupweb- security-group|
That was how to create VNet in Azure! Use it to communicate with any resource on the Internet.
At SysAlly, we experiment with Cloud and the most useful information is passed on to the world as blogs. Signup for the updates.
Until later, here’s SysAlly signing off!