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.
WebServer-1 (192.168.10.10)
=======================
1. Ipconfig on WebServer-1
2. Go to Server Manager and add “Network Load Balancing” feature.
3. Administrative tools > Network Load Balancing Manager, Cluster > New
4. Enter the name of the first Host, this will be the first: WebServer-1.mylab.local
5. Click Next, you should see only one IP of the first WebServer
6. Load Balancing IP (Cluster IP)
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.
8. Port Rules, leave default.
9. First host is set up and running
10. “Network Load Balancing (NLB) should already be checked automatically when you configure the load balancer, double check it.
11. Advanced TCP/IP Settings on WebServer-1 should list WebServer-1 IP and the Load Balancer IP (Cluster IP).
12. Ipconfig,we can see an additional Load Balancer ip 192.168.10.30
WebServer-2 (192.168.10.20)
=======================
1. Ipconfig
2. Open up the “Network Load Balancer Manager” on WebServer-1. You should already have it open from configuring WebServer-1.
3. Add the second host to the cluster which is WebServer-2.mylab.local
4. Leave this default and click next.
5. Leave the port rules default.
6. Tow hosts are attached to cluster and are in Converged state.
7. “Network Load Balancing (NLB) should already be checked automatically when you configure the load balancer, double check it.
8. Advanced TCP/IP Settings on WebServer-2 should list WebServer-2 IP and the Load Balancer IP (Cluster IP).
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)
10. run “wlbs query” to see stats.
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)
|
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
2. Go to Server Manager and add “Network Load Balancing” feature.
3. Administrative tools > Network Load Balancing Manager, Cluster > New
4. Enter the name of the first Host, this will be the first: WebServer-1.mylab.local
5. Click Next, you should see only one IP of the first WebServer
6. Load Balancing IP (Cluster IP)
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.
8. Port Rules, leave default.
9. First host is set up and running
10. “Network Load Balancing (NLB) should already be checked automatically when you configure the load balancer, double check it.
11. Advanced TCP/IP Settings on WebServer-1 should list WebServer-1 IP and the Load Balancer IP (Cluster IP).
12. Ipconfig,we can see an additional Load Balancer ip 192.168.10.30
WebServer-2 (192.168.10.20)
=======================
1. Ipconfig
2. Open up the “Network Load Balancer Manager” on WebServer-1. You should already have it open from configuring WebServer-1.
3. Add the second host to the cluster which is WebServer-2.mylab.local
4. Leave this default and click next.
5. Leave the port rules default.
6. Tow hosts are attached to cluster and are in Converged state.
7. “Network Load Balancing (NLB) should already be checked automatically when you configure the load balancer, double check it.
8. Advanced TCP/IP Settings on WebServer-2 should list WebServer-2 IP and the Load Balancer IP (Cluster IP).
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)
10. run “wlbs query” to see stats.
This entry was posted in Networking, Windows and tagged installing network load balancing NLB 2008 R2, load balance two web pages with load balancer for redundancy and failover, Network Load Balancing Step-by-Step Guide: Configuring Network Load Balancing with Terminal Services. Bookmark the permalink.