High availability is one of the major key points to provide continue services in nowadays. It helps to increase the production and reputation of the service providers. Nowadays, everyone wants the required services on-demand. Organizations use different technologies and solutions to provide high availability and redundancy. Network Load Balancing (NLB) is one of the most popular high availability and redundancy feature used in Windows-based networks. Here, we will explain a detailed step by step guide to install and configure Network Load Balancing in Windows Server 2016.
For this, we will use the following systems. So, please take a quick look to understand the systems and their configurations and roles:
- Role: NLB Node1
- IP Address: 10.0.0.100
- Role: NLB Node2
- IP Address: 10.0.0.101
- Role: Web client
- IP Address: 10.0.0.102
Installing the Network Load Balancing Feature on NLB nodes
Perform the following steps on the NLB nodes that are going to participate in the NLB cluster.
- Using the Server Manager console, launch the Add Roles and Features Wizard.
- Click Next until the Select server roles page is displayed and then select the Web Server (IIS) server role.
- On the Select features page, select the Network Load Balancing feature and proceed to next.
- On the rest of the pages, accept the default selections and complete the installation process.
- Using the similar steps, install the Web Server (IIS) server role and Network Load Balancing feature on the second NLB node that is SERVER1.
Configuring Network Load Balancing in Windows Server 2016
After installing Network Load Balancing feature on all the participating NLB nodes, the next step is to configure Network Load Balancing. For this, you need to perform the following steps:
- On the Server Manager console of the DC1 NLB node, click Tools and select Network Load Balancing Manager.
- Select and right-click Network Load Balancing Clusters and then click New Cluster.
- On the New Cluster: Connect dialog box, type DC1.mcsalab.local in the Host field and then click Connect. Verify that the Interface name is listed and then proceed to next.
- On the New Cluster: Host Parameters dialog box, set the priority value as 1. This NLB node will reply the clients’ queries, first. Before clicking Next, also ensure that the default status has set as Started.
- On the New Cluster: Cluster IP Addresses dialog box, click Add to add a new Cluster IP address.
Note: The Cluster IP address is the new virtual IP address on which the host service, in this case, IIS will run.
- On the Add IP Address dialog box, specify a Cluster IP Address such as 10.0.0.250, and click OK.
- Click Next to proceed on the New Cluster: Cluster Parameters dialog box, select a cluster operation mode. For example, Unicast and then click Next.
- On the New Cluster: Port Rules dialog box, click Finish and wait until the DC1 NLB node is added successfully. The Icon Color of the added NLB node should be green .
- Select and right-click the added cluster and then select Add Host To Cluster.
- On the Add Host to Cluster: Connect dialog box, type SERVER1, and then click Connect to add one more NLB node.
Important: If you get the Host unreachable error while connecting SERVER1 as the NLB node, move on to SERVER1 and open the Network Load Balancing Manager console. Repeat the same steps as you used to add the DC1 NLB node.
- On the Add Host to Cluster: Host Parameters dialog box, set the priority value as 2 and proceed to next.
- Accept the default selections on the rest of the pages and complete the wizard.
- Finally, verify that the second NLB nodes DC1 is added successfully.
Configuring Default Website to Test the NLB Configuration
To test the NLB cluster, use an NLB-Aware application such as IIS service role with the Cluster IP address. Hence, we will use the Default Website on NLB node1 (DC1) and NLB node2 (SERVER1). The Website will be mapped with the cluster IP address “10.0.0.250”.
To do so, first, you need to perform the following steps on DC1 (NLB node1).
- Open the Internet Information Services (IIS) Manager console.
- Expand the Sites node, select and right-click the Default Web Site.
- Select Add the Virtual Directory. In the Alias box, type a name. In the Physical path box, type \\DC1\C$\Intetpub\wwwroot and then click OK.
Actaully, we will add the same shared directory on both the NLB nodes so the same content can be displayed when a NLB node from the configured NLB cluster is failed.
- Double-click Directory Browsing and click Enable.
- Right-click Default Web Site, select Manage Website and then select Restart.
- Close the Internet Information Services (IIS) Manager window.
- Repeat the same steps to activate Default Website on SERVER1 NLB node.
- Optionally, if you want to access the Website through the hostname such as www.mcsalab.local, add the www DNS host record with the 10.0.0.250 IP address.
Verifying Network Load Balancing Configuration
To verify that your NLB Cluster is configured successfully and functioning properly, perform the following steps:
- Type 10.0.0.250 in the Internet explorer and verify that you are able to access the Default Website.
- Close the Internet Explorer.
- On the DC1 node, open the Network Load Balancing Manager window, select and right-click DC1(Ethernet), select Control Host and then select Stop to stop this node temporary.
- Switch back to CLIENT1 and try again to open the Default Website. The Default Website should still be displayed. However, this time, the SERVER1 NLB node will serve the Website.
- Now, stop the SERVER1 NLB node also and try to reopen the Default Website on the CLIENT1.
- Now, it should not be displayed as both the NLB nodes are stopped. However, if you are still able to open the Default Website on CLIENT1, this might be because of cached web pages. To resolve this, reboot the CLIENT1 machine and try again.
That’s all you need to install and configure Network Load Balancing (NLB) in Windows Server 2016. Please drop your queries and suggestions in the comment box, we will catch you soon to take a look.