Tải bản đầy đủ (.pdf) (38 trang)

Tài liệu Module 10: Network Load Balancing Cluster Administration pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (998.1 KB, 38 trang )





Contents
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

Information in this document is subject to change without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to 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


Module 10: Network Load Balancing Cluster Administration iii

Instructor 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
iv Module 10: Network Load Balancing Cluster Administration

Demonstration
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
 To prepare for the demonstration
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
 To prepare for the demonstration
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.

Module 10: Network Load Balancing Cluster Administration v

Module 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
to know scripting.
Use the scripts that are provided in the demonstration to provide the
students with examples of how they can use scripting.
 Microsoft Application Center 2000
Briefly review the features of Application Center 2000.




Module 10: Network Load Balancing Cluster Administration 1


Overview
 Command Line Administration
 Programmatic Management Solutions
 Microsoft® Application Center Server 2000

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
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.

Topic Objective

To provide an overview of
the module topics and
objectives.
Lead-in
In this module, you will learn
about the administration
tasks that are required to
manage the Network Load
Balancing cluster.
2 Module 10: Network Load Balancing Cluster Administration




 Command Line Administration
 Wlbs.exe Commands
 Cluster and Host Commands
 Cluster Control Commands
 Setting Cluster and Host Operations
 Setting Rule-based Operations

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
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.
Module 10: Network Load Balancing Cluster Administration 3


Wlbs.exe Commands
 Wlbs.exe Command Line Syntax
 Wlbs.exe Commands
 Wlbs start
 Wlbs stop

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
The 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
mycluster
Invokes command on all
cluster hosts
cluster:host wlbs command \
mycluster:host1
Invokes command on a
specific cluster host

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.
4 Module 10: Network Load Balancing Cluster Administration


Wlbs.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.
 To stop Network Load Balancing
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
Module 10: Network Load Balancing Cluster Administration 5


Cluster and Host Commands
 Specifying Cluster Parameters
 Specifying Host Parameters
 Configuring Remote Options
 Remote Operations

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
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.
6 Module 10: Network Load Balancing Cluster Administration


Specifying 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

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 of the hosts in mycluster

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.

Importan
t

Module 10: Network Load Balancing Cluster Administration 7


Cluster Control Commands
Cluster Command Example
Cluster Command Example
Cluster Command Example
wlbs help
wlbs help
Description
Description
Description
Returns Help information
Returns Help information
wlbs query mycluster
wlbs query mycluster
Queries the status of all hosts in
mycluster
Queries the status of all hosts in

mycluster
wlbs ip2mac mycluster
wlbs ip2mac mycluster
Displays MAC addresses corresponding
to mycluster
Displays MAC addresses corresponding
to mycluster

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
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
8 Module 10: Network Load Balancing Cluster Administration


 Query. 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.

Module 10: Network Load Balancing Cluster Administration 9


Setting Cluster and Host Operations
 Drainstop
 Reload
 Resume
 Suspend

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
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.
10 Module 10: Network Load Balancing Cluster Administration


Setting Rule-based Operations

 Disable
 Drain
 Enable

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
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.
Module 10: Network Load Balancing Cluster Administration 11




 Programmatic Management Solutions
 Network Load Balancing WMI Provider
 Using the WMI SDK Tools
 Microsoft Windows Scripting Host

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
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
scripting hosts.
Lead-in
Web-based Enterprise
Management provides
uniform access to
management information
about Windows 2000-based

computers.
Delivery Tip
Explain to the students that
depending on their
experience with writing
scripts, they can create
scripted solutions that
automate simple to complex
cluster management tasks
or that monitor performance.
12 Module 10: Network Load Balancing Cluster Administration


Network 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
DCOM DCOM
WDM RPC WIN32 MicrosoftNLB

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
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
Balancing cluster.
Lead-in
A WMI provider is an
architectural element of
Windows Management
Instrumentation.
Key Points
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.
Module 10: Network Load Balancing Cluster Administration 13


Using 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…

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
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.

Topic Objective
To introduce the WMI SDK
tools.
Lead-in
You can access
management data in an
enterprise environment by
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.
14 Module 10: Network Load Balancing Cluster Administration


Demonstration: Using the WMI Object Browser

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
You can use the WMI Object Browser supplied with the WMI SDK to
configure and monitor the operation of Network Load Balancing and the
computer it is running on.
Starting WMI Object Browser and browsing root\CIMV2
 To start WMI Object Browser
1. Start the WMI Object Browser by clicking Start – Programs – WMI SDK
– WMI Object Browser. The Object Browser tool will start and run in an
instance of Internet Explorer.
2. In the Connect to namespace dialog box, enter root\CIMV2 and then click
OK.
3. After logging on, the object tree appears if you have previously accessed the
selected namespace in the WMI Object Browser. If this is the first time that
you are accessing the namespace, you must select an initial object tree root.
4. At the first access of the namespace, use the Select Initial Tree Root dialog
box to browse classes and their instances and then choose an instance as the

root of the object tree. This dialog box initially lists only the classes in the
current namespace that can have instances.
5. In the Select Initial Tree Root dialog box, select Show all classes to see all
of the classes in the current namespace, or Show Associations to display
association classes. Classes that cannot have instances (abstract classes)
appear in bold type.
6. For browse each class click the class name in the Available Classes list and
then click Add>>.
7. Each class added appears in the Browse for objects in box. (For quicker
selection, you can start typing the class name in the Available Classes box
to move directly to the class location in the list.) You can remove selected
classes from the search by clicking the class name in the Browse for
objects in box, and then clicking Remove.
Topic Objective
To demonstrate the WMI
Object Browser.
Lead-in
The WMI Object Browser
supplied with the WMI SDK
can be used to configure
and monitor the operation of
Network Load Balancing
and the computer it is
running on.
Delivery Tip
The students will not have
the WMI SDK installed, as
this is part of Lab A in this
module. If you wish to have
the students walk through

the demo with you, you can
explain how to install the
SDK as part of the
demonstration.
Module 10: Network Load Balancing Cluster Administration 15


8. When you are done choosing classes, click OK.
9. Click the instance that you want to be the root, and then click OK.
10. The object tree appears in the WMI Object Browser with the selected
instance as the root. Note that the WMI Object Browser uses the selected
root as the default root whenever you subsequently access the namespace.
You can change the default root by using the Make Initial Tree Root
function.
11. Explore the Win32_Computersystem.Name object tree and familiarize
yourself with the information type shown. For example, examining the
Win32_NTLogEventComputer.Record will show the events that are stored in
the Event Log.

 To use the WMI Object Browser to configure and monitor the
operation of Network Load Balancing and the computer it is running
on
1. Start the WMI Object Browser by clicking Start – Programs – WMI SDK
– WMI Object Browser. The Object Browser tool will start and run in an
instance of Internet Explorer.
2. Enter the namespace name (by default this is root) to connect to the local
machine, or click on the Browse for Namespace icon to enter a computer
name and namespace to connect to. Click Connect to continue.
3. If you selected root, browse to the MicrosoftNLB namespace and click the
OK button in the Browse for Namespace dialog box.

4. Examine the entries under MicrosoftNLB_Node.Name.
5. Select MicrosoftNLB_Node.Name and examine the Properties and
Methods tabs in the right hand frame.
6. Select CIM_ElementSetting.Setting, right-click on a data column in the
right-hand frame and then click Go To Object.
7. Modify the AliveMessageTolerance from the default value of 5 to 6.
8. Select MicrosoftNLB_Node.Name to refresh window and click yes to update
the value in the registry. Return to CIM_ElementSetting.Setting.
9. Select CIM_ElementSetting.Setting, right-click on a data column in the
right-hand frame and click Go To Object.
10. Select the Methods tab and right-click LoadAllSettings, click Execute
Method. (Network Load Balancing will be stopped and restarted with the
new values.)

16 Module 10: Network Load Balancing Cluster Administration


Microsoft Windows Script Host
COM Objects
Registry – File
Associations
Windows Scripting Host
Cscript.exe
Wscript.exe
Scripting Engines
VBScript, JScript
S
c
r
i

p
t
B
l
a
h

B
l
a
h
.
.
B
l
a
h
M
o
r
e

b
l
a
h
C:\>test.vbs_
C:\WINNT\System32\cmd.exe

*****************************

ILLEGAL FOR NON-TRAINER USE******************************
By using Windows Script Host you can write noninteractive scripts for logging
on, administering, and automating the Network Load Balancing cluster hosts.
Scripts are commonly written in Microsoft Visual Basic
® Scripting Edition
(VBScript) or Microsoft Jscript
®. Other languages, such as Perl, are also
supported.
You can run Windows Script Host from either the Windows-based host
(WSCRIPT.EXE), or the command shell-based host (CSCRIPT.EXE). The
scripts are typically automated with Scheduled Tasks. The scripts can run
without a user logged on, and with no access to the visible desktop. You can
also use script code in Web browser-based applications as client-side script or
implemented as server-side Active Server Pages (ASP) script code by using
Internet Information Services (IIS).
The scripting languages support Component Object Model (COM) automation
objects, which allow the script to create instances of both product and operating
system service objects, and pass data between them. The Windows Script Host
Reference documents elements, methods, objects, and properties with which
you can accomplish tasks such as:
 Instantiation of COM components.
 Printing of messages to the screen.
 Mapping network drives.
 Connecting to and controlling printers.
 Retrieving and modifying environment variables.
 Reading and modifying registry keys.

Topic Objective
To describe how you can
use the Windows Scripting

Host to manage the Network
Load Balancing cluster.
Lead-in
By using Windows Script
host you can write
noninteractive scripts for
logging on, administering,
and automating the Network
Load Balancing cluster
hosts.
The demonstration script
shown on this page can be
recreated by using Microsoft
Notepad and executed for
the students. If the students
are advanced they can
create the script and run it.
Module 10: Network Load Balancing Cluster Administration 17


The Scripting API for WMI is a set of objects consisting of properties, methods,
and events that you can use to develop script and Microsoft Visual Basic
applications that view information about or control managed objects, such as
Network Load Balancing. The following code segment lists all processes
running on the local system and illustrates:
 the use of enumeration
 direct access to a CIM property (in this case the Name property of an
instance of the CIM class Win32_Service) as if it were an automation
property
 local access

for each Process in
GetObject("winmgmts:{impersonationLevel=impersonate}")
.InstancesOf ("Win32_process")
WScript.Echo Process.Name
Next

18 Module 10: Network Load Balancing Cluster Administration


Demonstration: Examining and Executing Scripts

*****************************
ILLEGAL FOR NON-TRAINER USE******************************
Using scripts you can list all of the processes and services running or view the
Event Log for the Network Load Balancing cluster.
List all Processes Running on the Local System
The following code segment illustrates the use of enumeration, direct access to
a CIM property (in this case the Name property of an instance of the CIM class
Win32_Service) as if it were an automation property, and local access.
for each Process in
GetObject("winmgmts:{impersonationLevel=impersonate}")
.InstancesOf ("Win32_process")
WScript.Echo Process.Name
Next

List all Services Running on the System on Host
Products1
The following code segment illustrates the use of enumeration, direct CIM
property access, and remote access to a Windows 2000 system.
for each Service in

GetObject("winmgmts:{impersonationLevel=impersonate}!
//ServerName").InstancesOf ("Win32_service")
WScript.Echo Service.DisplayName
Next

Topic Objective
To demonstrate the
execution of scripts.
Lead-in
Using scripts you can list all
of the processes and
services running or view the
Event Log for the Network
Load Balancing cluster.
Module 10: Network Load Balancing Cluster Administration 19


Listen for NT Event Log Events on the Local System
The following code segment illustrates the use of registration of a temporary
event consumer on a specified event filter, and direct CIM property access.
on error resume next
set locator = CreateObject("WbemScripting.SWbemLocator")

'Access to the NT event log requires the security privilege
locator. Security_.Privileges.AddAsString
"SeSecurityPrivilege"

set events = locator.ConnectServer().ExecNotificationQuery
_
("select * from __instancecreationevent where

targetinstance is a 'Win32_NTLogEvent'")


if err <> 0 then
WScript.Echo Err.Description, Err.Number, Err.Source
end if

' Note this next call will wait indefinitely - a timeout
can be specified

WScript.Echo "Waiting for NT Events "
WScript.Echo ""

do
set NTEvent = events.nextevent
if err <> 0 then
WScript.Echo Err.Number, Err.Description, Err.Source
Exit Do
elseif NTEvent.TargetInstance.Message <> Empty then

WScript.Echo NTEvent.TargetInstance.Message
else
Wscript.Echo "Event received, but it did not contain
a message."
end if
loop
WScript.Echo "finished"

×