Azure Virtual Network

Azure Fundamentals

Chapter 5 · Azure Virtual Network

AWS Fundamentals Chapter 5 built a VPC around subnets each tied to exactly one Availability Zone. Azure's own Virtual Network (VNet) works on a genuinely different, more flexible real principle — and this chapter's own biggest structural difference from AWS shows up in the very first section.

VNets Are Free

Unlike almost everything else in this course, there is real, documented zero charge for the Virtual Network resource itself — standard charges still apply to the VMs, gateways, and other resources running inside it, but the VNet and its own subnets cost nothing on their own.

A Real, Major Structural Difference: Subnets Span Every AZ

Genuinely Unlike AWS
In AWS, a subnet is bound to exactly one specific Availability Zone (Chapter 5 of AWS Fundamentals) — placing an instance in an AZ means choosing the matching subnet. Azure works fundamentally differently: an Azure Virtual Network, and every subnet inside it, spans all Availability Zones in the region at once. You don't need separate subnets per zone to place a VM into a specific zone — zone placement and subnet choice are two entirely independent decisions in Azure, genuinely unlike AWS where they're the same decision.

This directly changes how a real multi-zone architecture is designed: rather than creating one subnet per AZ the way an AWS VPC requires, an Azure deployment typically uses a single subnet and specifies each individual VM's own zone separately, at creation time.

Real Reserved Addresses

Azure reserves the same real five addresses per subnet as AWS does (Chapter 5 of AWS Fundamentals) — the first four and the last one: the network address, the default gateway, two addresses reserved to map Azure's own DNS into the virtual network space, and the broadcast address. A genuine similarity, not a difference, between the two providers here.

Route Tables

Azure routes traffic between subnets, peered VNets, on-premises networks, and the internet automatically by default, using real system routes. You can override this default behavior with a user-defined route (UDR) — a real, custom route table entry directing specific traffic (e.g. 0.0.0.0/0) to a different next hop, such as a NAT Gateway or a network virtual appliance.

NAT Gateway

Azure's own real NAT Gateway attaches directly to a subnet and immediately provides outbound-only internet connectivity to every private resource in it — genuinely simpler to set up than AWS's own equivalent, since it requires no manual route table configuration at all once attached. Exactly like AWS's own NAT Gateway, Azure's version allows only response traffic back in; nothing outside the virtual network can initiate a new inbound connection through it.

A Real, Recent Platform Change
As of 31 March 2026, newly created Azure virtual networks default to private subnets with no default outbound internet access at all — a real, deliberate security-hardening change from Azure's own earlier, more permissive default. An explicit outbound method (a NAT Gateway, a load balancer's own outbound rules, or an instance-level public IP) is now required for any outbound internet connectivity at all, matching AWS's own long-standing more restrictive, opt-in approach far more closely than Azure's older default ever did.

VNet Peering

VNet peering connects two virtual networks directly, letting resources in either one communicate as though they shared a single network — the peered VNets can sit in the same region or in genuinely different regions.

Application Security Groups

An Application Security Group (ASG) lets you group VMs logically — by application role rather than by IP address — and then reference that whole group as the source or destination in an NSG rule (Chapter 3). Instead of hardcoding a specific set of IP addresses into a security rule and updating it every time a VM is added or removed, you add or remove VMs from the ASG itself, and every NSG rule referencing that ASG updates automatically.

VPC vs. VNet

PropertyAWS VPCAzure VNet
Subnet-to-AZ relationshipOne subnet = one specific AZA subnet spans every AZ in the region
Reserved addresses per subnet55 (same real reservation)
NAT setupRequires a manual route table entryNo route table config needed once attached
Grouping resources for firewall rulesSecurity group membership directlyApplication Security Groups (a separate, real logical layer)
Base resource costNo charge for the VPC itselfNo charge for the VNet itself

Hands-On Exercises

Exercise 1

A team with prior AWS experience creates three separate subnets in a new Azure VNet, expecting to place one VM into each of three different Availability Zones - one subnet per zone. Explain, in your own words, why this approach reflects an AWS assumption that doesn't apply to Azure's own real model.

📄 View solution
Exercise 2

A team creates a new Azure VNet after 31 March 2026 and deploys a VM into it, expecting it to reach the internet for OS updates without any additional configuration. Explain, in your own words, why this expectation is likely wrong under Azure's own current real default, and what they'd need to add.

📄 View solution
Exercise 3

A team frequently adds and removes VMs from a specific application tier, and wants their NSG rules to automatically apply to whichever VMs currently belong to that tier, without manually editing IP addresses each time. Explain, in your own words, how Application Security Groups solve this specific problem.

📄 View solution

Chapter 5 Quick Reference

  • VNets are free — no charge for the resource itself, only for what runs inside it
  • Real major structural difference: a subnet spans every AZ in the region — unlike AWS's one-subnet-per-AZ binding; zone placement and subnet choice are independent decisions
  • Real similarity: Azure reserves the same 5 addresses per subnet as AWS does
  • NAT Gateway — attaches directly to a subnet, no route table config needed; real default outbound access was removed for new VNets as of 31 March 2026
  • VNet peering — connects two VNets, same or different regions
  • Application Security Groups — group VMs logically for NSG rules, avoiding hardcoded IP address management