You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Create a virtual network peering - Resource Manager, different subscriptions and Microsoft Entra tenants
14
14
15
-
In this tutorial, you learn to create a virtual network peering between virtual networks created through Resource Manager. The virtual networks exist in different subscriptions that may belong to different Microsoft Entra tenants. Peering two virtual networks enables resources in different virtual networks to communicate with each other with the same bandwidth and latency as though the resources were in the same virtual network. Learn more about [Virtual network peering](virtual-network-peering-overview.md).
15
+
In this tutorial, you learn to create a virtual network peering between virtual networks created through Resource Manager. The virtual networks exist in different subscriptions that might belong to different Microsoft Entra tenants. Peering two virtual networks enables resources in different virtual networks to communicate with each other with the same bandwidth and latency as though the resources were in the same virtual network. Learn more about [Virtual network peering](virtual-network-peering-overview.md).
16
16
17
17
Depending on whether, the virtual networks are in the same, or different subscriptions the steps to create a virtual network peering are different. Steps to peer networks created with the classic deployment model are different. For more information about deployment models, see [Azure deployment model](../azure-resource-manager/management/deployment-models.md?toc=%2fazure%2fvirtual-network%2ftoc.json).
18
18
@@ -26,13 +26,13 @@ Learn how to create a virtual network peering in other scenarios by selecting th
26
26
27
27
A virtual network peering can't be created between two virtual networks deployed through the classic deployment model. If you need to connect virtual networks that were both created through the classic deployment model, you can use an Azure [VPN Gateway](../vpn-gateway/tutorial-site-to-site-portal.md?toc=%2fazure%2fvirtual-network%2ftoc.json) to connect the virtual networks.
28
28
29
-
This tutorial peers virtual networks in the same region. You can also peer virtual networks in different [supported regions](virtual-network-manage-peering.md#cross-region). It's recommended that you familiarize yourself with the [peering requirements and constraints](virtual-network-manage-peering.md#requirements-and-constraints) before peering virtual networks.
29
+
This tutorial peers virtual networks in the same region. You can also peer virtual networks in different [supported regions](virtual-network-manage-peering.md#cross-region). Familiarize yourself with the [peering requirements and constraints](virtual-network-manage-peering.md#requirements-and-constraints) before peering virtual networks.
30
30
31
31
## Prerequisites
32
32
33
33
# [**Portal**](#tab/create-peering-portal)
34
34
35
-
- An Azure account(s) with two active subscriptions. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
35
+
- An Azure account or accounts with two active subscriptions. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
36
36
37
37
- An Azure account with permissions in both subscriptions or an account in each subscription with the proper permissions to create a virtual network peering. For a list of permissions, see [Virtual network peering permissions](virtual-network-manage-peering.md#permissions).
38
38
@@ -48,7 +48,7 @@ This tutorial peers virtual networks in the same region. You can also peer virtu
- An Azure account(s) with two active subscriptions. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
51
+
- An Azure account or accounts with two active subscriptions. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
52
52
53
53
- An Azure account with permissions in both subscriptions or an account in each subscription with the proper permissions to create a virtual network peering. For a list of permissions, see [Virtual network peering permissions](virtual-network-manage-peering.md#permissions).
54
54
@@ -62,15 +62,15 @@ This tutorial peers virtual networks in the same region. You can also peer virtu
62
62
63
63
- Azure PowerShell installed locally or Azure Cloud Shell.
64
64
65
-
- Sign in to Azure PowerShell and ensure you've selected the subscription with which you want to use this feature. For more information, see [Sign in with Azure PowerShell](/powershell/azure/authenticate-azureps).
65
+
- Sign in to Azure PowerShell and select the subscription with which you want to use this feature. For more information, see [Sign in with Azure PowerShell](/powershell/azure/authenticate-azureps).
66
66
67
67
- Ensure your `Az.Network` module is 4.3.0 or later. To verify the installed module, use the command `Get-InstalledModule -Name "Az.Network"`. If the module requires an update, use the command `Update-Module -Name Az.Network` if necessary.
68
68
69
69
If you choose to install and use PowerShell locally, this article requires the Azure PowerShell module version 5.4.1 or later. Run `Get-Module -ListAvailable Az` to find the installed version. If you need to upgrade, see [Install Azure PowerShell module](/powershell/azure/install-azure-powershell). If you're running PowerShell locally, you also need to run `Connect-AzAccount` to create a connection with Azure.
70
70
71
71
# [**Azure CLI**](#tab/create-peering-cli)
72
72
73
-
- An Azure account(s) with two active subscriptions. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
73
+
- An Azure account or accounts with two active subscriptions. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
74
74
75
75
- An Azure account with permissions in both subscriptions or an account in each subscription with the proper permissions to create a virtual network peering. For a list of permissions, see [Virtual network peering permissions](virtual-network-manage-peering.md#permissions).
76
76
@@ -374,7 +374,7 @@ In this section, you sign in as **user-2** and create a virtual network for the
374
374
375
375
# [**Portal**](#tab/create-peering-portal)
376
376
377
-
Repeat the steps in the [previous section](#create-virtual-network) to create a second virtual network with the following values:
377
+
Create a second virtual network with the following values by repeating the steps in the [previous section](#create-virtual-network).
378
378
379
379
| Setting | Value |
380
380
| --- | --- |
@@ -662,26 +662,24 @@ You need the **Resource ID** for **vnet-2** from the previous steps to set up th
662
662
663
663
| Setting | Value |
664
664
| ------- | ----- |
665
-
|**This virtual network**||
666
-
| Peering link name | Enter **vnet-1-to-vnet-2**. |
667
-
| Allow 'vnet-1' to access 'vnet-2' | Leave the default of selected. |
668
-
| Allow 'vnet-1' to receive forwarded traffic from 'vnet-2' | Select the checkbox. |
669
-
| Allow gateway in 'vnet-1' to forward traffic to 'vnet-2' | Leave the default of cleared. |
670
-
| Enable 'vnet-1' to use 'vnet-2' remote gateway | Leave the default of cleared. |
671
-
| Use remote virtual network gateway or route server | Leave the default of cleared. |
672
-
|**Remote virtual network**||
673
-
| Peering link name | Leave blank. |
674
-
| Virtual network deployment model | Select **Resource manager**. |
675
-
| Select the box for **I know my resource ID**. ||
676
-
| Resource ID | Enter or paste the **Resource ID** for **vnet-2**. |
677
-
678
-
1. In the pull-down box, select the **Directory** that corresponds with **vnet-2** and **user-2**.
679
-
680
-
1. Select **Authenticate**.
681
-
682
-
:::image type="content" source="./media/create-peering-different-subscriptions/vnet-1-to-vnet-2-peering.png" alt-text="Screenshot of peering from vnet-1 to vnet-2.":::
665
+
|**Remote virtual network summary**||
666
+
| Peering link name |**vnet-2-to-vnet-1**|
667
+
| Virtual network deployment model |**Resource Manager**|
668
+
| I know my resource ID |**Select the box**|
669
+
| Resource ID |**Enter the Resource ID for vnet-2**|
670
+
| Directory | Select the Microsoft Entra ID directory that corresponds with **vnet-2** and **user-2**|
671
+
|**Remote virtual network peering settings**||
672
+
| Allow 'the peered virtual network' to access 'vnet-1' | Leave the default of **Enabled**|
673
+
| Allow 'the peered virtual network' to receive forwarded traffic from 'vnet-1' |**Select the box**|
674
+
|**Local virtual network summary**||
675
+
| Peering link name |**vnet-1-to-vnet-2**|
676
+
|**Local virtual network peering settings**||
677
+
| Allow 'vnet-1' to access 'the peered virtual network' | Leave the default of **Enabled**|
678
+
| Allow 'vnet-1' to receive forwarded traffic from 'the peered virtual network' |**Select the box**|
683
679
684
680
1. Select **Add**.
681
+
682
+
:::image type="content" source="./media/create-peering-different-subscriptions/vnet-1-to-vnet-2-peering.png" alt-text="Screenshot of peering from vnet-1 to vnet-2.":::
685
683
686
684
1. Sign out of the portal as **user-1**.
687
685
@@ -713,7 +711,7 @@ Connect-AzAccount
713
711
714
712
### Change to subscription-1 (optional)
715
713
716
-
You may have to switch back to **subscription-1** to continue with the actions in **subscription-1**.
714
+
You might have to switch back to **subscription-1** to continue with the actions in **subscription-1**.
717
715
718
716
Change context to **subscription-1**.
719
717
@@ -786,7 +784,7 @@ az login
786
784
787
785
### Change to subscription-1 (optional)
788
786
789
-
You may have to switch back to **subscription-1** to continue with the actions in **subscription-1**.
787
+
You might have to switch back to **subscription-1** to continue with the actions in **subscription-1**.
790
788
791
789
Change context to **subscription-1**.
792
790
@@ -840,17 +838,23 @@ You need the **Resource IDs** for **vnet-1** from the previous steps to set up t
840
838
841
839
| Setting | Value |
842
840
| ------- | ----- |
843
-
|**This virtual network**||
844
-
| Peering link name | Enter **vnet-2-to-vnet-1**. |
845
-
| Allow 'vnet-2' to access 'vnet-1' | Leave the default of selected. |
846
-
| Allow 'vnet-2' to receive forwarded traffic from 'vnet-1' | Select the checkbox. |
847
-
| Allow gateway in 'vnet-2' to forward traffic to 'vnet-1' | Leave the default of cleared. |
848
-
| Enable 'vnet-2' to use 'vnet-1's' remote gateway | Leave the default of cleared. |
849
-
|**Remote virtual network**||
850
-
| Peering link name | Leave blank. |
851
-
| Virtual network deployment model | Select **Resource manager**. |
852
-
| Select the box for **I know my resource ID**. ||
853
-
| Resource ID | Enter or paste the **Resource ID** for **vnet-1**. |
841
+
|**Remote virtual network summary**||
842
+
| Peering link name |**vnet-1-to-vnet-2**|
843
+
| Virtual network deployment model |**Resource Manager**|
844
+
| I know my resource ID |**Select the box**|
845
+
| Resource ID |**Enter the Resource ID for vnet-2**|
846
+
| Directory | Select the Microsoft Entra ID directory that corresponds with **vnet-1** and **user-1**|
847
+
|**Remote virtual network peering settings**||
848
+
| Allow 'the peered virtual network' to access 'vnet-1' | Leave the default of **Enabled**|
849
+
| Allow 'the peered virtual network' to receive forwarded traffic from 'vnet-1' |**Select the box**|
850
+
|**Local virtual network summary**||
851
+
| Peering link name |**vnet-1-to-vnet-2**|
852
+
|**Local virtual network peering settings**||
853
+
| Allow 'vnet-1' to access 'the peered virtual network' | Leave the default of **Enabled**|
854
+
| Allow 'vnet-1' to receive forwarded traffic from 'the peered virtual network' |**Select the box**|
855
+
856
+
1. Select **Add**.
857
+
854
858
855
859
1. In the pull-down box, select the **Directory** that corresponds with **vnet-1** and **user-1**.
856
860
@@ -888,7 +892,7 @@ Connect-AzAccount
888
892
889
893
### Change to subscription-2 (optional)
890
894
891
-
You may have to switch back to **subscription-2** to continue with the actions in **subscription-2**.
895
+
You might have to switch back to **subscription-2** to continue with the actions in **subscription-2**.
892
896
893
897
Change context to **subscription-2**.
894
898
@@ -961,7 +965,7 @@ az login
961
965
962
966
### Change to subscription-2 (optional)
963
967
964
-
You may have to switch back to **subscription-2** to continue with the actions in **subscription-2**.
968
+
You might have to switch back to **subscription-2** to continue with the actions in **subscription-2**.
965
969
966
970
Change context to **subscription-2**.
967
971
@@ -992,7 +996,10 @@ az network vnet peering list \
992
996
```
993
997
---
994
998
995
-
The peering is successfully established after you see **Connected** in the **Peering status** column for both virtual networks in the peering. Any Azure resources you create in either virtual network are now able to communicate with each other through their IP addresses. If you're using subnet-1 Azure name resolution for the virtual networks, the resources in the virtual networks aren't able to resolve names across the virtual networks. If you want to resolve names across virtual networks in a peering, you must create your own DNS server or use Azure DNS.
999
+
The peering is successfully established after you see **Connected** in the **Peering status** column for both virtual networks in the peering. Any Azure resources you create in either virtual network are now able to communicate with each other through their IP addresses. If you're using Azure name resolution for the virtual networks, the resources in the virtual networks aren't able to resolve names across the virtual networks. If you want to resolve names across virtual networks in a peering, you must create your own DNS (Domain Name System) server or use Azure DNS.
1000
+
1001
+
> [!IMPORTANT]
1002
+
> If you update the address space in one of the members of the peer, you must resync the connection to reflect the address space changes. For more information, see [Update the address space for a peered virtual network using the Azure portal](/azure/virtual-network/update-virtual-network-peering-address-space#modify-the-address-range-prefix-of-an-existing-address-range)
996
1003
997
1004
For more information about using your own DNS for name resolution, see, [Name resolution using your own DNS server](virtual-networks-name-resolution-for-vms-and-role-instances.md#name-resolution-that-uses-your-own-dns-server).
Copy file name to clipboardExpand all lines: includes/virtual-network-create-tabs.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
author: asudbring
6
6
ms.service: virtual-network
7
7
ms.topic: include
8
-
ms.date: 08/23/2023
8
+
ms.date: 07/01/2024
9
9
ms.author: allensu
10
10
ms.custom: include file
11
11
---
@@ -39,13 +39,12 @@ The following procedure creates a virtual network with a resource subnet.
39
39
40
40
| Setting | Value |
41
41
|---|---|
42
-
|**Subnet details**||
43
-
| Subnet template | Leave the default **Default**. |
42
+
| Subnet purpose | Leave the default **Default**. |
44
43
| Name | Enter **subnet-1**. |
45
-
| Starting address | Leave the default of **10.0.0.0**. |
46
-
| Subnet size | Leave the default of **/24(256 addresses)**. |
47
44
48
-
:::image type="content" source="./media/virtual-network-create/address-subnet-space.png" alt-text="Screenshot of default subnet rename and configuration.":::
45
+
1. Leave the rest of the settings as their defaults. Select **Save**.
46
+
47
+
:::image type="content" source="./media/virtual-network-create/address-subnet-space.png" alt-text="Screenshot of default subnet rename and configuration." lightbox="./media/virtual-network-create/address-subnet-space.png":::
0 commit comments