Tuesday, December 5, 2017

How to set up a Microsoft Network Load Balancing (NLB) in Windows 2008 R2

OVERVIEW
Here is a quick guide how to set up two Web Servers that will be serving out the same web page for redundancy and load balancing purposes.  When we go to www.mywebsite.com address, the name will resolve to the Load Balancing IP/Cluster IP (192.168.10.30) and then the Load Balancing manager will either take us directly to WebServer-1 (192.168.10.10) or WebServer-2 (192.168.10.20) depending on the load and server availability.
I have set this up where each machine is using only one network adapter, this will still work perfectly fine but you will get a pop up message every time you open the Load Balancing Manager complaining about the machines may not be able to communicate with each other.  The problem is that in Unicast mode the machines get an identical MAC address and the machines may not be able to communicate with each other.
As per Microsoft’s best practice you should set this up the same way but add an additional network card and make that your primary IP for this machine.  The IP’s and network adapters involved in load balancing should only be used for load balancing.
Mywebsite.com
|
Load Balancing IP (192.168.10.30)
/                \
WebServer-1 (192.168.10.10)               WebServer-2 (192.168.10.20)

WebServer-1 (192.168.10.10)
=======================
1. Ipconfig on WebServer-1
ipconfig initial configuration




2. Go to Server Manager and add “Network Load Balancing” feature.
Load balancing feature add





3. Administrative tools > Network Load Balancing Manager, Cluster > New
Network Load Balancing Manager





4. Enter the name of the first Host, this will be the first: WebServer-1.mylab.local
First Web Server Load balancing cluster






5. Click Next, you should see only one IP of the first WebServer
Cluster Parameter






6. Load Balancing IP (Cluster IP)
Cluster IP Address







7. Enter Cluster Parameters, Unicast gives you the same MAC for both machines where you might have to add a static ARP entry to your switch.  Multicast gives the two machines unique MAC addresses.
Cluster parametrs






8. Port Rules, leave default.
port rules






9. First host is set up and running
load balancing first host done





10. “Network Load Balancing (NLB) should already be checked automatically when you configure the load balancer, double check it.
network adapter settings







11. Advanced TCP/IP Settings on WebServer-1 should list WebServer-1 IP and the Load Balancer IP (Cluster IP).
network adapter







12. Ipconfig,we can see an additional Load Balancer ip 192.168.10.30
ipconfig after cluster set up





WebServer-2 (192.168.10.20)
=======================
1. Ipconfig
ipconfig 2



2. Open up the “Network Load Balancer Manager” on WebServer-1.  You should already have it open from configuring WebServer-1.
add host to cluster






3.  Add the second host to the cluster which is WebServer-2.mylab.local
connect second host to cluster







4. Leave this default and click next.
host parameters 2






5. Leave the port rules default.
port rules






6. Tow hosts are attached to cluster and are in Converged state.
Load balancer all set up





7. “Network Load Balancing (NLB) should already be checked automatically when you configure the load balancer, double check it.
connection properites







8. Advanced TCP/IP Settings on WebServer-2 should list WebServer-2 IP and the Load Balancer IP (Cluster IP).
Advanced TCP/IP Settings







9.  IPconfig after we are all done, you shuld see an additional IP 192.168.10.30 wich is the Load Balancer IP (Cluster IP)
ipconfig after setting up the load balancer



10. run “wlbs query” to see stats.
wlbs query
This entry was posted in Networking, Windows and tagged , , . Bookmark the permalink.

Configure NIC Teaming in VMware First go to Windows Server 2012  then go to Server Manger Click on All Server then right click on your...