Azure virtual network inspection cheat sheet
Inspect virtual networks, subnets and security group inventory.
Azure CLI 2.x; Azure networking resource read access.
Updated · Azure · 7 min read
| Command | What it does |
|---|---|
az network vnet list --output table | List virtual networks |
az network vnet subnet list --resource-group rg-example --vnet-name vnet-example --output table | Inspect subnets |
az network nsg list --output table | List network security groups |
az network route-table list --output table | Inventory custom route tables |
Walkthrough
Run az login and verify az account show. Replace rg-example and vnet-example with your resource names.
Step 1: List virtual networks
az network vnet list --output table
Compare VNet address spaces and resource groups. Overlapping address spaces matter for peering and connectivity, even when each VNet works in isolation.
Step 2: Inspect subnets
az network vnet subnet list --resource-group rg-example --vnet-name vnet-example --output table
Replace both resource names. Check subnet ranges and associations against your topology; the list alone does not establish that a VM is attached as expected.
Step 3: List network security groups
az network nsg list --output table
Identify NSGs in the subscription. Existence is not enforcement: inspect subnet and NIC associations and effective rules for the affected endpoint.
Step 4: Inventory custom route tables
az network route-table list --output table
Inspect route tables associated with the affected subnet. These resource definitions do not include all effective system or learned routes on a VM NIC.