This video looks at how multiple network cards can be combined together to form one virtual network card. The examples used in this video are for Windows Server 2012 R2, however the principles apply to other operating systems.
What is NIC Teaming?
NIC Teaming is the process of combining multiple network cards together for performance and redundancy reasons. Microsoft refers to this as NIC teaming, however other vendors may refer to this as bonding, balancing or aggregation. The process is the same regardless which solution is used or what it is called. Software running on the computer will communicate with the virtual network adapter. This virtual network adapter is responsible for distributing the network data between the different network cards in the system.
What is NIC Teaming? (Example)
Let’s consider a server with 3 network cards in one NIC team. The operating system will have one virtual network adapter that software will communicate with. This virtual network adapter connects to the teaming solution which determines how to send and receive data using the network cards in the system. If a network card was to fail, the teaming solution would use the other 2 network cards to send and receive traffic. This is done without the administrator having to configure anything, it is all handled by the teaming solution. The only configuration that an administrator needs to perform is to add a physical network card to a teaming solution.
Standby Vs Active
A standby network adapter is a physical network adapter that is used only when one of the other in-use network adapters in the NIC team fails. If you want to increase the throughput of your server, you can combine multiple network adapters together. Any network card in the NIC team that is used to transfer traffic is referred to as active. By combining multiple network cards together this potentially can increase the amount of throughput the server has on the network. However, there are a number of reasons why this throughput may not be as good as what you expect. In the right example, there are two network cards of different speeds. When using NIC teaming it is best to use network cards of the same speed. If you do not have network cards of the same speed, it may be worth considering making one of them a standby network card. This essentially provides a network connection if the primary network connection were to go down. This is one of the reasons why you would use a standby network card, however there are other reasons why you may want to use a stand by network adapter.
NIC Teaming Configuration
When a NIC team is created, you have the two configuration modes: Load Balancing Mode and Teaming Mode. In most cases, Load Balancing Mode effects outgoing traffic while the Teaming Mode effects incoming traffic. There are 3 settings for Load Balancing Mode listed below.
Address Hash: This mode looks at properties of the stream and uses these to determine which network adapter to send network traffic through. For example, if you had a network stream that used the same IP Address and port, this network stream would always use the same network card because the properties of the network stream are always the same.
Hyper-V Port: This mode is only used with Hyper-V virtual machines. When enabled, Windows will use the MAC address of the virtual machine to determine which network adapter to send network traffic out of. Each virtual machine running on the server will always use the same network adapter in the NIC team.
Dynamic: This is a new feature in Windows Server 2012 R2. This balancing mode combines the features of the other two modes into one. It also adds the ability to move a network stream from one network card to another in an attempt to balance the traffic.
The next set of options is the teaming mode. This mostly effects incoming traffic. Switch independent does not require any hardware support on your network to operate. Static teaming and LACP require the network switch that your server is plugged into to support network protocols.
The balancing mode address hash divides network traffic based on properties of the traffic like its MAC, IP Address and Port. Essentially what happens is this data is used to create a hash or a number. This number is used to determine which network card to send the network traffic. Thus, the same connection to the same destination using the same port should always use the same network adapter. This works well if the network streams have around about the same amount of network data on them. If one network stream has a lot more data on it than the others, this will have a higher throughput than the other network cards and thus good network averaging on the network card in the NIC team will not be achieved.
Address Hash/Incoming Traffic
If you are using Address Hash with no hardware solution, all incoming traffic will arrive via the same network card. For this reason, some administrators may choose to have a network card as a standby network card rather than combine multiple network cards together as there is no speed advantage for incoming network traffic.
If you are using Hyper-V port, you can use Hyper-V port for the balancing mode. Each virtual machine will have its own MAC address and thus incoming and outgoing traffic will always be routed out the same network card. If you have one virtual machine that uses a lot of network traffic, this balancing mode will not be able to balance out the traffic. This mode works best when you have a lot of virtual machines that have simpler network needs.
Single Flow of Traffic
When data is transferred over the network, the IP Protocol has the ability to check if the data has arrived in the correct order and reassemble it as required. When data arrives out of order, the network traffic needs to be put back in the correct order. This requires additional processing and memory on the receiving device. For this reason, network administrators will attempt to prevent this from happening whenever possible. This is why Windows Server does not support packet to packet load balancing.
This balancing mode is only available on Windows Server 2012 R2. This loading balancing mode combines the features of the other two balancing modes. It also has the ability to move a network stream from one network card to another in an attempt to balance network traffic. Remembering that you want to have a single flow of traffic across the network, you do not want to move a network stream at the wrong time as this can cause packets to arrive out of order. For this reason, Windows looks for what is referred to as a FlowLet. This is a logical break in traffic which reduces the chances of packets arriving out of order when a network stream is moved from one network card to another.
Incoming traffic in only divided up between different network cards if Hyper-V Port is used. If this is not used, all incoming traffic will arrive via the one network card unless a hardware based solution is used.
The teaming mode switch independent is the only teaming mode that allows different network cards to be plugged into different switches and does not require any configuration on the network switches.
Static Teaming (802.3ad)
The teaming mode static teaming requires the network switch that you plug the network cards into to support the 802.3ad. The network switch also needs to be configured to support this. In some cases, the network switch may be configured by default to allow this protocol. In some cases, a vendor may allow multiple switches to be combined to form the one virtual network switch, however in most cases this will be allowed and thus all network cards in the same NIC team need to be plugged into the one network switch.
Using static teaming means that incoming network traffic can be load balanced by the switch. However, it does not change how outgoing traffic is routed. How well the traffic is balanced depends on the algorithm used in the switch.
Link Aggregation Control Protocol (LACP) is a newer version of the 802.3ad. Essentially it works the same way as static teaming, however less switches on the market support LACP. These switches tend to be high end switches and thus this algorithm is generally used in enterprise environments. Like static teaming, the network switch will need to be configured to use it and the network cards will need to be plugged into the same network switch.
“Windows Server 2012 R2 NIC Teaming (LBFO) Deployment and Management” http://www.microsoft.com/en-us/download/confirmation.aspx?id=40319
“Installing and Configuring Windows Server 2012 Exam Ref 70-410” pg 23-26
“NIC Teaming Overview” http://technet.microsoft.com/en-us/library/hh831648.aspx
“Link aggregation” https://en.wikipedia.org/wiki/Link_aggregation
“Windows Server 2012 NIC Teaming (LBFO) Deployment and Management” http://www.microsoft.com/en-au/download/details.aspx?id=30160