Skip to content

Commit b9584a4

Browse files
Merge pull request #252638 from mbender-ms/gwlb-dual
Load Balancer - New Article - GWLB IPv6
2 parents ebaa7be + 7d70848 commit b9584a4

File tree

2 files changed

+303
-1
lines changed

2 files changed

+303
-1
lines changed

articles/load-balancer/TOC.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
href: tutorial-gateway-powershell.md
7171
- name: Create gateway load balancer - Azure CLI
7272
href: tutorial-gateway-cli.md
73+
- name: Deploy a dual-stack gateway load balancer
74+
href: gateway-deploy-dual-stack-load-balancer.md
7375
- name: NAT gateway
7476
items:
7577
- name: Integrate NAT gateway public load balancer
@@ -277,7 +279,7 @@
277279
- name: Ruby
278280
href: https://www.rubydoc.info/gems/azure_mgmt_network/Azure/Network/Mgmt/V2020_03_01/LoadBalancers
279281
- name: Python
280-
href: /python/api/azure-mgmt-network/azure.mgmt.network.v2019_02_01.operations.loadbalancersoperations
282+
href: /python/api/azure-mgmt-network/azure.mgmt.network.operations.loadbalancersoperations
281283
- name: REST
282284
href: /rest/api/load-balancer/loadbalancers
283285
- name: Resource Manager template
Lines changed: 300 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,300 @@
1+
---
2+
title: Deploy a dual-stack Azure Gateway Load Balancer
3+
titlesuffix: Azure Virtual Network
4+
description: In this tutorial, you deploy IPv6 configurations to an existing IPv4-configured Azure Gateway Load Balancer
5+
author: mbender-ms
6+
ms.service: load-balancer
7+
ms.topic: how-to
8+
ms.workload: infrastructure-services
9+
ms.date: 09/15/2023
10+
ms.author: mbender
11+
ms.custom: template-how-to
12+
---
13+
14+
# Deploy a dual-stack Azure Gateway Load Balancer
15+
16+
In this tutorial, you deploy IPv6 configurations to an existing IPv4-configured Azure Gateway Load Balancer.
17+
18+
You learn to:
19+
> [!div class="checklist"]
20+
> * Add IPv6 address ranges to an existing subnet.
21+
> * Add an IPv6 frontend to Gateway Load Balancer.
22+
> * Add an IPv6 backend pool to Gateway Load Balancer.
23+
> * Add IPv6 configuration to network interfaces.
24+
> * Add a load balancing rule for IPv6 traffic.
25+
> * Chain the IPv6 load balancer frontend to Gateway Load Balancer.
26+
27+
Along with the Gateway Load Balancer, this scenario includes the following already-deployed resources:
28+
29+
- A dual stack virtual network and subnet.
30+
- A standard Load Balancer with dual (IPv4 + IPv6) front-end configurations.
31+
- A Gateway Load Balancer with IPv4 only.
32+
- A network interface with a dual-stack IP configuration, a network security group attached, and public IPv4 & IPv6 addresses.
33+
34+
## Prerequisites
35+
36+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
37+
- An existing dual-stack load balancer. For more information on creating a dual-stack load balancer, see [Deploy IPv6 dual stack application - Standard Load Balancer](virtual-network-ipv4-ipv6-dual-stack-standard-load-balancer-powershell.md).
38+
- An existing IPv4 gateway balancer. For more information on creating a gateway load balancer, see [Create a gateway load balancer](./tutorial-gateway-powershell.md).
39+
40+
## Add IPv6 address ranges to an existing subnet
41+
42+
# [PowerShell](#tab/powershell)
43+
44+
```powershell-interactive
45+
46+
#Add IPv6 ranges to the VNET and subnet
47+
#Retrieve the VNET object
48+
$rg = Get-AzResourceGroup -ResourceGroupName "myResourceGroup"
49+
$vnet = Get-AzVirtualNetwork -ResourceGroupName $rg.ResourceGroupName -Name "myVNet"
50+
51+
#Add IPv6 prefix to the VNET
52+
$vnet.addressspace.addressprefixes.add("fd00:db8:deca::/48")
53+
54+
#Update the running VNET
55+
$vnet | Set-AzVirtualNetwork
56+
57+
#Retrieve the subnet object from the local copy of the VNET
58+
$subnet= $vnet.subnets[0]
59+
60+
#Add IPv6 prefix to the subnet
61+
$subnet.addressprefix.add("fd00:db8:deca::/64")
62+
63+
#Update the running VNET with the new subnet configuration
64+
$vnet | Set-AzVirtualNetwork
65+
66+
```
67+
# [CLI](#tab/cli)
68+
69+
```azurecli-interactive
70+
71+
az network vnet subnet update
72+
--vnet-name myVNet
73+
--name myGWSubnet
74+
--resource-group myResourceGroup
75+
--address-prefixes "10.1.0.0/24" "fd00:db8:deca:deed::/64"
76+
77+
```
78+
---
79+
80+
## Add an IPv6 frontend to gateway load balancer
81+
82+
# [PowerShell](#tab/powershell)
83+
84+
```powershell-interactive
85+
86+
# Retrieve the load balancer configuration
87+
$gwlb = Get-AzLoadBalancer -ResourceGroupName "myResourceGroup"-Name "myGatewayLoadBalancer"
88+
89+
# Add IPv6 frontend configuration to the local copy of the load balancer configuration
90+
$gwlb | Add-AzLoadBalancerFrontendIpConfig `
91+
-Name "myGatewayFrontEndv6" `
92+
-PrivateIpAddressVersion "IPv6" `
93+
-Subnet $subnet
94+
95+
#Update the running load balancer with the new frontend
96+
$gwlb | Set-AzLoadBalancer
97+
98+
```
99+
# [CLI](#tab/cli)
100+
101+
102+
```azurecli-interactive
103+
104+
az network lb frontend-ip create --lb-name myGatewayLoadBalancer
105+
--name myGatewayFrontEndv6
106+
--resource-group myResourceGroup
107+
--private-ip-address-version IPv6
108+
--vnet-name myVNet
109+
--subnet myGWS
110+
111+
```
112+
---
113+
114+
## Add an IPv6 backend pool to gateway load balancer
115+
116+
# [PowerShell](#tab/powershell)
117+
118+
```azurepowershell-interactive
119+
120+
## Create IPv6 tunnel interfaces
121+
$int1 = @{
122+
Type = 'Internal'
123+
Protocol = 'Vxlan'
124+
Identifier = '866'
125+
Port = '2666'
126+
}
127+
$tunnelInterface1 = New-AzLoadBalancerBackendAddressPoolTunnelInterfaceConfig @int1
128+
129+
$int2 = @{
130+
Type = 'External'
131+
Protocol = 'Vxlan'
132+
Identifier = '867'
133+
Port = '2667'
134+
}
135+
$tunnelInterface2 = New-AzLoadBalancerBackendAddressPoolTunnelInterfaceConfig @int2
136+
137+
# Create the IPv6 backend pool
138+
$pool = @{
139+
Name = 'myGatewayBackendPoolv6'
140+
TunnelInterface = $tunnelInterface1,$tunnelInterface2
141+
}
142+
143+
# Add the backend pool to the load balancer
144+
$gwlb | Add-AzLoadBalancerBackendAddressPoolConfig @pool
145+
146+
# Update the load balancer
147+
$gwlb | Set-AzLoadBalancer
148+
149+
```
150+
# [CLI](#tab/cli)
151+
152+
```azurecli-interactive
153+
154+
az network lb address-pool create --address-pool-name myGatewayBackendPool \
155+
--lb-name myGatewayLoadBalancer \
156+
--resource-group myResourceGroup \
157+
--tunnel-interfaces "{[{"port": 2666,"identifier": 866,"protocol": "VXLAN","type": "Internal"},{"port": 2667,"identifier": 867,"protocol": "VXLAN","type": "External"}]}"
158+
159+
```
160+
---
161+
162+
## Add IPv6 configuration to network interfaces
163+
164+
# [PowerShell](#tab/powershell)
165+
166+
```azurepowershell-interactive
167+
168+
#Retrieve the NIC object
169+
$NIC_1 = Get-AzNetworkInterface -Name "myNic1" -ResourceGroupName $rg.ResourceGroupName
170+
171+
172+
$backendPoolv6 = Get-AzLoadBalancerBackendAddressPoolConfig -Name "myGatewayBackendPoolv6" -LoadBalancer $gwlb
173+
174+
#Add an IPv6 IPconfig to NIC_1 and update the NIC on the running VM
175+
$NIC_1 | Add-AzNetworkInterfaceIpConfig -Name myIPv6Config -Subnet $vnet.Subnets[0] -PrivateIpAddressVersion IPv6 -LoadBalancerBackendAddressPool $backendPoolv6
176+
$NIC_1 | Set-AzNetworkInterface
177+
178+
179+
```
180+
# [CLI](#tab/cli)
181+
182+
```azurecli-interactive
183+
184+
az network nic ip-config create \
185+
--name myIPv6Config \
186+
--nic-name myVM1 \
187+
--resource-group MyResourceGroup \
188+
--vnet-name myVnet \
189+
--subnet mySubnet \
190+
--private-ip-address-version IPv6 \
191+
--lb-address-pools gwlb-v6pool \
192+
--lb-name myGatewayLoadBalancer
193+
194+
```
195+
---
196+
197+
## Add a load balancing rule for IPv6 traffic
198+
199+
# [PowerShell](#tab/powershell)
200+
201+
```azurepowershell-interactive
202+
203+
# Retrieve the updated (live) versions of the frontend and backend pool, and existing health probe
204+
$frontendIPv6 = Get-AzLoadBalancerFrontendIpConfig -Name "myGatewayFrontEndv6" -LoadBalancer $gwlb
205+
$backendPoolv6 = Get-AzLoadBalancerBackendAddressPoolConfig -Name "myGatewayBackendPoolv6" -LoadBalancer $gwlb
206+
$healthProbe = Get-AzLoadBalancerProbeConfig -Name "myHealthProbe" -LoadBalancer $gwlb
207+
208+
# Create new LB rule with the frontend and backend
209+
$gwlb | Add-AzLoadBalancerRuleConfig `
210+
-Name "myRulev6" `
211+
-FrontendIpConfiguration $frontendIPv6 `
212+
-BackendAddressPool $backendPoolv6 `
213+
-Protocol All `
214+
-FrontendPort 0 `
215+
-BackendPort 0 `
216+
-Probe $healthProbe
217+
218+
#Finalize all the load balancer updates on the running load balancer
219+
$gwlb | Set-AzLoadBalancer
220+
221+
222+
```
223+
# [CLI](#tab/cli)
224+
225+
```azurecli-interactive
226+
az network lb rule create \
227+
--resource-group myResourceGroup \
228+
--lb-name myGatewayLoadBalancer \
229+
--name myGatewayLoadBalancer-rule \
230+
--protocol All \
231+
--frontend-port 0 \
232+
--backend-port 0 \
233+
--frontend-ip-name gwlb-v6fe \
234+
--backend-pool-name gwlb-v6pool \
235+
--probe-name myGatewayLoadBalancer-hp
236+
```
237+
---
238+
239+
## Chain the IPv6 load balancer frontend to gateway load balancer
240+
241+
# [PowerShell](#tab/powershell)
242+
243+
```azurepowershell-interactive
244+
245+
## Place the existing Standard load balancer into a variable. ##
246+
$par1 = @{
247+
ResourceGroupName = 'myResourceGroup'
248+
Name = 'myLoadBalancer'
249+
}
250+
$lb = Get-AzLoadBalancer @par1
251+
252+
## Place the public frontend IP of the Standard load balancer into a variable.
253+
$par3 = @{
254+
ResourceGroupName = 'myResourceGroup'
255+
Name = 'myIPv6PublicIP'
256+
}
257+
$publicIP = Get-AzPublicIPAddress @par3
258+
259+
## Chain the Gateway load balancer to your existing Standard load balancer frontend. ##
260+
# $feip = Get-AzLoadBalancerFrontendIpConfig -Name "myGatewayFrontEndv6" -LoadBalancer $gwlb
261+
262+
$par4 = @{
263+
Name = 'myIPv6FrontEnd'
264+
PublicIPAddress = $publicIP
265+
LoadBalancer = $lb
266+
GatewayLoadBalancerId = $feip.id
267+
}
268+
$config = Set-AzLoadBalancerFrontendIpConfig @par4
269+
270+
$config | Set-AzLoadBalancer
271+
272+
```
273+
# [CLI](#tab/cli)
274+
275+
```azurecli-interactive
276+
277+
feid=$(az network lb frontend-ip show \
278+
--resource-group myResourceGroup \
279+
--lb-name myLoadBalancer-gw \
280+
--name myFrontend \
281+
--query id \
282+
--output tsv)
283+
284+
az network lb frontend-ip update \
285+
--resource-group myResourceGroup \
286+
--name myFrontendIP \
287+
--lb-name myLoadBalancer \
288+
--public-ip-address myIPv6PublicIP \
289+
--gateway-lb $feid
290+
291+
```
292+
---
293+
## Limitations
294+
295+
- Gateway load balancer doesn't support NAT 64/46.
296+
- When you implement chaining, the IP address version of Standard and Gateway Load Balancer front end configurations must match.
297+
298+
## Next steps
299+
300+
- Learn more about [Azure Gateway Load Balancer partners](./gateway-partners.md) for deploying network appliances.

0 commit comments

Comments
 (0)