This tip is will show how you can verify that Windows Network Load Balancing is working after configuring 2 or more servers to load balance. I will show this example in Windows 2008 R2, but any version of Windows NLB will be similar.
I will use 2 servers, 1NLB2K8 and 2NLB2K8 as the hosts for my NLB cluster and I will be load balancing a very critical application, Telnet Server. My cluster hostname is NLB2K8.
I will not go into the detailed configuration, so if you are setting up your NLB cluster please check the following link for the details; http://technet.microsoft.com/en-us/library/cc770689(v=ws.10).aspx.
Technet also has a guide for verifying NLB operation. The guidance is to disconnect 1 host at a time and test your application (http://technet.microsoft.com/en-us/library/cc770582(v=ws.10).aspx). Bummer, I would like to verify my NLB without disconnecting anything, here’s how.
After installing the Telnet Server feature on both of my servers through Server Manager I tested my connection to each server.
Success, the error in the connection is because my 2 NLB servers are not in my domain, so I had to enter my domain credentials.
Now the NLB feature is installed and configured and a host(A) record created in DNS for the cluster name and IP address.
I have enabled all the ports and protocols to load balance, I could have also just used port 23 for this example.
Now to test operation without disconnecting; I will open a Telnet connection to the cluster hostname and verify which server took the connection.
Success! I am connected but to which server?
To find out run netstat.exe –a on each host.
This is the output from 2NLB2K8.
Now since I have single affinity selected for my cluster every connection from the same IP address will go to 2NLB2K8.
To test if another connection is serviced by the second host I tried to connect from another computer.
You can see the Foreign Address is different as I connected from another client with a different IP address.
There may be times that the other hosts in the cluster are not used because of low load on the first host. In that case you can set the cluster host port rule Load weight property to 100 for that host you want to test and 0 for the host you do not want to test. Then you can reverse the settings and test the other host.
Now I can safely say I have a working load balanced Telnet, wow now what should I do with it?