Introduction to Azure Virtual Networks
Azure Virtual Network (VNet) is the fundamental building block for private networking in Azure. It enables many types of Azure resources, such as Azure Virtual Machines (VM), to securely communicate with each other, the internet, and on-premises networks.
Key Features
- Isolated network environment.
- Subnet segmentation.
- VNet Peering for inter‑VNet connectivity.
- Integration with Azure Firewall, Network Security Groups, and Azure VPN Gateway.
- Support for IPv4 and IPv6.
Typical Use Cases
Scenario | Benefit |
---|---|
Multi‑tier application | Isolate web, app, and database tiers in separate subnets. |
Hybrid connectivity | Connect on‑premises data centers via VPN or ExpressRoute. |
Secure micro‑services | Apply network policies per service using NSGs. |
Sample ARM Template
JSON
Bicep
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2022-07-01",
"name": "myVNet",
"location": "[resourceGroup().location]",
"properties": {
"addressSpace": {
"addressPrefixes": ["10.0.0.0/16"]
},
"subnets": [
{
"name": "frontend",
"properties": { "addressPrefix": "10.0.1.0/24" }
},
{
"name": "backend",
"properties": { "addressPrefix": "10.0.2.0/24" }
}
]
}
}
]
}