Designing Virtual Networks: Address Planning, Subnets, DNS, Peering and Name Resolution
Plan Addresses First
Hard to change Overlapping address ranges block peering and VPN connections, and changing them later is painful. Plan ranges for all networks: Azure, on-premises and other clouds.
- Use private ranges:
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 - Give each VNet a block with room to grow, for example
/16per environment or region - Keep a central IP address plan document or an IPAM tool
Subnet Sizing
| Prefix | Addresses | Usable in Azure |
|---|---|---|
| /29 | 8 | 3 (Azure reserves 5) |
| /28 | 16 | 11 |
| /27 | 32 | 27 |
| /24 | 256 | 251 |
| /22 | 1,024 | 1,019 |
Special Subnets
| Name | Purpose | Minimum size |
|---|---|---|
GatewaySubnet | VPN and ExpressRoute gateways | /27 recommended |
AzureBastionSubnet | Bastion | /26 |
AzureFirewallSubnet | Azure Firewall | /26 |
| Application Gateway subnet | Application Gateway v2 only | /24 recommended |
| Delegated subnets | App Service integration, SQL MI, container services | Per service guidance |
Segmentation Design
- Subnets by tier (web, app, data) or by trust level
- NSG per subnet with deny by default, allow only needed flows. Use application security groups for tag-like grouping
- Send traffic through a firewall with user-defined routes (UDR) when inspection is required
- Prefer private endpoints over public access for PaaS
DNS Design
| Need | Solution |
|---|---|
| Public domain hosting | Azure DNS public zone |
| Private names inside VNets | Private DNS zones linked to VNets |
| Private endpoint names | privatelink.* private zones linked to the hub or all VNets |
| Resolve on-premises names from Azure and the reverse | Azure DNS Private Resolver with inbound and outbound endpoints and forwarding rules |
| Default | Azure-provided DNS for simple cases |
Common failure Private endpoint not working is usually a DNS problem. The name must resolve to the private IP from every network that needs it.
Peering Design
- Peering connects VNets over the Microsoft backbone with low latency. It works across regions (global peering) and subscriptions
- Peering is not transitive. A to B and B to C does not give A to C
- Control gateway sharing: allow gateway transit on the hub and use remote gateways on spokes
- Peering has no bandwidth limit of its own, but data transfer is charged
Practice
- Allocate address ranges for three environments in two regions plus on-premises
- Size subnets for a web tier of 40 instances with growth
- Explain why a private endpoint can resolve to a public IP and how to fix it
Conclusion
Network design starts with a non-overlapping IP plan, correctly sized subnets, segmentation, a clear DNS design with private zones and resolver, and peering that respects non-transitivity.
Quick Summary: address planning; subnets; special subnets; segmentation; DNS; peering.

