Share via


MicrosoftNLB_PortRuleEx class

The MicrosoftNLB_PortRuleEx WMI class represents a port rule on a node. The provider will only return the instances for this class that correspond to the node upon which it resides. Consequently, to configure a node, the client must explicitly connect to that node.

Always use the MicrosoftNLB_PortRuleEx class instead of the MicrosoftNLB_PortRule, MicrosoftNLB_PortRuleFailover, MicrosoftNLB_PortRuleLoadbalanced, and MicrosoftNLB_PortRuleDisabled classes.

The following syntax is simplified from MOF code and includes all inherited properties.

Syntax

[Dynamic, Provider("Microsoft|NLB_Provider|V1.0"), AMENDMENT]
class MicrosoftNLB_PortRuleEx
{
  string  Name;
  string  VirtualIpAddress = "255.255.255.255";
  uint32  StartPort = 0;
  uint32  EndPort = 65535;
  uint32  Protocol = 3;
  string  AdapterGuid;
  uint32  FilteringMode = 2;
  Boolean EqualLoad = TRUE;
  uint32  LoadWeight = 50;
  uint32  ClientStickinessTimeout = 20;
  uint32  Affinity = 1;
  uint32  Priority = 1;
  uint32  PortState;
};

Members

The MicrosoftNLB_PortRuleEx class has these types of members:

Methods

The MicrosoftNLB_PortRuleEx class has these methods.

Method Description
SetDefaults Resets the node's port rule configuration to the default.

Properties

The MicrosoftNLB_PortRuleEx class has these properties.

AdapterGuid

Data type: string

Access type: Read-only

Specifies the GUID of the adapter to which Network Load Balancing is bound.

Affinity

Data type: uint32

Access type: Read-only

Specifies the client affinity as one of the following values.

None (0)

Single (1)

Network (2)

1 (Single) and 2 (Network) are used to ensure that all network traffic from a particular client be directed to the same cluster host. The default is 1 (Single).

ClientStickinessTimeout

Data type: uint32

Access type: Read-only

Specifies the Extended Affinity time-out (in minutes) of load-balanced network traffic that this host should handle for the associated port rule. This can be used to keep SSL sessions connected to the same node across NLB configuration changes (for example adding or removing nodes from the NLB cluster). This property is ignored (and Extended Affinity is disabled) if any of the following conditions are met:

  • Any nodes in the cluster are running Windows Server 2008.
  • The FilteringMode property is not set to 2 (Multiple Host).
  • The Affinity property is set to 0 (None).

(0)

This value disables Extended Affinity for this port rule on this node.

20

Default value

0 240

Valid range

Windows Server 2008: The ClientStickinessTimeout property is not supported until Windows Server 2008 R2.

EndPort

Data type: uint32

Access type: Read-only

The ending port number to which this rule applies.

(65535)

Default value

0 65535

Valid range

EqualLoad

Data type: Boolean

Access type: Read-only

Indicates that the host accepts an equal portion of the load-balanced traffic in multiple-host filtering mode for this port rule.

(TRUE)

The value for the LoadWeight property is ignored. Default value.

False

The value of the LoadWeight property is used to determine the portion of load-balanced traffic for this port rule.

FilteringMode

Data type: uint32

Access type: Read-only

The filtering mode for this rule. This can be one of the following values.

Single Host (1)

Single-host filtering mode

Multiple Host (2)

Multiple-host filtering mode. Default value.

Disabled (3)

Disabled

If the value is 2 (Multiple Host), the value for the Priority property is ignored. If the value is 1 (Single Host), the values for EqualLoad, LoadWeight, and Affinity are ignored. If the value is 3 (Disabled), the values for EqualLoad, LoadWeight, Affinity, and Priority are ignored.

LoadWeight

Data type: uint32

Access type: Read-only

The relative weight of load-balanced network traffic that this host should handle for the associated port rule.

0

Prevents a host from handling any network traffic.

(50)

Default value

0 100

Valid range

Name

Data type: string

Access type: Read-only

Qualifiers: Key, Override ("Name")

The name of the host to which this port rule applies.

PortState

Data type: uint32

Access type: Read-only

The current status of the port rule. This is one of the following values.

NLB_PORT_RULE_NOT_FOUND (0)

NLB_PORT_RULE_ENABLED (1)

NLB_PORT_RULE_DISABLED (2)

NLB_PORT_RULE_DRAINING (3)

If this port rule was created using the WMI provider and the LoadAllSettings method of the MicrosoftNLB_NodeSetting class was not called, this property will return NLB_PORT_RULE_NOT_FOUND.

Priority

Data type: uint32

Access type: Read-only

The priority of the local host for handling the networking traffic for this port rule. The host with the highest handling priority (lowest numerical value) for this rule among the current members of the cluster will handle all of the traffic for this rule. The allowed values range from 1, the highest priority, to the maximum number of hosts allowed. This value must be unique for all hosts in the cluster. The default is 1.

Protocol

Data type: uint32

Access type: Read-only

The protocol for which this rule applies as one of the following values.

TCP (1)

TCP

UDP (2)

UDP

Both (3)

Both (the default)

StartPort

Data type: uint32

Access type: Read-only

Qualifiers: Key

The starting port number to which this rule applies.

(0)

Default value

0 65535

Valid range

VirtualIpAddress

Data type: string

Access type: Read-only

Qualifiers: Key

The virtual IP address to which this rule applies. The value of virtual IP address to specify 'All Vip' (the rest of the virtual IP addresses) is "255.255.255.255". The default value is "255.255.255.255".

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008
Namespace
Root\MicrosoftNLB
MOF
WlbsProv.mof
DLL
WlbsProv.dll