Resource icon

Setting up SMB 3 multichannel on FreeNAS

This guide has been written by someone who is NOT a certified expert. If any information is inaccurate or could be phrased better do share your thoughts in the discussion thread so I can update this document.

A step by step guide to setting up SMB 3 Multichannel on FreeNAS

What is Multichannel?

Multichannel, which is a feature of SMB 3 (a Microsoft file sharing protocol), enables people to simply and easily aggregate multiple physical network links and allows a single client to utilize the combined bandwidth. For example, instead of being stuck with 1Gb/s file transfers you could have 2Gb/s or 4Gb/s. In theory, if you're using 10GbE, you could aggregate them to allow for 20Gb/s or 40Gb/s to a single client.

As of Windows 8 and later SMB 3 multichannel is included and enabled by default. At the same time, Microsoft has refined the drivers for this process to a point where setting it up is plug'n'play in most instances. Now, SMB 3 multichannel on FreeNAS (or any other *NIX based system) on the other hand isn't as easy. Not only are there prerequisites, but your configuration has to follow specific instructions. Samba is responsible for bringing SMB support to *NIX, not Microsoft, so enabling certain features of the protocol is done differently.

This guide will help people who want to set this up on FreeNAS but may prove to be useful for people using other versions of *NIX. It should also be known that Samba support for multichannel as of late 2017 is still considered experimental and your mileage may vary. Samba has no official support for it but it can work with the right setup.

What are the prerequisites?

In order to use multichannel at all on FreeNAS, you need to have Samba version 4.4.0 or later. You can check what version you have by entering shell and using the command samba --version.
If your version is outdated, update FreeNAS.

What hardware is needed?

There are a few options. You can use a single multiport NIC that has 2 or 4 ports, or you can use multiple NICs, which will offer redundancy, as, with SMB multichannel, if the aggregated link is lost the remaining link(s) will continue to operate (at the cost of reduced performance). Each machine will require an equal number of ports.

IMPORTANT: It is very recommended when aggregating the links that the NICs support Receive Side Scaling (RSS). RSS allows the responsibility of handling multiple TCP/IP connections to be divided up across multiple CPU cores. If you just so happen to have NICs that support Remote Direct Memory Access (RDMA) this will also work, but this is a feature on enterprise NICs and is only really applicable to very low latency applications.

The best way to check if your NICs support RSS is to find what chipset is used and search that chipset on the web. For example the Intel i210, Intel 82574L, & Broadcom BCM57810S all support RSS.

You will also require a network switch. Any layer 2 switch should suffice, as long as it has a sufficient number of ports and the ports support speeds equal to that of the NICs.

How to configure:

This is where things differ quite a bit from Microsoft's implementation on Windows. Note that the interface configuration on your Windows machine will need to follow the same structure as on the FreeNAS server. Microsoft setup the protocol to work in 2 different ways. The user could plug every port into the switch, have a router connected running DHCP, have every port on the NICs set to DHCP, then SMB would automatically see every port on the same network and aggregate them.

IMPORTANT: The other way SMB 3 multichannel can work is by setting up the interfaces in pairs on different networks/subnets. At this time this is the only method Samba supports for multichannel. Below are a few ways of achieving this:

If the server is part of your local network and you want 2Gb/s or 4Gb/s but everyone else is fine with 1Gb/s then that means the existing network needs to stay in place. So, lets say the existing network is 192.168.0.0 255.255.255.0 and the server has a static address of 192.168.0.254. You can set up the other interfaces on the server on the 192.168.1.0 network then 192.168.2.0 and 3.0. Now admittedly this is a huge waste of addresses if the aggregated connection is only for one host. The following is a more proper configuration in this instance:

PC NIC1: 192.168.0.10/24 (/24 = 255.255.255.0)
PC NIC2: 192.168.1.1/30 (/30 = 255.255.255.252)


FreeNAS NIC1: 192.168.0.254/24
FreeNAS NIC2: 192.168.1.2/30


A /30 subnet is very useful for point to point connections. This prevents wasting addresses. If you have 4 interfaces on the server and you're the only person who needs 4Gb/s probably the best way to set up the addresses without modifying the existing local network would be to go:

PC NIC1: 192.168.0.10/24
PC NIC2: 192.168.1.1/30
PC NIC3: 192.168.1.5/30
PC NIC4: 192.168.1.9/30


FreeNAS NIC1: 192.168.0.254/24
FreeNAS NIC2: 192.168.1.2/30
FreeNAS NIC3: 192.168.1.6/30
FreeNAS NIC4: 192.168.1.10/30


In this configuration (above) each pair of interfaces (.10 & .254, 1.1 & 1.2, 1.5 & 1.6, 1.9 & 1.10) are all on different networks - more accurately, each pair is on a different subnet. The subnet mask (the /24 & /30, also depicted as 255.255.255.0 & 255.255.255.252) determines what bits of the address are network bits and which are host bits.

What if I want an independent dedicated 2Gb/s or 4Gb/s network with 1 host?

If you buy or have a pair of dual/quad port 1Gb/s NICs and have a switch you want to dedicate to linking the server to your computer with then it makes things easier. First off, you'll have to setup the interfaces on networks other than your home/office network. Personally, if the primary network is 192.168.0.0 or 172.16.0.0 or 10.0.0.0, then the easiest way for me to subnet the interfaces would just be to use Class A:

10.0.0.1-.2/30
10.0.0.5-.6/30
10.0.0.9-.10/30
10.0.0.13-.14/30


What other configuration is necessary?
A big thing that differs from Windows is that Samba has multichannel disabled by default. You have to enable it. You can do this by going to the FreeNAS WebUI, then going to Services and configuring the service CIFS/SMB (its name will be either CIFS or SMB depending on your version). You will then have to find the Auxiliary Parameters option (to see it you may have to click Advanced Mode). In here you will have to enter server multi channel support = yes.

This will modify the smb.conf file. You will also have to set the Server maximum protocol to SMB3.0_11. There's also _02 & _00 these correspond to which version of windows you're using but setting the maximum protocol to _11 will make the connection between Windows and the server use the highest protocol that they both support.

Troubleshooting:

With everything setup in this manner, you should now see speeds in excess of 1Gb/s for file transfers. If not, re-check your configuration. If this doesn't fix the issue, try using SMB3.0_02, SMB3.0_00, or SMB3.0. If none of this helps, it is sometime necessary to update Windows for multichannel support.
Author
Windows7ge
Views
22,103
First release
Last update
Rating
0.00 star(s) 0 ratings
Top