New NetLbfoTeam - PowerShell
Overview
The New-NetLbfoTeam
command creates a new Network Load Balancing and Failover (LBFO) team on servers running Windows Server 2012 R2 or later. LBFO teams provide load balancing and failover for network traffic, improving the availability and performance of network services.
Syntax
New-NetLbfoTeam [-Name] <string> [-Description] <string> [-MinimumNodes] <uint32> [-NetworkCategory] <string> [-NetworkResource] <string[]> [-BandwidthRateLimitGbps] <uint32> [-MediaType] <string> [-IPProtocol] <string[]> [-LoadBalancingAlgorithm] <string> [-LoadDistributionPolicy] <string> [-FailoverPolicy] <string> [-GatewayMacAddress] <physicalAddress> [-GatewayMacAddressMethod] <string> -TeamMembers <string[]>
Options/Flags
-Name – Specifies the name of the LBFO team.
-Description – Specifies a description for the LBFO team.
-MinimumNodes – Specifies the minimum number of active nodes required for the LBFO team to be considered healthy.
-NetworkCategory – Specifies the network category of the LBFO team. Valid values are:
- Public
- Private
- Internal
-NetworkResource – Specifies the network resources (NICs) to be used by the LBFO team.
-BandwidthRateLimitGbps – Specifies the bandwidth rate limit (in gigabits per second) for the LBFO team.
-MediaType – Specifies the media type for the LBFO team. Valid values are:
- ethernet
- infiniband
-IPProtocol – Specifies the IP protocols to be used by the LBFO team. Valid values are:
- TCP
- UDP
-LoadBalancingAlgorithm – Specifies the load balancing algorithm to be used by the LBFO team. Valid values are:
- Dynamic
- Static
-LoadDistributionPolicy – Specifies the load distribution policy to be used by the LBFO team. Valid values are:
- Address Hash
- Node Hash
- Least Connections
- Least Bandwidth
-FailoverPolicy – Specifies the failover policy to be used by the LBFO team. Valid values are:
- Automatic
- Manual
-GatewayMacAddress – Specifies the gateway MAC address to be used by the LBFO team.
-GatewayMacAddressMethod – Specifies the method to be used to assign the gateway MAC address to the LBFO team. Valid values are:
- System
- Customer
-TeamMembers – Specifies the team members to be added to the LBFO team.
Examples
Example 1: Create a new LBFO team
New-NetLbfoTeam -Name "MyTeam" -NetworkResource "NIC1", "NIC2"
Example 2: Create a new LBFO team with a custom gateway MAC address
New-NetLbfoTeam -Name "MyTeam" -NetworkResource "NIC1", "NIC2" -GatewayMacAddress "00:11:22:33:44:55" -GatewayMacAddressMethod Customer
Common Issues
One common issue when creating an LBFO team is that the network resources specified are not compatible. For example, the network resources may not be on the same physical switch or may not be configured with the same VLAN.
Another common issue is that the LBFO team is not able to obtain an IP address. This can be caused by a number of factors, such as the network resources not being configured with a DHCP server or the LBFO team not being properly configured to use a static IP address.
Integration
The New-NetLbfoTeam
command can be used with other PowerShell commands to automate the creation and management of LBFO teams. For example, the following script creates a new LBFO team and then adds it to a failover cluster:
# Create a new LBFO team
$team = New-NetLbfoTeam -Name "MyTeam" -NetworkResource "NIC1", "NIC2"
# Add the LBFO team to a failover cluster
Add-ClusterNetworkInterface -Cluster "MyCluster" -LbfoTeam $team