title | titleSuffix | description | author | ms.author | ms.service | ms.topic | ms.date | ms.custom |
---|---|---|---|---|---|---|---|---|
Tutorial: Create a gateway load balancer - Azure portal |
Azure Load Balancer |
Use this tutorial to learn how to create a gateway load balancer using the Azure portal. |
greg-lindsay |
greglin |
load-balancer |
tutorial |
12/03/2021 |
template-tutorial, ignite-fall-2021 |
Azure Load Balancer consists of Standard, Basic, and Gateway SKUs. Gateway Load Balancer is used for transparent insertion of Network Virtual Appliances (NVA). Use Gateway Load Balancer for scenarios that require high performance and high scalability of NVAs.
In this tutorial, you learn how to:
[!div class="checklist"]
- Create virtual network.
- Create network security group.
- Create a gateway load balancer.
- Chain a load balancer frontend to gateway load balancer.
Important
Gateway Azure Load Balancer is currently in public preview. This preview version is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
- An Azure account with an active subscription. Create an account for free.
- An existing public standard SKU Azure Load Balancer. For more information on creating a load balancer, see Create a public load balancer using the Azure portal.
- For the purposes of this tutorial, the load balancer in the examples is named myLoadBalancer.
Sign in to the Azure portal at https://portal.azure.com.
A virtual network is needed for the resources that are in the backend pool of the gateway load balancer.
-
In the search box at the top of the portal, enter Virtual network. Select Virtual Networks in the search results.
-
In Virtual networks, select + Create.
-
In Create virtual network, enter or select this information in the Basics tab:
Setting Value Project Details Subscription Select your Azure subscription Resource Group Select Create new.
In Name enter TutorGwLB-rg.
Select OK.Instance details Name Enter myVNet Region Select East US -
Select the IP Addresses tab or select the Next: IP Addresses button at the bottom of the page.
-
In the IP Addresses tab, enter this information:
Setting Value IPv4 address space Enter 10.1.0.0/16 -
Under Subnet name, select the word default.
-
In Edit subnet, enter this information:
Setting Value Subnet name Enter myBackendSubnet Subnet address range Enter 10.1.0.0/24 -
Select Save.
-
Select the Security tab.
-
Under BastionHost, select Enable. Enter this information:
Setting Value Bastion name Enter myBastionHost AzureBastionSubnet address space Enter 10.1.1.0/27 Public IP Address Select Create new.
For Name, enter myBastionIP.
Select OK. -
Select the Review + create tab or select the Review + create button.
-
Select Create.
Use the following example to create a network security group. You'll configure the NSG rules needed for network traffic in the virtual network created previously.
-
In the search box at the top of the portal, enter Network Security. Select Network security groups in the search results.
-
Select + Create.
-
In the Basics tab of Create network security group, enter, or select the following information:
Setting Value Project details Subscription Select your subscription. Resource group Select TutorGwLB-rg Instance details Name Enter myNSG. Region Select East US. -
Select the Review + create tab or select the Review + create button.
-
Select Create.
-
In the search box at the top of the portal, enter Network Security. Select Network security groups in the search results.
-
Select myNSG.
-
Select Inbound security rules in Settings in myNSG.
-
Select + Add.
-
In Add inbound security rule, enter or select the following information.
Setting Value Source Leave the default of Any. Source port ranges Leave the default of '*'. Destination Leave the default of Any. Service Leave the default of Custom. Destination port ranges Enter '*'. Protocol Select Any. Action Leave the default of Allow. Priority Enter 100. Name Enter myNSGRule-AllowAll-All -
Select Add.
-
Select Outbound security rules in Settings.
-
Select + Add.
-
In Add outbound security rule, enter or select the following information.
Setting Value Source Leave the default of Any. Source port ranges Leave the default of '*'. Destination Leave the default of Any. Service Leave the default of Custom. Destination port ranges Enter '*'. Protocol Select TCP. Action Leave the default of Allow. Priority Enter 100. Name Enter myNSGRule-AllowAll-TCP-Out -
Select Add.
Select this NSG when creating the NVAs for your deployment.
In this section, you'll create the configuration and deploy the gateway load balancer.
-
In the search box at the top of the portal, enter Load balancer. Select Load balancers in the search results.
-
In the Load balancer page, select Create.
-
In the Basics tab of the Create load balancer page, enter, or select the following information:
Setting Value Project details Subscription Select your subscription. Resource group Select TutorGwLB-rg. Instance details Name Enter myLoadBalancer-gw Region Select (US) East US. Type Select Internal. SKU Select Gateway. :::image type="content" source="./media/tutorial-gateway-portal/create-load-balancer.png" alt-text="Screenshot of create standard load balancer basics tab." border="true":::
-
Select Next: Frontend IP configuration at the bottom of the page.
-
In Frontend IP configuration, select + Add a frontend IP.
-
Enter MyFrontEnd in Name.
-
Select myBackendSubnet in Subnet.
-
Select Dynamic for Assignment.
-
Select Add.
-
Select Next: Backend pools at the bottom of the page.
-
In the Backend pools tab, select + Add a backend pool.
-
In Add backend pool, enter or select the following information.
Setting Value Name Enter myBackendPool. Backend Pool Configuration Select NIC. IP Version Select IPv4. Gateway load balancer configuration Type Select Internal and External. Internal port Leave the default of 10800. Internal identifier Leave the default of 800. External port Leave the default of 10801. External identifier Leave the default of 801. -
Select Add.
-
Select the Next: Inbound rules button at the bottom of the page.
-
In Load balancing rule in the Inbound rules tab, select + Add a load balancing rule.
-
In Add load balancing rule, enter or select the following information:
Setting Value Name Enter myLBRule IP Version Select IPv4 or IPv6 depending on your requirements. Frontend IP address Select MyFrontend. Backend pool Select myBackendPool. Health probe Select Create new.
In Name, enter myHealthProbe.
Select TCP in Protocol.
Leave the rest of the defaults, and select OK.Session persistence Select None. :::image type="content" source="./media/tutorial-gateway-portal/add-load-balancing-rule.png" alt-text="Screenshot of create load-balancing rule." border="true":::
-
Select Add.
-
Select the blue Review + create button at the bottom of the page.
-
Select Create.
Deploy NVAs through the Azure Marketplace. Once deployed, add the NVA virtual machines to the backend pool of the gateway load balancer. To add the virtual machines, go to the backend pools tab of your gateway load balancer.
In this example, you'll chain the frontend of a standard load balancer to the gateway load balancer.
You'll add the frontend to the frontend IP of an existing load balancer in your subscription.
-
In the search box in the Azure portal, enter Load balancer. In the search results, select Load balancers.
-
In Load balancers, select myLoadBalancer or your existing load balancer name.
-
In the load balancer page, select Frontend IP configuration in Settings.
-
Select the frontend IP of the load balancer. In this example, the name of the frontend is myFrontendIP.
:::image type="content" source="./media/tutorial-gateway-portal/frontend-ip.png" alt-text="Screenshot of frontend IP configuration." border="true":::
-
Select myFrontendIP (10.1.0.4) in the pull-down box next to Gateway load balancer.
-
Select Save.
:::image type="content" source="./media/tutorial-gateway-portal/select-gateway-load-balancer.png" alt-text="Screenshot of addition of gateway load balancer to frontend IP." border="true":::
Alternatively, you can chain a VM's NIC IP configuration to the gateway load balancer.
You'll add the gateway load balancer's frontend to an existing VM's NIC IP configuration.
Important
A virtual machine must have a public IP address assigned before attempting to chain the NIC configuration to the frontend of the gateway load balancer.
-
In the search box in the Azure portal, enter Virtual machine. In the search results, select Virtual machines.
-
In Virtual machines, select the virtual machine that you want to add to the gateway load balancer. In this example, the virtual machine is named myVM1.
-
In the overview of the virtual machine, select Networking in Settings.
-
In Networking, select the name of the network interface attached to the virtual machine. In this example, it's myvm1229.
:::image type="content" source="./media/tutorial-gateway-portal/vm-nic.png" alt-text="Screenshot of virtual machine networking overview." border="true":::
-
In the network interface page, select IP configurations in Settings.
-
Select myFrontend in Gateway Load balancer.
:::image type="content" source="./media/tutorial-gateway-portal/vm-nic-gw-lb.png" alt-text="Screenshot of nic IP configuration." border="true":::
-
Select Save.
When no longer needed, delete the resource group, load balancer, and all related resources. To do so, select the resource group TutorGwLB-rg that contains the resources and then select Delete.
Create Network Virtual Appliances in Azure.
When creating the NVAs, choose the resources created in this tutorial:
-
Virtual network
-
Subnet
-
Network security group
-
Gateway load balancer
Advance to the next article to learn how to create a cross-region Azure Load Balancer.
[!div class="nextstepaction"] Cross-region load balancer