NLB
Updated: January 21, 2005
In order to run nlb.exe from a remote computer, remote control must be enabled. The Network Load Balancing remote control option presents many security risks, including the possibility of data tampering, denial of service and information disclosure. You should only use remote control on a secure computer within your firewall. Because of the many security risks remote control presents, it is strongly recommended that you do not enable the remote control feature and instead use other remote management tools such as Network Load Balancing Manager or Windows Management Instrumentation (WMI).
If you choose to enable remote control it is vital that you restrict access by specifying a strong remote control password. It is recommended that you use a firewall to protect the Network Load Balancing UDP control ports (the ports receiving remote control commands) in order to shield them from outside intrusion. By default, these are ports 1717 and 2504 at the cluster IP address. For more information about strong passwords, see Strong passwords .
Because it is a shell-based program, nlb.exe program can be incorporated into administrative scripts.
Syntax
Parameters
Remarks
- The nlb.exe command replaces wlbs.exe. WLBS stands for Windows NT Load Balancing Service, the former name of Network Load Balancing in Windows NT 4.0. For reasons of backward compatibility, WLBS continues to be used in certain instances.
-
The cluster parameter can be either the cluster's full Internet name or the cluster's primary IP address. For more information, see Network Load Balancing parameters .
You can omit the cluster option when running nlb.exe directly on a cluster host. In this instance, the command applies only to the local cluster host.
To address the cluster as a whole or a different host within the cluster, you must also specify the target cluster, or target cluster and specific host together.
- The host parameter specifies which host within the cluster
to which the command should be applied. If the host parameter is
omitted, the command applies to all hosts within the cluster.
You can specify host name using the internet host name, the IP address, or the unique host priorities assigned in the Network Load Balancing Properties dialog box. You can use the special host priority value 0 (zero) to refer to the default host within a cluster.
You can omit the host option when running nlb.exe directly on a cluster host. In this instance, the command applies only to the local cluster host.
To address the cluster as a whole or a different host within the cluster, you must also specify the target cluster, or target cluster and specific host together.
- Some commands can be invoked only on the cluster hosts (designated above as "local only").
- Network Load Balancing hosts can be configured to join the cluster automatically upon startup or to wait for the nlb start command by enabling the initial host state option in the Network Load Balancing Properties dialog box. You can use this command with the nlb stop command to change cluster parameters for the local host without taking the entire cluster offline. For more information, see Network Load Balancing parameters .
- You can modify the Network Load Balancing parameters (for example, to add a port rule) without disrupting the cluster's service to the clients. To do this, take a host out of the cluster, update its parameters, and then return it to the cluster. During this process, other cluster hosts will detect inconsistencies in the rules, and they will handle these inconsistencies in a manner that minimizes disruption of service to the clients. For more information about how inconsistencies are handled by Network Load Balancing, see Error detection and handling .
-
You can use the nlb disable and nlb enable commands to customize your cluster responses to various failures. For example, if your SNMP monitoring program indicates that a Web server program on one of the hosts has failed, you can issue the command nlb disable 80 to prevent that host from accepting any further client requests to the specified Web server port, causing other cluster hosts to handle its load. After the Web server has been restarted, the nlb enable 80 command can be issued to allow the host to resume handling a portion of the cluster's network load for this port.
Examples
Example | Description |
nlb help | Returns Help information. |
nlb query <mycluster> | Queries the status of all hosts in mycluster. |
nlb stop | Stops cluster operations for the local cluster host. |
nlb stop <mycluster> | Stops cluster operations for all cluster hosts in mycluster. |
nlb start <mycluster>:2 | Restarts cluster operations for host 2 in mycluster. |
nlb disable 80 | Disables the local host's handling of new network traffic for the Web server port (port 80). |
nlb ip2mac <mycluster> | Displays media access control addresses corresponding to mycluster. |
The following table summarizes the forms that the cluster and host parameters might take:
Cluster and host parameter | Example | Action |
(omitted) | nlb stop | Invokes command on current cluster host. |
Cluster | nlb stop <mycluster> | Invokes command on all cluster hosts. |
Cluster:Host |
nlb stop \
<mycluster>:<host1> |
Invokes command on a specific cluster host. |
The following table provides examples of different identification possibilities for clusters and hosts:
Example | Description |
<mycluster>:<host1> | Internet host names |
<w>.<x>.<y>.<z>:<w>.<x>.<y>.<z> | IP addresses |
<mycluster>:<w>.<x>.<y>.<z> | Mix of name and IP address |
<mycluster>:1 | Host 1 in mycluster |
<mycluster>:0 | Default host in mycluster |
<mycluster> | All hosts in mycluster |
Formatting legend
Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |