Hybrid Networking & Enterprise Connectivity
What You’ll Learn
By the end of this chapter, you’ll understand:- What hybrid networking actually is (connecting your office to Azure)
- The difference between VPN and ExpressRoute (and when to use each)
- How Virtual WAN simplifies complex network architectures
- How to control traffic flow with routing and secure access with Bastion
- Real costs and common mistakes that can cost you thousands
Introduction: What is Hybrid Networking?
Start Here if You’re Completely New
Imagine you run a company with:- An office building with servers, databases, and employee computers
- Azure cloud where you’re building new applications
- Island A = Your office (on-premises datacenter)
- Island B = Azure cloud
- The Ocean = The public internet (dangerous, anyone can intercept your traffic)
- Uses the public internet (the ocean)
- Encrypts your traffic (armored truck on the bridge)
- Cheaper ($140/month for 650 Mbps)
- Less reliable (depends on internet quality)
- Bypasses the public internet entirely
- Dedicated fiber cable just for you
- More expensive ($1,627/month for 1 Gbps)
- More reliable (99.95% SLA)
Why This Matters: Real Cost of Getting It Wrong
Case Study: Healthcare Company VPN Incident (2021) A healthcare company chose VPN for production workloads to save money:- The Setup: Site-to-Site VPN ($140/month)
- The Problem: VPN bandwidth maxed out at 650 Mbps
- The Incident: During peak hours, doctors couldn’t access patient records in Azure
- The Cost: 4-hour outage, $2.3M in delayed procedures
- The Fix: Migrated to ExpressRoute ($1,627/month)
- The Lesson: 2.3M
- Cost to do it right: 19,524/year**
- Cost of doing it wrong: $2.3M in one incident
- ROI: 117x return on investment
For most enterprises, the cloud isn’t an island—it’s an extension of their on-premises datacenter.
1. Connecting to On-Premises
Understanding the Two Connection Types (From Absolute Zero)
Before we dive into the technical details, let’s understand what problem we’re solving: The Scenario: You’re a developer working from home, and your company has:- A corporate office with servers and databases
- Azure cloud with applications and data
- Developers working remotely who need access to both
Point-to-Site (P2S): Individual Remote Access
The Analogy: Like a personal security escort for one person. Example:- Developer working from home needs to access Azure resources
- IT admin connecting to troubleshoot
- Remote employee accessing internal systems
- Cost: ~$140/month (VpnGw1 SKU)
- Supports: Up to 10,000 concurrent connections
- Speed: Up to 650 Mbps per gateway
Site-to-Site (S2S): Office-to-Cloud Connection
The Analogy: Like a private highway between two buildings. Example:- Entire corporate office needs access to Azure
- On-premises servers need to sync with Azure databases
- Hybrid applications spanning both environments
- Cost: ~$140/month (VpnGw1 SKU) + your office VPN device
- Always-on connection
- Speed: Up to 650 Mbps-10 Gbps (depending on SKU)
VPN Gateway (Deep Dive)
What It Is: Encrypted tunnel over the public internet. How It Works (Simplified):- Your office sends data to Azure
- VPN Gateway encrypts it (like putting it in a locked box)
- Data travels over the public internet (but encrypted)
- Azure VPN Gateway decrypts it (unlocks the box)
- Data reaches your Azure resources
- ✅ Cheaper ($140/month)
- ✅ Easy to set up (takes 30 minutes)
- ❌ Slower (depends on your internet speed)
- ❌ Less reliable (if your internet goes down, VPN goes down)
- Point-to-Site (P2S): For individual developers working remotely. Connects your laptop to Azure.
- Site-to-Site (S2S): Connects an entire office to Azure. Uses an IPsec/IKE VPN tunnel.
| SKU | Bandwidth | Tunnels | Zone Redundant? | Cost/Month | Use Case |
|---|---|---|---|---|---|
| Basic | 100 Mbps | 10 | No | $27 | Dev/Test only (No BGP) |
| VpnGw1 | 650 Mbps | 30 | No | $140 | Production Entry |
| VpnGw2AZ | 1 Gbps | 30 | Yes | $361 | Mission Critical |
| VpnGw5AZ | 10 Gbps | 100 | Yes | $1,445 | High scale |
- Developer creates VPN Gateway
- Chooses “Basic” to save money (140/month)
- Works fine in testing
- Problem: Basic SKU doesn’t support BGP (Border Gateway Protocol)
- Impact: Can’t automatically failover when connection drops
- Company saved $113/month using Basic SKU
- VPN connection failed during business hours
- No automatic failover (BGP missing)
- 6-hour manual recovery
- Cost: $450K in lost productivity
- Lesson: 450K
ExpressRoute (The Premium Option)
What It Is: Private, dedicated fiber connection. Traffic never touches the public internet. The Analogy: Imagine you’re moving gold bars between buildings: VPN = Armored truck driving on public roads- Anyone can see the truck (even if they can’t open it)
- Depends on traffic conditions
- Slower, less predictable
- Nobody knows you’re moving gold
- Dedicated path, no traffic
- Faster, more predictable
- Microsoft partners (like AT&T, Verizon, Equinix) install a dedicated fiber cable
- One end connects to your office
- Other end connects to Azure datacenter
- Your data travels on this private cable (never touches public internet)
| Circuit Speed | Monthly Cost | Outbound Data | Total Cost/Month |
|---|---|---|---|
| 50 Mbps | $56 | Unlimited | $56 |
| 100 Mbps | $100 | Unlimited | $100 |
| 500 Mbps | $635 | Unlimited | $635 |
| 1 Gbps | $1,627 | $0.035/GB | $1,627+ |
| 10 Gbps | $8,760 | $0.025/GB | $8,760+ |
- Circuit fee (above)
- ExpressRoute Gateway (3,105/month)
- Outbound data (if not unlimited plan)
- Partner setup fees (5,000 one-time)
- Security: Private link, never touches public internet
- Reliability: SLA up to 99.95% (without internet fluctuations)
- Speed: Up to 100 Gbps (Direct)
- Predictable Latency: Consistent performance (no “internet weather”)
- Compliance: Meets strict regulatory requirements (HIPAA, PCI-DSS, FedRAMP)
| Factor | VPN (VpnGw1) | ExpressRoute (1 Gbps) |
|---|---|---|
| Cost | $140/month | $1,875/month |
| Setup Time | 30 minutes | 4-12 weeks |
| Bandwidth | 650 Mbps | 1 Gbps-100 Gbps |
| Latency | Varies (20-100ms) | Consistent (<10ms) |
| SLA | 99.9% | 99.95% |
| Internet Dependency | Yes | No |
| Compliance | Basic | HIPAA, PCI-DSS, FedRAMP |
| Best For | Small/Medium | Enterprise/Mission-Critical |
[!WARNING] Gotcha: ExpressRoute Cost You pay for the Circuit (monthly flat fee) AND the Gateway (hourly fee) AND Outbound Data (unless you have an Unlimited plan). It is significantly more expensive than VPN. Example Surprise Bill:Common Mistake #2: ExpressRoute for Dev/Test The Trap:
- Circuit: $1,627/month (expected)
- Gateway: $213/month (forgot about this!)
- Outbound data: $350/month (forgot about this too!)
- Total: 1,627/month
- Team reads “ExpressRoute is better than VPN”
- Deploys ExpressRoute for dev environment
- Cost: $1,875/month for rarely-used connection
- VPN for Dev/Test ($140/month)
- ExpressRoute only for Production ($1,875/month)
- Savings: 20,820/year
2. Azure Virtual WAN (vWAN)
Understanding Virtual WAN (From Absolute Zero)
The Problem It Solves: Imagine you have:- 5 offices around the world (New York, London, Tokyo, Sydney, Mumbai)
- 10 Azure VNets (Production, Dev, Test, etc.)
- Remote workers connecting from home
- You build runways (VPN gateways)
- You create flight paths (routing tables)
- You manage air traffic control (routing)
- Result: Complex, expensive, error-prone
- Microsoft builds the runways
- Microsoft manages flight paths
- Microsoft handles air traffic control
- Result: Simple, automated, reliable
Virtual WAN Components (Simplified)
1. Virtual Hub = The central airport- Location: One per Azure region
- Connects: Offices, VNets, remote users
- Routing: Automatic
- Connects your VNets to the hub
- Automatic routing between VNets
- Connects offices to Azure
- Up to 20 Gbps aggregate throughput
- Connects remote workers
- Up to 100,000 concurrent users
- Dedicated connections for high-traffic routes
Virtual WAN: “Hub-and-Spoke as a Service”
Instead of managing your own Hub VNet with complex peering and routing tables, Microsoft manages the Hub for you. Capabilities:- Automated Site-to-Site VPN
- Automated P2S User VPN
- ExpressRoute integration
- Transit Routing (Spoke-to-Spoke, Spoke-to-Branch)
- Integrated Azure Firewall
[!TIP] Jargon Alert: Transit Routing In standard peering, Spoke A cannot talk to Spoke B directly. In Virtual WAN, all spokes can talk to everything (if you allow it) because the vHub acts as a super-router. Visual Example:Real Cost Comparison: Scenario: 3 offices + 10 VNets + 500 remote workers
| Approach | Components | Monthly Cost | Setup Time |
|---|---|---|---|
| Manual | 3 VPN Gateways 45 VNet Peerings 50 Route Tables Azure Firewall | $1,450/month | 80 hours |
| Virtual WAN | 1 Virtual WAN 1 Virtual Hub Auto-everything | $870/month | 2 hours |
| Savings | - | 6,960/year | 78 hours |
- Single office connecting to single VNet
- Developer reads “Virtual WAN is best practice”
- Deploys Virtual WAN
- Cost: $870/month
- Simple VPN Gateway would cost $140/month
- Waste: 8,760/year
- < 3 connections = Use standard VPN
- ≥ 4 connections = Use Virtual WAN
3. User Defined Routes (UDR)
Understanding Routing (From Absolute Zero)
The Analogy: Imagine you live in a neighborhood with:- Your house (VM in Subnet A)
- Friend’s house (VM in Subnet B)
- Grocery store (Internet)
- Security checkpoint (Azure Firewall)
How UDR Works (Step-by-Step)
Before UDR:Routing Table Priority (Most Specific Wins)
Azure checks routes in this order: Priority Ranking:- User Defined Route (UDR) - You create these manually
- BGP Route - Learned from ExpressRoute/VPN
- System Route - Azure’s default routing
| Route Type | Destination | Next Hop | Specificity |
|---|---|---|---|
| System Route | 0.0.0.0/0 | Internet | /0 (least specific) |
| UDR | 10.0.0.0/8 | Firewall | /8 |
| BGP | 10.5.0.0/16 | ExpressRoute | /16 (most specific) |
- /32 beats /24 beats /16 beats /8 beats /0
Common UDR Scenario: Force All Internet Traffic Through Firewall
Goal: Inspect all outbound internet traffic for security. Step-by-Step: 1. Create Route Table0.0.0.0/0= All internet trafficVirtualAppliance= Azure Firewall10.0.1.4= IP address of your firewall
[!WARNING] Gotcha: Asymmetric Routing If your request goes out via Azure Firewall but the return traffic comes back via ExpressRoute bypass, the firewall will drop the packet (it didn’t see the SYN). Ensure traffic flows symmetrically! Visual Example of the Problem:Common Mistake #4: Forgetting to Update Route Tables The Trap:The Fix: Ensure BOTH directions use the same path:
- Deploy new subnet
- Forget to associate route table
- Internet traffic bypasses firewall
- Security Risk: Unmonitored traffic
- Company had UDR forcing traffic through firewall
- Developer created new subnet for testing
- Forgot to associate route table
- Malware infected test VM, spread to production
- Cost: $1.2M breach (could have been prevented with proper routing)
- Use Azure Policy to auto-associate route tables with new subnets
- Regular audits of subnet configurations
4. Azure Bastion
Understanding Azure Bastion (From Absolute Zero)
The Problem: You have a VM in Azure that you need to access (RDP for Windows, SSH for Linux). Traditional Approach (DANGEROUS):- Day 1: VM deployed with public IP
- Day 2: 47,000 brute-force login attempts
- Day 3: Attackers gained access (weak password)
- Day 7: Ransomware encrypted entire network
- Cost: $4.2M in ransom + recovery
- Prevention Cost: $140/month for Azure Bastion
How Azure Bastion Works (Simplified)
The Analogy: Without Bastion = Your house has a door facing the street- Anyone can walk up and try to break in
- 24/7 exposure to criminals
- Must go through security checkpoint first
- Security guards (Azure) verify identity
- Then you get access to your house
Azure Bastion: The Secure Solution
What It Is: A secure jump box managed by Microsoft. How It Works:- You open Azure Portal in browser (HTTPS, port 443)
- Click “Connect” → “Bastion” on your VM
- Bastion creates secure tunnel
- VM has NO public IP, NO open ports
- You access VM via browser (no RDP client needed!)
Why Use Azure Bastion?
Benefits: ✅ No Public IPs needed on your VMs (hackers can’t find them) ✅ No TCP 3389/22 open to the internet (no attack surface) ✅ TLS 443: Access via your web browser (Portal) ✅ No VPN needed: Works from anywhere ✅ Centralized access: All connections logged and audited ✅ No software: No need to install RDP/SSH clients Cost Comparison:| Approach | Setup | Monthly Cost | Security Risk |
|---|---|---|---|
| Public IP + Open RDP | Free | $4/month | EXTREME (targeted daily) |
| VPN Gateway | Complex | $140/month | Low (but requires VPN client) |
| Azure Bastion | Simple | $140/month | Very Low (managed by Microsoft) |
Azure Bastion Requirements
Technical Requirements:-
Dedicated subnet named
AzureBastionSubnet- Must be exactly this name (Azure enforces it)
- Minimum size:
/27(32 IP addresses) - Recommended:
/26(64 IP addresses) for scalability
-
Public IP (Standard SKU) for the Bastion host itself
- Note: Bastion has public IP, NOT your VMs
- This is the entry point (hardened by Microsoft)
- VNet where your VMs live
Using Azure Bastion (Step-by-Step)
Via Azure Portal (Easy):- Navigate to your VM in Azure Portal
- Click “Connect” → “Bastion”
- Enter VM username and password
- Click “Connect”
- Browser opens with RDP/SSH session ✅
[!NOTE] Deep Dive: Bastion Native Client You can now use your local native SSH/RDP client (terminal/mstsc) to tunnel through Bastion using the Azure CLI:az network bastion tunnelBenefits:
- Use your favorite SSH/RDP client
- Copy/paste works better
- Better performance than browser
Common Mistake #5: Wrong Subnet Name
The Trap:- Create subnet named “BastionSubnet” (logical, right?)
- Try to deploy Bastion
- Error: “Subnet must be named AzureBastionSubnet”
- MUST be exactly
AzureBastionSubnet(case-sensitive) - Azure enforces this strictly
Common Mistake #6: Bastion for Every VNet
The Trap:- Deploy Bastion in every VNet ($140/month each)
- 10 VNets = $1,400/month
- Waste: $1,260/month
- Deploy Bastion in Hub VNet ($140/month)
- Peer all Spoke VNets to Hub
- Use single Bastion for all VMs
- Savings: 15,120/year