SolutionBase: Windows Server 2003's Network Load Balancing Manager

Learn how to administer network load balancing on Windows Server 2003.

Network load balancing, which is included in all editions of Windows Server 2003, provides a means to distribute TCP/IP traffic across multiple servers. For example, you could use network load balancing (NLB) to distribute Web site clients to multiple servers hosting individual copies of the site. There are many other ways to use NLB, as well. In this Guided Tour, I'll take you through the Network Load Balancing Manager, a new management tool in Windows Server 2003 that you can use to configure and manage load balanced clusters from a single location.

What's the difference between load balancing and clustering?
Before I dive into the Network Load Balancing Manager, I'll take a minute to explain the difference between NLB and the Cluster Service. The NLB service provides a means for load balancing TCP/IP traffic among multiple servers in an NLB cluster. The servers participating in the NLB cluster do not share storage or other resources, but instead run their own instances of the load balanced applications. For example, each server would run IIS with an instance of the same Web site, but each would be a separate copy. NLB simply manages the incoming traffic and balances the traffic out to the servers participating in the cluster.

NLB provides no failover capability, but the Cluster Service does provide redundancy and failover capability. Servers in this type of cluster generally share common storage and function as a single, logical unit. An NLB cluster by contrast is a group of individual servers working independently to process the traffic that the NLB service passes their way. Essentially, the NLB service enables all servers in the NLB cluster to be addressed by a single IP address. You can combine NLB clustering with Cluster Service clusters, but these two cluster types must remain separate—a server can't participate in both types of clusters. The usual solution is to build an NLB cluster upstream to service a Cluster Service cluster.

What Network Load Balancing Manager can do
The Network Load Balancing Manager is a standalone management application (not an MMC console snap-in) that you use to create and manage NLB clusters from a single management point. The Network Load Balancing Manager is installed by default when you install Windows Server 2003. You can also run the Network Load Balancing Manager on a Windows XP workstation by installing the Windows Server 2003 Administration Pack, available from Microsoft's Web site. To install the Administration Pack on Windows XP, you must have installed Service Pack 1 or hot fix QFE Q329357 on the Windows XP Professional computer.

The Network Load Balancing Manager enables you to accomplish the following tasks:
  • Create new NLB clusters - You use the Network Load Balancing Manager to create an NLB cluster and add the first host to it.
  • Add hosts to an existing NLB cluster - You can enable NLB on a network interface through the properties for the interface in the Network Connections folder. Enabling NLB in this way requires a trip to the server or a remote management solution. The Network Load Balancing Manager lets you to enable NLB remotely while adding the host to the NLB cluster.
  • Remote hosts from an existing NLB cluster - The Network Load Balancing Manager makes it possible to remove a host from an existing NLB cluster and automatically remove NLB from the host's network configuration remotely.
  • Configure all properties for individual cluster hosts and the cluster itself - You can configure properties for individual hosts such as unique host ID, dedicated IP address, initial NLB state, and others. You can also perform cluster-wide management such as adding cluster IP addresses and defining port rules.
  • Replicate the cluster configuration to other hosts - Replicating the configuration to other hosts simplifies configuration when adding new hosts to the cluster.
  • Perform diagnostics and view statistics for NLB clusters - The Network Load Balancing Manager displays its log at the bottom of the window and you can also open a dialog with status information for each host.
  • Manage hosts in the cluster - You can start, stop, suspend, and resume a host. You can also drainstop a host, which allows the host to finish processing all pending request prior to stopping the NLB service.

Touring Network Load Balancing Manager
Figure A shows the Network Load Balancing Manager, which is divided into three panes. The left tree pane shows the clusters and the hosts in each cluster. The right pane provides details about the selected item. For example, when you click a server in the tree pane, the right panes show the port rules configured for the selected server. The bottom pane shows the NLB Manager log. Some log entries offer additional information, which you can view by double-clicking the log entry. Figure B shows such an entry.

Figure A
Network Load Balancing Manager is a stand-alone management application.

Figure B
You can view additional information for some log entries.

The NLB Manager menu bar contains five menus. There is no toolbar.

The File menu
The File menu offers the following commands:
  • Load Host List - Use this command to load a previously saved list of cluster hosts.
  • Save Host List - Use this command to save a list of cluster hosts to a file, which you can later use to quickly open connections to those hosts.
  • Exit - Exit the NLB Manager.

The Cluster menu
The Cluster menu contains the following commands, most of which are available only if you first select a cluster in the left pane:
  • New - This command starts a wizard that prompts for the information needed to create a cluster and specify the first host in the cluster. See the following section, "Wizards," for details.
  • Connect To Existing - The Connect To Existing command opens a Connect dialog box identical to the Connect page in the new cluster wizard (Figure H). After you specify the host and click Connect, you can choose which cluster on the host you want to manage.
  • Add Host - The Add Host command also enters at the Connect page of the wizard but runs through the remainder of the wizard pages to add a host.
  • Delete - Choose this command to delete the selected cluster.
  • Properties - Open the property sheet for the cluster. See the following section, "Cluster Properties," for details.
  • Refresh - Refresh the view.
  • Remove from Viewer - Remove the selected cluster from the NLB Manager window.
  • Control Hosts - Use this command to start, stop, suspend, drainstop, or resume all hosts in the cluster.
  • Control Ports - Click to manage the port rules for the cluster. See the section, "Wizards," for details.

The Host menu
The Host menu is the place to go to manage individual hosts in a cluster. Most of these commands are dimmed unless you first click on a host in the tree pane. The menu includes the following commands:
  • Delete - Choose this command to remove the selected host from the NLB cluster.
  • Properties - Choose this command to open the properties for the selected host. Figure C shows the resulting Host Parameters tab. Here you can specify the unique node ID for the host, its IP address and subnet mask, and initial state.
  • Status - Choose this command to view status information about the selected host.
  • Control Hosts - This cascading menu enables you to start, stop, drainstop, suspend, or resume the selected host.
  • Control Ports - Click this command to open the Control Ports dialog box, which you use to configure port rules for the host. See the section, "Wizards," to learn more about port rules.

Figure C
You can configure host properties remotely through the Host Parameters tab.

The Options menu
The Options menu contains two commands: Credentials and Log Settings. Click Credentials to open a dialog box in which you enter the user name and password you want NLB Manager to use when connecting to remote hosts. Leave the credentials blank to have NLB Manager use the currently logged on credentials to authenticate on the remote host.

The Log Settings command opens a Log Settings dialog box with just two controls: one to enable logging and another to specify the path and file name for the NLB Manager log file.

The Cluster menu offers several commands that enable you to create and manage clusters. The New command starts a wizard that prompts for the information needed to create a cluster and specify the first host in the cluster. On the first page (Figure D), you enter the following information:
  • IP Address and Subnet Mask.
  • Full Internet Name.
  • Network Address.
  • Cluster Operation Mode.
  • Allow Remote Control.

Figure D
The first wizard page prompts for IP address and other properties for the new cluster.

On the next page of the wizard (Figure E), you have the option of adding other virtual IP addresses for the cluster. This enables the cluster to respond on multiple addresses.

Figure E
You can add other virtual IP addresses to the NLB cluster.

The Port Rules page of the wizard (Figure F) helps you configure port rules that determine how traffic is routed to cluster hosts based on port. The wizard creates a single rule by default that distributes all ports for both TCP and UDP across all hosts in the cluster. You can edit the existing port rule to make it more restrictive and add other port rules as needed to direct specific ports or port ranges to multiple hosts or to a single host. Figure G shows the Add/Edit Port Rule dialog box, which you use to add, modify, or disable a rule.

Figure F
Use the Port Rules page to view existing port rules and create new ones.

Figure G
The Add/Edit Port Rule dialog box enables you to create and edit port rules.

The options on the Add/Edit Port Rule dialog box include:
  • Cluster IP Address - Clear the All option if you want to specify a specific host address that the port rule will cover. Choose All to have the rule apply globally to all hosts in the cluster.
  • Port Range - Specify the beginning and ending port numbers to define the port range for the rule.
  • Protocol - Choose between UDP, TCP, or both.
  • Filtering Mode - Here you specify whether a single host will handle traffic associated with the rule, or multiple hosts will handle the traffic.
  • Affinity - The Affinity setting determines how NLB handles traffic from a given client. Choose None to disable affinity and allow NLB to direct traffic from a client to multiple NLB cluster hosts. Choose Single to have a single cluster host handle traffic from a given client session. Choose Class C to have all clients in a subnet handled by the same cluster host.
  • Single Host - Choose this option to have all traffic associated with the rule handled by a single cluster host based on handling priority.
  • Disable This Port Range - Choose this option to block the specified ports.

The Connect page (Figure H) lets you choose the first host for the cluster. Enter the host name or IP address of the target server in the Host field and click Connect. The wizard then displays the network interfaces on the target server, enabling you to choose which interface will have NLB enabled and function as the cluster interface.

Figure H
Choose the first cluster host and its cluster interface.

Use the Host Parameters page (Figure I) to choose a unique ID for the host. You also can specify the IP address used for non-cluster traffic where the target host has more than one interface. The wizard picks up this information automatically from the target server configuration, but you can modify it if needed. Finally, choose the desired initial NLB state for the server and whether you want the server to remain in a suspended state after a reboot if it is in the suspended state when shut down.

Figure I
Configure final properties for the first host on the Host Parameters page.

Cluster Properties
You can configure properties that apply globally to a cluster in addition to those that apply to individual hosts. To configure cluster properties, select the cluster and choose Cluster, Cluster Properties. Figure J shows the Cluster Properties dialog box. On the Cluster Parameters tab, you specify the cluster's logical IP address, subnet mask, and fully-qualified host name. This tab also shows the cluster's read-only MAC address.

Figure J
Configure general cluster parameters on the Cluster Parameters tab.

In the Cluster Operation Mode group, choose between Unicast and Multicast modes. NLB assigns a MAC address to the cluster in unicast mode. In multicast mode, NLB converts the MAC address to a multicast address, and the network interface retains its original MAC address.

The Cluster IP Addresses tab (Figure K) is the place to go to assign additional virtual IP addresses to the cluster. Assigning multiple addresses to a cluster enables you to configure port rules differently for specific IP addresses, thereby creating multiple virtual clusters that enable you to shape the traffic to the cluster hosts.

Figure K
Use the Cluster IP Address tab to add other virtual IP addresses to the cluster.

Use the Port Rules tab to add additional port rules for the cluster. See the section, "Wizards," for more information about port rules.

Common Tasks
Table A lists common tasks and how to accomplish them using the Network Load Balancing Manager:

Table A
Task Action
Create a new cluster Choose Cluster, New to start the new cluster wizard.
Add a host to an existing cluster Select the cluster and choose Cluster, Add Host.
Change the cluster virtual IP address Select the cluster, choose Cluster, Properties, and set IP address on the Cluster Parameters tab.
Add virtual IP addresses to the cluster Select the cluster, choose Cluster, Properties, and add addresses on the Cluster IP Addresses tab.
Manage (start, stop, etc.) the NLB service on all hosts in a cluster Select the cluster, choose Cluster, Control Hosts.
Configure port rules for the cluster Select the cluster, and choose Cluster, Control Ports.
Change a host's priority in the cluster Select the host, choose Host, Properties, and set priority on the Host Parameters tab.
Manage the NLB service on a single host Select the host, choose Host, Control Host.
Save the list of hosts connected in NLB Manager Choose File, Save Host List.
Connect to a cluster to manage it Choose Cluster, Connect to Existing, enter name of host in the cluster, click Connect, choose a host, and click Next.

Editor's Picks