Add-NlbClusterPortRule
Adds a new port rule to an NLB cluster.
Add-NlbClusterPortRule -InterfaceName <string> [-HostName <string>] [-StartPort] <int> [-EndPort] <int> [-Affinity <PortRuleAffinity>] [-IP <IPAddress>] [-Mode <PortRuleFilteringMode>] [-Protocol <PortRuleProtocol>] [-Timeout <System.Nullable`1[[System.UInt32>] [<CommonParameters>]
Add-NlbClusterPortRule -InputObject <Cluster[]> [-StartPort] <int> [-EndPort] <int> [-Affinity <PortRuleAffinity>] [-IP <IPAddress>] [-Mode <PortRuleFilteringMode>] [-Protocol <PortRuleProtocol>] [-Timeout <System.Nullable`1[[System.UInt32>] [<CommonParameters>]
The Add-NlbClusterPortRule cmdlet adds a new port rule to an NLB cluster. Port rules control how an NLB cluster functions. To maximize the control of various types of TCP/IP traffic, you can set up port rules to control how each port's cluster-network traffic is handled. The method by which a port's network traffic is handled is called its filtering mode. There are three possible filtering modes: Multiple hosts, Single host, and Disabled. You can also specify that a filtering mode apply to a numerical range of ports. You do this by defining a port rule with a set of configuration parameters that define the filtering mode. In addition, you can select one of three options for client affinity: None, Single, or Network. Single and Network are used to ensure that all network traffic from a particular client is directed to the same cluster host. To allow NLB to properly handle IP fragments, you should avoid using None when you select UDP or Both for your protocol setting.
This operation changes the configuration on all cluster nodes. As a result, the NLB cluster will have to restart the convergence process on all nodes to guarantee that configuration changes have been applied on all nodes and that a consistent state is reached. Any additional operations on the NLB cluster should not be initiated until all cluster nodes have completed the convergence process and are back to the converged state. To check the state of all cluster nodes, use the Get-NlbClusterNode cmdlet. If a configuration change results in the cluster nodes remaining in perpetual convergence, refer to the event log to resolve the configuration inconsistency between the cluster nodes.
Specifies the type of affinity for the new port rule. There are three possible types: single, none, or network.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
Specifies the end port for the new port rule. The valid range is between 0 and 65535.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
2 |
Specifies the name of the cluster host against which this cmdlet is run. If this parameter is omitted or if "-HostName ." is used, the local cluster is assumed. [Alias: hn]
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
Specifies the cluster to which the port rule is added.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
true (ByValue, ByPropertyName) |
Position? |
named |
Specifies the interface to which NLB is bound. This is the interface of the cluster against which this cmdlet is run.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
Specifies the IP address for the new cluster port rule.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
Specifies the filtering mode for the new cluster port rule. There are three possible modes: multiple, single, and disabled.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
Specifies the protocol for the new port rule. There are three possible protocols: both, TCP, or UDP. [Alias: ptcl]
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
Specifies the start port for the new port rule. The valid range is 0-65535.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
1 |
Specifies the timeout in minutes for the new cluster port rule. The acceptable range is between 0 and 240.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, see about_CommonParameters.
The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.
C:\PS>
Get-NlbCluster | Add-NlbClusterPortRule -StartPort 443 -EndPort 443
IPAddress State Start End Protocol Mode Affinity Timeout
--------- ----- ----- --- -------- ---- -------- -------
All Enabled 443 443 Both Multiple Single 0
Description
-----------
This command adds a new port rule to the local cluster. The new port rule covers port 443 only, and uses default setting for the rest of the port rule parameters.
C:\PS>
Get-NlbCluster | Add-NlbClusterPortRule -StartPort 80 -EndPort 80 -Affinity None
IPAddress State Start End Protocol Mode Affinity Timeout
--------- ----- ----- --- -------- ---- -------- -------
All Enabled 80 80 Both Multiple None 0
Description
-----------
This command adds a new port rule to the local cluster. The new port rule covers port 80 only and has no affinity, and uses default setting for the rest of the port rule parameters.
Disable-NlbClusterPortRule
Enable-NlbClusterPortRule
Get-NlbClusterPortRule
Remove-NlbClusterPortRule
Set-NlbClusterPortRule