Add-NlbClusterPortRule

Add-NlbClusterPortRule

Adds a new port rule to a Network Load Balancing (NLB) cluster.

Sintaxis

Parameter Set: NonPipeline
Add-NlbClusterPortRule [-StartPort] <Int32> [-EndPort] <Int32> -InterfaceName <String> [-Affinity <PortRuleAffinity> {Network | None | Single} ] [-HostName <String> ] [-IP <IPAddress> ] [-Mode <PortRuleFilteringMode> {Disabled | Multiple | Single} ] [-Protocol <PortRuleProtocol> {Both | Tcp | Udp} ] [-Timeout <UInt32> ] [ <CommonParameters>]

Parameter Set: Pipeline
Add-NlbClusterPortRule [-StartPort] <Int32> [-EndPort] <Int32> -InputObject <Cluster[]> [-Affinity <PortRuleAffinity> {Network | None | Single} ] [-IP <IPAddress> ] [-Mode <PortRuleFilteringMode> {Disabled | Multiple | Single} ] [-Protocol <PortRuleProtocol> {Both | Tcp | Udp} ] [-Timeout <UInt32> ] [ <CommonParameters>]

Descripción detallada

The Add-NlbClusterPortRule cmdlet adds a new port rule to a Network Load Balancing (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. A filtering mode can also 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 cmdlet 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.

Parámetros

-Affinity<PortRuleAffinity>

Specifies the type of affinity for the new port rule. Los valores aceptables para este parámetro son los siguientes: Network, None, or Single.

Alias

A

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-EndPort<Int32>

Specifies the end port for the new port rule. Los valores aceptables para este parámetro son los siguientes: 0 through 65535.

Alias

E

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-HostName<String>

Specifies the name of the cluster host against which this cmdlet is run. If this parameter is omitted or a value of . is entered, then the local cluster is assumed.

Alias

Host,HN,H

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-IP<IPAddress>

Specifies the IP address for the new cluster port rule.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-InputObject<Cluster[]>

Specifies the cluster to which the port rule is added.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue, ByPropertyName)

¿Aceptar caracteres comodín?

false

-InterfaceName<String>

Specifies the interface to which NLB is bound. This is the interface of the cluster against which this cmdlet is run.

Alias

Interface,IN,I

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Mode<PortRuleFilteringMode>

Specifies the filtering mode for the new cluster port rule. Los valores aceptables para este parámetro son los siguientes: Disabled, Multiple, and Single.

Alias

M

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Protocol<PortRuleProtocol>

Specifies the protocol for the new port rule. Los valores aceptables para este parámetro son los siguientes: Both, TCP, or UDP.

Alias

PTCL

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-StartPort<Int32>

Specifies the start port for the new port rule. Los valores aceptables para este parámetro son los siguientes: 0 through 65535.

Alias

S

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Timeout<UInt32>

Specifies the timeout in minutes for the new cluster port rule. Los valores aceptables para este parámetro son los siguientes: 0 through 240.

Alias

T

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • Microsoft.NetworkLoadBalancingClusters.PowerShell.Cluster

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.NetworkLoadBalancingClusters.PowerShell.PortRule

Ejemplos

EXAMPLE 1

This example adds a new port rule to the local cluster. The new port rule covers port 443 only, and uses the default settings for the rest of the port rule parameters.

PS C:\> Get-NlbCluster | Add-NlbClusterPortRule -StartPort 443 -EndPort 443

EXAMPLE 2

This example adds a new port rule to the local cluster. The new port rule covers port 80 only and has no affinity, and uses the default settings for the rest of the port rule parameters.

PS C:\> Get-NlbCluster | Add-NlbClusterPortRule -StartPort 80 -EndPort 80 -Affinity None

Temas relacionados

Disable-NlbClusterPortRule

Enable-NlbClusterPortRule

Get-NlbClusterPortRule

Remove-NlbClusterPortRule

Set-NlbClusterPortRule