Shijaz.com:
Articles | Windows Server
| Exchange Server
| ISA Server |
The
Balancing Act: Installing Windows NLB for Web servers
This article gives step-by-step
explanation on how to setup Network Load Balancing (NLB) using Windows 2003
Network Load Balancing components.
Background
You can use NLB to “balance” request
traffic (load) between two or more servers. This article explains how to
implement it and assumes that you know what NLB is for. If not, please see the
links in the “Prerequisites” section.
Prerequisites
Make sure you read and understand the
following Microsoft articles:
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/clustering/nlbfaq.mspx
- Understanding
Windows NLB
http://technet2.microsoft.com/WindowsServer/f/?en/Library/088a26d1-1d67-45a3-8d89-e7a056c1c1131033.mspx
Assumptions
Below is a brief outline of the lab
scenario employed in this article:
|
Server1:
OS: Windows Server 2003 Standard
Hostname: TESTDC01.testdomain.local
No. of Network adapters: 2
Public Interface: NIC1
IP on NIC1: 192.168.10.1
DNS: 192.168.10.1
Private Interface: NIC2
IP on NIC2: 10.0.0.2
|
Server2:
OS: Windows Server 2003 Standard
Hostname:
EXCHANGE01.testdomain.local
No. of Network adapters: 2
Public Interface: NIC1
IP on NIC1: 192.168.10.2
DNS: 192.168.10.2
Private Interface: NIC2
IP on NIC2: 10.0.0.1
|
|
NLB Virtual
Virtual Hostname: CLUSTER.testdomain.local
Virtual IP: 192.168.10.100
|
Configuration
required on Server1
Step 1.
Install IIS
For step-by-step instructions on how to install IIS, see Windows Help.
Step 2.
Create a new
NLB cluster
- Open
the Network Load Balancing Manager. Start à
Administrative Tools à Network
Load Balancing.
- Choose
Cluster à New
- Enter
the information as below:
- Cluster
IP configuration > IP Address: Enter the “Virtual” IP of your
cluster. This is the NLB IP on which clients will connect. It should not
be already in use on your network and must belong to the same subnet as
your web servers.
- Cluster
IP configuration > Subnet Mask: Enter the subnet mask for your
virtual IP. Should be same as what you use on the network containing your
web servers.
- Cluster
IP configuration > Full Internet name: Enter the full DNS
“virtual” name of your NLB cluster. Your clients will connect to this
hostname. Please note that NLB manager does not automatically register
this name in DNS, you will have to do it manually as explained later in
this article.
- Select
Multicast. For more information on Unicast and Multicast, see the Microsoft
article.

- Click
Next.
- If
you need to add any additional virtual IPs for your cluster, enter them in
the screen below, else click Next.

- Configuring
Port Rules: Here you can specify whether to load balance traffic only for
specific ports or to load balance all traffic. In this scenario, you can
choose to load balance only port 80 (http) traffic.

- Click
Next. In the next screen you will be prompted to enter hostname of
first node in the cluster. Enter the hostname of the machine you are
working on and click Connect. You will be displayed the interfaces
available on the computer. Select the interface that you want to load
balance, i.e. Public interface of the host.

- Click
Next. In the next screen you see the host parameters for this
configuration. Review them and click Next.

- You
will see the progress of adding the host on the new cluster in the NLB manager
window. Wait until the status of the host is Converged.

Step 3.
Add second
host to the NLB cluster
- In
the Network Load Balancing Manager, right click on the cluster and
choose “Add Host to Cluster”.

- In
the Network Load Balancing Manager, right click on the cluster and
choose “Add Host to Cluster”.
- Type
the name of the second node and click Connect. Select the Public
interface on the second node and choose Next.

- Review
the host parameters and click Next.

- NLB
manager will show the progress as the second node is being added to the
cluster. Wait until status is Converged for both nodes.

- To
test NLB, connect to the virtual IP from the browser of any client
connected to the network. You should get the webpage even if one of the
nodes is shut down.
Step 4.
Register NLB
virtual name in DNS
- On
your DNS server/domain controller, open the DNS management console. Start à
Administrative Tools à DNS.

- Expand
you Forward Lookup Zone, right click on your domain’s DNZ zone and
click New Host (A) option.
- Enter
the details as follows:
- Name: Enter
the virtual hostname you used in step 1.3 (d) (in this case, “cluster”)
- IP
address:
Enter the virtual IP of the cluster you used in step 1.3 (a) (in this
case, “192.168.10.100”)
- If
you require a PTR record in your RDNS, select the option.
- Click
Add Host.

Troubleshooting
tips:
- Sometimes
while adding the second node, the process may fail and you will not see
the status “Converged”, instead you will find a yellow exclamation mark next
to the second node. In this case, right click on the node and choose Delete.
Then login to the second node directly and use the NLB manager on the
second node itself. Choose Cluster à Connect
to Existing
and type host name of the first node. Then continue the process, working
from the second node itself.
- At
times you might get an error NLB not bound and an error code. In
such cases, check the following:
- IP
addresses and subnet masks on public interface of both nodes and virtual
IP of cluster.
- On
the node that is failing see if the Public interface has more than one IP
address?
- Network
Load Balancing service is installed on the public interface?
See
also: Windows NLB: The Ultimate FAQ
Disclaimer
The steps mentioned in this are results of testing in a lab environment. The
procedure might require additional testing before being deployed on a production
environment. I assume no responsibility for damage(s) occurring due to following
this procedure or any other procedure listed on this site. Use it at your own
risk!