Install and Configure Microsoft Network Load Balancing on Windows 2008.

Add a comment December 29th, 2010

I’m always being asked about Microsoft Network Load Balancing, so I figured I would document the steps.  While there are many ways NLB can be configured, this is just a base configuration that can be expanded upon. 

The following steps will need to be performed on ALL NODES that will reside within the NLB Cluster. 

Open Server Manager, you can open this several different ways in Windows Server 2008. Probably the quickest way to open Server Manager is to right click “My Computer” and choose “Manage”, another way is open “Control Panel” go to “Program and Features” and select “Turn Windows features on or off”. A third way to open it is “Server Manager” option under Administrative Tools. 

  1. Select Features from the Server Manager menu on the left.
  2. Press Add Features.

  

  1. Select the checkbox next to Network Load Balancing
  2. Press Next

  

  1. Press Install

  

  1. Installation will proceed to install the necessary components

  

  1. Once the installation has reported success, it is highly recommended this process be repeated on all nodes in the NLB cluster at this point before continuing with configuration. 

  1. Press “Close”

 **NOTE** 

Network Load Balancing may also be installed from a command prompt with elevated privileges (right click on the command prompt in the Start menu and select Run as administrator) by running: 

servermanagercmd -install nlb command. 

For example: 

C:\Windows\system32> servermanagercmd -install nlb

……

Start Installation…

[Installation] Succeeded: [Network Load Balancing].

<100/100>

Success: Installation succeeded. 

Configuring NLB on NODE 1

 Network Load Balanced clusters are typically built using the Network Load Balancing Manager: 

  1. Click Start -> All Programs -> Administrative Tools menu or from a command prompt by executing nlbmgr.
  2. Under the Cluster Menu option select New

 

  1. Enter the first node in the cluster which is SPWFE1
  2. Press “Connect”

 

You will have the option to choose which network adapter you want to use; the NIC should be on the same subnet as the other servers in the NLB cluster.  This scenario is using only one NIC.

  1. Press Next.

 

  1. Enter the Priority ID as, 1 (each node in the NLB cluster should have a UNIQUE ID)
  2. Make sure the correct adapter was selected under Dedicated IP Address.
  3. Select Started for the Initial host state.
  4. Press Next

 

  1. Press Add
  2. Enter the Cluster IP and Subnet mask
  3. Press OK

 

  1. You can add multiple IP Addresses for the cluster.
  2. Insure the Cluster IP addresses are correct
  3. Press Next

 

  1. Select the IP Address for this cluster
  2. Enter the NLB address spnlb.army.lab
  3. Enter Multicast as the Cluster operation mode
  4. Press Next

 

  1. Press Finish.

  

Unicast vs Multicast

Unicast/Multicast is the way the MAC address for the Virtual IP is presented to the routers. Multicast is the advisable method to utilize. Your network administrator should add a persistent ARP entry on all upstream switches or your servers will not receive pings 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

It is advisable to leave all the defaults for the port rules; it is set to all ports with Single affinity, which is sticky. For more information on Port Rules, see notes below.

Add/Edit Port Rule Settings

For most scenarios keep the default settings. The most important setting is probably the filtering mode. “Single” works well for most web application, it maintains a user’s session on one server so if the user server requests go to SPWFE1, SPWFE1 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:

  1. You want to ensure that requests from a specific client (IP address) are sent to the same cluster host.
  2. 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

  1. Verify successful log entries in the NLB Manager; this will indicate that this node successfully converged on the new spnlb.army.lab NLB Cluster
  2. Insure the node’s status changes to Converged
  3. Insure you see a succeeded message in the log window.

 


Configuring NLB for NODE 2 (SPWFE2)

Configure SPWFE2 from SPWFE1. It is also possible to configure the second node from the node itself.  To do this, connect to the SPNLB cluster from the second node first, and then add the host to the cluster.

  1. Right click the cluster name spnlb.army.lab and select Add Host to Cluster.

 

  1. Enter SPWFE2 and press Connect

 

  1. A list of Network adapters will be displayed.
  2. Select the network adapter you want to use for Load Balancing
  3. Press Next

 

  1.  Enter the Priority ID as, 2 (each node in the NLB cluster should have a UNIQUE ID)
  2. Make sure the correct adapter was selected under Dedicated IP Address.
  3. Select Started for the Initial host state
  4. Press Next

 

  1. Press Finish.

 

  1. Verify successful log entries in the NLB Manager, this indicates that both nodes successfully converged on the new spnlb.army.lab NLB Cluster.
  2. Insure that both nodes’ status changes to Converged.
  3. Insure each node has a unique Host priority ID
  4. Insure each node is started under Initial host state.
  5. Insure you see a succeeded message in the log window for the second node.

 

NLB Testing

  1. Go to the command prompt and type wlbs query, verify HOST 1 and HOST 2 converged successfully on the cluster. This means things are working properly.
  2. Ping each server locally and remotely.
  3. Ping the virtual IP locally and remotely; you should do this three times from each location. If you cannot ping remotely you may need to add a static ARP entry in your switches and/or routers where the host machines reside. 

NLB Documentation (from Windows Help)

Availability, scalability, and clustering technologies

Windows Server 2008 provides two clustering technologies: failover clusters and Network Load Balancing (NLB). Failover clusters primarily provide high availability; Network Load Balancing provides scalability and at the same time helps increase availability of Web-based services.

Your choice of cluster technologies (failover clusters or Network Load Balancing) depends primarily on whether the applications you run have long-running in-memory state:

Failover clusters are designed for applications that have long-running in-memory state, or that have large, frequently updated data states. These are called stateful applications, and they include database applications and messaging applications. Typical uses for failover clusters include file servers, print servers, database servers, and messaging servers.

Network Load Balancing is intended for applications that do not have long-running in-memory state. These are called stateless applications. A stateless application treats each client request as an independent operation, and therefore it can load-balance each request independently. Stateless applications often have read-only data or data that changes infrequently. Front-end Web servers, virtual private networks (VPNs), File Transfer Protocol (FTP) servers, and firewall and proxy servers typically use Network Load Balancing. Network Load Balancing clusters can also support other TCP- or UDP-based services and applications.

Network Load Balancing overview

The Network Load Balancing (NLB) service enhances the availability and scalability of Internet server applications such as those used on Web, FTP, firewall, proxy, virtual private network (VPN), and other mission-critical servers.

What are NLB clusters?

A single computer running Windows can provide a limited level of server reliability and scalable performance. However, by combining the resources of two or more computers running one of the products in Windows Server 2008 into a single virtual cluster, NLB can deliver the reliability and performance that Web servers and other mission-critical servers need.

Each host runs a separate copy of the desired server applications (such as applications for Web, FTP, and Telnet servers). NLB distributes incoming client requests across the hosts in the cluster. The load weight to be handled by each host can be configured as necessary. You can also add hosts dynamically to the cluster to handle increased load. In addition, NLB can direct all traffic to a designated single host, which is called the default host.

NLB allows all of the computers in the cluster to be addressed by the same set of cluster IP addresses, and it maintains a set of unique, dedicated IP addresses for each host. For load-balanced applications, when a host fails or goes offline, the load is automatically redistributed among the computers that are still operating. When a computer fails or goes offline unexpectedly, active connections to the failed or offline server are lost. However, if you bring a host down intentionally, you can use the drainstop command to service all active connections prior to bringing the computer offline. In any case, when it is ready, the offline computer can transparently rejoin the cluster and regain its share of the workload, which allows the other computers in the cluster to handle less traffic.

Hardware and software considerations for NLB clusters

  • NLB is installed as a standard Windows networking driver component.
  • NLB requires no hardware changes to enable and run.
  • NLB Manager enables you to create new NLB clusters and to configure and manage clusters and all of the cluster’s hosts from a single remote or local computer.
  • NLB lets clients access the cluster by using a single, logical Internet name and virtual IP address—known as the cluster IP address (it retains individual names for each computer). NLB allows multiple virtual IP addresses for multihomed servers.

Note:

In the case of virtual clusters, the servers do not need to be multihomed to have multiple virtual IP addresses.

NLB can be bound to multiple network adapters, which allows you to configure multiple independent clusters on each host. Support for multiple network adapters is different from virtual clusters in that virtual clusters allow you to configure multiple clusters on a single network adapter.

Installing the NLB feature

To use Network Load Balancing (NLB), a computer must have only TCP/IP on the adapter on which NLB is installed. Do not add any other protocols (for example, IPX) to this adapter. NLB can load balance any application or service that uses TCP/IP as its network protocol and is associated with a specific Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) port.

To install and configure NLB, you must use an account that is listed in the Administrators group on each host. If you are not using an account in the Administrators group as you install and configure each host, you will be prompted to provide the logon credentials for such an account. To set up an account that NLB Manager will use by default: in NLB Manager, expand the Options menu, and then click Credentials. We recommend that this account not be used for any other purpose.

You can use Initial Configuration Tasks or Server Manager to install NLB. To install NLB, in the list of tasks, click Add features and in the list of features in the wizard, click Network Load Balancing.

Managing NLB

Server roles and features are managed by using Microsoft Management Console (MMC) snap-ins. To open the Network Load Balancing Manager snap-in, click Start, click Administrative Tools, and then click Network Load Balancing Manager. You can also open Network Load Balancing Manager by typing Nlbmgr at a command prompt.

Additional references for NLB

To learn more about NLB, you can view the Help on your server. To do this, open Network Load Balancing Manager as described in the previous section and press F1.

For deployment information for NLB, see http://go.microsoft.com/fwlink/?LinkId=87253

For instructions on how to configure NLB with Terminal Services, see http://go.microsoft.com/fwlink/?LinkId=80406

For operations information for NLB, see http://go.microsoft.com/fwlink/?LinkId=87254

For troubleshooting information for NLB, see http://go.microsoft.com/fwlink/?LinkId=87255

  1. No comments yet.Be the first ?
  1. No trackbacks yet.
Comments feed