Virtual Network Design and Address Planning

Watch the video to deepen your understanding.
SubscribeComplete the full lesson to earn 25 points — 50 with Pro
Work through each section, then tap “Mark as Complete” on the last one.
✦ Skip the page breaks, the wait, and see fewer ads — read each lesson on a single page with Pro
Lesson: Virtual Network Design and Address Planning
Introduction
In cloud computing, a Virtual Network (VNet) is the fundamental building block for your private network in the cloud. It enables Azure resources—such as Virtual Machines (VMs), App Services, and Databases—to securely communicate with each other, the internet, and on-premises networks.
Why is network design critical? Poorly planned address spaces often lead to "IP exhaustion," routing conflicts, and the inability to scale. Once a VNet is created, changing its address space can be disruptive, requiring you to delete and recreate resources. Effective address planning is the foundation of a scalable, secure, and manageable cloud infrastructure.
The Fundamentals of Address Planning
When designing a VNet, you must define an Address Space using Classless Inter-Domain Routing (CIDR) notation.
1. Understanding CIDR
CIDR notation (e.g., 10.0.0.0/16) represents the network prefix and the number of bits used for the network portion.
- A /16 network provides 65,536 addresses.
- A /24 network provides 256 addresses.
- A /27 network provides 32 addresses.
2. Subnetting Strategy
Subnets allow you to segment your VNet into smaller network slices. This is essential for:
- Security: Applying Network Security Groups (NSGs) to isolate tiers (e.g., separating Web, App, and Database tiers).
- Traffic Control: Routing traffic through a centralized firewall or virtual appliance.
Example Scenario:
You have a total address space of 10.0.0.0/16. You can divide this into functional subnets:
- Web Tier:
10.0.1.0/24(256 addresses) - App Tier:
10.0.2.0/24(256 addresses) - Database Tier:
10.0.3.0/24(256 addresses) - Gateway Subnet:
10.0.255.0/27(Required for VPN/ExpressRoute)
Practical Implementation (Infrastructure as Code)
Using Terraform is the industry standard for deploying repeatable network infrastructure. Below is an example of defining a VNet and subnets.
# Define the Virtual Network
resource "azurerm_virtual_network" "main" {
name = "vnet-production-001"
address_space = ["10.0.0.0/16"]
location = "East US"
resource_group_name = azurerm_resource_group.rg.name
}
# Define the Web Subnet
resource "azurerm_subnet" "web" {
name = "snet-web"
resource_group_name = azurerm_resource_group.rg.name
virtual_network_name = azurerm_virtual_network.main.name
address_prefixes = ["10.0.1.0/24"]
}
# Define the Database Subnet
resource "azurerm_subnet" "db" {
name = "snet-db"
resource_group_name = azurerm_resource_group.rg.name
virtual_network_name = azurerm_virtual_network.main.name
address_prefixes = ["10.0.3.0/24"]
}
Note: Azure reserves 5 IP addresses in every subnet: the network address, the default gateway, three addresses for Azure services, and the broadcast address. Always plan for this overhead.
Best Practices
1. Avoid Address Overlap
If you plan to connect your VNet to your on-premises network (via VPN or ExpressRoute), ensure your cloud address space does not overlap with your corporate network ranges. If they overlap, traffic will not be able to route correctly, leading to connectivity outages.
2. Plan for Growth (The "Room to Breathe" Rule)
Never use the entire address space for your initial subnets. Leave gaps in your address allocation to accommodate future subnets or expanded requirements for existing tiers.
3. Use Hub-and-Spoke Topology
For enterprise environments, implement a Hub-and-Spoke model:
- Hub: Contains shared services (Firewalls, VPN Gateways, DNS).
- Spokes: Contain individual application workloads.
- Benefit: Centralizes management and reduces the complexity of managing peer-to-peer connectivity.
4. Zero Trust Segmentation
Don't put all your resources in one giant subnet. Use smaller subnets to enforce "Micro-segmentation." If a web server is compromised, a properly configured subnet boundary prevents lateral movement to the database tier.
Common Pitfalls
- Underestimating Subnet Size: Creating a
/29subnet for a large web cluster will lead to IP exhaustion within days. Always calculate the maximum possible number of instances and add a 20-30% buffer. - Hardcoding IPs: Never assign static private IPs to individual VMs unless absolutely necessary. Use Azure internal DNS (Service Discovery) and Load Balancers to manage traffic.
- Ignoring Service Endpoints: If you need to connect to Azure PaaS services (like Azure SQL or Storage), use Service Endpoints or Private Links instead of routing traffic over the public internet.
⚠️ Critical Warning: The Gateway Subnet
Azure requires a specific subnet named
GatewaySubnetif you intend to use Virtual Network Gateways. This subnet cannot contain other resources and should generally be sized as a/27or/28.
Key Takeaways
- Plan Early: Address space planning is difficult to change after deployment. Map out your IP requirements before writing a single line of code.
- Use CIDR Wisely: Understand how network bits affect address counts. Always reserve room for future scaling.
- Prioritize Security: Use subnets to group resources logically and apply Network Security Groups (NSGs) to enforce traffic flow policies.
- Adopt Hub-and-Spoke: For multi-application environments, this architecture provides the best balance of security, scalability, and centralized management.
- Leverage IaC: Use tools like Terraform or Bicep to ensure your network topology is version-controlled, repeatable, and documented.
Reach the last section to complete this lesson and earn points — you're on section 1 of 4.
- Introduction to Azure Monitor
- Azure Monitor Architecture and Data Sources
- Configuring Log Analytics Workspaces
- Designing Log Routing Solutions
- Configuring Diagnostic Settings
- Application Insights for Solution Architects
- Network Watcher and Network Monitoring
- Azure Monitor Alerts and Action Groups
- Workbooks and Custom Dashboards
- Designing a Comprehensive Monitoring Strategy
- Logging and Monitoring Quiz5q
- Microsoft Entra ID for Solution Architects
- Designing Identity Solutions: B2B Collaboration
- Designing Identity Solutions: B2C Scenarios
- Conditional Access Policy Design
- Designing for Multi-Factor Authentication
- Managed Identities for Azure Resources
- Service Principals and App Registrations
- Role-Based Access Control Design
- Privileged Identity Management
- Microsoft Entra ID Protection
- Zero Trust Architecture with Microsoft Entra
- Authentication and Authorization Quiz5q
- Introduction to Azure Governance
- Designing Management Group Hierarchies
- Subscription Strategy Design
- Resource Group Organization Patterns
- Azure Policy Design and Assignment
- Custom Policy Definitions and Initiatives
- Resource Locks and Tagging Strategies
- Azure Blueprints and Landing Zones
- Cost Management and Budget Design
- Cloud Adoption Framework for Governance
- Governance Solutions Quiz5q
- Introduction to Azure Storage
- Storage Account Types and Replication
- Blob Storage Tiers and Lifecycle Management
- Azure Files and Azure NetApp Files
- Azure Managed Disks Design
- Azure Data Lake Storage Gen2
- Cosmos DB Consistency Models
- Cosmos DB Partitioning and Throughput Design
- Cosmos DB API Selection Guide
- Table Storage and Queue Storage Design
- Storage Security and Encryption
- Non-Relational Storage Quiz5q
- Azure SQL Database Service Tiers
- Azure SQL Managed Instance Design
- Azure Database for MySQL and PostgreSQL
- Database Scaling: Vertical and Horizontal
- Read Replicas and Geo-Replication
- Database Security and Auditing Design
- Transparent Data Encryption and Always Encrypted
- Caching with Azure Cache for Redis
- Azure SQL Elastic Pools Design
- Relational Storage Quiz5q
- Azure Data Factory Design Patterns
- Data Integration Pipeline Architecture
- Azure Synapse Analytics Design
- Azure Databricks Integration Patterns
- Azure Stream Analytics for Real-Time Data
- Azure Event Hubs for Data Ingestion
- Data Migration Strategies and Tools
- Azure Purview for Data Governance
- Data Integration Quiz5q
- Introduction to High Availability in Azure
- Availability Zones and Availability Sets
- Azure Load Balancer Design
- Application Gateway and WAF Design
- Azure Front Door and Global Load Balancing
- Azure Traffic Manager Routing Methods
- Multi-Region Architecture Design
- SLA Design and Composite SLAs
- Health Probes and Failover Configuration
- Azure Service Fabric for Stateful HA
- High Availability Quiz5q
- Azure Backup Architecture and Vaults
- Backup Policies for VMs and Databases
- Azure Site Recovery Design
- RTO and RPO Planning Strategies
- Geo-Redundant and Cross-Region Recovery
- Hybrid and On-Premises Backup Solutions
- Resiliency Patterns and Chaos Engineering
- Disaster Recovery Testing and Drills
- Azure Immutable Backup and Soft Delete
- Backup and Disaster Recovery Quiz5q
- Introduction to Azure Compute Options
- Virtual Machine Design and Sizing
- VM Scale Sets and Autoscaling Strategies
- Azure Batch for Large-Scale Workloads
- Azure App Service Plans and Design
- App Service Environments and Isolation
- Azure Container Instances
- Azure Kubernetes Service Architecture
- AKS Networking and Storage Design
- Azure Functions and Serverless Design
- Durable Functions and Orchestration
- Compute Decision Framework
- Azure Virtual Desktop Design
- Compute Solutions Quiz5q
- Microservices Architecture Patterns
- Azure API Management Design
- Azure Service Bus Messaging Design
- Azure Event Grid and Event-Driven Architecture
- Azure Event Hubs for Streaming
- Azure Logic Apps and Integration Workflows
- Azure SignalR and Web PubSub
- Caching Strategies and Azure CDN
- App Configuration and Feature Flags
- Designing for Scalability and Performance
- Azure Container Apps Design
- Application Architecture Quiz5q
- Virtual Network Design and Address Planning
- Subnet Design and Network Segmentation
- Hub-Spoke Network Topology
- Azure Virtual WAN Design
- VPN Gateway Design and Configuration
- ExpressRoute Circuit Design
- Network Security Groups Design
- Azure Firewall and Firewall Manager
- Azure DDoS Protection Design
- Private Endpoints and Private Link
- Azure DNS and DNS Architecture
- Network Performance and Traffic Routing
- Azure Bastion and Secure Access
- Network Solutions Quiz5q
- Azure Migrate Overview and Assessment
- Migration Assessment and Discovery
- Azure Cloud Adoption Framework for Migration
- VM Migration with Azure Migrate
- Database Migration with Azure DMS
- Application Migration to App Service
- Containerizing Applications for Migration
- Migration Cost Planning and Optimization
- Data Box and Offline Migration Methods
- Migrations Quiz5q
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles the points you earn on every lesson and quiz so you progress twice as fast, unlocks half of every practice exam — plus full case studies — with the Learn & Exam study modes, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× points per lesson & quiz
- ✓ 50% of every exam unlocked
- ✓ Learn & Exam modes
- ✓ Distraction-free lessons