Azure VNet Peering: Connecting Your Networks (AZ-900)
Azure VNet Peering connects two Azure Virtual Networks (VNets) seamlessly, allowing resources in different networks to communicate using private IP addresses. It supports both regional peering within a single region and global peering across different Azure regions, ensuring low latency and high bandwidth by routing traffic over the Microsoft backbone network.
What exactly is Azure VNet Peering?
Think of VNet Peering as a high-speed bridge between two separate virtual networks in Azure. Instead of routing traffic through a slow, complex VPN gateway or the public internet, peering allows resources in one VNet to talk to resources in another as if they were on the same network. For those of you tackling the AZ-900, understanding this is crucial because it's a core component of the 'Azure Networking' domain.
When you peer two VNets, you aren't just creating a connection; you're enabling low-latency, high-bandwidth communication using private IP addresses. This means your virtual machines can share data without ever exposing that traffic to the outside world. We always tell our students that the key here is efficiency—peering removes the overhead of traditional routing, making it the gold standard for internal Azure connectivity.
What is the difference between Regional and Global VNet Peering?
Azure splits peering into two main flavors: Regional and Global. Regional VNet Peering connects two VNets that reside within the same Azure region. It's fast, simple, and typically used when you want to isolate different environments—like Production and Development—while still allowing them to communicate when necessary.
Global VNet Peering, on the other hand, connects VNets across different Azure regions—for example, connecting a VNet in East US to one in West Europe. The magic here is that the traffic still travels over the private Microsoft backbone network, not the public internet. This significantly reduces latency and increases security. When you're studying for the exam, remember that both types provide the same seamless experience for the end-user, but the 'Global' aspect is what enables a truly worldwide cloud architecture.
Why must address spaces be non-overlapping?
This is a classic 'gotcha' question on the AZ-900 exam. For VNet Peering to work, the two networks cannot have overlapping IP address spaces. If VNet A uses 10.0.0.0/16 and VNet B also uses 10.0.0.0/16, Azure won't know where to send the traffic, and the peering request will fail immediately. It's like trying to mail a letter to two different houses that both claim to have the exact same address—the post office is just going to be confused.
In the real world, this requires careful planning. We recommend sketching out your CIDR blocks before you even touch the portal. If you find yourself in a situation where you have overlapping IPs, you'll either have to recreate one of the VNets or implement a complex NAT (Network Address Translation) solution. This is why we emphasize the importance of network design in our Cert Sensei practice exams; we want you to spot these architectural flaws before they become a problem in a lab or an exam scenario.
How does traffic flow and latency work in peered networks?
One of the biggest advantages of VNet Peering is the performance boost. Because the traffic stays on the Microsoft backbone, you get the lowest possible latency and the highest possible throughput. You don't have to worry about the 'hops' that usually occur when traffic passes through a virtual appliance or a gateway. It's a direct path from VM to VM.
From a traffic flow perspective, once the peering is established, the routing is handled automatically by Azure. You don't need to manually configure static routes for the peered VNet. This simplicity is why peering is preferred over VNet-to-VNet VPNs for internal Azure traffic. If you're practicing with our tools, pay close attention to the performance analytics; understanding the trade-off between a VPN (which is better for on-prem connectivity) and Peering (which is better for Azure-to-Azure connectivity) is a frequent exam theme.
What are the security implications of VNet Peering?
A common misconception is that peering creates a 'security hole' by merging two networks. In reality, VNet Peering does not bypass your security settings. Your Network Security Groups (NSGs) and Application Security Groups (ASGs) remain fully operational. If you have an NSG rule that blocks port 80, that rule still applies even if the traffic is coming from a peered VNet.
To allow traffic between peered networks, you simply need to ensure your NSG rules permit the traffic from the peered VNet's address range. We suggest treating a peered VNet as a 'trusted' but separate entity. You can still apply the principle of least privilege by only opening the specific ports required for the application to function. Mastering this balance of connectivity and security is exactly what separates a passing score from a top score on the AZ-900.
How can you best prepare for VNet questions on the AZ-900?
The AZ-900 doesn't just ask you to define terms; it asks you to apply them to scenarios. You might see a question about a company expanding to a new region and be asked which connectivity option provides the lowest latency. In that case, Global VNet Peering is your answer.
To truly lock in this knowledge, you need active recall. That's why we've built Cert Sensei to be more than just a question bank. We offer 1,000 expert-curated Microsoft Azure Fundamentals (AZ-900) practice questions, each paired with detailed expert reasoning. Instead of just knowing that 'B' is the right answer, you'll understand *why* it's right and why the other options are wrong. With our domain-level analytics, you can see if you're struggling specifically with the networking section and pivot your study time accordingly to ensure you're 100% ready on exam day.
❓ Frequently Asked Questions
Can I peer VNets that are in different Azure subscriptions?
Yes, you can. As long as you have the necessary permissions (Network Contributor role) in both subscriptions, you can establish peering between VNets regardless of which subscription they belong to.
Does VNet Peering cost extra compared to a single large VNet?
Yes, while the setup is free, Azure charges for the data transferred across the peering connection. Both the inbound and outbound data transfer incur a small per-GB cost.
Do I need a VPN Gateway to use VNet Peering?
No. VNet Peering is a direct connection. VPN Gateways are used for connecting on-premises networks to Azure or for VNet-to-VNet connections over the public internet, which is slower than peering.