Samba CIFSLinux
Samba CIFSLinux
Network Filesystems
Debashis Chakravarthy
System Engineer
IBM Linux Technology Center
Chakravarthy.d@us.ibm.com
VFS
VFS is quite different from the very complex, rich “IFS” interface that
Windows NT, 2000 and XP provide. Many Unixes support a VFS like
interface to filesystem driver software
Linux Filesystems
Source: http://www.protocols.com/pbook/sun.htm
Where does CIFS Fit In?
An OSI Model view
Source: http://ourworld.compuserve.com/homepages/timothydevans/osi.htm
CIFS
The Common Internet File System (CIFS) is a file sharing protocol. Client
systems use this protocol to request file access services from server
systems over a network. It is based on the Server Message Block protocol
widely in use by personal computers and workstations running a wide
variety of operating systems… CIFS has become a key file sharing
protocol due to its widespread distribution and its inclusion of
enhancements that improve its suitability for internet authoring and file
sharing. CIFS assumes even more importance due to the indirect use of
CIFS as a transport protocol for various higher level NT and Windows9x
communication protocols, as well as for network printing, resource
location services, remote management/administration, network
authentication (secure establishment services) and RPC (Remote Procedure
Calls).
Source: SNIA CIFS Technical Reference version 1.0
Scope of CIFS
• SMB/CIFS is often thought of in a broader sense
of the related collection of protocols providing:
– Network file and print sharing
– Logon handling and user/group authentication
– ACL management and authorization
– User, password and group management
– Server management
– Print Queue management
– Server/Resource location
– Various Network IPC mechanisms
– “Single system image” of network resources
CIFS – Common Internet File System
• People think of Microsoft when they think of CIFS since they coined the new name for
SMB protocol in 1996, soon after Sun announced WebNFS extensions to NFSv3.
• And CIFS is critical for interoperability with Microsoft systems
– “CIFS is the basis of everything that we do” and
– “The Underlying storage fabric is CIFS … for a long time.” [Rob Short MS VP
8/2001]
• But Dr. Barry Feigenbaum (IBM) actually invented CIFS’s predecessor SMB
(originally called “BAF” protocol) in the mid-1980s and multiple companies contributed
• SMB is the X/Open (OpenGroup) “Standard for PC Interworking” (1992)
• SMB/CIFS is the main network filesystem on OS/400, OS/2, DOS and other operating
systems and implementations are available on most every major operating system of
the past 10 years.
• Storage Network Industry Association just released CIFS Technical Ref
• Unix and Macintosh extensions to CIFS are documented by SNIA and implemented
What is Samba?
• … The most visible open source CIFS Server implementation
(which has grown to include tools, utilities and even ftp like clients)
• Samba, started in 1991 by Dr. Andrew Tridgell, is one of the larger
opens Source projects (almost 200,000 Lines of Code) – certainly
one of the largest included in all Linux distributions and one of the
most visible
• Which is quite impressive since Samba development effort is
focused on protocol analysis and interoperability testing and
maximal portability rather than coding of new features
• And The implementation is fairly “terse” – ie smaller in code size
than one would expect for the amount of function implemented and
some key portions have been rewritten multiple times
• Samba team is somewhat conservative
Samba (continued)
• Samba’s target environment is networks with either Windows
servers or Windows clients but it is broadening due to spread of
CIFS capable devices and server appliances
• Samba implements a superset of the various loosely related
protocols documented by SNIA (CIFS T/R version 1), X/Open (PC
Interworking specs), OpenGroup (DCE/RPC) and IETF (RFC
1001/1002 and various draft RFCs, some expired). These include
extensions to the protocol for Macintosh and Unix systems.
• It aims at equal or better function than the corresponding function in
Windows 2000/XP/Active Directory (in the long run)
• It is quite fast and highly configurable and implements
some interesting features
• See http://www.samba.org
Samba/CIFS benefits
• New technology being brought into Linux
– Marries much of what is good in Windows with what is good in Linux
• Standards (both open and defacto) being adopted
– SNIA CIFS Technical Reference spec is improving. New CIFS related
RFCs are in process (e.g. CIFS URL) with others at early design stages
– Keeping up with important parts of Defacto standard CIFS client
implementation of Windows 2000->XP, although moving target, causes
constant improvement
– Perception of playing Catchup (with Microsoft) is interesting. Samba is
more functional than Win2K in some key areas and does not need full
functional parity with Win2K in all areas in order to greatly enhance
“Linux” much as Linux NFS does not need to perfectly match Solaris
NFS related function.
• (Note NFSv4 borrows many CIFS concepts)
Samba 3.0 Features
• Active Directory support. Able to join ADS realm as
a member server and authenticate users using
LDAP/Kerberos support
• Unicode support (Improved internationalization)
• New authentication system.
• new "net" command.
• Samba now negotiates richer status32 codes
• Better printing support from Windows 2000
CIFSFS Target Enhancements (not in
existing 2.4 SMBFS module)
• Locking support
• Client side caching (oplock) support
• “native TCP/IP” (port 445) not just RFC1001/1002 transport
supported
• Internationalization (Unicode)
• Microsoft/Samba “dfs” support (globally rooted namespace and
server side replication share )
• Synergy with WinBIND(PAM logon and NSS modules)
• Support for Unix Extensions to CIFS (added to standards document
in approx. 1998)
• (optional) Use LDAP to find global root of SMB/CIFS namespace
• (optional) Remote boot support (for network booted clients such as
kiosks and appliances)
Reliability features
• POSIX semantics honored where possible (improvement
over smbfs and current nfs) – should reduce data loss
problem with network filesystems (e.g. most don’t handle
locks correctly, and cache data on client incorrectly)
• Transparent reconnect after server/network failure
• Directory notification support (allowing safe caching of
directory entries)
• Large file support – can handle files larger than 2GB
• Improved error handling (CIFSFS will understand those
additional errors in CIFS spec that are not handled by
SMBFS today)
Security Features
• SMB signing (ensures data integrity on public networks). Will allow
feature to be enabled/disabled at mount time.
• Will support (at least) NTLM++ authentication
• (Optional) Enhanced open authentication - Kerberos v.5/SPNEGO
SMB session authentication (ala Leach presentation and the paper
from Craig Russ at Unisys).
• (Optional) SSL support for confidentiality of data
• Configuration settings for security negotiation (e.g. whether to allow
plain text passwords)
• (Optional) per-file signing
• Multi-user mounts
• Quota and ACL support
• And more …
Performance
CIFS – Exclusive Oplock
Opportunistic Locks - mechanism for simple
Distributed Token Management (ie client cache coherence)
• Skipping NBT (I.e. RFC 1001 name service) – using "pure TCP" on port
139. Is this always ok?
• In pure TCP - what should go in UNC path in tConX? IP address works but
what about multiple servers on one port? *SMBSERVER does not work for
Win2K
• Does ipv6 address work in SMB tConx path?
• Are there cases in which Unicode translation should be disabled even
though both server and client support it? (same codepage on each - how
can the client detect the server's code page)
• Performance of kernel to user space transitions for access to DNS address
helper routines when given “implicit” mounts (e.g. “dfs” junctions)
• How effective is skipping NBT in reducing WINS related denial of service
attacks?
More CIFS Name Resolution issues