Recently a couple of us took a look at why Samba clients can't connect to NetApp filers running CIFS. Even something as simple as this fails:
smbclient -L filername
Netapp does not support samba clients, but we're interested in finding out what goes wrong. Attached to the end of this note is a summary of SMB interaction with the netapp filer, both from a windows machine and from samba. It was prepared locally by Larry Dootlittle.
We'd like to see support for samba in OnTap. I'm told that it may be coming in a later version.
--Bryan Hess
================================================================================
Attempt to diagnose why Samba fails to establish SMB session with a NetApp. Larry Doolittle ldoolitt@jlab.org Oct 23, 1998
Based on output of tcpdump-3.4a5 with smb patches by A. Tridell "Leach" is draft-leach-cifs-v1-spec-01.txt (expired).
Windows 4 Samba Session Request (No mention of this packet in Leach) Flags 0x81000044 0x81000048 Source "WU" "RECYCLE"
Session Granted (No mention of this packet in Leach) (no differences)
SMBnegprot (REQUEST) Proc ID 28498 8593 UID 0 313 MID 2177 8693
SMBnegprot (REPLY) Proc ID 28498 8593 UID 0 0 MID 2177 8693
SMBsesssetupX (REQUEST) Flags1 0x10 (reserved) 0x08 (caseless) (Leach 3.2.2) Flags2 0x0 0x1 (KNOWS_LONG_NAMES) (Leach 3.2.3) Proc ID 28498 8593 UID 1 313 MID 2177 8693 Com2 0x75 0xFF Off2 116 0 MaxBuffer 2920 65535 MaxMpx 32 2 VcNumber 0 8593 (Illegal per Leach 4.1.2.1, see below) Capabilities 0x1 (not listed) 0x0 Account "GENFA" "LDOOLITT" Domain "" "WORKGROUP" OS "Windows 4" "Unix" LanMan "Windows 4" "Samba"
SMBsesssetupX (REPLY) Error class 0x0 0x2 Error code 0x0 1 Proc ID 28498 8593 UID 2048 0 MID 2177 8693
Samba returned a VcNumber of 8593, when the NetApp said NumVcs=1 in its SMBnegprot (REPLY). This is a violation of Leach's section on "Pre NT LM 0.12". VcNumber is not mentioned in Leach's section on "NT LM 0.12", which is what both Windows 4 and Samba negotiated with the NetApp.
I'll leave the analysis of this to folks on the CIFS team, but, as an FYI for those who might be curious:
Windows 4 Samba
Session Request (No mention of this packet in Leach) Flags 0x81000044 0x81000048 Source "WU" "RECYCLE"
Session Granted (No mention of this packet in Leach)
Those two packets are probably NetBIOS Session Service packets; see RFC 1001 and RFC 1002 for the spec on how they work in NetBIOS-over-TCP. The CIFS Internet Draft might refer to those RFCs.