Introduction to Azure Networking
In this blog, you'll understand Azure Virtual Networks, vNet peering and demonstration on how to create and delete the virtual network in Azure portal.
Introduction to Azure Networking
What is Azure Virtual Network?
Azure Virtual Network (VNet) is the foundational building block for your private network in Azure. It enables Azure resources, such as virtual machines (VMs), to securely communicate with:
- Each other
- The internet
- On-premises networks
You can segment a virtual network into subnets for better organization and management.
Pro Tip: Use tools like Visual Subnet Calculator if you’re new to subnetting.
Example Scenario:
-
Virtual Network CIDR:
10.0.0.0/16
-
Subnets:
10.0.0.0/18
10.0.64.0/18
10.0.128.0/18
10.0.192.0/18
Key Considerations
-
Within a VNet:
- VMs can communicate without additional configuration.
- VMs in different subnets within the same VNet can also communicate by default.
- To block communication between subnets, use Network Security Groups (NSGs).
-
Between VNets:
- VNets cannot communicate by default.
- To enable communication, use VNet Peering:
- Local VNet Peering: For VNets in the same region.
- Global VNet Peering: For VNets in different regions.
How to Create a Virtual Network in Azure Portal
- Go to the Azure Portal.
- Search for Virtual Network in the search bar.
- Click on Create.
- Fill in the Basic Details, including the VNet name.
- Navigate to the IP Addresses tab:
- Create subnets as needed (one default subnet is created automatically).
- (Optional) Add tags in the Tags tab for better organization.
- Click on Review + Create.
- Verify the details and click Create.
How to Delete a Virtual Network
Using the Azure Portal
- Navigate to the VNet you want to delete.
- Click on the Delete button and confirm.
Using Azure CLI
To delete a VNet:
1
az network vnet delete --name <vnet-name> --resource-group <resource-group-name>
To list Virtual Networks:
1
az network vnet list -o jsonc
This post is licensed under CC BY 4.0 by the author.