First, we need to load the server manager module and install NLB. To do this run the following commands:
1Import-Module ServerManager2Add-WindowsFeature NLB, RSAT-NLB
1
Import
-Module
ServerManager
2
Add
-WindowsFeature
NLB, RSAT
-NLB
Keepin mind, you’ll need to install these components on both CAS servers. Once NLBhas been installed, load the NetworkLoadBalancingClusters module:
1Import-Module NetworkLoadBalancingClusters
NetworkLoadBalancingClusters
I am going to use the New-NlbCluster cmdlet to create a cluster named “CASArray” with the IP address 192.168.100.100/24:
1New-NlbCluster -InterfaceName NLB -ClusterName CASArray -HostName CAS01 -ClusterPrimaryIP 192.168.100
New
-NlbCluster
-InterfaceName
NLB
-ClusterName
CASArray
-HostName
CAS01
-ClusterPrimaryIP
192.168.100
Remove the default port rule and create separate port rules for the services that I want to include:
1Get-NlbClusterPortRule | Remove-NlbClusterPortRule -Force
Get
-NlbClusterPortRule
| Remove
-Force
Create new port rules for HTTP/S and MAPI RPC ports:
1Get-NlbCluster | Add-NlbClusterPortRule -StartPort 80 -EndPort 80 -Protocol TCP -Affinity Single2Get-NlbCluster | Add-NlbClusterPortRule -StartPort 443 -EndPort 443 -Protocol TCP -Affinity Single3Get-NlbCluster | Add-NlbClusterPortRule -StartPort 135 -EndPort 135 -Protocol TCP -Affinity Single4Get-NlbCluster | Add-NlbClusterPortRule -StartPort 1024 -EndPort 65535 -Protocol Both -Affinity Single
| Add
-StartPort
80
-EndPort
-Protocol
TCP
-Affinity
Single
443
3
135
4
1024
65535
Both
Add the second node to the cluster:
1Get-NlbCluster | Add-NlbClusterNode -NewNodeName CAS02 -NewNodeInterface NLB
-NlbClusterNode
-NewNodeName
CAS02
-NewNodeInterface
NLB has been configured, once both nodes are converged we can create a CAS array using the following EMS command:
1New-ClientAccessArray -Name “CAS Array” -FQDN casarray.litware.internal -Site “Default-First-Site-Name”
-ClientAccessArray
-Name
“CAS Array”
-FQDN
casarray.litware.internal
-Site
“Default
-First
”
If you have dual NICs and your NLB interface doesn’t not have a default gateway, you’ll want to enable IP forwarding using the following netsh command:
1Netsh interface ipv4 set int "NLB NIC NAME" forwarding=enabled
Netsh interface ipv4 set int "NLB NIC NAME" forwarding=enabled