The Samba-Bugzilla – Bug 12009
smbclient write block size buffer for SMB1 is more than SMB2/SMB3 in samba-4.x
Last modified: 2016-07-04 14:28:38 UTC
Created attachment 12258 [details]
smbcwrite with SMB1 and SMB2
Hi samba Team,
In samba-4.4.4 write block size for SMB1 is more than that of SMB2/SMB3 during file write from sambaclient-4.4.4 to the destination.
When SMBC_Write() is called the buffer size is 128K Bytes(130048) at offset 0 in SMB1 and 64K Bytes(65536) in SMB2/SMB3.
Ex: 104 4.935495 10.188.103.44 10.188.103.206 SMB 1310 Write AndX Request, FID: 0x4000, 130048 bytes at offset 0
(same file is used for both SMB1 and SMB2)
But in 3.6.x its 64K Bytes (as we know only SMB1 protocol for smbclient was supported before versions of samba-4.x).
I have attached the wireshark packet data for your reference.
I want to know why this varies between protocol versions in samba-4.x.
This behavior exists in all version from samba-4.x
If there is server which does not support more than 64K bytes write block size of buffer in each chunk from the client, it will fail to write to the destination.
Is this is a degrade for SMB1 of smbclient ?
Please let me know I will provide you more info if required.
Thanks & Regards,
Your server is windows vista, which only supports
SMB 2.0(0)2 or SMB1.
The max block size for SMB 2.02 is 64k.
For SMB1 it's 128K.
Newer Windows and Samba versions support SMB 2.1 and higher which
support larger buffers. 8MByte is the default on current versions.