Create a Cluster to Balance the Network Load, Part 2
Welcome back to our discussion of implementing Network Load Balancing (NLB) on Windows Server 2003. In part one of this article, we looked at what benefits NLB offers and at how it works. In this installment, we'll look at the actual process of creating an NLB cluster.
Basic NLB Configuration
The optimal NLB configuration is, of course, dependent on your actual network environment. The implementation of any network technology in a live environment should be thoroughly thought out and carefully planned. With that disclaimer noted, looking at the basic implementation process will give you some idea of just how easy NLB is to setup and configure. Consider the information provided here as a means to get you started.
You can configure an NLB cluster in one of two ways. The first is by using the Network Load Balancing Manager; the other is by configuring the properties of the network interfaces on the servers of an NLB cluster directly. Of the two, I prefer the NLB Manager path, simply because it puts all of the configuration options you need into one place. For the purposes of our discussion here, it is also considered the simpler method of the two.
When you first start the Network Load Balancing Manager, which is accessed from the Administrative Tools program group, you are presented with the screen shown in Figure 1. There are three main areas to the NLB Manager screen - the top panes are where the available clusters (left), and the details of those clusters (right) are shown. The bottom area of the screen displays log entries related to the NLB configuration. An interesting note here is that the log area of the screen only shows entries related to the NLB configuration, such as the addition of a node to the cluster. Events related to the operation of the actual NLB service are recorded in the System log of Event Viewer, with a Source type of WLBS. WLBS stands for Windows Load Balancing Service, which is what NLB was called in previous versions of Windows.
To create a cluster in Network Load Balancing Manager, right click the Network Load Balancing Clusters object in the left pane of the NLB Manager utility and select New Cluster. The Cluster Parameters dialog box, as shown in Figure 2, will appear. In this dialog box you will enter the IP address for the cluster (not the current IP address of the system) as well as a subnet mask and domain name. The latter can be omitted, but doing so will render the cluster only contactable by IP address, which is probably not desirable. As you type in the IP address, be sure to watch the value of the Network Address field change in line with the IP address. This value, which will become the physical (MAC) address for the cluster, is calculated in direct relation to the IP address. This calculation is made so that a duplicate MAC address will not appear on the network. This screen also allows you to enable remote access to the cluster, and enter a password to provide security for this feature.
Clicking 'Next' on the Cluster Parameters dialog takes you to the Cluster IP addresses dialog. This screen allows you to enter another IP address for the cluster. For the purposes of this exercise we'll assume that you only want one IP address associated with the cluster. Clicking 'Next' on this screen takes you to the Port Rules dialog box as shown in Figure 3. Port rules allow you to control exactly what traffic can be handled through the cluster IP address. By default, all ports are available. If you want to restrict traffic on a port-by-port basis, you will first need to remove the default rule before adding your own. Clicking 'Next' takes you to the Connect dialog box in which you enter the IP address or hostname of the first system that will be part of the NLB cluster. When the IP address or hostname is entered, the system is located and all of the network interfaces on that system are listed, as shown in Figure 4. You can then select which interface on that system you want to include in the NLB cluster.
Clicking 'Next' again takes you to the Host Parameters dialog box, which is where information such as the Priority and the Initial Host State settings for the server you are about to add to the cluster can be configured. Of the two, the Priority is the most important as each network interface in the NLB cluster must have its own Priority setting. If there is a conflict in the Priority setting, the cluster will not function. The Initial Host State setting is useful if you want to add systems to the cluster, but do not want to have them active right away. Once you have made any changes, clicking finish closes the New Cluster 'wizard', and your NLB cluster is created.
All that is left to do now is add more hosts to the cluster, which is easily achieved by right-clicking the cluster in the left hand pane of NLB Manager and selecting Add Host to Cluster from the action menu. Again, dialog boxes are displayed that allow you to enter the information needed to add the host to the cluster. When you have added hosts to the cluster, they are displayed in the Host pane (top right) of the Network Load Balancing Manager utility, as shown in Figure 5.
As simple as the preceding explanation of creating a cluster might seem, there is really little more to the actual process than what has been described.
After the Install
Once your NLB cluster is installed and operational, you can manage it in one of two ways; by using the NLB Manager, or with the command line utility NLB.exe.
Managing the NLB cluster from within the NLB Manager will provide few surprises to anyone used to working in an MMC snap-in. Most of the actions, such as blocking traffic from a specific host, or even the entire cluster, are achieved by right clicking the host or cluster, selecting Control Hosts, and then choosing an action.
In terms of keeping an eye on the NLB service, as mentioned earlier, events related to the NLB service are recorded in the System log of Event Viewer rather than in the Log area of NLB Manager. For this reason, you should make a habit of checking the System log for any events related to the WLBS service.
After you have installed and configured your NLB cluster, further monitoring and maintenance should be at a minimum. Due to the self-configuring nature of NLB, all you should have to do is reap the rewards of increased bandwidth and fault tolerance.