Getty Images

NFS vs. CIFS vs. SMB: What are the differences?

There are stark differences among file sharing protocols NFS, CIFS and SMB. Compare access, application deployment, configuration and security, among other key features.

What is the difference between NFS and CIFS? Can you explain when you should use NFS vs. CIFS?

NFS (Network File System) and CIFS (Common Internet File System) are protocols designed to allow a client system to view and access files stored on a remote computing device, such as a server or a PC. CIFS is a dialect of the Server Message Block (SMB) protocol that is used by most current storage systems.

Microsoft stopped using the term CIFS in favor of Server Message Block Version 1.0 (SMB1) starting with implementations in Windows 2000. Microsoft made few changes between CIFS and SMB1 and used the same dialect identifier, Windows NT LAN Manager (NTLM) 0.12.

Version 2 of SMB was an entirely new file-sharing protocol that Microsoft based on SMB concepts, and subsequent Microsoft SMB updates built on that revision. CIFS remains as an implementation of SMB, but current storage systems rarely use CIFS.

In a typical scenario, a client-based application or system makes a request of a server for access to a file or to pass a message to a program that runs in the server. The file server takes the requested action and returns a response. A user is then able to view, store and update files on a remote computing or storage device as though they were on their own computer.

The NFS and CIFS/SMB protocols were developed to work with any OS and hardware. However, in practice, NFS is most commonly implemented on Linux and Unix systems and CIFS/SMB is typically used with Windows, in part because the applications developed for those OSes expect a certain set of file system properties.

NFS vs. CIFS applications

A significant difference during most of the lifetimes of the respective protocols is that NFS has long been associated with the deployment of mission-critical enterprise applications, such as Oracle databases and VMware virtualized infrastructure, because it allows clients to non-disruptively reconnect after reboots for server maintenance or failover.

CIFS/SMB initially tended to focus on shared file and print services and applications used in small LANs. Microsoft did not add support for transparent reconnects until later, with the third version of the SMB protocol.

Microsoft provides NFS version 2 (NFSv2) and NFSv3 clients in all the supported versions of Windows and NFSv4.1 servers starting with Windows Server 2012. Likewise, Linux supports an SMB client, and open source Samba software has long been available to enable SMB/CIFS on Linux and Unix. Apple's macOSes primarily use SMB today, but they also support NFS. Enterprise storage systems often support both NFS and SMB for file access.

History of NFS vs. CIFS/SMB

Sun Microsystems developed NFS in the mid-1980s with the goal of enabling file system resources to be shared over a network at a speed comparable to local file access. NFSv2 was the first version released outside of Sun. With NFS, a user or a system administrator can mount all or a portion of a file system.

Sun released the NFS protocol specification for free use in 1989 as Request for Comments (RFC) 1094 available from the Internet Engineering Task Force (IETF). Sun also commercially licensed a reference implementation of the NFS source code to a large number of vendors starting in 1985. Some vendors, such as IBM, wrote their own versions of NFS based on RFC 1094. Open source versions of NFS first appeared in FreeBSD and later in Linux, which is currently the predominant NFS implementation.

In 1998, Sun Microsystems ceded control of NFS maintenance to the IETF. Technologists affiliated with a wide range of vendors contribute to the ongoing development of the NFS protocol.

Barry Feigenbaum created SMB, originally known as the BAF protocol, in the early 1980s when he worked at IBM. The protocol was originally used in DOS, OS/2 and early versions of Windows to enable file and device sharing across a network. Vendors that worked on enhancements to SMB included Intel, 3Com and, notably, Microsoft.

Microsoft began using the term Common Internet File System in the 1990s to describe a version of the SMB protocol based on the Windows NT OS. Microsoft defined CIFS as the NTLM dialect of the SMB protocol for use with Windows NT Server 3.51, Windows NT Server 4.0, Windows NT Workstation 4.0 and Windows 98 OSes. The term CIFS was also sometimes used to refer to all the dialects of the SMB protocol.

CIFS was designed to not only provide clients with managed, concurrent access to files and directories hosted on server systems, but to facilitate access to print queues and interprocess communication services over a network. By contrast, NFS restricted its domain to file sharing.

With NFS vs. CIFS, both protocols are transport-independent, but CIFS was most commonly used with direct hosting and NetBIOS-based transports, such as NetBIOS over TCP/IP.

Why CIFS/SMB1 is outdated

The term CIFS is outdated because it applies to OSes that Microsoft no longer supports. SMB1 has not been in use since Microsoft discontinued support of Windows 2000.

CIFS/SMB1 tended to be more chatty in its communications than NFS, and it sometimes required file protocol optimization over a WAN. SMB1 was designed for users accessing files and applications in small LANs in the 1980s and 1990s. Microsoft modernized and rewrote the majority of the SMB codebase starting with Windows Vista and Windows Server 2008.

SMB2 was designed for more secure user access to files and applications with greater efficiency and performance in WANs and large LANs than earlier versions of the protocol. SMB3 was developed for block infrastructure workloads operating at modern data center scale over remote direct memory access networks, plus highly secure file access scenarios.

NFS has evolved over time and become more similar to SMB in many ways through the addition of features such as asynchronous writes on the server to improve performance, access control lists and a new version of file locks. NFSv4.2 is fully stateful in contrast to earlier NFS versions that were designed for use in implementations where the server did not need to maintain the state of any clients to function. But NFS still handles server reboots and recovers state to enable its continued use for persistent data-critical applications.

With the respective evolution of the protocols, NFSv4 and SMB3 have become more similar in functionality than they have ever been. But with NFS vs. CIFS, NFS will likely continue to be used primarily in Linux environments, while SMB will remain the dominant choice for Windows.

Dig Deeper on Primary storage devices

Disaster Recovery
Data Backup
Data Center
Close