Events
Apr 29, 2 PM - Apr 30, 7 PM
Join the ultimate Windows Server virtual event April 29-30 for deep-dive technical sessions and live Q&A with Microsoft engineers.
Sign up nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This article provides information on how to deploy a software load balancer (SLB) in a Software Defined Network (SDN).
The SLB enables even distribution of tenant and tenant customer network traffic among virtual network resources so that multiple servers can host the same workload to provide high availability and scalability. Learn more.
You can use VMM to deploy a network controller and a software load balancer. After you set up the SLB, you can use the multiplexing and NAT capabilities in your SDN infrastructure.
VMM 2025 and 2022 provide dual stack support for SLB.
Note
Ensure the following:
Ensure that the SSL certificate that you created during the NC deployment is copied to NCCertificate.cr folder.
The download contains two templates:
Both the templates have a default count of three virtual machines, which can be changed in the service template designer.
We recommend you use simplified SDN topology (two physical network) for SLB deployments. Skip creating transit logical network when simplified SDN topology template is used.
This is the IP address pool where DIPs are assigned to the SLB/MUX virtual machines and BGP Peer virtual machine (if deployed).
This is the IP address pool where DIPs are assigned to the SLB/MUX virtual machines and BGP Peer virtual machine (if deployed).
From VMM 2019 UR1 and later, you can create IP address pool using the Create Logical Network wizard.
You can create IP address pool using the Create Logical Network wizard.
Note
Create the IP address pool:
Right-click the logical network > Create IP Pool.
Provide a Name and optional description for the IP Pool and ensure that the correct logical network is selected.
In Network Site, select the subnet that this IP address pool will service. If you've more than one subnet as part of your HNV provider network, you need to create a static IP address pool for each subnet. If you've only one site (for example, like the sample topology), then you can just select Next.
In IP Address range, configure the starting and ending IP address. Don't use the first three IP addresses of your available subnet. For example, if your available subnet is from .1 to .254, start your range at .4 or greater.
Next, configure the default gateway address. Select Insert next to the Default gateways box, enter the address, and use the default metric. Optionally configure DNS and WINS.
Review the summary information, and select Finish to complete the wizard.
Note
Ensure that you associate the logical network with the management switch uplink port profile.
You need a private VIP address pool to assign a VIP, and a public VIP, to the SLB Manager service.
Note
The procedure for creating both is similar, but there are some differences.
Create a private VIP:
Create a public VIP:
In Settings, select One Connected Network. Select Create a VM network with the same name to allow virtual machines to access this logical network directly. Select Managed by the network controller.
For UR1 and later, in Settings, select connected Network and select both Managed by the network controller and Public IP address network.
Note
Don't use the first IP address of your available subnet. For example, if your available subnet is from .1 to .254, start your range at .2 or greater.
Note
Don't use the first IP address of your available subnet. For example, if your available subnet is from .1 to .254, start your range at .2 or greater.
The maximum number of addresses allowed in a single VIP range is 1024.
Note
Import the service template into the VMM library. For this example, we'll import the Generation 2 template.
Select Library > Import Template.
Browse to your service template folder, select the SLB Production Generation 2 VM.xml file.
Update the parameters for your environment as you import the service template.
Note
The library resources were imported during network controller deployment.
Remember that you must have copied the .CER certificate that you previously created to the NCCertificate.cr folder.
On the Summary page, review the details and select Import.
Note
You can customize the service template. Learn more.
Now deploy an SLB/MUX service instance.
Select the SLB Production Generation 2 VM.xml service template > Configure Deployment. Enter a Name and optional destination for the service instance. The destination must map to a host group that contains the hosts you've configured.
In the Network Settings section, map TransitNetwork to your transit VM network and ManagementNetwork to your management VM network.
Note
On the left of the Configure Deployment window, configure the settings as detailed in the following table:
Setting | Requirement | Description |
---|---|---|
Transit network | Required | Your transit VM network. |
LocalAdmin | Required | Select a Run As Account in your environment, which will be used as the local Administrator on the virtual machines. The username must be Administrator. |
Management network | Required | Choose the management VM network that you created for host management. |
MgmtDomainAccount | Required | Select a Run As Account with permissions to add the SLB/MUX virtual machines to the Active Directory domain associated with the network controller. This can be the same account you used in MgmtDomainAccount while deploying the network controller. |
MgmtDomainFQDN | Required | FQDN for the Active directory domain that the SLB/MUX virtual machines will join. |
SelfSignedConfiguration | Required | Specify True if the certificate you're using is self-signed. |
After you configure these settings, select Deploy Service to begin the service deployment job. Deployment times will vary depending on your hardware but are typically between 30 and 60 minutes.
If you're not using a volume licensed VHDX, or if the VHDX doesn't have the product key from an answer file, then deployment will stop at the Product Key page during SLB/MUX VM provisioning. You need to manually access the VM desktop, and either skip or enter the product key.
When the service deployment job is complete, verify that your service appears in VMs and Services > Services > VM Network Information for Services. Right-click the service and verify that the state is Deployed in Properties.
After deployment, verify that the service appears in All Hosts > Services > VM Network Information for Services. Right-click the SLB MUX service > Properties, and verify that the state is Deployed. If the SLB/MUX deployment fails, ensure that you delete the failed service instance before you try to deploy the SLB once again.
If you want to scale in or scale out a deployed software load balancer service instance, read this blog.
Note
After the SLB service is deployed, disable DNS registration on the virtual network adapter connected to the transit VM network on all the SLB MUX VMs.
Note
Before you proceed, ensure that you create the HNV PA Logical Network.
Now that the service is deployed, you can configure its properties. You'll need to associate the SLB service instance that you deployed with network controller, and then configuring BGP peering between the SLB/MUX instance and a TOR switch or a BGP router peer.
The SLB service instance is now associated with the SLBM service, and you must see the SLB/MUX virtual machine instance with all the settings listed under the Load Balancer role.
After you deploy the SLB/MUX, you can validate the deployment by configuring BGP peering between the SLB/MUX instance and a BGP router, assigning a public IP address to a tenant virtual machine or Service, and accessing the tenant virtual machine or service from outside the network.
Use the following procedure to validate:
Enter your external router details in the wizard. For example:
Select OK to complete the SLB/MUX service instance configuration.
Check the Jobs window to verify that the Update Fabric Role with required configuration and Associate service instance with fabric role jobs have completed successfully.
To complete the BGP peering operation, you need to configure BGP to peer with your SLB/MUX instance on the router. If you use a hardware router, you need to consult your vendor’s documentation regarding how to set up BGP peering for that device.
You also need to know the IP address of the SLB/MUX instance that you deployed earlier. To do this, you can either sign in to the SLB MUX virtual machine and run ipconfig /all from the command prompt, or you can get the IP address from the VMM console.
Note
Enter an IP from the transit network.
If you create a new VIP pool after peering is complete, you need to advertise all the VIP address pools using the VMM console.
After you validate, you can start using the SLB for load balancing. For related information, see load balance network traffic and configure NAT rules.
Use these steps to remove the SLB from the SDN fabric.
Events
Apr 29, 2 PM - Apr 30, 7 PM
Join the ultimate Windows Server virtual event April 29-30 for deep-dive technical sessions and live Q&A with Microsoft engineers.
Sign up nowTraining
Module
Load balance non-HTTP(S) traffic in Azure - Training
You learn the different load balancer options in Azure and how to choose and implement the right Azure solution for non-HTTP(S) traffic.
Certification
Microsoft Certified: Azure Network Engineer Associate - Certifications
Demonstrate the design, implementation, and maintenance of Azure networking infrastructure, load balancing traffic, network routing, and more.
Documentation
Set up an SDN RAS gateway in the VMM fabric
This article describes how to Set up an SDN RAS gateway in the VMM fabric
Set up a virtual network in SDN in the VMM fabric
This article describes the procedure on how to create a VM network in SDN, using a VMM.
Set up Software Defined Network (SDN) components in the VMM fabric using PowerShell
This article describes how to use PowerShell to deploy SDN components in the VMM fabric