Virtual network peering and VPN gateways - Azure Reference Architectures (2024)

Edit

Share via

This article compares two ways to connect virtual networks in Azure: virtual network peering and VPN gateways.

A virtual network is a virtual, isolated portion of the Azure public network. By default, traffic cannot be routed between two virtual networks. However, it's possible to connect virtual networks, either within a single region or across two regions, so that traffic can be routed between them.

Virtual network connection types

Virtual network peering. Virtual network peering connects two Azure virtual networks. Once peered, the virtual networks appear as one for connectivity purposes. Traffic between virtual machines in the peered virtual networks is routed through the Microsoft backbone infrastructure, through private IP addresses only. No public internet is involved. You can also peer virtual networks across Azure regions (global peering).

VPN gateways. A VPN gateway is a specific type of virtual network gateway that is used to send traffic between an Azure virtual network and an on-premises location over the public internet. You can also use a VPN gateway to send traffic between Azure virtual networks. Each virtual network can have at most one VPN gateway. You should enable Azure DDOS Protection on any perimeter virtual network.

Virtual network peering provides a low-latency, high-bandwidth connection. There is no gateway in the path, so there are no extra hops, ensuring low latency connections. It's useful in scenarios such as cross-region data replication and database failover. Because traffic is private and remains on the Microsoft backbone, also consider virtual network peering if you have strict data policies and want to avoid sending any traffic over the internet.

VPN gateways provide a limited bandwidth connection and are useful in scenarios where you need encryption but can tolerate bandwidth restrictions. In these scenarios, customers are also not as latency-sensitive.

Gateway transit

Virtual network peering and VPN Gateways can also coexist via gateway transit

Gateway transit enables you to use a peered virtual network's gateway for connecting to on-premises, instead of creating a new gateway for connectivity. As you increase your workloads in Azure, you need to scale your networks across regions and virtual networks to keep up with the growth. Gateway transit allows you to share an ExpressRoute or VPN gateway with all peered virtual networks and lets you manage the connectivity in one place. Sharing enables cost-savings and reduction in management overhead.

With gateway transit enabled on virtual network peering, you can create a transit virtual network that contains your VPN gateway, Network Virtual Appliance, and other shared services. As your organization grows with new applications or business units and as you spin up new virtual networks, you can connect to your transit virtual network using peering. This prevents adding complexity to your network and reduces management overhead of managing multiple gateways and other appliances.

Configuring connections

Virtual network peering and VPN gateways both support the following connection types:

  • Virtual networks in different regions.
  • Virtual networks in different Microsoft Entra tenants.
  • Virtual networks in different Azure subscriptions.
  • Virtual networks that use a mix of Azure deployment models (Resource Manager and classic).

For more information, see the following articles:

  • Create a virtual network peering - Resource Manager, different subscriptions
  • Create a virtual network peering - different deployment models, same subscription
  • Configure a VNet-to-VNet VPN gateway connection by using the Azure portal
  • Connect virtual networks from different deployment models using the portal
  • VPN Gateway FAQ

Comparison of virtual network peering and VPN Gateway

ItemVirtual network peeringVPN Gateway
LimitsUp to 500 virtual network peerings per virtual network (see Networking limits).One VPN gateway per virtual network. The maximum number of tunnels per gateway depends on the gateway SKU.
Pricing modelIngress/EgressHourly + Egress
EncryptionAzure Virtual Network Encryption can be leveraged.Custom IPsec/IKE policy can be applied to new or existing connections. See About cryptographic requirements and Azure VPN gateways.
Bandwidth limitationsNo bandwidth limitations.Varies based on SKU. See Gateway SKUs by tunnel, connection, and throughput.
Private?Yes. Routed through Microsoft backbone and private. No public internet involved.Public IP involved, but routed through Microsoft backbone if Microsoft global network is enabled.
Transitive relationshipPeering connections are non-transitive. Transitive networking can be achieved using NVAs or gateways in the hub virtual network. See Hub-spoke network topology for an example.If virtual networks are connected via VPN gateways and BGP is enabled in the virtual network connections, transitivity works.
Initial setup timeFast~30 minutes
Typical scenariosData replication, database failover, and other scenarios needing frequent backups of large data.Encryption-specific scenarios that are not latency sensitive and do not need high throughout.

Contributors

This article is maintained by Microsoft. It was originally written by the following contributors.

Principal author:

  • Anavi Nahar | Principal PDM Manager

Next steps

  • Plan virtual networks
  • Choose a solution for connecting an on-premises network to Azure

Feedback

Was this page helpful?

Feedback

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.

Submit and view feedback for

Virtual network peering and VPN gateways - Azure Reference Architectures (2024)

FAQs

What is the difference between VNet peering and VPN gateway in Azure? ›

VPN gateways are used in an encrypted connection in the region but VNet Peering provides connection sharing in different regions.

What is the difference between virtual network gateway and VPN gateway in Azure? ›

A VPN gateway is a specific type of VNet gateway that is used to send traffic between an Azure virtual network and an on-premises location over the public internet. You can also use a VPN gateway to send traffic between VNets. Each VNet can have only one VPN gateway.

Why would you implement a VPN gateway in your Azure virtual network? ›

Azure VPN Gateway connects your on-premises networks to Azure through Site-to-Site VPNs in a similar way that you set up and connect to a remote branch office. The connectivity is secure and uses the industry-standard protocols Internet Protocol Security (IPsec) and Internet Key Exchange (IKE).

What is the difference between network peering and VPN? ›

VPN facilitates network connections over the internet, whereas VPC peering efficiently connects VPCs within the same or different Amazon accounts. Both ensure secure data transmission across networks, yet they vary in network structure, security measures, and intricacy levels.

What are the different types of Azure gateways? ›

One of the settings that you specify when creating a virtual network gateway is the gateway type. The gateway type determines how the virtual network gateway is used and the actions that the gateway takes. A virtual network can have two virtual network gateways; one VPN gateway and one ExpressRoute gateway.

What is Azure virtual network peering used for? ›

Virtual network peering enables you to seamlessly connect two or more Virtual Networks in Azure. The virtual networks appear as one for connectivity purposes. The traffic between virtual machines in peered virtual networks uses the Microsoft backbone infrastructure.

Can each virtual network have only one VPN gateway? ›

Each of the virtual networks has only one VPN gateway. Also, A VPN gateway is a specific type of virtual network gateway. However, we can create multiple connections to the same VPN gateway.

What is the difference between a VPN and a virtual network? ›

You can use VDI to quickly and efficiently set up many virtual desktops for remote workers. In contrast, a VPN creates a private network connection between remote users and the corporate network over the public internet.

Can you have multiple VPN gateways in Azure? ›

You need to create multiple S2S VPN connections from your VPN devices to Azure. When you connect multiple VPN devices from the same on-premises network to Azure, you need to create one local network gateway for each VPN device, and one connection from your Azure VPN gateway to each local network gateway.

What are virtual network gateways used for? ›

The virtual network data gateway is a powerful network security offering as it can be used in conjunction with private endpoints for Azure data sources to ensure that no traffic is ever exposed to a public endpoint.

Why do we need virtual network in Azure? ›

Azure Virtual Network is a service that provides the fundamental building block for your private network in Azure. An instance of the service (a virtual network) enables many types of Azure resources to securely communicate with each other, the internet, and on-premises networks.

How many types of VPN are in Azure? ›

Balancing VPN Support and Security in Azure

Microsoft Azure offers three primary sorts of virtual private network options – Point-to-Site (P2S), Site-to-Site (S2S) and ExpressRoute. Every one of these comes with its benefits, making them a great fit for different organizations based on their usage needs.

What is the difference between an Azure VPN gateway and a virtual network gateway? ›

A VPN gateway is a specific type of virtual network gateway that is used to send traffic between an Azure virtual network and an on-premises location over the public internet. You can also use a VPN gateway to send traffic between Azure virtual networks. Each virtual network can have at most one VPN gateway.

Does VNet peering use a VPN gateway? ›

Virtual network peering seamlessly connects two Azure virtual networks, merging the two virtual networks into one for connectivity purposes. Gateway transit is a peering property that lets one virtual network use the VPN gateway in the peered virtual network for cross-premises or VNet-to-VNet connectivity.

What is the difference between site-to-site VPN and peering? ›

VPC Peering facilitates direct communication between VPCs within the same region while respecting security boundaries. Site-to-Site VPN establishes encrypted connections between on-premises, other cloud providers and AWS resources over the internet.

What is the difference between VNet peering and transit gateway? ›

Virtual network peering seamlessly connects two Azure virtual networks, merging the two virtual networks into one for connectivity purposes. Gateway transit is a peering property that lets one virtual network use the VPN gateway in the peered virtual network for cross-premises or VNet-to-VNet connectivity.

What is VNet-to-VNet VPN gateway? ›

VNet-to-VNet: An IPsec/IKE VPN tunnel connection between the VPN gateway and another Azure VPN gateway that uses a VNet-to-VNet connection type. This connection type is designed specifically for VNet-to-VNet connections.

Is ExpressRoute and VPN gateway in the same VNet? ›

Link the VPN Gateway to the Same VNet as ExpressRoute:

Both the ExpressRoute and VPN gateways must be linked to the same Azure Virtual Network (VNet) to facilitate smooth failover. This is achieved by creating respective gateway subnets within the same VNet.

Top Articles
Latest Posts
Article information

Author: Foster Heidenreich CPA

Last Updated:

Views: 5968

Rating: 4.6 / 5 (56 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Foster Heidenreich CPA

Birthday: 1995-01-14

Address: 55021 Usha Garden, North Larisa, DE 19209

Phone: +6812240846623

Job: Corporate Healthcare Strategist

Hobby: Singing, Listening to music, Rafting, LARPing, Gardening, Quilting, Rappelling

Introduction: My name is Foster Heidenreich CPA, I am a delightful, quaint, glorious, quaint, faithful, enchanting, fine person who loves writing and wants to share my knowledge and understanding with you.