Monday, October 1, 2012

Configuring NIC teaming in Windows Server 2012 or later

Updated on 08-Jan-2014Added Windows Server 2012 R2 NIC teaming and VM NIC teaming informationIn Windows Server 2012, administrators can configure the NIC teaming without third-party software. Microsoft built-in it in Windows Server 2012. NIC teaming in Windows Server 2012 supports any brand and any NIC types in the same team. The NIC of the team is up to 32 NICs. Administrators also can manage the NIC team by PowerShell or GUI.

Goals

Create a NIC team by GUI and PowerShell in a physical server.

1. On Windows Server 2012, log in as Administrator.

2. Launch "Server Manager".

3. At left pane, select "Local Server".

Now, the "NIC Teaming" is "Disabled".

4. Next to "NIC Teaming", click "Disabled".

Assuming that the "Ethernet" and "Ethernet 2" will be the members of NIC team named "Production VLAN".

5. Next to "ADAPTERS AND INTERFACES", right-click "Ethernet", select "Add to New Team".

Click "Additional properties" to set up advanced option for this team.

There are 3 teaming options in Teaming mode:

Start to quote from Windows Server 2012 R2 Nic Teaming (LBFO) Deployment and Management:Switch independentThis configuration does not require the switch to participate in the teaming. Since in switch-independent mode the switch does not know that the network adapter is part of a team in the host, the adapters may be connected to different switches. Switch independent modes of operation do not require that the team members connect to different switches; they merely make it possible.Static Teaming (IEEE 802.3ad draft v1)This mode requires configuration on both the switch and the host to identify which links from the team. Since this is a statically configured solution there is no additional protocol to assist the switch and the host to identify incorrectly plugged cables or other error that could cause the team to fail to perform. This mode is typically supported by server-class switchesLACP (IEEE 802.1ax, LACP)This mode is also commonly referred to as IEEE 802.3ad as it was developed in the IEEE.In Windows Server 2012, there are 2 Load balancing mode. Dynamic option is started in Windows Server 2012 R2.

Address HashThis algorithm creates a hash based on address components of the packet and then assigns packets that have that hash value to one of the available adapters. Usually this mechanism alone is sufficient to create a reasonable balance across the available adapters.This components that can be specified, using PowerShell, as inputs to the hashing function include the following:

Source and destination TCP ports and source and destination IP addresses (this is used by the user interface when "Address Hash" is selected)

Source and destination IP addresses only

Source and destination MAC addresses only

The TCP ports hash creates the most granular distribution of traffic stream resulting in smaller streams that can be independently moved between members. However, it cannot be used for traffic that is not TCP or UDP-based or where the TCP and UDP ports are hidden from the stack, such as IPsec-protected traffic. In these cases, the hash automatically falls back to the IP address hash or, if the traffic is not IP traffic, to the MAC address hash.

Hyper-V Port

Since VMs have independent MAC addresses, the VM's MAC address or the port it's connected to on the Hyper-V switch can be the basis for dividing traffic. There is an advantage in using this scheme in virtualization. Because the adjacent switch always sees a particular MAC address on one and only one connected port, the switch will distribute the ingress load (the traffic from the switch to the host) on multiple links based on the destination MAC (VM MAC) address. This is particularly useful when Virtual Machine Queues (VMQs) are used as a queue can be placed on the specific NIC where the traffic is expected to arrive. However, if the host has only a few VMs, this mode may not be granular enough to get a well-balanced distribution. This mode will also always limit a single VM (i.e., the traffic from a single switch port) to the bandwidth available on a single interface. Windows Server 2012 R2 uses the Hyper-V Switch Port as the identifier rather than the source MAC address as, in some instances, a VM may be using more than one MAC address on a switch port.

Dynamic

This algorithm takes the best aspects of each of the other two modes and combines them into a single mode.

Outbound loads are distributed based on a hash of the TCP Ports and IP addresses. Dynamic mode also rebalances loads in real time so that a given outbound flow may move back and forth between team members.

Inbound loads are distributes as though the Hyper-V port mode was in use.

The outbound loads in this mode are dynamically balanced based on the concept of flowlets. Just as human speech has natural breaks at the ends of word and sentences, TCP flows ( TCP communication stream) also have naturally occurring breaks. The portion of a TCP flow between two such breaks is referred to as a flowlet. When the dynamic mode algorithm detects that a flowlet boundary has been encountered, i.e., a break of sufficient length has occurred in the TCP flow, the algorithm will opportunistically rebalance the flow to another team member if appropriate. The algorithm may also periodically rebalance flows that do not contain any flowlets if circumstances require it. As a result the affinity between TCP flow and team member can change at any time as the dynamic balancing algorithm works to balance the workload of the team members.

As a result, the NIC teaming was created.Additional information:To configure NIC teaming in a VM, make sure the vNICs of VMs are connected to external switches only.Then administrators need to configure NIC teaming option of VMs in Hyper-V manager or PowerShell console.