Skip to content

Commit 1dc214f

Browse files
Merge pull request #278687 from asudbring/vpn-peer-update
Update VPN transit article with new VNET peering UI
2 parents 45155f6 + 2564370 commit 1dc214f

File tree

3 files changed

+29
-77
lines changed

3 files changed

+29
-77
lines changed
-35.3 KB
Loading
-202 KB
Loading

articles/vpn-gateway/vpn-gateway-peering-gateway-transit.md

Lines changed: 29 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ titleSuffix: Azure VPN Gateway
55
author: cherylmc
66
ms.service: vpn-gateway
77
ms.topic: how-to
8-
ms.date: 02/15/2024
8+
ms.date: 06/19/2024
99
ms.author: cherylmc
1010
ms.custom: devx-track-azurepowershell
1111

@@ -18,32 +18,26 @@ The following diagram shows how gateway transit works with virtual network peeri
1818

1919
:::image type="content" source="./media/vpn-gateway-peering-gateway-transit/gatewaytransit.png" alt-text="Diagram of Gateway transit." lightbox="./media/vpn-gateway-peering-gateway-transit/gatewaytransit.png":::
2020

21-
The transit option is available for peering between the same, or different deployment models and can be used with all VPN Gateway SKUs except the Basic SKU. If you're configuring transit between different deployment models, the hub virtual network and virtual network gateway must be in the [Resource Manager deployment model](../azure-resource-manager/management/deployment-models.md), not the legacy classic deployment model.
21+
The transit option can be used with all VPN Gateway SKUs except the Basic SKU.
2222

2323
In hub-and-spoke network architecture, gateway transit allows spoke virtual networks to share the VPN gateway in the hub, instead of deploying VPN gateways in every spoke virtual network. Routes to the gateway-connected virtual networks or on-premises networks propagate to the routing tables for the peered virtual networks using gateway transit.
2424

2525
You can disable the automatic route propagation from the VPN gateway. Create a routing table with the "**Disable BGP route propagation**" option, and associate the routing table to the subnets to prevent the route distribution to those subnets. For more information, see [Virtual network routing table](../virtual-network/manage-route-table.yml).
2626

27-
There are two scenarios in this article. Select the scenario that applies to your environment. Most people use the **Same deployment model** scenario. If you aren't working with a classic deployment model VNet (legacy VNet) that already exists in your environment, you won't need to work with the **Different deployment models** scenario.
28-
29-
* **Same deployment model**: Both virtual networks are created in the Resource Manager deployment model.
30-
* **Different deployment models**: The spoke virtual network is created in the classic deployment model, and the hub virtual network and gateway are in the Resource Manager deployment model. This scenario is useful when you need to connect a legacy VNet that already exists in the classic deployment model.
31-
3227
>[!NOTE]
3328
> If you make a change to the topology of your network and have Windows VPN clients, the VPN client package for Windows clients must be downloaded and installed again in order for the changes to be applied to the client.
3429
>
3530
3631
## Prerequisites
3732

38-
This article requires the following VNets and permissions. If you aren't working with the different deployment model scenario, you don't need to create the classic VNet.
33+
This article requires the following VNets and permissions.
3934

4035
### <a name="vnet"></a>Virtual networks
4136

4237
| VNet | Configuration steps| Virtual network gateway|
4338
|---|---|---|
4439
| Hub-RM | [Resource Manager](./tutorial-site-to-site-portal.md) | [Yes](tutorial-create-gateway-portal.md) |
4540
| Spoke-RM | [Resource Manager](./tutorial-site-to-site-portal.md) | No |
46-
| Spoke-Classic | [Classic](vpn-gateway-howto-site-to-site-classic-portal.md#CreatVNet) | No |
4741

4842
### <a name="permissions"></a>Permissions
4943

@@ -52,40 +46,42 @@ The accounts you use to create a virtual network peering must have the necessary
5246
|VNet|Deployment model|Role|Permissions|
5347
|---|---|---|---|
5448
|Hub-RM|Resource Manager|[Network Contributor](../role-based-access-control/built-in-roles.md?toc=%2fazure%2fvirtual-network%2ftoc.json#network-contributor)|Microsoft.Network/virtualNetworks/virtualNetworkPeerings/write|
55-
| |Classic|[Classic Network Contributor](../role-based-access-control/built-in-roles.md?toc=%2fazure%2fvirtual-network%2ftoc.json#classic-network-contributor)|N/A|
56-
|Spoke-Classic|Resource Manager|[Network Contributor](../role-based-access-control/built-in-roles.md?toc=%2fazure%2fvirtual-network%2ftoc.json#network-contributor)|Microsoft.Network/virtualNetworks/peer|
57-
||Classic|[Classic Network Contributor](../role-based-access-control/built-in-roles.md?toc=%2fazure%2fvirtual-network%2ftoc.json#classic-network-contributor)|Microsoft.ClassicNetwork/virtualNetworks/peer|
49+
|Spoke-RM|Resource Manager|[Network Contributor](../role-based-access-control/built-in-roles.md?toc=%2fazure%2fvirtual-network%2ftoc.json#network-contributor)|Microsoft.Network/virtualNetworks/peer|
5850

5951
Learn more about [built-in roles](../role-based-access-control/built-in-roles.md?toc=%2fazure%2fvirtual-network%2ftoc.json#network-contributor) and assigning specific permissions to [custom roles](../role-based-access-control/custom-roles.md?toc=%2fazure%2fvirtual-network%2ftoc.json) (Resource Manager only).
6052

61-
## <a name="same"></a>Same deployment model
53+
## To add a peering and enable transit
6254

63-
This is the more common scenario. In this scenario, the virtual networks are both in the Resource Manager deployment model. Use the following steps to create or update the virtual network peerings to enable gateway transit.
55+
1. In the [Azure portal](https://portal.azure.com), create or update the virtual network peering from the Hub-RM. Go to the **Hub-RM** virtual network. Select **Peerings**, then **+ Add** to open **Add peering**.
56+
1. On the **Add peering** page, configure the values for **Remote virtual network summary**.
6457

65-
### To add a peering and enable transit
58+
* Peering link name: Name the link. Example: **SpokeRMToHubRM**
59+
* Virtual network deployment model: **Resource Manager**
60+
* I know my resource ID: Leave blank. You only need to select this if you don't have read access to the virtual network or subscription you want to peer with.
61+
* Subscription: Select the subscription.
62+
* Virtual Network: **Spoke-RM**
6663

67-
1. In the [Azure portal](https://portal.azure.com), create or update the virtual network peering from the Hub-RM. Go to the **Hub-RM** virtual network. Select **Peerings**, then **+ Add** to open **Add peering**.
68-
1. On the **Add peering** page, configure the values for **This virtual network**.
64+
1. On the **Add peering** page, configure the values for **Remote virtual network peering settings**.
6965

70-
* Peering link name: Name the link. Example: **HubRMToSpokeRM**
71-
* Traffic to remote virtual network: **Allow**
72-
* Traffic forwarded from remote virtual network: **Allow**
73-
* Virtual network gateway: **Use this virtual network's gateway or Route Server**
66+
* Allow 'Spoke-RM' to access 'Hub-RM': **Leave the default of selected**.
67+
* Allow 'Spoke-RM' to receive forwarded traffic from 'Hub-RM': **Select the checkbox.**
68+
* Allow gateway or route server in the peered virtual network to forward traffic to 'Hub-RM': **Leave the default of un-selected**.
69+
* Enable 'SpokeRM' to use 'Hub-RM's' remote gateway or route server: **Select the checkbox.**
7470

75-
:::image type="content" source="./media/vpn-gateway-peering-gateway-transit/peering-vnet.png" alt-text="Screenshot shows add peering." lightbox="./media/vpn-gateway-peering-gateway-transit/peering-vnet.png":::
71+
:::image type="content" source="./media/vpn-gateway-peering-gateway-transit/peering-remote.png" alt-text="Screenshot shows add peering." lightbox="./media/vpn-gateway-peering-gateway-transit/peering-remote.png":::
7672

77-
1. On the same page, continue on to configure the values for the **Remote virtual network**.
73+
1. On the **Add peering** page, configure the values for **Local virtual network summary**.
7874

79-
* Peering link name: Name the link. Example: **SpokeRMtoHubRM**
80-
* Virtual network deployment model: **Resource Manager**
81-
* I know my resource ID: Leave blank. You only need to select this if you don't have read access to the virtual network or subscription you want to peer with.
82-
* Subscription: Select the subscription.
83-
* Virtual Network: **Spoke-RM**
84-
* Traffic to remote virtual network: **Allow**
85-
* Traffic forwarded from remote virtual network: **Allow**
86-
* Virtual network gateway: **Use the remote virtual network's gateway or Route Server**
75+
* Peering link name: Name the link. Example: **HubRMToSpokeRM**
8776

88-
:::image type="content" source="./media/vpn-gateway-peering-gateway-transit/peering-remote.png" alt-text="Screenshot shows values for remote virtual network." lightbox="./media/vpn-gateway-peering-gateway-transit/peering-remote.png":::
77+
1. On the **Add peering** page, configure the values for **Local virtual network peering settings**.
78+
79+
* Allow 'Hub-RM' to access the peered virtual network: **Leave the default of selected**.
80+
* Allow 'Hub-RM' to receive forwarded traffic from the peered virtual network: **Select the checkbox.**
81+
* Allow gateway or route server in 'Hub-RM' to forward traffic to the peered virtual network: **Select the checkbox.**
82+
* Enable 'Hub-RM' to use the peered virtual network's remote gateway or route server: **Leave the default of un-selected**.
83+
84+
:::image type="content" source="./media/vpn-gateway-peering-gateway-transit/peering-vnet.png" alt-text="Screenshot shows values for remote virtual network." lightbox="./media/vpn-gateway-peering-gateway-transit/peering-vnet.png":::
8985

9086
1. Select **Add** to create the peering.
9187
1. Verify the peering status as **Connected** on both virtual networks.
@@ -98,9 +94,7 @@ If you have an already existing peering, you can modify the peering for transit.
9894

9995
1. Update the VNet peering.
10096

101-
* Traffic to remote virtual network: **Allow**
102-
* Traffic forwarded to virtual network; **Allow**
103-
* Virtual network gateway or Route Server: **Use the remote virtual network's gateway or Route Server**
97+
Enable 'Spoke-RM' to use 'Hub-RM's' remote gateway or route server: **Select the checkbox.**
10498

10599
1. **Save** the peering settings.
106100

@@ -130,48 +124,6 @@ Add-AzVirtualNetworkPeering `
130124
-AllowGatewayTransit
131125
```
132126

133-
## <a name="different"></a>Different deployment models
134-
135-
In this configuration, the spoke VNet **Spoke-Classic** is in the classic deployment model and the hub VNet **Hub-RM** is in the Resource Manager deployment model. When configuring transit between deployment models, the virtual network gateway must be configured for the Resource Manager VNet, not the classic VNet.
136-
137-
For this configuration, you only need to configure the **Hub-RM** virtual network. You don't need to configure anything on the **Spoke-Classic** VNet.
138-
139-
1. In the Azure portal, go to the **Hub-RM** virtual network, select **Peerings**, then select **+ Add**.
140-
1. On the **Add peering** page, configure the following values:
141-
142-
* Peering link name: Name the link. Example: **HubRMToClassic**
143-
* Traffic to remote virtual network: **Allow**
144-
* Traffic forwarded from remote virtual network: **Allow**
145-
* Virtual network gateway or Route Server: **Use this virtual network's gateway or Route Server**
146-
* Peering link name: This value disappears when you select Classic for the virtual network deployment model.
147-
* Virtual network deployment model: **Classic**
148-
* I know my resource ID: Leave blank. You only need to select this if you don't have read access to the virtual network or subscription you want to peer with.
149-
150-
:::image type="content" source="./media/vpn-gateway-peering-gateway-transit/peering-classic.png" alt-text="Add peering page for Spoke-Classic" lightbox="./media/vpn-gateway-peering-gateway-transit/peering-classic.png":::
151-
152-
1. Verify the subscription is correct, then select the virtual network from the dropdown.
153-
1. Select **Add** to add the peering.
154-
1. Verify the peering status as **Connected** on the Hub-RM virtual network.
155-
156-
For this configuration, you don't need to configure anything on the **Spoke-Classic** virtual network. Once the status shows **Connected**, the spoke virtual network can use the connectivity through the VPN gateway in the hub virtual network.
157-
158-
### <a name="ps-different"></a>PowerShell sample
159-
160-
You can also use PowerShell to create or update the peering. Replace the variables and subscription ID with the values of your virtual network and resource groups, and subscription. You only need to create virtual network peering on the hub virtual network.
161-
162-
```azurepowershell-interactive
163-
$HubRG = "HubRG1"
164-
$HubRM = "Hub-RM"
165-
166-
$hubrmvnet = Get-AzVirtualNetwork -Name $HubRM -ResourceGroup $HubRG
167-
168-
Add-AzVirtualNetworkPeering `
169-
-Name HubRMToClassic `
170-
-VirtualNetwork $hubrmvnet `
171-
-RemoteVirtualNetworkId "/subscriptions/<subscription Id>/resourceGroups/Default-Networking/providers/Microsoft.ClassicNetwork/virtualNetworks/Spoke-Classic" `
172-
-AllowGatewayTransit
173-
```
174-
175127
## Next steps
176128

177129
* Learn more about [virtual network peering constraints and behaviors](../virtual-network/virtual-network-manage-peering.md#requirements-and-constraints) and [virtual network peering settings](../virtual-network/virtual-network-manage-peering.md#create-a-peering) before creating a virtual network peering for production use.

0 commit comments

Comments
 (0)