Why This Matters
As Azure environments grow, enterprises often deploy multiple VNets across regions, environments (Dev, Test, Prod), or business units. Without proper design, connectivity between these VNets can become fragmented and complex.
VNet Peering and the Hub-and-Spoke architecture are key strategies for achieving secure, scalable, and cost-efficient connectivity.
VNet Peering
Definition:
-
Connects two VNets so resources can communicate privately using Azure’s backbone network.
-
Appears as if both VNets are part of one seamless network.
Key Features:
-
Low latency, high bandwidth (Azure backbone).
-
Supports cross-region peering.
-
Non-transitive (VNet A ↔ VNet B works, but A ↔ B ↔ C requires explicit peering).
-
Traffic stays on Azure’s private network, not the public internet.
When to Use:
-
Connecting VNets for cross-team workloads.
-
Hybrid apps where components span multiple VNets.
-
Multi-region high-availability designs.
Hub-and-Spoke Architecture
Definition:
-
A central Hub VNet provides shared services (firewall, DNS, VPN/ExpressRoute).
-
Spoke VNets connect to the hub for interconnectivity.
Benefits:
-
Centralized security (Hub houses firewall, monitoring, VPN).
-
Simplifies connectivity between multiple spokes.
-
Improves governance (centralized inspection point).
Challenges:
-
Requires careful planning of routing tables (UDRs).
-
Hub may become a bottleneck if under-sized.
Design Considerations
-
Routing
-
Use User Defined Routes (UDRs) to ensure traffic flows via hub.
-
Peering connections support “use remote gateway” for shared VPN/ExpressRoute.
-
Security
-
Place Azure Firewall or NVA (Network Virtual Appliance) in hub.
-
Use NSGs in spokes for workload-level filtering.
-
Cost Optimization
-
Peering charges apply for egress traffic between VNets.
-
Use hub services like Firewall/ExpressRoute once, instead of duplicating in each spoke.
-
Scalability
-
Hub must be sized for aggregate traffic.
-
Design multiple hubs for global scale (e.g., one per region).
Example Enterprise Scenario
A multinational enterprise has:
-
Separate VNets for Finance, HR, IT, and Dev workloads.
-
All departments must connect securely to on-premises.
-
Company wants centralized firewalling and monitoring.
Correct design:
-
Create a Hub VNet with VPN/ExpressRoute gateway + Firewall.
-
Connect each department’s Spoke VNet to the Hub using peering.
-
Configure routing so all inter-spoke traffic passes through the Hub firewall.
Confusion Buster
-
VNet Peering vs VPN Gateway
-
Peering = private Azure backbone, low latency.
-
VPN = encrypted connection over public internet.
-
-
Peering vs Hub-and-Spoke
-
Peering = connects two VNets directly.
-
Hub-and-Spoke = scalable design for many VNets with centralized control.
-
-
Transit Routing
-
Peering is non-transitive by default (A-B, B-C doesn’t mean A-C).
-
Hub solves this by acting as a middle point.
-
Exam Tips
-
“Which connectivity option for low latency between VNets in Azure?” → VNet Peering.
-
“Which architecture centralizes shared services like Firewall and VPN?” → Hub-and-Spoke.
-
“Can VNet peering be transitive?” → No, unless designed via Hub.
-
“Which design prevents duplication of security appliances in multiple VNets?” → Hub-and-Spoke.
What to Expect in the Exam
-
Direct Q: “Which Azure feature connects VNets privately using backbone network?” → VNet Peering.
-
Scenario Q: “Company needs multiple VNets with centralized firewall and VPN access.” → Hub-and-Spoke.
-
Trick Q: “VNet peering automatically allows transitive routing.” → False.