Followers

Windows 2012 : Network Load Balancing (NLB) implementation (GUI)


In this post I will the steps for Network Load Balancing implementation.

- NLB is a technology for LBFA ( Load Balancing / Fail Over)  for IP stateless applications (web applications : HTTP , HTTPS, FTP , ...).
- NLB can detect server failure but not app failure.
- NLB can contain 2 to 32 nodes.

*******************************************************************************
I have 2 identical servers, both joined to Domain. Each server has 2 NICs :

NLBServerA  :
           NIC1 => Management Network , IP : 192.168.0.141
           NIC2 => NLB Cluster ,  IP : 192.168.0.142


NLBServerB  : NIC1 => Management Network , NIC2 => NLB Cluster
           NIC1 => Management Network , IP : 192.168.0.143
           NIC2 => NLB Cluster ,  IP : 192.168.0.144





Now I'm going to install IIS and Network Load Balancing Features on both servers (with default settings) :
Now we can open the "Network Load Balancing Manager" in 2 different ways :
1) In System Manager => Tools Menu => Network Load Balancing 
2) or you can open it by running "nlbmgr.msc" command :
The next step is create a New Cluster and add the Hosts to it : 
Type the Host name and click on Connect to see the list of Interfaces available for configuring a new cluster and select the one for clustering :
In the next Window accept the default settings and click on Next :
* Priority (Unique Host Identifier) : This parameter specifies a unique ID for each host. The host with the lowest numerical priority among the current members pf cluster handles all of the cluster's network traffic that is not covered by a port rule. You can override these priorities or provide load balancing for specific ranges of ports by specifying rules on the Port Rules tab of the Network Load Balancing Properties dialog box.
In the next window click on "Add" to enter the Cluster IP address : 
In "Cluster Parameters" window, accept the default settings and leave the Cluster Operation mode as "Unicast" :
* In Unicast mode , the MAC address of the cluster is assigned to the network adapter of the computer,and the built-in MAC address of the network adapter is not used.
** Microsoft recommends to accept the unicast default settings.
In the Port Rules window, you can accept the defaults or Remove the default one and create new Rules for Port 80 , Port 443 or any other port you need :
Click on Finish and after few seconds the first node in Cluster will be ready :
To add the second Host to Cluster, Right click on Cluster and select "Add Host To Cluster" :
Next steps will be exactly the same as before :
Now it's time to create a test page under a new site in IIS :
Create a new folder on C drive (New_Site) and a new text file with some text in it , save it and change the extension of file to "html" :
In IIS , Add a new Website :
Also you need to set the Default Document in IIS and point it to "TestPage.html"
And do the same thing on the second server and create the new site.
The next step is creating a "www" record in DNS and point it to cluster IP address (192.168.0.145 in this example) :
OK, everything is ready and in place now. Just need to do a quick test and show you how NLB Cluster works .
On another machine open the Browser and go to "http://www.NLBCluster.com" :
As you can see it will shot the page on NLBServerB . 
Let's Stop the "NLBServerB" Host  in Network Load Balancing Manager first :
If you refresh the page on the third machine :
It's pointing to the other server up & running in NLB Manager (NLBServerA) and it means NLB Cluster is working find and everything is done successfully :)
*********************************************************************************
To Configure NLB Manager Log Settings :
1) From the Option menu select "Log Settings"
2) check Enable Logging and specify a name and location for the log file :
*********************************************************************************
To Remove a Host from NLB Cluster :
1) Select the Host , right click and first select "Drainstop" , then "Stop"
2) Right click the host and select "Delete Host"

********************************************************************************
If you like to do all these steps with the PowerShell cmdlets, you can go to this link and see the full list of commands and examples :
Source:
http://technet.microsoft.com/en-us/library/ee817138.aspx

You can write a script to automate all these steps and use over and over in your environment if you need.
 
Published By
S.G.Godwin Dinesh.MCA
Sr.System Administrator

No comments:

Post a Comment