Wednesday, January 22, 2014

NIC Network Interface Card Teaming


What is NIC Teaming?
Network Interface Card  (NIC) Teaming  is a mechanism to increase the thruput and / or reliability of an Ethernet connection by binding 2 or more connections together.

I'm currently building a Virtualisation Platform on some ancient  (well 2008) hardware so I need to extract the best performance by all techniques and tweaks possible.

NIC teaming is a step in the right direction.


Installing the Windows 8.1 Driver - Error
From previous times I recall that the Intel ProSet driver is the one providing for detailed control of your Intel chipset Ethernet adapter.   The download is here


However I got a rude error message saying my AOC-UG-i4 card was not supported with its Intel Pro 1000 technology.

I consulted this link  and found that for Windows 8.1 there are either: In the  box drivers i.e. Provided natively with Windows 8.1  OR  the Full support, i.e. via the 100MB program I was trying to install.

So Intel is no good for Pro 1000 cards and the native Microsoft In Box driver does not support teaming.  Perhaps from the manufacturer?  On the Supermicro Website the links only went to Windows 2003. 


Further investigation is necessary.


Setting up the Switch


Assuming it would all work out eventually <such optimism!> the first practical step was reconfiguring my Ethernet switch to know about  aggregation:


I selected that Trunk 4 contain 4 ports 9,10,11,12 with LACP aggregation.


Help Text



Linux Redhat Enterprise Server 7

Install failed from USB key but worked from physical DVD

Then Bonding failed from the Gnome GUI but worked with manual configuration as shown below:

In our case bonding 4 Ethernet interfaces enp7s0f0, enp7s0f1, enp8s0f0, enp8s0f1 into bond0

After it worked it was a relief..

[root@nasa network-scripts]# ifconfig bond0
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 192.168.3.130  netmask 255.255.255.0  broadcast 192.168.3.255
        inet6 fe80::225:90ff:fe00:2060  prefixlen 64  scopeid 0x20<link>
        ether 00:25:90:00:20:60  txqueuelen 0  (Ethernet)
        RX packets 943909  bytes 1393931508 (1.2 GiB)
        RX errors 0  dropped 162  overruns 0  frame 0
        TX packets 178314  bytes 13256003 (12.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@nasa network-scripts]# pwd
/etc/sysconfig/network-scripts
 
-rw-r--r--. 1 root root   398 Jan 22 00:36 ifcfg-enp7s0f0
-rw-r--r--. 1 root root   398 Jan 22 00:37 ifcfg-enp7s0f1
-rw-r--r--. 1 root root   400 Jan 22 00:37 ifcfg-enp8s0f0
-rw-r--r--. 1 root root   399 Jan 22 00:37 ifcfg-enp8s0f1
-rw-r--r--. 1 root root   219 Jan 22 01:06 ifcfg-bond0
 
# example 1 of 4 files edited
cat ifcfg-enp7s0f0
DEVICE=enp7s0f0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no


# and the other 3 physical cards have similar entries
# just change the DEVICE= parameter of course

# now the bond device definition
# includes lacp specifics

[root@nasa network-scripts]# cat ifcfg-bond0
DEVICE=bond0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.3.130
NETMASK=255.255.255.0
NETWORK=192.168.3.0
GATEWAY=192.168.3.11
TYPE=Unknown
IPV6INIT=no
DNS1=8.8.8.8
BONDING_OPTS="miimon=100 mode=4 lacp_rate=1"

# lastly an alias definition
[root@nasa modprobe.d]# pwd
/etc/modprobe.d

[root@nasa modprobe.d]# ls -ltr
total 4
-rw-r--r--. 1 root root 21 Jan 22 01:05 bonding.conf
[root@nasa modprobe.d]# cat bonding.conf
alias bond0 bonding


# all is done now restart networking
[root@nasa modprobe.d]# service network restart
Restarting network (via systemctl): 
                                                  [  OK  ]


# check with
[root@nasa modprobe.d]# 
cat /proc/net/bonding/bond0
nslookup news.bbc.co.uk




Windows 8.1

Back to Windows 8.1

I found that Windows 2012 now has OS level, not vendor support so I sneakily tried the 2012 server commands under Windows Powershell:



Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.

PS C:\Windows\system32>  New-NetLbfoTeam NICTeam

cmdlet New-NetLbfoTeam at command pipeline position 1
Supply values for the following parameters:
TeamMembers[0]: port1
TeamMembers[1]: port2
TeamMembers[2]:
New-NetLbfoTeam : One of the required software components, 'ms_lbfo' is missing on the system. Please make sure you
are using a Server SKU, and that no OS components have been uninstalled.
At line:1 char:2
+  New-NetLbfoTeam NICTeam
+  ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_NetLbfoTeam:root/StandardCimv2/MSFT_NetLbfoTeam) [New-NetLbfoTeam],
   CimException

    + FullyQualifiedErrorId : MiClientApiError_Failed,New-NetLbfoTeam


Some Sad Googling Later:


NIC Teaming includes several parts:
  • The core teaming engine
  • The PowerShell management cmdlets ("NetLbfo")
  • The NIC Teaming GUI
The core teaming engine is a server feature.  It is not licensed for or included in Windows 8 or Windows RT; there is no way to enable it on these operating systems.
The PowerShell cmdlets ("NetLbfo") are built into Windows Server 2012, Windows 8, and Windows RT.  However these cmdlets are only useful when targeting a Windows Server 2012 machine.  When using the cmdlets from a Windows 8 or Windows RT machine, you can only manage remote servers.
The NIC Teaming GUI can be installed on Windows 8, if you download the RSAT package.  The NIC Teaming GUI, when running on Windows 8, can again only create and manage teams on remote servers, since the core teaming engine is not present on Windows 8.  (If you enable WinRM remoting on Windows 8, you can add that client to the NIC Teaming GUI, but since you can't create teams on Windows 8, there's not much the GUI can do besides enable/disable NICs.)
Network Bridging is a related feature, and it is available in Windows 8, Windows RT, and Windows Server 2012.  While Network Bridging is generally not as powerful as NIC Teaming, Network Bridging can do one neat trick that teaming cannot do: bridge over a WiFi adapter.
So I had to ditch the entire Windows 8.1 installation. This was moderately expensive since I had bought, installed and licensed Windows 8.1.   Hmmm. [Note when installing Windows 81 you have to enter the key to start installation, and it goes and checks on the Internet, so potentially it could tell you the next time the key is already taken.  I could not find any place to tell Microsoft that you were stopping using a license, with the inference that I would wish to use it later on a different system]





Windows 2012




It all works splendidly and is easily configured and monitored from the GUI.  If you had gone insane and removed the GUI you could also configure by typing in the above Powershell command lines as shown above. 

In Windows 2012 the Teaming function is now part of the Base OS so vendor specific drivers are no longer required.




Conclusions
As things stand then, Windows 8.1 cannot be used a Network Teamed Virtualisation base, so now it is down to Enterprise Linux or Windows 2012 Storage Server