Skip to content

Commit 7b6297b

Browse files
authored
Merge pull request #291515 from cherylmc/active-active-update
Update gateway-change-active-active.md
2 parents b8ff74c + 5bcd835 commit 7b6297b

File tree

3 files changed

+79
-18
lines changed

3 files changed

+79
-18
lines changed

articles/vpn-gateway/gateway-change-active-active.md

Lines changed: 79 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,26 @@ description: Learn how to change a VPN gateway from active-standby to active-act
55
author: cherylmc
66
ms.service: azure-vpn-gateway
77
ms.topic: how-to
8-
ms.date: 07/29/2024
8+
ms.date: 12/05/2024
99
ms.author: cherylmc
1010

1111
---
1212

13-
# Change a VPN gateway to active-active
13+
# Change a VPN gateway mode: active-active
1414

1515
The steps in this article help you change active-standby VPN gateways to active-active. You can also change an active-active gateway to active-standby. For more information about active-active gateways, see [About active-active gateways](about-active-active-gateways.md) and [Design highly available gateway connectivity for cross-premises and VNet-to-VNet connections](vpn-gateway-highlyavailable.md).
1616

17-
## Change active-standby to active-active
17+
BGP considerations:
18+
19+
* **Active-standby mode to active-active mode**: When you change an active-standby mode gateway to active-active mode, if you have BGP sessions running, the Azure VPN Gateway BGP configuration changes and two newly assigned BGP IPs are provisioned within the Gateway Subnet address range. The old Azure VPN Gateway BGP IP address will no longer exist. This incurs downtime. Updating the BGP peers on the on-premises devices is required. Once the gateway is finished provisioning, the new BGP IPs can be obtained and the on-premises device configuration needs to be updated accordingly. This applies to non APIPA BGP IPs. To understand how to configure BGP in Azure, see [How to configure BGP on Azure VPN gateways](bgp-howto.md).
20+
21+
* **Active-active mode to active-standby mode**: When you change an active-active mode gateway to active-standby, if you have BGP sessions running, the Azure VPN Gateway BGP configuration changes from two BGP IP addresses to a single BGP address. The platform generally assigns the last usable IP of the Gateway Subnet. This incurs downtime. Updating the BGP peers on the on-premises devices is required. This applies to non APIPA BGP IPs. To understand how to configure BGP in Azure, see [How to configure BGP on Azure VPN gateways](bgp-howto.md).
22+
23+
## Azure portal
24+
25+
Open the Azure portal and navigate to the page for your virtual network gateway. You can change the gateway mode on the **Configuration** page.
26+
27+
### Change a gateway mode to active-active
1828

1929
Use the following steps to convert active-standby mode gateway to active-active mode.
2030

@@ -25,19 +35,11 @@ Use the following steps to convert active-standby mode gateway to active-active
2535
1. On the **Configuration** page, configure the following settings:
2636

2737
* Change the Active-active mode to **Enabled**.
28-
* Click **Add new** to add another public IP address. If you already have an IP address that you previously created that's available to dedicate to this resource, you can instead select it from the **SECOND PUBLIC IP ADDRESS** dropdown.
29-
30-
:::image type="content" source="./media/active-active-portal/active-active.png" alt-text="Screenshot shows the Configuration page with active-active mode enabled." lightbox="./media/active-active-portal/active-active.png":::
31-
32-
1. On the **Choose public IP address** page and either specify an existing public IP address that meets the criteria, or select **+Create new** to create a new public IP address to use for the second VPN gateway instance. After you've specified the second public IP address, click **OK**.
38+
* For Second public IP address, if you already have an IP address that you previously created that's available to dedicate to this resource, you can select it from the **SECOND PUBLIC IP ADDRESS** dropdown. Otherwise, select **Add new** to open the **Add a public IP** settings. **Name** the new IP address, and then click **OK**.
3339

34-
1. At the top of the **Configuration** page, click **Save**. This update can take about 30-45 minutes to complete.
40+
1. At the top of the **Configuration** page, click **Save**. This update can take approximately 45 minutes, depending on your gateway SKU.
3541

36-
> [!IMPORTANT]
37-
> If you have BGP sessions running, be aware that the Azure VPN Gateway BGP configuration will change and two newly assigned BGP IPs will be provisioned within the Gateway Subnet address range. The old Azure VPN Gateway BGP IP address will no longer exist. This will incur downtime and updating the BGP peers on the on-premises devices will be required. Once the gateway is finished provisioning, the new BGP IPs can be obtained and the on-premises device configuration will need to be updated accordingly. This applies to non APIPA BGP IPs. To understand how to configure BGP in Azure, see [How to configure BGP on Azure VPN Gateways](bgp-howto.md).
38-
>
39-
40-
### Change active-active to active-standby
42+
### Change a gateway mode to active-standby
4143

4244
Use the following steps to convert active-active mode gateway to active-standby mode.
4345

@@ -47,11 +49,70 @@ Use the following steps to convert active-active mode gateway to active-standby
4749

4850
1. On the **Configuration** page, change the Active-active mode to **Disabled**.
4951

50-
1. At the top of the **Configuration** page, click **Save**.
52+
1. At the top of the **Configuration** page, click **Save**. This update can take approximately 45 minutes, depending on your gateway SKU.
53+
54+
## PowerShell
55+
56+
When you change an active-standby gateway to active-active mode, you create another public IP address, then add a second Gateway IP configuration.
57+
58+
### Change a gateway to active-active
59+
60+
The following example converts an active-standby gateway into an active-active gateway.
61+
62+
1. Declare your variables. Replace the following parameters used for the examples with the settings that you require for your own configuration, then declare these variables.
63+
64+
```azurepowershell-interactive
65+
$GWName = "VNet1GW"
66+
$VNetName = "VNet1"
67+
$RG = "TestRG1"
68+
$GWIPName2 = "VNet1GWpip2"
69+
$GWIPconf2 = "gw1ipconf2"
70+
```
71+
72+
After declaring the variables, you can copy and paste this example to your PowerShell console.
73+
74+
```azurepowershell-interactive
75+
$vnet = Get-AzVirtualNetwork -Name $VNetName -ResourceGroupName $RG
76+
$subnet = Get-AzVirtualNetworkSubnetConfig -Name 'GatewaySubnet' -VirtualNetwork $vnet
77+
$gw = Get-AzVirtualNetworkGateway -Name $GWName -ResourceGroupName $RG
78+
$location = $gw.Location
79+
```
80+
81+
1. Create the public IP address, then add the second gateway IP configuration.
82+
83+
```azurepowershell-interactive
84+
$gw1pip2 = New-AzPublicIpAddress -Name $GWIPName2 -ResourceGroupName $RG -Location $location -AllocationMethod Static -SKU Standard -Zone 1,2,3
85+
Add-AzVirtualNetworkGatewayIpConfig -VirtualNetworkGateway $gw -Name $GWIPconf2 -Subnet $subnet -PublicIpAddress $gw1pip2
86+
```
87+
88+
1. Enable active-active mode and update the gateway. In this step, you enable active-active mode and update the gateway. Notice that in this step, you must set the gateway object in PowerShell to trigger the actual update. This update can take approximately 45 minutes, depending on your gateway SKU.
89+
90+
```azurepowershell-interactive
91+
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gw -EnableActiveActiveFeature
92+
```
93+
94+
### Change a gateway to active-standby
95+
96+
1. Declare your variables. Replace the following parameters used for the examples with the settings that you require for your own configuration, then declare these variables.
97+
98+
```azurepowershell-interactive
99+
$GWName = "VNet1GW"
100+
$RG = "TestRG1"
101+
```
102+
103+
After declaring the variables, get the name of the IP configuration you want to remove.
104+
105+
```azurepowershell-interactive
106+
$gw = Get-AzVirtualNetworkGateway -Name $GWName -ResourceGroupName $RG
107+
$ipconfname = $gw.IpConfigurations[1].Name
108+
```
109+
110+
1. Remove the gateway IP configuration and disable the active-active mode. Use this example to remove the gateway IP configuration and disable active-active mode. Notice that you must set the gateway object in PowerShell to trigger the actual update. This update can take approximately 45 minutes, depending on your gateway SKU.
51111

52-
> [!IMPORTANT]
53-
> If you have BGP sessions running, be aware that the Azure VPN Gateway BGP configuration will change from two BGP IP addresses to a single BGP address. The platform generally assigns the last usable IP of the Gateway Subnet. This will incur downtime and updating the BGP peers on the on-premises devices will be required. This applies to non APIPA BGP IPs. To understand how to configure BGP in Azure, see [How to configure BGP on Azure VPN Gateways](bgp-howto.md).
54-
>
112+
```azurepowershell-interactive
113+
Remove-AzVirtualNetworkGatewayIpConfig -Name $ipconfname -VirtualNetworkGateway $gw
114+
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gw -DisableActiveActiveFeature
115+
```
55116

56117
## Next steps
57118

Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)