๐ŸŒ 1 – Azure Virtual Network Basics

Table of Contents

  1. ๐ŸŽฏ What Youโ€™ll Learn in This Blog
  2. ๐Ÿ“˜ Understanding Azure Virtual Network: Your Gateway to Secure Cloud Architecture
  3. ๐Ÿ˜๏ธ Virtual Network as a Gated Community โ€“ Simple Analogy
  4. ๐Ÿ”ข IP Address and CIDR Notation Explained
  5. ๐Ÿงฉ VNet vs Subnet
  6. ๐Ÿ› ๏ธ Creating VNets in Azure
  7. ๐Ÿ–ฅ๏ธ Adding a Virtual Machine to a VNet
  8. ๐ŸŒ Public IP vs Private IP
  9. ๐Ÿค” Why Do We Need Azure Virtual Network?
  10. โœ… 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:

  1. โœ… Check ID โ€“ Authenticate & authorize traffic
  2. โœ… Check availability โ€“ Is the destination healthy?
  3. โœ… 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

  1. Open https://portal.azure.com
  2. Log in with your Azure account
  3. Click Create a resource from the home page

โœ… Step 2 โ€“ Locate the Virtual Network Service

  1. In the search bar, type Virtual Network
  2. Select Virtual Network from the results
  3. 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

  1. Click Add Subnet
  2. Enter:
  • Subnet name โ€“ e.g., WebSubnet
  • Address range โ€“ e.g., 100.8.0.0/28
  1. 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 ๐Ÿ’ช.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

TechMilestoneHub

Build Skills, Unlock Milestones

This is a test – edited from front page