Azure Virtual Network (VNet)

1. What is a VNet?

A VNet is:

On-premises network (data center network)

A VNet is a logically isolated network in Azure that allows secure communication between resources and provides full control over IP addressing, routing, and connectivity.

2. IP Addressing in VNet

When creating a VNet, we define:

CIDR block (IP range)

Example: 10.0.0.0/16

This gives: ~65,536 IPs

Types of IPs:

1. CIDR Notation

2. Reserved IPs

Azure reserves 5 IPs per subnet:

Proper IP planning is critical to avoid overlapping networks, especially in hybrid or peered environments.

3. Subnets

Some Azure services require dedicated subnets Example:

4. Connectivity Options

A VNet can connect to:

  1. Internet
  2. Other VNets (Peering)
  3. On-premises (VPN / ExpressRoute)

5. Routing in VNet

Azure uses:

Default behavior:

6. Security Inside VNet

Security is layered:

  1. NSG → basic filtering
  2. Azure Firewall → centralized control
  3. Application Gateway → web protection

7. Internet Communication

Resources in VNet can:

8. VNet Components

Inside a VNet, we typically have:

1. Subnets
2. IP addressing
3. NSGs
4. Route tables
5. Gateways
6. Load balancers

9. Design Example

Scenario: 3-Tier Application in Azure

Let’s assume: We are deploying an E-commerce application in Microsoft Azure

I. Network Designing

VNet Design

Subnet Design

Instead of just 3, real production uses more: | Subnet Name | CIDR | Purpose | | ——————- | ———– | ——————- | | WebSubnet | 10.0.1.0/24 | Frontend servers | | AppSubnet | 10.0.2.0/24 | Backend APIs | | DBSubnet | 10.0.3.0/24 | Database | | GatewaySubnet | 10.0.4.0/27 | VPN Gateway | | AzureFirewallSubnet | 10.0.5.0/26 | Firewall | | AppGatewaySubnet | 10.0.6.0/24 | Application Gateway |

II. Traffic Flow (Step-by-Step)

Let’s trace a real user request:

Step 1: User Access

User opens: www.myecommerce.com

What Happens

Step 2: Application Gateway

Performs:

Then forwards to: Web servers (WebSubnet)

Step 3: Web Layer

Step 4: App Layer

Step 5: DB Layer

Step 6: Response Goes Back

DB → App → Web → App Gateway → User

III. Security Design

NSG Rules

Web Subnet NSG

App Subnet NSG

DB Subnet NSG

IV. Advanced Security

Azure Firewall

Placed in: AzureFirewallSubnet

Used for:

WAF (Application Gateway)

Protects against:

We implement layered security using NSGs, Azure Firewall, and WAF for defense in depth.

Design a secure 3-tier architecture in Azure”

💬
AI Learning Assistant