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
#Customer intent: I want to create a internal load balancer so that I can load balance internal traffic to VMs.
13
13
---
14
14
15
15
# Quickstart: Create an internal load balancer to load balance VMs using the Azure portal
16
16
17
-
Get started with Azure Load Balancer by using the Azure portal to create an internal load balancer for a backend pool with two virtual machines. Additional resources include Azure Bastion, NAT Gateway, a virtual network, and the required subnets.
17
+
Get started with Azure Load Balancer by using the Azure portal to create an internal load balancer for a backend pool with two virtual machines. Other resources include Azure Bastion, NAT Gateway, a virtual network, and the required subnets.
18
18
19
19
:::image type="content" source="media/quickstart-load-balancer-standard-internal-portal/internal-load-balancer-resources.png" alt-text="Diagram of resources deployed for internal load balancer.":::
20
20
21
+
> [!NOTE]
22
+
> In this example you'll create a NAT gateway to provide outbound Internet access. The outbound rules tab in the configuration is bypassed and isn't needed with the NAT gateway. For more information on Azure NAT gateway, see [What is Azure Virtual Network NAT?](../virtual-network/nat-gateway/nat-overview.md)
23
+
> For more information about outbound connections in Azure, see [Source Network Address Translation (SNAT) for outbound connections](../load-balancer/load-balancer-outbound-connections.md)
21
24
## Prerequisites
22
25
23
26
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
@@ -26,6 +29,41 @@ Get started with Azure Load Balancer by using the Azure portal to create an inte
26
29
27
30
Sign in to the [Azure portal](https://portal.azure.com).
28
31
32
+
## Create NAT gateway
33
+
34
+
All outbound internet traffic traverses the NAT gateway to the internet. Use the following example to create a NAT gateway for the hub and spoke network.
35
+
36
+
1. Sign in to the [Azure portal](https://portal.azure.com).
37
+
38
+
1. In the search box at the top of the portal, enter **NAT gateway**. Select **NAT gateways** in the search results.
39
+
40
+
1. Select **+ Create**.
41
+
42
+
1. In the **Basics** tab of **Create network address translation (NAT) gateway** enter or select the following information:
43
+
44
+
| Setting | Value |
45
+
| ------- | ----- |
46
+
|**Project details**||
47
+
| Subscription | Select your subscription. |
48
+
| Resource group | Select **Create new**. </br> Enter **CreateIntLBQS-rg** in Name. </br> Select **OK**. |
49
+
|**Instance details**||
50
+
| NAT gateway name | Enter **myNATgateway**. |
51
+
| Region | Select **East US**. |
52
+
| Availability zone | Select **None**. |
53
+
| Idle timeout (minutes) | Enter **15**. |
54
+
55
+
1. Select the **Outbound IP** tab or select the **Next: Outbound IP** button at the bottom of the page.
56
+
57
+
1. Select **Create a new public IP address** under **Public IP addresses**.
58
+
59
+
1. Enter **myNATgatewayIP** in **Name** in **Add a public IP address**.
60
+
61
+
1. Select **OK**.
62
+
63
+
1. Select the blue **Review + create** button at the bottom of the page, or select the **Review + create** tab.
64
+
65
+
1. Select **Create**.
66
+
29
67
## Create the virtual network
30
68
31
69
When you create an internal load balancer, a virtual network is configured as the network for the load balancer.
@@ -34,61 +72,62 @@ A private IP address in the virtual network is configured as the frontend for th
34
72
35
73
An Azure Bastion host is created to securely manage the virtual machines and install IIS.
36
74
37
-
In this section, you'll create a virtual network, subnet, and Azure Bastion host.
75
+
In this section, you create a virtual network, subnet, and Azure Bastion host.
38
76
39
77
1. In the search box at the top of the portal, enter **Virtual network**. Select **Virtual Networks** in the search results.
40
78
41
-
2. In **Virtual networks**, select **+ Create**.
79
+
1. In **Virtual networks**, select **+ Create**.
42
80
43
-
3. In **Create virtual network**, enter or select this information in the **Basics** tab:
81
+
1. In **Create virtual network**, enter or select this information in the **Basics** tab:
11. Select the **Review + create** tab or select the **Review + create** button.
128
+
1. Select the **Review + create** tab or select the **Review + create** button.
90
129
91
-
12. Select **Create**.
130
+
1. Select **Create**.
92
131
93
132
94
133
> [!NOTE]
@@ -98,67 +137,61 @@ In this section, you'll create a virtual network, subnet, and Azure Bastion host
98
137
99
138
In this section, you create a load balancer that load balances virtual machines.
100
139
101
-
During the creation of the load balancer, you'll configure:
140
+
During the creation of the load balancer, you configure:
102
141
103
-
* Frontend IP address
104
-
* Backend pool
105
-
* Inbound load-balancing rules
142
+
- Frontend IP address
143
+
- Backend pool
144
+
- Inbound load-balancing rules
106
145
107
146
1. In the search box at the top of the portal, enter **Load balancer**. Select **Load balancers** in the search results.
108
147
109
-
2. In the **Load balancer** page, select **Create**.
148
+
1. In the **Load balancer** page, select **Create**.
110
149
111
-
3. In the **Basics** tab of the **Create load balancer** page, enter, or select the following information:
150
+
1. In the **Basics** tab of the **Create load balancer** page, enter, or select the following information:
112
151
113
-
| Setting | Value |
114
-
| --- | --- |
152
+
| Setting | Value |
153
+
| --- | --- |
115
154
|**Project details**||
116
155
| Subscription | Select your subscription. |
117
156
| Resource group | Select **CreateIntLBQS-rg**. |
118
157
|**Instance details**||
119
-
| Name | Enter **myLoadBalancer**|
120
-
| Region | Select **West US 3**.|
158
+
| Name | Enter **myLoadBalancer**|
159
+
| Region | Select **East US**. |
121
160
| SKU | Leave the default **Standard**. |
122
-
| Type | Select **Internal**. |
161
+
| Type | Select **Internal**. |
123
162
| Tier | Leave the default of **Regional**. |
124
163
125
-
126
164
:::image type="content" source="./media/quickstart-load-balancer-standard-internal-portal/create-standard-internal-load-balancer.png" alt-text="Screenshot of create standard load balancer basics tab." border="true":::
127
165
128
-
4. Select **Next: Frontend IP configuration** at the bottom of the page.
129
-
130
-
5. In **Frontend IP configuration**, select **+ Add a frontend IP configuration**.
131
-
132
-
6. Enter **myFrontend** in **Name**.
133
-
134
-
7. Select **myBackendSubnet** in **Subnet**.
135
-
136
-
8. Select **Dynamic** for **Assignment**.
137
-
138
-
9. Select **Zone-redundant** in **Availability zone**.
139
-
140
-
10. Select **Add**.
141
-
142
-
11. Select **Next: Backend pools** at the bottom of the page.
143
-
144
-
12. In the **Backend pools** tab, select **+ Add a backend pool**.
145
-
146
-
13. Enter **myBackendPool** for **Name** in **Add backend pool**.
166
+
1. Select **Next: Frontend IP configuration** at the bottom of the page.
147
167
148
-
14. Select**NIC** or**IP Address** for **Backend Pool Configuration**.
168
+
1. In**Frontend IP configuration**, select**+ Add a frontend IP configuration**, then enter or select the following information:
149
169
150
-
15. Select **IPv4** or **IPv6** for **IP version**.
151
-
152
-
16. Select **Add**.
153
-
154
-
17. Select the **Next: Inbound rules** button at the bottom of the page.
155
-
156
-
18. In **Load balancing rule** in the **Inbound rules** tab, select **+ Add a load balancing rule**.
157
-
158
-
19. In **Add load balancing rule**, enter or select the following information:
170
+
| Setting | Value |
171
+
| ------- | ----- |
172
+
| Name | Enter **myFrontend**|
173
+
| Private IP address version | Select **IPv4** or **IPv6** depending on your requirements. |
159
174
160
175
| Setting | Value |
161
176
| ------- | ----- |
177
+
| Name | Enter **myFrontend**|
178
+
| Virtual network | Select **myVNet**|
179
+
| Subnet | Select **myBackendSubnet**|
180
+
| Assignment | Select **Dynamic**|
181
+
| Availability zone | Select **Zone-redundant**|
182
+
183
+
1. Select **Add**.
184
+
1. Select **Next: Backend pools** at the bottom of the page.
185
+
1. In the **Backend pools** tab, select **+ Add a backend pool**.
186
+
1. Enter **myBackendPool** for **Name** in **Add backend pool**.
187
+
1. Select **IP Address** for **Backend Pool Configuration**.
188
+
1. Select **Save**.
189
+
1. Select the **Next: Inbound rules** button at the bottom of the page.
190
+
1. In **Load balancing rule** in the **Inbound rules** tab, select **+ Add a load balancing rule**.
191
+
1. In **Add load balancing rule**, enter or select the following information:
192
+
193
+
|**Setting**|**Value**|
194
+
| ----------- | --------- |
162
195
| Name | Enter **myHTTPRule**|
163
196
| IP Version | Select **IPv4** or **IPv6** depending on your requirements. |
164
197
| Frontend IP address | Select **myFrontend**. |
@@ -169,61 +202,18 @@ During the creation of the load balancer, you'll configure:
169
202
| Health probe | Select **Create new**. </br> In **Name**, enter **myHealthProbe**. </br> Select **TCP** in **Protocol**. </br> Leave the rest of the defaults, and select **OK**. |
170
203
| Session persistence | Select **None**. |
171
204
| Idle timeout (minutes) | Enter or select **15**. |
172
-
| TCP reset | Select **Enabled**. |
173
-
| Floating IP | Select **Disabled**. |
174
-
175
-
20. Select **Add**.
176
-
177
-
21. Select the blue **Review + create** button at the bottom of the page.
178
-
179
-
22. Select **Create**.
180
-
181
-
> [!NOTE]
182
-
> In this example you'll create a NAT gateway to provide outbound Internet access. The outbound rules tab in the configuration is bypassed and isn't needed with the NAT gateway. For more information on Azure NAT gateway, see [What is Azure Virtual Network NAT?](../virtual-network/nat-gateway/nat-overview.md)
183
-
> For more information about outbound connections in Azure, see [Source Network Address Translation (SNAT) for outbound connections](../load-balancer/load-balancer-outbound-connections.md)
184
-
185
-
## Create NAT gateway
186
-
187
-
In this section, you'll create a NAT gateway for outbound internet access for resources in the virtual network.
188
-
189
-
1. In the search box at the top of the portal, enter **NAT gateway**. Select **NAT gateways** in the search results.
190
-
191
-
2. In **NAT gateways**, select **+ Create**.
205
+
| Enable TCP reset | Select **checkbox** . |
206
+
| Enable Floating IP | Leave the default of unselected. |
192
207
193
-
3. In**Create network address translation (NAT) gateway**, enter or select the following information:
208
+
1. Select**Save**.
194
209
195
-
| Setting | Value |
196
-
| ------- | ----- |
197
-
|**Project details**||
198
-
| Subscription | Select your subscription. |
199
-
| Resource group | Select **CreateIntLBQS-rg**. |
200
-
|**Instance details**||
201
-
| NAT gateway name | Enter **myNATgateway**. |
202
-
| Region | Select **West US 3**. |
203
-
| Availability zone | Select **None**. |
204
-
| Idle timeout (minutes) | Enter **15**. |
205
-
206
-
4. Select the **Outbound IP** tab or select the **Next: Outbound IP** button at the bottom of the page.
210
+
1. Select the blue **Review + create** button at the bottom of the page.
207
211
208
-
5. In **Outbound IP**, select **Create a new public IP address** next to **Public IP addresses**.
209
-
210
-
6. Enter **myNATgatewayIP** in **Name** in **Add a public IP address**.
211
-
212
-
7. Select **OK**.
213
-
214
-
8. Select the **Subnet** tab or select the **Next: Subnet** button at the bottom of the page.
215
-
216
-
9. In **Virtual network**, select **myVNet**.
217
-
218
-
10. Select **myBackendSubnet** under **Subnet name**.
219
-
220
-
11. Select the blue **Review + create** button at the bottom of the page, or select the **Review + create** tab.
221
-
222
-
12. Select **Create**.
212
+
1. Select **Create**.
223
213
224
214
## Create virtual machines
225
215
226
-
In this section, you'll create two VMs (**myVM1** and **myVM2**) in two different zones (**Zone 1** and **Zone 2**).
216
+
In this section, you create two VMs (**myVM1** and **myVM2**) in two different zones (**Zone 1** and **Zone 2**).
227
217
228
218
These VMs are added to the backend pool of the load balancer that was created earlier.
229
219
@@ -240,7 +230,7 @@ These VMs are added to the backend pool of the load balancer that was created ea
| Azure Spot instance | Leave the default of unselected. |
312
302
| Size | Choose VM size or take default setting |
313
303
|**Administrator account**||
@@ -372,7 +362,7 @@ In this section, you'll create a VM named **myTestVM**. This VM will be used to
372
362
373
363
## Test the load balancer
374
364
375
-
In this section, you'll test the load balancer by connecting to the **myTestVM** and verifying the webpage.
365
+
In this section, you test the load balancer by connecting to the **myTestVM** and verifying the webpage.
376
366
377
367
1. In the search box at the top of the portal, enter **Load balancer**. Select **Load balancers** in the search results.
378
368
@@ -388,13 +378,14 @@ In this section, you'll test the load balancer by connecting to the **myTestVM**
388
378
389
379
7. Enter the username and password entered during VM creation.
390
380
391
-
8. Open **Internet Explorer** on **myTestVM**.
381
+
8. Open **Microsoft Edge** on **myTestVM**.
392
382
393
383
9. Enter the IP address from the previous step into the address bar of the browser. The custom page displaying one of the backend server names is displayed on the browser. In this example, it's **10.1.0.4**.
394
384
395
385
:::image type="content" source="./media/quickstart-load-balancer-standard-internal-portal/load-balancer-test.png" alt-text="Screenshot shows a browser window displaying the customized page, as expected." border="true":::
396
386
397
-
To see the load balancer distribute traffic across both VMs, you can force-refresh your web browser from the client machine.
387
+
1. To see the load balancer distribute traffic across both VMs, navigate to the VM shown in the browser message, and stop the VM.
388
+
1. Refresh the browser window. The page should still display the customized page. The load balancer is now only sending traffic to the remaining VM.
398
389
399
390
## Clean up resources
400
391
@@ -404,11 +395,11 @@ When no longer needed, delete the resource group, load balancer, and all related
404
395
405
396
In this quickstart, you:
406
397
407
-
* Created an internal Azure Load Balancer
398
+
- Created an internal Azure Load Balancer
408
399
409
-
* Attached 2 VMs to the load balancer
400
+
- Attached 2 VMs to the load balancer
410
401
411
-
* Configured the load balancer traffic rule, health probe, and then tested the load balancer
402
+
- Configured the load balancer traffic rule, health probe, and then tested the load balancer
412
403
413
404
To learn more about Azure Load Balancer, continue to:
0 commit comments