Command Line Administration Wlbs.exe provides direct interaction with the Network Load Balancing cluster both as a whole or with the individual host members.. You can achieve automation
Trang 1Contents
Overview 1
Command Line Administration 2
Programmatic Management Solutions 11
Demonstration: Examining and Executing
Scripts 18
Microsoft Application Center 2000 20
Lab A: Network Load Balancing
Administration 21
Review 31
Module 10: Network Load Balancing Cluster Administration
Trang 2to represent any real individual, company, product, or event, unless otherwise noted Complying with all applicable copyright laws is the responsibility of the user No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Microsoft Corporation If, however, your only means of access is electronic, permission to print one copy is hereby granted
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property
2000 Microsoft Corporation All rights reserved
Microsoft, Active Directory, BackOffice, Jscript, PowerPoint, Visual Basic, Visual Studio, Win32, Windows, Windows NT are either registered trademarks or trademarks of Microsoft Corporation
in the U.S.A and/or other countries
Other product and company names mentioned herein may be the trademarks of their respective owners
Program Manager: Don Thompson
Product Manager: Greg Bulette
Instructional Designers: April Andrien, Priscilla Johnston, Diana Jahrling
Subject Matter Experts: Jack Creasey, Jeff Johnson
Technical Contributor: James Cochran
Classroom Automation: Lorrin Smith-Bates
Graphic Designer: Andrea Heuston (Artitudes Layout & Design)
Editing Manager: Lynette Skinner
Editor: Elizabeth Reese
Copy Editor: Bill Jones (S&T Consulting)
Production Manager: Miracle Davis
Build Manager: Julie Challenger
Print Production: Irene Barnett (S&T Consulting)
CD Production: Eric Wagoner
Test Manager: Eric R Myers
Test Lead: Robertson Lee (Volt Technical)
Creative Director: David Mahlmann
Media Consultation: Scott Serna
Illustration: Andrea Heuston (Artitudes Layout & Design)
Localization Manager: Rick Terek
Operations Coordinator: John Williams
Manufacturing Support: Laura King; Kathy Hershey
Lead Product Manager, Release Management: Bo Galford
Lead Technology Manager: Sid Benavente
Lead Product Manager, Content Development: Ken Rosen
Group Manager, Courseware Infrastructure: David Bramble
Group Product Manager, Content Development: Julie Truax
Director, Training & Certification Courseware Development: Dean Murray
General Manager: Robert Stewart
Trang 3Instructor Notes
This module provides students with the knowledge and skills to administer a
Network Load Balancing cluster
After completing this module, students will be able to:
Utilize the command line to administer the Network Load Balancing cluster
Manage the Network Load Balancing cluster with scripting tools
Describe the feature sets of Microsoft® Application Center 2000
Materials and Preparation
This section provides the materials and preparation tasks that you need to teach this module
Required Materials
To teach this module, you need the Microsoft PowerPoint® file 2087A_10.ppt
Preparation Tasks
To prepare for this module, you should:
Read all of the materials for this module
Complete Lab A: Network Load Balancing Administration
Study the review questions and prepare alternative answers to discuss
Anticipate questions that students may ask Write out the questions and provide the answers
Presentation:
45 Minutes
Lab:
30 Minutes
Trang 4Demonstration
This section provides demonstration procedures that will not fit in the margin notes or are not appropriate for the student notes
Demonstration A: Using the WMI Object Browser
1 If you want only to demonstrate the use of the WMI Object Browser, ensure that you have installed the software development kit (SDK) on the instructor computer
2 If you want to demonstrate the installation of the SDK, make the SDK software available from a share on the instructor computer
Demonstration B: Examining and Executing Scripts
1 Ensure that the scripts that you will describe to the students are available to execute Sample scripts are available on the Instructor CD, move the relevant scripts to the instructor computer
2 Practice describing enumeration, object creation, and loop structures in the selected scripts
3 Three simple scripts are printed in the demonstration text, but you may use more complex scripts if students are at a more advanced level
Trang 5Module Strategy
Use the following strategy to present this module:
Command Line Administration Review the Wlbs.exe commands with the students
Review the cluster and host commands with the students Ensure that the students understand the security issues with configuring the Network Load Balancing driver for remote operations
Review the cluster control commands
Review the commands for Wlbs.exe cluster operations
Review the rule-based operations
Programmatic Management Solutions Use the graphic for the Network Load Balancing WMI Provider and ensure that the students understand how the Network Load Balancing driver plugs into the WMI Provider
Start the WMI Object Browser and demonstrate the use of the tool to configure and monitor Network Load Balancing cluster operations
Review the use of the Windows Scripting Host to write noninteractive scripts for logging on, administering, and automating the NLB hosts This topic is meant as a brief introduction to the tool, do not expect the students
Trang 7Overview
Administration of a Network Load Balancing cluster can require managing many individual hosts in addition to the single logical cluster You can perform administrative tasks at each individual host, but performing remote
administration can allow you to use a more centralized approach
For example, a large n-tiered Web site with multiple Network Load Balancing
clusters that you configure by using round robin DNS entries requires administration of a potentially large number of hosts To provide efficient administration from a central location requires the use of remote host administration A solution that provides a centralized administrative capability can include the use of Wlbs.exe or applications and tools that are developed specifically for the task
In this module you will learn how to administer a Network Load Balancing cluster by using Wlbs.exe and other programmatic solutions
After completing this module, you will be able to:
Utilize the command line to administer the Network Load Balancing cluster
Manage the Network Load Balancing cluster with scripting tools
Describe the feature sets of Microsoft® Application Center 2000
In this module, you will learn
about the administration
tasks that are required to
manage the Network Load
Balancing cluster
Trang 8Command Line Administration
Wlbs.exe provides direct interaction with the Network Load Balancing cluster both as a whole or with the individual host members In addition to providing the capability of stopping and starting a cluster, Wlbs.exe provides commands
to examine cluster status, control the cluster, and enable and disable port rules You can achieve automation of tasks involving the Network Load Balancing cluster or the individual cluster members by using Wlbs.exe in bat or cmd command files The degree to which this type of automation is successful will depend on the tasks requiring execution; and because Wlbs.exe provides little feedback on operation performance, which can require you to create scripted solutions by using Microsoft Windows® Management Instrumentation (WMI)
to monitor performance
For example, if a cluster is scheduled to stop at the same time each Friday to perform a backup, you can automate the backup task with a simple batch file The automated batch file stops the cluster and starts the backup, restarting the cluster on backup completion
Topic Objective
To use the command line to
administer the Network
Load Balancing cluster
Lead-in
Wlbs.exe provides direct
interaction with the Network
Load Balancing cluster both
as a whole or with the
individual host members
Delivery Tip
This diamond page and the
pages that support this topic
deal with using Wlbs.exe
commands to configure and
manage the Network Load
Balancing cluster Explain to
the students that they will be
able to use commands to
provide more efficient
administration of the cluster
through automation of
routine tasks
Trang 9The Wlbs.exe program operates on Network Load Balanced hosts or on any remote computer that is running Microsoft Windows 2000 that accesses the cluster over a local or wide area network You can also use Wlbs.exe to issue commands to a single host or an entire cluster remotely; however, firewalls or intermediate security devices may require configuration to allow
communication to the cluster
Wlbs.exe Command Line Syntax
The command line for Wlbs.exe uses the syntax wlbs command [cluster [:host]
[remote options]] and is installed in the %Systemroot%\System32 folder
You can omit the cluster, host, and remote options when running Wlbs.exe directly on a cluster host In this case, 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 following table provides examples of how to address the cluster
Cluster and Host Parameter Example Action
(omitted) wlbs command Invokes command on
current cluster host Cluster wlbs command
Topic Objective
To identify the Wlbs.exe
commands that allows
administration of the cluster
Lead-in
The Wlbs.exe program
operates on Network Load
Balanced hosts or on any
remote computer running
Windows 2000 that
accesses the cluster over a
local or wide area network
Trang 10Wlbs.exe Commands
You can configure Network Load Balancing hosts to join the cluster
automatically upon startup or to wait for the wlbs start command by enabling the initial state option in the Network Load Balancing Properties dialog box You can use the wlbs start command with the wlbs stop command to change
cluster parameters for the local host without taking the entire cluster offline
Wlbs start
The wlbs start command will attempt to start the actions of the Network Load
Balancing driver on the local host When you start a host, there is communication between the local host and current members of the cluster (heartbeat communications) If you have properly configured the local host, it will successfully join the cluster
You can restart cluster operations on the local cluster host by either
restarting the computer or typing wlbs start at the command prompt You can restart cluster operations on all of the cluster hosts by typing wlbs start
followed by the cluster Internet Protocol (IP) address or cluster name
Wlbs stop
The wlbs stop command will stop the actions of the Network Load Balancing
driver on the local host When you stop the local host, it no longer participates
in the cluster The wlbs stop command can be described as a command to a host
to leave the cluster
You can use the following procedure to stop operations on a specific host or the
entire cluster by adding the IP address or the cluster name after the wlbs stop
command
1 Click Start, point to Programs, point to Accessories, and then click
Command Prompt
2 Type wlbs stop at the command prompt Cluster operations are immediately
stopped on the local cluster host
3 If you want to stop cluster operations on all cluster hosts, type wlbs stop
followed by the cluster IP address or cluster name
When you use the wlbs stop command any client connections already in
progress are interrupted To avoid interrupting active connections, consider
using the drainstop cluster control command Drainstop will be explained in a
later topic within this module
Note
Note
Trang 11Cluster and Host Commands
You can use Wlbs.exe commands to administer a single host or all of the hosts within the cluster by using the appropriate cluster and host parameters as part of the Wlbs.exe command line syntax
Specifying Cluster Parameters
The cluster parameter can be either the cluster’s full Internet name or the cluster’s primary IP address If you omit the host parameter, the command applies to all of the hosts within the cluster and is multicast or broadcast to the hosts; otherwise, the command applies to the specified host within the cluster You use the following commands to specify the cluster parameters
Wlbs stop webcluster
This command will stop the actions of the Network Load Balancing driver on all of the member hosts in the cluster called webcluster When the hosts are stopped, the cluster is stopped
Wlbs stop webcluster:5
This command will stop the actions of the Network Load Balancing driver on the member host with a unique identifier of 5 in the cluster called webcluster When the host is stopped, it is no longer participating in the cluster
Topic Objective
To identify the commands
that allow for local and
remote control of the
Network Load Balancing
cluster
Lead-in
You can use Wlbs.exe
commands to administer a
single host or all of the hosts
within the cluster by using
the appropriate cluster and
host parameters as part of
the Wlbs.exe command line
syntax
Trang 12Specifying Host Parameters
You can specify host names by using their unique host priorities that you have
assigned in the Network Load Balancing Properties dialog box or use the
special host priority value 0 (zero) to refer to the default host within a cluster Syntax examples are shown in the following table
Example Description
Configuring Remote Options
You can configure the Network Load Balancing driver with remote operations enabled or disabled If you enable remote operation, you can require a password
to permit acceptance of remote commands by the driver When using Wlbs.exe
to execute commands on a remote driver instance, you must specify the password on the command line You use the following commands to configure remote options
Wlbs stop webcluster /doitnow This command will stop the actions of the Network Load Balancing driver
on all of the member hosts in the cluster called webcluster, where the
remote password is doitnow
Wlbs stop webcluster: 5 /doitnow This command will stop the actions of the Network Load Balancing driver
on the cluster host with a unique identifier of 5 in the cluster called
webcluster, where the remote password is doitnow
Remote Operations
Wlbs.exe uses either or both of the User Datagram Protocol (UDP) ports 1717
or 2504 on the cluster IP address By default, remote commands are not accepted by the cluster; these must be explicitly enabled on each cluster member Remote operations are secured by using a password stored locally in the registry on each host participating in the cluster
It is not recommended that you allow remote control of a cluster or cluster hosts from a public network When you must permit remote control operations, isolation of a cluster by using a firewall is recommended with UDP ports 1717 and 2504 blocked to the public network to prevent unauthorized access
Important
Trang 13Cluster Control Commands
Cluster Command Example
wlbs help
Description
Returns Help information
wlbs query mycluster Queries the status of all hosts in myclusterQueries the status of all hosts in myclusterwlbs ip2mac mycluster Displays MAC addresses corresponding to myclusterDisplays MAC addresses corresponding to mycluster
You can use the following control commands for a Wlbs.exe cluster to display the host priorities, access the help files if they are installed on your computer, and display the media access control (MAC) address or data about the cluster status
Display The display command can be invoked on the cluster host only and
displays extensive information about your current Network Load Balancing parameters, cluster state, and past cluster activity
Help The help command displays Network Load Balancing online Help
information if available on the local computer
The display command shows the last several event log records that
Network Load Balancing produced, including the binary data attached to those records This command is designed to assist in technical support and
debugging
Ip2mac The ip2mac command displays the MAC address corresponding to
the specified multicast or unicast cluster name or IP address
Topic Objective
To identify the Wlbs.exe
commands that provide
cluster status
Lead-in
You can use Wlbs.exe
cluster control commands to
display the host priorities;
access the help files, and
display the MAC address or
data about the cluster
status
Key Points
The display command
shows the last several event
log records that Network
Load Balancing produced,
including the binary data
attached to those records
This command is designed
to assist in technical support
and debugging
Note
Trang 14Query The query command displays the current cluster state and the list of
host priorities for the current members of the cluster The possible states are:
• Converged The cluster has converged, and the responding host is not the default host
• Converged as default The cluster has converged, and the responding
host is the current default (the highest priority host that is not performing
a drainstop) The default host handles network traffic for all of the
Transmission Control Protocol (TCP) / UDP ports that are not covered
by the port rules
• Converging The cluster is currently attempting to converge to a
consistent state Prolonged convergence usually indicates a problem with cluster parameters
• Draining The cluster has converged, and the responding host is draining
active connections prior to stopping cluster mode
• Unknown The responding host has not started cluster operations and
cannot determine the cluster’s state
Trang 15Setting Cluster and Host Operations
By using the following Wlbs.exe cluster control commands, you can temporarily stop cluster operations and then resume command without restarting the cluster During a draining operation you can stop all of the IP traffic to a specified host or reload the current parameters of the Network Load Balancing driver
Drainstop The drainstop command disables all new traffic handling on the
specified hosts that enter draining mode to complete existing connections While draining, hosts remain in the cluster and stop their cluster operations only when there are no more active connections You can terminate the
draining mode by stopping the cluster mode with the stop command or by restarting new traffic handling with the start command
Reload You can invoke the reload command on the cluster host only and
reload the Network Load Balancing driver’s current parameters The cluster operations on the local host are stopped or restarted if necessary
Resume The resume command resumes cluster operations after a previous
suspend command It does not restart cluster operations, but enables handling of cluster control commands, including remote control commands
Suspend The suspend command suspends all of the cluster operations until
the resume command is issued and temporarily stops cluster operations It overrides any remote control commands that the administrator may issue The cluster ignores all subsequent cluster control commands except resume and query
Topic Objective
To identify the Wlbs.exe
commands that control
cluster and host operations
Lead-in
By using the following
Wlbs.exe cluster control
commands, you can
temporarily stop cluster
operations and then resume
command without restarting
the cluster
Trang 16Setting Rule-based Operations
The Network Load Balancing cluster must have rules to specify the response to TCP and UDP traffic for the cluster IP address The following command is an example of how you can control the rules that are associated with the specified ports by using Wlbs.exe
• wlbs disable 80 The wlbs disable 80 command disables the local host’s
handling of new network traffic for the Web server port (port 80)
The following Wlbs.exe commands allow you to control the port rules:
Disable The disable command disables and immediately blocks all traffic
handling for the rule whose port range contains the specified port All ports
that the port rule specifies are affected If all is specified for the port, this
command is applied to the ports that all of the port rules cover All active connections on the specified hosts are blocked to IP traffic To maintain
active connections, use the drain command instead The drain command
has no effect on IP traffic if the specified hosts have not started cluster operations
Drain The drain command disables new traffic handling for the rule whose
port range contains the specified port All ports that the port rule specifies
are affected If all is specified for the port, this command is applied to the
ports that all of the port rules cover The specified host will not allow new connections and will maintain all of the active connections To disable
active connections, use the disable command instead The disable
command has no effect on IP traffic if the specified hosts have not started cluster operations
Enable The enable command enables traffic handling for the rule whose
port range contains the specified port All ports that the port rule specifies
are affected If all is specified for the port, this command is applied to the
ports that the port rules cover This command has no effect on IP traffic if the specified hosts have not started cluster operations
Topic Objective
To identify the rule-based
operations for the cluster
Lead-in
The Network Load
Balancing cluster must have
rules to specify the
response to TCP and UDP
traffic for the cluster IP
address
Trang 17Programmatic Management Solutions
Web-based Enterprise Management (WBEM) provides uniform access to management information Such management information includes data on the state of system memory, inventories of currently installed applications, and other information on service and application status
Management information can be sourced from the computer registry or direct from a service by using a WMI provider For example, the WMI provider for Network Load Balancing permits configuration of cluster and host parameters and setting of port rules
Implemented for Microsoft Windows platforms, WMI technology enables systems; applications, networks, and other managed components to be represented by using the Common Information Model (CIM) This model, which the Desktop Management Task Force (DMTF) designed, can represent anything in a managed Windows environment regardless of the data source location
CIM is a data model, a conceptual view of the environment that unifies and extends existing instrumentation and management standards by using class-based, object-oriented, constructs and design
WMI supports a powerful set of base services that include query-based information retrieval systems and event notification Access to these services and to the management data is made possible with a Component Object Model (COM) based programming interface that you can use with a range of scripting and programming languages
Topic Objective
To manage the Network
Load Balancing cluster with
experience with writing
scripts, they can create
scripted solutions that
automate simple to complex
cluster management tasks
or that monitor performance
Trang 18Network Load Balancing WMI Provider
CIM Object Repository
Object Providers
Microsoft Management Console (MMC) Management
Application Snap-In Snap-In
CIM Object Manager
WDM Kernel Objects
DMI Objects Win32® Objects
Network Load Balancing
A WMI provider is an architectural element of Windows Management Instrumentation WMI defines a unified architecture or schema for describing, accessing, and instrumenting objects Part of this architecture is a large database
of WMI classes or schemas that are used to carry out remote management tasks
on specific objects
You can use WMI provider to manage the Network Load Balancing driver The WMI provider exposes the configuration and status information as part of the CIM database and provides:
An access mechanism to monitor, command, and control any entity through
a common, unifying set of interfaces, irrespective of the underlying instrumentation mechanism
A logically organized, consistent model of Windows 2000 operating system operation, configuration, and status
A COM application-programming interface (API) for providing and accessing management information
A powerful event mechanism that allows management events to be asserted and associated with other management information These notifications can also be forwarded to local or remote management applications
An interactive query language that enables detailed queries of the information model
A scriptable API that supports several languages, including Microsoft Visual Basic®; Visual Basic for Applications; Visual Basic Scripting Edition (VBScript); Microsoft JScript®, and Perl
Topic Objective
To describe how you can
use the WMI provider to
manage the Network Load
WMI permits programmatic
update of Network Load
Balancing configuration by
accessing configuration data
stored in the CIM database
WMI can access the CIM
database with applications,
such as CIM studio from
WMI SDK, or applications
developed in Visual Basic,
C++, or scripting languages
Trang 19Using the WMI SDK Tools
Hosted in Web Browser, accessing WMI CIM data
Allows interactive configuration of Network Load Balancing by writing
to CIM database Execute methods
to change state of the cluster
Name Disable Drain DrainStop Enable Resume SetPowerState Start Stop Suspend
Method Qualifiers…
Object Qualifiers…
You can access management data in an enterprise environment by using the WMI Common Information Model object browser or the WMI Object Browser These tools are available in the WMI Software Development Kit (SDK) The focus of this topic is on the WMI Object Browser shown in the preceding graphic
WMI Object Browser
The WMI Object Browser contains an Object Explorer window that shows the hierarchy of instances that you find in a defined namespace by following association links The hierarchy is shown as a graphical tree within the Object Explorer window The tree shows regular objects and grouping nodes
Grouping nodes are not objects themselves but are a way to organize objects The Object Explorer window uses the icons next to the names to indicate the type of object or node (also referred to as host) as shown in the graphic
WMI Common Information Model Object Browser
WMI Common Information Model (CIM) object browser is an application designed primarily for use by developers, but administrator can use it to view CIM data Using this application, you can:
Display the object tree that is contained in a specified CIM repository
Display properties, methods, and associations for a selected object
Display custom views of object data
Display instances of grouped objects
Display property and object qualifiers
Execute methods on a selected object
Edit property values and object and property qualifiers
using the WMI Common
Information Model object
browser or the WMI Object
Browser
Delivery Tip
In the slide the term node is
used to indicate an
individual computer within
the cluster The term node is
equivalent to host, which is
an individual computer
within a Network Load
Balancing cluster