Bookmark and Share Subscribe Bookmark and Share

Categories

Advertisement



Install and Configure NLB (WLBS) on Windows 2003 Server

Mar
18

 « »    

Series: WLBS and NLB

In this article I will load balance 2 servers and take you through the process step-by-step. Load Balancing takes 2 or more servers and lets them share one IP address so both servers can serve client requests. At the end of this article you should be able to configure NLB.

Gathering Information

Log onto both of the servers and run IPCONFIG /ALL from the command prompt. We need the name, domain and IP address of each server that will be in the NLB Cluster. We will also need to make up an additional name for the cluster in this example we will use SERVER-LB for the virtual cluster name.

The 2 servers we will be Load Balancing are SERVER01 and SERVER02. The virtual cluster name will be SERVER-LB. So if this was a web server users would go to http://SERVER-LB, depending how we configure NLB either SERVER01, SERVER02 or both servers will service the web request.

SERVER NAME

IP ADDRESS

TYPE

SERVER01.pintolake.net

192.168.1.201

Server 1

SERVER02.pintolake.net

192.168.1.202

Server 2

SERVER-LB.pintolake.net

192.168.1.200

Virtual cluster name and IP address of Servers 1/2

 

In this example both servers only have one network card. If you have multiple network cards you will still be able to load balance the 2 servers. You need to configure one NIC per server for NLB, both NIC’s should be on the same VLAN and be they should able to contact each other.

SERVER01

SERVER02

SERVER01: NLB Configuration

Open "Network Connections" from the control panel. Right click the network connection you want to use for NLB on SERVER01. Check off the "Network Load Balancing" option and press "Properties"

There are 3 tabs, we will configure all three in this example.

Under the "Cluster Parameters" tab

  • Enter the IP address of the cluster. We are using 192.168.1.200 in this example, the subnet mask is /24 (255.255.255.0).
  • Enter a cluster name, let’s use SERVER-LB.pintolake.net. This name was made up and is used to identify the cluster by name, this name will have to be entered in DNS manually (I cover this later).
  • Select Unicast for the "Cluster operation mode" setting.
  • Now move on to the "Host Parameters" tab

Unicast vs Multicast

Unicast/Multicast is the way the MAC address for the Virtual IP is presented to the routers. In my experience I have almost always used Multicast, which if you use you should enter a persistent ARP entry on all upstream switchs or you will not be able to ping the servers remotely.

In the unicast method:

  • The cluster adapters for all cluster hosts are assigned the same unicast MAC address.
  • The outgoing MAC address for each packet is modified, based on the cluster host’s priority setting, to prevent upstream switches from discovering that all cluster hosts have the same MAC address.

In the multicast method:

  • The cluster adapter for each cluster host retains the original hardware unicast MAC address (as specified by the hardware manufacture of the network adapter).
  • The cluster adapters for all cluster hosts are assigned a multicast MAC address.
  • The multicast MAC is derived from the cluster’s IP address.
  • Communication between cluster hosts is not affected, because each cluster host retains a unique MAC address.

Selecting the Unicast or Multicast Method of Distributing Incoming Requests http://technet.microsoft.com/en-us/library/cc782694.aspx

 

 

Under "Host Parameters" tab we need to configure 3 settings

  • Enter the Priority (unique host identifier) – this is used to identify the nodes in the cluster. This should be different for each node in the cluster, if you have 3 servers you are load balancing then it would be 1, 2 and 3 for the 3 different servers
  • Enter the IP address of this node – this should be the servers actual IP address and subnet mask
  • Leave the default state started – this options lets us select whether we want this box to converge on the cluster when NLB starts

Go to the "Ports Rules" tab

We are going to keep the default port rules and press OK. (to see how the rules looks and why we would edit these rules, see the note below)

NOTE: Add/Edit Port Rule Settings

For most scenarios I would keep the default settings. The most important setting is probably the filtering mode. "Single" works well for most web application, it maintains a users session on one server so if the user server requests go to SERVER01, SERVER01 will continue to serve that request for the duration of the session.

None

  • You want to ensure even load balancing among cluster hosts
  • Client traffic is stateless (for example, HTTP traffic).

Single

  • You want to ensure that requests from a specific client (IP address) are sent to the same cluster host.
  • Client state is maintained across TCP connections (for example, HTTPS traffic).

Class C

  • Client requests from a Class C IP address range (instead of a single IP address) are sent to the same cluster host.
  • Clients use multiple proxy servers to access the cluster, and they appear to have multiple IP addresses within the same Class C IP address range.
  • Client state is maintained across TCP connections (for example, HTTPS traffic).

For more information on this please see this TechNet article:

Specifying the Affinity and Load-Balancing Behavior of the Custom Port Rule http://technet.microsoft.com/en-us/library/cc759039.aspx

 

 

After you press OK, you will get a prompt reminding you to bind the Virtual IP Address to the NIC Card. Press OK to continue

SERVER01: Binding the Virtual IP

After you configure NLB you need to BIND your virtual IP to the network adapter. In the same properties window on SERVER01 select TCP/IP and press "Properties"

Select "Advanced"

Under the "Advanced TCP/IP Settings" window, press "Add" under the IP addresses setting

Enter the address of the Virtual IP address of the cluster. Which is 192.168.1.200 and the subnet is 255.255.255.0, press "Add"

You will see the Virtual IP now configured along with the primary IP address of the server. Press "OK"

Press "OK" to close the "Internet Protocol (TCP/IP) Properties" window

Press Close to close the "Local Area Connection Properties" window

SERVER01: Verification

Go to the command prompt and type "wlbs query", as you can see HOST 1 converged successfully on the cluster

SERVER02: NLB Configuration

This is almost exactly the same as the SERVER01 configuration but let’s go through every step again. Open "Network Connections" from the control panel. Right click the network connection you want to use for NLB on SERVER02. Check off the "Network Load Balancing" option and press "Properties"

There are 3 tabs, we will configure all three in this example.

Under the "Cluster Parameters" tab

  • Enter the IP address of the cluster. We are using 192.168.1.200 in this example, the subnet mask is /24 (255.255.255.0).
  • Enter a cluster name, let’s use SERVER-LB.pintolake.net. This name was made up and is used to identify the cluster by name, this name will have to be entered in DNS manually (I cover this later).
  • Select Unicast for the "Cluster operation mode" setting.
  • Now move on to the "Host Parameters" tab

As with SERVER01, Under "Host Parameters" tab we need to configure 3 settings

  • Enter the Priority (unique host identifier) – this is used to identify the nodes in the cluster. This should be different for each node in the cluster, if you have 3 servers you are load balancing then it would be 1, 2 and 3 for the 3 different servers. Since this is SERVER02 lets enter 2 because SERVER01 was set to 1.
  • Enter the IP address of this node – this should be the servers actual IP address and subnet mask
  • Leave the default state started – this options lets us select whether we want this box to converge on the cluster when NLB starts

Go to the "Ports Rules" tab

Press OK to continue. (to see more about add/edit port rules, see this same section in SERVER01 configuration above)

After you press OK, you will get a prompt reminding you to bind the Virtual IP Address to the NIC Card. Press OK to continue

SERVER02: Binding the Virtual IP

After you configure NLB you need to BIND your virtual IP to the network adapter. In the same properties window on SERVER02 select TCP/IP and press "Properties"

Select "Advanced"

Under the "Advanced TCP/IP Settings" window, press "Add" under the IP addresses setting

Enter the address of the Virtual IP address of the cluster. The IP address is 192.168.1.200 and the subnet is 255.255.255.0, press "Add"

You will see the Virtual IP now configured along with the primary IP address of the server. Press "OK"

Press "OK" to close the "Internet Protocol (TCP/IP) Properties" window

Press Close to close the "Local Area Connection Properties" window

SERVER02: Verification

Go to the command prompt and type "wlbs query", as you can see HOST 1 and HOST 2 converged successfully on the cluster. This means things are working well.

NOTE: NOT SEEING NODE 2?

If you only see one node chances are you put an incorrect "Priority (unique host identifier)" in the Network Load Balancing Properties > Host Parameters tab

 

DNS Entries

For client to be able to access the NLB cluster by name we need add it to DNS.

Open DNS in AD since the server is in the "pintolake.net" domain I am going to create an A record that associates the SERVER-LB name to IP address 192.168.1.200

Right click DOMAIN and select "New Host (A)"

Enter SERVER-LB as the name and 192.168.1.200 as the IP address

The record was created successfully. Unless you need to wait for DNS to replicate you should be able to ping SERVER-LB now

Open a command prompt and ping SERVER-LB. You should get a response. This concludes the installation and configuration of WLBS (NLB)



Series NavigationInstall and Configure NLB (WLBS) on Windows Server 2008WLBS (NLB) – Multicast vs Unicast

    Did I save you time and headaches? Buy me a cup of coffee.
    The more coffee I drink the more articles I can write.




33 Comments so far

    • YoonKyoJeong said:
    • Posted on June 30th, 2014 at 7:32 pm
    • Reply
    • Permalink

    Thanks a lot! This is exactly what i'm looking for!

  1. Hi, please when we active the server01 but not server 02, users have access to the SharePoint site. But if we to active the two server NLB the users get the HTTP Error 403 Forbidden Access Denied. Thanks

    • Arghya Chatterjee said:
    • Posted on June 27th, 2012 at 7:47 am
    • Reply
    • Permalink

    Excellent .Very easy to understand

  2. but how do we test if the load balancing is happening…

    • Gautam said:
    • Posted on February 23rd, 2012 at 1:08 pm
    • Reply
    • Permalink

    very simple to follow, good job !!

    • happy said:
    • Posted on January 26th, 2012 at 11:45 am
    • Reply
    • Permalink

    Easy to follow the step! Good!

Leave a comment

Trackbacks on this post