NIC Teaming in Windows 2012 and Hyper-V

imageAs you might be aware that NIC Teaming on pre 2012 Hyper-V Servers is not supported, which is still true per KB968703. With the enhancement came with Windows 2012, now the teaming is built in to Windows to provide more bandwidth and/or High Availability. These changes also brought great flexibility; we can mix different Vendor’s NICs in a team (well, if they meet Windows logo requirements), no vendor software needed, integrated with OS, different team options, known GUI format, support by Microsoft… Lets get to the basics…..

Team Architecture:

image

Teaming comes with 2 modes:

Switch Independent: As its name implies, it is not dependent on the switch and does not require any other configuration on the switch, and also works with dump switches.  One of the advantages of this is to be able to team NICs that are connected to the different switches if switch diversity is needed to provide fault tolerance.

Switch Dependent: On the contrary, this mode requires a configuration on the switches. It has two modes:

    Generic or Static (802.3ad) Teaming: Need to configure both switch and
server manually to configure links.
    Dynamic Teaming (802.1ax,LACP): Uses Link Aggregation Control Protocol (LCAP)
to dynamically configure the links between switch and the host.

For each mode, there are two Load Distribution algorithms:

Address Hash: Can use source and destination MAC, source and destination IP (2-tuple), or source and destination TCP ports in addition to IP (4-tuple)

Hyper-V Switch port: uses the port number of a VM on the virtual switch. (per VM)

 

So what this means is:

  All Address hash modes Hyper-V Port mode
Switch Independent Outbound traffic is spread

Inbound traffic arrives on only one interface (primary member)

(good for; native mode teaming, active/standby mode,  a server that has little inbound traffic inbound and lots of outbound traffic like IIS)

Outbound traffic is tagged with the port.  All traffic with that port tag is sent on the same team member.

Inbound traffic will arrive on the same team member that the traffic is sent out on.

(Good when number of VMs exceeds number of team members and note that none of the VM’s can exceed the bandwidth of 1 NIC can provide)

Switch Dependent

(Static and LACP)

Outbound traffic is spread

Inbound traffic will be distributed by the switch

(Good for: Native teaming for maximum performance and when switch diversity is not required, VM can use the aggregated throughput from both NICs)

Outbound traffic is tagged with the port.  All traffic with that port tag is sent on the same team member.

Inbound traffic will be distributed by the switch

(Good when: VMs on the switch well-exceed the number of team members, note that none of the VM’s can exceed the bandwidth of 1 NIC can provide)

Ref: NIC teaming in W8


Team interfaces (tNICs)

This is the actual interface when a team is setup. It has two modes, default and VLAN Mode. In default mode, all traffic can pass. As its name implies, VLAN mode passes only traffic destined for that VLAN.  Only this first primary team interface can be in Default mode. Others should be in VLAN mode.


 

Teaming in a VM

NIC Teaming can be used in a Virtual Machine too. With this option, we must have NICs from two different virtual switch that is bind to different physical NICs. This is specially important when Single Root I/O Virtualization (SR-IOV)  is used since SRIOV cannot go above virtual switch layer.

When this is used, it is important to set vmnetworkadapter on the host to allow teaming in VM: Set-VMNetworkAdapter -VMName <VMname> –AllowTeaming 

Teams in VM can only be in Switch independent mode with Address Hash algorithm.


Notes:

  • Teaming of NICs with different speed connections is not supported in active/active mode.
  • Creation a team of teams, i.e., a team where the team members are actually team interfaces from other teams is not supported.
  • RDMA bypasses the protocol stack, team members does not support RDMA.
  • SR-IOV bypasses the host OS stack, NICs exposing the SR-IOV feature does not expose the feature it is in a team. Teams can be created in VMs to team SR-IOV virtual functions (VFs).
  • TCP Chimney Offload  is not supported with teams
  • Maximum number of NICs in a team: 32
  • Maximum number of team interfaces: 32
  • Maximum teams in a server: 32

 


 

Setup: GUI is very intuitive and easy to use. Open server manager, click local server and Click on NIC Teaming, or an servers, right click on the server, and select configure teaming:

 

image

or

image

Teaming GUI: Alternatively, it can be access from command line using lbfoadmin

image

 

Creation of new team from PowerShell:

image

 

Teaming modes:

image

Creation of tNICs (netlbfoteamingnic)

image

While playing with the GUI, I discovered STATISTICS: you need to maximize the window to see the stats or resize the window so that it is long enough to show the stats:

image

image

 

Network Connections view of the team created and tNICs:

image

Bulent Tolu

Bulent Tolu

Sr. Systems Engineer at VMware
Bulent is an IT professional with Master's in MIS and 10-years of experience in broad range of Information Technologies. He is exposed to engineering/architecting, implementation/integration, and administration of various high-available IT systems and infrastructure. He has a passion to continually research, test and evaluate new technologies and follow industry best practices to secure and optimize IT systems. Currently, he lives in Istanbul and works as a Sr. Systems Engineer at VMware.
Bulent Tolu

9 Thoughts on “NIC Teaming in Windows 2012 and Hyper-V

  1. saurabh mishra on 22 March 2013 at 11:46 said:

    Dear Bulent , you mentioned here that the maximum number of NIC in a NIC team can be 32 , have you experimented it? Because i read the maximum number can be 8 only in windows server 2012, do you talking about the same? please reply soon

  2. Hi Saurabh,

    Not sure whether we are talking about the same but per http://technet.microsoft.com/en-us/library/hh831648.aspx, Windows 2012 supports 32 network adapters in a team:

    “Requirements
    NIC Teaming requires the presence of a single Ethernet network adapter, which can be used for separating traffic that is using VLANs. All modes that provide fault protection through failover require at least two Ethernet network adapters. Windows Server® 2012 supports up to 32 network adapters in a team.”

  3. saurabh mishra on 28 March 2013 at 12:27 said:

    Hi Bulent,
    i have another doubt , hope you could help me on this while working on NIC teaming in switch dependent mode , is it necessary to configure switch in both static and dynamic teaming , i am using dell R610 and dell powerconnect-8024 , in static teaming in windows 2012 server it didnt ask for configuring the switch while in dynamic only it ask to configure the switch, while exploring about the nic teaming i found that its necessary to configure in both, does it? and what if i am using static teaming without configuring the switch?

  4. Hi Saurabh, if you are using switch independent teaming you do not need to configure anything on the switch. The host will balance the outbound traffic based on what you choose (the default is MAC hash).
    If you will be using switch dependent mode, the ports should be configured with LACP, I would not recommend static teaming. With LACP, the host and switch negotiates the team settings automatically.

  5. saurabh mishra on 04 April 2013 at 06:19 said:

    Hi Bulent,
    Can you tell me in windows server 2012 hyper-v how to map a Physical NIC(pnic) to a virtual NIC(vnic) , is there any way or powershell commands to find this?

    • I am not sure but if I had to guess, I would say yes. You can probably map pNic to virtual switch on the host and then map VMs to that switch. You may want to play with powershell get commands on VMNetworkAdapter, switch etc.

  6. saurabh mishra on 24 April 2013 at 13:23 said:

    Hi Bulent
    you had shown, nic teaming can be in four forms , while working on windows server 2012 i experienced switch dependent can be used in two static or generic mode and dynamic or LACP mode, and these both can also be used with Address Hash and Hyper-V addressing mode. So totally we have four modes in Switch dependent mode. If you know this better please clarify me static teaming with Hyper-v and LACP with address hash roles.
    Thanks Again

  7. Hi Saurabh,yes, you’d have 4 different choices with one of the modes, but address hash and hyperv switch port options are actually the algorithm you want to use with the teaming modes and defines how you would like to distribute the traffic per your environment. You can check the table above to see the difference between address-hash and hyperv port for switch dependent modes. The choice depends on your environment and requirements. Thanks

  8. Can I setup 4x NICS 10 GB ethernet as 01 TEAM with support 6 vlans including iSCSI network (for storage access) as tNIC?

    Regards,
    Thiago

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation

Share
Translate »