What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Is Samba 4.1 even theoretically possible for RT-AC66u?

RussellInCincinnati

Senior Member
Is Samba 4.1 thinkable for these modest-capability routers like RT-AC66u or the more powerful '87u? A lot of the features seem not earth-shaking, but I do see encrypted file data transmission support. Which might be enough security for some kinds of users (several of my clients for example) that don't need a full VPN tunnel, they just want file contents that are being copied to be encrypted.

Not sure if the AES encryption in SMB v3.0 as supported in Samba 4.1 is one of those implementations that the U.S. government has compromised.

Merlin I don't even want you to answer this question if it takes more than 5 minutes of your time to think about it. My vague thought is that some people might find encrypted file transfers easier to get working with SMB v3.0 rather than full VPN connections.
 
Last edited:
Highly unlikely to happen in the short or even midrange term. A lot of the added functionality would require far too much flash space, and they would also be seriously handicapped by the slow CPU.

The big reason I chose to upgrade to 3.6.24 rather than 4.x was because the OpenWRT devs did a lot of work on removing unnecessary parts of it to make it fit into a small flash storage. That type of fat cutting wasn't done on 4.1.

Also, the performance drop between 3.0 and 3.6 leads me to believe that an additional performance drop might also be seen when jumping to 4.x. When dealing with such low-power CPU, code tends to get slower with new versions, rarely faster, as more features get added.
 
Last edited:
can see that SMB v2.0 in your latest Samba 3.6 update is good enough

Wikipedia on the SMB version 2 protocol that RMerlin has already incorporated via Samba 3.6 into Asus WiFi router firmware:
It also introduces the notion of "durable file handles": these allow a connection to an SMB server to survive brief network outages, as are typical in a wireless network, without having to incur the overhead of re-negotiating a new session.

Thanks RMerlin, come to think of it your new Samba 3.6 update has the most important Samba v2.0 feature we need. Which is merely that it works a whole lot better.

RMerlin:
The big reason I chose to upgrade to 3.6.24 rather than 4.x was because the OpenWRT devs did a lot of work on removing unnecessary parts of it to make it fit into a small flash storage.
Fun to realize that you are not simply adding new code, but also efficiently scooping up (usefully working and debugged) parts of other open-source WiFi firmware projects and folding them into the Merlin projects.
 
Last edited:
Wikipedia on the SMB version 2 protocol that RMerlin has already incorporated via Samba 3.6 into Asus WiFi router firmware:
It also introduces the notion of "durable file handles": these allow a connection to an SMB server to survive brief network outages, as are typical in a wireless network, without having to incur the overhead of re-negotiating a new session.

Thanks RMerlin, come to think of it your new Samba 3.6 update has the most important Samba v2.0 feature we need. Which is merely that it works a whole lot better.

SMB 2.0 is disabled by default however, as it can quite drastically reduce performance on some routers where the CPU is the bottleneck. On my RT-AC87U for example, SMB performance dropped from 65 MB/s to 55 MB/s if I enabled SMB 2.0 support.

I kept an (undocumented) nvram setting for people who still want to enable it.

Code:
nvram set smbd_enable_smb2=1
nvram commit
service restart_samba

That works starting with 376.48 Beta 1.

Samba 3.6.24 supports up to SMB 2.02.

For the curious minded, if you run Windows 8, the following Powershell cmdlet will tell you which SMB dialect you are using with each SMB connections:

Code:
Get-SmbConnection

If you change the supported dialect on the router, you must restart your PC's Workstation service to force it to re-negotiate the dialect used:

Code:
Restart-Service -Force Workstation

You can also use the Services console.

Fun to realize that you are not simply adding new code, but also efficiently scooping up (usefully working and debugged) parts of other open-source WiFi firmware projects and folding them into the Merlin projects.

There is a lot of code moving between various firmware projects out there. The Asuswrt family tree is a quite interesting one. Asuswrt was forked from TomatoUSB, which came from Tomato, which came from HyperWRT (if I remember correctly), which came from the original Linksys FW for the WRT54G.

Asuswrt also borrowed code from DD-WRT (the PPTP support) OpenWRT (I forgot which parts), the original WL500G firmware by Oleg, Asuswrt-Merlin (OpenVPN code which I had taken from TomatoVPN).

Personally, I've taken code from OpenWRT (Samba 3.6), WL500G (various kernel patches, part of ipset support), Tomato (IPTraffic and OpenVPN). I also keep an eye on the development of DD-WRT and Padavan's FW - not likely that I'll get any code from either of these as they are quite different from mine, but they allow me to see what's going on out there. Padavan's changelog is a good way for me to quickly discover if a new Dropbear or miniupnpd version was released, for example.

This is a pretty good example of what Open Source can bring to the table when done right: lots of code moving between various projects.
 
slightly fancier Get-smbConnection command form

How fun it is to get Samba version 2.02 working on the RT-AC66u router, just as merlin describes. The typical read (file copy) speed to a Windows 8.1 machine (20mhz single stream 802.11n wireless connection) is at just about 8 megabytes per second.

(Don't take this as the upper limit of the RT-AC66u, because that 8 megabytes/second copy speed is over the single-stream nominal "72 megabits per second" wireless connection.)

After doing all the setups as RMerlin described, I went to a Windows 8 command prompt and typed
net use Z: \\rt-ac66u\install
and immediately got a drive Z: on my Windows machine file explorer, that was connected to the folder in the root of my USB device named "install".

To investigate the SMB connection "dialect" or version level used by Windows 8 to connect a drive letter to a Samba file share on the RT-AC66u, you can again right-click on the left corner Windows symbol as usual, and then click
Command Prompt (Admin)
and then at the prompt type

PowerShell

then, assuming your server name is for example "rt-ac66u", you can type

Get-SmbConnection -ServerName rt-ac66u | Select-Object -Property *

and get a pretty nice output like this (notice that my Samba connection to the Asus router rt-ac66u is at version 2.02):

SmbInstance : Default
ContinuouslyAvailable : False
Credential : rt-ac66u\admin
Dialect : 2.02
Encrypted : False
NumOpens : 1
Redirected : False
ServerName : rt-ac66u
ShareName : install
UserName : NORISTOSHIBA\noris
PSComputerName :
CimClass : ROOT/Microsoft/Windows/SMB:MSFT_SmbConnection
CimInstanceProperties : {ContinuouslyAvailable, Credential, Dialect,
Encrypted...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top