The NLB is the software balance solution from Microsoft, I use it for staging, developer or testing environments normally, while for pre-production and production ones I always head on for the hardware ones; F5, Netscaler …
The configuration is easy, but for virtual environments it´s important to know how to configure it.
The first thing is to decide if we´ll use the same IP address for the NLB or if we´ll use an IP address for the virtual cluster (NLB) and each server will use their own IP for the communication between each other. I would go for the second one, it´s the one I´m used to choose.
Scenario:
In the scenario of today we do have a SharePoint farm with 3 servers (2 WFE + SQL), all based on Hyper-V technology. Each WFE server has 1 NIC. Let´s call the WFE1.contoso.com / WFE2.contoso.com.
We have an IP address for the virtual cluster (NLB): 172.22.25.12
The following Site collections must answer to the IP:
- First step.
For virtual machines under Hyper-V technology you must enable the spoofing of the MAC, it will not work otherwise. In the Hyper-V console, select the virtual machine, settings, and look for the network adapter you might use for NLB. Under the MAC address there´s a check to enable "Enable spoofing of the MAC address". The Virtual machine must be stopped to change this parameter.
- Ensure the feature (NLB) is enabled on the WFE server >> Click Start, click Administrative Tools, and then click Network Load Balancing Manager. If the option does not appear enable the feature following the steps below:
- Click Start, point to Administrative Tools, and then click Server Manager. In the Features Summary area of the Server Manager main window, click Add Features.
-- or --
In the Customize this server area of the Initial Configuration Tasks window, click Add Features.
- In the Add Features Wizard, select the checkbox next to Windows Network Load Balancing.
- Click Install.
- Creating a virtual cluster (NLB):
- To open Network Load Balancing Manager, click Start, click Administrative Tools, and then click Network Load Balancing Manager.
- Right-click Network Load Balancing Clusters, and then click New Cluster.
- In Host, enter the name of the host, and then click Connect. In our scenario: WFE1.contoso.com
- Select the interface that you want to use with the cluster, and then click Next.
- In Cluster IP Addresses, click Add to enter the cluster IP address that is shared by every host in the cluster: in our case 172.22.25.12
- In Cluster operation mode, click Unicast (by default)
- right-click the new cluster, and then click Add Host to Cluster. At this time we´ll add the second server: WFE2.contoso.com
If you check the IPs in the Network properties or query ipconfig (cmd) it will appear that the NIC have 2 IPs, the original and the new for the NLB.
- How can I get to resolve the IP address? You must manually register the NLB cluster name in DNS by using a host (A) or (AAAA).In our case:
New registers Host (A):
Nombre : devlab.contoso.com
IP : 172.22.25.12
Nombre : devmysite.contoso.com
IP : 172.22.25.12
This is an easy configuration that works in this scenario, for other configurations you might review the specifications.