Table of Contents
- ๐ฏ What Youโll Learn in This Blog
- ๐ Understanding Azure Virtual Network: Your Gateway to Secure Cloud Architecture
- ๐๏ธ Virtual Network as a Gated Community โ Simple Analogy
- ๐ข IP Address and CIDR Notation Explained
- ๐งฉ VNet vs Subnet
- ๐ ๏ธ Creating VNets in Azure
- ๐ฅ๏ธ Adding a Virtual Machine to a VNet
- ๐ Public IP vs Private IP
- ๐ค Why Do We Need Azure Virtual Network?
- โ Final Thoughts
๐ฏ What Youโll Learn in This Blog
In this blog, we will:
- Understand why Azure Virtual Network (VNet) is required in cloud environments
- Learn how VNets provide isolation and security on shared Azure infrastructure
- Use a simple gated community analogy to visualize networking concepts
- Understand IP addressing and CIDR notation
- Explore the difference between VNet and Subnet
- See how to create VNets and attach Virtual Machines
- Understand Public IP vs Private IP and real-world security best practices
By the end, youโll clearly understand how Azure networking protects your resources and how traffic flows inside the cloud ๐.
๐ Understanding Azure Virtual Network: Your Gateway to Secure Cloud Architecture
Azure resources such as Virtual Machines, databases, and applications run on shared physical servers. That means multiple organizations may be using the same underlying hardware.
๐ So how does Azure keep your environment separate and secure?
This is where Azure Virtual Network (VNet) comes in.
VNets create a logically isolated network for your subscription so that:
- Your data is separated from other organizations
- Communication between your resources stays private
- You can fully control inbound and outbound traffic
๐ Key Idea:
Even though the hardware is shared, VNet ensures your network behaves like your own private data center.
๐๏ธ Virtual Network as a Gated Community โ Simple Analogy
Letโs simplify Azure networking with a real-life example.
Imagine a gated housing community:
- ๐ก Entire community โ Virtual Network (VNet)
- ๐งฑ Boundary wall โ Firewall
- ๐ข Buildings โ Subnets
- ๐ Apartments โ Virtual Machines (VMs)
- ๐ฎ Main security guard โ Application Gateway / Load Balancer
- ๐ Buzzer system โ Network Security Group (NSG)
What does the main security guard do?
The Application Gateway or Load Balancer performs three major tasks:
- โ Check ID โ Authenticate & authorize traffic
- โ Check availability โ Is the destination healthy?
- โ Find alternative โ Route to another VM if needed
Each building (subnet) can also have its own security systemโjust like an NSG that filters traffic at subnet or VM level.
๐ง Analogy Summary
VNet = Community
Subnet = Building
VM = Apartment
NSG = Door security
Gateway = Main entrance guard
๐ข IP Address and CIDR Notation Explained
Whenever we create a VNet or subnet, we must define an IP address range.
IPv4 Basics
An IPv4 address looks like:
97.87.3.1
- It has 4 parts
- Each part = 8 bits
- Value ranges from 0 to 255 (because 2โธ = 256)
๐ What is CIDR Notation?
CIDR notation defines how big a network is.
Example:
๐ 100.8.0.0/24
/24โ first 24 bits = network portion- Remaining 8 bits = device addresses
- Total addresses = 2โธ = 256
๐ Important Rule
โ More bits for network โ โ fewer devices
โ Fewer bits for network โ โ more devices
๐งฉ VNet vs Subnet
- VNet = Full address space
- Subnet = Smaller range inside the VNet
Example
- VNet โ 100.8.0.0/24 โ 256 possible IPs
- Subnet โ 100.8.0.0/28 โ only 16 IPs (2โด)
๐๏ธ Think of it like:
City = VNet
Neighborhood = Subnet
๐ ๏ธ Creating VNets in Azure
๐ ๏ธ Steps to Create a Virtual Network and Subnet in Azure
Follow these steps in the Azure Portal to set up your Virtual Network (VNet) and subnet.
โ Step 1 โ Sign in to Azure Portal
- Open https://portal.azure.com
- Log in with your Azure account
- Click Create a resource from the home page
โ Step 2 โ Locate the Virtual Network Service
- In the search bar, type Virtual Network
- Select Virtual Network from the results
- Click Create
โ Step 3 โ Provide Basic Details
In the Basics tab, enter:
- Subscription โ Choose your Azure subscription
- Resource Group โ Select existing or create new
- Name โ Example:
MyVNet - Region โ Choose the closest region
Then click Next: IP Addresses
โ Step 4 โ Configure VNet Address Space
Define the IP range for the whole network.
- Default example:
10.0.0.0/16 - Custom example:
100.8.0.0/24
๐ก The address range must not overlap with other VNets or on-prem networks.
โ Step 5 โ Add a Subnet
- Click Add Subnet
- Enter:
- Subnet name โ e.g.,
WebSubnet - Address range โ e.g.,
100.8.0.0/28
- Click Add

โ ๏ธ Azure automatically reserves the first 5 IP addresses in every subnet for internal use.
โ Step 6 โ Optional Security Settings
You may enable:
- Azure Firewall
- DDoS Protection
- Bastion Host
These can also be configured later.
Click Next: Tags โ then Review + Create
While creating a VNet in the Azure portal you can:
- Choose the address range
- Rename the default subnet
- Add additional subnets
- Let Azure handle non-overlapping ranges
We can add more subnets to an existing virtual network.

โ ๏ธ Azure Reserved IPs
Azure automatically reserves the first 5 IP addresses in every subnet for internal management.
So they cannot be assigned to your VMs.
๐ก Example
If subnet starts at 10.0.0.0
โ 10.0.0.0 to 10.0.0.4 are reserved by Azure
๐ฅ๏ธ Adding a Virtual Machine to a VNet
When creating a VM, Azure asks you to select:
- The Virtual Network
- The Subnet

This ensures the VM becomes part of your private cloud network and follows all NSG and routing rules.
๐ Public IP vs Private IP
๐ข Private IP
- Used for communication inside VNet
- Not reachable from the internet
- Unique within the VNet
๐ด Public IP
- Used for global internet access
- Exposes the resource to external traffic
- Higher security risk
โ Why Do We Need Both?
To improve security:
- โ Block public IP on individual VMs
- โ Allow access only through Application Gateway
- ๐ Only the gateway gets a public IP
๐ Best Practice
In real environments, all requests should enter via Application Gateway, not directly to VMs.
This minimizes attack surface and gives full control.
๐ค Why Do We Need Azure Virtual Network?
Because in Azure:
- Physical servers are shared
- Multiple subscriptions coexist
- Security and isolation are mandatory
VNet ensures:
- โ Organization-level isolation
- โ Secure communication
- โ Controlled internet exposure
- โ Enterprise-grade networking
๐ Without VNet โ open playground
With VNet โ secured private fortress
โ Final Thoughts
Azure Virtual Network is the foundation of cloud networking. Understanding:
- VNets
- Subnets
- CIDR
- NSG
- Application Gateway
- Public vs Private IP
is essential for:
- Azure administration
- AZ-104 certification
- Real-world cloud architecture
Youโve now taken the first step toward mastering Azure networking ๐ช.

Leave a Reply