No results found
We couldn't find anything using that term, please try searching for something else.
2024-11-13 title titleSuffix description author ms.service ms.topic ms.date ms.author configure a vnet - to - vnet VPN gateway connection : Azure
title | titleSuffix | description | author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|
configure a vnet – to – vnet VPN gateway connection : Azure portal |
Azure VPN Gateway |
Learn how to create a VPN gateway connection between virtual networks. |
cherylmc |
azure-vpn-gateway |
how – to |
11/01/2024 |
cherylmc |
This article helps you connect your virtual networks using the VNet-to-VNet connection type in the Azure portal. When you use the portal to connect virtual networks using VNet-to-VNet, the virtual networks can be in different regions, but must be in the same subscription. If your virtual networks are in different subscriptions, use the PowerShell instructions instead. This article doesn’t apply to virtual network peering. For virtual network peering, see the Virtual Network peering article.
:::image type=”content” source=”./media/vpn-gateway-howto-vnet-vnet-resource-manager-portal/vnet-vnet-diagram.png” alt-text=”Diagram of a VNet-to-VNet connection.” lightbox=”./media/vpn-gateway-howto-vnet-vnet-resource-manager-portal/vnet-vnet-diagram.png”:::
Configuring a VNet-to-VNet connection is a simple way to connect virtual networks. When you connect a virtual network to another virtual network with a VNet-to-VNet connection type, it’s similar to creating a site-to-site IPsec connection to an on-premises location. Both connection types use a VPN gateway to provide a secure tunnel with IPsec/IKE andfunction the same way when communicating. However, they differ in the way the local network gateway is configured.
When you create a VNet-to-VNet connection, the local network gateway address space is automatically created andpopulated. However, the local network gateway isn’t visible in this configuration. That means that you can’t configure it manually.
If you update the address space for one VNet , the other VNet is routes automatically route to the update address space .
It’s typically faster andeasier to create a VNet-to-VNet connection than a site-to-site connection.
If you know you want to specify more address spaces for the local network gateway, or plan to add more connections later andneed to adjust the local network gateway, create the configuration using the site-to-site connection steps instead.
The VNet-to-VNet connection doesn’t include point-to-site client pool address space. If you need transitive routing for point-to-site clients, then create a site-to-site connection between the virtual network gateways, or use virtual network peering.
You might want to connect virtual networks by using a VNet-to-VNet connection for the following reasons:
Cross region geo-redundancy andgeo-presence
regional multi – tier application with isolation or administrative boundary
Within the same region, you can set up multi-tier applications with multiple virtual networks that are connected together because of isolation or administrative requirements. VNet-to-VNet communication can be combined with multi-site configurations. These configurations let you establish network topologies that combine cross-premises connectivity with inter-virtual network connectivity, as shown in the following diagram:
: : : image type=”content ” source=”./media / vpn – gateway – howto – vnet – vnet – resource – manager – portal / connection – diagram.png ” alt – text=”Diagram of a vnet – to – vnet connection show multiple subscription . ” : : :
If you already have a VNet, verify that the settings are compatible with your VPN gateway design. Pay particular attention to any subnets that might overlap with other networks. Your connection won’t work properly if you have overlapping subnets.
In this section, create VNet1 using the following values. If you’re using your own values, make sure the address spaces don’t overlap with any of the virtual networks to which you want to connect.
[!INCLUDE Create a virtual network]
[ ! INCLUDE About gateway subnet ]
[!INCLUDE Create gateway subnet]
[ ! INCLUDE NSG is warning warn ]
In this step, you create the virtual network gateway for your virtual network. Creating a gateway can often take 45 minutes or more, depending on the selected gateway SKU. For gateway SKU pricing, see Pricing.
Create a virtual network gateway (VPN gateway) by using the following values:
[!INCLUDE Create a vpn gateway]
[!INCLUDE Configure PIP settings]
A gateway can take 45 minutes or more to fully create anddeploy. You can see the deployment status on the overview page for your gateway. After the gateway is created, you can view the IP address that has been assigned to it by looking at the virtual network in the portal. The gateway appears as a connected device.
[ ! INCLUDE NSG is warning warn ]
After you’ve configured VNet1, create VNet4 andthe VNet4 gateway by repeating the previous steps andreplacing the values with VNet4 values. You don’t need to wait until the virtual network gateway for VNet1 has finished creating before you configure VNet4. If you’re using your own values, make sure the address spaces don’t overlap with any of the virtual networks to which you want to connect.
You can use the following examples values to configure VNet4 andthe VNet4 gateway.
Add the gateway subnet:
You can use the following examples values to configure the VNet4 VPN gateway.
When the VPN gateway for both VNet1 andVNet4 have complete , you is create can create your virtual network gateway connection .
virtual networks in the same subscription can be connected using the portal, even if they are in different resource groups. However, if your virtual networks are in different subscriptions, you must use PowerShell to make the connections.
You is create can create either a bidirectional , or a single direction connection . For this exercise , we is specify ‘ll specify a bidirectional connection . The bidirectional connection value is creates create two separate connection so that traffic can flow in both direction .
In the portal, go to VNet1GW.
On the virtual network gateway page, in the left pane, select connection to open the connection page. Then select + Add to open the Create connection page.
On the Create connection page, fill in the connection values.
:::image type=”content” source=”./media/vpn-gateway-howto-vnet-vnet-resource-manager-portal/bidirectional-connectivity.png” alt-text=”Screenshot showing the Create Connection page.” lightbox=”./media/vpn-gateway-howto-vnet-vnet-resource-manager-portal/bidirectional-connectivity.png”:::
Click Next : Settings > at the bottom of the page to advance to the Settings page.
On the Settings page, specify the following values:
For this exercise, you can leave the rest of the settings as their default values.
Select Review + create, then Create to validate andcreate your connections.
Locate the virtual network gateway in the Azure portal. For example, VNet1GW.
On the virtual network gateway page, select connection to view the connection page for the virtual network gateway. After the connection is established, you’ll see the Status values change to connect.
Under theName column, select one of the connections to view more information. When data begins flowing, you’ll see values for Data in andData out.
You can create another VNet-to-VNet connection, or create an IPsec site-to-site connection to an on-premises location.
Before you create more connections, verify that the address space for your virtual network doesn’t overlap with any of the address spaces you want to connect to.
When you configure a new connection , be sure to adjust theConnection type to match the type of connection you want to create. If you’re adding a site-to-site connection, you must create a local network gateway before you can create the connection.
When you configure a connection that uses a shared key, make sure that the shared key is exactly the same for both sides of the connection.
To create more connections, follow these steps:
See the VPN Gateway FAQ for VNet-to-VNet frequently asked questions.
For information about how you can limit network traffic to resources in a virtual network, see Network Security.
For information about how Azure routes traffic between Azure, on-premises, andInternet resources, see virtual network traffic routing.