Use it when designing address space and segmentation, connecting VNets and on-premises, publishing services, and troubleshooting why traffic does not reach a resource.
Azure Networking
Azure networking is built from virtual networks (VNets) divided into subnets, filtered by network security groups, steered by route tables, connected by peering, VPN or ExpressRoute, and exposed through load balancers, gateways and private endpoints.
1. Does an effective NSG rule allow the flow (both NSGs)?
2. Does the effective route send it where you expect?
3. For PaaS: does the name resolve to the private endpoint IP?
4. Is the guest firewall/application listening?
source → NIC/subnet NSG (outbound) → effective route (system, BGP, UDR) → peering/gateway/NVA → destination subnet NSG → NIC NSG (inbound) → guest firewall → application
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
az network nic list-effective-nsg --resource-group $RG --name $NICVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Read-only Verification Verify boundary
RG=rg-app; NIC=vm-app01-nic; VM=vm-app01
# Effective NSG rules and routes on the NIC (VM must be running)
az network nic list-effective-nsg --resource-group $RG --name $NIC
az network nic show-effective-route-table --resource-group $RG --name $NIC --output table
# Would this flow be allowed? (inbound TCP 443 from a client IP)
az network watcher test-ip-flow --resource-group $RG --vm $VM --direction Inbound --protocol TCP \
--local 10.20.1.4:443 --remote 203.0.113.50:50000
# Next hop toward a destination
az network watcher show-next-hop --resource-group $RG --vm $VM --source-ip 10.20.1.4 --dest-ip 10.10.0.10
# From inside the VM: private endpoint DNS
nslookup stappdata01.blob.core.windows.net # expect a private 10.x address via privatelink
test-ip-flow returns Allow or Deny with the rule name that decided it — faster than reading every NSG.
Step 2 Common mistakes Narrow the fault
Step 3 Troubleshooting Narrow the fault
VM unreachable from the internet. No public IP or load balancer, NSG on subnet or NIC denies, or guest firewall. Test with test-ip-flow and check both NSGs.
Traffic between peered VNets fails. Peering not connected on both sides, NSG denies, or traffic expected to transit a third VNet (peering is not transitive) without a hub route.
PaaS resource reachable only publicly. Private endpoint DNS not linked to the VNet, or on-premises DNS not forwarding — the name still resolves to the public IP.
New VMs have no internet access. Private subnet without NAT Gateway or another explicit outbound method.
Asymmetric routing through a firewall. UDR on one direction only; add matching routes for the return path.
Subtopics
Go one level deeper into this subject.
NSGs are stateful; inbound traffic is checked by the subnet NSG and then the NIC NSG (outbound: NIC, then subnet). Effective routes and effective NSG rules on the NIC are the truth. Peering is not transitive. Private endpoints need private DNS. New VNets created with recent API versions and the portal have no default outbound internet access — use NAT Gateway.
az network nic list-effective-nsg -g <rg> -n <nic>— effective rules.az network nic show-effective-route-table -g <rg> -n <nic> -o table— effective routes.az network watcher test-ip-flow ...— would NSG allow this 5-tuple?az network watcher show-next-hop ...— next hop for a destination.nslookup <account>.blob.core.windows.netfrom the VM — private endpoint resolves to a private IP?
ReferenceWhat it is2 sections · depth on demand
Direct Answer
An Azure VNet is a private address space in one region, split into subnets. Network security groups (NSGs) are stateful allow/deny rule sets attached to subnets and NICs. Route tables (UDRs) override the system routes, for example to send traffic through a firewall. VNets connect to each other with peering (not transitive — hub-and-spoke designs route through a hub firewall or gateway) and to on-premises with VPN Gateway or ExpressRoute. PaaS services are reached privately through private endpoints with private DNS zones. When traffic fails, read the effective routes and NSG rules on the NIC and test with Network Watcher.
Scope and canonical references
- Platform: Microsoft Azure; compute: Azure Compute.
- Hybrid connectivity concepts: Cloud Deployment Models.
- Load balancing and HTTP concepts: HTTP Load Balancing, Content Delivery Networks.
- IP routing and firewalls in general: Networking and Security Domains; cloud security controls: Cloud Security.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
NSGs
Custom rules have priorities 100–4096 (lower first; first match wins). Every NSG also contains default rules that you can override but not delete:
| Direction | Default rule | Priority |
|---|---|---|
| Inbound | AllowVNetInBound | 65000 |
| Inbound | AllowAzureLoadBalancerInBound | 65001 |
| Inbound | DenyAllInbound | 65500 |
| Outbound | AllowVnetOutBound | 65000 |
| Outbound | AllowInternetOutBound | 65001 |
| Outbound | DenyAllOutBound | 65500 |
NSGs are stateful — return traffic of an allowed flow is permitted. Rules can use service tags (Internet, VirtualNetwork, Storage, AzureLoadBalancer …) and application security groups instead of IP lists. Inbound traffic must pass the subnet NSG and then the NIC NSG; outbound the NIC NSG and then the subnet NSG.
Routing
Each subnet gets system routes (VNet, peered VNets, internet, gateway-learned BGP routes). A route table with UDRs overrides them, e.g. 0.0.0.0/0 → VirtualAppliance 10.0.0.4 to force traffic through Azure Firewall or an NVA. Longest prefix wins; among equal prefixes, UDR beats BGP beats system routes.
Outbound internet access
Azure is retiring implicit "default outbound access". Subnets in VNets created through the portal, or with API versions released after 31 March 2026, are private by default; existing VNets are unchanged. Use an explicit method: NAT Gateway (recommended for most cases), a Standard Load Balancer with outbound rules, a public IP on the NIC, or a firewall/NVA through a UDR.
Connecting networks
| Need | Option |
|---|---|
| VNet to VNet | Peering (regional or global); not transitive |
| Many VNets | Hub-and-spoke with firewall in the hub, or Azure Virtual WAN |
| On-premises | VPN Gateway (IPsec), ExpressRoute (private circuit), both with BGP |
| Admin access to VMs | Azure Bastion instead of public RDP/SSH |
Private access to PaaS
A private endpoint places a NIC with a private IP for a specific PaaS resource (storage account, SQL, Key Vault…) in your subnet. Clients must resolve the service name to that IP: link a private DNS zone (e.g. privatelink.blob.core.windows.net) to the VNets and forward on-premises DNS to Azure DNS Private Resolver. Service endpoints are the older alternative that keep public IPs but restrict access by subnet.
Load balancing
| Service | Layer / scope |
|---|---|
| Azure Load Balancer | L4, regional (public or internal) |
| Application Gateway | L7 regional, with optional WAF |
| Azure Front Door | L7 global edge, CDN and WAF |
| Traffic Manager | DNS-based global routing |
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Deep reference
Healthy vs suspicious evidence
Output interpretation
Effective NSG rules list every rule applied to the NIC (NIC-level and subnet-level) in priority order; the first match wins. A deny rule with a lower priority number than your allow rule explains a blocked flow.
test-ip-flow returns Access: Allow or Deny and the rule name that decided — the fastest way to prove or rule out NSGs.
show-next-hop: NextHopType of VirtualAppliance means traffic goes to a firewall/NVA through a UDR; VirtualNetworkGateway means on-premises; Internet means direct egress; None means the packet is dropped by a route.
Effective routes: the Source column shows Default, User (UDR) or VirtualNetworkGateway (BGP); a User route overrides the defaults for its prefix.
Design & tradeoffs
Design decisions
Hub-and-spoke: shared services (firewall, gateways, DNS) in a hub VNet, workloads in spokes peered to it; Virtual WAN when the number of sites and regions grows large.
Address space: plan non-overlapping ranges for every VNet and on-premises site from day one — renumbering later is painful.
Segmentation: NSGs on subnets for coarse control, application security groups for role-based rules, and a central firewall for egress and east-west inspection where required.
Private endpoints for PaaS services in production, with private DNS zones linked centrally, instead of public endpoints with IP allowlists.